mirror of
https://github.com/darlinghq/darling-gnutar.git
synced 2024-11-23 03:59:43 +00:00
gnutar-453
This commit is contained in:
commit
dc8f5fa3fa
65
Makefile
Normal file
65
Makefile
Normal file
@ -0,0 +1,65 @@
|
||||
##
|
||||
# gnutar Makefile
|
||||
##
|
||||
|
||||
# Project info
|
||||
Project = gnutar
|
||||
UserType = Administrator
|
||||
ToolType = Commands
|
||||
Extra_Configure_Flags = --program-prefix=gnu --includedir=/usr/local/include
|
||||
Extra_CC_Flags = -mdynamic-no-pic
|
||||
GnuAfterInstall = remove-junk install-symlink install-plist
|
||||
|
||||
Install_Prefix = /usr/local
|
||||
Install_Info = /usr/local/share/info
|
||||
|
||||
# It's a GNU Source project
|
||||
include $(MAKEFILEPATH)/CoreOS/ReleaseControl/GNUSource.make
|
||||
|
||||
# Automatic Extract & Patch
|
||||
AEP = YES
|
||||
AEP_Project = tar
|
||||
AEP_Version = 1.17
|
||||
AEP_ProjVers = $(AEP_Project)-$(AEP_Version)
|
||||
AEP_Filename = $(AEP_ProjVers).tar.bz2
|
||||
AEP_ExtractDir = $(AEP_ProjVers)
|
||||
AEP_Patches = Makefile.in.diff tar-1.17-buildfix.diff \
|
||||
EA.diff preallocate.diff quarantine.diff \
|
||||
PR5405409.diff PR5605786.diff PR6450027.diff \
|
||||
PR7691662.diff
|
||||
|
||||
ifeq ($(suffix $(AEP_Filename)),.bz2)
|
||||
AEP_ExtractOption = j
|
||||
else
|
||||
AEP_ExtractOption = z
|
||||
endif
|
||||
|
||||
# Extract the source.
|
||||
install_source::
|
||||
ifeq ($(AEP),YES)
|
||||
$(TAR) -C $(SRCROOT) -$(AEP_ExtractOption)xf $(SRCROOT)/$(AEP_Filename)
|
||||
$(RMDIR) $(SRCROOT)/$(Project)
|
||||
$(MV) $(SRCROOT)/$(AEP_ExtractDir) $(SRCROOT)/$(Project)
|
||||
@for patchfile in $(AEP_Patches); do \
|
||||
(cd $(SRCROOT)/$(Project) && patch -p0 -F0 < $(SRCROOT)/patches/$$patchfile) || exit 1; \
|
||||
done
|
||||
endif
|
||||
|
||||
remove-junk:
|
||||
$(RMDIR) $(DSTROOT)$(Install_Prefix)/lib/
|
||||
$(RMDIR) $(DSTROOT)$(Install_Prefix)/libexec/
|
||||
$(RMDIR) $(DSTROOT)$(Install_Prefix)/sbin/
|
||||
$(RMDIR) $(DSTROOT)$(Install_Prefix)/share/
|
||||
|
||||
install-symlink:
|
||||
$(MKDIR) $(DSTROOT)/usr/bin/
|
||||
$(LN) -fs $(Install_Prefix)/bin/gnutar $(DSTROOT)/usr/bin/gnutar
|
||||
|
||||
OSV = $(DSTROOT)/usr/local/OpenSourceVersions
|
||||
OSL = $(DSTROOT)/usr/local/OpenSourceLicenses
|
||||
|
||||
install-plist:
|
||||
$(MKDIR) $(OSV)
|
||||
$(INSTALL_FILE) $(SRCROOT)/$(Project).plist $(OSV)/$(Project).plist
|
||||
$(MKDIR) $(OSL)
|
||||
$(INSTALL_FILE) $(Sources)/COPYING $(OSL)/$(Project).txt
|
222
gnurmt.8
Normal file
222
gnurmt.8
Normal file
@ -0,0 +1,222 @@
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the University of
|
||||
.\" California, Berkeley and its contributors.
|
||||
.\" 4. Neither the name of the University nor the names of its contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)rmt.8 8.3 (Berkeley) 6/1/94
|
||||
.\" $FreeBSD: /repoman/r/ncvs/src/usr.sbin/rmt/rmt.8,v 1.13 2003/06/08 14:29:48 charnier Exp $
|
||||
.\"
|
||||
.Dd June 1, 1994
|
||||
.Dt RMT 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm rmt
|
||||
.Nd remote magtape protocol module
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
utility is used by the remote dump and restore programs
|
||||
in manipulating a magnetic tape drive through an interprocess
|
||||
communication connection. It is normally started up with an
|
||||
.Xr rexec 3
|
||||
or
|
||||
.Xr rcmd 3
|
||||
call.
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
utility accepts requests specific to the manipulation of
|
||||
magnetic tapes, performs the commands, then responds with
|
||||
a status indication. All responses are in
|
||||
.Tn ASCII
|
||||
and in
|
||||
one of two forms.
|
||||
Successful commands have responses of:
|
||||
.Bd -ragged -offset indent
|
||||
.Sm off
|
||||
.Sy A Ar number No \en
|
||||
.Sm on
|
||||
.Ed
|
||||
.Pp
|
||||
.Ar Number
|
||||
is an
|
||||
.Tn ASCII
|
||||
representation of a decimal number.
|
||||
Unsuccessful commands are responded to with:
|
||||
.Bd -ragged -offset indent
|
||||
.Sm off
|
||||
.Xo Sy E Ar error-number
|
||||
.No \en Ar error-message
|
||||
.No \en
|
||||
.Xc
|
||||
.Sm on
|
||||
.Ed
|
||||
.Pp
|
||||
.Ar Error-number
|
||||
is one of the possible error
|
||||
numbers described in
|
||||
.Xr intro 2
|
||||
and
|
||||
.Ar error-message
|
||||
is the corresponding error string as printed
|
||||
from a call to
|
||||
.Xr perror 3 .
|
||||
The protocol is comprised of the
|
||||
following commands, which are sent as indicated - no spaces are supplied
|
||||
between the command and its arguments, or between its arguments, and
|
||||
.Ql \en
|
||||
indicates that a newline should be supplied:
|
||||
.Bl -tag -width Ds
|
||||
.Sm off
|
||||
.It Xo Sy \&O Ar device
|
||||
.No \en Ar mode No \en
|
||||
.Xc
|
||||
.Sm on
|
||||
Open the specified
|
||||
.Ar device
|
||||
using the indicated
|
||||
.Ar mode .
|
||||
.Ar Device
|
||||
is a full pathname and
|
||||
.Ar mode
|
||||
is an
|
||||
.Tn ASCII
|
||||
representation of a decimal
|
||||
number suitable for passing to
|
||||
.Xr open 2 .
|
||||
If a device had already been opened, it is
|
||||
closed before a new open is performed.
|
||||
.Sm off
|
||||
.It Xo Sy C Ar device No \en
|
||||
.Xc
|
||||
.Sm on
|
||||
Close the currently open device. The
|
||||
.Ar device
|
||||
specified is ignored.
|
||||
.Sm off
|
||||
.It Xo Sy L
|
||||
.Ar whence No \en
|
||||
.Ar offset No \en
|
||||
.Xc
|
||||
.Sm on
|
||||
Perform an
|
||||
.Xr lseek 2
|
||||
operation using the specified parameters.
|
||||
The response value is that returned from the
|
||||
.Xr lseek 2
|
||||
call.
|
||||
.Sm off
|
||||
.It Sy W Ar count No \en
|
||||
.Sm on
|
||||
Write data onto the open device.
|
||||
The
|
||||
.Nm
|
||||
utility reads
|
||||
.Ar count
|
||||
bytes from the connection, aborting if
|
||||
a premature end-of-file is encountered.
|
||||
The response value is that returned from
|
||||
the
|
||||
.Xr write 2
|
||||
call.
|
||||
.Sm off
|
||||
.It Sy R Ar count No \en
|
||||
.Sm on
|
||||
Read
|
||||
.Ar count
|
||||
bytes of data from the open device.
|
||||
If
|
||||
.Ar count
|
||||
exceeds the size of the data buffer (10 kilobytes), it is
|
||||
truncated to the data buffer size.
|
||||
The
|
||||
.Nm
|
||||
utility then performs the requested
|
||||
.Xr read 2
|
||||
and responds with
|
||||
.Sm off
|
||||
.Sy A Ar count-read No \en
|
||||
.Sm on
|
||||
if the read was
|
||||
successful; otherwise an error in the
|
||||
standard format is returned. If the read
|
||||
was successful, the data read is then sent.
|
||||
.Sm off
|
||||
.It Xo Sy I Ar operation
|
||||
.No \en Ar count No \en
|
||||
.Xc
|
||||
.Sm on
|
||||
Perform a
|
||||
.Dv MTIOCOP
|
||||
.Xr ioctl 2
|
||||
command using the specified parameters.
|
||||
The parameters are interpreted as the
|
||||
.Tn ASCII
|
||||
representations of the decimal values
|
||||
to place in the
|
||||
.Ar mt_op
|
||||
and
|
||||
.Ar mt_count
|
||||
fields of the structure used in the
|
||||
.Xr ioctl 2
|
||||
call. The return value is the
|
||||
.Ar count
|
||||
parameter when the operation is successful.
|
||||
.It Sy S
|
||||
Return the status of the open device, as
|
||||
obtained with a
|
||||
.Dv MTIOCGET
|
||||
.Xr ioctl 2
|
||||
call. If the operation was successful,
|
||||
an ``ack'' is sent with the size of the
|
||||
status buffer, then the status buffer is
|
||||
sent (in binary).
|
||||
.El
|
||||
.Pp
|
||||
Any other command causes
|
||||
.Nm
|
||||
to exit.
|
||||
.Sh DIAGNOSTICS
|
||||
All responses are of the form described above.
|
||||
.Sh SEE ALSO
|
||||
.Xr rcmd 3 ,
|
||||
.Xr rexec 3 ,
|
||||
.Xr mtio 4 ,
|
||||
.Xr rdump 8 ,
|
||||
.Xr rrestore 8
|
||||
.Sh BUGS
|
||||
People should be discouraged from using this for a remote
|
||||
file access protocol.
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
utility appeared in
|
||||
.Bx 4.2 .
|
644
gnutar.1
Normal file
644
gnutar.1
Normal file
@ -0,0 +1,644 @@
|
||||
.TH TAR 1 "Oct 2004" "GNU" "tar"
|
||||
.SH NAME
|
||||
tar \- The GNU version of the tar archiving utility
|
||||
.SH SYNOPSIS
|
||||
.B tar
|
||||
.I <operation> [options]
|
||||
|
||||
.I Operations:
|
||||
.nf
|
||||
.B [-]A --catenate --concatenate
|
||||
.B [-]c --create
|
||||
.B [-]d --diff --compare
|
||||
.B [-]r --append
|
||||
.B [-]t --list
|
||||
.B [-]u --update
|
||||
.B [-]x --extract --get
|
||||
.B --delete
|
||||
.fi
|
||||
|
||||
.I Common Options:
|
||||
.nf
|
||||
.B -C, --directory DIR
|
||||
.B -f, --file F
|
||||
.B -j, --bzip2
|
||||
.B -p, --preserve-permissions
|
||||
.B -v, --verbose
|
||||
.B -z, --gzip
|
||||
.fi
|
||||
|
||||
.I All Options:
|
||||
.br
|
||||
[
|
||||
.B --atime-preserve
|
||||
]
|
||||
[
|
||||
.B -b, --blocking-factor N
|
||||
]
|
||||
[
|
||||
.B -B, --read-full-records
|
||||
]
|
||||
[
|
||||
.B --backup BACKUP-TYPE
|
||||
]
|
||||
[
|
||||
.B --block-compress
|
||||
]
|
||||
[
|
||||
.B -C, --directory DIR
|
||||
]
|
||||
[
|
||||
.B --check-links
|
||||
]
|
||||
[
|
||||
.B --checkpoint
|
||||
]
|
||||
[
|
||||
.B -f, --file [HOSTNAME:]F
|
||||
]
|
||||
[
|
||||
.B -F, --info-script F --new-volume-script F
|
||||
]
|
||||
[
|
||||
.B --force-local
|
||||
]
|
||||
[
|
||||
.B --format FORMAT
|
||||
]
|
||||
[
|
||||
.B -g, --listed-incremental F
|
||||
]
|
||||
[
|
||||
.B -G, --incremental
|
||||
]
|
||||
[
|
||||
.B --group GROUP
|
||||
]
|
||||
[
|
||||
.B -h, --dereference
|
||||
]
|
||||
[
|
||||
.B --help
|
||||
]
|
||||
[
|
||||
.B -i, --ignore-zeros
|
||||
]
|
||||
[
|
||||
.B --ignore-case
|
||||
]
|
||||
[
|
||||
.B --ignore-failed-read
|
||||
]
|
||||
[
|
||||
.B --index-file FILE
|
||||
]
|
||||
[
|
||||
.B -j, --bzip2
|
||||
]
|
||||
[
|
||||
.B -k, --keep-old-files
|
||||
]
|
||||
[
|
||||
.B -K, --starting-file F
|
||||
]
|
||||
[
|
||||
.B --keep-newer-files
|
||||
]
|
||||
[
|
||||
.B -l, --one-file-system
|
||||
]
|
||||
[
|
||||
.B -L, --tape-length N
|
||||
]
|
||||
[
|
||||
.B -m, --touch, --modification-time
|
||||
]
|
||||
[
|
||||
.B -M, --multi-volume
|
||||
]
|
||||
[
|
||||
.B --mode PERMISSIONS
|
||||
]
|
||||
[
|
||||
.B -N, --after-date DATE, --newer DATE
|
||||
]
|
||||
[
|
||||
.B --newer-mtime DATE
|
||||
]
|
||||
[
|
||||
.B --no-anchored
|
||||
]
|
||||
[
|
||||
.B --no-ignore-case
|
||||
]
|
||||
[
|
||||
.B --no-recursion
|
||||
]
|
||||
[
|
||||
.B --no-same-permissions
|
||||
]
|
||||
[
|
||||
.B --no-wildcards
|
||||
]
|
||||
[
|
||||
.B --no-wildcards-match-slash
|
||||
]
|
||||
[
|
||||
.B --null
|
||||
]
|
||||
[
|
||||
.B --numeric-owner
|
||||
]
|
||||
[
|
||||
.B -o, --old-archive, --portability, --no-same-owner
|
||||
]
|
||||
[
|
||||
.B -O, --to-stdout
|
||||
]
|
||||
[
|
||||
.B --occurrence NUM
|
||||
]
|
||||
[
|
||||
.B --overwrite
|
||||
]
|
||||
[
|
||||
.B --overwrite-dir
|
||||
]
|
||||
[
|
||||
.B --owner USER
|
||||
]
|
||||
[
|
||||
.B -p, --same-permissions, --preserve-permissions
|
||||
]
|
||||
[
|
||||
.B -P, --absolute-names
|
||||
]
|
||||
[
|
||||
.B --pax-option KEYWORD-LIST
|
||||
]
|
||||
[
|
||||
.B --posix
|
||||
]
|
||||
[
|
||||
.B --preserve
|
||||
]
|
||||
[
|
||||
.B -R, --block-number
|
||||
]
|
||||
[
|
||||
.B --record-size SIZE
|
||||
]
|
||||
[
|
||||
.B --recursion
|
||||
]
|
||||
[
|
||||
.B --recursive-unlink
|
||||
]
|
||||
[
|
||||
.B --remove-files
|
||||
]
|
||||
[
|
||||
.B --rmt-command CMD
|
||||
]
|
||||
[
|
||||
.B --rsh-command CMD
|
||||
]
|
||||
[
|
||||
.B -s, --same-order, --preserve-order
|
||||
]
|
||||
[
|
||||
.B -S, --sparse
|
||||
]
|
||||
[
|
||||
.B --same-owner
|
||||
]
|
||||
[
|
||||
.B --show-defaults
|
||||
]
|
||||
[
|
||||
.B --show-omitted-dirs
|
||||
]
|
||||
[
|
||||
.B --strip-components NUMBER, --strip-path NUMBER (1)
|
||||
]
|
||||
[
|
||||
.B --suffix SUFFIX
|
||||
]
|
||||
[
|
||||
.B -T, --files-from F
|
||||
]
|
||||
[
|
||||
.B --totals
|
||||
]
|
||||
[
|
||||
.B -U, --unlink-first
|
||||
]
|
||||
[
|
||||
.B --use-compress-program PROG
|
||||
]
|
||||
[
|
||||
.B --utc
|
||||
]
|
||||
[
|
||||
.B -v, --verbose
|
||||
]
|
||||
[
|
||||
.B -V, --label NAME
|
||||
]
|
||||
[
|
||||
.B --version
|
||||
]
|
||||
[
|
||||
.B --volno-file F
|
||||
]
|
||||
[
|
||||
.B -w, --interactive, --confirmation
|
||||
]
|
||||
[
|
||||
.B -W, --verify
|
||||
]
|
||||
[
|
||||
.B --wildcards
|
||||
]
|
||||
[
|
||||
.B --wildcards-match-slash
|
||||
]
|
||||
[
|
||||
.B --exclude PATTERN
|
||||
]
|
||||
[
|
||||
.B -X, --exclude-from FILE
|
||||
]
|
||||
[
|
||||
.B -Z, --compress, --uncompress
|
||||
]
|
||||
[
|
||||
.B -z, --gzip, --gunzip, --ungzip
|
||||
]
|
||||
[
|
||||
.B -[0-7][lmh]
|
||||
]
|
||||
|
||||
(1) tar-1.14 uses --strip-path, tar-1.14.90+ uses --strip-components
|
||||
.SH DESCRIPTION
|
||||
This manual page documents the GNU version of \fBtar\fR, an archiving
|
||||
program designed to store and extract files from an archive file known
|
||||
as a \fItarfile\fR. A \fItarfile\fR may be made on a tape drive,
|
||||
however, it is also common to write a \fItarfile\fR to a normal file.
|
||||
The first argument to \fBtar\fR must be one of the options \fBAcdrtux\fR,
|
||||
followed by any optional functions. The final arguments to \fBtar\fR
|
||||
are the names of the files or directories which should be archived. The
|
||||
use of a directory name always implies that the subdirectories below
|
||||
should be included in the archive.
|
||||
.SH EXAMPLES
|
||||
.TP
|
||||
.B tar -xvf foo.tar
|
||||
verbosely extract foo.tar
|
||||
.TP
|
||||
.B tar -xzf foo.tar.gz
|
||||
extract gzipped foo.tar.gz
|
||||
.TP
|
||||
.B tar -cjf foo.tar.bz2 bar/
|
||||
create bzipped tar archive of the directory bar called foo.tar.bz2
|
||||
.TP
|
||||
.B tar -xjf foo.tar.bz2 -C bar/
|
||||
extract bzipped foo.tar.bz2 after changing directory to bar
|
||||
.TP
|
||||
.B tar -xzf foo.tar.gz blah.txt
|
||||
extract the file blah.txt from foo.tar.bz2
|
||||
.SH "FUNCTION LETTERS"
|
||||
.TP
|
||||
.B One of the following options must be used:
|
||||
.TP
|
||||
.B -A, --catenate, --concatenate
|
||||
append tar files to an archive
|
||||
.TP
|
||||
.B -c, --create
|
||||
create a new archive
|
||||
.TP
|
||||
.B -d, --diff, --compare
|
||||
find differences between archive and file system
|
||||
.TP
|
||||
.B -r, --append
|
||||
append files to the end of an archive
|
||||
.TP
|
||||
.B -t, --list
|
||||
list the contents of an archive
|
||||
.TP
|
||||
.B -u, --update
|
||||
only append files that are newer than the existing in archive
|
||||
.TP
|
||||
.B -x, --extract, --get
|
||||
extract files from an archive
|
||||
.TP
|
||||
.B --delete
|
||||
delete from the archive (not for use on mag tapes!)
|
||||
.SH "COMMON OPTIONS"
|
||||
.TP
|
||||
.B -C, --directory DIR
|
||||
change to directory DIR
|
||||
.TP
|
||||
.B -f, --file [HOSTNAME:]F
|
||||
use archive file or device F (default "-", meaning stdin/stdout)
|
||||
.TP
|
||||
.B -j, --bzip2
|
||||
filter archive through bzip2, use to decompress .bz2 files
|
||||
.TP
|
||||
.B -p, --preserve-permissions
|
||||
extract all protection information
|
||||
.TP
|
||||
.B -v, --verbose
|
||||
verbosely list files processed
|
||||
.TP
|
||||
.B -z, --gzip, --ungzip
|
||||
filter the archive through gzip
|
||||
.SH "ALL OPTIONS"
|
||||
.TP
|
||||
.B --atime-preserve
|
||||
don't change access times on dumped files
|
||||
.TP
|
||||
.B -b, --blocking-factor N
|
||||
block size of Nx512 bytes (default N=20)
|
||||
.TP
|
||||
.B -B, --read-full-blocks
|
||||
reblock as we read (for reading 4.2BSD pipes)
|
||||
.TP
|
||||
.B --backup BACKUP-TYPE
|
||||
backup files instead of deleting them using BACKUP-TYPE simple or
|
||||
numbered
|
||||
.TP
|
||||
.B --block-compress
|
||||
block the output of compression program for tapes
|
||||
.TP
|
||||
.B -C, --directory DIR
|
||||
change to directory DIR
|
||||
.TP
|
||||
.B --check-links
|
||||
warn if number of hard links to the file on the filesystem mismatch the
|
||||
number of links recorded in the archive
|
||||
.TP
|
||||
.B --checkpoint
|
||||
print directory names while reading the archive
|
||||
.TP
|
||||
.B -f, --file [HOSTNAME:]F
|
||||
use archive file or device F (default "-", meaning stdin/stdout)
|
||||
.TP
|
||||
.B -F, --info-script F --new-volume-script F
|
||||
run script at end of each tape (implies \fI--multi-volume\fR)
|
||||
.TP
|
||||
.B --force-local
|
||||
archive file is local even if has a colon
|
||||
.TP
|
||||
.B --format FORMAT
|
||||
selects output archive format
|
||||
.nf
|
||||
\fIv7\fR - Unix V7
|
||||
\fIoldgnu\fR - GNU tar <=1.12
|
||||
\fIgnu\fR - GNU tar 1.13
|
||||
\fIustar\fR - POSIX.1-1988
|
||||
\fIposix\fR - POSIX.1-2001
|
||||
.fi
|
||||
.TP
|
||||
.B -g, --listed-incremental F
|
||||
create/list/extract new GNU-format incremental backup
|
||||
.TP
|
||||
.B -G, --incremental
|
||||
create/list/extract old GNU-format incremental backup
|
||||
.TP
|
||||
.B -h, --dereference
|
||||
don't dump symlinks; dump the files they point to
|
||||
.TP
|
||||
.B --help
|
||||
like this manpage, but not as cool
|
||||
.TP
|
||||
.B -i, --ignore-zeros
|
||||
ignore blocks of zeros in archive (normally mean EOF)
|
||||
.TP
|
||||
.B --ignore-case
|
||||
ignore case when excluding files
|
||||
.TP
|
||||
.B --ignore-failed-read
|
||||
don't exit with non-zero status on unreadable files
|
||||
.TP
|
||||
.B --index-file FILE
|
||||
send verbose output to FILE instead of stdout
|
||||
.TP
|
||||
.B -j, --bzip2
|
||||
filter archive through bzip2, use to decompress .bz2 files
|
||||
.TP
|
||||
.B -k, --keep-old-files
|
||||
keep existing files; don't overwrite them from archive
|
||||
.TP
|
||||
.B -K, --starting-file F
|
||||
begin at file F in the archive
|
||||
.TP
|
||||
.B --keep-newer-files
|
||||
do not overwrite files which are newer than the archive
|
||||
.TP
|
||||
.B -l, --one-file-system
|
||||
stay in local file system when creating an archive
|
||||
.TP
|
||||
.B -L, --tape-length N
|
||||
change tapes after writing N*1024 bytes
|
||||
.TP
|
||||
.B -m, --touch, --modification-time
|
||||
don't extract file modified time
|
||||
.TP
|
||||
.B -M, --multi-volume
|
||||
create/list/extract multi-volume archive
|
||||
.TP
|
||||
.B --mode PERMISSIONS
|
||||
apply PERMISSIONS while adding files (see \fBchmod\fR(1))
|
||||
.TP
|
||||
.B -N, --after-date DATE, --newer DATE
|
||||
only store files newer than DATE
|
||||
.TP
|
||||
.B --newer-mtime DATE
|
||||
like \fI--newer\fR, but with a DATE
|
||||
.TP
|
||||
.B --no-anchored
|
||||
match any subsequenceof the name's components with \fI--exclude\fR
|
||||
.TP
|
||||
.B --no-ignore-case
|
||||
use case-sensitive matching with \fI--exclude\fR
|
||||
.TP
|
||||
.B --no-recursion
|
||||
don't recurse into directories
|
||||
.TP
|
||||
.B --no-same-permissions
|
||||
apply user's umask when extracting files instead of recorded permissions
|
||||
.TP
|
||||
.B --no-wildcards
|
||||
don't use wildcards with \fI--exclude\fR
|
||||
.TP
|
||||
.B --no-wildcards-match-slash
|
||||
wildcards do not match slashes (/) with \fI--exclude\fR
|
||||
.TP
|
||||
.B --null
|
||||
\fI--files-from\fR reads null-terminated names, disable \fI--directory\fR
|
||||
.TP
|
||||
.B --numeric-owner
|
||||
always use numbers for user/group names
|
||||
.TP
|
||||
.B -o, --old-archive, --portability
|
||||
like \fI--format=v7\fR; \fI-o\fR exhibits this behavior when creating an
|
||||
archive (deprecated behavior)
|
||||
.TP
|
||||
.B -o, --no-same-owner
|
||||
do not attempt to restore ownership when extracting; \fI-o\fR exhibits
|
||||
this behavior when extracting an archive
|
||||
.TP
|
||||
.B -O, --to-stdout
|
||||
extract files to standard output
|
||||
.TP
|
||||
.B --occurrence NUM
|
||||
process only NUM occurrences of each named file; used with
|
||||
\fI--delete\fR, \fI--diff\fR, \fI--extract\fR, or \fI--list\fR
|
||||
.TP
|
||||
.B --overwrite
|
||||
overwrite existing files and directory metadata when extracting
|
||||
.TP
|
||||
.B --overwrite-dir
|
||||
overwrite directory metadata when extracting
|
||||
.TP
|
||||
.B --owner USER
|
||||
change owner of extraced files to USER
|
||||
.TP
|
||||
.B -p, --same-permissions, --preserve-permissions
|
||||
extract all protection information
|
||||
.TP
|
||||
.B -P, --absolute-names
|
||||
don't strip leading `/'s from file names
|
||||
.TP
|
||||
.B --pax-option KEYWORD-LIST
|
||||
used only with POSIX.1-2001 archives to modify the way \fBtar\fR handles
|
||||
extended header keywords
|
||||
.TP
|
||||
.B --posix
|
||||
like \fI--format=posix\fR
|
||||
.TP
|
||||
.B --preserve
|
||||
like \fI--preserve-permissions\fR \fI--same-order\fR
|
||||
.TP
|
||||
.B -R, --record-number
|
||||
show record number within archive with each message
|
||||
.TP
|
||||
.B --record-size SIZE
|
||||
use SIZE bytes per record when accessing archives
|
||||
.TP
|
||||
.B --recursion
|
||||
recurse into directories
|
||||
.TP
|
||||
.B --recursive-unlink
|
||||
remove existing directories before extracting directories of the same name
|
||||
.TP
|
||||
.B --remove-files
|
||||
remove files after adding them to the archive
|
||||
.TP
|
||||
.B --rmt-command CMD
|
||||
use CMD instead of the default /usr/sbin/rmt
|
||||
.TP
|
||||
.B --rsh-command CMD
|
||||
use remote CMD instead of \fBrsh\fR(1)
|
||||
.TP
|
||||
.B -s, --same-order, --preserve-order
|
||||
list of names to extract is sorted to match archive
|
||||
.TP
|
||||
.B -S, --sparse
|
||||
handle sparse files efficiently
|
||||
.TP
|
||||
.B --same-owner
|
||||
create extracted files with the same ownership
|
||||
.TP
|
||||
.B --show-defaults
|
||||
display the default options used by \fBtar\fR
|
||||
.TP
|
||||
.B --show-omitted-dirs
|
||||
print directories \fBtar\fR skips while operating on an archive
|
||||
.TP
|
||||
.B --strip-components NUMBER, --strip-path NUMBER
|
||||
strip NUMBER of leading components from file names before extraction
|
||||
|
||||
(1) tar-1.14 uses --strip-path, tar-1.14.90+ uses --strip-components
|
||||
.TP
|
||||
.B --suffix SUFFIX
|
||||
use SUFFIX instead of default '~' when backing up files
|
||||
.TP
|
||||
.B -T, --files-from F
|
||||
get names to extract or create from file F
|
||||
.TP
|
||||
.B --totals
|
||||
print total bytes written with --create
|
||||
.TP
|
||||
.B -U, --unlink-first
|
||||
remove existing files before extracting files of the same name
|
||||
.TP
|
||||
.B --use-compress-program PROG
|
||||
access the archive through PROG which is generally a compression program
|
||||
.TP
|
||||
.B --utc
|
||||
display file modification dates in UTC
|
||||
.TP
|
||||
.B -v, --verbose
|
||||
verbosely list files processed
|
||||
.TP
|
||||
.B -V, --label NAME
|
||||
create archive with volume name NAME
|
||||
.TP
|
||||
.B --version
|
||||
print \fBtar\fR program version number
|
||||
.TP
|
||||
.B --volno-file F
|
||||
keep track of which volume of a multi-volume archive its working in
|
||||
FILE; used with \fI--multi-volume\fR
|
||||
.TP
|
||||
.B -w, --interactive, --confirmation
|
||||
ask for confirmation for every action
|
||||
.TP
|
||||
.B -W, --verify
|
||||
attempt to verify the archive after writing it
|
||||
.TP
|
||||
.B --wildcards
|
||||
use wildcards with \fI--exclude\fR
|
||||
.TP
|
||||
.B --wildcards-match-slash
|
||||
wildcards match slashes (/) with \fI--exclude\fR
|
||||
.TP
|
||||
.B --exclude PATTERN
|
||||
exclude files based upon PATTERN
|
||||
.TP
|
||||
.B -X, --exclude-from FILE
|
||||
exclude files listed in FILE
|
||||
.TP
|
||||
.B -Z, --compress, --uncompress
|
||||
filter the archive through compress
|
||||
.TP
|
||||
.B -z, --gzip, --gunzip, --ungzip
|
||||
filter the archive through gzip
|
||||
.TP
|
||||
.B --use-compress-program PROG
|
||||
filter the archive through PROG (which must accept -d)
|
||||
.TP
|
||||
.B -[0-7][lmh]
|
||||
specify drive and density
|
||||
.SH BUGS
|
||||
The GNU folks, in general, abhor man pages, and create info documents instead.
|
||||
The maintainer of \fBtar\fR falls into this category. Thus this man page may
|
||||
not be complete, nor current.
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for
|
||||
.B tar
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B tar
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info tar
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
.SH "AUTHORS"
|
||||
.nf
|
||||
Debian Linux http://www.debian.org/
|
||||
Mike Frysinger <vapier@gentoo.org>
|
||||
.fi
|
26
gnutar.plist
Normal file
26
gnutar.plist
Normal file
@ -0,0 +1,26 @@
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>OpenSourceProject</key>
|
||||
<string>tar</string>
|
||||
<key>OpenSourceVersion</key>
|
||||
<string>1.17</string>
|
||||
<key>OpenSourceWebsiteURL</key>
|
||||
<string>http://www.gnu.org/software/tar/</string>
|
||||
<key>OpenSourceURL</key>
|
||||
<string>http://ftp.gnu.org/gnu/tar/tar-1.17.tar.bz2</string>
|
||||
<key>OpenSourceSHA1</key>
|
||||
<string>97f4b67bf88dba1d451a1ec375f18cfaa3c9f36f</string>
|
||||
<key>OpenSourceImportDate</key>
|
||||
<string>2008-08-18</string>
|
||||
<key>OpenSourceModifications</key>
|
||||
<array>
|
||||
<string>EA support.</string>
|
||||
</array>
|
||||
<key>OpenSourceLicense</key>
|
||||
<string>GPL</string>
|
||||
<key>OpenSourceLicenseFile</key>
|
||||
<string>gnutar.txt</string>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
1101
gnutar/ABOUT-NLS
Normal file
1101
gnutar/ABOUT-NLS
Normal file
File diff suppressed because it is too large
Load Diff
34
gnutar/AUTHORS
Normal file
34
gnutar/AUTHORS
Normal file
@ -0,0 +1,34 @@
|
||||
Authors of GNU tar.
|
||||
|
||||
The following contributions warranted legal paper exchanges with the
|
||||
Free Software Foundation. Also see files ChangeLog and THANKS.
|
||||
|
||||
TAR Sergey Poznyakoff 2003-10
|
||||
Assigns his past and future changes.
|
||||
|
||||
TAR Paul Eggert 2000-10
|
||||
Assigns his past and future changes.
|
||||
|
||||
TAR Jay Fenlason
|
||||
Assigns his changes.
|
||||
|
||||
TAR Richard E Salz 1993-03-11
|
||||
Disclaims changes to getdate.y.
|
||||
|
||||
TAR MANUAL (?) Amy Gorin (US 1963) 1995-01-10
|
||||
Assigns the Tar Manual.
|
||||
|
||||
TAR Francois Pinard Canada 1949 1996-02-01
|
||||
Assigns past and future changes.
|
||||
|
||||
TAR Melissa Weisshaus US 1966 1997-04-09
|
||||
Assigns changes to the manual and future changes.
|
||||
melissa@gnu.ai.mit.edu
|
||||
|
||||
TAR Thomas Michael Innis Bushnell US 1967 1997-04-09
|
||||
Assigns changes.
|
||||
thomas@gnu.ai.mit.edu
|
||||
|
||||
TAR Thomas Michael Innis Bushnell US 1967 1997-04-09
|
||||
Assigns changes to manual.
|
||||
thomas@gnu.ai.mit.edu
|
340
gnutar/COPYING
Normal file
340
gnutar/COPYING
Normal file
@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
8271
gnutar/ChangeLog
Normal file
8271
gnutar/ChangeLog
Normal file
File diff suppressed because it is too large
Load Diff
5887
gnutar/ChangeLog.1
Normal file
5887
gnutar/ChangeLog.1
Normal file
File diff suppressed because it is too large
Load Diff
234
gnutar/INSTALL
Normal file
234
gnutar/INSTALL
Normal file
@ -0,0 +1,234 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
31
gnutar/Makefile.am
Normal file
31
gnutar/Makefile.am
Normal file
@ -0,0 +1,31 @@
|
||||
# Main Makefile for GNU tar.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003 Free
|
||||
# Software Foundation, Inc.
|
||||
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2, or (at your option)
|
||||
## any later version.
|
||||
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
|
||||
## 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.
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
EXTRA_DIST = ChangeLog.1 PORTS
|
||||
SUBDIRS = doc lib rmt src scripts po tests
|
||||
|
||||
dist-hook:
|
||||
-rm -f $(distdir).cpio
|
||||
find $(distdir) | cpio -Hcrc -o | \
|
||||
GZIP=$(GZIP_ENV) gzip -c > $(distdir).cpio.gz
|
||||
|
||||
distclean-local:
|
||||
-rm -f $(distdir).cpio.gz
|
918
gnutar/Makefile.in
Normal file
918
gnutar/Makefile.in
Normal file
@ -0,0 +1,918 @@
|
||||
# Makefile.in generated by automake 1.10a from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Main Makefile for GNU tar.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003 Free
|
||||
# Software Foundation, Inc.
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.hin \
|
||||
$(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
|
||||
INSTALL NEWS THANKS TODO build-aux/config.guess \
|
||||
build-aux/config.rpath build-aux/config.sub build-aux/depcomp \
|
||||
build-aux/install-sh build-aux/mdate-sh build-aux/missing \
|
||||
build-aux/mkinstalldirs build-aux/texinfo.tex build-aux/ylwrap
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
|
||||
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
|
||||
$(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/argp.m4 \
|
||||
$(top_srcdir)/m4/backupfile.m4 $(top_srcdir)/m4/bison.m4 \
|
||||
$(top_srcdir)/m4/canonicalize-lgpl.m4 \
|
||||
$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/chown.m4 \
|
||||
$(top_srcdir)/m4/clock_time.m4 \
|
||||
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/closeout.m4 \
|
||||
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/d-ino.m4 \
|
||||
$(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \
|
||||
$(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/double-slash-root.m4 \
|
||||
$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
|
||||
$(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
|
||||
$(top_srcdir)/m4/exclude.m4 $(top_srcdir)/m4/exitfail.m4 \
|
||||
$(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \
|
||||
$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl_h.m4 \
|
||||
$(top_srcdir)/m4/fileblocks.m4 $(top_srcdir)/m4/float_h.m4 \
|
||||
$(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
|
||||
$(top_srcdir)/m4/ftruncate.m4 \
|
||||
$(top_srcdir)/m4/getcwd-abort-bug.m4 \
|
||||
$(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
|
||||
$(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
|
||||
$(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getopt.m4 \
|
||||
$(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
|
||||
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
|
||||
$(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \
|
||||
$(top_srcdir)/m4/human.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||
$(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intmax_t.m4 \
|
||||
$(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/lchown.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
|
||||
$(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
|
||||
$(top_srcdir)/m4/mbscasecmp.m4 $(top_srcdir)/m4/mbstate_t.m4 \
|
||||
$(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \
|
||||
$(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/memset.m4 \
|
||||
$(top_srcdir)/m4/mkdtemp.m4 $(top_srcdir)/m4/mktime.m4 \
|
||||
$(top_srcdir)/m4/modechange.m4 $(top_srcdir)/m4/nls.m4 \
|
||||
$(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pathmax.m4 \
|
||||
$(top_srcdir)/m4/paxutils.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
|
||||
$(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \
|
||||
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rmdir.m4 \
|
||||
$(top_srcdir)/m4/rmt.m4 $(top_srcdir)/m4/rpmatch.m4 \
|
||||
$(top_srcdir)/m4/rtapelib.m4 $(top_srcdir)/m4/safe-read.m4 \
|
||||
$(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/save-cwd.m4 \
|
||||
$(top_srcdir)/m4/savedir.m4 $(top_srcdir)/m4/setenv.m4 \
|
||||
$(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/ssize_t.m4 \
|
||||
$(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stdarg.m4 \
|
||||
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
|
||||
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
|
||||
$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \
|
||||
$(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strchrnul.m4 \
|
||||
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
|
||||
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
|
||||
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strtoimax.m4 \
|
||||
$(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoll.m4 \
|
||||
$(top_srcdir)/m4/strtoul.m4 $(top_srcdir)/m4/strtoull.m4 \
|
||||
$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
|
||||
$(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \
|
||||
$(top_srcdir)/m4/system.m4 $(top_srcdir)/m4/tempname.m4 \
|
||||
$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
|
||||
$(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
|
||||
$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
|
||||
$(top_srcdir)/m4/unlinkdir.m4 $(top_srcdir)/m4/unlocked-io.m4 \
|
||||
$(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utime.m4 \
|
||||
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
|
||||
$(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \
|
||||
$(top_srcdir)/m4/vsnprintf.m4 $(top_srcdir)/m4/wchar.m4 \
|
||||
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \
|
||||
$(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \
|
||||
$(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \
|
||||
$(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 \
|
||||
$(distdir).shar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@
|
||||
ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@
|
||||
ABSOLUTE_FLOAT_H = @ABSOLUTE_FLOAT_H@
|
||||
ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@
|
||||
ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@
|
||||
ABSOLUTE_STDIO_H = @ABSOLUTE_STDIO_H@
|
||||
ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@
|
||||
ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
|
||||
ABSOLUTE_SYSEXITS_H = @ABSOLUTE_SYSEXITS_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@
|
||||
ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@
|
||||
ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BACKUP_LIBEXEC_SCRIPTS = @BACKUP_LIBEXEC_SCRIPTS@
|
||||
BACKUP_SBIN_SCRIPTS = @BACKUP_SBIN_SCRIPTS@
|
||||
BACKUP_SED_COND = @BACKUP_SED_COND@
|
||||
BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
|
||||
BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
|
||||
BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
|
||||
BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
|
||||
BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFAULT_ARCHIVE = @DEFAULT_ARCHIVE@
|
||||
DEFAULT_ARCHIVE_FORMAT = @DEFAULT_ARCHIVE_FORMAT@
|
||||
DEFAULT_BLOCKING = @DEFAULT_BLOCKING@
|
||||
DEFAULT_QUOTING_STYLE = @DEFAULT_QUOTING_STYLE@
|
||||
DEFAULT_RMT_COMMAND = @DEFAULT_RMT_COMMAND@
|
||||
DEFAULT_RMT_DIR = @DEFAULT_RMT_DIR@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DIRENT_H = @DIRENT_H@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EOVERFLOW = @EOVERFLOW@
|
||||
EXEEXT = @EXEEXT@
|
||||
FCNTL_H = @FCNTL_H@
|
||||
FLOAT_H = @FLOAT_H@
|
||||
FNMATCH_H = @FNMATCH_H@
|
||||
GETOPT_H = @GETOPT_H@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GNULIB_CHOWN = @GNULIB_CHOWN@
|
||||
GNULIB_DUP2 = @GNULIB_DUP2@
|
||||
GNULIB_FCHDIR = @GNULIB_FCHDIR@
|
||||
GNULIB_FFLUSH = @GNULIB_FFLUSH@
|
||||
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
|
||||
GNULIB_FSEEK = @GNULIB_FSEEK@
|
||||
GNULIB_FSEEKO = @GNULIB_FSEEKO@
|
||||
GNULIB_FTELL = @GNULIB_FTELL@
|
||||
GNULIB_FTELLO = @GNULIB_FTELLO@
|
||||
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
|
||||
GNULIB_GETCWD = @GNULIB_GETCWD@
|
||||
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
|
||||
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
|
||||
GNULIB_IMAXABS = @GNULIB_IMAXABS@
|
||||
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
|
||||
GNULIB_LSEEK = @GNULIB_LSEEK@
|
||||
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
|
||||
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
|
||||
GNULIB_MBSCHR = @GNULIB_MBSCHR@
|
||||
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
|
||||
GNULIB_MBSLEN = @GNULIB_MBSLEN@
|
||||
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
|
||||
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
|
||||
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
|
||||
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
|
||||
GNULIB_MBSSEP = @GNULIB_MBSSEP@
|
||||
GNULIB_MBSSPN = @GNULIB_MBSSPN@
|
||||
GNULIB_MBSSTR = @GNULIB_MBSSTR@
|
||||
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
|
||||
GNULIB_MEMMEM = @GNULIB_MEMMEM@
|
||||
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
|
||||
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
|
||||
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
|
||||
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
|
||||
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
|
||||
GNULIB_READLINK = @GNULIB_READLINK@
|
||||
GNULIB_SLEEP = @GNULIB_SLEEP@
|
||||
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
|
||||
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
|
||||
GNULIB_STPCPY = @GNULIB_STPCPY@
|
||||
GNULIB_STPNCPY = @GNULIB_STPNCPY@
|
||||
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
|
||||
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
|
||||
GNULIB_STRDUP = @GNULIB_STRDUP@
|
||||
GNULIB_STRNDUP = @GNULIB_STRNDUP@
|
||||
GNULIB_STRNLEN = @GNULIB_STRNLEN@
|
||||
GNULIB_STRPBRK = @GNULIB_STRPBRK@
|
||||
GNULIB_STRSEP = @GNULIB_STRSEP@
|
||||
GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
|
||||
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
|
||||
GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
|
||||
GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
|
||||
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
|
||||
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
|
||||
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
|
||||
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
|
||||
GREP = @GREP@
|
||||
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
|
||||
HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
|
||||
HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
|
||||
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
|
||||
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
|
||||
HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
|
||||
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
|
||||
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
|
||||
HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
|
||||
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
|
||||
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
|
||||
HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
|
||||
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
|
||||
HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
|
||||
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
|
||||
HAVE_DUP2 = @HAVE_DUP2@
|
||||
HAVE_FSEEKO = @HAVE_FSEEKO@
|
||||
HAVE_FTELLO = @HAVE_FTELLO@
|
||||
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
|
||||
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
|
||||
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
|
||||
HAVE_IO_H = @HAVE_IO_H@
|
||||
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
|
||||
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
|
||||
HAVE_LSTAT = @HAVE_LSTAT@
|
||||
HAVE_MEMPCPY = @HAVE_MEMPCPY@
|
||||
HAVE_MKDTEMP = @HAVE_MKDTEMP@
|
||||
HAVE_READLINK = @HAVE_READLINK@
|
||||
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
|
||||
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
|
||||
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
|
||||
HAVE_SLEEP = @HAVE_SLEEP@
|
||||
HAVE_STDINT_H = @HAVE_STDINT_H@
|
||||
HAVE_STPCPY = @HAVE_STPCPY@
|
||||
HAVE_STPNCPY = @HAVE_STPNCPY@
|
||||
HAVE_STRCASECMP = @HAVE_STRCASECMP@
|
||||
HAVE_STRCASESTR = @HAVE_STRCASESTR@
|
||||
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
|
||||
HAVE_STRNDUP = @HAVE_STRNDUP@
|
||||
HAVE_STRPBRK = @HAVE_STRPBRK@
|
||||
HAVE_STRSEP = @HAVE_STRSEP@
|
||||
HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
|
||||
HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@
|
||||
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
|
||||
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
|
||||
HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
|
||||
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
|
||||
HAVE_UNISTD_H = @HAVE_UNISTD_H@
|
||||
HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
|
||||
HAVE_VASPRINTF = @HAVE_VASPRINTF@
|
||||
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
|
||||
HAVE_WINT_T = @HAVE_WINT_T@
|
||||
HAVE__BOOL = @HAVE__BOOL@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
INTTYPES_H = @INTTYPES_H@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTAR_LIBDEPS = @LIBTAR_LIBDEPS@
|
||||
LIBTAR_LTLIBDEPS = @LIBTAR_LTLIBDEPS@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_SETSOCKOPT = @LIB_SETSOCKOPT@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
PRIPTR_PREFIX = @PRIPTR_PREFIX@
|
||||
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
|
||||
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
|
||||
PU_RMT_PROG = @PU_RMT_PROG@
|
||||
RANLIB = @RANLIB@
|
||||
REPLACE_CHOWN = @REPLACE_CHOWN@
|
||||
REPLACE_FCHDIR = @REPLACE_FCHDIR@
|
||||
REPLACE_FFLUSH = @REPLACE_FFLUSH@
|
||||
REPLACE_FPRINTF = @REPLACE_FPRINTF@
|
||||
REPLACE_FSEEK = @REPLACE_FSEEK@
|
||||
REPLACE_FSEEKO = @REPLACE_FSEEKO@
|
||||
REPLACE_FTELL = @REPLACE_FTELL@
|
||||
REPLACE_FTELLO = @REPLACE_FTELLO@
|
||||
REPLACE_GETCWD = @REPLACE_GETCWD@
|
||||
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
|
||||
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
|
||||
REPLACE_LSEEK = @REPLACE_LSEEK@
|
||||
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
|
||||
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
|
||||
REPLACE_PRINTF = @REPLACE_PRINTF@
|
||||
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
|
||||
REPLACE_SPRINTF = @REPLACE_SPRINTF@
|
||||
REPLACE_STRPTIME = @REPLACE_STRPTIME@
|
||||
REPLACE_TIMEGM = @REPLACE_TIMEGM@
|
||||
REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
|
||||
REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
|
||||
REPLACE_VPRINTF = @REPLACE_VPRINTF@
|
||||
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
|
||||
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
|
||||
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
|
||||
STDBOOL_H = @STDBOOL_H@
|
||||
STDINT_H = @STDINT_H@
|
||||
STRIP = @STRIP@
|
||||
SYSEXITS_H = @SYSEXITS_H@
|
||||
SYS_STAT_H = @SYS_STAT_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@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WCHAR_H = @WCHAR_H@
|
||||
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
|
||||
WCTYPE_H = @WCTYPE_H@
|
||||
WINT_T_SUFFIX = @WINT_T_SUFFIX@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
gl_LIBOBJS = @gl_LIBOBJS@
|
||||
gl_LTLIBOBJS = @gl_LTLIBOBJS@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
EXTRA_DIST = ChangeLog.1 PORTS
|
||||
SUBDIRS = doc lib rmt src scripts po tests
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnits '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnits \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnits Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.hin: $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@case `sed 15q $(srcdir)/NEWS` in \
|
||||
*"$(VERSION)"*) : ;; \
|
||||
*) \
|
||||
echo "NEWS not updated; not releasing" 1>&2; \
|
||||
exit 1;; \
|
||||
esac
|
||||
$(am__remove_distdir)
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-local \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-local distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
|
||||
|
||||
|
||||
dist-hook:
|
||||
-rm -f $(distdir).cpio
|
||||
find $(distdir) | cpio -Hcrc -o | \
|
||||
GZIP=$(GZIP_ENV) gzip -c > $(distdir).cpio.gz
|
||||
|
||||
distclean-local:
|
||||
-rm -f $(distdir).cpio.gz
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
915
gnutar/NEWS
Normal file
915
gnutar/NEWS
Normal file
@ -0,0 +1,915 @@
|
||||
GNU tar NEWS - User visible changes. 2007-06-08
|
||||
Please send GNU tar bug reports to <bug-tar@gnu.org>
|
||||
|
||||
version 1.17 - Sergey Poznyakoff, 2007-06-08
|
||||
|
||||
* Fix archivation of sparse files in posix mode. Previous versions padded
|
||||
sparse members with spurious zero blocks.
|
||||
|
||||
* Fix operation of --verify --listed-incremental. Version 1.16.1 produced
|
||||
a full dump when both options were given.
|
||||
|
||||
* Fix --occurence. In previous versions it continued scanning the archive
|
||||
even though all requested members has already been extracted.
|
||||
|
||||
* Scope of --transform and --strip-components options.
|
||||
|
||||
In addition to affecting regular archive members, the --transform
|
||||
option affects hard and soft link targets and the --strip-components
|
||||
option affects hard link targets as well.
|
||||
|
||||
* End-of-volume script can send the new volume name to tar by writing
|
||||
it to the file descriptor stored in the environment variable `TAR_FD'.
|
||||
|
||||
|
||||
version 1.16.1 - Sergey Poznyakoff, 2006-12-09
|
||||
|
||||
* New option --exclude-tag allows to specify "exclusion tag files", i.e.
|
||||
files whose presence in a directory means that the directory should not
|
||||
be archived.
|
||||
|
||||
* The --exclude-cache option excludes directories that contain the
|
||||
CACHEDIR.TAG file from being archived. Previous versions excluded
|
||||
directory contents only, while the directories themselves were
|
||||
still added to the archive.
|
||||
|
||||
* Support for reading ustar type 'N' header logical records has been removed.
|
||||
This GNU extension was generated only by very old versions of GNU 'tar'.
|
||||
Unfortunately its implementation had security holes; see
|
||||
<http://archives.neohapsis.com/archives/fulldisclosure/2006-11/0344.html>.
|
||||
We don't expect that any tar archives in practical use have type 'N'
|
||||
records, but if you have one and you trust its contents, you can
|
||||
decode it with GNU tar 1.16 or earlier.
|
||||
|
||||
* Race conditions have been fixed that in some cases briefly allowed
|
||||
files extracted by 'tar -x --same-owner' (or plain 'tar -x', when
|
||||
running as root) to be accessed by users that they shouldn't have been.
|
||||
|
||||
|
||||
version 1.16 - Sergey Poznyakoff, 2006-10-21
|
||||
|
||||
* After creating an archive, tar exits with code 1 if some files were
|
||||
changed while being read. Previous versions exited with code 2 (fatal
|
||||
error), and only if some files were truncated while being archived.
|
||||
|
||||
* New option --mtime allows to set modification times for all archive
|
||||
members during creation.
|
||||
|
||||
* Bug fixes
|
||||
** Avoid running off file descriptors when using multiple -C options.
|
||||
** tar --index-file=FILE --file=- sent the archive to FILE, and
|
||||
the listing to stderr.
|
||||
|
||||
|
||||
version 1.15.91 - Sergey Poznyakoff, 2006-06-16
|
||||
|
||||
* Incompatible changes
|
||||
|
||||
** Globbing
|
||||
|
||||
Previous versions of GNU tar assumed shell-style globbing when
|
||||
extracting from or listing an archive. For example:
|
||||
|
||||
tar xf foo.tar '*.c'
|
||||
|
||||
would extract all files whose names end in '.c'. This behavior
|
||||
was not documented and was incompatible with traditional tar
|
||||
implementations. Therefore, starting from this version, GNU tar
|
||||
no longer uses globbing by default. For example, the above invocation
|
||||
is now interpreted as a request to extract from the archive the file
|
||||
named '*.c'.
|
||||
|
||||
To treat member names as globbing patterns, use --wildcards option.
|
||||
If you wish tar to mimic the behavior of versions up to 1.15.90,
|
||||
add --wildcards to the value of the environment variable TAR_OPTIONS.
|
||||
|
||||
The exact way in which tar interprets member names is controlled by the
|
||||
following command line options:
|
||||
|
||||
--wildcards use wildcards
|
||||
--anchored patterns match file name start
|
||||
--ignore-case ignore case
|
||||
--wildcards-match-slash wildcards match `/'
|
||||
|
||||
Each of these options has a '--no-' counterpart that disables its
|
||||
effect (e.g. --no-wildcards).
|
||||
|
||||
These options affect both the interpretation of member names from
|
||||
command line and that of the exclusion patterns (given with --exclude
|
||||
and --exclude-from options). The defaults are:
|
||||
|
||||
1. For member names: --no-wildcards --anchored
|
||||
2. For exclusion patterns: --wildcards --no-anchored --wildcards-match-slash
|
||||
|
||||
The options can appear multiple times in the command line, thereby
|
||||
changing the way command line arguments are interpreted. For example,
|
||||
to use case-insensitive matching in exclude patterns and to revert to
|
||||
case-sensitive matching for the rest of command line, one could write:
|
||||
|
||||
tar xf foo.tar --ignore-case --exclude-from=FILE --no-ignore-case file.name
|
||||
|
||||
** Short option -l is now an alias of --check-links option, which complies
|
||||
with UNIX98. This ends the transition period started with version 1.14.
|
||||
|
||||
* New features
|
||||
|
||||
** New option --transform allows to transform file names before storing them
|
||||
in the archive or member names before extracting. The option takes a
|
||||
sed replace expression as its argument. For example,
|
||||
|
||||
tar cf foo.tar --transform 's,^,prefix/,'
|
||||
|
||||
will add 'prefix/' to all file names stored in foo.tar.
|
||||
|
||||
** --strip-components option works when deleting and comparing. In previous
|
||||
versions it worked only with --extract.
|
||||
|
||||
** New option --show-transformed-names enables display of transformed file
|
||||
or archive. It generalizes --show-stored-names option, introduced in
|
||||
1.15.90. In particular, when creating an archive in verbose mode, it lists
|
||||
member names as stored in the archive, i.e., with any eventual prefixes
|
||||
removed and file name transformations applied. The option is useful,
|
||||
for example, while comparing `tar cv' and `tar tv' outputs.
|
||||
|
||||
** New incremental snapshot file format keeps information about file names
|
||||
as well as that about directories.
|
||||
|
||||
** The --checkpoint option takes an optional argument specifying the number
|
||||
of records between the two successive checkpoints. Optional dot
|
||||
starting the argument intructs tar to print dots instead of textual
|
||||
checkpoints.
|
||||
|
||||
** The --totals option can be used with any tar operation (previous versions
|
||||
understood it only with --create). If an argument to this option is
|
||||
given, it specifies the signal upon delivery of which the statistics
|
||||
is to be printed. Both forms of this option (with and without
|
||||
argument) can be given to in a single invocation of tar.
|
||||
|
||||
* Bug fixes
|
||||
** Detect attempts to update compressed archives.
|
||||
|
||||
|
||||
version 1.15.90 - Sergey Poznyakoff, 2006-02-19
|
||||
|
||||
* New features
|
||||
|
||||
** Any number of -T (--files-from) options may be used in the command line.
|
||||
The file specified with -T may include any valid `tar' options,
|
||||
including another -T option.
|
||||
Compatibility note: older versions of tar would only recognize -C
|
||||
as an option name within the file list file. Now any file whose name
|
||||
starts with - is handled as an option. To insert file names starting with
|
||||
dash, use the --add-file option.
|
||||
|
||||
** List files containing null-separated file names are detected and processed
|
||||
automatically. It is no longer necessary to give the --null option.
|
||||
|
||||
** New option --no-unquote disables the unquoting of input file names.
|
||||
This is useful for processing output from `find dir -print0'.
|
||||
An orthogonal option --unquote is provided as well.
|
||||
|
||||
** New option --test-label tests the archive volume label.
|
||||
If an argument is specified, the label is compared against its value.
|
||||
Tar exits with code 0 if the two strings match, and with code 2 if
|
||||
they do not.
|
||||
|
||||
If no argument is given, the --verbose option is implied. In this case,
|
||||
tar prints the label name if present and exits with code 0.
|
||||
|
||||
** New option --show-stored-names. When creating an archive in verbose mode,
|
||||
it lists member names as stored in the archive, i.e., with any eventual
|
||||
prefixes removed. The option is useful, for example, while comparing
|
||||
`tar cv' and `tar tv' outputs.
|
||||
|
||||
** New option --to-command pipes the contents of archive members to the
|
||||
specified command.
|
||||
|
||||
** New option --atime-preserve=system, which uses the O_NOATIME feature
|
||||
of recent Linux kernels to avoid some problems when preserving file
|
||||
access times.
|
||||
|
||||
** New option --delay-directory-restore delays restoring modification times
|
||||
and permissions of extracted directories until the end of extraction.
|
||||
This is necessary for restoring from archives with unusual member
|
||||
ordering (in particular, those created with --no-recursion option).
|
||||
This option is implied when restoring from incremental archives.
|
||||
|
||||
** New option --restrict prohibits use of some potentially harmful tar
|
||||
options. Currently it disables '!' escape in multi-volume name menu.
|
||||
|
||||
** New options --quoting-style and --quote-chars control the way tar
|
||||
quotes member names on output. The --quoting-style takes an argument
|
||||
specifying the quoting style to use (literal, shell, shell-always,
|
||||
c, escape, locale, clocale). The argument to --quote-chars is a string
|
||||
specifying characters to quote, even if the selected quoting style
|
||||
would not quote them otherwise. The option --no-quote-chars is
|
||||
provided to disable quoting certain characters.
|
||||
|
||||
** The end-of-volume script (introduced with --info-script option) can
|
||||
get current archive name from the environment variable TAR_ARCHIVE and
|
||||
the volume number from the variable TAR_VOLUME. It can alter the
|
||||
archive name by writing new name to the file descriptor 3.
|
||||
|
||||
** Better support for full-resolution time stamps. Tar cannot restore
|
||||
time stamps to full nanosecond resolution, though, until the kernel
|
||||
guys get their act together and give us a system call to set file time
|
||||
stamps to nanosecond resolution.
|
||||
|
||||
** The -v option now prints time stamps only to 1-minute resolution,
|
||||
not full resolution, to avoid using up too many output columns.
|
||||
Nanosecond resolution is now supported, but that would be too much.
|
||||
|
||||
* Bug fixes
|
||||
|
||||
** Allow non-option arguments to be interspersed with options.
|
||||
** When extracting or listing archives in old GNU format, tar
|
||||
used to read an extra block of data after a long name header
|
||||
if length of the member name was divisible by block size (512).
|
||||
Consequently, the file pointer was set off and the next member
|
||||
was not processed correctly.
|
||||
** Previous version created invalid archives when files shrink
|
||||
during reading.
|
||||
** Compare mode (tar d) hung when trying to compare file contents.
|
||||
** Previous versions in certain cases failed to restore directory
|
||||
modification times.
|
||||
** When creating an archive, do not attempt to store files whose
|
||||
meta-data cannot be stored in the header due to format limitations
|
||||
(for ustar and v7 formats).
|
||||
** The --version option now also outputs information about copyright,
|
||||
license, and credits. This reverts to the behavior of tar 1.14 and
|
||||
earlier, and conforms to the GNU coding standards. The --license (-L)
|
||||
option introduced in tar 1.15 has been removed, since it's no longer
|
||||
needed.
|
||||
|
||||
|
||||
version 1.15.1 - Sergey Poznyakoff, 2004-12-21
|
||||
|
||||
This version fixes a bug introduced in 1.15 which caused
|
||||
tar to refuse to extract files from standard input.
|
||||
|
||||
|
||||
version 1.15 - Sergey Poznyakoff, 2004-12-20
|
||||
|
||||
* Compressed archives are recognised automatically, it is no longer
|
||||
necessary to specify -Z, -z, or -j options to read them. Thus, you can
|
||||
now run `tar tf archive.tar.gz'.
|
||||
|
||||
* When restoring incremental dumps, --one-file-system option
|
||||
prevents directory hierarchies residing on different devices
|
||||
from being purged.
|
||||
|
||||
With the previous versions of tar it was dangerous to create
|
||||
incremental dumps with --one-file-system option, since they
|
||||
would recursively remove mount points when restoring from the
|
||||
back up. This change fixes the bug.
|
||||
|
||||
* Renamed --strip-path to --strip-components for consistency with
|
||||
the GNU convention.
|
||||
|
||||
* Skipping archive members is sped up if the archive media supports
|
||||
seeks.
|
||||
|
||||
* Restore script starts restoring only if it is given --all (-a) option,
|
||||
or some patterns. This is to prevent accidental restores.
|
||||
|
||||
* `tar --verify' prints a warning if during archive creation some of
|
||||
the file names had their prefixes stripped off.
|
||||
|
||||
* New option --exclude-caches instructs tar to exclude cache directories
|
||||
automatically on archive creation. Cache directories are those
|
||||
containing a standardized tag file, as specified at:
|
||||
|
||||
http://www.brynosaurus.com/cachedir/spec.html
|
||||
|
||||
* New configure option --with-rmt allows to specify full path name to
|
||||
the `rmt' utility. This supersedes DEFAULT_RMT_COMMAND variable
|
||||
introduced in version 1.14
|
||||
|
||||
* New configure variable DEFAULT_RMT_DIR allows to specify the directory
|
||||
where to install `rmt' utility. This is necessary since modifying
|
||||
--libexecdir as was suggested for version 1.14 produced a side effect: it
|
||||
also modified installation prefix for backup scripts (if
|
||||
--enable-backup-scripts was given).
|
||||
|
||||
* Bug fixes:
|
||||
** Fixed flow in recognizing files to be included in incremental dumps.
|
||||
** Correctly recognize sparse archive members when used with -T option.
|
||||
** GNU multivolume headers cannot store filenames longer than 100 characters.
|
||||
Do not allow multivolume archives to begin with such filenames.
|
||||
** If a member with link count > 2 was stored in the archive twice,
|
||||
previous versions of tar were not able to extract it, since they
|
||||
were trying to link the file to itself, which always failed and
|
||||
lead to removing the already extracted copy. Preserve the first
|
||||
extracted copy in such cases.
|
||||
** Restore script was passing improper argument to tar --listed option (which
|
||||
didn't affect the functionality, but was logically incorrect).
|
||||
** Fixed verification of created archives.
|
||||
** Fixed unquoting of file names containing backslash escapes (previous
|
||||
versions failed to recognize \a and \v).
|
||||
** When attempting to delete a non-existing member from the archive, previous
|
||||
versions of tar used to overwrite last archive block with zeroes.
|
||||
|
||||
|
||||
version 1.14 - Sergey Poznyakoff, 2004-05-11
|
||||
|
||||
* Added support for POSIX.1-2001 and ustar archive formats.
|
||||
* New option --format allows to select the output archive format
|
||||
* The default output format can be selected at configuration time
|
||||
by presetting the environment variable DEFAULT_ARCHIVE_FORMAT.
|
||||
Allowed values are GNU, V7, OLDGNU and POSIX.
|
||||
* New option --strip-path allows to cut off a given number of
|
||||
path elements from the name of the file being extracted.
|
||||
|
||||
* New options --index-file, --no-overwrite-dir. The --overwrite-dir
|
||||
option is now the default; use --no-overwrite-dir if you prefer
|
||||
the previous default behavior.
|
||||
|
||||
* The semantics of -o option is changed. When extracting, it
|
||||
does the same as --no-same-owner GNU tar option. This is compatible
|
||||
with UNIX98 tar. Otherwise, its effect is the same as that of
|
||||
--old-archive option. This latter is deprecated and will be removed
|
||||
in future.
|
||||
|
||||
* New option --check-links prints a message if not all links are dumped
|
||||
for a file being archived. This corresponds to the UNIX98 -l option.
|
||||
The current semantics of the -l option is retained for compatibility
|
||||
with previous releases, however such usage is strongly deprecated as
|
||||
the option will change to its UNIX98 semantics in the future releases.
|
||||
|
||||
* New option --occurrence[=N] can be used in conjunction with one of
|
||||
the subcommands --delete, --diff, --extract or --list when a list of
|
||||
files is given either on the command line or via -T option. This
|
||||
option instructs tar to process only the Nth occurrence of each named
|
||||
file. N defaults to 1, so `tar -x -f archive --occurrence filename'
|
||||
extracts the first occurrence of `filename' from `archive'
|
||||
and terminates without scanning to the end of the archive.
|
||||
|
||||
* New option --pax-option allows to control the handling of POSIX
|
||||
keywords in `pax' extended headers. It is equivalent to `pax'
|
||||
-o option.
|
||||
|
||||
* --incremental and --listed-incremental options work correctly on
|
||||
individual files, as well as on directories.
|
||||
|
||||
* New scripts: backup (replaces old level-0 and level-1) and restore.
|
||||
The scripts are compiled and installed if --enable-backup-scripts
|
||||
option is given to configure.
|
||||
|
||||
* By default tar searches "rmt" utility in "$prefix/libexec/rmt",
|
||||
which is consistent with the location where the version of "rmt"
|
||||
included in the package is installed. Previous versions of tar
|
||||
used "/etc/rmt". To install "rmt" to its traditional location,
|
||||
run configure with option --libexecdir=/etc. Otherwise, if you
|
||||
already have rmt installed and wish to use it, instead of the
|
||||
shipped in version, set the variable DEFAULT_RMT_COMMAND to
|
||||
the full path name of the utility, e.g., ./configure
|
||||
DEFAULT_RMT_COMMAND=/etc/rmt.
|
||||
|
||||
Notice also that the full path name of the "rmt" utility to
|
||||
use can be set at runtime, by giving option --rmt-command to
|
||||
tar.
|
||||
|
||||
* Removed obsolete command line options:
|
||||
** --absolute-paths superseded by --absolute-names
|
||||
** --block-compress is not needed any longer
|
||||
** --block-size superseded by --blocking-factor
|
||||
** --modification-time superseded by --touch
|
||||
** --read-full-blocks superseded by --read-full-records
|
||||
** --record-number superseded by --block-number
|
||||
** --version-control superseded by --backup
|
||||
|
||||
* New message translations fi (Finnish), gl (Galician), hr (Croatian),
|
||||
hu (Hungarian), ms (Malaysian), nb (Norwegian), ro (Romanian), sk
|
||||
(Slovak), zh_CN (Chinese simplified), zh_TW (Chinese traditional).
|
||||
The code 'no' for Norwegian (Bokmål) has been withdrawn; use 'nb' instead.
|
||||
|
||||
* Bug fixes.
|
||||
|
||||
|
||||
version 1.13.25 - Paul Eggert, 2001-09-26
|
||||
|
||||
* Bug fixes.
|
||||
|
||||
|
||||
version 1.13.24 - Paul Eggert, 2001-09-22
|
||||
|
||||
* New option --overwrite-dir.
|
||||
* Fixes for buffer overrun, porting, and copyright notice problems.
|
||||
* The message translations for Korean are available again.
|
||||
|
||||
|
||||
version 1.13.23 - Paul Eggert, 2001-09-13
|
||||
|
||||
* Bug, porting, and copyright notice fixes.
|
||||
|
||||
|
||||
version 1.13.22 - Paul Eggert, 2001-08-29
|
||||
|
||||
* Bug fixes.
|
||||
|
||||
|
||||
version 1.13.21 - Paul Eggert, 2001-08-28
|
||||
|
||||
* Porting and copyright notice fixes.
|
||||
|
||||
|
||||
version 1.13.20 - Paul Eggert, 2001-08-27
|
||||
|
||||
* Some bugs were fixed:
|
||||
- security problems
|
||||
- hard links to symbolic links
|
||||
|
||||
* New option --recursion (the default) that is the inverse of --no-recursion.
|
||||
|
||||
* New options --anchored, --ignore-case, --wildcards,
|
||||
--wildcards-match-slash, and their negations (e.g., --no-anchored).
|
||||
Along with --recursion and --no-recursion, these options control how
|
||||
exclude patterns are interpreted.
|
||||
|
||||
* The default interpretation of exclude patterns is now --no-anchored
|
||||
--no-ignore-case --recursion --wildcards --wildcards-match-slash.
|
||||
This is a quiet change to the semantics of --exclude. The previous
|
||||
semantics were a failed attempt at backward compatibility but it
|
||||
became clear that the semantics were puzzling and did not satisfy
|
||||
everybody. Rather than continue to try to revive that dead horse we
|
||||
thought it better to substitute cleaner semantics, with options so
|
||||
that you can change the behavior more to your liking.
|
||||
|
||||
* New message translations for Indonesian and Turkish.
|
||||
The translation for Korean has been withdrawn due to encoding errors.
|
||||
It will be reissued once those are fixed.
|
||||
|
||||
|
||||
version 1.13.19 - Paul Eggert, 2001-01-13
|
||||
|
||||
* The -I option has been withdrawn, as it was buggy and confusing.
|
||||
Eventually it is planned to be reintroduced, with the same meaning as -T.
|
||||
|
||||
* With an option like -N DATE, if DATE starts with "/" or ".", it is taken
|
||||
to be a file name; the last-modified time of that file is used as the date.
|
||||
|
||||
|
||||
version 1.13.18 - Paul Eggert, 2000-10-29
|
||||
|
||||
* Some security problems have been fixed. `tar -x' now modifies only
|
||||
files under the working directory, unless you also specify an unsafe
|
||||
option like --absolute-names or --overwrite.
|
||||
|
||||
* The short name of the --bzip option has been changed to -j,
|
||||
and -I is now an alias for -T, for compatibility with Solaris tar.
|
||||
|
||||
* The manual is now distributed under the GNU Free Documentation License.
|
||||
|
||||
* The new environment variable TAR_OPTIONS holds default command-line options.
|
||||
|
||||
* The --no-recursion option now affects extraction too.
|
||||
|
||||
* The wording in some diagnostics has been changed slightly.
|
||||
|
||||
* Snapshot files now record whether each file was accessed via NFS.
|
||||
The new file format is upward- and downward-compatible with the old.
|
||||
|
||||
* New language supported: da.
|
||||
|
||||
* Compilation by traditional (K&R) C compilers is no longer supported.
|
||||
If you still use such a compiler, please use GCC instead.
|
||||
|
||||
* This version of tar works best with GNU gzip test version 1.3 or later.
|
||||
Please see <ftp://alpha.gnu.org/gnu/gzip/>.
|
||||
|
||||
* `tar --delete -f -' now works again.
|
||||
|
||||
|
||||
version 1.13.17 - Paul Eggert, 2000-01-07.
|
||||
|
||||
* `tar --delete -f -' is no longer allowed; it was too buggy.
|
||||
* Diagnostic messages have been made more regular and consistent.
|
||||
|
||||
|
||||
version 1.13.16 - Paul Eggert, 1999-12-13.
|
||||
|
||||
* By default, tar now refuses to overwrite an existing file when
|
||||
extracting files from an archive; instead, it removes the file
|
||||
before extracting it. If the existing file is a symbolic link, the
|
||||
link is removed and not the pointed-to file. There is one
|
||||
exception: existing nonempty directories are not removed, nor are
|
||||
their ownerships or permissions extracted. This fixes some
|
||||
longstanding security problems.
|
||||
|
||||
The new --overwrite option enables the old default behavior.
|
||||
|
||||
For regular files, tar implements this change by using the O_EXCL
|
||||
option of `open' to ensure that it creates the file; if this fails, it
|
||||
removes the file and tries again. This is similar to the behavior of
|
||||
the --unlink-first option, but it is faster in the common case of
|
||||
extracting a new directory.
|
||||
|
||||
* By default, tar now ignores file names containing a component of `..'
|
||||
when extracting, and warns about such file names when creating an archive.
|
||||
To enable the old behavior, use the -P or --absolute-names option.
|
||||
|
||||
* Tar now handles file names with multibyte encodings (e.g., UTF-8, Shift-JIS)
|
||||
correctly. It relies on the mbrtowc function to handle multibyte characters.
|
||||
|
||||
* The file generated by -g or --listed-incremental now uses a format
|
||||
that is independent of locale, so that users need not worry about
|
||||
locale when restoring a backup. This is needed for proper support
|
||||
of multibyte characters. Old-format files can still be read, and
|
||||
older versions of GNU tar can read new-format files, unless member
|
||||
names have multibyte chars.
|
||||
|
||||
* Many diagnostics have been changed slightly, so that file names are
|
||||
now output unambiguously. File names in diagnostics now are either
|
||||
`quoted like this' (in the default C locale) or are followed by
|
||||
colon, newline, or space, depending on context. Unprintable
|
||||
characters are escaped with a C-like backslash conventions.
|
||||
Terminating characters (e.g., close-quote, colon, newline)
|
||||
are also escaped as needed.
|
||||
|
||||
* tar now ignores socket files when creating an archive.
|
||||
Previously tar archived sockets as fifos, which caused problems.
|
||||
|
||||
|
||||
version 1.13.15 - Paul Eggert, 1999-12-03.
|
||||
|
||||
* If a file's ctime changes when being archived, report an error.
|
||||
Previously tar looked at mtime, which missed some errors.
|
||||
|
||||
|
||||
version 1.13.14 - Paul Eggert, 1999-11-07.
|
||||
|
||||
* New translations ja, pt_BR.
|
||||
* New options --help and --version for rmt.
|
||||
* Ignore Solaris door files when creating an archive.
|
||||
|
||||
|
||||
version 1.13.13 - Paul Eggert, 1999-10-11.
|
||||
|
||||
* Invalid headers in tar files now elicit errors, not just warnings.
|
||||
* `tar --version' output conforms to the latest GNU coding standards.
|
||||
* If you specify an invalid date, `tar' now substitutes (time_t) -1.
|
||||
* `configure --with-dmalloc' is no longer available.
|
||||
|
||||
|
||||
version 1.13.12 - Paul Eggert, 1999-09-24.
|
||||
|
||||
* `tar' now supports hard links to symbolic links.
|
||||
|
||||
* New options --no-same-owner, --no-same-permissions.
|
||||
|
||||
* --total now also outputs a human-readable size, and a throughput value.
|
||||
|
||||
* `tar' now uses two's-complement base-256 when outputting header
|
||||
values that are out of the range of the standard unsigned base-8
|
||||
format. This affects archive members with negative or huge time
|
||||
stamps or uids, and archive members 8 GB or larger. The new tar
|
||||
archives cannot be read by traditional tar, or by older versions of
|
||||
GNU tar. Use the --old-archive option to revert to the old
|
||||
behavior, which uses unportable representations for negative values,
|
||||
and which rejects large files.
|
||||
|
||||
* On 32-bit hosts, `tar' now assumes that an incoming time stamp T in
|
||||
the range 2**31 <= T < 2**32 represents the negative time (T -
|
||||
2**32). This behavior is nonstandard and is not portable to 64-bit
|
||||
time_t hosts, so `tar' issues a warning.
|
||||
|
||||
* `tar' no longer gives up extracting immediately upon discovering
|
||||
that an archive contains garbage at the end. It attempts to extract
|
||||
as many files as possible from the good data before the garbage.
|
||||
|
||||
* A read error now causes a nonzero exit status, not just a warning.
|
||||
|
||||
* Some diagnostics have been reworded for consistency.
|
||||
|
||||
|
||||
version 1.13.11 - Paul Eggert, 1999-08-23.
|
||||
|
||||
* The short name of the --bzip option has been changed to -I,
|
||||
for compatibility with paxutils.
|
||||
|
||||
* -T /dev/null now matches nothing; previously, it matched anything
|
||||
if no explicit operands were given.
|
||||
|
||||
* The `--' option now works the same as with other GNU utilities;
|
||||
it causes later operands to be interpreted as file names, not options,
|
||||
even if they begin with `-'.
|
||||
|
||||
* For the --newer and --after-date options, the table of time zone
|
||||
abbreviations like `EST' has been updated to match current practice.
|
||||
Also, local time abbreviations are now recognized, even if they are
|
||||
not in tar's hardwired table. Remember, though, that you should use
|
||||
numeric UTC offsets like `-0500' instead of abbreviations like
|
||||
`EST', as abbreviations are not standardized and are ambiguous.
|
||||
|
||||
|
||||
version 1.13.10 - Paul Eggert, 1999-08-20.
|
||||
|
||||
* `tar' now uses signed base-64 when outputting header values that are
|
||||
out of the range of the standard unsigned base-8 format. [This
|
||||
change was superseded in 1.13.12, described above.]
|
||||
|
||||
|
||||
version 1.13.9 - Paul Eggert, 1999-08-18.
|
||||
|
||||
* `tar' now writes two zero blocks at end-of-archive instead of just one.
|
||||
POSIX.1 requires this, and some other `tar' implementations check for it.
|
||||
|
||||
* `tar' no longer silently accepts a block containing nonzero checksum bytes
|
||||
as a zero block.
|
||||
|
||||
* `tar' now reads buggy tar files that have a null byte at the start of a
|
||||
numeric header field.
|
||||
|
||||
|
||||
version 1.13.8 - Paul Eggert, 1999-08-16.
|
||||
|
||||
* For compatibility with traditional `tar', intermediate directories
|
||||
created automatically by root are no longer given the uid and gid of
|
||||
the original file or directory.
|
||||
|
||||
|
||||
version 1.13.7 - Paul Eggert, 1999-08-14.
|
||||
|
||||
* --listed-incremental and --newer are now incompatible options.
|
||||
|
||||
* When creating an archive, leading `./' is no longer stripped,
|
||||
to match traditional tar's behavior (and simplify the documentation).
|
||||
|
||||
* --diff without --absolute-names no longer falls back on absolute names.
|
||||
|
||||
|
||||
version 1.13.6 - Paul Eggert, 1999-08-11.
|
||||
|
||||
* An --exclude pattern containing / now excludes a file only if it matches an
|
||||
initial prefix of the file name; a pattern without / continues to
|
||||
exclude a file if it matches any file name component.
|
||||
|
||||
* The protocol for talking to rmt has been extended slightly.
|
||||
Open flags are now communicated in symbolic format as well as numeric.
|
||||
The symbolic format (e.g., "O_WRONLY|O_CREAT|O_TRUNC") is for portability
|
||||
when rmt is operating on a different operating system from tar.
|
||||
The numeric format is retained, and rmt uses it if symbolic format is absent,
|
||||
for backward compatibility with older versions of tar and rmt.
|
||||
|
||||
* When writing GNU tar format headers, tar now uses signed base-64
|
||||
for values that cannot be represented in unsigned octal.
|
||||
This supports larger files (2**66 - 1 bytes instead of 2**33 - 1 bytes),
|
||||
larger uids, negative time stamps, etc.
|
||||
|
||||
* When extracting files with unknown ownership, tar now looks up the
|
||||
uid and gid "nobody" on hosts whose headers do not define UID_NOBODY
|
||||
and GID_NOBODY, and falls back on uid/gid -2 if there is no "nobody".
|
||||
|
||||
* tar -t --numeric-owner now prints numeric uids and gids, not symbolic.
|
||||
|
||||
* New option -y or --bzip2 for bzip2 compression, by popular request.
|
||||
|
||||
|
||||
version 1.13.5 - Paul Eggert, 1999-07-20.
|
||||
|
||||
* Do the delayed updates of file metadata even after a fatal error.
|
||||
|
||||
|
||||
version 1.13.4 - Paul Eggert, 1999-07-20.
|
||||
|
||||
* Do not chmod unless we are root or the -p option was given;
|
||||
this matches historical practice.
|
||||
|
||||
|
||||
version 1.13.3 - Paul Eggert, 1999-07-16.
|
||||
|
||||
* A path name is excluded if any of its file name components matches an
|
||||
excluded pattern, even if the path name was specified on the command line.
|
||||
Also see 1.13.6 for later changes in this area.
|
||||
|
||||
|
||||
version 1.13.2 - Paul Eggert, 1999-07-14.
|
||||
|
||||
* Bug reporting address changed to <bug-tar@gnu.org>.
|
||||
|
||||
|
||||
version 1.13.1 - Paul Eggert, 1999-07-12.
|
||||
|
||||
* Bug fixes only.
|
||||
|
||||
version 1.13 - Paul Eggert, 1999-07-08.
|
||||
|
||||
* Support for large files, e.g., files larger than 2 GB on many 32-bit hosts.
|
||||
Also, support for larger uids, device ids, etc.
|
||||
* Many bug fixes and porting fixes.
|
||||
* This release is only for fixes. A more ambitious test release,
|
||||
with new features, is available as part of the paxutils. Please see:
|
||||
ftp://alpha.gnu.org/gnu/paxutils/
|
||||
The fixes in this release are intended to be merged with paxutils
|
||||
at some point, but they haven't been merged yet.
|
||||
* An interim GNU tar alpha had new --bzip2 and --ending-file options,
|
||||
but they have been removed to maintain compatibility with paxutils.
|
||||
Please try --use=bzip2 instead of --bzip2.
|
||||
|
||||
Version 1.12 - François Pinard, 1997-04.
|
||||
|
||||
Sensitive matters
|
||||
* Use shell globbing patterns for --label, instead of regular expressions.
|
||||
* Do not quote anymore internally over the quoting done by the shell.
|
||||
|
||||
Output for humans
|
||||
* Offer internationalization capabilities of most recent GNU gettext.
|
||||
* Messages available in many more languages, thanks to all translators!
|
||||
* Usage of ISO 8601 dates in listings, instead of local American dates.
|
||||
* More normalization and cleanup in error messages.
|
||||
|
||||
Creation
|
||||
* For helping using tar with find, offer a --no-recursion option.
|
||||
* Implement --numeric-owner for ignoring symbolic names at create time.
|
||||
* New --owner, --group --mode options, still preliminary.
|
||||
* Recognize creating an archive on /dev/null, so Amanda works faster.
|
||||
* Object to the creation of an empty archive (like in `tar cf FILE').
|
||||
* Barely start implementing --posix and POSIXLY_CORRECT.
|
||||
|
||||
Extraction
|
||||
* Make a better job at restoring file and directory attributes.
|
||||
* Automatically attempt deleting existing files when in the way.
|
||||
* Option --unlink-first (-U) removes most files prior to extraction.
|
||||
* Option --recursive-unlink removes non-empty directories when in the way.
|
||||
* Option --numeric-owner ignores owner/group names, it uses UID/GID instead.
|
||||
* Use global umask when creating missing intermediate directories.
|
||||
* When symlinks are not available, extract symbolic links as hard links.
|
||||
* Diagnose extraction of contiguous files as regular files.
|
||||
* New --backup, --suffix and --version-control options.
|
||||
|
||||
Various changes
|
||||
* Better support of huge archives with --tape-length and --totals.
|
||||
* Rename option --read-full-blocks (-B) to --read-full-records (-B).
|
||||
* Rename option --block-size (-b) to --blocking-factor (-b).
|
||||
* Rename option --record-number (-R) to --block-number (-R).
|
||||
* With --block-number (-R), report null blocks and end of file.
|
||||
* Implement --record-size for introducing a size in bytes.
|
||||
* Delete --block-compress option and rather decide it automatically.
|
||||
* Rename option --modification-time to --touch.
|
||||
|
||||
Many bugs are squashed, while others still run free.
|
||||
|
||||
Version 1.11.8 - François Pinard, 1995-06.
|
||||
|
||||
* Messages available in French, German, Portuguese and Swedish.
|
||||
* The distribution provides a rudimentary Texinfo manual.
|
||||
* The device defaults to stdin/stdout, unless overridden by the installer.
|
||||
* Option --sparse (-S) should work on more systems.
|
||||
* Option --rsh-command may select an alternative remote shell program.
|
||||
|
||||
Most changes are internal, and should yield better portability.
|
||||
|
||||
Version 1.11.2 - Michael Bushnell, 1993-03.
|
||||
|
||||
* Changes in backup scripts: cleaned up considerably; notices error
|
||||
conditions better over rsh; DUMP_REMIND_SCRIPT is now an option in
|
||||
backup-specs; new file dump-remind is an example of a
|
||||
DUMP_REMIND_SCRIPT.
|
||||
|
||||
* Superfluous "Reading dirname" was a bug; fixed.
|
||||
|
||||
* Incompatibility problems with a bug on Solaris are fixed.
|
||||
|
||||
* New option --gzip (aliases are --ungzip and -z); calls gzip instead
|
||||
of compress. Also, --use-compress-program lets you specify any
|
||||
compress program. --compress-block is renamed --block-compress and
|
||||
now requires one of the three compression options to be specified.
|
||||
|
||||
* Several error messages are cleaned up.
|
||||
|
||||
* Directory owners are now set properly when running as root.
|
||||
|
||||
* Provide DUMP_REMIND_SCRIPT in backup-specs as a possible option
|
||||
for --info-script.
|
||||
|
||||
* Behave better with broken rmt servers.
|
||||
|
||||
* Dump scripts no longer use --atime-preserve; this causes a nasty probem.
|
||||
|
||||
* Several Makefile cleanups.
|
||||
|
||||
Version 1.11.1 - Michael Bushnell, 1992-09.
|
||||
|
||||
* Many bug fixes.
|
||||
|
||||
Version 1.11 - Michael Bushnell, 1992-09.
|
||||
Version 1.10.16 - 1992-07.
|
||||
Version 1.10.15 - 1992-06.
|
||||
Version 1.10.14 - 1992-05.
|
||||
Version 1.10.13 - 1992-01.
|
||||
|
||||
* Many bug fixes.
|
||||
|
||||
* Now uses GNU standard configure, generated by Autoconf.
|
||||
|
||||
* Long options now use `--'; use of `+' is deprecated and support
|
||||
for it will eventually be removed.
|
||||
|
||||
* New option --null causes filenames read by -T to be
|
||||
null-terminated, and causes -C to be ignored.
|
||||
|
||||
* New option --remove-files deletes files (but not directories)
|
||||
after they are added to the archive.
|
||||
|
||||
* New option --ignore-failed-read prevents read-errors from affecting
|
||||
the exit status.
|
||||
|
||||
* New option --checkpoint prints occasional messages as the tape
|
||||
is being read or written.
|
||||
|
||||
* New option --show-omitted-dirs prints the names of directories
|
||||
omitted from the archive.
|
||||
|
||||
* Some tape drives which use a non-standard method of indicating
|
||||
end-of-tape now work correctly with multi-tape archives.
|
||||
|
||||
* --volno-file: Read the volume number used in prompting the user
|
||||
(but not in recording volume ID's on the archive) from a file.
|
||||
|
||||
* When using --multi-volume, you can now give multiple -f arguments;
|
||||
the various tape drives will get used in sequence and then wrap
|
||||
around to the beginning.
|
||||
|
||||
* Remote archive names no longer have to be in /dev: any file with a
|
||||
`:' is interpreted as remote. If new option --force-local is given,
|
||||
then even archive files with a `:' are considered local.
|
||||
|
||||
* New option --atime-preserve restores (if possible) atimes to
|
||||
their original values after dumping the file.
|
||||
|
||||
* No longer does tar confusingly dump "." when you don't tell it
|
||||
what to dump.
|
||||
|
||||
* When extracting directories, tar now correctly restores their
|
||||
modification and access times.
|
||||
|
||||
* Longnames support is redone differently--long name info directly
|
||||
precedes the long-named file or link in the archive, so you no
|
||||
longer have to wait for the extract to hit the end of the tape for
|
||||
long names to work.
|
||||
|
||||
Version 1.10 - Michael Bushnell, 1991-07.
|
||||
|
||||
* Filename to -G is optional. -C works right. Names +newer and
|
||||
+newer-mtime work right.
|
||||
|
||||
* -g is now +incremental, -G is now +listed-incremental.
|
||||
|
||||
* Sparse files now work correctly.
|
||||
|
||||
* +volume is now called +label.
|
||||
|
||||
* +exclude now takes a filename argument, and +exclude-from does
|
||||
what +exclude used to do.
|
||||
|
||||
* Exit status is now correct.
|
||||
|
||||
* +totals keeps track of total I/O and prints it when tar exits.
|
||||
|
||||
* When using +label with +extract, the label is now a regexp.
|
||||
|
||||
* New option +tape-length (-L) does multi-volume handling like BSD
|
||||
dump: you tell tar how big the tape is and it will prompt at that
|
||||
point instead of waiting for a write error.
|
||||
|
||||
* New backup scripts level-0 and level-1 which might be useful
|
||||
to people. They use a file "backup-specs" for information, and
|
||||
shouldn't need local modification. These are what we use to do
|
||||
all our backups at the FSF.
|
||||
|
||||
Version 1.09 - Jay Fenlason, 1990-10.
|
||||
Version 1.08 - Jay Fenlason, 1990-01.
|
||||
Versions 1.07 back to 1.00 by Jay Fenlason.
|
||||
|
||||
* See ChangeLog for more details.
|
||||
|
||||
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003,
|
||||
2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU tar.
|
||||
|
||||
GNU tar is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU tar 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 Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
Local variables:
|
||||
mode: outline
|
||||
paragraph-separate: "[ ]*$"
|
||||
eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
time-stamp-start: "changes. "
|
||||
time-stamp-format: "%:y-%02m-%02d"
|
||||
time-stamp-end: "\n"
|
||||
end:
|
173
gnutar/PORTS
Normal file
173
gnutar/PORTS
Normal file
@ -0,0 +1,173 @@
|
||||
Ports of GNU tar and other tars
|
||||
See the end of file for copying conditions.
|
||||
|
||||
* Introduction
|
||||
|
||||
Most entries in this file are out of date, unfortunately. Such
|
||||
entries are marked with an `X'. Run grep '^\*\*[^X]' PORTS to
|
||||
extract valid entries.
|
||||
|
||||
Please write bug-tar@gnu.org if you are aware of various ports of GNU tar
|
||||
to non-GNU and non-Unix systems not listed here, or for corrections.
|
||||
Please provide the goal system, a complete and stable URL, the maintainer
|
||||
name and address, the tar version used as a base, and your comments.
|
||||
|
||||
* GNU/Linux and Unix
|
||||
|
||||
** Star is a tape archiver similar to tar.
|
||||
<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/star.html>
|
||||
|
||||
* Amiga
|
||||
|
||||
**X ftp://ftp.wustl.edu/systems/amiga/aminet/util/arc/GNUtar-1.11.8.lha
|
||||
maintained by Enrico Forestieri <enrico@com.unipr.it>
|
||||
Based on tar 1.11.8.
|
||||
|
||||
**X ftp://ftp.ninemoons.com/pub/ade/current/amiga-bin/tar-1.11.8-bin.lha
|
||||
maintained by the ADE group <fnf@fishpond.ninemoons.com>
|
||||
Based on tar 1.11.8, needs ixemul.library.
|
||||
|
||||
**X ftp://ftp.wustl.edu/systems/amiga/aminet/util/arc/gnutar.lha
|
||||
maintained by <mscheler@wuarchive.wustl.edu>
|
||||
|
||||
* DEC alpha (NT)
|
||||
|
||||
**X ftp://ftp.cdrom.com/.20/windows/archiver/tar.zip
|
||||
maintained by Drew Bliss & Geoff Voelker
|
||||
|
||||
* DEC VAX (VMS)
|
||||
|
||||
**X http://www.lp.se/free/vmstar/
|
||||
maintained by Richard Levitte <levitte@lp.se>
|
||||
This is not GNU tar, but a separate implementation.
|
||||
|
||||
** maintained by William Bader <william@nscs.fast.net>
|
||||
For V4.7. Based on an old PDtar. Requires compatible shared libraries
|
||||
to run V5 or V6 executables.
|
||||
|
||||
* IBM/PC (DV/X)
|
||||
|
||||
**X ftp://qdeck.com/ (?)
|
||||
maintained by David Ronis <ronis@gibbs.chem.mcgill.ca>
|
||||
For Desqview/X. Everything works besides compression. Copy of hacked
|
||||
sources available, some of DV/X's programmer's library also needed.
|
||||
|
||||
* IBM/PC (MSDOS)
|
||||
|
||||
**X http://www.simtel.net/simtel.net/
|
||||
http://www.leo.org/pub/comp/platforms/pc/gnuish (Germany)
|
||||
ftp://ftp.simtel.net/simtelnet/gnu
|
||||
ftp://ftp.leo.org/pub/comp/platforms/pc/gnuish
|
||||
maintained by Darrel Hankerson <hankedr@mail.auburn.edu>
|
||||
You get many GNU tools, not only `tar'. The GNUish project is described
|
||||
in `gnuish_t.htm'.
|
||||
|
||||
** The DJGPP development tools also include some `tar' utilities.
|
||||
|
||||
**X ftp://ftp.mcs.com/mcsnet.users/les/dos-gnutar/
|
||||
maintained by Leslie Mikesell <les@mcs.net>
|
||||
Based on tar 1.11.2. Support for SCSI (via ASPI) and network (rsh over
|
||||
packet driver). No support for win95 long file names.
|
||||
|
||||
**X ftp://ftp.wu-wien.ac.at/pub/src/PCmisc/aspi-tar/*
|
||||
maintained by Christoph Splittgerber <chris@orion.sdata.de>
|
||||
Based on tar 1.10. Support for SCSI (via ASPI).
|
||||
|
||||
**X ftp://wuarchive (?)
|
||||
Several DOS version based on PDtar. John Gilmore <gnu@toad.com> says
|
||||
he has copies of several vintages saved.
|
||||
|
||||
**X ftp://ftp.cdrom.com/.14/languages/ada/toolkit/msdos/gtar/gtar.exe
|
||||
ftp://ftp.cdrom.com/.14/languages/ada/toolkit/msdos/gtar/gtar.taz
|
||||
ftp://ftp.cdrom.com/.14/languages/ada/toolkit/msdos/gtar/gtar.zip
|
||||
|
||||
**X ftp://ftp.cdrom.com/.4/os2/archiver/tar.zip
|
||||
Based on PDtar.
|
||||
|
||||
**X ftp://ftp.cdrom.com/.20/windows/archiver/tar.zip
|
||||
maintained by Drew Bliss & Geoff Voelker
|
||||
GNU tar for NT (intel and Alpha platforms).
|
||||
|
||||
** ftp://garbo.uwasa.fi/pc/unix/untgz095.zip
|
||||
maintained by Tillmann Steinbrecher <tst@darmstadt.netsurf.de>
|
||||
The `untgz' program is a fast .tar or .tar.gz (.tgz) extractor.
|
||||
|
||||
**X http://people.darmstadt.netsurf.de/tst/tar.htm
|
||||
maintained by Tillmann Steinbrecher <tst@darmstadt.netsurf.de>
|
||||
This is not a `tar' port, but an index of them.
|
||||
|
||||
* IBM/PC (OS/2)
|
||||
|
||||
**X http://www.leo.org/pub/comp/os/os2/leo/gnu/archiver/gtar254.zip
|
||||
http://www.leo.org/pub/comp/os/os2/leo/gnu/archiver/gtak254.zip
|
||||
maintained by Andreas Kaiser <Andreas.Kaiser@stuttgart.netsurf.de>
|
||||
Version 2.54. Based on tar 1.10. The second archive contains SCSI
|
||||
drivers (DAT streamers notably) and rmt-type programs.
|
||||
|
||||
* IBM/PC (Win32: Windows 95, NT 3.5 or NT 4.0)
|
||||
|
||||
**X ftp://ftp.cygnus.com:~ftp/pub/sac/win32/usersrc/*
|
||||
maintained by Cygnus
|
||||
GNU-Win32 B17.1 distribution. Download all files, `cat' them together,
|
||||
and `untar' the result. You get many GNU tools, not only `tar'.
|
||||
Based on tar 1.11.2.
|
||||
|
||||
**X ftp://ftp.cdrom.com/.20/windows/archiver/tar.zip
|
||||
maintained by Drew Bliss & Geoff Voelker
|
||||
GNU tar for NT (intel and Alpha platforms).
|
||||
|
||||
** ftp://garbo.uwasa.fi/pc/unix/untgz095.zip
|
||||
maintained by Tillmann Steinbrecher <tst@darmstadt.netsurf.de>
|
||||
The `untgz' program is a fast .tar or .tar.gz (.tgz) extractor.
|
||||
|
||||
* IBM/PC (Windows 3.1)
|
||||
|
||||
**X ftp://ftp.mcs.com/mcsnet.users/les/win-gnutar/
|
||||
maintained by Leslie Mikesell <les@mcs.net>
|
||||
Support for network (rsh over winsock). No support for win95 long
|
||||
file names.
|
||||
|
||||
**X ftp://ftp.gamesdomain.ru/.1/os/windows/programr/tar.zip
|
||||
Based on GNU tar 1.11.2.
|
||||
|
||||
* Macintosh
|
||||
|
||||
** Paulo Abreu (paulotex at yahoo dot com) did a
|
||||
limited port of GNU tar to Darwin, with support for resource forks
|
||||
and finder info, but this no longer seems to be available.
|
||||
|
||||
** There is a tar in Stuffit Expander which is available many places and
|
||||
comes with MacOS. It creates some spurious files but works on average.
|
||||
|
||||
** There is an excellent GNU tar bundled in Tenon MachTen, but it does not
|
||||
seem to be available separately.
|
||||
|
||||
|
||||
* Copyright notice
|
||||
|
||||
Copyright (C) 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU tar.
|
||||
|
||||
GNU tar is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU tar is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU tar; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
|
||||
Local Variables:
|
||||
mode: outline
|
||||
paragraph-separate: "[ ]*$"
|
||||
version-control: never
|
||||
End:
|
||||
|
251
gnutar/README
Normal file
251
gnutar/README
Normal file
@ -0,0 +1,251 @@
|
||||
README for GNU tar
|
||||
See the end of file for copying conditions.
|
||||
|
||||
* Introduction
|
||||
|
||||
Please glance through *all* sections of this
|
||||
`README' file before starting configuration. Also make sure you read files
|
||||
`ABOUT-NLS' and `INSTALL' if you are not familiar with them already.
|
||||
|
||||
If you got the `tar' distribution in `shar' format, time stamps ought to be
|
||||
properly restored; do not ignore such complaints at `unshar' time.
|
||||
|
||||
GNU `tar' saves many files together into a single tape or disk
|
||||
archive, and can restore individual files from the archive. It includes
|
||||
multivolume support, the ability to archive sparse files, automatic archive
|
||||
compression/decompression, remote archives and special features that allow
|
||||
`tar' to be used for incremental and full backups. This distribution
|
||||
also includes `rmt', the remote tape server. The `mt' tape drive control
|
||||
program is in the GNU `cpio' distribution.
|
||||
|
||||
GNU `tar' is derived from John Gilmore's public domain `tar'.
|
||||
|
||||
See file `ABOUT-NLS' for how to customize this program to your language.
|
||||
See file `COPYING' for copying conditions.
|
||||
See file `INSTALL' for compilation and installation instructions.
|
||||
See file `PORTS' for various ports of GNU tar to non-Unix systems.
|
||||
See file `NEWS' for a list of major changes in the current release.
|
||||
See file `THANKS' for a list of contributors.
|
||||
|
||||
Besides those configure options documented in files `INSTALL' and
|
||||
`ABOUT-NLS', an extra option may be accepted after `./configure':
|
||||
|
||||
* Install
|
||||
|
||||
** Selecting the default archive format.
|
||||
|
||||
The default archive format is GNU, this can be overridden by
|
||||
presetting DEFAULT_ARCHIVE_FORMAT while configuring. The allowed
|
||||
values are GNU, V7, OLDGNU, USTAR and POSIX.
|
||||
|
||||
** Selecting the default archive device
|
||||
|
||||
The default archive device is now `stdin' on read and `stdout' on write.
|
||||
The installer can still override this by presetting `DEFAULT_ARCHIVE'
|
||||
in the environment before configuring (the behavior of `-[0-7]' or
|
||||
`-[0-7]lmh' options in `tar' are then derived automatically). Similarly,
|
||||
`DEFAULT_BLOCKING' can be preset to something else than 20.
|
||||
|
||||
** Selecting full pathname of the "rmt" binary.
|
||||
|
||||
Previous versions of tar always looked for "rmt" binary in the
|
||||
directory "/etc/rmt". However, the "rmt" program included
|
||||
in the distribution was installed under "$prefix/libexec/rmt".
|
||||
To fix this discrepancy, tar now looks for "$prefix/libexec/rmt".
|
||||
If you do not want this behavior, specify full path name of
|
||||
"rmt" binary using DEFAULT_RMT_DIR variable, e.g.:
|
||||
|
||||
./configure DEFAULT_RMT_DIR=/etc
|
||||
|
||||
If you already have a copy of "rmt" installed and wish to use it
|
||||
instead of the version supplied with the distribution, use --with-rmt
|
||||
option:
|
||||
|
||||
./configure --with-rmt=/etc/rmt
|
||||
|
||||
This will also disable building the included version of rmt.
|
||||
|
||||
** Installing backup scripts.
|
||||
|
||||
This version of tar is shipped with the shell scripts for producing
|
||||
incremental backups (dumps) and restoring filesystems from them.
|
||||
The name of the backup script is "backup". The name of the
|
||||
restore script is "restore". They are installed in "$prefix/sbin"
|
||||
directory.
|
||||
|
||||
Use option --enable-backup-scripts to compile and install these
|
||||
scripts.
|
||||
|
||||
** `--disable-largefile' omits support for large files, even if the
|
||||
operating system supports large files. Typically, large files are
|
||||
those larger than 2 GB on a 32-bit host.
|
||||
|
||||
* Installation hints
|
||||
|
||||
Here are a few hints which might help installing `tar' on some systems.
|
||||
|
||||
** gzip and bzip2.
|
||||
|
||||
GNU tar uses the gzip and bzip2 programs to read and write compressed
|
||||
archives. If you don't have these programs already, you need to
|
||||
install them. Their sources can be found at:
|
||||
|
||||
ftp://ftp.gnu.org/gnu/gzip/
|
||||
http://sourceware.cygnus.com/bzip2/
|
||||
|
||||
If you see the following symptoms:
|
||||
|
||||
$ tar -xzf file.tar.gz
|
||||
gzip: stdin: decompression OK, trailing garbage ignored
|
||||
tar: Child returned status 2
|
||||
|
||||
then you have encountered a gzip incompatibility that should be fixed
|
||||
in gzip test version 1.3, which as of this writing is available at
|
||||
<ftp://alpha.gnu.org/gnu/gzip/>. You can work around the
|
||||
incompatibility by using a shell command like
|
||||
`gzip -d <file.tar.gz | tar -xzf -'.
|
||||
|
||||
** Solaris issues.
|
||||
|
||||
GNU tar exercises many features that can cause problems with older GCC
|
||||
versions. In particular, GCC 2.8.1 (sparc, -O1 or -O2) is known to
|
||||
miscompile GNU tar. No compiler-related problems have been reported
|
||||
when using GCC 2.95.2 or later.
|
||||
|
||||
Recent versions of Solaris tar sport a new -E option to generate
|
||||
extended headers in an undocumented format. GNU tar does not
|
||||
understand these headers.
|
||||
|
||||
** Static linking.
|
||||
|
||||
Some platform will, by default, prepare a smaller `tar' executable
|
||||
which depends on shared libraries. Since GNU `tar' may be used for
|
||||
system-level backups and disaster recovery, installers might prefer to
|
||||
force static linking, making a bigger `tar' executable maybe, but able to
|
||||
work standalone, in situations where shared libraries are not available.
|
||||
The way to achieve static linking varies between systems. Set LDFLAGS
|
||||
to a value from the table below, before configuration (see `INSTALL').
|
||||
|
||||
Platform Compiler LDFLAGS
|
||||
|
||||
(any) Gnu C -static
|
||||
AIX (vendor) -bnso -bI:/lib/syscalls.exp
|
||||
HPUX (vendor) -Wl,-a,archive
|
||||
IRIX (vendor) -non_shared
|
||||
OSF (vendor) -non_shared
|
||||
SCO 3.2v5 (vendor) -dn
|
||||
Solaris (vendor) -Bstatic
|
||||
SunOS (vendor) -Bstatic
|
||||
|
||||
** Failed tests `ignfail.sh' or `incremen.sh'.
|
||||
|
||||
In an NFS environment, lack of synchronization between machine clocks
|
||||
might create difficulties to any tool comparing dates and file time stamps,
|
||||
like `tar' in incremental dumps. This has been a recurrent problem with
|
||||
GNU Make for the last few years. We would like a general solution.
|
||||
|
||||
** BSD compatibility matters.
|
||||
|
||||
Set LIBS to `-lbsd' before configuration (see `INSTALL') if the linker
|
||||
complains about `bsd_ioctl' (Slackware). Also set CPPFLAGS to
|
||||
`-I/usr/include/bsd' if <sgtty.h> is not found (Slackware).
|
||||
|
||||
** OPENStep 4.2 swap files
|
||||
|
||||
Tar cannot read the file /private/vm/swapfile.front (even as root).
|
||||
This file is not a real file, but some kind of uncompressed view of
|
||||
the real compressed swap file; there is no reason to back it up, so
|
||||
the simplest workaround is to avoid tarring this file.
|
||||
|
||||
* Special topics
|
||||
|
||||
Here are a few special matters about GNU `tar', not related to build
|
||||
matters. See previous section for such.
|
||||
|
||||
** File attributes.
|
||||
|
||||
About *security*, it is probable that future releases of `tar' will have
|
||||
some behavior changed. There are many pending suggestions to choose from.
|
||||
Today, extracting an archive not being `root', `tar' will restore suid/sgid
|
||||
bits on files but owned by the extracting user. `root' automatically gets
|
||||
a lot of special privileges, `-p' might later become required to get them.
|
||||
|
||||
GNU `tar' does not properly restore symlink attributes. Various systems
|
||||
implement flavors of symbolic links showing different behavior and
|
||||
properties. We did not successfully sorted all these out yet. Currently,
|
||||
the `lchown' call will be used if available, but that's all.
|
||||
|
||||
** POSIX compliance.
|
||||
|
||||
GNU `tar' is able to create archive in the following formats:
|
||||
|
||||
*** The format of UNIX version 7
|
||||
*** POSIX.1-1988 format, also known as "ustar format"
|
||||
*** POSIX.1-2001 format, also known as "pax format"
|
||||
*** Old GNU format (described below)
|
||||
|
||||
In addition to those, GNU `tar' is also able to read archives
|
||||
produced by `star' archiver.
|
||||
|
||||
A so called `Old GNU' format is based on an early draft of the
|
||||
POSIX 1003.1 `ustar' standard which is different from the final
|
||||
standard. It defines its extensions (such as incremental backups
|
||||
and handling of the long file names) in a way incompatible with
|
||||
any existing tar archive format, therefore the use of old GNU
|
||||
format is strongly discouraged.
|
||||
|
||||
Please read the file NEWS for more information about POSIX compliance
|
||||
and new `tar' features.
|
||||
|
||||
* What's next?
|
||||
|
||||
GNU tar will be merged into GNU paxutils: a project containing
|
||||
several utilities related to creating and handling archives in
|
||||
various formats. The project will include tar, cpio and pax
|
||||
utilities.
|
||||
|
||||
* Bug reporting.
|
||||
|
||||
Send bug reports to <bug-tar@gnu.org>. A bug report should contain
|
||||
an adequate description of the problem, your input, what you expected,
|
||||
what you got, and why this is wrong. Diffs are welcome, but they only
|
||||
describe a solution, from which the problem might be uneasy to infer.
|
||||
If needed, submit actual data files with your report. Small data files
|
||||
are preferred. Big files may sometimes be necessary, but do not send them
|
||||
to the report address; rather take special arrangement with the maintainer.
|
||||
|
||||
Your feedback will help us to make a better and more portable package.
|
||||
Consider documentation errors as bugs, and report them as such. If you
|
||||
develop anything pertaining to `tar' or have suggestions, let us know
|
||||
and share your findings by writing to <bug-tar@gnu.org>.
|
||||
|
||||
|
||||
* Copying
|
||||
|
||||
Copyright (C) 1990, 1991, 1992, 1994, 1997, 1998, 1999, 2000,
|
||||
2001, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU tar.
|
||||
|
||||
GNU tar is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU tar 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 Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
|
||||
Local Variables:
|
||||
mode: outline
|
||||
paragraph-separate: "[ ]*$"
|
||||
version-control: never
|
||||
End:
|
||||
|
526
gnutar/THANKS
Normal file
526
gnutar/THANKS
Normal file
@ -0,0 +1,526 @@
|
||||
GNU tar THANKS file
|
||||
|
||||
Public domain tar was written by John Gilmore, with contributions
|
||||
from Henry Spencer, Fred Fish, Ian Darwin, Geoff Collyer, Stan Barber,
|
||||
Guy Harris, Dave Brower, Richard Todd, Michael Rendell, Stu Heiss and
|
||||
Rich $alz. The FSF version, named GNU tar, was derived from PDTAR by
|
||||
Jay Fenlason and Joy Kendall, and was maintained in turn by François
|
||||
Pinard, Paul Eggert and Sergey Poznyakoff.
|
||||
|
||||
Many people further contributed to GNU tar by reporting problems,
|
||||
suggesting various improvements or submitting actual code. Here is a
|
||||
list of these people. Help me keep it complete and exempt of errors.
|
||||
See various ChangeLogs for a detailed description of contributions.
|
||||
|
||||
Aage Robeck aagero@ifi.uio.no
|
||||
Adye, TJ (Tim) T.J.Adye@rl.ac.uk
|
||||
Akiko Matsushita matusita@sra.co.jp
|
||||
Alan Bawden Alan@lcs.mit.edu
|
||||
Alan Cox alan@cymru.net
|
||||
Alan Modra alan@spri.levels.unisa.edu.au
|
||||
Albert W. Dorrington awdorrin@ictest.delcoelect.com
|
||||
Alex Schmidt root@lacesm.ufsm.br
|
||||
Alexander Dupuy dupuy@smarts.com
|
||||
Alexander Lehmann alex@hal.rhein-main.de
|
||||
Alexander V. Lukyanov lav@long.yar.ru
|
||||
Alois Steindl Alois.Steindl+Mechanik@tuwien.ac.at
|
||||
Amos Yahil ayahil@sbast4.ess.sunysb.edu
|
||||
Anders Andersson andersa@docs.uu.se
|
||||
Anders Liljeborg anders@fysik4.kth.se
|
||||
Andre Novaes Cunha Andre.Cunha@br.global-one.net
|
||||
Andreas Degert ad@papyrus.hamburg.com
|
||||
Andreas Haumer andreas@vlsivie.tuwien.ac.at
|
||||
Andreas Jaeger aj@arthur.pfalz.de
|
||||
Andreas Koppenhoefer koppenh@trick.informatik.uni-stuttgart.de
|
||||
Andreas Reuter ar205@bonzo.geowiss.nat.tu-bs.de
|
||||
Andreas Schuldei andreas@schuldei.org
|
||||
Andreas Schwab schwab@issan.informatik.uni-dortmund.de
|
||||
Andrew A. Ivanov ivanov@mics.msu.su
|
||||
Andrew J. Schorr schorr@ead.dsa.com
|
||||
Andrew Torda torda@igc.chem.ethz.ch
|
||||
Andrey A. Chernov ache@astral.msk.su
|
||||
Andy Gay andy@rdl.co.uk
|
||||
Antonio Jose Coutinho ajc@di.uminho.pt
|
||||
Ariel Faigon ariel@engr.sgi.com
|
||||
Arne Wichmann aw@math.uni-sb.de
|
||||
Arnold Robbins arnold@gnu.org
|
||||
Art Isbell aisbell@cubicsol.com
|
||||
Axel Boldt boldt@math.ucsb.edu
|
||||
Axel Habermann kiwi@belly.in-berlin.de
|
||||
Bdale Garbee bdale@gag.com
|
||||
Becki Kain beckers@josephus.furph.com
|
||||
Bela Lubkin filbo@armory.com
|
||||
Ben A. Mesander ben@piglet.cr.usgs.gov
|
||||
Benedikt Stockebrand benedikt@devnull.ruhr.de
|
||||
Bennett Todd bet@mordor.com
|
||||
Benno Schulenberg benno@nietvergeten.nl
|
||||
Benny Holmgren benny@hgs.se
|
||||
Bernard Chen bern@cs.ucla.edu
|
||||
Bernard Derval derval@iro.umontreal.ca
|
||||
Bernhard Rosenkraenzer bero@redhat.de
|
||||
Bo Nygaard Bai bai@iesd.auc.dk
|
||||
Bob Kaehms kaehms@was.archive.org
|
||||
Bob Mende Pie mende@piecomputer.rutgers.edu
|
||||
Bradley A. Smith basmith@prometheus.chem.umn.edu
|
||||
Brendan Kehoe brendan@cygnus.com
|
||||
Brett Gaines gaines@saifr00.ateng.az.honeywell.com
|
||||
Brian Perkins bperkins@netspace.org
|
||||
Brian R. Smith brian@cygnus.com
|
||||
Bruce Evans bde@runx.oz.au
|
||||
Bruce Jerrick bruce@cse.ogi.edu
|
||||
Bruno Haible haible@ilog.fr
|
||||
Bryan Ford baford@mit.edu
|
||||
Bryant Fujimoto fujimoto@denali.chem.washington.edu
|
||||
Burkhard Plache plache@krusty.optimax.ns.ca
|
||||
Calvin Cliff cliff@trifid.astro.ucla.edu
|
||||
Cameron Elliott cam@mvbms.mvbms.com
|
||||
Carl Streeter streeter@cae.wisc.edu
|
||||
Carsten Heyl heyl@nads.de
|
||||
Catrin Urbanneck cur@gppc.de
|
||||
Cesar Romani romani@ifm.uni-hamburg.de
|
||||
Chad Hurwitz churritz@cts.com
|
||||
Chance Reschke creschke@usra.edu
|
||||
Charles Fu ccwf@klab.caltech.edu
|
||||
Charles Lopes Charles.Lopes@infm.ulst.ac.uk
|
||||
Charles M. Hannum mycroft@gnu.org
|
||||
Chip Salzenberg tct!chip
|
||||
Chris Arthur csa@gnu.org
|
||||
Chris F.M. Verberne verberne@prl.philips.nl
|
||||
Chris G. Demetriou cgd@sun-lamp.cs.berkeley.edu
|
||||
Chris Hopps sycom.mi.org!ro-chp!chopps
|
||||
Chris Metcalf metcalf@catfish.lcs.mit.edu
|
||||
Chris Ransom chris@quests.com
|
||||
Christian Callsen Christian.Callsen@eng.sun.com
|
||||
Christian Kirsch ck@held.mind.de
|
||||
Christian Laubscher christian.laubscher@tiscalinet.ch
|
||||
Christian T. Dum ctd@mpe-garching.mpg.de
|
||||
Christian von Roques roques@pond.sub.org
|
||||
Christoph Litauer litauer@mailhost.uni-koblenz.de
|
||||
Christophe Colle colle@krtkg1.rug.ac.be
|
||||
Christophe Kalt Christophe.Kalt@kbcfp.com
|
||||
Christopher T. Johnson cjohnson@camelot.com
|
||||
Christopher Vickery vickery@ipc1.cs.qc.edu
|
||||
Claude Scarpelli claude@genethon.fr
|
||||
Claus Heine Claus_Heine@ac2.maus.de
|
||||
Cliff Krumvieda cliff@cs.cornell.edu
|
||||
Clinton Carr clint@netcom.com
|
||||
Conrad Hughes chughes@maths.tcd.ie
|
||||
Constantin Belous const@cris.net
|
||||
Coranth Gryphon gryphon@bur.visidyne.com
|
||||
Dale R. Worley worley@world.std.com
|
||||
Dale Wiles wiles@geordi.calspan.com
|
||||
Dan Bloch dan@transarc.com
|
||||
Dan Reish dreish@izzy.net
|
||||
Daniel Hagerty hag@gnu.org
|
||||
Daniel Quinlan quinlan@pathname.com
|
||||
Daniel R. Guilderson d.guilderson@ma30.bull.com
|
||||
Daniel S. Barclay daniel@compass-da.com
|
||||
Daniel Trinkle trinkle@cs.purdue.edu
|
||||
Danny R. Johnston danny@cs.weber.edu
|
||||
Dave Barr barr@math.psu.edu
|
||||
Dave Gentzel gentzel@nova.enet.dec.com
|
||||
Dave Gregorich dtg@ipac.caltech.edu
|
||||
David Brown davidb@davidb.org
|
||||
David J. MacKenzie djm@uunet.uu.net
|
||||
David Johnson David.W.Johnson@colorado.edu
|
||||
David K. Drum ccdavid@mizzou1.missouri.edu
|
||||
David Lawyer david.lawyer@patchbay.com
|
||||
David Lemson lemson@uiuc.edu
|
||||
David Mansfield david@cobite.com
|
||||
David Martin dmartin@lerc.nasa.gov
|
||||
David N. Brown dbrown@lorien.physics.louisville.edu
|
||||
David Nugent davidn@blaze.net.au
|
||||
David Shaw david.shaw@alcatel.com.au
|
||||
David Steiner dsteiner@ispa.uni-osnabrueck.de
|
||||
David Taylor taylor@think.com
|
||||
Dean Gaudet dgaudet@watdragon.uwaterloo.ca
|
||||
Demizu Noritoshi nori-d@is.aist-nara.ac.jp
|
||||
Denis Fortin fortin@acm.org
|
||||
Dennis Pixton dennis@math.binghamton.edu
|
||||
Dick Streefland dicks@tasking.nl
|
||||
Dietmar Braun dietmar@highway.bertelsmann.de
|
||||
Dimitri Bougoulias opus@hol.gr
|
||||
Dimitris Fousekis dfousek@leon.nrcps.ariadne-t.gr
|
||||
Dirk Herr-Hoyman hoymand@gate.net
|
||||
Don Bennett dpb@netcom.com
|
||||
Donald B Gordon dbgordon@gnu.org
|
||||
Donald H. Locker dhl@spuf1d83.lcp.chrysler.com
|
||||
Douglas Scott doug@foxtrot.ccmrc.ucsb.edu
|
||||
Drew Sullivan drew@sni.ca
|
||||
Drew Trieger trieger@woodstock.abbott.com
|
||||
Dunstan Vavasour dev@cegelecproj.co.uk
|
||||
Ed Childs echilds@bgs.com
|
||||
Edgar Taube et@immd8.informatik.uni-erlangen.de
|
||||
Eduardo Kortright eduardo@cs.ua.edu
|
||||
Eduardo V. de Rivas eddie@asterion.com
|
||||
Edward Welbourne eddy@gen.cam.ac.uk
|
||||
Elmar Heeb heeb@itp.ethz.ch
|
||||
Elmer Fittery elmerf@ptw.com
|
||||
Eric Backus ericb@lsid.hp.com
|
||||
Eric Benson eb@amazon.com
|
||||
Eric Blake ebb9@byu.net
|
||||
Eric M. Boehm Eric.M.Boehm@optimumtech.com
|
||||
Eric Norum eric@ee.ualberta.ca
|
||||
Erich Stefan Boleyn erich@uruk.org
|
||||
Erick Branderhorst branderh@debian.iaehv.nl
|
||||
Erik D. Frederick edf@deckard.mc.duke.edu
|
||||
Esa Karell karell@cs.helsinki.fi
|
||||
Ezra Peisach epeisach@mit.edu
|
||||
Fabio d'Alessi cars@civ.bio.unipd.it
|
||||
Frank Heckenbach frank@g-n-u.de
|
||||
Frank Koenen koenfr@lidp.com
|
||||
Franz-Werner Gergen gergen@edvulx.mpi-stuttgart.mpg.de
|
||||
François Pinard pinard@iro.umontreal.ca
|
||||
Fritz Elfert fritz@fsun.triltsch.de
|
||||
George Chyu gschyu@ccgate.dp.beckman.com
|
||||
Gerben Wierda gerben@rna.indiv.nluug.nl
|
||||
Gerd Knorr kraxel@cs.tu-berlin.de
|
||||
Gerhard Poul gpoul@gnu.org
|
||||
Giorgio Signorini signo@chim.unifi.it
|
||||
Graham Whitted gbw@sgrail.com
|
||||
Grant McDorman grant@isgtec.com
|
||||
Greg Black gjb@gba.oz.au
|
||||
Greg Chung gchung@caip.rutgers.edu
|
||||
Greg Hudson ghudson@mit.edu
|
||||
Greg Maples greg@clari.net
|
||||
Greg McGary gkm@cstone.net
|
||||
Greg Schafer gschafer@zip.com.au
|
||||
Göran Uddeborg gvran@uddeborg.pp.se
|
||||
Gürkan Karaman karaman@dssgmbh.de
|
||||
Hans Guerth 100664.3101@compuserve.com
|
||||
Hansjörg Lipp hjlipp@web.de
|
||||
Harald König koenig@tat.physik.uni-tuebingen.de
|
||||
Harald Milz hm@seneca.ix.de
|
||||
Heiko Schinke mdqac@biochemtech.uni-halle.de
|
||||
Heiko Schlichting heiko@fu-berlin.de
|
||||
Helmut Waitzmann Helmut.Waitzmann@web.de
|
||||
Henrik Bakman hb@csd.uu.se
|
||||
Hernan Prieto Schmidt hernan@pea.usp.br
|
||||
Hiroyuki Bessho bsh@grotto.iijnet.or.jp
|
||||
Holger Teutsch holger@hotbso.rhein-main.de
|
||||
Hugh Secker-Walker hugh@ear.mit.edu
|
||||
Hunyue Yau hunyue.yau@picksys.com
|
||||
Ian Jackson ijackson@gnu.org
|
||||
Ian Lance Taylor ian@cygnus.com
|
||||
Ian T. Zimmerman itz@crl.com
|
||||
Ian Turner ian@zmanda.com
|
||||
Indra Singhal indra@synoptics.com
|
||||
J. Dean Brock brock@cs.unca.edu
|
||||
J.J. Bailey jjb@jagware.bcc.com
|
||||
J.T. Conklin jtc@cygnus.com
|
||||
James Crawford Ralston qralston+@pitt.edu
|
||||
James E. Carpenter jimc@zach1.tiac.net
|
||||
James H Caldwell Jr caldwell@cs.fsu.edu
|
||||
James Stevens James.Stevens@jrcs.co.uk
|
||||
James V. DI Toro III karrde@gats.hampton.va.us
|
||||
James W. McKelvey mckelvey@fafnir.com
|
||||
Jamie Zawinski jwz@lucid.com
|
||||
Jan Carlson janc@sni.ca
|
||||
Jan Djarv jan.djarv@mbox200.swipnet.se
|
||||
Janice Burton r06a165@bcc25.kodak.com
|
||||
Janne Snabb snabb@niksula.hut.fi
|
||||
Jason R. Mastaler jason@webmaster.net
|
||||
Jason Armistead Jason.Armistead@otis.com
|
||||
Jay Fenlason hack@gnu.org
|
||||
Jean-Michel Soenen soenen@lectra.fr
|
||||
Jean-Ph. Martin-Flatin syj@ecmwf.int
|
||||
Jean-loup Gailly jloup@chorus.fr
|
||||
Jeff Moskow jeff@rtr.com
|
||||
Jeff Prothero jsp@betz.biostr.washington.edu
|
||||
Jeff Siegel js@hornet.att.com
|
||||
Jeff Sorensen sorenj@alumni.rpi.edu
|
||||
Jeffrey Goldberg J.Goldberg@cranfield.ac.uk
|
||||
Jeffrey Mark Siskind Qobi@emba.uvm.edu
|
||||
Jeffrey W. Parker jwpkr@mcs.com
|
||||
Jens Henrik Jensen recjhl@mediator.uni-c.dk
|
||||
Jim Blandy jimb@totoro.cs.oberlin.edu
|
||||
Jim Clausing jac@postbox.acs.ohio-state.edu
|
||||
Jim Farrell jwf@platinum.com
|
||||
Jim Meyering meyering@na-net.ornl.gov
|
||||
Jim Murray jjm@jjm.com
|
||||
Joachim Holzfuss Joachim.Holzfuss@iap.physik.th-darmstadt.de
|
||||
Joachim Seelig joachim@kruemel.han.de
|
||||
Joe DeBattista joed@itsa.ucsf.edu
|
||||
Johan Vromans jvromans@squirrel.nl
|
||||
Johannes Helander jvh@cs.hut.fi
|
||||
John Clark jclark@gray.cscwc.pima.edu
|
||||
John D. Sybalsky John_D._Sybalsky.MV@envos.xerox.com
|
||||
John David Anglin dave@hiauly1.hia.nrc.ca
|
||||
John Gilmore gnu@toad.com
|
||||
John J. Szetela johns@angelo.amd.com
|
||||
John L. Chmielewski jlc@attmail.com
|
||||
John L. Males jlmales@yahoo.com
|
||||
John Oleynick juo@klinzhai.rutgers.edu
|
||||
John R. Vanderpool fish@daacdev1.stx.com
|
||||
John Rouillard rouilj@cs.umb.edu
|
||||
John Thomas McDole john.thomas.mcdole@nagra.com
|
||||
Jon Lewis jlewis@inorganic5.fdt.net
|
||||
Jonathan I. Kamens jik@cam.ov.com
|
||||
Jonathan N. Sherman sysjns@etacrs1.safb.af.mil
|
||||
Jonathan Thornburg thornbur@theory.physics.ubc.ca
|
||||
Josef Bauer Josef.Bauer@mchp.siemens.de
|
||||
Joseph E. Sacco jsacco@ssl.com
|
||||
Joshua R. Poulson jrp@plaza.ds.adp.com
|
||||
Joutsiniemi Tommi Il tj75064@cs.tut.fi
|
||||
Joy Kendall jak8@world.std.com
|
||||
Judy Ricker jricker@gdstech.grumman.com
|
||||
Juha Sarlin juha@tds.kth.se
|
||||
Jurgen Botz jbotz@orixa.mtholyoke.edu
|
||||
Jyh-Shyang Wang erik@vsp.ee.nctu.edu.tw
|
||||
Jörg Schilling schilling@fokus.fraunhofer.de
|
||||
Jörg Weule weule@cs.uni-duesseldorf.de
|
||||
Jörg Weilbier gnu@weilbier.net
|
||||
Jörgen Hågg Jorgen.Hagg@axis.se
|
||||
Jörgen Weigert jw@suse.de
|
||||
Jürgen Lüters jlueters@t-online.de
|
||||
Jürgen Reiss reiss@psychologie.uni-wuerzburg.de
|
||||
Kai Petzke wpp@marie.physik.tu-berlin.de
|
||||
Kai Schlichting kai@computel.com
|
||||
Karl Berry karl@cs.umb.edu
|
||||
Karl Heuer kwzh@gnu.org
|
||||
Karl Vogel vogelke@c-17igp.wpafb.af.mil
|
||||
Karlos Z. Smith kazen@viptx.net
|
||||
Karsten Thygesen karthy@kom.auc.dk
|
||||
Kaveh R. Ghazi ghazi@caip.rutgers.edu
|
||||
Keith Young youngk@astro.ocis.temple.edu
|
||||
Kelly Stephens kstephen@holli.com
|
||||
Ken Raeburn raeburn@cygnus.com
|
||||
Ken Steube steube@sdsc.edu
|
||||
Kevin D Quitt drs@netcom.com
|
||||
Kevin Dalley kevin@aimnet.com
|
||||
Kimball Collins kpc@ptolemy.arc.nasa.gov
|
||||
Kimmy Posey kimmyd@bnr.ca
|
||||
Koji Kishi kis@rqa.sony.co.jp
|
||||
Konno Hiroharu konno@pac.co.jp
|
||||
Kurt Jaeger pi@lf.net
|
||||
Larry Creech lcreech@lonestar.rcclub.org
|
||||
Larry Schwimmer rosebud@cyclone.stanford.edu
|
||||
Laurent Caillat-Vallet caillat@noe.lyon.cemagref.fr
|
||||
Laurent Sainte-Marthe smarthe@genethon.fr
|
||||
Leland Lucius llucius@tiny.net
|
||||
Les Mikesell les@mcs.com
|
||||
Loren J. Rittle rittle@comm.mot.com
|
||||
Loïc Prylli Loic.Prylli@lip.ens-lyon.fr
|
||||
Luke Mewburn lukem@connect.com.au
|
||||
Machael Stone mstone@cs.loyola.edu
|
||||
Mads Martin Joergensen mmj@suse.de
|
||||
Manfred Weichel Manfred.Weichel@mch.sni.de
|
||||
Manuel Munier Manuel.Munier@loria.fr
|
||||
Marc Boucher marc@cam.org
|
||||
Marc Ewing marc@redhat.com
|
||||
Marcin Matuszewski marcin@frodo.nask.org.pl
|
||||
Marcus Daniels marcus@sysc.pdx.edu
|
||||
Mark Bynum bynum@cennas.nhmfl.gov
|
||||
Mark Clements mpc@mbsmm.com
|
||||
Mark Frost mfrost@ncd.com
|
||||
Mark Kollert Mark.Kollert@oi42.kwu.siemens.de
|
||||
Mark W. Eichin eichin@cygnus.com
|
||||
Markus Kuhn mskuhn@cip.informatik.uni-erlangen.de
|
||||
Martin Bellenberg sunsoft@ifm.uni-hamburg.de
|
||||
Martin Goik goik@HDM-Stuttgart.de
|
||||
Martin Mares mj@k332.feld.cvut.cz
|
||||
Martin Simmons ZYHYLCRMZPRP@spammotel.com
|
||||
Marty Leisner leisner@eso.mc.xerox.com
|
||||
Massimo Dal Zotto dz@cs.unitn.it
|
||||
Mats Lofkvist d87-mal@nada.kth.se
|
||||
Matt Power mhpower@mit.edu
|
||||
Matthew J. D'Errico doc@deathstar.lis.cch.com
|
||||
Matti Aarnio mea@utu.fi
|
||||
Max Hailperin max@nic.gac.edu
|
||||
Maxime Taksar mmt@redbrick.com
|
||||
Melissa O'Neill oneill@cs.sfu.ca
|
||||
Melissa Weisshaus melissa@gnu.org
|
||||
Michael Dietrich mdt@is.in-berlin.de
|
||||
Michael Ellis bosun@aquarius.seaoar.uvic.ca
|
||||
Michael Giddings giddings@whitewater.chem.wisc.edu
|
||||
Michael Hayes michaelh@poroporo.chch.cri.nz
|
||||
Michael Helm mike@fionn.lbl.gov
|
||||
Michael Holmes mholmes@lccinc.com
|
||||
Michael Kaufman mkaufman@netgsi.com
|
||||
Michael Kubik mkubik@qitgsdv1.telecom.com.au
|
||||
Michael Lin mlin@lynx.com
|
||||
Michael Maass michael.maass@bk.bosch.de
|
||||
Michael Meissner meissner@cygnus.com
|
||||
Michael P Urban urban@cobra.jpl.nasa.gov
|
||||
Michael Schmidt michael@muc.de
|
||||
Michael Schwingen m.schwingen@stochastik.rwth-aachen.de
|
||||
Michael Smolsky fnsiguc@astro.weizmann.ac.il
|
||||
Mike Muuss mike@brl.mil
|
||||
Mike Nolan nolan@lpl.arizona.edu
|
||||
Mike Rogers mike@demon.net
|
||||
Mike Silano silano@newton.cs.jhu.edu
|
||||
Mike Walker M.D.Walker@larc.nasa.gov
|
||||
Milan Hodoscek milan@kihp6.ki.si
|
||||
Minh Tran-Le tranle@intellicorp.com
|
||||
Mitsuaki Masuhara masuhara@mcprv.mec.mei.co.jp
|
||||
Nate Eldredge nate@cs.hmc.edu
|
||||
Neil Faulks neil@dcs.kcl.ac.uk
|
||||
Neil Jerram nj104@cus.cam.ac.uk
|
||||
Nelson H.F. Beebe beebe@math.utah.edu
|
||||
Nick Barron nikb@cix.compulink.co.uk
|
||||
Noah Friedman friedman@gnu.org
|
||||
Noel Cragg noel@red-bean.com
|
||||
Norbert Kiesel norbert@rwthi3.informatik.rwth-aachen.de
|
||||
Olaf Schlueter olaf@toppoint.de
|
||||
Olaf Wucknitz owucknitz@hs.uni-hamburg.de
|
||||
Oliver Trepte oliver@fysik4.kth.se
|
||||
Olivier Roussel roussel@lifl.fr
|
||||
Oswald P. Backus IV backus@lks.csi.com
|
||||
Pascal Meheut pascal@cnam.cnam.fr
|
||||
Patrick Fulconis fulco@sig.uvsq.fr
|
||||
Patrick Timmons timmons@electech.polymtl.ca
|
||||
Paul Eggert eggert@twinsun.com
|
||||
Paul Kanz paul@icx.com
|
||||
Paul Mitchell P.Mitchell@surrey.ac.uk
|
||||
Paul Nevai pali+@osu.edu
|
||||
Paul Nordstrom 100067.3532@compuserve.com
|
||||
Paul O'Connor oconnorp@ul.ie
|
||||
Paul Siddall pauls@postman.essex.ac.uk
|
||||
Peder Chr. Norgaard pcn@tbit.dk
|
||||
Pekka Janhunen Pekka.Janhunen@fmi.fi
|
||||
Per Bojsen pb@delta.dk
|
||||
Per Foreby perf@efd.lth.se
|
||||
Pete Geenhuizen peteg@beno.css.gov
|
||||
Peter Carah pete@looneytunes.com
|
||||
Peter Fox fox@gec-mi-at.co.uk
|
||||
Peter Kutschera peter@zditr1.arcs.ac.at
|
||||
Peter Seebach seebs@taniemarie.solon.com
|
||||
Phil Hands phil@hands.com
|
||||
Philippe Defert defert@cern.ch
|
||||
Piercarlo Grandi piercarl@sabi.demon.co.uk
|
||||
Pierce Cantrell cantrell@ee.tamu.edu
|
||||
R. Kent Dybvig dyb@cadence.bloomington.in.us
|
||||
R. Scott Butler butler@prism.es.dupont.com
|
||||
Rainer Orth ro@TechFak.Uni-Bielefeld.DE
|
||||
Ralf Wildenhues Ralf.Wildenhues@gmx.de
|
||||
Ralf S. Engelschall rse@engelschall.com
|
||||
Ralf Suckow suckow@contrib.de
|
||||
Ralph Corderoy ralph@inputplus.co.uk
|
||||
Ralph Schleicher rs@purple.ul.bawue.de
|
||||
Randy Bias randyb@edge.edge.net
|
||||
Ray Dassen jdassen@wi.leidenuniv.nl
|
||||
Reuben J. Ravago reuben@asti.dost.gov.ph
|
||||
Reuben Sumner rasumner@undergrad.math.uwaterloo.ca
|
||||
Ricardo Marek ricky@ornet.co.il
|
||||
Richard Deal deal@xi.cs.fsu.edu
|
||||
Richard J. Kettlewell rjk@greenend.org.uk
|
||||
Richard Lloyd R.K.Lloyd@csc.liv.ac.uk
|
||||
Richard O'Neill richard@nexus.vnus.bc.ca
|
||||
Richard Sims rbs@acs.bu.edu
|
||||
Richard Stallman rms@gnu.org
|
||||
Richard Westerik richardw@bssi.nl
|
||||
Rick Emerson rick@ssg.com
|
||||
Rob Parry rparry@hydrolab.arsusda.gov
|
||||
Robert Anthony Nader naderr@usa.net
|
||||
Robert Bernstein rocky@panix.com
|
||||
Robert E. Brown brown@bibliotech.com
|
||||
Robert Frey bobf@unix.advansys.com
|
||||
Robert Leslie rob@mars.org
|
||||
Robert Lipe robertl@arnet.com
|
||||
Robert McGraw mcgraw@sunspot.noao.edu
|
||||
Robert W. Kim robertwk@aixpdslib.seas.ucla.edu
|
||||
Robert Weiner robert@progplus.com
|
||||
Robert Weissenfels robert@hop.ping.de
|
||||
Rocky Giannini rocky@nova.umd.edu
|
||||
Rod Buchanan rod.buchanan@kratos.co.uk
|
||||
Rod Thompson rodt@synopsys.com
|
||||
Roderich Schupp roderich@syntec.m.eunet.de
|
||||
Rodney Brown RBrown@cocam.com.au
|
||||
Roland McGrath roland@gnu.org
|
||||
Roland Schemers III schemers@vela.acs.oakland.edu
|
||||
Rolf Niepraschk niepraschk@chbrb.berlin.ptb.de
|
||||
Roman Czyborra czyborra@cs.tu-berlin.de
|
||||
Roman Gollent roman@portal.stwing.upenn.edu
|
||||
Ron Guilmette rfg@netcom.com
|
||||
Roy Marantz marantz@nbcs.rutgers.edu
|
||||
Russ Evans e_gs18@ub.nmh.ac.uk
|
||||
Russell Cattelan cattelan@thebarn.com
|
||||
Ryutaro Susukita susukita@pn.scphys.kyoto-u.ac.jp
|
||||
Sakai Kiyotaka ksakai@netwk.ntt-at.co.jp
|
||||
Sam Richards sam@blueskyprod.com
|
||||
Santiago Vila Doncel sanvila@unex.es
|
||||
Sarah Quady squady@warp10.keck.hawaii.edu
|
||||
Saul Lubkin lubkin@cs.rochester.edu
|
||||
Scott Grosch garath@engin.umich.edu
|
||||
Scott Hunziker ksh@eskimo.com
|
||||
Scott J. Kramer sjk@graham.com
|
||||
Scott L. Burson gyro@zeta-soft.com
|
||||
Scott S. Bertilson scott@geom.umn.edu
|
||||
Serge Granik serge@euler.berkeley.edu
|
||||
Seth Robertson seth@ctr.columbia.edu
|
||||
Sherwood Botsford sherwood@space.ualberta.ca
|
||||
Simon Wright simon.j.wright@gecm.com
|
||||
Simon Wright simon@pogner.demon.co.uk
|
||||
Sisira Jayasinghe sisira.jayasinghe@sdrc.com
|
||||
Skip Montanaro skip@mojam.com http://www.musi-cal.com/~skip/
|
||||
Solar Designer solar@openwall.com
|
||||
Stefan Skoglund sp2stes1@ida.his.se
|
||||
Steffen Stempel stempel@ira.uka.de
|
||||
Stephen Gildea gildea@intouchsys.com
|
||||
Stephen J Bevan stephenb@harlequin.co.uk
|
||||
Stephen Saroff saroff@msc.edu
|
||||
Stuart Kemp skemp@bmc.com
|
||||
Stuart Poulin stuart@indsys.com
|
||||
Sven Verdoolaege skimo@breughel.ufsia.ac.be
|
||||
Sylvain Rougier un@grolier.fr
|
||||
Tarang Kumar Patel mombasa@ptolemy.arc.nasa.gov
|
||||
Ted Rule Ted_Rule@flextech.co.uk
|
||||
The King elvis@gnu.org
|
||||
Thomas metaf4@users.askja.de
|
||||
Thomas Bushnell n/BSG thomas@gnu.org
|
||||
Thomas Krebs krebs@faps.uni-erlangen.de
|
||||
Thomas König Thomas.Koenig@ciw.uni-karlsruhe.de
|
||||
Thomas M. Browder Jr. browder@use1.eglin.af.mil
|
||||
Thomas Priesner priesner@flo.sh.bosch.de
|
||||
Thomas Waas waas@echild.aiss.de
|
||||
Thorbjxrn Willoch willoch@oslo.sgp.slb.com
|
||||
Tilman Schmidt ts@gb1.sema.de
|
||||
Tim Bradshaw tfb@aiai.ed.ac.uk
|
||||
Tim Lashua tim@winternet.com
|
||||
Tim Magill tim@tct.com
|
||||
Tim P. Starrin noid@cyborg.larc.nasa.gov
|
||||
Tim Ramsey tar@ksu.ksu.edu
|
||||
Tim Rylance tkr@puffball.demon.co.uk
|
||||
Tim Towers tzt@uniplex.co.uk
|
||||
Timothy Fossum fossum@cs.uwp.edu
|
||||
Timothy J. Lee timlee@netcom.com
|
||||
Tito Flagella tito@di.unipi.it
|
||||
Todd Vierling tv@duh.org
|
||||
Tom Popovitch tpop@informix.com
|
||||
Tom Quinn trq@astro.washington.edu
|
||||
Tom Tromey tromey@drip.colorado.edu
|
||||
Tor Lillqvist tml@hemuli.tte.vtt.fi
|
||||
Torbjorn Granlund tege@sics.se
|
||||
Torkel Hasle torkel@bibsyst.no
|
||||
Toshiaki Nishi toshi@sss.osa.sharp.co.jp
|
||||
Travis L. Priest T.L.Priest@larc.nasa.gov
|
||||
Troy Rudolph rudtr01@cai.com
|
||||
Tsutomu Yamada tsutomu@sra.co.jp
|
||||
Ulrich Drepper drepper@gnu.org
|
||||
Van Snyder vsnyder@math.jpl.nasa.gov
|
||||
Vic Abell abe@cc.purdue.edu
|
||||
Victor J. Griswold vgris@aironet.com
|
||||
Ville Herva v@iki.fi
|
||||
Vince Del Vecchio vdelvecc@inmet.com
|
||||
W. Phillip Moore wpm@morgan.com
|
||||
Warner Losh imp@boulder.parcplace.com
|
||||
Warren Dodge warrend@sptekwv3.wv.tek.com
|
||||
Wayne Christopher wayne@icemcfd.com
|
||||
Werner Almesberger werner.almesberger@lrc.di.epfl.ch
|
||||
William Bader william@nscs.fast.net
|
||||
William J. Eaton wje@hoffman.rstnu.bcm.tmc.edu
|
||||
William Kucharski kucharsk@netcom.com
|
||||
Wojciech Polak polak@gnu.org
|
||||
Wolfgang Rupprecht wolfgang@wsrcc.com
|
||||
Wolfram Gloger Wolfram.Gloger@dent.med.uni-muenchen.de
|
||||
Wolfram Kleff bugreport@wkleff.intergenia.de
|
||||
Wolfram Wagner ww@mpi-sb.mpg.de
|
||||
Włodzimierz Jan Martin wjm@pg.gda.pl
|
||||
Yasushi Suzudo SGR00413@niftyserve.or.jp
|
||||
Yu-Min Liang min@taz.ho.att.com
|
||||
|
||||
|
||||
;;;; Local Variables:
|
||||
;;;; mode: Fundamental
|
||||
;;;; coding: utf-8
|
||||
;;;; End:
|
71
gnutar/TODO
Normal file
71
gnutar/TODO
Normal file
@ -0,0 +1,71 @@
|
||||
Suggestions for improving GNU tar.
|
||||
|
||||
* <45BEC0DB.8040903@unix-beratung.de>
|
||||
|
||||
* Incorporate fixes from major distributions, e.g., Debian GNU/Linux.
|
||||
|
||||
* Add support for restoring file time stamps to sub-second resolution,
|
||||
if the file system supports this.
|
||||
|
||||
* Add support for restoring the attributes of symbolic links, for
|
||||
OSes like FreeBSD that have the lutimes and lchmod functions.
|
||||
|
||||
* --append should bail out if the two archives are of different types.
|
||||
|
||||
* Add support for a 'pax' command that conforms to POSIX 1003.1-2001.
|
||||
This would unify paxutils with tar.
|
||||
|
||||
* Interoperate better with Joerg Schilling's star implementation.
|
||||
|
||||
* Add an option to remove files that compare successfully.
|
||||
|
||||
From: Roesinger Eric <ROESINGE@tce.com>
|
||||
Date: Sat, 28 Jul 2001 18:43:43 -0500
|
||||
|
||||
It would be useful to be able to use '--remove-files' with '--diff',
|
||||
to remove all files that compare successfully, when verifying a backup.
|
||||
|
||||
* Add tests for the new functonality.
|
||||
|
||||
* Consider this:
|
||||
|
||||
From: Dennis Pund
|
||||
Subject: TAR suggestion...
|
||||
Date: Wed, 1 May 2002 18:26:36 -0500 (EST)
|
||||
|
||||
What I would like to do is:
|
||||
|
||||
foo my.tar.gz | tar -xzOf - | tar -cMf - -L 650000 - | bar
|
||||
|
||||
where 'foo' is a program that retrieves the archive and streams it
|
||||
to stdout and bar is a program that streams the stdin to CDR.
|
||||
|
||||
(http://mail.gnu.org/archive/html/bug-gnu-utils/2002-05/msg00022.html)
|
||||
|
||||
|
||||
* Copyright notice
|
||||
|
||||
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU tar.
|
||||
|
||||
GNU tar is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU tar 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 Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
|
||||
Local variables:
|
||||
mode: outline
|
||||
paragraph-separate: "[ ]*$"
|
||||
end:
|
1100
gnutar/aclocal.m4
vendored
Normal file
1100
gnutar/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1516
gnutar/build-aux/config.guess
vendored
Executable file
1516
gnutar/build-aux/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
614
gnutar/build-aux/config.rpath
Executable file
614
gnutar/build-aux/config.rpath
Executable file
@ -0,0 +1,614 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2006 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# Known limitations:
|
||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||
# known workaround is to choose shorter directory names for the build
|
||||
# directory and/or the installation directory.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shrext=.so
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
# Code taken from libtool.m4's _LT_CC_BASENAME.
|
||||
|
||||
for cc_temp in $CC""; do
|
||||
case $cc_temp in
|
||||
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
|
||||
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
|
||||
\-*) ;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
darwin*)
|
||||
case $cc_basename in
|
||||
xlc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | pw32* | os2*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
linux*)
|
||||
case $cc_basename in
|
||||
icc* | ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
pgcc | pgf77 | pgf90)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
*Sun\ C*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
unicos*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
# Set some defaults for GNU ld with shared library support. These
|
||||
# are reset later if shared libraries are not supported. Putting them
|
||||
# here allows them to be overridden if necessary.
|
||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||
# option of GNU ld is called -rpath, not --rpath.
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
# On AIX/PPC, the GNU linker is very broken
|
||||
if test "$host_cpu" != ia64; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we cannot use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
interix3*)
|
||||
hardcode_direct=no
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
linux*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
solaris*)
|
||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
|
||||
case `$LD -v 2>&1` in
|
||||
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = no; then
|
||||
hardcode_libdir_flag_spec=
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
hardcode_direct=yes
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||
echo 'int main () { return 0; }' > conftest.c
|
||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
fi
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath="/usr/lib:/lib"
|
||||
fi
|
||||
rm -f conftest.c conftest
|
||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=no
|
||||
if test "$GCC" = yes ; then
|
||||
:
|
||||
else
|
||||
case $cc_basename in
|
||||
xlc*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd* | kfreebsd*-gnu | dragonfly*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
hpux10*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
fi
|
||||
;;
|
||||
hpux11*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
*)
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
case $host_vendor in
|
||||
sni)
|
||||
hardcode_direct=yes # is this really true???
|
||||
;;
|
||||
siemens)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
motorola)
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6*)
|
||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
|
||||
hardcode_libdir_separator=':'
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
|
||||
libname_spec='lib$name'
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
;;
|
||||
amigaos*)
|
||||
;;
|
||||
beos*)
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
shrext=.dll
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shrext=.dylib
|
||||
;;
|
||||
dgux*)
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
kfreebsd*-gnu)
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
;;
|
||||
gnu*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
shrext=.so
|
||||
;;
|
||||
hppa*64*)
|
||||
shrext=.sl
|
||||
;;
|
||||
*)
|
||||
shrext=.sl
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
interix3*)
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
case "$host_os" in
|
||||
irix5* | nonstopux*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*oldld* | linux*aout* | linux*coff*)
|
||||
;;
|
||||
linux*)
|
||||
;;
|
||||
knetbsd*-gnu)
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
nto-qnx*)
|
||||
;;
|
||||
openbsd*)
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shrext=.dll
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
;;
|
||||
solaris*)
|
||||
;;
|
||||
sunos4*)
|
||||
;;
|
||||
sysv4 | sysv4.3*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
EOF
|
1626
gnutar/build-aux/config.sub
vendored
Executable file
1626
gnutar/build-aux/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
589
gnutar/build-aux/depcomp
Executable file
589
gnutar/build-aux/depcomp
Executable file
@ -0,0 +1,589 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2007-03-29.01
|
||||
|
||||
# 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
|
||||
# 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.
|
||||
|
||||
# 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 Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# 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.
|
||||
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 $stat -eq 0; then :
|
||||
else
|
||||
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
|
||||
# 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,^.*\.[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
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
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.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
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
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
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
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
519
gnutar/build-aux/install-sh
Executable file
519
gnutar/build-aux/install-sh
Executable file
@ -0,0 +1,519 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
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
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
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-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
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_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--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 CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
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 "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) 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: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# 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"; } &&
|
||||
|
||||
# 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
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
205
gnutar/build-aux/mdate-sh
Executable file
205
gnutar/build-aux/mdate-sh
Executable file
@ -0,0 +1,205 @@
|
||||
#!/bin/sh
|
||||
# Get modification time of a file or directory and pretty-print it.
|
||||
|
||||
scriptversion=2007-03-30.02
|
||||
|
||||
# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software
|
||||
# Foundation, Inc.
|
||||
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
|
||||
#
|
||||
# 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.
|
||||
|
||||
# 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.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No file. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: mdate-sh [--help] [--version] FILE
|
||||
|
||||
Pretty-print the modification time of FILE.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "mdate-sh $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Prevent date giving response in another language.
|
||||
LANG=C
|
||||
export LANG
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
LC_TIME=C
|
||||
export LC_TIME
|
||||
|
||||
# GNU ls changes its time format in response to the TIME_STYLE
|
||||
# variable. Since we cannot assume `unset' works, revert this
|
||||
# variable to its documented default.
|
||||
if test "${TIME_STYLE+set}" = set; then
|
||||
TIME_STYLE=posix-long-iso
|
||||
export TIME_STYLE
|
||||
fi
|
||||
|
||||
save_arg1=$1
|
||||
|
||||
# Find out how to get the extended ls output of a file or directory.
|
||||
if ls -L /dev/null 1>/dev/null 2>&1; then
|
||||
ls_command='ls -L -l -d'
|
||||
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
|
||||
# This differs from Unix, which adds ownership information.
|
||||
# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
|
||||
#
|
||||
# To find the date, we split the line on spaces and iterate on words
|
||||
# until we find a month. This cannot work with files whose owner is a
|
||||
# user named `Jan', or `Feb', etc. However, it's unlikely that `/'
|
||||
# will be owned by a user whose name is a month. So we first look at
|
||||
# the extended ls output of the root directory to decide how many
|
||||
# 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_command /`
|
||||
|
||||
# Find which argument is the month.
|
||||
month=
|
||||
command=
|
||||
until test $month
|
||||
do
|
||||
shift
|
||||
# Add another shift to the command.
|
||||
command="$command shift;"
|
||||
case $1 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Get the extended ls output of the file or directory.
|
||||
set dummy x`eval "$ls_command \"\$save_arg1\""`
|
||||
|
||||
# Remove all preceding arguments
|
||||
eval $command
|
||||
|
||||
# Because of the dummy argument above, month is in $2.
|
||||
#
|
||||
# On a POSIX system, we should have
|
||||
#
|
||||
# $# = 5
|
||||
# $1 = file size
|
||||
# $2 = month
|
||||
# $3 = day
|
||||
# $4 = year or time
|
||||
# $5 = filename
|
||||
#
|
||||
# On Darwin 7.7.0 and 7.6.0, we have
|
||||
#
|
||||
# $# = 4
|
||||
# $1 = day
|
||||
# $2 = month
|
||||
# $3 = year or time
|
||||
# $4 = filename
|
||||
|
||||
# Get the month.
|
||||
case $2 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
|
||||
case $3 in
|
||||
???*) day=$1;;
|
||||
*) day=$3; shift;;
|
||||
esac
|
||||
|
||||
# Here we have to deal with the problem that the ls output gives either
|
||||
# the time of day or the year.
|
||||
case $3 in
|
||||
*:*) set `date`; eval year=\$$#
|
||||
case $2 in
|
||||
Jan) nummonthtod=1;;
|
||||
Feb) nummonthtod=2;;
|
||||
Mar) nummonthtod=3;;
|
||||
Apr) nummonthtod=4;;
|
||||
May) nummonthtod=5;;
|
||||
Jun) nummonthtod=6;;
|
||||
Jul) nummonthtod=7;;
|
||||
Aug) nummonthtod=8;;
|
||||
Sep) nummonthtod=9;;
|
||||
Oct) nummonthtod=10;;
|
||||
Nov) nummonthtod=11;;
|
||||
Dec) nummonthtod=12;;
|
||||
esac
|
||||
# For the first six month of the year the time notation can also
|
||||
# be used for files modified in the last year.
|
||||
if (expr $nummonth \> $nummonthtod) > /dev/null;
|
||||
then
|
||||
year=`expr $year - 1`
|
||||
fi;;
|
||||
*) year=$3;;
|
||||
esac
|
||||
|
||||
# The result.
|
||||
echo $day $month $year
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
367
gnutar/build-aux/missing
Executable file
367
gnutar/build-aux/missing
Executable file
@ -0,0 +1,367 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2006-05-10.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# 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.
|
||||
|
||||
# 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.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case $1 in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $1 in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
161
gnutar/build-aux/mkinstalldirs
Executable file
161
gnutar/build-aux/mkinstalldirs
Executable file
@ -0,0 +1,161 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
|
||||
scriptversion=2006-05-11.19
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain.
|
||||
#
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
errstatus=0
|
||||
dirmode=
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||
|
||||
Create each directory DIR (with mode MODE, if specified), including all
|
||||
leading file name components.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage"
|
||||
exit $?
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
||||
# mkdir -p a/c at the same time, both will detect that a is missing,
|
||||
# one will create a, then the other will try to create a and die with
|
||||
# a "File exists" error. This is a problem when calling mkinstalldirs
|
||||
# from a parallel make. We use --version in the probe to restrict
|
||||
# ourselves to GNU mkdir, which is thread-safe.
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# exists.
|
||||
test -d ./-p && rmdir ./-p
|
||||
test -d ./--version && rmdir ./--version
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||
test ! -d ./--version; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
else
|
||||
# Clean up after NextStep and OpenStep mkdir.
|
||||
for d in ./-m ./-p ./--version "./$dirmode";
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
case $file in
|
||||
/*) pathcomp=/ ;;
|
||||
*) pathcomp= ;;
|
||||
esac
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set fnord $file
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
for d
|
||||
do
|
||||
test "x$d" = x && continue
|
||||
|
||||
pathcomp=$pathcomp$d
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
8641
gnutar/build-aux/texinfo.tex
Normal file
8641
gnutar/build-aux/texinfo.tex
Normal file
File diff suppressed because it is too large
Load Diff
223
gnutar/build-aux/ylwrap
Executable file
223
gnutar/build-aux/ylwrap
Executable file
@ -0,0 +1,223 @@
|
||||
#! /bin/sh
|
||||
# ylwrap - wrapper for lex/yacc invocations.
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# 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.
|
||||
|
||||
# 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.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case "$1" in
|
||||
'')
|
||||
echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
--basedir)
|
||||
basedir=$2
|
||||
shift 2
|
||||
;;
|
||||
-h|--h*)
|
||||
cat <<\EOF
|
||||
Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
|
||||
|
||||
Wrapper for lex/yacc invocations, renaming files as desired.
|
||||
|
||||
INPUT is the input file
|
||||
OUTPUT is one file PROG generates
|
||||
DESIRED is the file we actually want instead of OUTPUT
|
||||
PROGRAM is program to run
|
||||
ARGS are passed to PROG
|
||||
|
||||
Any number of OUTPUT,DESIRED pairs may be used.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v|--v*)
|
||||
echo "ylwrap $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# The input.
|
||||
input="$1"
|
||||
shift
|
||||
case "$input" in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
# Absolute path; do nothing.
|
||||
;;
|
||||
*)
|
||||
# Relative path. Make it absolute.
|
||||
input="`pwd`/$input"
|
||||
;;
|
||||
esac
|
||||
|
||||
pairlist=
|
||||
while test "$#" -ne 0; do
|
||||
if test "$1" = "--"; then
|
||||
shift
|
||||
break
|
||||
fi
|
||||
pairlist="$pairlist $1"
|
||||
shift
|
||||
done
|
||||
|
||||
# The program to run.
|
||||
prog="$1"
|
||||
shift
|
||||
# Make any relative path in $prog absolute.
|
||||
case "$prog" in
|
||||
[\\/]* | ?:[\\/]*) ;;
|
||||
*[\\/]*) prog="`pwd`/$prog" ;;
|
||||
esac
|
||||
|
||||
# FIXME: add hostname here for parallel makes that run commands on
|
||||
# other machines. But that might take us over the 14-char limit.
|
||||
dirname=ylwrap$$
|
||||
trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
|
||||
mkdir $dirname || exit 1
|
||||
|
||||
cd $dirname
|
||||
|
||||
case $# in
|
||||
0) $prog "$input" ;;
|
||||
*) $prog "$@" "$input" ;;
|
||||
esac
|
||||
ret=$?
|
||||
|
||||
if test $ret -eq 0; then
|
||||
set X $pairlist
|
||||
shift
|
||||
first=yes
|
||||
# Since DOS filename conventions don't allow two dots,
|
||||
# the DOS version of Bison writes out y_tab.c instead of y.tab.c
|
||||
# and y_tab.h instead of y.tab.h. Test to see if this is the case.
|
||||
y_tab_nodot="no"
|
||||
if test -f y_tab.c || test -f y_tab.h; then
|
||||
y_tab_nodot="yes"
|
||||
fi
|
||||
|
||||
# The directory holding the input.
|
||||
input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
|
||||
# Quote $INPUT_DIR so we can use it in a regexp.
|
||||
# FIXME: really we should care about more than `.' and `\'.
|
||||
input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
|
||||
|
||||
while test "$#" -ne 0; do
|
||||
from="$1"
|
||||
# Handle y_tab.c and y_tab.h output by DOS
|
||||
if test $y_tab_nodot = "yes"; then
|
||||
if test $from = "y.tab.c"; then
|
||||
from="y_tab.c"
|
||||
else
|
||||
if test $from = "y.tab.h"; then
|
||||
from="y_tab.h"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test -f "$from"; then
|
||||
# If $2 is an absolute path name, then just use that,
|
||||
# otherwise prepend `../'.
|
||||
case "$2" in
|
||||
[\\/]* | ?:[\\/]*) target="$2";;
|
||||
*) target="../$2";;
|
||||
esac
|
||||
|
||||
# We do not want to overwrite a header file if it hasn't
|
||||
# changed. This avoid useless recompilations. However the
|
||||
# parser itself (the first file) should always be updated,
|
||||
# because it is the destination of the .y.c rule in the
|
||||
# Makefile. Divert the output of all other files to a temporary
|
||||
# file so we can compare them to existing versions.
|
||||
if test $first = no; then
|
||||
realtarget="$target"
|
||||
target="tmp-`echo $target | sed s/.*[\\/]//g`"
|
||||
fi
|
||||
# Edit out `#line' or `#' directives.
|
||||
#
|
||||
# We don't want the resulting debug information to point at
|
||||
# an absolute srcdir; it is better for it to just mention the
|
||||
# .y file with no path.
|
||||
#
|
||||
# We want to use the real output file name, not yy.lex.c for
|
||||
# instance.
|
||||
#
|
||||
# We want the include guards to be adjusted too.
|
||||
FROM=`echo "$from" | sed \
|
||||
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
|
||||
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
|
||||
TARGET=`echo "$2" | sed \
|
||||
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
|
||||
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
|
||||
|
||||
sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
|
||||
-e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
|
||||
|
||||
# Check whether header files must be updated.
|
||||
if test $first = no; then
|
||||
if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
|
||||
echo "$2" is unchanged
|
||||
rm -f "$target"
|
||||
else
|
||||
echo updating "$2"
|
||||
mv -f "$target" "$realtarget"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# A missing file is only an error for the first file. This
|
||||
# is a blatant hack to let us support using "yacc -d". If -d
|
||||
# is not specified, we don't want an error when the header
|
||||
# file is "missing".
|
||||
if test $first = yes; then
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
shift
|
||||
shift
|
||||
first=no
|
||||
done
|
||||
else
|
||||
ret=$?
|
||||
fi
|
||||
|
||||
# Remove the directory.
|
||||
cd ..
|
||||
rm -rf $dirname
|
||||
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
1204
gnutar/config.hin
Normal file
1204
gnutar/config.hin
Normal file
File diff suppressed because it is too large
Load Diff
39556
gnutar/configure
vendored
Executable file
39556
gnutar/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
248
gnutar/configure.ac
Normal file
248
gnutar/configure.ac
Normal file
@ -0,0 +1,248 @@
|
||||
# Configure template for GNU tar.
|
||||
|
||||
# Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
# 2002, 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 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.
|
||||
|
||||
AC_INIT([GNU tar], [1.17], [bug-tar@gnu.org])
|
||||
AC_CONFIG_SRCDIR([src/tar.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_HEADERS([config.h:config.hin])
|
||||
AC_PREREQ([2.60])
|
||||
AM_INIT_AUTOMAKE([1.9 gnits tar-ustar dist-bzip2 dist-shar std-options])
|
||||
|
||||
AC_PROG_CC
|
||||
AC_EXEEXT
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_YACC
|
||||
gl_EARLY
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
AC_ISC_POSIX
|
||||
AC_C_INLINE
|
||||
|
||||
AC_CHECK_HEADERS_ONCE(fcntl.h linux/fd.h memory.h net/errno.h \
|
||||
sgtty.h string.h stropts.h \
|
||||
sys/param.h sys/device.h sys/filio.h sys/gentape.h \
|
||||
sys/inet.h sys/io/trioctl.h \
|
||||
sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \
|
||||
unistd.h locale.h)
|
||||
|
||||
AC_CHECK_HEADERS([sys/buf.h], [], [],
|
||||
[#if HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif])
|
||||
|
||||
AC_HEADER_SYS_WAIT
|
||||
AM_STDBOOL_H
|
||||
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_MAJOR
|
||||
AC_HEADER_STAT
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_MSG_CHECKING([for st_fstype string in struct stat])
|
||||
AC_CACHE_VAL(diff_cv_st_fstype_string,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/stat.h>], [struct stat s; s.st_fstype[0] = 'x';],
|
||||
diff_cv_st_fstype_string=yes,
|
||||
diff_cv_st_fstype_string=no)])
|
||||
AC_MSG_RESULT($diff_cv_st_fstype_string)
|
||||
if test $diff_cv_st_fstype_string = yes; then
|
||||
AC_DEFINE(HAVE_ST_FSTYPE_STRING, 1,
|
||||
[Define if struct stat has a char st_fstype[] member.])
|
||||
fi
|
||||
|
||||
AC_TYPE_SIGNAL
|
||||
AC_TYPE_MODE_T
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_UID_T
|
||||
AC_CHECK_TYPE(major_t, , AC_DEFINE(major_t, int,
|
||||
[Type of major device numbers.]))
|
||||
AC_CHECK_TYPE(minor_t, , AC_DEFINE(minor_t, int,
|
||||
[Type of minor device numbers.]))
|
||||
AC_CHECK_TYPE(dev_t, unsigned)
|
||||
AC_CHECK_TYPE(ino_t, unsigned)
|
||||
|
||||
gt_TYPE_SSIZE_T
|
||||
|
||||
# gnulib modules
|
||||
gl_INIT
|
||||
# paxutils modules
|
||||
tar_PAXUTILS
|
||||
|
||||
AC_CHECK_FUNCS(fsync getdtablesize lstat mkfifo readlink strerror symlink setlocale utimes)
|
||||
AC_CHECK_DECLS([getgrgid],,, [#include <grp.h>])
|
||||
AC_CHECK_DECLS([getpwuid],,, [#include <pwd.h>])
|
||||
AC_CHECK_DECLS([time],,, [#include <time.h>])
|
||||
|
||||
AC_REPLACE_FUNCS(waitpid)
|
||||
|
||||
AC_CACHE_CHECK(for remote shell, tar_cv_path_RSH,
|
||||
[if test -n "$RSH"; then
|
||||
tar_cv_path_RSH=$RSH
|
||||
else
|
||||
tar_cv_path_RSH=no
|
||||
for ac_file in /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh \
|
||||
/usr/bin/nsh /usr/bin/rcmd
|
||||
do
|
||||
# Prefer a non-symlink rsh to a symlink one, so that binaries built
|
||||
# on AIX 4.1.4, where /usr/ucb/rsh is a symlink to /usr/bin/rsh
|
||||
# will run on AIX 4.3.0, which has only /usr/bin/rsh.
|
||||
if test -f $ac_file; then
|
||||
if (test -h $ac_file) 2>/dev/null; then
|
||||
test $tar_cv_path_RSH = no && tar_cv_path_RSH=$ac_file
|
||||
else
|
||||
tar_cv_path_RSH=$ac_file
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
if test $tar_cv_path_RSH = no; then
|
||||
AC_CHECK_HEADERS(netdb.h)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(REMOTE_SHELL, "$tar_cv_path_RSH",
|
||||
[Define to the full path of your rsh, if any.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for default archive format)
|
||||
|
||||
AC_ARG_VAR([DEFAULT_ARCHIVE_FORMAT],
|
||||
[Set the default archive format. Allowed values are: V7, OLDGNU, USTAR, POSIX, GNU. Default is GNU])
|
||||
|
||||
if test -z "$DEFAULT_ARCHIVE_FORMAT"; then
|
||||
DEFAULT_ARCHIVE_FORMAT="GNU"
|
||||
fi
|
||||
case $DEFAULT_ARCHIVE_FORMAT in
|
||||
V7|OLDGNU|USTAR|POSIX|GNU) ;;
|
||||
*) AC_MSG_ERROR(Invalid format name);;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE_FORMAT, ${DEFAULT_ARCHIVE_FORMAT}_FORMAT,
|
||||
[By default produce archives of this format])
|
||||
AC_MSG_RESULT($DEFAULT_ARCHIVE_FORMAT)
|
||||
|
||||
AC_MSG_CHECKING(for default archive)
|
||||
|
||||
AC_ARG_VAR([DEFAULT_ARCHIVE],
|
||||
[Set the name of the default archive (default: -)])
|
||||
if test -z "$DEFAULT_ARCHIVE"; then
|
||||
DEFAULT_ARCHIVE=-
|
||||
else
|
||||
if test -z "`ls $DEFAULT_ARCHIVE 2>/dev/null`"; then
|
||||
AC_MSG_WARN(DEFAULT_ARCHIVE \`$DEFAULT_ARCHIVE' not found on this system)
|
||||
fi
|
||||
# FIXME: Look for DEFTAPE in <sys/mtio.h>.
|
||||
# FIXME: Let DEVICE_PREFIX be configured from the environment.
|
||||
# FIXME: Rearrange, here.
|
||||
case $DEFAULT_ARCHIVE in
|
||||
*[[0-7][lmh]])
|
||||
AC_DEFINE(DENSITY_LETTER, 1,
|
||||
[Define to 1 if density may be indicated by [lmh] at end of device.])
|
||||
device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/[0-7][lmh]$//'`
|
||||
;;
|
||||
*[[0-7]])
|
||||
device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/[0-7]$//'`
|
||||
;;
|
||||
*)
|
||||
device_prefix=
|
||||
;;
|
||||
esac
|
||||
case "$device_prefix" in
|
||||
?*)
|
||||
AC_DEFINE_UNQUOTED(DEVICE_PREFIX, "$device_prefix",
|
||||
[Define to a string giving the prefix of the default device, without the part specifying the unit and density.])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE, "$DEFAULT_ARCHIVE",
|
||||
[Define to a string giving the full name of the default archive file.])
|
||||
AC_MSG_RESULT($DEFAULT_ARCHIVE)
|
||||
|
||||
AC_ARG_VAR([DEFAULT_BLOCKING],
|
||||
[Define default blocking factor (default: 20)])
|
||||
AC_MSG_CHECKING(for default blocking)
|
||||
DEFAULT_BLOCKING=${DEFAULT_BLOCKING-20}
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_BLOCKING, $DEFAULT_BLOCKING,
|
||||
[Define to a number giving the default blocking size for archives.])
|
||||
AC_MSG_RESULT($DEFAULT_BLOCKING)
|
||||
|
||||
AC_MSG_CHECKING(for default quoting style)
|
||||
|
||||
m4_define([QUOTING_STYLES],dnl
|
||||
[literal|shell|shell-always|c|escape|locale|clocale])
|
||||
DEFAULT_QUOTING_STYLE="escape"
|
||||
AC_ARG_VAR([DEFAULT_QUOTING_STYLE],
|
||||
[Set the default quoting style. Allowed values are: ] m4_bpatsubst(QUOTING_STYLES,[|], [[, ]]) [. Default is "escape".])
|
||||
|
||||
case $DEFAULT_QUOTING_STYLE in
|
||||
QUOTING_STYLES) ;;
|
||||
*) AC_MSG_ERROR(Invalid quoting style);;
|
||||
esac
|
||||
AC_MSG_RESULT($DEFAULT_QUOTING_STYLE)
|
||||
DEFAULT_QUOTING_STYLE=`echo ${DEFAULT_QUOTING_STYLE}|sed 's/-/_/g'`_quoting_style
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_QUOTING_STYLE, $DEFAULT_QUOTING_STYLE,
|
||||
[Define to a default quoting style (see lib/quoteargs.c for the list)])
|
||||
|
||||
# Iconv
|
||||
AM_ICONV
|
||||
AC_CHECK_HEADERS(iconv.h)
|
||||
AC_CHECK_TYPE(iconv_t,:,
|
||||
AC_DEFINE(iconv_t, int,
|
||||
[Conversion descriptor type]),
|
||||
[
|
||||
#ifdef HAVE_ICONV_H
|
||||
# include <iconv.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
# Gettext.
|
||||
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
||||
AM_GNU_GETTEXT_VERSION([0.16])
|
||||
|
||||
# Initialize the test suite.
|
||||
AC_CONFIG_TESTDIR(tests)
|
||||
AC_CONFIG_FILES([tests/Makefile tests/atlocal]) # FIXME: tests/preset?
|
||||
AM_MISSING_PROG([AUTOM4TE], [autom4te])
|
||||
|
||||
AC_SUBST(BACKUP_LIBEXEC_SCRIPTS)
|
||||
AC_SUBST(BACKUP_SBIN_SCRIPTS)
|
||||
AC_ARG_ENABLE(backup-scripts,
|
||||
AC_HELP_STRING([--enable-backup-scripts],
|
||||
[Create and install backup and restore scripts]),
|
||||
[case $enableval in
|
||||
yes) BACKUP_LIBEXEC_SCRIPTS='$(BACKUP_LIBEXEC_SCRIPTS_LIST)'
|
||||
BACKUP_SBIN_SCRIPTS='$(BACKUP_SBIN_SCRIPTS_LIST)'
|
||||
;;
|
||||
esac])
|
||||
|
||||
AC_SUBST(BACKUP_SED_COND)
|
||||
if date +%Y-%m-%d 2>/dev/null >&2; then
|
||||
BACKUP_SED_COND='/^\#ELSE_DATE_FORMAT_OK/,/^\#ENDIF_DATE_FORMAT_OK/d;/^\#IF_DATE_FORMAT_OK/d'
|
||||
else
|
||||
BACKUP_SED_COND='/^\#IF_DATE_FORMAT_OK/,/^\#ELSE_DATE_FORMAT_OK/d;/^\#ENDIF_DATE_FORMAT_OK/d'
|
||||
fi
|
||||
|
||||
AC_OUTPUT([Makefile\
|
||||
doc/Makefile\
|
||||
lib/Makefile\
|
||||
po/Makefile.in\
|
||||
scripts/Makefile\
|
||||
rmt/Makefile\
|
||||
src/Makefile])
|
86
gnutar/doc/Makefile.am
Normal file
86
gnutar/doc/Makefile.am
Normal file
@ -0,0 +1,86 @@
|
||||
# Makefile for GNU tar documentation.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2006 Free
|
||||
# Software Foundation, Inc.
|
||||
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## 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.
|
||||
|
||||
info_TEXINFOS = tar.texi
|
||||
tar_TEXINFOS = \
|
||||
dumpdir.texi\
|
||||
fdl.texi\
|
||||
freemanuals.texi\
|
||||
genfile.texi\
|
||||
getdate.texi\
|
||||
header.texi\
|
||||
intern.texi\
|
||||
rendition.texi\
|
||||
snapshot.texi\
|
||||
sparse.texi\
|
||||
value.texi
|
||||
EXTRA_DIST = gendocs_template mastermenu.el texify.sed
|
||||
DISTCLEANFILES=*.info*
|
||||
|
||||
# The rendering level is anyone of PUBLISH, DISTRIB or PROOF.
|
||||
# Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
|
||||
RENDITION = DISTRIB
|
||||
|
||||
MAKEINFOFLAGS=-D$(RENDITION)
|
||||
|
||||
header.texi: $(top_srcdir)/src/tar.h
|
||||
sed -f $(srcdir)/texify.sed $(top_srcdir)/src/tar.h \
|
||||
| expand >$@
|
||||
|
||||
master-menu: $(tar_TEXINFOS)
|
||||
emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS)
|
||||
|
||||
check-options:
|
||||
@ARGP_HELP_FMT='usage-indent=0,short-opt-col=0,long-opt-col=0,\
|
||||
doc-opt-col=0,opt-doc-col=0,header-col=0,rmargin=1' \
|
||||
$(top_builddir)/src/tar --usage | \
|
||||
sed -n 's/^\[--\([^]\=\[]*\).*/\1/p' | sort | uniq > opts.$$$$;\
|
||||
$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
|
||||
$(info_TEXINFOS) | \
|
||||
sed -n '/^@macro/,/^@end macro/d;s/@opindex *\([^@,]*\).*/\1/p' \
|
||||
| sort | uniq > docs.$$$$;\
|
||||
(echo 'Not documented options:';\
|
||||
join -v1 opts.$$$$ docs.$$$$;\
|
||||
echo 'Non-existing options:';\
|
||||
join -v2 opts.$$$$ docs.$$$$) > report.$$$$;\
|
||||
rm opts.$$$$ docs.$$$$;\
|
||||
if [ -n "`sed '1,2d' report.$$$$`" ]; then \
|
||||
cat report.$$$$;\
|
||||
rm report.$$$$;\
|
||||
exit 1;\
|
||||
fi;\
|
||||
rm report.$$$$
|
||||
|
||||
|
||||
clean-local:
|
||||
rm -rf manual
|
||||
|
||||
GENDOCS=gendocs.sh
|
||||
|
||||
TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
|
||||
|
||||
# Make sure you set TEXINPUTS
|
||||
# Usual value is:
|
||||
# /usr/share/texmf/pdftex/plain/misc:/usr/share/texmf/pdftex/config
|
||||
manual:
|
||||
TEXINPUTS=$(srcdir):$(top_srcdir)/build-tex:$(TEXINPUTS) \
|
||||
MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
||||
TEXI2DVI="$(TEXI2DVI) -t @finalout" \
|
||||
$(GENDOCS) tar 'GNU tar manual'
|
||||
|
917
gnutar/doc/Makefile.in
Normal file
917
gnutar/doc/Makefile.in
Normal file
@ -0,0 +1,917 @@
|
||||
# Makefile.in generated by automake 1.10a from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Makefile for GNU tar documentation.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2006 Free
|
||||
# Software Foundation, Inc.
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/stamp-vti $(srcdir)/version.texi $(tar_TEXINFOS) \
|
||||
texinfo.tex
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
|
||||
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
|
||||
$(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/argp.m4 \
|
||||
$(top_srcdir)/m4/backupfile.m4 $(top_srcdir)/m4/bison.m4 \
|
||||
$(top_srcdir)/m4/canonicalize-lgpl.m4 \
|
||||
$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/chown.m4 \
|
||||
$(top_srcdir)/m4/clock_time.m4 \
|
||||
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/closeout.m4 \
|
||||
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/d-ino.m4 \
|
||||
$(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \
|
||||
$(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/double-slash-root.m4 \
|
||||
$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
|
||||
$(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
|
||||
$(top_srcdir)/m4/exclude.m4 $(top_srcdir)/m4/exitfail.m4 \
|
||||
$(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \
|
||||
$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl_h.m4 \
|
||||
$(top_srcdir)/m4/fileblocks.m4 $(top_srcdir)/m4/float_h.m4 \
|
||||
$(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
|
||||
$(top_srcdir)/m4/ftruncate.m4 \
|
||||
$(top_srcdir)/m4/getcwd-abort-bug.m4 \
|
||||
$(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
|
||||
$(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
|
||||
$(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getopt.m4 \
|
||||
$(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
|
||||
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
|
||||
$(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \
|
||||
$(top_srcdir)/m4/human.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||
$(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intmax_t.m4 \
|
||||
$(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/lchown.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
|
||||
$(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
|
||||
$(top_srcdir)/m4/mbscasecmp.m4 $(top_srcdir)/m4/mbstate_t.m4 \
|
||||
$(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \
|
||||
$(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/memset.m4 \
|
||||
$(top_srcdir)/m4/mkdtemp.m4 $(top_srcdir)/m4/mktime.m4 \
|
||||
$(top_srcdir)/m4/modechange.m4 $(top_srcdir)/m4/nls.m4 \
|
||||
$(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pathmax.m4 \
|
||||
$(top_srcdir)/m4/paxutils.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
|
||||
$(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \
|
||||
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rmdir.m4 \
|
||||
$(top_srcdir)/m4/rmt.m4 $(top_srcdir)/m4/rpmatch.m4 \
|
||||
$(top_srcdir)/m4/rtapelib.m4 $(top_srcdir)/m4/safe-read.m4 \
|
||||
$(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/save-cwd.m4 \
|
||||
$(top_srcdir)/m4/savedir.m4 $(top_srcdir)/m4/setenv.m4 \
|
||||
$(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/ssize_t.m4 \
|
||||
$(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stdarg.m4 \
|
||||
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
|
||||
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
|
||||
$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \
|
||||
$(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strchrnul.m4 \
|
||||
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
|
||||
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
|
||||
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strtoimax.m4 \
|
||||
$(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoll.m4 \
|
||||
$(top_srcdir)/m4/strtoul.m4 $(top_srcdir)/m4/strtoull.m4 \
|
||||
$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
|
||||
$(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \
|
||||
$(top_srcdir)/m4/system.m4 $(top_srcdir)/m4/tempname.m4 \
|
||||
$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
|
||||
$(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
|
||||
$(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
|
||||
$(top_srcdir)/m4/unlinkdir.m4 $(top_srcdir)/m4/unlocked-io.m4 \
|
||||
$(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utime.m4 \
|
||||
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
|
||||
$(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \
|
||||
$(top_srcdir)/m4/vsnprintf.m4 $(top_srcdir)/m4/wchar.m4 \
|
||||
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \
|
||||
$(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \
|
||||
$(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \
|
||||
$(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
INFO_DEPS = tar.info
|
||||
TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
|
||||
am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
|
||||
DVIS = tar.dvi
|
||||
PDFS = tar.pdf
|
||||
PSS = tar.ps
|
||||
HTMLS = tar.html
|
||||
TEXINFOS = tar.texi
|
||||
TEXI2PDF = $(TEXI2DVI) --pdf --batch
|
||||
MAKEINFOHTML = $(MAKEINFO) --html
|
||||
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
|
||||
DVIPS = dvips
|
||||
am__installdirs = "$(DESTDIR)$(infodir)"
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@
|
||||
ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@
|
||||
ABSOLUTE_FLOAT_H = @ABSOLUTE_FLOAT_H@
|
||||
ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@
|
||||
ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@
|
||||
ABSOLUTE_STDIO_H = @ABSOLUTE_STDIO_H@
|
||||
ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@
|
||||
ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
|
||||
ABSOLUTE_SYSEXITS_H = @ABSOLUTE_SYSEXITS_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@
|
||||
ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@
|
||||
ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BACKUP_LIBEXEC_SCRIPTS = @BACKUP_LIBEXEC_SCRIPTS@
|
||||
BACKUP_SBIN_SCRIPTS = @BACKUP_SBIN_SCRIPTS@
|
||||
BACKUP_SED_COND = @BACKUP_SED_COND@
|
||||
BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
|
||||
BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
|
||||
BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
|
||||
BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
|
||||
BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFAULT_ARCHIVE = @DEFAULT_ARCHIVE@
|
||||
DEFAULT_ARCHIVE_FORMAT = @DEFAULT_ARCHIVE_FORMAT@
|
||||
DEFAULT_BLOCKING = @DEFAULT_BLOCKING@
|
||||
DEFAULT_QUOTING_STYLE = @DEFAULT_QUOTING_STYLE@
|
||||
DEFAULT_RMT_COMMAND = @DEFAULT_RMT_COMMAND@
|
||||
DEFAULT_RMT_DIR = @DEFAULT_RMT_DIR@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DIRENT_H = @DIRENT_H@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EOVERFLOW = @EOVERFLOW@
|
||||
EXEEXT = @EXEEXT@
|
||||
FCNTL_H = @FCNTL_H@
|
||||
FLOAT_H = @FLOAT_H@
|
||||
FNMATCH_H = @FNMATCH_H@
|
||||
GETOPT_H = @GETOPT_H@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GNULIB_CHOWN = @GNULIB_CHOWN@
|
||||
GNULIB_DUP2 = @GNULIB_DUP2@
|
||||
GNULIB_FCHDIR = @GNULIB_FCHDIR@
|
||||
GNULIB_FFLUSH = @GNULIB_FFLUSH@
|
||||
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
|
||||
GNULIB_FSEEK = @GNULIB_FSEEK@
|
||||
GNULIB_FSEEKO = @GNULIB_FSEEKO@
|
||||
GNULIB_FTELL = @GNULIB_FTELL@
|
||||
GNULIB_FTELLO = @GNULIB_FTELLO@
|
||||
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
|
||||
GNULIB_GETCWD = @GNULIB_GETCWD@
|
||||
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
|
||||
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
|
||||
GNULIB_IMAXABS = @GNULIB_IMAXABS@
|
||||
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
|
||||
GNULIB_LSEEK = @GNULIB_LSEEK@
|
||||
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
|
||||
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
|
||||
GNULIB_MBSCHR = @GNULIB_MBSCHR@
|
||||
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
|
||||
GNULIB_MBSLEN = @GNULIB_MBSLEN@
|
||||
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
|
||||
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
|
||||
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
|
||||
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
|
||||
GNULIB_MBSSEP = @GNULIB_MBSSEP@
|
||||
GNULIB_MBSSPN = @GNULIB_MBSSPN@
|
||||
GNULIB_MBSSTR = @GNULIB_MBSSTR@
|
||||
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
|
||||
GNULIB_MEMMEM = @GNULIB_MEMMEM@
|
||||
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
|
||||
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
|
||||
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
|
||||
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
|
||||
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
|
||||
GNULIB_READLINK = @GNULIB_READLINK@
|
||||
GNULIB_SLEEP = @GNULIB_SLEEP@
|
||||
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
|
||||
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
|
||||
GNULIB_STPCPY = @GNULIB_STPCPY@
|
||||
GNULIB_STPNCPY = @GNULIB_STPNCPY@
|
||||
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
|
||||
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
|
||||
GNULIB_STRDUP = @GNULIB_STRDUP@
|
||||
GNULIB_STRNDUP = @GNULIB_STRNDUP@
|
||||
GNULIB_STRNLEN = @GNULIB_STRNLEN@
|
||||
GNULIB_STRPBRK = @GNULIB_STRPBRK@
|
||||
GNULIB_STRSEP = @GNULIB_STRSEP@
|
||||
GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
|
||||
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
|
||||
GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
|
||||
GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
|
||||
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
|
||||
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
|
||||
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
|
||||
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
|
||||
GREP = @GREP@
|
||||
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
|
||||
HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
|
||||
HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
|
||||
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
|
||||
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
|
||||
HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
|
||||
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
|
||||
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
|
||||
HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
|
||||
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
|
||||
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
|
||||
HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
|
||||
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
|
||||
HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
|
||||
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
|
||||
HAVE_DUP2 = @HAVE_DUP2@
|
||||
HAVE_FSEEKO = @HAVE_FSEEKO@
|
||||
HAVE_FTELLO = @HAVE_FTELLO@
|
||||
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
|
||||
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
|
||||
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
|
||||
HAVE_IO_H = @HAVE_IO_H@
|
||||
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
|
||||
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
|
||||
HAVE_LSTAT = @HAVE_LSTAT@
|
||||
HAVE_MEMPCPY = @HAVE_MEMPCPY@
|
||||
HAVE_MKDTEMP = @HAVE_MKDTEMP@
|
||||
HAVE_READLINK = @HAVE_READLINK@
|
||||
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
|
||||
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
|
||||
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
|
||||
HAVE_SLEEP = @HAVE_SLEEP@
|
||||
HAVE_STDINT_H = @HAVE_STDINT_H@
|
||||
HAVE_STPCPY = @HAVE_STPCPY@
|
||||
HAVE_STPNCPY = @HAVE_STPNCPY@
|
||||
HAVE_STRCASECMP = @HAVE_STRCASECMP@
|
||||
HAVE_STRCASESTR = @HAVE_STRCASESTR@
|
||||
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
|
||||
HAVE_STRNDUP = @HAVE_STRNDUP@
|
||||
HAVE_STRPBRK = @HAVE_STRPBRK@
|
||||
HAVE_STRSEP = @HAVE_STRSEP@
|
||||
HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
|
||||
HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@
|
||||
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
|
||||
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
|
||||
HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
|
||||
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
|
||||
HAVE_UNISTD_H = @HAVE_UNISTD_H@
|
||||
HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
|
||||
HAVE_VASPRINTF = @HAVE_VASPRINTF@
|
||||
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
|
||||
HAVE_WINT_T = @HAVE_WINT_T@
|
||||
HAVE__BOOL = @HAVE__BOOL@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
INTTYPES_H = @INTTYPES_H@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTAR_LIBDEPS = @LIBTAR_LIBDEPS@
|
||||
LIBTAR_LTLIBDEPS = @LIBTAR_LTLIBDEPS@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_SETSOCKOPT = @LIB_SETSOCKOPT@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
PRIPTR_PREFIX = @PRIPTR_PREFIX@
|
||||
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
|
||||
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
|
||||
PU_RMT_PROG = @PU_RMT_PROG@
|
||||
RANLIB = @RANLIB@
|
||||
REPLACE_CHOWN = @REPLACE_CHOWN@
|
||||
REPLACE_FCHDIR = @REPLACE_FCHDIR@
|
||||
REPLACE_FFLUSH = @REPLACE_FFLUSH@
|
||||
REPLACE_FPRINTF = @REPLACE_FPRINTF@
|
||||
REPLACE_FSEEK = @REPLACE_FSEEK@
|
||||
REPLACE_FSEEKO = @REPLACE_FSEEKO@
|
||||
REPLACE_FTELL = @REPLACE_FTELL@
|
||||
REPLACE_FTELLO = @REPLACE_FTELLO@
|
||||
REPLACE_GETCWD = @REPLACE_GETCWD@
|
||||
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
|
||||
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
|
||||
REPLACE_LSEEK = @REPLACE_LSEEK@
|
||||
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
|
||||
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
|
||||
REPLACE_PRINTF = @REPLACE_PRINTF@
|
||||
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
|
||||
REPLACE_SPRINTF = @REPLACE_SPRINTF@
|
||||
REPLACE_STRPTIME = @REPLACE_STRPTIME@
|
||||
REPLACE_TIMEGM = @REPLACE_TIMEGM@
|
||||
REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
|
||||
REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
|
||||
REPLACE_VPRINTF = @REPLACE_VPRINTF@
|
||||
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
|
||||
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
|
||||
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
|
||||
STDBOOL_H = @STDBOOL_H@
|
||||
STDINT_H = @STDINT_H@
|
||||
STRIP = @STRIP@
|
||||
SYSEXITS_H = @SYSEXITS_H@
|
||||
SYS_STAT_H = @SYS_STAT_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@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WCHAR_H = @WCHAR_H@
|
||||
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
|
||||
WCTYPE_H = @WCTYPE_H@
|
||||
WINT_T_SUFFIX = @WINT_T_SUFFIX@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
gl_LIBOBJS = @gl_LIBOBJS@
|
||||
gl_LTLIBOBJS = @gl_LTLIBOBJS@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
info_TEXINFOS = tar.texi
|
||||
tar_TEXINFOS = \
|
||||
dumpdir.texi\
|
||||
fdl.texi\
|
||||
freemanuals.texi\
|
||||
genfile.texi\
|
||||
getdate.texi\
|
||||
header.texi\
|
||||
intern.texi\
|
||||
rendition.texi\
|
||||
snapshot.texi\
|
||||
sparse.texi\
|
||||
value.texi
|
||||
|
||||
EXTRA_DIST = gendocs_template mastermenu.el texify.sed
|
||||
DISTCLEANFILES = *.info*
|
||||
|
||||
# The rendering level is anyone of PUBLISH, DISTRIB or PROOF.
|
||||
# Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
|
||||
RENDITION = DISTRIB
|
||||
MAKEINFOFLAGS = -D$(RENDITION)
|
||||
GENDOCS = gendocs.sh
|
||||
TEXI2DVI = texi2dvi -t '@set $(RENDITION)' -E
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .ps
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits doc/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnits doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
tar.info: tar.texi $(srcdir)/version.texi $(tar_TEXINFOS)
|
||||
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||||
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
||||
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||||
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||||
done; \
|
||||
else :; fi && \
|
||||
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $@ `test -f 'tar.texi' || echo '$(srcdir)/'`tar.texi; \
|
||||
then \
|
||||
rc=0; \
|
||||
else \
|
||||
rc=$$?; \
|
||||
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
||||
fi; \
|
||||
rm -rf $$backupdir; exit $$rc
|
||||
|
||||
tar.dvi: tar.texi $(srcdir)/version.texi $(tar_TEXINFOS)
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) -o $@ `test -f 'tar.texi' || echo '$(srcdir)/'`tar.texi
|
||||
|
||||
tar.pdf: tar.texi $(srcdir)/version.texi $(tar_TEXINFOS)
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2PDF) -o $@ `test -f 'tar.texi' || echo '$(srcdir)/'`tar.texi
|
||||
|
||||
tar.html: tar.texi $(srcdir)/version.texi $(tar_TEXINFOS)
|
||||
rm -rf $(@:.html=.htp)
|
||||
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $(@:.html=.htp) `test -f 'tar.texi' || echo '$(srcdir)/'`tar.texi; \
|
||||
then \
|
||||
rm -rf $@; \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
|
||||
else \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||
$(srcdir)/stamp-vti: tar.texi $(top_srcdir)/configure
|
||||
@(dir=.; test -f ./tar.texi || dir=$(srcdir); \
|
||||
set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/tar.texi`; \
|
||||
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||
echo "@set EDITION $(VERSION)"; \
|
||||
echo "@set VERSION $(VERSION)") > vti.tmp
|
||||
@cmp -s vti.tmp $(srcdir)/version.texi \
|
||||
|| (echo "Updating $(srcdir)/version.texi"; \
|
||||
cp vti.tmp $(srcdir)/version.texi)
|
||||
-@rm -f vti.tmp
|
||||
@cp $(srcdir)/version.texi $@
|
||||
|
||||
mostlyclean-vti:
|
||||
-rm -f vti.tmp
|
||||
|
||||
maintainer-clean-vti:
|
||||
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
|
||||
.dvi.ps:
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
uninstall-dvi-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(DVIS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(dvidir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-html-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(HTMLS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-info-am:
|
||||
@$(PRE_UNINSTALL)
|
||||
@if test -d '$(DESTDIR)$(infodir)' && \
|
||||
(install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
done; \
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
|
||||
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
|
||||
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
|
||||
else :; fi); \
|
||||
done
|
||||
|
||||
uninstall-pdf-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(PDFS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-ps-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(PSS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(psdir)/$$f"; \
|
||||
done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
case $$base in \
|
||||
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$base; then d=.; else d=$(srcdir); fi; \
|
||||
base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
|
||||
if test -f $$file; then \
|
||||
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||
test -f $(distdir)/$$relfile || \
|
||||
cp -p $$file $(distdir)/$$relfile; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -rf tar.aux tar.cp tar.cps tar.fn tar.ky tar.log tar.op tar.ops tar.pg \
|
||||
tar.tmp tar.toc tar.tp tar.tps tar.vr tar.dvi tar.pdf tar.ps \
|
||||
tar.html
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
@list='$(INFO_DEPS)'; for i in $$list; do \
|
||||
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
|
||||
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(INFO_DEPS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(infodir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am: $(HTMLS)
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am: $(DVIS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
|
||||
@list='$(DVIS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \
|
||||
done
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am: $(HTMLS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
|
||||
@list='$(HTMLS)'; for p in $$list; do \
|
||||
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
if test -d "$$d$$p"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
|
||||
echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
else \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
fi; \
|
||||
done
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
|
||||
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
|
||||
if test -f $$ifile; then \
|
||||
relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
|
||||
echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
$(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am: $(PDFS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
|
||||
@list='$(PDFS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am: $(PSS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
|
||||
@list='$(PSS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \
|
||||
done
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am: $(PDFS)
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am: $(PSS)
|
||||
|
||||
uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
|
||||
uninstall-pdf-am uninstall-ps-am
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-local \
|
||||
dist-info distclean distclean-generic distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-aminfo maintainer-clean-generic \
|
||||
maintainer-clean-vti mostlyclean mostlyclean-aminfo \
|
||||
mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am uninstall-dvi-am uninstall-html-am \
|
||||
uninstall-info-am uninstall-pdf-am uninstall-ps-am
|
||||
|
||||
|
||||
header.texi: $(top_srcdir)/src/tar.h
|
||||
sed -f $(srcdir)/texify.sed $(top_srcdir)/src/tar.h \
|
||||
| expand >$@
|
||||
|
||||
master-menu: $(tar_TEXINFOS)
|
||||
emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS)
|
||||
|
||||
check-options:
|
||||
@ARGP_HELP_FMT='usage-indent=0,short-opt-col=0,long-opt-col=0,\
|
||||
doc-opt-col=0,opt-doc-col=0,header-col=0,rmargin=1' \
|
||||
$(top_builddir)/src/tar --usage | \
|
||||
sed -n 's/^\[--\([^]\=\[]*\).*/\1/p' | sort | uniq > opts.$$$$;\
|
||||
$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
|
||||
$(info_TEXINFOS) | \
|
||||
sed -n '/^@macro/,/^@end macro/d;s/@opindex *\([^@,]*\).*/\1/p' \
|
||||
| sort | uniq > docs.$$$$;\
|
||||
(echo 'Not documented options:';\
|
||||
join -v1 opts.$$$$ docs.$$$$;\
|
||||
echo 'Non-existing options:';\
|
||||
join -v2 opts.$$$$ docs.$$$$) > report.$$$$;\
|
||||
rm opts.$$$$ docs.$$$$;\
|
||||
if [ -n "`sed '1,2d' report.$$$$`" ]; then \
|
||||
cat report.$$$$;\
|
||||
rm report.$$$$;\
|
||||
exit 1;\
|
||||
fi;\
|
||||
rm report.$$$$
|
||||
|
||||
clean-local:
|
||||
rm -rf manual
|
||||
|
||||
# Make sure you set TEXINPUTS
|
||||
# Usual value is:
|
||||
# /usr/share/texmf/pdftex/plain/misc:/usr/share/texmf/pdftex/config
|
||||
manual:
|
||||
TEXINPUTS=$(srcdir):$(top_srcdir)/build-tex:$(TEXINPUTS) \
|
||||
MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
||||
TEXI2DVI="$(TEXI2DVI) -t @finalout" \
|
||||
$(GENDOCS) tar 'GNU tar manual'
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
132
gnutar/doc/dumpdir.texi
Normal file
132
gnutar/doc/dumpdir.texi
Normal file
@ -0,0 +1,132 @@
|
||||
@c This is part of the paxutils manual.
|
||||
@c Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
@c Written by Sergey Poznyakoff
|
||||
@c This file is distributed under GFDL 1.1 or any later version
|
||||
@c published by the Free Software Foundation.
|
||||
|
||||
Incremental archives keep information about contents of each
|
||||
dumped directory in special data blocks called @dfn{dumpdirs}.
|
||||
|
||||
Dumpdir is a sequence of entries of the following form:
|
||||
|
||||
@smallexample
|
||||
@var{C} @var{filename} \0
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
where @var{C} is one of the @dfn{control codes} described below,
|
||||
@var{filename} is the name of the file @var{C} operates upon, and
|
||||
@samp{\0} represents a nul character (ASCII 0). The white space
|
||||
characters were added for readability, real dumpdirs do not contain
|
||||
them.
|
||||
|
||||
Each dumpdir ends with a single nul character.
|
||||
|
||||
The following table describes control codes and their meanings:
|
||||
|
||||
@table @samp
|
||||
@item Y
|
||||
@var{filename} is contained in the archive.
|
||||
|
||||
@item N
|
||||
@var{filename} was present in the directory at the time the archive
|
||||
was made, yet it was not dumped to the archive, because it had not
|
||||
changed since the last backup.
|
||||
|
||||
@item D
|
||||
@var{filename} is a directory.
|
||||
|
||||
@item R
|
||||
This code requests renaming of the @var{filename} to the name
|
||||
specified with the following @samp{T} command.
|
||||
|
||||
@item T
|
||||
Specify target file name for @samp{R} command (see below).
|
||||
|
||||
@item X
|
||||
Specify @dfn{temporary directory} name for a rename operation (see below).
|
||||
@end table
|
||||
|
||||
Codes @samp{Y}, @samp{N} and @samp{D} require @var{filename} argument
|
||||
to be a relative file name to the directory this dumpdir describes,
|
||||
whereas codes @samp{R}, @samp{T} and @samp{X} require their argument
|
||||
to be an absolute file name.
|
||||
|
||||
The three codes @samp{R}, @samp{T} and @samp{X} specify a
|
||||
@dfn{renaming operation}. In the simplest case it is:
|
||||
|
||||
@smallexample
|
||||
R@file{source}\0T@file{dest}\0
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
which means ``rename file @file{source} to file @file{dest}''.
|
||||
|
||||
However, there are cases that require using a @dfn{temporary
|
||||
directory}. For example, consider the following scenario:
|
||||
|
||||
@enumerate 1
|
||||
@item
|
||||
Previous run dumped a directory @file{foo} which contained the
|
||||
following three directories:
|
||||
|
||||
@smallexample
|
||||
a
|
||||
b
|
||||
c
|
||||
@end smallexample
|
||||
|
||||
@item
|
||||
They were renamed @emph{cyclically}, so that:
|
||||
|
||||
@example
|
||||
@file{a} became @file{b}
|
||||
@file{b} became @file{c}
|
||||
@file{c} became @file{a}
|
||||
@end example
|
||||
|
||||
@item
|
||||
New incremental dump was made.
|
||||
@end enumerate
|
||||
|
||||
This case cannot be handled by three successive renames, since
|
||||
renaming @file{a} to @file{b} will destroy existing directory.
|
||||
To handle such case a temporary directory is required. @GNUTAR{}
|
||||
will create the following dumpdir (newlines have been added for
|
||||
readability):
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
Xfoo\0
|
||||
Rfoo/a\0T\0
|
||||
Rfoo/b\0Tfoo/c\0
|
||||
Rfoo/c\0Tfoo/a\0
|
||||
R\0Tfoo/a\0
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
The first command, @samp{Xfoo\0}, instructs the extractor to create a
|
||||
temporary directory in the directory @file{foo}. Second command,
|
||||
@samp{Rfoo/aT\0}, says ``rename file @file{foo/a} to the temporary
|
||||
directory that has just been created'' (empty file name after a
|
||||
command means use temporary directory). Third and fourth commands
|
||||
work as usual, and, finally, the last command, @samp{R\0Tfoo/a\0}
|
||||
tells tar to rename the temporary directory to @file{foo/a}.
|
||||
|
||||
The exact placement of a dumpdir in the archive depends on the
|
||||
archive format (@pxref{Formats}):
|
||||
|
||||
@itemize
|
||||
@item PAX archives
|
||||
|
||||
In PAX archives, dumpdir is stored in the extended header of the
|
||||
corresponding directory, in variable @code{GNU.dumpdir}.
|
||||
|
||||
@item GNU and old GNU archives
|
||||
|
||||
These formats implement special header type @samp{D}, which is similar
|
||||
to ustar header @samp{5} (directory), except that it precedes a data
|
||||
block containing the dumpdir.
|
||||
@end itemize
|
||||
|
||||
@c End of dumpdir.texi
|
452
gnutar/doc/fdl.texi
Normal file
452
gnutar/doc/fdl.texi
Normal file
@ -0,0 +1,452 @@
|
||||
|
||||
@node GNU Free Documentation License
|
||||
@appendixsec GNU Free Documentation License
|
||||
|
||||
@cindex FDL, GNU Free Documentation License
|
||||
@center Version 1.2, November 2002
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
@end display
|
||||
|
||||
@enumerate 0
|
||||
@item
|
||||
PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document @dfn{free} in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or noncommercially.
|
||||
Secondarily, this License preserves for the author and publisher a way
|
||||
to get credit for their work, while not being considered responsible
|
||||
for modifications made by others.
|
||||
|
||||
This License is a kind of ``copyleft'', which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
|
||||
@item
|
||||
APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work, in any medium, that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. Such a notice grants a
|
||||
world-wide, royalty-free license, unlimited in duration, to use that
|
||||
work under the conditions stated herein. The ``Document'', below,
|
||||
refers to any such manual or work. Any member of the public is a
|
||||
licensee, and is addressed as ``you''. You accept the license if you
|
||||
copy, modify or distribute the work in a way requiring permission
|
||||
under copyright law.
|
||||
|
||||
A ``Modified Version'' of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A ``Secondary Section'' is a named appendix or a front-matter section
|
||||
of the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall
|
||||
subject (or to related matters) and contains nothing that could fall
|
||||
directly within that overall subject. (Thus, if the Document is in
|
||||
part a textbook of mathematics, a Secondary Section may not explain
|
||||
any mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The ``Invariant Sections'' are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License. If a
|
||||
section does not fit the above definition of Secondary then it is not
|
||||
allowed to be designated as Invariant. The Document may contain zero
|
||||
Invariant Sections. If the Document does not identify any Invariant
|
||||
Sections then there are none.
|
||||
|
||||
The ``Cover Texts'' are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License. A Front-Cover Text may
|
||||
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||
|
||||
A ``Transparent'' copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup, or absence of markup, has been arranged to thwart
|
||||
or discourage subsequent modification by readers is not Transparent.
|
||||
An image format is not Transparent if used for any substantial amount
|
||||
of text. A copy that is not ``Transparent'' is called ``Opaque''.
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
@sc{ascii} without markup, Texinfo input format, La@TeX{} input
|
||||
format, @acronym{SGML} or @acronym{XML} using a publicly available
|
||||
@acronym{DTD}, and standard-conforming simple @acronym{HTML},
|
||||
PostScript or @acronym{PDF} designed for human modification. Examples
|
||||
of transparent image formats include @acronym{PNG}, @acronym{XCF} and
|
||||
@acronym{JPG}. Opaque formats include proprietary formats that can be
|
||||
read and edited only by proprietary word processors, @acronym{SGML} or
|
||||
@acronym{XML} for which the @acronym{DTD} and/or processing tools are
|
||||
not generally available, and the machine-generated @acronym{HTML},
|
||||
PostScript or @acronym{PDF} produced by some word processors for
|
||||
output purposes only.
|
||||
|
||||
The ``Title Page'' means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, ``Title Page'' means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
|
||||
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
specific section name mentioned below, such as ``Acknowledgements'',
|
||||
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
|
||||
of such a section when you modify the Document means that it remains a
|
||||
section ``Entitled XYZ'' according to this definition.
|
||||
|
||||
The Document may include Warranty Disclaimers next to the notice which
|
||||
states that this License applies to the Document. These Warranty
|
||||
Disclaimers are considered to be included by reference in this
|
||||
License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and has
|
||||
no effect on the meaning of this License.
|
||||
|
||||
@item
|
||||
VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
|
||||
@item
|
||||
COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies (or copies in media that commonly have
|
||||
printed covers) of the Document, numbering more than 100, and the
|
||||
Document's license notice requires Cover Texts, you must enclose the
|
||||
copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a computer-network location from which the general network-using
|
||||
public has access to download using public-standard network protocols
|
||||
a complete Transparent copy of the Document, free of added material.
|
||||
If you use the latter option, you must take reasonably prudent steps,
|
||||
when you begin distribution of Opaque copies in quantity, to ensure
|
||||
that this Transparent copy will remain thus accessible at the stated
|
||||
location until at least one year after the last time you distribute an
|
||||
Opaque copy (directly or through your agents or retailers) of that
|
||||
edition to the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
|
||||
@item
|
||||
MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
@enumerate A
|
||||
@item
|
||||
Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.
|
||||
|
||||
@item
|
||||
List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has fewer than five),
|
||||
unless they release you from this requirement.
|
||||
|
||||
@item
|
||||
State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
|
||||
@item
|
||||
Preserve all the copyright notices of the Document.
|
||||
|
||||
@item
|
||||
Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
|
||||
@item
|
||||
Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.
|
||||
|
||||
@item
|
||||
Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.
|
||||
|
||||
@item
|
||||
Include an unaltered copy of this License.
|
||||
|
||||
@item
|
||||
Preserve the section Entitled ``History'', Preserve its Title, and add
|
||||
to it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section Entitled ``History'' in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.
|
||||
|
||||
@item
|
||||
Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the ``History'' section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.
|
||||
|
||||
@item
|
||||
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
|
||||
the Title of the section, and preserve in the section all the
|
||||
substance and tone of each of the contributor acknowledgements and/or
|
||||
dedications given therein.
|
||||
|
||||
@item
|
||||
Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.
|
||||
|
||||
@item
|
||||
Delete any section Entitled ``Endorsements''. Such a section
|
||||
may not be included in the Modified Version.
|
||||
|
||||
@item
|
||||
Do not retitle any existing section to be Entitled ``Endorsements'' or
|
||||
to conflict in title with any Invariant Section.
|
||||
|
||||
@item
|
||||
Preserve any Warranty Disclaimers.
|
||||
@end enumerate
|
||||
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section Entitled ``Endorsements'', provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties---for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
|
||||
@item
|
||||
COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice, and that you preserve all their Warranty Disclaimers.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections Entitled ``History''
|
||||
in the various original documents, forming one section Entitled
|
||||
``History''; likewise combine any sections Entitled ``Acknowledgements'',
|
||||
and any sections Entitled ``Dedications''. You must delete all
|
||||
sections Entitled ``Endorsements.''
|
||||
|
||||
@item
|
||||
COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
|
||||
@item
|
||||
AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, is called an ``aggregate'' if the copyright
|
||||
resulting from the compilation is not used to limit the legal rights
|
||||
of the compilation's users beyond what the individual works permit.
|
||||
When the Document is included in an aggregate, this License does not
|
||||
apply to the other works in the aggregate which are not themselves
|
||||
derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one half of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic form.
|
||||
Otherwise they must appear on printed covers that bracket the whole
|
||||
aggregate.
|
||||
|
||||
@item
|
||||
TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also include
|
||||
the original English version of this License and the original versions
|
||||
of those notices and disclaimers. In case of a disagreement between
|
||||
the translation and the original version of this License or a notice
|
||||
or disclaimer, the original version will prevail.
|
||||
|
||||
If a section in the Document is Entitled ``Acknowledgements'',
|
||||
``Dedications'', or ``History'', the requirement (section 4) to Preserve
|
||||
its Title (section 1) will typically require changing the actual
|
||||
title.
|
||||
|
||||
@item
|
||||
TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document except
|
||||
as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
@item
|
||||
FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
@uref{http://www.gnu.org/copyleft/}.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation.
|
||||
@end enumerate
|
||||
|
||||
@page
|
||||
@appendixsubsec ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
Copyright (C) @var{year} @var{your name}.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
Texts. A copy of the license is included in the section entitled ``GNU
|
||||
Free Documentation License''.
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||
replace the ``with...Texts.'' line with this:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
with the Invariant Sections being @var{list their titles}, with
|
||||
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
|
||||
being @var{list}.
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
|
||||
@c Local Variables:
|
||||
@c ispell-local-pdict: "ispell-dict"
|
||||
@c End:
|
||||
|
89
gnutar/doc/freemanuals.texi
Normal file
89
gnutar/doc/freemanuals.texi
Normal file
@ -0,0 +1,89 @@
|
||||
@cindex free documentation
|
||||
|
||||
The biggest deficiency in the free software community today is not in
|
||||
the software---it is the lack of good free documentation that we can
|
||||
include with the free software. Many of our most important
|
||||
programs do not come with free reference manuals and free introductory
|
||||
texts. Documentation is an essential part of any software package;
|
||||
when an important free software package does not come with a free
|
||||
manual and a free tutorial, that is a major gap. We have many such
|
||||
gaps today.
|
||||
|
||||
Consider Perl, for instance. The tutorial manuals that people
|
||||
normally use are non-free. How did this come about? Because the
|
||||
authors of those manuals published them with restrictive terms---no
|
||||
copying, no modification, source files not available---which exclude
|
||||
them from the free software world.
|
||||
|
||||
That wasn't the first time this sort of thing happened, and it was far
|
||||
from the last. Many times we have heard a GNU user eagerly describe a
|
||||
manual that he is writing, his intended contribution to the community,
|
||||
only to learn that he had ruined everything by signing a publication
|
||||
contract to make it non-free.
|
||||
|
||||
Free documentation, like free software, is a matter of freedom, not
|
||||
price. The problem with the non-free manual is not that publishers
|
||||
charge a price for printed copies---that in itself is fine. (The Free
|
||||
Software Foundation sells printed copies of manuals, too.) The
|
||||
problem is the restrictions on the use of the manual. Free manuals
|
||||
are available in source code form, and give you permission to copy and
|
||||
modify. Non-free manuals do not allow this.
|
||||
|
||||
The criteria of freedom for a free manual are roughly the same as for
|
||||
free software. Redistribution (including the normal kinds of
|
||||
commercial redistribution) must be permitted, so that the manual can
|
||||
accompany every copy of the program, both on-line and on paper.
|
||||
|
||||
Permission for modification of the technical content is crucial too.
|
||||
When people modify the software, adding or changing features, if they
|
||||
are conscientious they will change the manual too---so they can
|
||||
provide accurate and clear documentation for the modified program. A
|
||||
manual that leaves you no choice but to write a new manual to document
|
||||
a changed version of the program is not really available to our
|
||||
community.
|
||||
|
||||
Some kinds of limits on the way modification is handled are
|
||||
acceptable. For example, requirements to preserve the original
|
||||
author's copyright notice, the distribution terms, or the list of
|
||||
authors, are ok. It is also no problem to require modified versions
|
||||
to include notice that they were modified. Even entire sections that
|
||||
may not be deleted or changed are acceptable, as long as they deal
|
||||
with nontechnical topics (like this one). These kinds of restrictions
|
||||
are acceptable because they don't obstruct the community's normal use
|
||||
of the manual.
|
||||
|
||||
However, it must be possible to modify all the @emph{technical}
|
||||
content of the manual, and then distribute the result in all the usual
|
||||
media, through all the usual channels. Otherwise, the restrictions
|
||||
obstruct the use of the manual, it is not free, and we need another
|
||||
manual to replace it.
|
||||
|
||||
Please spread the word about this issue. Our community continues to
|
||||
lose manuals to proprietary publishing. If we spread the word that
|
||||
free software needs free reference manuals and free tutorials, perhaps
|
||||
the next person who wants to contribute by writing documentation will
|
||||
realize, before it is too late, that only free manuals contribute to
|
||||
the free software community.
|
||||
|
||||
If you are writing documentation, please insist on publishing it under
|
||||
the GNU Free Documentation License or another free documentation
|
||||
license. Remember that this decision requires your approval---you
|
||||
don't have to let the publisher decide. Some commercial publishers
|
||||
will use a free license if you insist, but they will not propose the
|
||||
option; it is up to you to raise the issue and say firmly that this is
|
||||
what you want. If the publisher you are dealing with refuses, please
|
||||
try other publishers. If you're not sure whether a proposed license
|
||||
is free, write to @email{licensing@@gnu.org}.
|
||||
|
||||
You can encourage commercial publishers to sell more free, copylefted
|
||||
manuals and tutorials by buying them, and particularly by buying
|
||||
copies from the publishers that paid for their writing or for major
|
||||
improvements. Meanwhile, try to avoid buying non-free documentation
|
||||
at all. Check the distribution terms of a manual before you buy it,
|
||||
and insist that whoever seeks your business must respect your freedom.
|
||||
Check the history of the book, and try reward the publishers that have
|
||||
paid or pay the authors to work on it.
|
||||
|
||||
The Free Software Foundation maintains a list of free documentation
|
||||
published by other publishers, at
|
||||
@url{http://www.fsf.org/doc/other-free-books.html}.
|
108
gnutar/doc/gendocs_template
Executable file
108
gnutar/doc/gendocs_template
Executable file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<!-- $Id: gendocs_template,v 1.3 2007/01/19 15:41:39 gray Exp $ -->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
|
||||
<head>
|
||||
<title>%%TITLE%% - GNU Project - Free Software Foundation (FSF)</title>
|
||||
<meta http-equiv="content-type" content='text/html; charset=utf-8' />
|
||||
<link rel="stylesheet" type="text/css" href="/gnu.css" />
|
||||
<link rev="made" href="mailto:gray@gnu.org" />
|
||||
<link rel="icon" type="image/png" href="/graphics/gnu-head-icon.png" />
|
||||
</head>
|
||||
|
||||
<!-- This document is in XML, and xhtml 1.0 -->
|
||||
<!-- Please make sure to properly nest your tags -->
|
||||
<!-- and ensure that your final document validates -->
|
||||
<!-- consistent with W3C xhtml 1.0 and CSS standards -->
|
||||
<!-- See validator.w3.org -->
|
||||
|
||||
<body>
|
||||
|
||||
<h3>%%TITLE%%</h3>
|
||||
|
||||
<address>Free Software Foundation</address>
|
||||
<address>last updated %%DATE%%</address>
|
||||
<p>
|
||||
<a href="/graphics/gnu-head.jpg">
|
||||
<img src="/graphics/gnu-head-sm.jpg"
|
||||
alt=" [image of the head of a GNU] "
|
||||
width="129" height="122" />
|
||||
</a>
|
||||
<a href="/philosophy/gif.html">(no gifs due to patent problems)</a>
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
The manual for %%PACKAGE%% is available in the following formats:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="%%PACKAGE%%.html">HTML
|
||||
(%%HTML_MONO_SIZE%%K characters)</a> - entirely on one web page.</li>
|
||||
<li><a href="html_node/index.html">HTML</a> - with one web page per
|
||||
node.</li>
|
||||
<li><a href="%%PACKAGE%%.html.gz">HTML compressed
|
||||
(%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
|
||||
one web page.</li>
|
||||
<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
|
||||
(%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
|
||||
with one web page per node.</li>
|
||||
<li><a href="%%PACKAGE%%.info.tar.gz">Info document
|
||||
(%%INFO_TGZ_SIZE%%K characters gzipped tar file)</a>.</li>
|
||||
<li><a href="%%PACKAGE%%.txt">ASCII text
|
||||
(%%ASCII_SIZE%%K characters)</a>.</li>
|
||||
<li><a href="%%PACKAGE%%.txt.gz">ASCII text compressed
|
||||
(%%ASCII_GZ_SIZE%%K gzipped characters)</a>.</li>
|
||||
<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
|
||||
(%%DVI_GZ_SIZE%%K characters gzipped)</a>.</li>
|
||||
<li><a href="%%PACKAGE%%.ps.gz">PostScript file
|
||||
(%%PS_GZ_SIZE%%K characters gzipped)</a>.</li>
|
||||
<li><a href="%%PACKAGE%%.pdf">PDF file
|
||||
(%%PDF_SIZE%%K characters)</a>.</li>
|
||||
<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
|
||||
(%%TEXI_TGZ_SIZE%%K characters gzipped tar file)</a></li>
|
||||
</ul>
|
||||
|
||||
<p>(This page generated by the <a
|
||||
href="%%SCRIPTURL%%">%%SCRIPTNAME%%</a> script.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="http://validator.w3.org/check?uri=referer"><img
|
||||
src="http://www.w3.org/Icons/valid-xhtml10"
|
||||
alt="Valid XHTML 1.0!" height="31" width="88" /></a>
|
||||
</p>
|
||||
|
||||
<div class="copyright">
|
||||
<p>
|
||||
Return to the <a href="/home.html">GNU Project home page</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Please send FSF & GNU inquiries to
|
||||
<a href="mailto:gnu@gnu.org"><em>gnu@gnu.org</em></a>.
|
||||
There are also <a href="/home.html#ContactInfo">other ways to contact</a>
|
||||
the FSF.
|
||||
<br />
|
||||
Please send broken links and other corrections (or suggestions) to
|
||||
<a href="mailto:webmasters@gnu.org"><em>webmasters@gnu.org</em></a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Copyright (C) 2004 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02111, USA
|
||||
<br />
|
||||
Verbatim copying and distribution of this entire article is
|
||||
permitted in any medium, provided this notice is preserved.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Updated:
|
||||
<!-- timestamp start -->
|
||||
$Date: 2007/01/19 15:41:39 $ $Author: gray $
|
||||
<!-- timestamp end -->
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
331
gnutar/doc/genfile.texi
Normal file
331
gnutar/doc/genfile.texi
Normal file
@ -0,0 +1,331 @@
|
||||
@c This is part of the paxutils manual.
|
||||
@c Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
@c Written by Sergey Poznyakoff
|
||||
@c This file is distributed under GFDL 1.1 or any later version
|
||||
@c published by the Free Software Foundation.
|
||||
|
||||
@cindex genfile
|
||||
This appendix describes @command{genfile}, an auxiliary program
|
||||
used in the GNU tar testsuite. If you are not interested in developing
|
||||
GNU tar, skip this appendix.
|
||||
|
||||
Initially, @command{genfile} was used to generate data files for
|
||||
the testsuite, hence its name. However, new operation modes were being
|
||||
implemented as the testsuite grew more sophisticated, and now
|
||||
@command{genfile} is a multi-purpose instrument.
|
||||
|
||||
There are three basic operation modes:
|
||||
|
||||
@table @asis
|
||||
@item File Generation
|
||||
This is the default mode. In this mode, @command{genfile}
|
||||
generates data files.
|
||||
|
||||
@item File Status
|
||||
In this mode @command{genfile} displays status of specified files.
|
||||
|
||||
@item Synchronous Execution.
|
||||
In this mode @command{genfile} executes the given program with
|
||||
@option{--checkpoint} option and executes a set of actions when
|
||||
specified checkpoints are reached.
|
||||
@end table
|
||||
|
||||
@menu
|
||||
* Generate Mode:: File Generation Mode.
|
||||
* Status Mode:: File Status Mode.
|
||||
* Exec Mode:: Synchronous Execution mode.
|
||||
@end menu
|
||||
|
||||
@node Generate Mode
|
||||
@appendixsec Generate Mode
|
||||
|
||||
@cindex Generate Mode, @command{genfile}
|
||||
@cindex @command{genfile}, generate mode
|
||||
@cindex @command{genfile}, create file
|
||||
In this mode @command{genfile} creates a data file for the test
|
||||
suite. The size of the file is given with the @option{--length}
|
||||
(@option{-l}) option. By default the file contents is written to the
|
||||
standard output, this can be changed using @option{--file}
|
||||
(@option{-f}) command line option. Thus, the following two commands
|
||||
are equivalent:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
genfile --length 100 > outfile
|
||||
genfile --length 100 --file outfile
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If @option{--length} is not given, @command{genfile} will
|
||||
generate an empty (zero-length) file.
|
||||
|
||||
@cindex @command{genfile}, seeking to a given offset
|
||||
The command line option @option{--seek=@var{N}} istructs @command{genfile}
|
||||
to skip the given number of bytes (@var{N}) in the output file before
|
||||
writing to it. It is similar to the @option{seek=@var{N}} of the
|
||||
@command{dd} utility.
|
||||
|
||||
@cindex @command{genfile}, reading a list of file names
|
||||
You can instruct @command{genfile} to create several files at one
|
||||
go, by giving it @option{--files-from} (@option{-T}) option followed
|
||||
by a name of file containing a list of file names. Using dash
|
||||
(@samp{-}) instead of the file name causes @command{genfile} to read
|
||||
file list from the standard input. For example:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
# Read file names from file @file{file.list}
|
||||
genfile --files-from file.list
|
||||
# Read file names from standard input
|
||||
genfile --files-from -
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
@cindex File lists separated by NUL characters
|
||||
The list file is supposed to contain one file name per line. To
|
||||
use file lists separated by ASCII NUL character, use @option{--null}
|
||||
(@option{-0}) command line option:
|
||||
|
||||
@smallexample
|
||||
genfile --null --files-from file.list
|
||||
@end smallexample
|
||||
|
||||
@cindex pattern, @command{genfile}
|
||||
The default data pattern for filling the generated file consists
|
||||
of first 256 letters of ASCII code, repeated enough times to fill the
|
||||
entire file. This behavior can be changed with @option{--pattern}
|
||||
option. This option takes a mandatory argument, specifying pattern
|
||||
name to use. Currently two patterns are implemented:
|
||||
|
||||
@table @option
|
||||
@item --pattern=default
|
||||
The default pattern as described above.
|
||||
|
||||
@item --pattern=zero
|
||||
Fills the file with zeroes.
|
||||
@end table
|
||||
|
||||
If no file name was given, the program exits with the code
|
||||
@code{0}. Otherwise, it exits with @code{0} only if it was able to
|
||||
create a file of the specified length.
|
||||
|
||||
@cindex Sparse files, creating using @command{genfile}
|
||||
@cindex @command{genfile}, creating sparse files
|
||||
Special option @option{--sparse} (@option{-s}) instructs
|
||||
@command{genfile} to create a sparse file. Sparse files consist of
|
||||
@dfn{data fragments}, separated by @dfn{holes} or blocks of zeros. On
|
||||
many operating systems, actual disk storage is not allocated for
|
||||
holes, but they are counted in the length of the file. To create a
|
||||
sparse file, @command{genfile} should know where to put data fragments,
|
||||
and what data to use to fill them. So, when @option{--sparse} is given
|
||||
the rest of the command line specifies a so-called @dfn{file map}.
|
||||
|
||||
The file map consists of any number of @dfn{fragment
|
||||
descriptors}. Each descriptor is composed of two values: a number,
|
||||
specifying fragment offset from the end of the previous fragment or,
|
||||
for the very first fragment, from the beginning of the file, and
|
||||
@dfn{contents string}, i.e., a string of characters, specifying the
|
||||
pattern to fill the fragment with. File offset can be suffixed with
|
||||
the following quantifiers:
|
||||
|
||||
@table @samp
|
||||
@item k
|
||||
@itemx K
|
||||
The number is expressed in kilobytes.
|
||||
@item m
|
||||
@itemx M
|
||||
The number is expressed in megabytes.
|
||||
@item g
|
||||
@itemx G
|
||||
The number is expressed in gigabytes.
|
||||
@end table
|
||||
|
||||
For each letter in contents string @command{genfile} will generate
|
||||
a @dfn{block} of data, filled with this letter and will write it to
|
||||
the fragment. The size of block is given by @option{--block-size}
|
||||
option. It defaults to 512. Thus, if the string consists of @var{n}
|
||||
characters, the resulting file fragment will contain
|
||||
@code{@var{n}*@var{block-size}} of data.
|
||||
|
||||
Last fragment descriptor can have only file offset part. In this
|
||||
case @command{genfile} will create a hole at the end of the file up to
|
||||
the given offset.
|
||||
|
||||
For example, consider the following invocation:
|
||||
|
||||
@smallexample
|
||||
genfile --sparse --file sparsefile 0 ABCD 1M EFGHI 2000K
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
It will create 3101184-bytes long file of the following structure:
|
||||
|
||||
@multitable @columnfractions .35 .20 .45
|
||||
@item Offset @tab Length @tab Contents
|
||||
@item 0 @tab 4*512=2048 @tab Four 512-byte blocks, filled with
|
||||
letters @samp{A}, @samp{B}, @samp{C} and @samp{D}.
|
||||
@item 2048 @tab 1046528 @tab Zero bytes
|
||||
@item 1050624 @tab 5*512=2560 @tab Five blocks, filled with letters
|
||||
@samp{E}, @samp{F}, @samp{G}, @samp{H}, @samp{I}.
|
||||
@item 1053184 @tab 2048000 @tab Zero bytes
|
||||
@end multitable
|
||||
|
||||
The exit code of @command{genfile --status} command is @code{0}
|
||||
only if created file is actually sparse.
|
||||
|
||||
@node Status Mode
|
||||
@appendixsec Status Mode
|
||||
|
||||
In status mode, @command{genfile} prints file system status for
|
||||
each file specified in the command line. This mode is toggled by
|
||||
@option{--stat} (@option{-S}) command line option. An optional argument to this
|
||||
option specifies output @dfn{format}: a comma-separated list of
|
||||
@code{struct stat} fields to be displayed. This list can contain
|
||||
following identifiers @FIXME{should we also support @samp{%} notations
|
||||
as in stat(1)??}:
|
||||
|
||||
@table @asis
|
||||
@item name
|
||||
The file name.
|
||||
|
||||
@item dev
|
||||
@itemx st_dev
|
||||
Device number in decimal.
|
||||
|
||||
@item ino
|
||||
@itemx st_ino
|
||||
Inode number.
|
||||
|
||||
@item mode[.@var{number}]
|
||||
@itemx st_mode[.@var{number}]
|
||||
File mode in octal. Optional @var{number} specifies octal mask to
|
||||
be applied to the mode before outputting. For example, @code{--stat
|
||||
mode.777} will preserve lower nine bits of it. Notice, that you can
|
||||
use any punctuation character in place of @samp{.}.
|
||||
|
||||
@item nlink
|
||||
@itemx st_nlink
|
||||
Number of hard links.
|
||||
|
||||
@item uid
|
||||
@itemx st_uid
|
||||
User ID of owner.
|
||||
|
||||
@item gid
|
||||
@itemx st_gid
|
||||
Group ID of owner.
|
||||
|
||||
@item size
|
||||
@itemx st_size
|
||||
File size in decimal.
|
||||
|
||||
@item blksize
|
||||
@itemx st_blksize
|
||||
The size in bytes of each file block.
|
||||
|
||||
@item blocks
|
||||
@itemx st_blocks
|
||||
Number of blocks allocated.
|
||||
|
||||
@item atime
|
||||
@itemx st_atime
|
||||
Time of last access.
|
||||
|
||||
@item mtime
|
||||
@itemx st_mtime
|
||||
Time of last modification
|
||||
|
||||
@item ctime
|
||||
@itemx st_ctime
|
||||
Time of last status change
|
||||
|
||||
@item sparse
|
||||
A boolean value indicating whether the file is @samp{sparse}.
|
||||
@end table
|
||||
|
||||
Modification times are displayed in @acronym{UTC} as
|
||||
@acronym{UNIX} timestamps, unless suffixed with @samp{H} (for
|
||||
``human-readable''), as in @samp{ctimeH}, in which case usual
|
||||
@code{tar tv} output format is used.
|
||||
|
||||
The default output format is: @samp{name,dev,ino,mode,
|
||||
nlink,uid,gid,size,blksize,blocks,atime,mtime,ctime}.
|
||||
|
||||
For example, the following command will display file names and
|
||||
corresponding times of last access for each file in the current working
|
||||
directory:
|
||||
|
||||
@smallexample
|
||||
genfile --stat=name,atime *
|
||||
@end smallexample
|
||||
|
||||
@node Exec Mode
|
||||
@appendixsec Exec Mode
|
||||
|
||||
@cindex Exec Mode, @command{genfile}
|
||||
This mode is designed for testing the behavior of @code{paxutils}
|
||||
commands when some of the files change during archiving. It is an
|
||||
experimental mode.
|
||||
|
||||
The @samp{Exec Mode} is toggled by @option{--run} command line
|
||||
option (or its alias @option{-r}). The argument to this option gives
|
||||
the command line to be executed. The actual command line is
|
||||
constructed by inserting @option{--checkpoint} option between the
|
||||
command name and its first argument (if any). Due to this, the
|
||||
argument to @option{--run} may not use traditional @command{tar}
|
||||
option syntax, i.e., the following is wrong:
|
||||
|
||||
@smallexample
|
||||
# Wrong!
|
||||
genfile --run 'tar cf foo bar'
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
|
||||
Use the following syntax instead:
|
||||
|
||||
@smallexample
|
||||
genfile --run 'tar -cf foo bar'
|
||||
@end smallexample
|
||||
|
||||
The rest of command line after @option{--run} or its equivalent
|
||||
specifies checkpoint values and actions to be executed upon reaching
|
||||
them. Checkpoint values are introduced with @option{--checkpoint}
|
||||
command line option. Argument to this option is the number of
|
||||
checkpoint in decimal.
|
||||
|
||||
Any number of @dfn{actions} may be specified after a
|
||||
checkpoint. Available actions are
|
||||
|
||||
@table @option
|
||||
@item --cut @var{file}
|
||||
@itemx --truncate @var{file}
|
||||
Truncate @var{file} to the size specified by previous
|
||||
@option{--length} option (or 0, if it is not given).
|
||||
|
||||
@item --append @var{file}
|
||||
Append data to @var{file}. The size of data and its pattern are
|
||||
given by previous @option{--length} and @option{pattern} options.
|
||||
|
||||
@item --touch @var{file}
|
||||
Update the access and modification times of @var{file}. These
|
||||
timestamps are changed to the current time, unless @option{--date}
|
||||
option was given, in which case they are changed to the specified
|
||||
time. Argument to @option{--date} option is a date specification in
|
||||
an almost arbitrary format (@pxref{Date input formats}).
|
||||
|
||||
@item --exec @var{command}
|
||||
Execute given shell command.
|
||||
|
||||
@end table
|
||||
|
||||
Option @option{--verbose} instructs @command{genfile} to print on
|
||||
standard output notifications about checkpoints being executed and to
|
||||
verbosely describe exit status of the command.
|
||||
|
||||
While the command is being executed its standard output remains
|
||||
connected to descriptor 1. All messages it prints to file descriptor
|
||||
2, except checkpoint notifications, are forwarded to standard
|
||||
error.
|
||||
|
||||
@command{Genfile} exits with the exit status of the executed command.
|
553
gnutar/doc/getdate.texi
Normal file
553
gnutar/doc/getdate.texi
Normal file
@ -0,0 +1,553 @@
|
||||
@c GNU date syntax documentation
|
||||
|
||||
@c Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.2 or
|
||||
@c any later version published by the Free Software Foundation; with no
|
||||
@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
@c Texts. A copy of the license is included in the ``GNU Free
|
||||
@c Documentation License'' file as part of this distribution.
|
||||
|
||||
@node Date input formats
|
||||
@chapter Date input formats
|
||||
|
||||
@cindex date input formats
|
||||
@findex get_date
|
||||
|
||||
First, a quote:
|
||||
|
||||
@quotation
|
||||
Our units of temporal measurement, from seconds on up to months, are so
|
||||
complicated, asymmetrical and disjunctive so as to make coherent mental
|
||||
reckoning in time all but impossible. Indeed, had some tyrannical god
|
||||
contrived to enslave our minds to time, to make it all but impossible
|
||||
for us to escape subjection to sodden routines and unpleasant surprises,
|
||||
he could hardly have done better than handing down our present system.
|
||||
It is like a set of trapezoidal building blocks, with no vertical or
|
||||
horizontal surfaces, like a language in which the simplest thought
|
||||
demands ornate constructions, useless particles and lengthy
|
||||
circumlocutions. Unlike the more successful patterns of language and
|
||||
science, which enable us to face experience boldly or at least
|
||||
level-headedly, our system of temporal calculation silently and
|
||||
persistently encourages our terror of time.
|
||||
|
||||
@dots{} It is as though architects had to measure length in feet, width
|
||||
in meters and height in ells; as though basic instruction manuals
|
||||
demanded a knowledge of five different languages. It is no wonder then
|
||||
that we often look into our own immediate past or future, last Tuesday
|
||||
or a week from Sunday, with feelings of helpless confusion. @dots{}
|
||||
|
||||
--- Robert Grudin, @cite{Time and the Art of Living}.
|
||||
@end quotation
|
||||
|
||||
This section describes the textual date representations that @sc{gnu}
|
||||
programs accept. These are the strings you, as a user, can supply as
|
||||
arguments to the various programs. The C interface (via the
|
||||
@code{get_date} function) is not described here.
|
||||
|
||||
@menu
|
||||
* General date syntax:: Common rules.
|
||||
* Calendar date items:: 19 Dec 1994.
|
||||
* Time of day items:: 9:20pm.
|
||||
* Time zone items:: @sc{est}, @sc{pdt}, @sc{gmt}.
|
||||
* Day of week items:: Monday and others.
|
||||
* Relative items in date strings:: next tuesday, 2 years ago.
|
||||
* Pure numbers in date strings:: 19931219, 1440.
|
||||
* Seconds since the Epoch:: @@1078100502.
|
||||
* Specifying time zone rules:: TZ="America/New_York", TZ="UTC0".
|
||||
* Authors of get_date:: Bellovin, Eggert, Salz, Berets, et al.
|
||||
@end menu
|
||||
|
||||
|
||||
@node General date syntax
|
||||
@section General date syntax
|
||||
|
||||
@cindex general date syntax
|
||||
|
||||
@cindex items in date strings
|
||||
A @dfn{date} is a string, possibly empty, containing many items
|
||||
separated by whitespace. The whitespace may be omitted when no
|
||||
ambiguity arises. The empty string means the beginning of today (i.e.,
|
||||
midnight). Order of the items is immaterial. A date string may contain
|
||||
many flavors of items:
|
||||
|
||||
@itemize @bullet
|
||||
@item calendar date items
|
||||
@item time of day items
|
||||
@item time zone items
|
||||
@item day of the week items
|
||||
@item relative items
|
||||
@item pure numbers.
|
||||
@end itemize
|
||||
|
||||
@noindent We describe each of these item types in turn, below.
|
||||
|
||||
@cindex numbers, written-out
|
||||
@cindex ordinal numbers
|
||||
@findex first @r{in date strings}
|
||||
@findex next @r{in date strings}
|
||||
@findex last @r{in date strings}
|
||||
A few ordinal numbers may be written out in words in some contexts. This is
|
||||
most useful for specifying day of the week items or relative items (see
|
||||
below). Among the most commonly used ordinal numbers, the word
|
||||
@samp{last} stands for @math{-1}, @samp{this} stands for 0, and
|
||||
@samp{first} and @samp{next} both stand for 1. Because the word
|
||||
@samp{second} stands for the unit of time there is no way to write the
|
||||
ordinal number 2, but for convenience @samp{third} stands for 3,
|
||||
@samp{fourth} for 4, @samp{fifth} for 5,
|
||||
@samp{sixth} for 6, @samp{seventh} for 7, @samp{eighth} for 8,
|
||||
@samp{ninth} for 9, @samp{tenth} for 10, @samp{eleventh} for 11 and
|
||||
@samp{twelfth} for 12.
|
||||
|
||||
@cindex months, written-out
|
||||
When a month is written this way, it is still considered to be written
|
||||
numerically, instead of being ``spelled in full''; this changes the
|
||||
allowed strings.
|
||||
|
||||
@cindex language, in dates
|
||||
In the current implementation, only English is supported for words and
|
||||
abbreviations like @samp{AM}, @samp{DST}, @samp{EST}, @samp{first},
|
||||
@samp{January}, @samp{Sunday}, @samp{tomorrow}, and @samp{year}.
|
||||
|
||||
@cindex language, in dates
|
||||
@cindex time zone item
|
||||
The output of the @command{date} command
|
||||
is not always acceptable as a date string,
|
||||
not only because of the language problem, but also because there is no
|
||||
standard meaning for time zone items like @samp{IST}. When using
|
||||
@command{date} to generate a date string intended to be parsed later,
|
||||
specify a date format that is independent of language and that does not
|
||||
use time zone items other than @samp{UTC} and @samp{Z}. Here are some
|
||||
ways to do this:
|
||||
|
||||
@example
|
||||
$ LC_ALL=C TZ=UTC0 date
|
||||
Mon Mar 1 00:21:42 UTC 2004
|
||||
$ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ'
|
||||
2004-03-01 00:21:42Z
|
||||
$ date --iso-8601=ns | tr T ' ' # --iso-8601 is a GNU extension.
|
||||
2004-02-29 16:21:42,692722128-0800
|
||||
$ date --rfc-2822 # a GNU extension
|
||||
Sun, 29 Feb 2004 16:21:42 -0800
|
||||
$ date +'%Y-%m-%d %H:%M:%S %z' # %z is a GNU extension.
|
||||
2004-02-29 16:21:42 -0800
|
||||
$ date +'@@%s.%N' # %s and %N are GNU extensions.
|
||||
@@1078100502.692722128
|
||||
@end example
|
||||
|
||||
@cindex case, ignored in dates
|
||||
@cindex comments, in dates
|
||||
Alphabetic case is completely ignored in dates. Comments may be introduced
|
||||
between round parentheses, as long as included parentheses are properly
|
||||
nested. Hyphens not followed by a digit are currently ignored. Leading
|
||||
zeros on numbers are ignored.
|
||||
|
||||
Invalid dates like @samp{2005-02-29} or times like @samp{24:00} are
|
||||
rejected. In the typical case of a host that does not support leap
|
||||
seconds, a time like @samp{23:59:60} is rejected even if it
|
||||
corresponds to a valid leap second.
|
||||
|
||||
|
||||
@node Calendar date items
|
||||
@section Calendar date items
|
||||
|
||||
@cindex calendar date item
|
||||
|
||||
A @dfn{calendar date item} specifies a day of the year. It is
|
||||
specified differently, depending on whether the month is specified
|
||||
numerically or literally. All these strings specify the same calendar date:
|
||||
|
||||
@example
|
||||
1972-09-24 # @sc{iso} 8601.
|
||||
72-9-24 # Assume 19xx for 69 through 99,
|
||||
# 20xx for 00 through 68.
|
||||
72-09-24 # Leading zeros are ignored.
|
||||
9/24/72 # Common U.S. writing.
|
||||
24 September 1972
|
||||
24 Sept 72 # September has a special abbreviation.
|
||||
24 Sep 72 # Three-letter abbreviations always allowed.
|
||||
Sep 24, 1972
|
||||
24-sep-72
|
||||
24sep72
|
||||
@end example
|
||||
|
||||
The year can also be omitted. In this case, the last specified year is
|
||||
used, or the current year if none. For example:
|
||||
|
||||
@example
|
||||
9/24
|
||||
sep 24
|
||||
@end example
|
||||
|
||||
Here are the rules.
|
||||
|
||||
@cindex @sc{iso} 8601 date format
|
||||
@cindex date format, @sc{iso} 8601
|
||||
For numeric months, the @sc{iso} 8601 format
|
||||
@samp{@var{year}-@var{month}-@var{day}} is allowed, where @var{year} is
|
||||
any positive number, @var{month} is a number between 01 and 12, and
|
||||
@var{day} is a number between 01 and 31. A leading zero must be present
|
||||
if a number is less than ten. If @var{year} is 68 or smaller, then 2000
|
||||
is added to it; otherwise, if @var{year} is less than 100,
|
||||
then 1900 is added to it. The construct
|
||||
@samp{@var{month}/@var{day}/@var{year}}, popular in the United States,
|
||||
is accepted. Also @samp{@var{month}/@var{day}}, omitting the year.
|
||||
|
||||
@cindex month names in date strings
|
||||
@cindex abbreviations for months
|
||||
Literal months may be spelled out in full: @samp{January},
|
||||
@samp{February}, @samp{March}, @samp{April}, @samp{May}, @samp{June},
|
||||
@samp{July}, @samp{August}, @samp{September}, @samp{October},
|
||||
@samp{November} or @samp{December}. Literal months may be abbreviated
|
||||
to their first three letters, possibly followed by an abbreviating dot.
|
||||
It is also permitted to write @samp{Sept} instead of @samp{September}.
|
||||
|
||||
When months are written literally, the calendar date may be given as any
|
||||
of the following:
|
||||
|
||||
@example
|
||||
@var{day} @var{month} @var{year}
|
||||
@var{day} @var{month}
|
||||
@var{month} @var{day} @var{year}
|
||||
@var{day}-@var{month}-@var{year}
|
||||
@end example
|
||||
|
||||
Or, omitting the year:
|
||||
|
||||
@example
|
||||
@var{month} @var{day}
|
||||
@end example
|
||||
|
||||
|
||||
@node Time of day items
|
||||
@section Time of day items
|
||||
|
||||
@cindex time of day item
|
||||
|
||||
A @dfn{time of day item} in date strings specifies the time on a given
|
||||
day. Here are some examples, all of which represent the same time:
|
||||
|
||||
@example
|
||||
20:02:00.000000
|
||||
20:02
|
||||
8:02pm
|
||||
20:02-0500 # In @sc{est} (U.S. Eastern Standard Time).
|
||||
@end example
|
||||
|
||||
More generally, the time of day may be given as
|
||||
@samp{@var{hour}:@var{minute}:@var{second}}, where @var{hour} is
|
||||
a number between 0 and 23, @var{minute} is a number between 0 and
|
||||
59, and @var{second} is a number between 0 and 59 possibly followed by
|
||||
@samp{.} or @samp{,} and a fraction containing one or more digits.
|
||||
Alternatively,
|
||||
@samp{:@var{second}} can be omitted, in which case it is taken to
|
||||
be zero. On the rare hosts that support leap seconds, @var{second}
|
||||
may be 60.
|
||||
|
||||
@findex am @r{in date strings}
|
||||
@findex pm @r{in date strings}
|
||||
@findex midnight @r{in date strings}
|
||||
@findex noon @r{in date strings}
|
||||
If the time is followed by @samp{am} or @samp{pm} (or @samp{a.m.}
|
||||
or @samp{p.m.}), @var{hour} is restricted to run from 1 to 12, and
|
||||
@samp{:@var{minute}} may be omitted (taken to be zero). @samp{am}
|
||||
indicates the first half of the day, @samp{pm} indicates the second
|
||||
half of the day. In this notation, 12 is the predecessor of 1:
|
||||
midnight is @samp{12am} while noon is @samp{12pm}.
|
||||
(This is the zero-oriented interpretation of @samp{12am} and @samp{12pm},
|
||||
as opposed to the old tradition derived from Latin
|
||||
which uses @samp{12m} for noon and @samp{12pm} for midnight.)
|
||||
|
||||
@cindex time zone correction
|
||||
@cindex minutes, time zone correction by
|
||||
The time may alternatively be followed by a time zone correction,
|
||||
expressed as @samp{@var{s}@var{hh}@var{mm}}, where @var{s} is @samp{+}
|
||||
or @samp{-}, @var{hh} is a number of zone hours and @var{mm} is a number
|
||||
of zone minutes. You can also separate @var{hh} from @var{mm} with a colon.
|
||||
When a time zone correction is given this way, it
|
||||
forces interpretation of the time relative to
|
||||
Coordinated Universal Time (@sc{utc}), overriding any previous
|
||||
specification for the time zone or the local time zone. For example,
|
||||
@samp{+0530} and @samp{+05:30} both stand for the time zone 5.5 hours
|
||||
ahead of @sc{utc} (e.g., India). The @var{minute}
|
||||
part of the time of day may not be elided when a time zone correction
|
||||
is used. This is the best way to specify a time zone correction by
|
||||
fractional parts of an hour.
|
||||
|
||||
Either @samp{am}/@samp{pm} or a time zone correction may be specified,
|
||||
but not both.
|
||||
|
||||
|
||||
@node Time zone items
|
||||
@section Time zone items
|
||||
|
||||
@cindex time zone item
|
||||
|
||||
A @dfn{time zone item} specifies an international time zone, indicated
|
||||
by a small set of letters, e.g., @samp{UTC} or @samp{Z}
|
||||
for Coordinated Universal
|
||||
Time. Any included periods are ignored. By following a
|
||||
non-daylight-saving time zone by the string @samp{DST} in a separate
|
||||
word (that is, separated by some white space), the corresponding
|
||||
daylight saving time zone may be specified.
|
||||
Alternatively, a non-daylight-saving time zone can be followed by a
|
||||
time zone correction, to add the two values. This is normally done
|
||||
only for @samp{UTC}; for example, @samp{UTC+05:30} is equivalent to
|
||||
@samp{+05:30}.
|
||||
|
||||
Time zone items other than @samp{UTC} and @samp{Z}
|
||||
are obsolescent and are not recommended, because they
|
||||
are ambiguous; for example, @samp{EST} has a different meaning in
|
||||
Australia than in the United States. Instead, it's better to use
|
||||
unambiguous numeric time zone corrections like @samp{-0500}, as
|
||||
described in the previous section.
|
||||
|
||||
If neither a time zone item nor a time zone correction is supplied,
|
||||
time stamps are interpreted using the rules of the default time zone
|
||||
(@pxref{Specifying time zone rules}).
|
||||
|
||||
|
||||
@node Day of week items
|
||||
@section Day of week items
|
||||
|
||||
@cindex day of week item
|
||||
|
||||
The explicit mention of a day of the week will forward the date
|
||||
(only if necessary) to reach that day of the week in the future.
|
||||
|
||||
Days of the week may be spelled out in full: @samp{Sunday},
|
||||
@samp{Monday}, @samp{Tuesday}, @samp{Wednesday}, @samp{Thursday},
|
||||
@samp{Friday} or @samp{Saturday}. Days may be abbreviated to their
|
||||
first three letters, optionally followed by a period. The special
|
||||
abbreviations @samp{Tues} for @samp{Tuesday}, @samp{Wednes} for
|
||||
@samp{Wednesday} and @samp{Thur} or @samp{Thurs} for @samp{Thursday} are
|
||||
also allowed.
|
||||
|
||||
@findex next @var{day}
|
||||
@findex last @var{day}
|
||||
A number may precede a day of the week item to move forward
|
||||
supplementary weeks. It is best used in expression like @samp{third
|
||||
monday}. In this context, @samp{last @var{day}} or @samp{next
|
||||
@var{day}} is also acceptable; they move one week before or after
|
||||
the day that @var{day} by itself would represent.
|
||||
|
||||
A comma following a day of the week item is ignored.
|
||||
|
||||
|
||||
@node Relative items in date strings
|
||||
@section Relative items in date strings
|
||||
|
||||
@cindex relative items in date strings
|
||||
@cindex displacement of dates
|
||||
|
||||
@dfn{Relative items} adjust a date (or the current date if none) forward
|
||||
or backward. The effects of relative items accumulate. Here are some
|
||||
examples:
|
||||
|
||||
@example
|
||||
1 year
|
||||
1 year ago
|
||||
3 years
|
||||
2 days
|
||||
@end example
|
||||
|
||||
@findex year @r{in date strings}
|
||||
@findex month @r{in date strings}
|
||||
@findex fortnight @r{in date strings}
|
||||
@findex week @r{in date strings}
|
||||
@findex day @r{in date strings}
|
||||
@findex hour @r{in date strings}
|
||||
@findex minute @r{in date strings}
|
||||
The unit of time displacement may be selected by the string @samp{year}
|
||||
or @samp{month} for moving by whole years or months. These are fuzzy
|
||||
units, as years and months are not all of equal duration. More precise
|
||||
units are @samp{fortnight} which is worth 14 days, @samp{week} worth 7
|
||||
days, @samp{day} worth 24 hours, @samp{hour} worth 60 minutes,
|
||||
@samp{minute} or @samp{min} worth 60 seconds, and @samp{second} or
|
||||
@samp{sec} worth one second. An @samp{s} suffix on these units is
|
||||
accepted and ignored.
|
||||
|
||||
@findex ago @r{in date strings}
|
||||
The unit of time may be preceded by a multiplier, given as an optionally
|
||||
signed number. Unsigned numbers are taken as positively signed. No
|
||||
number at all implies 1 for a multiplier. Following a relative item by
|
||||
the string @samp{ago} is equivalent to preceding the unit by a
|
||||
multiplier with value @math{-1}.
|
||||
|
||||
@findex day @r{in date strings}
|
||||
@findex tomorrow @r{in date strings}
|
||||
@findex yesterday @r{in date strings}
|
||||
The string @samp{tomorrow} is worth one day in the future (equivalent
|
||||
to @samp{day}), the string @samp{yesterday} is worth
|
||||
one day in the past (equivalent to @samp{day ago}).
|
||||
|
||||
@findex now @r{in date strings}
|
||||
@findex today @r{in date strings}
|
||||
@findex this @r{in date strings}
|
||||
The strings @samp{now} or @samp{today} are relative items corresponding
|
||||
to zero-valued time displacement, these strings come from the fact
|
||||
a zero-valued time displacement represents the current time when not
|
||||
otherwise changed by previous items. They may be used to stress other
|
||||
items, like in @samp{12:00 today}. The string @samp{this} also has
|
||||
the meaning of a zero-valued time displacement, but is preferred in
|
||||
date strings like @samp{this thursday}.
|
||||
|
||||
When a relative item causes the resulting date to cross a boundary
|
||||
where the clocks were adjusted, typically for daylight saving time,
|
||||
the resulting date and time are adjusted accordingly.
|
||||
|
||||
The fuzz in units can cause problems with relative items. For
|
||||
example, @samp{2003-07-31 -1 month} might evaluate to 2003-07-01,
|
||||
because 2003-06-31 is an invalid date. To determine the previous
|
||||
month more reliably, you can ask for the month before the 15th of the
|
||||
current month. For example:
|
||||
|
||||
@example
|
||||
$ date -R
|
||||
Thu, 31 Jul 2003 13:02:39 -0700
|
||||
$ date --date='-1 month' +'Last month was %B?'
|
||||
Last month was July?
|
||||
$ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!'
|
||||
Last month was June!
|
||||
@end example
|
||||
|
||||
Also, take care when manipulating dates around clock changes such as
|
||||
daylight saving leaps. In a few cases these have added or subtracted
|
||||
as much as 24 hours from the clock, so it is often wise to adopt
|
||||
universal time by setting the @env{TZ} environment variable to
|
||||
@samp{UTC0} before embarking on calendrical calculations.
|
||||
|
||||
@node Pure numbers in date strings
|
||||
@section Pure numbers in date strings
|
||||
|
||||
@cindex pure numbers in date strings
|
||||
|
||||
The precise interpretation of a pure decimal number depends
|
||||
on the context in the date string.
|
||||
|
||||
If the decimal number is of the form @var{yyyy}@var{mm}@var{dd} and no
|
||||
other calendar date item (@pxref{Calendar date items}) appears before it
|
||||
in the date string, then @var{yyyy} is read as the year, @var{mm} as the
|
||||
month number and @var{dd} as the day of the month, for the specified
|
||||
calendar date.
|
||||
|
||||
If the decimal number is of the form @var{hh}@var{mm} and no other time
|
||||
of day item appears before it in the date string, then @var{hh} is read
|
||||
as the hour of the day and @var{mm} as the minute of the hour, for the
|
||||
specified time of day. @var{mm} can also be omitted.
|
||||
|
||||
If both a calendar date and a time of day appear to the left of a number
|
||||
in the date string, but no relative item, then the number overrides the
|
||||
year.
|
||||
|
||||
|
||||
@node Seconds since the Epoch
|
||||
@section Seconds since the Epoch
|
||||
|
||||
If you precede a number with @samp{@@}, it represents an internal time
|
||||
stamp as a count of seconds. The number can contain an internal
|
||||
decimal point (either @samp{.} or @samp{,}); any excess precision not
|
||||
supported by the internal representation is truncated toward minus
|
||||
infinity. Such a number cannot be combined with any other date
|
||||
item, as it specifies a complete time stamp.
|
||||
|
||||
@cindex beginning of time, for @acronym{POSIX}
|
||||
@cindex epoch, for @acronym{POSIX}
|
||||
Internally, computer times are represented as a count of seconds since
|
||||
an epoch---a well-defined point of time. On @acronym{GNU} and
|
||||
@acronym{POSIX} systems, the epoch is 1970-01-01 00:00:00 @sc{utc}, so
|
||||
@samp{@@0} represents this time, @samp{@@1} represents 1970-01-01
|
||||
00:00:01 @sc{utc}, and so forth. @acronym{GNU} and most other
|
||||
@acronym{POSIX}-compliant systems support such times as an extension
|
||||
to @acronym{POSIX}, using negative counts, so that @samp{@@-1}
|
||||
represents 1969-12-31 23:59:59 @sc{utc}.
|
||||
|
||||
Traditional Unix systems count seconds with 32-bit two's-complement
|
||||
integers and can represent times from 1901-12-13 20:45:52 through
|
||||
2038-01-19 03:14:07 @sc{utc}. More modern systems use 64-bit counts
|
||||
of seconds with nanosecond subcounts, and can represent all the times
|
||||
in the known lifetime of the universe to a resolution of 1 nanosecond.
|
||||
|
||||
On most hosts, these counts ignore the presence of leap seconds.
|
||||
For example, on most hosts @samp{@@915148799} represents 1998-12-31
|
||||
23:59:59 @sc{utc}, @samp{@@915148800} represents 1999-01-01 00:00:00
|
||||
@sc{utc}, and there is no way to represent the intervening leap second
|
||||
1998-12-31 23:59:60 @sc{utc}.
|
||||
|
||||
@node Specifying time zone rules
|
||||
@section Specifying time zone rules
|
||||
|
||||
@vindex TZ
|
||||
Normally, dates are interpreted using the rules of the current time
|
||||
zone, which in turn are specified by the @env{TZ} environment
|
||||
variable, or by a system default if @env{TZ} is not set. To specify a
|
||||
different set of default time zone rules that apply just to one date,
|
||||
start the date with a string of the form @samp{TZ="@var{rule}"}. The
|
||||
two quote characters (@samp{"}) must be present in the date, and any
|
||||
quotes or backslashes within @var{rule} must be escaped by a
|
||||
backslash.
|
||||
|
||||
For example, with the @acronym{GNU} @command{date} command you can
|
||||
answer the question ``What time is it in New York when a Paris clock
|
||||
shows 6:30am on October 31, 2004?'' by using a date beginning with
|
||||
@samp{TZ="Europe/Paris"} as shown in the following shell transcript:
|
||||
|
||||
@example
|
||||
$ export TZ="America/New_York"
|
||||
$ date --date='TZ="Europe/Paris" 2004-10-31 06:30'
|
||||
Sun Oct 31 01:30:00 EDT 2004
|
||||
@end example
|
||||
|
||||
In this example, the @option{--date} operand begins with its own
|
||||
@env{TZ} setting, so the rest of that operand is processed according
|
||||
to @samp{Europe/Paris} rules, treating the string @samp{2004-10-31
|
||||
06:30} as if it were in Paris. However, since the output of the
|
||||
@command{date} command is processed according to the overall time zone
|
||||
rules, it uses New York time. (Paris was normally six hours ahead of
|
||||
New York in 2004, but this example refers to a brief Halloween period
|
||||
when the gap was five hours.)
|
||||
|
||||
A @env{TZ} value is a rule that typically names a location in the
|
||||
@uref{http://www.twinsun.com/tz/tz-link.htm, @samp{tz} database}.
|
||||
A recent catalog of location names appears in the
|
||||
@uref{http://twiki.org/cgi-bin/xtra/tzdate, TWiki Date and Time
|
||||
Gateway}. A few non-@acronym{GNU} hosts require a colon before a
|
||||
location name in a @env{TZ} setting, e.g.,
|
||||
@samp{TZ=":America/New_York"}.
|
||||
|
||||
The @samp{tz} database includes a wide variety of locations ranging
|
||||
from @samp{Arctic/Longyearbyen} to @samp{Antarctica/South_Pole}, but
|
||||
if you are at sea and have your own private time zone, or if you are
|
||||
using a non-@acronym{GNU} host that does not support the @samp{tz}
|
||||
database, you may need to use a @acronym{POSIX} rule instead. Simple
|
||||
@acronym{POSIX} rules like @samp{UTC0} specify a time zone without
|
||||
daylight saving time; other rules can specify simple daylight saving
|
||||
regimes. @xref{TZ Variable,, Specifying the Time Zone with @code{TZ},
|
||||
libc, The GNU C Library}.
|
||||
|
||||
@node Authors of get_date
|
||||
@section Authors of @code{get_date}
|
||||
|
||||
@cindex authors of @code{get_date}
|
||||
|
||||
@cindex Bellovin, Steven M.
|
||||
@cindex Salz, Rich
|
||||
@cindex Berets, Jim
|
||||
@cindex MacKenzie, David
|
||||
@cindex Meyering, Jim
|
||||
@cindex Eggert, Paul
|
||||
@code{get_date} was originally implemented by Steven M. Bellovin
|
||||
(@email{smb@@research.att.com}) while at the University of North Carolina
|
||||
at Chapel Hill. The code was later tweaked by a couple of people on
|
||||
Usenet, then completely overhauled by Rich $alz (@email{rsalz@@bbn.com})
|
||||
and Jim Berets (@email{jberets@@bbn.com}) in August, 1990. Various
|
||||
revisions for the @sc{gnu} system were made by David MacKenzie, Jim Meyering,
|
||||
Paul Eggert and others.
|
||||
|
||||
@cindex Pinard, F.
|
||||
@cindex Berry, K.
|
||||
This chapter was originally produced by Fran@,{c}ois Pinard
|
||||
(@email{pinard@@iro.umontreal.ca}) from the @file{getdate.y} source code,
|
||||
and then edited by K.@: Berry (@email{kb@@cs.umb.edu}).
|
242
gnutar/doc/header.texi
Normal file
242
gnutar/doc/header.texi
Normal file
@ -0,0 +1,242 @@
|
||||
@comment GNU tar Archive Format description.
|
||||
@comment
|
||||
@comment Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
||||
@comment 2000, 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
@comment
|
||||
@comment This program is free software; you can redistribute it and/or modify it
|
||||
@comment under the terms of the GNU General Public License as published by the
|
||||
@comment Free Software Foundation; either version 2, or (at your option) any later
|
||||
@comment version.
|
||||
@comment
|
||||
@comment This program is distributed in the hope that it will be useful, but
|
||||
@comment WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@comment MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
@comment Public License for more details.
|
||||
@comment
|
||||
@comment You should have received a copy of the GNU General Public License along
|
||||
@comment with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
@comment 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
/*@r{ tar Header Block, from POSIX 1003.1-1990. }*/
|
||||
|
||||
/*@r{ POSIX header. }*/
|
||||
|
||||
struct posix_header
|
||||
@{ /*@r{ byte offset }*/
|
||||
char name[100]; /*@r{ 0 }*/
|
||||
char mode[8]; /*@r{ 100 }*/
|
||||
char uid[8]; /*@r{ 108 }*/
|
||||
char gid[8]; /*@r{ 116 }*/
|
||||
char size[12]; /*@r{ 124 }*/
|
||||
char mtime[12]; /*@r{ 136 }*/
|
||||
char chksum[8]; /*@r{ 148 }*/
|
||||
char typeflag; /*@r{ 156 }*/
|
||||
char linkname[100]; /*@r{ 157 }*/
|
||||
char magic[6]; /*@r{ 257 }*/
|
||||
char version[2]; /*@r{ 263 }*/
|
||||
char uname[32]; /*@r{ 265 }*/
|
||||
char gname[32]; /*@r{ 297 }*/
|
||||
char devmajor[8]; /*@r{ 329 }*/
|
||||
char devminor[8]; /*@r{ 337 }*/
|
||||
char prefix[155]; /*@r{ 345 }*/
|
||||
/*@r{ 500 }*/
|
||||
@};
|
||||
|
||||
#define TMAGIC "ustar" /*@r{ ustar and a null }*/
|
||||
#define TMAGLEN 6
|
||||
#define TVERSION "00" /*@r{ 00 and no null }*/
|
||||
#define TVERSLEN 2
|
||||
|
||||
/*@r{ Values used in typeflag field. }*/
|
||||
#define REGTYPE '0' /*@r{ regular file }*/
|
||||
#define AREGTYPE '\0' /*@r{ regular file }*/
|
||||
#define LNKTYPE '1' /*@r{ link }*/
|
||||
#define SYMTYPE '2' /*@r{ reserved }*/
|
||||
#define CHRTYPE '3' /*@r{ character special }*/
|
||||
#define BLKTYPE '4' /*@r{ block special }*/
|
||||
#define DIRTYPE '5' /*@r{ directory }*/
|
||||
#define FIFOTYPE '6' /*@r{ FIFO special }*/
|
||||
#define CONTTYPE '7' /*@r{ reserved }*/
|
||||
|
||||
#define XHDTYPE 'x' /*@r{ Extended header referring to the
|
||||
next file in the archive }*/
|
||||
#define XGLTYPE 'g' /*@r{ Global extended header }*/
|
||||
|
||||
/*@r{ Bits used in the mode field, values in octal. }*/
|
||||
#define TSUID 04000 /*@r{ set UID on execution }*/
|
||||
#define TSGID 02000 /*@r{ set GID on execution }*/
|
||||
#define TSVTX 01000 /*@r{ reserved }*/
|
||||
/*@r{ file permissions }*/
|
||||
#define TUREAD 00400 /*@r{ read by owner }*/
|
||||
#define TUWRITE 00200 /*@r{ write by owner }*/
|
||||
#define TUEXEC 00100 /*@r{ execute/search by owner }*/
|
||||
#define TGREAD 00040 /*@r{ read by group }*/
|
||||
#define TGWRITE 00020 /*@r{ write by group }*/
|
||||
#define TGEXEC 00010 /*@r{ execute/search by group }*/
|
||||
#define TOREAD 00004 /*@r{ read by other }*/
|
||||
#define TOWRITE 00002 /*@r{ write by other }*/
|
||||
#define TOEXEC 00001 /*@r{ execute/search by other }*/
|
||||
|
||||
/*@r{ tar Header Block, GNU extensions. }*/
|
||||
|
||||
/*@r{ In GNU tar, SYMTYPE is for to symbolic links, and CONTTYPE is for
|
||||
contiguous files, so maybe disobeying the `reserved' comment in POSIX
|
||||
header description. I suspect these were meant to be used this way, and
|
||||
should not have really been `reserved' in the published standards. }*/
|
||||
|
||||
/*@r{ *BEWARE* *BEWARE* *BEWARE* that the following information is still
|
||||
boiling, and may change. Even if the OLDGNU format description should be
|
||||
accurate, the so-called GNU format is not yet fully decided. It is
|
||||
surely meant to use only extensions allowed by POSIX, but the sketch
|
||||
below repeats some ugliness from the OLDGNU format, which should rather
|
||||
go away. Sparse files should be saved in such a way that they do *not*
|
||||
require two passes at archive creation time. Huge files get some POSIX
|
||||
fields to overflow, alternate solutions have to be sought for this. }*/
|
||||
|
||||
/*@r{ Descriptor for a single file hole. }*/
|
||||
|
||||
struct sparse
|
||||
@{ /*@r{ byte offset }*/
|
||||
char offset[12]; /*@r{ 0 }*/
|
||||
char numbytes[12]; /*@r{ 12 }*/
|
||||
/*@r{ 24 }*/
|
||||
@};
|
||||
|
||||
/*@r{ Sparse files are not supported in POSIX ustar format. For sparse files
|
||||
with a POSIX header, a GNU extra header is provided which holds overall
|
||||
sparse information and a few sparse descriptors. When an old GNU header
|
||||
replaces both the POSIX header and the GNU extra header, it holds some
|
||||
sparse descriptors too. Whether POSIX or not, if more sparse descriptors
|
||||
are still needed, they are put into as many successive sparse headers as
|
||||
necessary. The following constants tell how many sparse descriptors fit
|
||||
in each kind of header able to hold them. }*/
|
||||
|
||||
#define SPARSES_IN_EXTRA_HEADER 16
|
||||
#define SPARSES_IN_OLDGNU_HEADER 4
|
||||
#define SPARSES_IN_SPARSE_HEADER 21
|
||||
|
||||
/*@r{ Extension header for sparse files, used immediately after the GNU extra
|
||||
header, and used only if all sparse information cannot fit into that
|
||||
extra header. There might even be many such extension headers, one after
|
||||
the other, until all sparse information has been recorded. }*/
|
||||
|
||||
struct sparse_header
|
||||
@{ /*@r{ byte offset }*/
|
||||
struct sparse sp[SPARSES_IN_SPARSE_HEADER];
|
||||
/*@r{ 0 }*/
|
||||
char isextended; /*@r{ 504 }*/
|
||||
/*@r{ 505 }*/
|
||||
@};
|
||||
|
||||
/*@r{ The old GNU format header conflicts with POSIX format in such a way that
|
||||
POSIX archives may fool old GNU tar's, and POSIX tar's might well be
|
||||
fooled by old GNU tar archives. An old GNU format header uses the space
|
||||
used by the prefix field in a POSIX header, and cumulates information
|
||||
normally found in a GNU extra header. With an old GNU tar header, we
|
||||
never see any POSIX header nor GNU extra header. Supplementary sparse
|
||||
headers are allowed, however. }*/
|
||||
|
||||
struct oldgnu_header
|
||||
@{ /*@r{ byte offset }*/
|
||||
char unused_pad1[345]; /*@r{ 0 }*/
|
||||
char atime[12]; /*@r{ 345 Incr. archive: atime of the file }*/
|
||||
char ctime[12]; /*@r{ 357 Incr. archive: ctime of the file }*/
|
||||
char offset[12]; /*@r{ 369 Multivolume archive: the offset of
|
||||
the start of this volume }*/
|
||||
char longnames[4]; /*@r{ 381 Not used }*/
|
||||
char unused_pad2; /*@r{ 385 }*/
|
||||
struct sparse sp[SPARSES_IN_OLDGNU_HEADER];
|
||||
/*@r{ 386 }*/
|
||||
char isextended; /*@r{ 482 Sparse file: Extension sparse header
|
||||
follows }*/
|
||||
char realsize[12]; /*@r{ 483 Sparse file: Real size}*/
|
||||
/*@r{ 495 }*/
|
||||
@};
|
||||
|
||||
/*@r{ OLDGNU_MAGIC uses both magic and version fields, which are contiguous.
|
||||
Found in an archive, it indicates an old GNU header format, which will be
|
||||
hopefully become obsolescent. With OLDGNU_MAGIC, uname and gname are
|
||||
valid, though the header is not truly POSIX conforming. }*/
|
||||
#define OLDGNU_MAGIC "ustar " /*@r{ 7 chars and a null }*/
|
||||
|
||||
/*@r{ The standards committee allows only capital A through capital Z for
|
||||
user-defined expansion. Other letters in use include:
|
||||
|
||||
'A' Solaris Access Control List
|
||||
'E' Solaris Extended Attribute File
|
||||
'I' Inode only, as in 'star'
|
||||
'N' Obsolete GNU tar, for file names that do not fit into the main header.
|
||||
'X' POSIX 1003.1-2001 eXtended (VU version) }*/
|
||||
|
||||
/*@r{ This is a dir entry that contains the names of files that were in the
|
||||
dir at the time the dump was made. }*/
|
||||
#define GNUTYPE_DUMPDIR 'D'
|
||||
|
||||
/*@r{ Identifies the *next* file on the tape as having a long linkname. }*/
|
||||
#define GNUTYPE_LONGLINK 'K'
|
||||
|
||||
/*@r{ Identifies the *next* file on the tape as having a long name. }*/
|
||||
#define GNUTYPE_LONGNAME 'L'
|
||||
|
||||
/*@r{ This is the continuation of a file that began on another volume. }*/
|
||||
#define GNUTYPE_MULTIVOL 'M'
|
||||
|
||||
/*@r{ This is for sparse files. }*/
|
||||
#define GNUTYPE_SPARSE 'S'
|
||||
|
||||
/*@r{ This file is a tape/volume header. Ignore it on extraction. }*/
|
||||
#define GNUTYPE_VOLHDR 'V'
|
||||
|
||||
/*@r{ Solaris extended header }*/
|
||||
#define SOLARIS_XHDTYPE 'X'
|
||||
|
||||
/*@r{ J@"org Schilling star header }*/
|
||||
|
||||
struct star_header
|
||||
@{ /*@r{ byte offset }*/
|
||||
char name[100]; /*@r{ 0 }*/
|
||||
char mode[8]; /*@r{ 100 }*/
|
||||
char uid[8]; /*@r{ 108 }*/
|
||||
char gid[8]; /*@r{ 116 }*/
|
||||
char size[12]; /*@r{ 124 }*/
|
||||
char mtime[12]; /*@r{ 136 }*/
|
||||
char chksum[8]; /*@r{ 148 }*/
|
||||
char typeflag; /*@r{ 156 }*/
|
||||
char linkname[100]; /*@r{ 157 }*/
|
||||
char magic[6]; /*@r{ 257 }*/
|
||||
char version[2]; /*@r{ 263 }*/
|
||||
char uname[32]; /*@r{ 265 }*/
|
||||
char gname[32]; /*@r{ 297 }*/
|
||||
char devmajor[8]; /*@r{ 329 }*/
|
||||
char devminor[8]; /*@r{ 337 }*/
|
||||
char prefix[131]; /*@r{ 345 }*/
|
||||
char atime[12]; /*@r{ 476 }*/
|
||||
char ctime[12]; /*@r{ 488 }*/
|
||||
/*@r{ 500 }*/
|
||||
@};
|
||||
|
||||
#define SPARSES_IN_STAR_HEADER 4
|
||||
#define SPARSES_IN_STAR_EXT_HEADER 21
|
||||
|
||||
struct star_in_header
|
||||
@{
|
||||
char fill[345]; /*@r{ 0 Everything that is before t_prefix }*/
|
||||
char prefix[1]; /*@r{ 345 t_name prefix }*/
|
||||
char fill2; /*@r{ 346 }*/
|
||||
char fill3[8]; /*@r{ 347 }*/
|
||||
char isextended; /*@r{ 355 }*/
|
||||
struct sparse sp[SPARSES_IN_STAR_HEADER]; /*@r{ 356 }*/
|
||||
char realsize[12]; /*@r{ 452 Actual size of the file }*/
|
||||
char offset[12]; /*@r{ 464 Offset of multivolume contents }*/
|
||||
char atime[12]; /*@r{ 476 }*/
|
||||
char ctime[12]; /*@r{ 488 }*/
|
||||
char mfill[8]; /*@r{ 500 }*/
|
||||
char xmagic[4]; /*@r{ 508 "tar" }*/
|
||||
@};
|
||||
|
||||
struct star_ext_header
|
||||
@{
|
||||
struct sparse sp[SPARSES_IN_STAR_EXT_HEADER];
|
||||
char isextended;
|
||||
@};
|
||||
|
335
gnutar/doc/intern.texi
Normal file
335
gnutar/doc/intern.texi
Normal file
@ -0,0 +1,335 @@
|
||||
@c This is part of the paxutils manual.
|
||||
@c Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
@c This file is distributed under GFDL 1.1 or any later version
|
||||
@c published by the Free Software Foundation.
|
||||
|
||||
@menu
|
||||
* Standard:: Basic Tar Format
|
||||
* Extensions:: @acronym{GNU} Extensions to the Archive Format
|
||||
* Sparse Formats:: Storing Sparse Files
|
||||
* Snapshot Files::
|
||||
* Dumpdir::
|
||||
@end menu
|
||||
|
||||
@node Standard
|
||||
@unnumberedsec Basic Tar Format
|
||||
@UNREVISED
|
||||
|
||||
While an archive may contain many files, the archive itself is a
|
||||
single ordinary file. Like any other file, an archive file can be
|
||||
written to a storage device such as a tape or disk, sent through a
|
||||
pipe or over a network, saved on the active file system, or even
|
||||
stored in another archive. An archive file is not easy to read or
|
||||
manipulate without using the @command{tar} utility or Tar mode in
|
||||
@acronym{GNU} Emacs.
|
||||
|
||||
Physically, an archive consists of a series of file entries terminated
|
||||
by an end-of-archive entry, which consists of two 512 blocks of zero
|
||||
bytes. A file
|
||||
entry usually describes one of the files in the archive (an
|
||||
@dfn{archive member}), and consists of a file header and the contents
|
||||
of the file. File headers contain file names and statistics, checksum
|
||||
information which @command{tar} uses to detect file corruption, and
|
||||
information about file types.
|
||||
|
||||
Archives are permitted to have more than one member with the same
|
||||
member name. One way this situation can occur is if more than one
|
||||
version of a file has been stored in the archive. For information
|
||||
about adding new versions of a file to an archive, see @ref{update}.
|
||||
@FIXME-xref{To learn more about having more than one archive member with the
|
||||
same name, see -backup node, when it's written.}
|
||||
|
||||
In addition to entries describing archive members, an archive may
|
||||
contain entries which @command{tar} itself uses to store information.
|
||||
@xref{label}, for an example of such an archive entry.
|
||||
|
||||
A @command{tar} archive file contains a series of blocks. Each block
|
||||
contains @code{BLOCKSIZE} bytes. Although this format may be thought
|
||||
of as being on magnetic tape, other media are often used.
|
||||
|
||||
Each file archived is represented by a header block which describes
|
||||
the file, followed by zero or more blocks which give the contents
|
||||
of the file. At the end of the archive file there are two 512-byte blocks
|
||||
filled with binary zeros as an end-of-file marker. A reasonable system
|
||||
should write such end-of-file marker at the end of an archive, but
|
||||
must not assume that such a block exists when reading an archive. In
|
||||
particular @GNUTAR{} always issues a warning if it does not encounter it.
|
||||
|
||||
The blocks may be @dfn{blocked} for physical I/O operations.
|
||||
Each record of @var{n} blocks (where @var{n} is set by the
|
||||
@option{--blocking-factor=@var{512-size}} (@option{-b @var{512-size}}) option to @command{tar}) is written with a single
|
||||
@w{@samp{write ()}} operation. On magnetic tapes, the result of
|
||||
such a write is a single record. When writing an archive,
|
||||
the last record of blocks should be written at the full size, with
|
||||
blocks after the zero block containing all zeros. When reading
|
||||
an archive, a reasonable system should properly handle an archive
|
||||
whose last record is shorter than the rest, or which contains garbage
|
||||
records after a zero block.
|
||||
|
||||
The header block is defined in C as follows. In the @GNUTAR{}
|
||||
distribution, this is part of file @file{src/tar.h}:
|
||||
|
||||
@smallexample
|
||||
@include header.texi
|
||||
@end smallexample
|
||||
|
||||
All characters in header blocks are represented by using 8-bit
|
||||
characters in the local variant of ASCII. Each field within the
|
||||
structure is contiguous; that is, there is no padding used within
|
||||
the structure. Each character on the archive medium is stored
|
||||
contiguously.
|
||||
|
||||
Bytes representing the contents of files (after the header block
|
||||
of each file) are not translated in any way and are not constrained
|
||||
to represent characters in any character set. The @command{tar} format
|
||||
does not distinguish text files from binary files, and no translation
|
||||
of file contents is performed.
|
||||
|
||||
The @code{name}, @code{linkname}, @code{magic}, @code{uname}, and
|
||||
@code{gname} are null-terminated character strings. All other fields
|
||||
are zero-filled octal numbers in ASCII. Each numeric field of width
|
||||
@var{w} contains @var{w} minus 1 digits, and a null.
|
||||
|
||||
The @code{name} field is the file name of the file, with directory names
|
||||
(if any) preceding the file name, separated by slashes.
|
||||
|
||||
@FIXME{how big a name before field overflows?}
|
||||
|
||||
The @code{mode} field provides nine bits specifying file permissions
|
||||
and three bits to specify the Set @acronym{UID}, Set @acronym{GID}, and Save Text
|
||||
(@dfn{sticky}) modes. Values for these bits are defined above.
|
||||
When special permissions are required to create a file with a given
|
||||
mode, and the user restoring files from the archive does not hold such
|
||||
permissions, the mode bit(s) specifying those special permissions
|
||||
are ignored. Modes which are not supported by the operating system
|
||||
restoring files from the archive will be ignored. Unsupported modes
|
||||
should be faked up when creating or updating an archive; e.g., the
|
||||
group permission could be copied from the @emph{other} permission.
|
||||
|
||||
The @code{uid} and @code{gid} fields are the numeric user and group
|
||||
@acronym{ID} of the file owners, respectively. If the operating system does
|
||||
not support numeric user or group @acronym{ID}s, these fields should be ignored.
|
||||
|
||||
The @code{size} field is the size of the file in bytes; linked files
|
||||
are archived with this field specified as zero. @FIXME-xref{Modifiers, in
|
||||
particular the @option{--incremental} (@option{-G}) option.}
|
||||
|
||||
The @code{mtime} field is the data modification time of the file at
|
||||
the time it was archived. It is the ASCII representation of the octal
|
||||
value of the last time the file's contents were modified, represented
|
||||
as an integer number of
|
||||
seconds since January 1, 1970, 00:00 Coordinated Universal Time.
|
||||
|
||||
The @code{chksum} field is the ASCII representation of the octal value
|
||||
of the simple sum of all bytes in the header block. Each 8-bit
|
||||
byte in the header is added to an unsigned integer, initialized to
|
||||
zero, the precision of which shall be no less than seventeen bits.
|
||||
When calculating the checksum, the @code{chksum} field is treated as
|
||||
if it were all blanks.
|
||||
|
||||
The @code{typeflag} field specifies the type of file archived. If a
|
||||
particular implementation does not recognize or permit the specified
|
||||
type, the file will be extracted as if it were a regular file. As this
|
||||
action occurs, @command{tar} issues a warning to the standard error.
|
||||
|
||||
The @code{atime} and @code{ctime} fields are used in making incremental
|
||||
backups; they store, respectively, the particular file's access and
|
||||
status change times.
|
||||
|
||||
The @code{offset} is used by the @option{--multi-volume} (@option{-M}) option, when
|
||||
making a multi-volume archive. The offset is number of bytes into
|
||||
the file that we need to restart at to continue the file on the next
|
||||
tape, i.e., where we store the location that a continued file is
|
||||
continued at.
|
||||
|
||||
The following fields were added to deal with sparse files. A file
|
||||
is @dfn{sparse} if it takes in unallocated blocks which end up being
|
||||
represented as zeros, i.e., no useful data. A test to see if a file
|
||||
is sparse is to look at the number blocks allocated for it versus the
|
||||
number of characters in the file; if there are fewer blocks allocated
|
||||
for the file than would normally be allocated for a file of that
|
||||
size, then the file is sparse. This is the method @command{tar} uses to
|
||||
detect a sparse file, and once such a file is detected, it is treated
|
||||
differently from non-sparse files.
|
||||
|
||||
Sparse files are often @code{dbm} files, or other database-type files
|
||||
which have data at some points and emptiness in the greater part of
|
||||
the file. Such files can appear to be very large when an @samp{ls
|
||||
-l} is done on them, when in truth, there may be a very small amount
|
||||
of important data contained in the file. It is thus undesirable
|
||||
to have @command{tar} think that it must back up this entire file, as
|
||||
great quantities of room are wasted on empty blocks, which can lead
|
||||
to running out of room on a tape far earlier than is necessary.
|
||||
Thus, sparse files are dealt with so that these empty blocks are
|
||||
not written to the tape. Instead, what is written to the tape is a
|
||||
description, of sorts, of the sparse file: where the holes are, how
|
||||
big the holes are, and how much data is found at the end of the hole.
|
||||
This way, the file takes up potentially far less room on the tape,
|
||||
and when the file is extracted later on, it will look exactly the way
|
||||
it looked beforehand. The following is a description of the fields
|
||||
used to handle a sparse file:
|
||||
|
||||
The @code{sp} is an array of @code{struct sparse}. Each @code{struct
|
||||
sparse} contains two 12-character strings which represent an offset
|
||||
into the file and a number of bytes to be written at that offset.
|
||||
The offset is absolute, and not relative to the offset in preceding
|
||||
array element.
|
||||
|
||||
The header can hold four of these @code{struct sparse} at the moment;
|
||||
if more are needed, they are not stored in the header.
|
||||
|
||||
The @code{isextended} flag is set when an @code{extended_header}
|
||||
is needed to deal with a file. Note that this means that this flag
|
||||
can only be set when dealing with a sparse file, and it is only set
|
||||
in the event that the description of the file will not fit in the
|
||||
allotted room for sparse structures in the header. In other words,
|
||||
an extended_header is needed.
|
||||
|
||||
The @code{extended_header} structure is used for sparse files which
|
||||
need more sparse structures than can fit in the header. The header can
|
||||
fit 4 such structures; if more are needed, the flag @code{isextended}
|
||||
gets set and the next block is an @code{extended_header}.
|
||||
|
||||
Each @code{extended_header} structure contains an array of 21
|
||||
sparse structures, along with a similar @code{isextended} flag
|
||||
that the header had. There can be an indeterminate number of such
|
||||
@code{extended_header}s to describe a sparse file.
|
||||
|
||||
@table @asis
|
||||
|
||||
@item @code{REGTYPE}
|
||||
@itemx @code{AREGTYPE}
|
||||
These flags represent a regular file. In order to be compatible
|
||||
with older versions of @command{tar}, a @code{typeflag} value of
|
||||
@code{AREGTYPE} should be silently recognized as a regular file.
|
||||
New archives should be created using @code{REGTYPE}. Also, for
|
||||
backward compatibility, @command{tar} treats a regular file whose name
|
||||
ends with a slash as a directory.
|
||||
|
||||
@item @code{LNKTYPE}
|
||||
This flag represents a file linked to another file, of any type,
|
||||
previously archived. Such files are identified in Unix by each
|
||||
file having the same device and inode number. The linked-to name is
|
||||
specified in the @code{linkname} field with a trailing null.
|
||||
|
||||
@item @code{SYMTYPE}
|
||||
This represents a symbolic link to another file. The linked-to name
|
||||
is specified in the @code{linkname} field with a trailing null.
|
||||
|
||||
@item @code{CHRTYPE}
|
||||
@itemx @code{BLKTYPE}
|
||||
These represent character special files and block special files
|
||||
respectively. In this case the @code{devmajor} and @code{devminor}
|
||||
fields will contain the major and minor device numbers respectively.
|
||||
Operating systems may map the device specifications to their own
|
||||
local specification, or may ignore the entry.
|
||||
|
||||
@item @code{DIRTYPE}
|
||||
This flag specifies a directory or sub-directory. The directory
|
||||
name in the @code{name} field should end with a slash. On systems where
|
||||
disk allocation is performed on a directory basis, the @code{size} field
|
||||
will contain the maximum number of bytes (which may be rounded to
|
||||
the nearest disk block allocation unit) which the directory may
|
||||
hold. A @code{size} field of zero indicates no such limiting. Systems
|
||||
which do not support limiting in this manner should ignore the
|
||||
@code{size} field.
|
||||
|
||||
@item @code{FIFOTYPE}
|
||||
This specifies a FIFO special file. Note that the archiving of a
|
||||
FIFO file archives the existence of this file and not its contents.
|
||||
|
||||
@item @code{CONTTYPE}
|
||||
This specifies a contiguous file, which is the same as a normal
|
||||
file except that, in operating systems which support it, all its
|
||||
space is allocated contiguously on the disk. Operating systems
|
||||
which do not allow contiguous allocation should silently treat this
|
||||
type as a normal file.
|
||||
|
||||
@item @code{A} @dots{} @code{Z}
|
||||
These are reserved for custom implementations. Some of these are
|
||||
used in the @acronym{GNU} modified format, as described below.
|
||||
|
||||
@end table
|
||||
|
||||
Other values are reserved for specification in future revisions of
|
||||
the P1003 standard, and should not be used by any @command{tar} program.
|
||||
|
||||
The @code{magic} field indicates that this archive was output in
|
||||
the P1003 archive format. If this field contains @code{TMAGIC},
|
||||
the @code{uname} and @code{gname} fields will contain the ASCII
|
||||
representation of the owner and group of the file respectively.
|
||||
If found, the user and group @acronym{ID}s are used rather than the values in
|
||||
the @code{uid} and @code{gid} fields.
|
||||
|
||||
For references, see ISO/IEC 9945-1:1990 or IEEE Std 1003.1-1990, pages
|
||||
169-173 (section 10.1) for @cite{Archive/Interchange File Format}; and
|
||||
IEEE Std 1003.2-1992, pages 380-388 (section 4.48) and pages 936-940
|
||||
(section E.4.48) for @cite{pax - Portable archive interchange}.
|
||||
|
||||
@node Extensions
|
||||
@unnumberedsec @acronym{GNU} Extensions to the Archive Format
|
||||
@UNREVISED
|
||||
|
||||
The @acronym{GNU} format uses additional file types to describe new types of
|
||||
files in an archive. These are listed below.
|
||||
|
||||
@table @code
|
||||
@item GNUTYPE_DUMPDIR
|
||||
@itemx 'D'
|
||||
This represents a directory and a list of files created by the
|
||||
@option{--incremental} (@option{-G}) option. The @code{size} field gives the total
|
||||
size of the associated list of files. Each file name is preceded by
|
||||
either a @samp{Y} (the file should be in this archive) or an @samp{N}.
|
||||
(The file is a directory, or is not stored in the archive.) Each file
|
||||
name is terminated by a null. There is an additional null after the
|
||||
last file name.
|
||||
|
||||
@item GNUTYPE_MULTIVOL
|
||||
@itemx 'M'
|
||||
This represents a file continued from another volume of a multi-volume
|
||||
archive created with the @option{--multi-volume} (@option{-M}) option. The original
|
||||
type of the file is not given here. The @code{size} field gives the
|
||||
maximum size of this piece of the file (assuming the volume does
|
||||
not end before the file is written out). The @code{offset} field
|
||||
gives the offset from the beginning of the file where this part of
|
||||
the file begins. Thus @code{size} plus @code{offset} should equal
|
||||
the original size of the file.
|
||||
|
||||
@item GNUTYPE_SPARSE
|
||||
@itemx 'S'
|
||||
This flag indicates that we are dealing with a sparse file. Note
|
||||
that archiving a sparse file requires special operations to find
|
||||
holes in the file, which mark the positions of these holes, along
|
||||
with the number of bytes of data to be found after the hole.
|
||||
|
||||
@item GNUTYPE_VOLHDR
|
||||
@itemx 'V'
|
||||
This file type is used to mark the volume header that was given with
|
||||
the @option{--label=@var{archive-label}} (@option{-V @var{archive-label}}) option when the archive was created. The @code{name}
|
||||
field contains the @code{name} given after the @option{--label=@var{archive-label}} (@option{-V @var{archive-label}}) option.
|
||||
The @code{size} field is zero. Only the first file in each volume
|
||||
of an archive should have this type.
|
||||
|
||||
@end table
|
||||
|
||||
You may have trouble reading a @acronym{GNU} format archive on a
|
||||
non-@acronym{GNU} system if the options @option{--incremental} (@option{-G}),
|
||||
@option{--multi-volume} (@option{-M}), @option{--sparse} (@option{-S}), or @option{--label=@var{archive-label}} (@option{-V @var{archive-label}}) were
|
||||
used when writing the archive. In general, if @command{tar} does not
|
||||
use the @acronym{GNU}-added fields of the header, other versions of
|
||||
@command{tar} should be able to read the archive. Otherwise, the
|
||||
@command{tar} program will give an error, the most likely one being a
|
||||
checksum error.
|
||||
|
||||
@node Sparse Formats
|
||||
@unnumberedsec Storing Sparse Files
|
||||
@include sparse.texi
|
||||
|
||||
@node Snapshot Files
|
||||
@unnumberedsec Format of the Incremental Snapshot Files
|
||||
@include snapshot.texi
|
||||
|
||||
@node Dumpdir
|
||||
@unnumberedsec Dumpdir
|
||||
@include dumpdir.texi
|
||||
|
91
gnutar/doc/mastermenu.el
Normal file
91
gnutar/doc/mastermenu.el
Normal file
@ -0,0 +1,91 @@
|
||||
;;; mastermenu.el --- Redefinition of texinfo-master-menu-list
|
||||
|
||||
;; Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Sergey Poznyakoff
|
||||
;; Maintainer: bug-tar@gnu.org
|
||||
;; Keywords: maint, tex, docs
|
||||
|
||||
;; This file is part of GNU tar documentation suite
|
||||
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This file redefines texinfo-master-menu-list so that it takes into
|
||||
;; account included files.
|
||||
|
||||
;; Known bugs: @menu without previous sectioning command will inherit
|
||||
;; documentation string from the previous menu. However, since such a
|
||||
;; menu is illegal in a texinfo file, we can live with it.
|
||||
|
||||
(require 'texinfo)
|
||||
(require 'texnfo-upd)
|
||||
|
||||
(defun texinfo-master-menu-list-recursive (title)
|
||||
"Auxiliary function used by `texinfo-master-menu-list'."
|
||||
(save-excursion
|
||||
(let (master-menu-list)
|
||||
(while (re-search-forward "\\(^@menu\\|^@include\\)" nil t)
|
||||
(cond
|
||||
((string= (match-string 0) "@include")
|
||||
(skip-chars-forward " \t")
|
||||
(let ((included-name (let ((start (point)))
|
||||
(end-of-line)
|
||||
(skip-chars-backward " \t")
|
||||
(buffer-substring start (point)))))
|
||||
(end-of-line)
|
||||
(let ((prev-title (texinfo-copy-menu-title)))
|
||||
(save-excursion
|
||||
(set-buffer (find-file-noselect included-name))
|
||||
(setq master-menu-list
|
||||
(append (texinfo-master-menu-list-recursive prev-title)
|
||||
master-menu-list))))))
|
||||
(t
|
||||
(setq master-menu-list
|
||||
(cons (list
|
||||
(texinfo-copy-menu)
|
||||
(let ((menu-title (texinfo-copy-menu-title)))
|
||||
(if (string= menu-title "")
|
||||
title
|
||||
menu-title)))
|
||||
master-menu-list)))))
|
||||
master-menu-list)))
|
||||
|
||||
(defun texinfo-master-menu-list ()
|
||||
"Return a list of menu entries and header lines for the master menu,
|
||||
recursing into included files.
|
||||
|
||||
Start with the menu for chapters and indices and then find each
|
||||
following menu and the title of the node preceding that menu.
|
||||
|
||||
The master menu list has this form:
|
||||
|
||||
\(\(\(... \"entry-1-2\" \"entry-1\"\) \"title-1\"\)
|
||||
\(\(... \"entry-2-2\" \"entry-2-1\"\) \"title-2\"\)
|
||||
...\)
|
||||
|
||||
However, there does not need to be a title field."
|
||||
|
||||
(reverse (texinfo-master-menu-list-recursive "")))
|
||||
|
||||
(defun make-master-menu ()
|
||||
"Create master menu in the first Emacs argument."
|
||||
(find-file (car command-line-args-left))
|
||||
(texinfo-master-menu nil)
|
||||
(save-buffer))
|
||||
|
||||
|
||||
;;; mastermenu.el ends here
|
90
gnutar/doc/rendition.texi
Normal file
90
gnutar/doc/rendition.texi
Normal file
@ -0,0 +1,90 @@
|
||||
@c This is part of GNU tar manual.
|
||||
@c Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
|
||||
@c 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
@c See file tar.texi for copying conditions.
|
||||
|
||||
@c This file contains support for 'renditions' by Fran@,{c}ois Pinard
|
||||
@c I extended it by adding a FIXME_FOOTNOTE variable, which controls
|
||||
@c whether FIXME information should be placed in footnotes or
|
||||
@c inlined. --gray
|
||||
|
||||
@c ======================================================================
|
||||
@c This document has three levels of rendition: PUBLISH, DISTRIB or PROOF,
|
||||
@c as decided by @set symbols. The PUBLISH rendition does not show
|
||||
@c notes or marks asking for revision. Most users will prefer having more
|
||||
@c information, even if this information is not fully revised for adequacy,
|
||||
@c so DISTRIB is the default for distributions. The PROOF rendition
|
||||
@c show all marks to the point of ugliness, but is nevertheless useful to
|
||||
@c those working on the manual itself.
|
||||
@c ======================================================================
|
||||
|
||||
@c Set this symbol if you wish FIXMEs to appear in footnotes, instead
|
||||
@c of being inserted into the text.
|
||||
@c @set PROOF_FOOTNOTED
|
||||
|
||||
@ifclear PUBLISH
|
||||
@ifclear DISTRIB
|
||||
@ifclear PROOF
|
||||
@set DISTRIB
|
||||
@end ifclear
|
||||
@end ifclear
|
||||
@end ifclear
|
||||
|
||||
@ifset PUBLISH
|
||||
@set RENDITION The book, version
|
||||
@end ifset
|
||||
|
||||
@ifset DISTRIB
|
||||
@set RENDITION FTP release, version
|
||||
@end ifset
|
||||
|
||||
@ifset PROOF
|
||||
@set RENDITION Proof reading version
|
||||
@end ifset
|
||||
|
||||
@c Output marks for nodes needing revision, but not in PUBLISH rendition.
|
||||
|
||||
@macro UNREVISED
|
||||
@ifclear PUBLISH
|
||||
@quotation
|
||||
@emph{(This message will disappear, once this node revised.)}
|
||||
@end quotation
|
||||
@end ifclear
|
||||
@end macro
|
||||
|
||||
@c Output various FIXME information only in PROOF rendition.
|
||||
|
||||
@macro FIXME{string}
|
||||
@ifset PROOF
|
||||
@ifset PROOF_FOOTNOTED
|
||||
@footnote{@strong{FIXME:} \string\}
|
||||
@end ifset
|
||||
@ifclear PROOF_FOOTNOTED
|
||||
@cartouche
|
||||
@strong{<FIXME>} \string\ @strong{</>}
|
||||
@end cartouche
|
||||
@end ifclear
|
||||
@end ifset
|
||||
|
||||
@end macro
|
||||
|
||||
@macro FIXME-ref{string}
|
||||
@ifset PROOF
|
||||
@strong{<REF>} \string\ @strong{</>}
|
||||
@end ifset
|
||||
@end macro
|
||||
|
||||
@macro FIXME-pxref{string}
|
||||
@ifset PROOF
|
||||
@strong{<PXREF>} \string\ @strong{</>}
|
||||
@end ifset
|
||||
|
||||
@end macro
|
||||
|
||||
@macro FIXME-xref{string}
|
||||
@ifset PROOF
|
||||
@strong{<XREF>} \string\ @strong{</>}
|
||||
@end ifset
|
||||
@end macro
|
||||
|
||||
@c End of rendition.texi
|
66
gnutar/doc/snapshot.texi
Normal file
66
gnutar/doc/snapshot.texi
Normal file
@ -0,0 +1,66 @@
|
||||
@c This is part of the paxutils manual.
|
||||
@c Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
@c Written by Sergey Poznyakoff
|
||||
@c This file is distributed under GFDL 1.1 or any later version
|
||||
@c published by the Free Software Foundation.
|
||||
|
||||
A @dfn{snapshot file} (or @dfn{directory file}) is created during
|
||||
incremental backups (@pxref{Incremental Dumps}). It
|
||||
contains the status of the file system at the time of the dump and is
|
||||
used to determine which files were modified since the last backup.
|
||||
|
||||
@GNUTAR{} version @value{VERSION} supports two snapshot file
|
||||
formats. The first format, called @dfn{format 0}, is the one used by
|
||||
@GNUTAR{} versions up to 1.15.1. The second format, called @dfn{format
|
||||
1} is an extended version of this format, that contains more metadata
|
||||
and allows for further extensions.
|
||||
|
||||
@samp{Format 0} snapshot file begins with a line containing a
|
||||
decimal number that represents the UNIX timestamp of the beginning of
|
||||
the last archivation. This line is followed by directory metadata
|
||||
descriptions, one per line. Each description has the following format:
|
||||
|
||||
@smallexample
|
||||
[@var{nfs}]@var{dev} @var{inode} @var{name}
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
where optional @var{nfs} is a single plus character (@samp{+}) if this
|
||||
directory is located on an NFS-mounted partition, @var{dev} and
|
||||
@var{inode} are the device and inode numbers of the directory, and
|
||||
@var{name} is the directory name.
|
||||
|
||||
@samp{Format 1} snapshot file begins with a line specifying the
|
||||
format of the file. This line has the following structure:
|
||||
|
||||
@smallexample
|
||||
@samp{GNU tar-}@var{tar-version}@samp{-}@var{incr-format-version}
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
where @var{tar-version} is the version of @GNUTAR{} implementation
|
||||
that created this snapshot, and @var{incr-format-version} is the
|
||||
version number of the snapshot format (in this case @samp{1}).
|
||||
|
||||
The following line contains two decimal numbers, representing the
|
||||
time of the last backup. First number is the number of seconds, the
|
||||
second one is the number of nanoseconds, since the beginning of the
|
||||
epoch.
|
||||
|
||||
Following lines contain directory metadata, one line per
|
||||
directory. The line format is:
|
||||
|
||||
@smallexample
|
||||
[@var{nfs}]@var{mtime-sec} @var{mtime-nsec} @var{dev} @var{inode} @var{name}
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
where @var{mtime-sec} and @var{mtime-nsec} represent the last
|
||||
modification time of this directory with nanosecond precision;
|
||||
@var{nfs}, @var{dev}, @var{inode} and @var{name} have the same meaning
|
||||
as with @samp{format 0}.
|
||||
|
||||
|
||||
@c End of snapshot.texi
|
||||
|
||||
|
235
gnutar/doc/sparse.texi
Normal file
235
gnutar/doc/sparse.texi
Normal file
@ -0,0 +1,235 @@
|
||||
@c This is part of the paxutils manual.
|
||||
@c Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
@c This file is distributed under GFDL 1.1 or any later version
|
||||
@c published by the Free Software Foundation.
|
||||
|
||||
@cindex sparse formats
|
||||
@cindex sparse versions
|
||||
The notion of sparse file, and the ways of handling it from the point
|
||||
of view of @GNUTAR{} user have been described in detail in
|
||||
@ref{sparse}. This chapter describes the internal format @GNUTAR{}
|
||||
uses to store such files.
|
||||
|
||||
The support for sparse files in @GNUTAR{} has a long history. The
|
||||
earliest version featuring this support that I was able to find was 1.09,
|
||||
released in November, 1990. The format introduced back then is called
|
||||
@dfn{old GNU} sparse format and in spite of the fact that its design
|
||||
contained many flaws, it was the only format @GNUTAR{} supported
|
||||
until version 1.14 (May, 2004), which introduced initial support for
|
||||
sparse archives in @acronym{PAX} archives (@pxref{posix}). This
|
||||
format was not free from design flows, either and it was subsequently
|
||||
improved in versions 1.15.2 (November, 2005) and 1.15.92 (June,
|
||||
2006).
|
||||
|
||||
In addition to GNU sparse format, @GNUTAR{} is able to read and
|
||||
extract sparse files archived by @command{star}.
|
||||
|
||||
The following subsections describe each format in detail.
|
||||
|
||||
@menu
|
||||
* Old GNU Format::
|
||||
* PAX 0:: PAX Format, Versions 0.0 and 0.1
|
||||
* PAX 1:: PAX Format, Version 1.0
|
||||
@end menu
|
||||
|
||||
@node Old GNU Format
|
||||
@appendixsubsec Old GNU Format
|
||||
|
||||
@cindex sparse formats, Old GNU
|
||||
@cindex Old GNU sparse format
|
||||
The format introduced some time around 1990 (v. 1.09). It was
|
||||
designed on top of standard @code{ustar} headers in such an
|
||||
unfortunate way that some of its fields overwrote fields required by
|
||||
POSIX.
|
||||
|
||||
An old GNU sparse header is designated by type @samp{S}
|
||||
(@code{GNUTYPE_SPARSE}) and has the following layout:
|
||||
|
||||
@multitable @columnfractions 0.10 0.10 0.20 0.20 0.40
|
||||
@headitem Offset @tab Size @tab Name @tab Data type @tab Contents
|
||||
@item 0 @tab 345 @tab @tab N/A @tab Not used.
|
||||
@item 345 @tab 12 @tab atime @tab Number @tab @code{atime} of the file.
|
||||
@item 357 @tab 12 @tab ctime @tab Number @tab @code{ctime} of the file .
|
||||
@item 369 @tab 12 @tab offset @tab Number @tab For
|
||||
multivolume archives: the offset of the start of this volume.
|
||||
@item 381 @tab 4 @tab @tab N/A @tab Not used.
|
||||
@item 385 @tab 1 @tab @tab N/A @tab Not used.
|
||||
@item 386 @tab 96 @tab sp @tab @code{sparse_header} @tab (4 entries) File map.
|
||||
@item 482 @tab 1 @tab isextended @tab Bool @tab @code{1} if an
|
||||
extension sparse header follows, @code{0} otherwise.
|
||||
@item 483 @tab 12 @tab realsize @tab Number @tab Real size of the file.
|
||||
@end multitable
|
||||
|
||||
Each of @code{sparse_header} object at offset 386 describes a single
|
||||
data chunk. It has the following structure:
|
||||
|
||||
@multitable @columnfractions 0.10 0.10 0.20 0.60
|
||||
@headitem Offset @tab Size @tab Data type @tab Contents
|
||||
@item 0 @tab 12 @tab Number @tab Offset of the
|
||||
beginning of the chunk.
|
||||
@item 12 @tab 12 @tab Number @tab Size of the chunk.
|
||||
@end multitable
|
||||
|
||||
If the member contains more than four chunks, the @code{isextended}
|
||||
field of the header has the value @code{1} and the main header is
|
||||
followed by one or more @dfn{extension headers}. Each such header has
|
||||
the following structure:
|
||||
|
||||
@multitable @columnfractions 0.10 0.10 0.20 0.20 0.40
|
||||
@headitem Offset @tab Size @tab Name @tab Data type @tab Contents
|
||||
@item 0 @tab 21 @tab sp @tab @code{sparse_header} @tab
|
||||
(21 entires) File map.
|
||||
@item 504 @tab 1 @tab isextended @tab Bool @tab @code{1} if an
|
||||
extension sparse header follows, or @code{0} otherwise.
|
||||
@end multitable
|
||||
|
||||
A header with @code{isextended=0} ends the map.
|
||||
|
||||
@node PAX 0
|
||||
@appendixsubsec PAX Format, Versions 0.0 and 0.1
|
||||
|
||||
@cindex sparse formats, v.0.0
|
||||
There are two formats available in this branch. The version @code{0.0}
|
||||
is the initial version of sparse format used by @command{tar}
|
||||
versions 1.14--1.15.1. The sparse file map is kept in extended
|
||||
(@code{x}) PAX header variables:
|
||||
|
||||
@table @code
|
||||
@vrindex GNU.sparse.size, extended header variable
|
||||
@item GNU.sparse.size
|
||||
Real size of the stored file
|
||||
|
||||
@item GNU.sparse.numblocks
|
||||
@vrindex GNU.sparse.numblocks, extended header variable
|
||||
Number of blocks in the sparse map
|
||||
|
||||
@item GNU.sparse.offset
|
||||
@vrindex GNU.sparse.offset, extended header variable
|
||||
Offset of the data block
|
||||
|
||||
@item GNU.sparse.numbytes
|
||||
@vrindex GNU.sparse.numbytes, extended header variable
|
||||
Size of the data block
|
||||
@end table
|
||||
|
||||
The latter two variables repeat for each data block, so the overall
|
||||
structure is like this:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
GNU.sparse.size=@var{size}
|
||||
GNU.sparse.numblocks=@var{numblocks}
|
||||
repeat @var{numblocks} times
|
||||
GNU.sparse.offset=@var{offset}
|
||||
GNU.sparse.numbytes=@var{numbytes}
|
||||
end repeat
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
This format presented the following two problems:
|
||||
|
||||
@enumerate 1
|
||||
@item
|
||||
Whereas the POSIX specification allows a variable to appear multiple
|
||||
times in a header, it requires that only the last occurrence be
|
||||
meaningful. Thus, multiple occurrences of @code{GNU.sparse.offset} and
|
||||
@code{GNU.sparse.numbytes} are conflicting with the POSIX specs.
|
||||
|
||||
@item
|
||||
Attempting to extract such archives using a third-party @command{tar}s
|
||||
results in extraction of sparse files in @emph{compressed form}. If
|
||||
the @command{tar} implementation in question does not support POSIX
|
||||
format, it will also extract a file containing extension header
|
||||
attributes. This file can be used to expand the file to its original
|
||||
state. However, posix-aware @command{tar}s will usually ignore the
|
||||
unknown variables, which makes restoring the file more
|
||||
difficult. @xref{extracting sparse v.0.x, Extraction of sparse
|
||||
members in v.0.0 format}, for the detailed description of how to
|
||||
restore such members using non-GNU @command{tar}s.
|
||||
@end enumerate
|
||||
|
||||
@cindex sparse formats, v.0.1
|
||||
@GNUTAR{} 1.15.2 introduced sparse format version @code{0.1}, which
|
||||
attempted to solve these problems. As its predecessor, this format
|
||||
stores sparse map in the extended POSIX header. It retains
|
||||
@code{GNU.sparse.size} and @code{GNU.sparse.numblocks} variables, but
|
||||
instead of @code{GNU.sparse.offset}/@code{GNU.sparse.numbytes} pairs
|
||||
it uses a single variable:
|
||||
|
||||
@table @code
|
||||
@item GNU.sparse.map
|
||||
@vrindex GNU.sparse.map, extended header variable
|
||||
Map of non-null data chunks. It is a string consisting of
|
||||
comma-separated values "@var{offset},@var{size}[,@var{offset-1},@var{size-1}...]"
|
||||
@end table
|
||||
|
||||
To address the 2nd problem, the @code{name} field in @code{ustar}
|
||||
is replaced with a special name, constructed using the following pattern:
|
||||
|
||||
@smallexample
|
||||
%d/GNUSparseFile.%p/%f
|
||||
@end smallexample
|
||||
|
||||
@vrindex GNU.sparse.name, extended header variable
|
||||
The real name of the sparse file is stored in the variable
|
||||
@code{GNU.sparse.name}. Thus, those @command{tar} implementations
|
||||
that are not aware of GNU extensions will at least extract the files
|
||||
into separate directories, giving the user a possibility to expand it
|
||||
afterwards. @xref{extracting sparse v.0.x, Extraction of sparse
|
||||
members in v.0.1 format}, for the detailed description of how to
|
||||
restore such members using non-GNU @command{tar}s.
|
||||
|
||||
The resulting @code{GNU.sparse.map} string can be @emph{very} long.
|
||||
Although POSIX does not impose any limit on the length of a @code{x}
|
||||
header variable, this possibly can confuse some tars.
|
||||
|
||||
@node PAX 1
|
||||
@appendixsubsec PAX Format, Version 1.0
|
||||
|
||||
@cindex sparse formats, v.1.0
|
||||
The version @code{1.0} of sparse format was introduced with @GNUTAR{}
|
||||
1.15.92. Its main objective was to make the resulting file
|
||||
extractable with little effort even by non-posix aware @command{tar}
|
||||
implementations. Starting from this version, the extended header
|
||||
preceding a sparse member always contains the following variables that
|
||||
identify the format being used:
|
||||
|
||||
@table @code
|
||||
@item GNU.sparse.major
|
||||
@vrindex GNU.sparse.major, extended header variable
|
||||
Major version
|
||||
|
||||
@item GNU.sparse.minor
|
||||
@vrindex GNU.sparse.minor, extended header variable
|
||||
Minor version
|
||||
@end table
|
||||
|
||||
The @code{name} field in @code{ustar} header contains a special name,
|
||||
constructed using the following pattern:
|
||||
|
||||
@smallexample
|
||||
%d/GNUSparseFile.%p/%f
|
||||
@end smallexample
|
||||
|
||||
@vrindex GNU.sparse.name, extended header variable, in v.1.0
|
||||
@vrindex GNU.sparse.realsize, extended header variable
|
||||
The real name of the sparse file is stored in the variable
|
||||
@code{GNU.sparse.name}. The real size of the file is stored in the
|
||||
variable @code{GNU.sparse.realsize}.
|
||||
|
||||
The sparse map itself is stored in the file data block, preceding the actual
|
||||
file data. It consists of a series of octal numbers of arbitrary length, delimited
|
||||
by newlines. The map is padded with nulls to the nearest block boundary.
|
||||
|
||||
The first number gives the number of entries in the map. Following are map entries,
|
||||
each one consisting of two numbers giving the offset and size of the
|
||||
data block it describes.
|
||||
|
||||
The format is designed in such a way that non-posix aware tars and tars not
|
||||
supporting @code{GNU.sparse.*} keywords will extract each sparse file
|
||||
in its condensed form with the file map prepended and will place it
|
||||
into a separate directory. Then, using a simple program it would be
|
||||
possible to expand the file to its original form even without @GNUTAR{}.
|
||||
@xref{Sparse Recovery}, for the detailed information on how to extract
|
||||
sparse members without @GNUTAR{}.
|
||||
|
4
gnutar/doc/stamp-vti
Normal file
4
gnutar/doc/stamp-vti
Normal file
@ -0,0 +1,4 @@
|
||||
@set UPDATED 8 June 2007
|
||||
@set UPDATED-MONTH June 2007
|
||||
@set EDITION 1.17
|
||||
@set VERSION 1.17
|
387
gnutar/doc/tar.info
Normal file
387
gnutar/doc/tar.info
Normal file
@ -0,0 +1,387 @@
|
||||
This is tar.info, produced by makeinfo version 4.8 from tar.texi.
|
||||
|
||||
This manual is for GNU `tar' (version 1.17, 8 June 2007), which
|
||||
creates and extracts files from archives.
|
||||
|
||||
Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003,
|
||||
2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU Free Documentation License,
|
||||
Version 1.1 or any later version published by the Free Software
|
||||
Foundation; with no Invariant Sections, with the Front-Cover Texts
|
||||
being "A GNU Manual," and with the Back-Cover Texts as in (a)
|
||||
below. A copy of the license is included in the section entitled
|
||||
"GNU Free Documentation License".
|
||||
|
||||
(a) The FSF's Back-Cover Text is: "You are free to copy and modify
|
||||
this GNU Manual. Buying copies from GNU Press supports the FSF in
|
||||
developing GNU and promoting software freedom."
|
||||
|
||||
INFO-DIR-SECTION Archiving
|
||||
START-INFO-DIR-ENTRY
|
||||
* Tar: (tar). Making tape (or disk) archives.
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
INFO-DIR-SECTION Individual utilities
|
||||
START-INFO-DIR-ENTRY
|
||||
* tar: (tar)tar invocation. Invoking GNU `tar'.
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
|
||||
Indirect:
|
||||
tar.info-1: 1234
|
||||
tar.info-2: 301079
|
||||
|
||||
Tag Table:
|
||||
(Indirect)
|
||||
Node: Top1234
|
||||
Node: Introduction10405
|
||||
Node: Book Contents11192
|
||||
Node: Definitions13364
|
||||
Node: What tar Does15167
|
||||
Node: Naming tar Archives17933
|
||||
Node: Authors18653
|
||||
Node: Reports20466
|
||||
Node: Tutorial20826
|
||||
Node: assumptions21639
|
||||
Node: stylistic conventions24114
|
||||
Node: basic tar options24557
|
||||
Node: frequent operations28195
|
||||
Node: Two Frequent Options28847
|
||||
Node: file tutorial29478
|
||||
Node: verbose tutorial30839
|
||||
Ref: verbose member listing33053
|
||||
Node: help tutorial35806
|
||||
Node: create36160
|
||||
Node: prepare for examples37661
|
||||
Node: Creating the archive39429
|
||||
Node: create verbose42261
|
||||
Node: short create43082
|
||||
Node: create dir45835
|
||||
Node: list48542
|
||||
Ref: listing member and file names49816
|
||||
Node: list dir52097
|
||||
Node: extract53086
|
||||
Node: extracting archives54263
|
||||
Node: extracting files54753
|
||||
Ref: extracting files-Footnote-157400
|
||||
Node: extract dir57780
|
||||
Node: extracting untrusted archives60163
|
||||
Node: failing commands61042
|
||||
Node: going further62142
|
||||
Node: tar invocation62292
|
||||
Node: Synopsis63788
|
||||
Node: using tar options68757
|
||||
Ref: TAR_OPTIONS70342
|
||||
Node: Styles71359
|
||||
Node: Long Options73071
|
||||
Node: Short Options75243
|
||||
Ref: Short Options-Footnote-177051
|
||||
Node: Old Options77268
|
||||
Ref: Old Options-Footnote-180218
|
||||
Node: Mixing80388
|
||||
Ref: Mixing-Footnote-182754
|
||||
Node: All Options82874
|
||||
Node: Operation Summary83479
|
||||
Ref: --append83599
|
||||
Ref: --catenate83679
|
||||
Ref: --compare83750
|
||||
Ref: --concatenate83953
|
||||
Ref: --create84063
|
||||
Ref: --delete84131
|
||||
Ref: --diff84244
|
||||
Ref: --extract84300
|
||||
Ref: --get84402
|
||||
Ref: --list84460
|
||||
Ref: --update84528
|
||||
Node: Option Summary84738
|
||||
Ref: --absolute-names84893
|
||||
Ref: --after-date85071
|
||||
Ref: --anchored85123
|
||||
Ref: --atime-preserve85256
|
||||
Ref: --backup87771
|
||||
Ref: --block-number87962
|
||||
Ref: --blocking-factor88136
|
||||
Ref: --bzip288288
|
||||
Ref: --checkpoint88395
|
||||
Ref: --check-links88730
|
||||
Ref: --compress88981
|
||||
Ref: --uncompress88981
|
||||
Ref: --confirmation89185
|
||||
Ref: --delay-directory-restore89253
|
||||
Ref: --dereference89454
|
||||
Ref: --directory89639
|
||||
Ref: --exclude89892
|
||||
Ref: --exclude-from90011
|
||||
Ref: --exclude-caches90157
|
||||
Ref: --exclude-caches-under90351
|
||||
Ref: --exclude-caches-all90529
|
||||
Ref: --exclude-tag90658
|
||||
Ref: --exclude-tag-under90813
|
||||
Ref: --exclude-tag-all90981
|
||||
Ref: --file91095
|
||||
Ref: --files-from91295
|
||||
Ref: --force-local91498
|
||||
Ref: --format91689
|
||||
Ref: --group92359
|
||||
Ref: --gzip92707
|
||||
Ref: --gunzip92707
|
||||
Ref: --ungzip92707
|
||||
Ref: --help92930
|
||||
Ref: --ignore-case93064
|
||||
Ref: --ignore-command-error93191
|
||||
Ref: --ignore-failed-read93302
|
||||
Ref: --ignore-zeros93432
|
||||
Ref: --incremental93577
|
||||
Ref: --index-file93842
|
||||
Ref: --info-script93927
|
||||
Ref: --new-volume-script93927
|
||||
Ref: --interactive94248
|
||||
Ref: --keep-newer-files94460
|
||||
Ref: --keep-old-files94602
|
||||
Ref: --label94733
|
||||
Ref: --listed-incremental95021
|
||||
Ref: --mode95385
|
||||
Ref: --mtime95676
|
||||
Ref: --multi-volume96117
|
||||
Ref: --newer96318
|
||||
Ref: --newer-mtime96596
|
||||
Ref: --no-anchored96820
|
||||
Ref: --no-delay-directory-restore96957
|
||||
Ref: --no-ignore-case97210
|
||||
Ref: --no-ignore-command-error97303
|
||||
Ref: --no-overwrite-dir97458
|
||||
Ref: --no-quote-chars97601
|
||||
Ref: --no-recursion97782
|
||||
Ref: --no-same-owner97887
|
||||
Ref: --no-same-permissions98070
|
||||
Ref: --no-unquote98272
|
||||
Ref: --no-wildcards98410
|
||||
Ref: --no-wildcards-match-slash98494
|
||||
Ref: --null98596
|
||||
Ref: --numeric-owner98824
|
||||
Ref: --occurrence99475
|
||||
Ref: --old-archive100042
|
||||
Ref: --one-file-system100091
|
||||
Ref: --overwrite100273
|
||||
Ref: --overwrite-dir100415
|
||||
Ref: --owner100560
|
||||
Ref: --pax-option100939
|
||||
Ref: --portability101238
|
||||
Ref: --posix101303
|
||||
Ref: --preserve101345
|
||||
Ref: --preserve-order101483
|
||||
Ref: --preserve-permissions101547
|
||||
Ref: --same-permissions101547
|
||||
Ref: --quote-chars101961
|
||||
Ref: --quoting-style102114
|
||||
Ref: --read-full-records102435
|
||||
Ref: --record-size102600
|
||||
Ref: --recursion102731
|
||||
Ref: --recursive-unlink102834
|
||||
Ref: --remove-files103001
|
||||
Ref: --restrict103147
|
||||
Ref: --rmt-command103335
|
||||
Ref: --rsh-command103476
|
||||
Ref: --same-order103598
|
||||
Ref: --same-owner103890
|
||||
Ref: --seek104267
|
||||
Ref: --show-defaults104524
|
||||
Ref: --show-omitted-dirs104892
|
||||
Ref: --show-transformed-names105046
|
||||
Ref: --show-stored-names105046
|
||||
Ref: --sparse105435
|
||||
Ref: --sparse-version105574
|
||||
Ref: --starting-file105798
|
||||
Ref: --strip-components105987
|
||||
Ref: --suffix106299
|
||||
Ref: --tape-length106434
|
||||
Ref: --test-label106589
|
||||
Ref: --to-command106741
|
||||
Ref: --to-stdout106900
|
||||
Ref: --totals107053
|
||||
Ref: --touch107284
|
||||
Ref: --transform107486
|
||||
Ref: --unlink-first108078
|
||||
Ref: --unquote108246
|
||||
Ref: --use-compress-program108353
|
||||
Ref: --utc108521
|
||||
Ref: --verbose108614
|
||||
Ref: --verify108866
|
||||
Ref: --version108984
|
||||
Ref: --volno-file109156
|
||||
Ref: --wildcards109343
|
||||
Ref: --wildcards-match-slash109463
|
||||
Ref: Option Summary-Footnote-1109591
|
||||
Ref: Option Summary-Footnote-2109809
|
||||
Node: Short Option Summary109978
|
||||
Node: help112149
|
||||
Ref: help-Footnote-1115979
|
||||
Node: defaults116189
|
||||
Node: verbose117206
|
||||
Ref: totals119507
|
||||
Ref: Progress information121097
|
||||
Ref: show-omitted-dirs121883
|
||||
Ref: block-number122302
|
||||
Node: interactive123293
|
||||
Node: operations125372
|
||||
Node: Basic tar125631
|
||||
Ref: Basic tar-Footnote-1128735
|
||||
Node: Advanced tar128879
|
||||
Node: Operations129724
|
||||
Node: append131694
|
||||
Ref: append-Footnote-1134859
|
||||
Node: appending files135025
|
||||
Node: multiple136806
|
||||
Node: update139496
|
||||
Node: how to update140535
|
||||
Node: concatenate142318
|
||||
Ref: concatenate-Footnote-1145567
|
||||
Node: delete145705
|
||||
Node: compare147548
|
||||
Node: create options149038
|
||||
Node: override149496
|
||||
Node: Ignore Failed Read152934
|
||||
Node: extract options153154
|
||||
Node: Reading154050
|
||||
Node: read full records155613
|
||||
Node: Ignore Zeros155949
|
||||
Node: Writing156940
|
||||
Node: Dealing with Old Files157497
|
||||
Node: Overwrite Old Files159924
|
||||
Node: Keep Old Files161381
|
||||
Node: Keep Newer Files161891
|
||||
Node: Unlink First162181
|
||||
Node: Recursive Unlink162585
|
||||
Node: Data Modification Times163138
|
||||
Node: Setting Access Permissions163948
|
||||
Node: Directory Modification Times and Permissions164580
|
||||
Node: Writing to Standard Output168186
|
||||
Node: Writing to an External Program169721
|
||||
Node: remove files172434
|
||||
Node: Scarce172627
|
||||
Node: Starting File172875
|
||||
Node: Same Order173695
|
||||
Node: backup174531
|
||||
Node: Applications177755
|
||||
Node: looking ahead179268
|
||||
Node: Backups180094
|
||||
Node: Full Dumps181926
|
||||
Node: Incremental Dumps183732
|
||||
Ref: incremental-op190036
|
||||
Ref: Incremental Dumps-Footnote-1190410
|
||||
Ref: Incremental Dumps-Footnote-2190560
|
||||
Node: Backup Levels191047
|
||||
Node: Backup Parameters193434
|
||||
Node: General-Purpose Variables194615
|
||||
Ref: RSH197772
|
||||
Node: Magnetic Tape Control199651
|
||||
Node: User Hooks200988
|
||||
Node: backup-specs example202316
|
||||
Node: Scripted Backups203459
|
||||
Ref: Scripted Backups-Footnote-1206321
|
||||
Node: Scripted Restoration206705
|
||||
Node: Choosing209313
|
||||
Node: file210498
|
||||
Ref: remote-dev213197
|
||||
Ref: local and remote archives213589
|
||||
Node: Selecting Archive Members214619
|
||||
Ref: input name quoting215300
|
||||
Node: files217286
|
||||
Ref: files-Footnote-1220560
|
||||
Node: nul220718
|
||||
Node: exclude222015
|
||||
Node: problems with exclude226040
|
||||
Node: wildcards228085
|
||||
Node: controlling pattern-matching230669
|
||||
Ref: controlling pattern-matching-Footnote-1234659
|
||||
Node: quoting styles234875
|
||||
Node: transform241347
|
||||
Ref: show-transformed-names243337
|
||||
Node: after246801
|
||||
Node: recurse250466
|
||||
Node: one253235
|
||||
Node: directory254731
|
||||
Node: absolute257804
|
||||
Ref: absolute-Footnote-1260994
|
||||
Node: Date input formats261345
|
||||
Node: General date syntax263661
|
||||
Node: Calendar date items266612
|
||||
Node: Time of day items268609
|
||||
Node: Time zone items270725
|
||||
Node: Day of week items271959
|
||||
Node: Relative items in date strings272948
|
||||
Node: Pure numbers in date strings275750
|
||||
Node: Seconds since the Epoch276731
|
||||
Node: Specifying time zone rules278352
|
||||
Node: Authors of get_date280716
|
||||
Node: Formats281468
|
||||
Node: Compression286156
|
||||
Node: gzip286448
|
||||
Node: sparse292054
|
||||
Node: Attributes295108
|
||||
Node: Portability301079
|
||||
Node: Portable Names302522
|
||||
Node: dereference303227
|
||||
Node: old304621
|
||||
Node: ustar305806
|
||||
Node: gnu306397
|
||||
Node: posix307274
|
||||
Node: PAX keywords307755
|
||||
Node: Checksumming312083
|
||||
Node: Large or Negative Values314007
|
||||
Node: Other Tars315607
|
||||
Node: Split Recovery316741
|
||||
Node: Sparse Recovery320471
|
||||
Ref: extracting sparse v.0.x324102
|
||||
Ref: Sparse Recovery-Footnote-1327391
|
||||
Ref: Sparse Recovery-Footnote-2327414
|
||||
Node: cpio327535
|
||||
Node: Media332291
|
||||
Node: Device334221
|
||||
Node: Remote Tape Server339289
|
||||
Node: Common Problems and Solutions343019
|
||||
Node: Blocking343411
|
||||
Node: Format Variations349918
|
||||
Node: Blocking Factor350830
|
||||
Node: Many362484
|
||||
Node: Tape Positioning366278
|
||||
Node: mt368151
|
||||
Node: Using Multiple Tapes369706
|
||||
Node: Multi-Volume Archives371772
|
||||
Ref: tape-length373257
|
||||
Ref: change volume prompt373561
|
||||
Ref: volno-file374431
|
||||
Ref: info-script374983
|
||||
Ref: Multi-Volume Archives-Footnote-1380088
|
||||
Ref: Multi-Volume Archives-Footnote-2380198
|
||||
Node: Tape Files380265
|
||||
Node: Tarcat381749
|
||||
Node: label382794
|
||||
Ref: --test-label option384423
|
||||
Ref: label-Footnote-1387468
|
||||
Node: verify387703
|
||||
Node: Write Protection391003
|
||||
Node: Changes391833
|
||||
Node: Configuring Help Summary395418
|
||||
Node: Tar Internals401913
|
||||
Node: Standard402248
|
||||
Node: Extensions424449
|
||||
Node: Sparse Formats427009
|
||||
Node: Old GNU Format428299
|
||||
Node: PAX 0430710
|
||||
Node: PAX 1433837
|
||||
Node: Snapshot Files435571
|
||||
Node: Dumpdir437681
|
||||
Node: Genfile440903
|
||||
Node: Generate Mode441996
|
||||
Node: Status Mode446293
|
||||
Node: Exec Mode448092
|
||||
Node: Free Software Needs Free Documentation450328
|
||||
Node: Copying This Manual455299
|
||||
Node: GNU Free Documentation License455581
|
||||
Node: Index of Command Line Options477988
|
||||
Node: Index500552
|
||||
|
||||
End Tag Table
|
7594
gnutar/doc/tar.info-1
Normal file
7594
gnutar/doc/tar.info-1
Normal file
File diff suppressed because it is too large
Load Diff
4783
gnutar/doc/tar.info-2
Normal file
4783
gnutar/doc/tar.info-2
Normal file
File diff suppressed because it is too large
Load Diff
10958
gnutar/doc/tar.texi
Normal file
10958
gnutar/doc/tar.texi
Normal file
File diff suppressed because it is too large
Load Diff
26
gnutar/doc/texify.sed
Normal file
26
gnutar/doc/texify.sed
Normal file
@ -0,0 +1,26 @@
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# GNU tar is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU tar is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU tar; if not, write to the Free Software
|
||||
# Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
1{s,/\*,@comment ,
|
||||
b
|
||||
}
|
||||
2,/.*\*\//{s,\*/,,;s/^/@comment/
|
||||
b
|
||||
}
|
||||
/\/* END \*\//,$d
|
||||
s/\([{}]\)/@\1/g
|
||||
s,/\*,&@r{,
|
||||
s,\*/,}&,
|
7086
gnutar/doc/texinfo.tex
Normal file
7086
gnutar/doc/texinfo.tex
Normal file
File diff suppressed because it is too large
Load Diff
22
gnutar/doc/value.texi
Normal file
22
gnutar/doc/value.texi
Normal file
@ -0,0 +1,22 @@
|
||||
@c This is part of GNU tar manual.
|
||||
@c Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
|
||||
@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
@c See file tar.texi for copying conditions.
|
||||
|
||||
@macro GNUTAR
|
||||
@acronym{GNU} @command{tar}
|
||||
@end macro
|
||||
|
||||
@macro xopindex{option,text}
|
||||
@opindex \option\@r{, \text\}
|
||||
@end macro
|
||||
|
||||
@macro opsummary{option}
|
||||
@ifclear ANCHOR--\option\
|
||||
@set ANCHOR--\option\ 1
|
||||
@anchor{--\option\}
|
||||
@end ifclear
|
||||
@xopindex{\option\, summary}
|
||||
@end macro
|
||||
|
||||
|
4
gnutar/doc/version.texi
Normal file
4
gnutar/doc/version.texi
Normal file
@ -0,0 +1,4 @@
|
||||
@set UPDATED 8 June 2007
|
||||
@set UPDATED-MONTH June 2007
|
||||
@set EDITION 1.17
|
||||
@set VERSION 1.17
|
41
gnutar/lib/Makefile.am
Normal file
41
gnutar/lib/Makefile.am
Normal file
@ -0,0 +1,41 @@
|
||||
# Makefile for GNU tar library. -*- Makefile -*-
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004,
|
||||
# 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# 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 St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
include gnulib.mk
|
||||
|
||||
rmt-command.h : Makefile
|
||||
rm -f $@-t $@
|
||||
echo "#ifndef DEFAULT_RMT_COMMAND" >> $@-t
|
||||
echo "# define DEFAULT_RMT_COMMAND \"$(DEFAULT_RMT_DIR)/`echo rmt | sed '$(transform)'`$(EXEEXT)\"" >> $@-t
|
||||
echo "#endif" >> $@-t
|
||||
mv $@-t $@
|
||||
BUILT_SOURCES += rmt-command.h
|
||||
CLEANFILES += rmt-command.h rmt-command.h-t
|
||||
|
||||
noinst_HEADERS += system.h system-ioctl.h rmt.h paxlib.h stdopen.h
|
||||
libtar_a_SOURCES += \
|
||||
paxerror.c paxexit.c paxlib.h paxnames.c \
|
||||
prepargs.c prepargs.h \
|
||||
rtapelib.c \
|
||||
rmt.h \
|
||||
stdopen.c stdopen.h \
|
||||
system.h system-ioctl.h
|
||||
|
||||
libtar_a_LIBADD += $(LIBOBJS)
|
||||
libtar_a_DEPENDENCIES += $(LIBOBJS)
|
1459
gnutar/lib/Makefile.in
Normal file
1459
gnutar/lib/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
30
gnutar/lib/__fpending.c
Normal file
30
gnutar/lib/__fpending.c
Normal file
@ -0,0 +1,30 @@
|
||||
/* __fpending.c -- return the number of pending output bytes on a stream
|
||||
Copyright (C) 2000, 2004, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 Jim Meyering. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "__fpending.h"
|
||||
|
||||
/* Return the number of pending (aka buffered, unflushed)
|
||||
bytes on the stream, FP, that is open for writing. */
|
||||
size_t
|
||||
__fpending (FILE *fp)
|
||||
{
|
||||
return PENDING_OUTPUT_N_BYTES;
|
||||
}
|
34
gnutar/lib/__fpending.h
Normal file
34
gnutar/lib/__fpending.h
Normal file
@ -0,0 +1,34 @@
|
||||
/* Declare __fpending.
|
||||
|
||||
Copyright (C) 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 Jim Meyering. */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef HAVE_DECL___FPENDING
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
|
||||
#if HAVE_DECL___FPENDING
|
||||
# if HAVE_STDIO_EXT_H
|
||||
# include <stdio_ext.h>
|
||||
# endif
|
||||
#else
|
||||
size_t __fpending (FILE *);
|
||||
#endif
|
489
gnutar/lib/alloca.c
Normal file
489
gnutar/lib/alloca.c
Normal file
@ -0,0 +1,489 @@
|
||||
/* alloca.c -- allocate automatically reclaimed memory
|
||||
(Mostly) portable public-domain implementation -- D A Gwyn
|
||||
|
||||
This implementation of the PWB library alloca function,
|
||||
which is used to allocate space off the run-time stack so
|
||||
that it is automatically reclaimed upon procedure exit,
|
||||
was inspired by discussions with J. Q. Johnson of Cornell.
|
||||
J.Otto Tennant <jot@cray.com> contributed the Cray support.
|
||||
|
||||
There are some preprocessor constants that can
|
||||
be defined when compiling for your specific system, for
|
||||
improved efficiency; however, the defaults should be okay.
|
||||
|
||||
The general concept of this implementation is to keep
|
||||
track of all alloca-allocated blocks, and reclaim any
|
||||
that are found to be deeper in the stack than the current
|
||||
invocation. This heuristic does not reclaim storage as
|
||||
soon as it becomes invalid, but it will do so eventually.
|
||||
|
||||
As a special case, alloca(0) reclaims storage without
|
||||
allocating any. It is a good idea to use alloca(0) in
|
||||
your main control loop, etc. to force garbage collection. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <alloca.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef emacs
|
||||
# include "lisp.h"
|
||||
# include "blockinput.h"
|
||||
# ifdef EMACS_FREE
|
||||
# undef free
|
||||
# define free EMACS_FREE
|
||||
# endif
|
||||
#else
|
||||
# define memory_full() abort ()
|
||||
#endif
|
||||
|
||||
/* If compiling with GCC 2, this file's not needed. */
|
||||
#if !defined (__GNUC__) || __GNUC__ < 2
|
||||
|
||||
/* If someone has defined alloca as a macro,
|
||||
there must be some other way alloca is supposed to work. */
|
||||
# ifndef alloca
|
||||
|
||||
# ifdef emacs
|
||||
# ifdef static
|
||||
/* actually, only want this if static is defined as ""
|
||||
-- this is for usg, in which emacs must undefine static
|
||||
in order to make unexec workable
|
||||
*/
|
||||
# ifndef STACK_DIRECTION
|
||||
you
|
||||
lose
|
||||
-- must know STACK_DIRECTION at compile-time
|
||||
/* Using #error here is not wise since this file should work for
|
||||
old and obscure compilers. */
|
||||
# endif /* STACK_DIRECTION undefined */
|
||||
# endif /* static */
|
||||
# endif /* emacs */
|
||||
|
||||
/* If your stack is a linked list of frames, you have to
|
||||
provide an "address metric" ADDRESS_FUNCTION macro. */
|
||||
|
||||
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
long i00afunc ();
|
||||
# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
|
||||
# else
|
||||
# define ADDRESS_FUNCTION(arg) &(arg)
|
||||
# endif
|
||||
|
||||
/* Define STACK_DIRECTION if you know the direction of stack
|
||||
growth for your system; otherwise it will be automatically
|
||||
deduced at run-time.
|
||||
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
|
||||
# ifndef STACK_DIRECTION
|
||||
# define STACK_DIRECTION 0 /* Direction unknown. */
|
||||
# endif
|
||||
|
||||
# if STACK_DIRECTION != 0
|
||||
|
||||
# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
|
||||
|
||||
# else /* STACK_DIRECTION == 0; need run-time code. */
|
||||
|
||||
static int stack_dir; /* 1 or -1 once known. */
|
||||
# define STACK_DIR stack_dir
|
||||
|
||||
static void
|
||||
find_stack_direction (void)
|
||||
{
|
||||
static char *addr = NULL; /* Address of first `dummy', once known. */
|
||||
auto char dummy; /* To get stack address. */
|
||||
|
||||
if (addr == NULL)
|
||||
{ /* Initial entry. */
|
||||
addr = ADDRESS_FUNCTION (dummy);
|
||||
|
||||
find_stack_direction (); /* Recurse once. */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Second entry. */
|
||||
if (ADDRESS_FUNCTION (dummy) > addr)
|
||||
stack_dir = 1; /* Stack grew upward. */
|
||||
else
|
||||
stack_dir = -1; /* Stack grew downward. */
|
||||
}
|
||||
}
|
||||
|
||||
# endif /* STACK_DIRECTION == 0 */
|
||||
|
||||
/* An "alloca header" is used to:
|
||||
(a) chain together all alloca'ed blocks;
|
||||
(b) keep track of stack depth.
|
||||
|
||||
It is very important that sizeof(header) agree with malloc
|
||||
alignment chunk size. The following default should work okay. */
|
||||
|
||||
# ifndef ALIGN_SIZE
|
||||
# define ALIGN_SIZE sizeof(double)
|
||||
# endif
|
||||
|
||||
typedef union hdr
|
||||
{
|
||||
char align[ALIGN_SIZE]; /* To force sizeof(header). */
|
||||
struct
|
||||
{
|
||||
union hdr *next; /* For chaining headers. */
|
||||
char *deep; /* For stack depth measure. */
|
||||
} h;
|
||||
} header;
|
||||
|
||||
static header *last_alloca_header = NULL; /* -> last alloca header. */
|
||||
|
||||
/* Return a pointer to at least SIZE bytes of storage,
|
||||
which will be automatically reclaimed upon exit from
|
||||
the procedure that called alloca. Originally, this space
|
||||
was supposed to be taken from the current stack frame of the
|
||||
caller, but that method cannot be made to work for some
|
||||
implementations of C, for example under Gould's UTX/32. */
|
||||
|
||||
void *
|
||||
alloca (size_t size)
|
||||
{
|
||||
auto char probe; /* Probes stack depth: */
|
||||
register char *depth = ADDRESS_FUNCTION (probe);
|
||||
|
||||
# if STACK_DIRECTION == 0
|
||||
if (STACK_DIR == 0) /* Unknown growth direction. */
|
||||
find_stack_direction ();
|
||||
# endif
|
||||
|
||||
/* Reclaim garbage, defined as all alloca'd storage that
|
||||
was allocated from deeper in the stack than currently. */
|
||||
|
||||
{
|
||||
register header *hp; /* Traverses linked list. */
|
||||
|
||||
# ifdef emacs
|
||||
BLOCK_INPUT;
|
||||
# endif
|
||||
|
||||
for (hp = last_alloca_header; hp != NULL;)
|
||||
if ((STACK_DIR > 0 && hp->h.deep > depth)
|
||||
|| (STACK_DIR < 0 && hp->h.deep < depth))
|
||||
{
|
||||
register header *np = hp->h.next;
|
||||
|
||||
free (hp); /* Collect garbage. */
|
||||
|
||||
hp = np; /* -> next header. */
|
||||
}
|
||||
else
|
||||
break; /* Rest are not deeper. */
|
||||
|
||||
last_alloca_header = hp; /* -> last valid storage. */
|
||||
|
||||
# ifdef emacs
|
||||
UNBLOCK_INPUT;
|
||||
# endif
|
||||
}
|
||||
|
||||
if (size == 0)
|
||||
return NULL; /* No allocation required. */
|
||||
|
||||
/* Allocate combined header + user data storage. */
|
||||
|
||||
{
|
||||
/* Address of header. */
|
||||
register header *new;
|
||||
|
||||
size_t combined_size = sizeof (header) + size;
|
||||
if (combined_size < sizeof (header))
|
||||
memory_full ();
|
||||
|
||||
new = malloc (combined_size);
|
||||
|
||||
if (! new)
|
||||
memory_full ();
|
||||
|
||||
new->h.next = last_alloca_header;
|
||||
new->h.deep = depth;
|
||||
|
||||
last_alloca_header = new;
|
||||
|
||||
/* User storage begins just after header. */
|
||||
|
||||
return (void *) (new + 1);
|
||||
}
|
||||
}
|
||||
|
||||
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
|
||||
# ifdef DEBUG_I00AFUNC
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
|
||||
# ifndef CRAY_STACK
|
||||
# define CRAY_STACK
|
||||
# ifndef CRAY2
|
||||
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
|
||||
struct stack_control_header
|
||||
{
|
||||
long shgrow:32; /* Number of times stack has grown. */
|
||||
long shaseg:32; /* Size of increments to stack. */
|
||||
long shhwm:32; /* High water mark of stack. */
|
||||
long shsize:32; /* Current size of stack (all segments). */
|
||||
};
|
||||
|
||||
/* The stack segment linkage control information occurs at
|
||||
the high-address end of a stack segment. (The stack
|
||||
grows from low addresses to high addresses.) The initial
|
||||
part of the stack segment linkage control information is
|
||||
0200 (octal) words. This provides for register storage
|
||||
for the routine which overflows the stack. */
|
||||
|
||||
struct stack_segment_linkage
|
||||
{
|
||||
long ss[0200]; /* 0200 overflow words. */
|
||||
long sssize:32; /* Number of words in this segment. */
|
||||
long ssbase:32; /* Offset to stack base. */
|
||||
long:32;
|
||||
long sspseg:32; /* Offset to linkage control of previous
|
||||
segment of stack. */
|
||||
long:32;
|
||||
long sstcpt:32; /* Pointer to task common address block. */
|
||||
long sscsnm; /* Private control structure number for
|
||||
microtasking. */
|
||||
long ssusr1; /* Reserved for user. */
|
||||
long ssusr2; /* Reserved for user. */
|
||||
long sstpid; /* Process ID for pid based multi-tasking. */
|
||||
long ssgvup; /* Pointer to multitasking thread giveup. */
|
||||
long sscray[7]; /* Reserved for Cray Research. */
|
||||
long ssa0;
|
||||
long ssa1;
|
||||
long ssa2;
|
||||
long ssa3;
|
||||
long ssa4;
|
||||
long ssa5;
|
||||
long ssa6;
|
||||
long ssa7;
|
||||
long sss0;
|
||||
long sss1;
|
||||
long sss2;
|
||||
long sss3;
|
||||
long sss4;
|
||||
long sss5;
|
||||
long sss6;
|
||||
long sss7;
|
||||
};
|
||||
|
||||
# else /* CRAY2 */
|
||||
/* The following structure defines the vector of words
|
||||
returned by the STKSTAT library routine. */
|
||||
struct stk_stat
|
||||
{
|
||||
long now; /* Current total stack size. */
|
||||
long maxc; /* Amount of contiguous space which would
|
||||
be required to satisfy the maximum
|
||||
stack demand to date. */
|
||||
long high_water; /* Stack high-water mark. */
|
||||
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
|
||||
long hits; /* Number of internal buffer hits. */
|
||||
long extends; /* Number of block extensions. */
|
||||
long stko_mallocs; /* Block allocations by $STKOFEN. */
|
||||
long underflows; /* Number of stack underflow calls ($STKRETN). */
|
||||
long stko_free; /* Number of deallocations by $STKRETN. */
|
||||
long stkm_free; /* Number of deallocations by $STKMRET. */
|
||||
long segments; /* Current number of stack segments. */
|
||||
long maxs; /* Maximum number of stack segments so far. */
|
||||
long pad_size; /* Stack pad size. */
|
||||
long current_address; /* Current stack segment address. */
|
||||
long current_size; /* Current stack segment size. This
|
||||
number is actually corrupted by STKSTAT to
|
||||
include the fifteen word trailer area. */
|
||||
long initial_address; /* Address of initial segment. */
|
||||
long initial_size; /* Size of initial segment. */
|
||||
};
|
||||
|
||||
/* The following structure describes the data structure which trails
|
||||
any stack segment. I think that the description in 'asdef' is
|
||||
out of date. I only describe the parts that I am sure about. */
|
||||
|
||||
struct stk_trailer
|
||||
{
|
||||
long this_address; /* Address of this block. */
|
||||
long this_size; /* Size of this block (does not include
|
||||
this trailer). */
|
||||
long unknown2;
|
||||
long unknown3;
|
||||
long link; /* Address of trailer block of previous
|
||||
segment. */
|
||||
long unknown5;
|
||||
long unknown6;
|
||||
long unknown7;
|
||||
long unknown8;
|
||||
long unknown9;
|
||||
long unknown10;
|
||||
long unknown11;
|
||||
long unknown12;
|
||||
long unknown13;
|
||||
long unknown14;
|
||||
};
|
||||
|
||||
# endif /* CRAY2 */
|
||||
# endif /* not CRAY_STACK */
|
||||
|
||||
# ifdef CRAY2
|
||||
/* Determine a "stack measure" for an arbitrary ADDRESS.
|
||||
I doubt that "lint" will like this much. */
|
||||
|
||||
static long
|
||||
i00afunc (long *address)
|
||||
{
|
||||
struct stk_stat status;
|
||||
struct stk_trailer *trailer;
|
||||
long *block, size;
|
||||
long result = 0;
|
||||
|
||||
/* We want to iterate through all of the segments. The first
|
||||
step is to get the stack status structure. We could do this
|
||||
more quickly and more directly, perhaps, by referencing the
|
||||
$LM00 common block, but I know that this works. */
|
||||
|
||||
STKSTAT (&status);
|
||||
|
||||
/* Set up the iteration. */
|
||||
|
||||
trailer = (struct stk_trailer *) (status.current_address
|
||||
+ status.current_size
|
||||
- 15);
|
||||
|
||||
/* There must be at least one stack segment. Therefore it is
|
||||
a fatal error if "trailer" is null. */
|
||||
|
||||
if (trailer == 0)
|
||||
abort ();
|
||||
|
||||
/* Discard segments that do not contain our argument address. */
|
||||
|
||||
while (trailer != 0)
|
||||
{
|
||||
block = (long *) trailer->this_address;
|
||||
size = trailer->this_size;
|
||||
if (block == 0 || size == 0)
|
||||
abort ();
|
||||
trailer = (struct stk_trailer *) trailer->link;
|
||||
if ((block <= address) && (address < (block + size)))
|
||||
break;
|
||||
}
|
||||
|
||||
/* Set the result to the offset in this segment and add the sizes
|
||||
of all predecessor segments. */
|
||||
|
||||
result = address - block;
|
||||
|
||||
if (trailer == 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (trailer->this_size <= 0)
|
||||
abort ();
|
||||
result += trailer->this_size;
|
||||
trailer = (struct stk_trailer *) trailer->link;
|
||||
}
|
||||
while (trailer != 0);
|
||||
|
||||
/* We are done. Note that if you present a bogus address (one
|
||||
not in any segment), you will get a different number back, formed
|
||||
from subtracting the address of the first block. This is probably
|
||||
not what you want. */
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
# else /* not CRAY2 */
|
||||
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
|
||||
Determine the number of the cell within the stack,
|
||||
given the address of the cell. The purpose of this
|
||||
routine is to linearize, in some sense, stack addresses
|
||||
for alloca. */
|
||||
|
||||
static long
|
||||
i00afunc (long address)
|
||||
{
|
||||
long stkl = 0;
|
||||
|
||||
long size, pseg, this_segment, stack;
|
||||
long result = 0;
|
||||
|
||||
struct stack_segment_linkage *ssptr;
|
||||
|
||||
/* Register B67 contains the address of the end of the
|
||||
current stack segment. If you (as a subprogram) store
|
||||
your registers on the stack and find that you are past
|
||||
the contents of B67, you have overflowed the segment.
|
||||
|
||||
B67 also points to the stack segment linkage control
|
||||
area, which is what we are really interested in. */
|
||||
|
||||
stkl = CRAY_STACKSEG_END ();
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
|
||||
/* If one subtracts 'size' from the end of the segment,
|
||||
one has the address of the first word of the segment.
|
||||
|
||||
If this is not the first segment, 'pseg' will be
|
||||
nonzero. */
|
||||
|
||||
pseg = ssptr->sspseg;
|
||||
size = ssptr->sssize;
|
||||
|
||||
this_segment = stkl - size;
|
||||
|
||||
/* It is possible that calling this routine itself caused
|
||||
a stack overflow. Discard stack segments which do not
|
||||
contain the target address. */
|
||||
|
||||
while (!(this_segment <= address && address <= stkl))
|
||||
{
|
||||
# ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
|
||||
# endif
|
||||
if (pseg == 0)
|
||||
break;
|
||||
stkl = stkl - pseg;
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
size = ssptr->sssize;
|
||||
pseg = ssptr->sspseg;
|
||||
this_segment = stkl - size;
|
||||
}
|
||||
|
||||
result = address - this_segment;
|
||||
|
||||
/* If you subtract pseg from the current end of the stack,
|
||||
you get the address of the previous stack segment's end.
|
||||
This seems a little convoluted to me, but I'll bet you save
|
||||
a cycle somewhere. */
|
||||
|
||||
while (pseg != 0)
|
||||
{
|
||||
# ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o\n", pseg, size);
|
||||
# endif
|
||||
stkl = stkl - pseg;
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
size = ssptr->sssize;
|
||||
pseg = ssptr->sspseg;
|
||||
result += size;
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
# endif /* not CRAY2 */
|
||||
# endif /* CRAY */
|
||||
|
||||
# endif /* no alloca */
|
||||
#endif /* not GCC version 2 */
|
54
gnutar/lib/alloca_.h
Normal file
54
gnutar/lib/alloca_.h
Normal file
@ -0,0 +1,54 @@
|
||||
/* Memory allocation on the stack.
|
||||
|
||||
Copyright (C) 1995, 1999, 2001-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 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. */
|
||||
|
||||
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
|
||||
means there is a real alloca function. */
|
||||
#ifndef _GL_ALLOCA_H
|
||||
#define _GL_ALLOCA_H
|
||||
|
||||
/* alloca (N) returns a pointer to N bytes of memory
|
||||
allocated on the stack, which will last until the function returns.
|
||||
Use of alloca should be avoided:
|
||||
- inside arguments of function calls - undefined behaviour,
|
||||
- in inline functions - the allocation may actually last until the
|
||||
calling function returns,
|
||||
- for huge N (say, N >= 65536) - you never know how large (or small)
|
||||
the stack is, and when the stack cannot fulfill the memory allocation
|
||||
request, the program just crashes.
|
||||
*/
|
||||
|
||||
#ifndef alloca
|
||||
# ifdef __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
# elif defined _AIX
|
||||
# define alloca __alloca
|
||||
# elif defined _MSC_VER
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
# else
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
void *alloca (size_t);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _GL_ALLOCA_H */
|
137
gnutar/lib/allocsa.c
Normal file
137
gnutar/lib/allocsa.c
Normal file
@ -0,0 +1,137 @@
|
||||
/* Safe automatic memory allocation.
|
||||
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
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. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Specification. */
|
||||
#include "allocsa.h"
|
||||
|
||||
/* The speed critical point in this file is freesa() applied to an alloca()
|
||||
result: it must be fast, to match the speed of alloca(). The speed of
|
||||
mallocsa() and freesa() in the other case are not critical, because they
|
||||
are only invoked for big memory sizes. */
|
||||
|
||||
#if HAVE_ALLOCA
|
||||
|
||||
/* Store the mallocsa() results in a hash table. This is needed to reliably
|
||||
distinguish a mallocsa() result and an alloca() result.
|
||||
|
||||
Although it is possible that the same pointer is returned by alloca() and
|
||||
by mallocsa() at different times in the same application, it does not lead
|
||||
to a bug in freesa(), because:
|
||||
- Before a pointer returned by alloca() can point into malloc()ed memory,
|
||||
the function must return, and once this has happened the programmer must
|
||||
not call freesa() on it anyway.
|
||||
- Before a pointer returned by mallocsa() can point into the stack, it
|
||||
must be freed. The only function that can free it is freesa(), and
|
||||
when freesa() frees it, it also removes it from the hash table. */
|
||||
|
||||
#define MAGIC_NUMBER 0x1415fb4a
|
||||
#define MAGIC_SIZE sizeof (int)
|
||||
/* This is how the header info would look like without any alignment
|
||||
considerations. */
|
||||
struct preliminary_header { void *next; char room[MAGIC_SIZE]; };
|
||||
/* But the header's size must be a multiple of sa_alignment_max. */
|
||||
#define HEADER_SIZE \
|
||||
(((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max)
|
||||
struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; };
|
||||
/* Verify that HEADER_SIZE == sizeof (struct header). */
|
||||
typedef int verify1[2 * (HEADER_SIZE == sizeof (struct header)) - 1];
|
||||
/* We make the hash table quite big, so that during lookups the probability
|
||||
of empty hash buckets is quite high. There is no need to make the hash
|
||||
table resizable, because when the hash table gets filled so much that the
|
||||
lookup becomes slow, it means that the application has memory leaks. */
|
||||
#define HASH_TABLE_SIZE 257
|
||||
static void * mallocsa_results[HASH_TABLE_SIZE];
|
||||
|
||||
#endif
|
||||
|
||||
void *
|
||||
mallocsa (size_t n)
|
||||
{
|
||||
#if HAVE_ALLOCA
|
||||
/* Allocate one more word, that serves as an indicator for malloc()ed
|
||||
memory, so that freesa() of an alloca() result is fast. */
|
||||
size_t nplus = n + HEADER_SIZE;
|
||||
|
||||
if (nplus >= n)
|
||||
{
|
||||
char *p = (char *) malloc (nplus);
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
size_t slot;
|
||||
|
||||
p += HEADER_SIZE;
|
||||
|
||||
/* Put a magic number into the indicator word. */
|
||||
((int *) p)[-1] = MAGIC_NUMBER;
|
||||
|
||||
/* Enter p into the hash table. */
|
||||
slot = (unsigned long) p % HASH_TABLE_SIZE;
|
||||
((struct header *) (p - HEADER_SIZE))->next = mallocsa_results[slot];
|
||||
mallocsa_results[slot] = p;
|
||||
|
||||
return p;
|
||||
}
|
||||
}
|
||||
/* Out of memory. */
|
||||
return NULL;
|
||||
#else
|
||||
# if !MALLOC_0_IS_NONNULL
|
||||
if (n == 0)
|
||||
n = 1;
|
||||
# endif
|
||||
return malloc (n);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if HAVE_ALLOCA
|
||||
void
|
||||
freesa (void *p)
|
||||
{
|
||||
/* mallocsa() may have returned NULL. */
|
||||
if (p != NULL)
|
||||
{
|
||||
/* Attempt to quickly distinguish the mallocsa() result - which has
|
||||
a magic indicator word - and the alloca() result - which has an
|
||||
uninitialized indicator word. It is for this test that sa_increment
|
||||
additional bytes are allocated in the alloca() case. */
|
||||
if (((int *) p)[-1] == MAGIC_NUMBER)
|
||||
{
|
||||
/* Looks like a mallocsa() result. To see whether it really is one,
|
||||
perform a lookup in the hash table. */
|
||||
size_t slot = (unsigned long) p % HASH_TABLE_SIZE;
|
||||
void **chain = &mallocsa_results[slot];
|
||||
for (; *chain != NULL;)
|
||||
{
|
||||
if (*chain == p)
|
||||
{
|
||||
/* Found it. Remove it from the hash table and free it. */
|
||||
char *p_begin = (char *) p - HEADER_SIZE;
|
||||
*chain = ((struct header *) p_begin)->next;
|
||||
free (p_begin);
|
||||
return;
|
||||
}
|
||||
chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next;
|
||||
}
|
||||
}
|
||||
/* At this point, we know it was not a mallocsa() result. */
|
||||
}
|
||||
}
|
||||
#endif
|
124
gnutar/lib/allocsa.h
Normal file
124
gnutar/lib/allocsa.h
Normal file
@ -0,0 +1,124 @@
|
||||
/* Safe automatic memory allocation.
|
||||
Copyright (C) 2003-2007 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
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 _ALLOCSA_H
|
||||
#define _ALLOCSA_H
|
||||
|
||||
#include <alloca.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call
|
||||
alloca(N); otherwise it returns NULL. It either returns N bytes of
|
||||
memory allocated on the stack, that lasts until the function returns,
|
||||
or NULL.
|
||||
Use of safe_alloca should be avoided:
|
||||
- inside arguments of function calls - undefined behaviour,
|
||||
- in inline functions - the allocation may actually last until the
|
||||
calling function returns.
|
||||
*/
|
||||
#if HAVE_ALLOCA
|
||||
/* The OS usually guarantees only one guard page at the bottom of the stack,
|
||||
and a page size can be as small as 4096 bytes. So we cannot safely
|
||||
allocate anything larger than 4096 bytes. Also care for the possibility
|
||||
of a few compiler-allocated temporary stack slots.
|
||||
This must be a macro, not an inline function. */
|
||||
# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
|
||||
#else
|
||||
# define safe_alloca(N) ((void) (N), NULL)
|
||||
#endif
|
||||
|
||||
/* allocsa(N) is a safe variant of alloca(N). It allocates N bytes of
|
||||
memory allocated on the stack, that must be freed using freesa() before
|
||||
the function returns. Upon failure, it returns NULL. */
|
||||
#if HAVE_ALLOCA
|
||||
# define allocsa(N) \
|
||||
((N) < 4032 - sa_increment \
|
||||
? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \
|
||||
: mallocsa (N))
|
||||
#else
|
||||
# define allocsa(N) \
|
||||
mallocsa (N)
|
||||
#endif
|
||||
extern void * mallocsa (size_t n);
|
||||
|
||||
/* Free a block of memory allocated through allocsa(). */
|
||||
#if HAVE_ALLOCA
|
||||
extern void freesa (void *p);
|
||||
#else
|
||||
# define freesa free
|
||||
#endif
|
||||
|
||||
/* Maybe we should also define a variant
|
||||
nallocsa (size_t n, size_t s) - behaves like allocsa (n * s)
|
||||
If this would be useful in your application. please speak up. */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------- Auxiliary, non-public definitions ------------------- */
|
||||
|
||||
/* Determine the alignment of a type at compile time. */
|
||||
#if defined __GNUC__
|
||||
# define sa_alignof __alignof__
|
||||
#elif defined __cplusplus
|
||||
template <class type> struct sa_alignof_helper { char __slot1; type __slot2; };
|
||||
# define sa_alignof(type) offsetof (sa_alignof_helper<type>, __slot2)
|
||||
#elif defined __hpux
|
||||
/* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof
|
||||
values. */
|
||||
# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
|
||||
#elif defined _AIX
|
||||
/* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof
|
||||
values. */
|
||||
# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
|
||||
#else
|
||||
# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
/* The desired alignment of memory allocations is the maximum alignment
|
||||
among all elementary types. */
|
||||
sa_alignment_long = sa_alignof (long),
|
||||
sa_alignment_double = sa_alignof (double),
|
||||
#if HAVE_LONG_LONG_INT
|
||||
sa_alignment_longlong = sa_alignof (long long),
|
||||
#endif
|
||||
sa_alignment_longdouble = sa_alignof (long double),
|
||||
sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1)
|
||||
#if HAVE_LONG_LONG_INT
|
||||
| (sa_alignment_longlong - 1)
|
||||
#endif
|
||||
| (sa_alignment_longdouble - 1)
|
||||
) + 1,
|
||||
/* The increment that guarantees room for a magic word must be >= sizeof (int)
|
||||
and a multiple of sa_alignment_max. */
|
||||
sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max
|
||||
};
|
||||
|
||||
#endif /* _ALLOCSA_H */
|
7
gnutar/lib/allocsa.valgrind
Normal file
7
gnutar/lib/allocsa.valgrind
Normal file
@ -0,0 +1,7 @@
|
||||
# Suppress a valgrind message about use of uninitialized memory in freesa().
|
||||
# This use is OK because it provides only a speedup.
|
||||
{
|
||||
freesa
|
||||
Memcheck:Cond
|
||||
fun:freesa
|
||||
}
|
278
gnutar/lib/argmatch.c
Normal file
278
gnutar/lib/argmatch.c
Normal file
@ -0,0 +1,278 @@
|
||||
/* argmatch.c -- find a match for a string in an array
|
||||
|
||||
Copyright (C) 1990, 1998, 1999, 2001, 2002, 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 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 David MacKenzie <djm@ai.mit.edu>
|
||||
Modified by Akim Demaille <demaille@inf.enst.fr> */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Specification. */
|
||||
#include "argmatch.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gettext.h"
|
||||
#define _(msgid) gettext (msgid)
|
||||
|
||||
#include "error.h"
|
||||
#include "quotearg.h"
|
||||
#include "quote.h"
|
||||
|
||||
#if USE_UNLOCKED_IO
|
||||
# include "unlocked-io.h"
|
||||
#endif
|
||||
|
||||
/* When reporting an invalid argument, show nonprinting characters
|
||||
by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use
|
||||
literal_quoting_style. */
|
||||
#ifndef ARGMATCH_QUOTING_STYLE
|
||||
# define ARGMATCH_QUOTING_STYLE locale_quoting_style
|
||||
#endif
|
||||
|
||||
/* Non failing version of argmatch call this function after failing. */
|
||||
#ifndef ARGMATCH_DIE
|
||||
# include "exitfail.h"
|
||||
# define ARGMATCH_DIE exit (exit_failure)
|
||||
#endif
|
||||
|
||||
#ifdef ARGMATCH_DIE_DECL
|
||||
ARGMATCH_DIE_DECL;
|
||||
#endif
|
||||
|
||||
static void
|
||||
__argmatch_die (void)
|
||||
{
|
||||
ARGMATCH_DIE;
|
||||
}
|
||||
|
||||
/* Used by XARGMATCH and XARGCASEMATCH. See description in argmatch.h.
|
||||
Default to __argmatch_die, but allow caller to change this at run-time. */
|
||||
argmatch_exit_fn argmatch_die = __argmatch_die;
|
||||
|
||||
|
||||
/* If ARG is an unambiguous match for an element of the
|
||||
NULL-terminated array ARGLIST, return the index in ARGLIST
|
||||
of the matched element, else -1 if it does not match any element
|
||||
or -2 if it is ambiguous (is a prefix of more than one element).
|
||||
|
||||
If VALLIST is none null, use it to resolve ambiguities limited to
|
||||
synonyms, i.e., for
|
||||
"yes", "yop" -> 0
|
||||
"no", "nope" -> 1
|
||||
"y" is a valid argument, for `0', and "n" for `1'. */
|
||||
|
||||
ptrdiff_t
|
||||
argmatch (const char *arg, const char *const *arglist,
|
||||
const char *vallist, size_t valsize)
|
||||
{
|
||||
size_t i; /* Temporary index in ARGLIST. */
|
||||
size_t arglen; /* Length of ARG. */
|
||||
ptrdiff_t matchind = -1; /* Index of first nonexact match. */
|
||||
bool ambiguous = false; /* If true, multiple nonexact match(es). */
|
||||
|
||||
arglen = strlen (arg);
|
||||
|
||||
/* Test all elements for either exact match or abbreviated matches. */
|
||||
for (i = 0; arglist[i]; i++)
|
||||
{
|
||||
if (!strncmp (arglist[i], arg, arglen))
|
||||
{
|
||||
if (strlen (arglist[i]) == arglen)
|
||||
/* Exact match found. */
|
||||
return i;
|
||||
else if (matchind == -1)
|
||||
/* First nonexact match found. */
|
||||
matchind = i;
|
||||
else
|
||||
{
|
||||
/* Second nonexact match found. */
|
||||
if (vallist == NULL
|
||||
|| memcmp (vallist + valsize * matchind,
|
||||
vallist + valsize * i, valsize))
|
||||
{
|
||||
/* There is a real ambiguity, or we could not
|
||||
disambiguate. */
|
||||
ambiguous = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ambiguous)
|
||||
return -2;
|
||||
else
|
||||
return matchind;
|
||||
}
|
||||
|
||||
/* Error reporting for argmatch.
|
||||
CONTEXT is a description of the type of entity that was being matched.
|
||||
VALUE is the invalid value that was given.
|
||||
PROBLEM is the return value from argmatch. */
|
||||
|
||||
void
|
||||
argmatch_invalid (const char *context, const char *value, ptrdiff_t problem)
|
||||
{
|
||||
char const *format = (problem == -1
|
||||
? _("invalid argument %s for %s")
|
||||
: _("ambiguous argument %s for %s"));
|
||||
|
||||
error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value),
|
||||
quote_n (1, context));
|
||||
}
|
||||
|
||||
/* List the valid arguments for argmatch.
|
||||
ARGLIST is the same as in argmatch.
|
||||
VALLIST is a pointer to an array of values.
|
||||
VALSIZE is the size of the elements of VALLIST */
|
||||
void
|
||||
argmatch_valid (const char *const *arglist,
|
||||
const char *vallist, size_t valsize)
|
||||
{
|
||||
size_t i;
|
||||
const char *last_val = NULL;
|
||||
|
||||
/* We try to put synonyms on the same line. The assumption is that
|
||||
synonyms follow each other */
|
||||
fprintf (stderr, _("Valid arguments are:"));
|
||||
for (i = 0; arglist[i]; i++)
|
||||
if ((i == 0)
|
||||
|| memcmp (last_val, vallist + valsize * i, valsize))
|
||||
{
|
||||
fprintf (stderr, "\n - `%s'", arglist[i]);
|
||||
last_val = vallist + valsize * i;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf (stderr, ", `%s'", arglist[i]);
|
||||
}
|
||||
putc ('\n', stderr);
|
||||
}
|
||||
|
||||
/* Never failing versions of the previous functions.
|
||||
|
||||
CONTEXT is the context for which argmatch is called (e.g.,
|
||||
"--version-control", or "$VERSION_CONTROL" etc.). Upon failure,
|
||||
calls the (supposed never to return) function EXIT_FN. */
|
||||
|
||||
ptrdiff_t
|
||||
__xargmatch_internal (const char *context,
|
||||
const char *arg, const char *const *arglist,
|
||||
const char *vallist, size_t valsize,
|
||||
argmatch_exit_fn exit_fn)
|
||||
{
|
||||
ptrdiff_t res = argmatch (arg, arglist, vallist, valsize);
|
||||
if (res >= 0)
|
||||
/* Success. */
|
||||
return res;
|
||||
|
||||
/* We failed. Explain why. */
|
||||
argmatch_invalid (context, arg, res);
|
||||
argmatch_valid (arglist, vallist, valsize);
|
||||
(*exit_fn) ();
|
||||
|
||||
return -1; /* To please the compilers. */
|
||||
}
|
||||
|
||||
/* Look for VALUE in VALLIST, an array of objects of size VALSIZE and
|
||||
return the first corresponding argument in ARGLIST */
|
||||
const char *
|
||||
argmatch_to_argument (const char *value,
|
||||
const char *const *arglist,
|
||||
const char *vallist, size_t valsize)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for (i = 0; arglist[i]; i++)
|
||||
if (!memcmp (value, vallist + valsize * i, valsize))
|
||||
return arglist[i];
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef TEST
|
||||
/*
|
||||
* Based on "getversion.c" by David MacKenzie <djm@gnu.ai.mit.edu>
|
||||
*/
|
||||
char *program_name;
|
||||
|
||||
/* When to make backup files. */
|
||||
enum backup_type
|
||||
{
|
||||
/* Never make backups. */
|
||||
no_backups,
|
||||
|
||||
/* Make simple backups of every file. */
|
||||
simple_backups,
|
||||
|
||||
/* Make numbered backups of files that already have numbered backups,
|
||||
and simple backups of the others. */
|
||||
numbered_existing_backups,
|
||||
|
||||
/* Make numbered backups of every file. */
|
||||
numbered_backups
|
||||
};
|
||||
|
||||
/* Two tables describing arguments (keys) and their corresponding
|
||||
values */
|
||||
static const char *const backup_args[] =
|
||||
{
|
||||
"no", "none", "off",
|
||||
"simple", "never",
|
||||
"existing", "nil",
|
||||
"numbered", "t",
|
||||
0
|
||||
};
|
||||
|
||||
static const enum backup_type backup_vals[] =
|
||||
{
|
||||
no_backups, no_backups, no_backups,
|
||||
simple_backups, simple_backups,
|
||||
numbered_existing_backups, numbered_existing_backups,
|
||||
numbered_backups, numbered_backups
|
||||
};
|
||||
|
||||
int
|
||||
main (int argc, const char *const *argv)
|
||||
{
|
||||
const char *cp;
|
||||
enum backup_type backup_type = no_backups;
|
||||
|
||||
program_name = (char *) argv[0];
|
||||
|
||||
if (argc > 2)
|
||||
{
|
||||
fprintf (stderr, "Usage: %s [VERSION_CONTROL]\n", program_name);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if ((cp = getenv ("VERSION_CONTROL")))
|
||||
backup_type = XARGMATCH ("$VERSION_CONTROL", cp,
|
||||
backup_args, backup_vals);
|
||||
|
||||
if (argc == 2)
|
||||
backup_type = XARGMATCH (program_name, argv[1],
|
||||
backup_args, backup_vals);
|
||||
|
||||
printf ("The version control is `%s'\n",
|
||||
ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals));
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
103
gnutar/lib/argmatch.h
Normal file
103
gnutar/lib/argmatch.h
Normal file
@ -0,0 +1,103 @@
|
||||
/* argmatch.h -- definitions and prototypes for argmatch.c
|
||||
|
||||
Copyright (C) 1990, 1998, 1999, 2001, 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. */
|
||||
|
||||
/* Written by David MacKenzie <djm@ai.mit.edu>
|
||||
Modified by Akim Demaille <demaille@inf.enst.fr> */
|
||||
|
||||
#ifndef ARGMATCH_H_
|
||||
# define ARGMATCH_H_ 1
|
||||
|
||||
# include <stddef.h>
|
||||
|
||||
# include "verify.h"
|
||||
|
||||
# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
|
||||
|
||||
/* Assert there are as many real arguments as there are values
|
||||
(argument list ends with a NULL guard). */
|
||||
|
||||
# define ARGMATCH_VERIFY(Arglist, Vallist) \
|
||||
verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
|
||||
|
||||
/* Return the index of the element of ARGLIST (NULL terminated) that
|
||||
matches with ARG. If VALLIST is not NULL, then use it to resolve
|
||||
false ambiguities (i.e., different matches of ARG but corresponding
|
||||
to the same values in VALLIST). */
|
||||
|
||||
ptrdiff_t argmatch (char const *arg, char const *const *arglist,
|
||||
char const *vallist, size_t valsize);
|
||||
|
||||
# define ARGMATCH(Arg, Arglist, Vallist) \
|
||||
argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist))
|
||||
|
||||
/* xargmatch calls this function when it fails. This function should not
|
||||
return. By default, this is a function that calls ARGMATCH_DIE which
|
||||
in turn defaults to `exit (exit_failure)'. */
|
||||
typedef void (*argmatch_exit_fn) (void);
|
||||
extern argmatch_exit_fn argmatch_die;
|
||||
|
||||
/* Report on stderr why argmatch failed. Report correct values. */
|
||||
|
||||
void argmatch_invalid (char const *context, char const *value,
|
||||
ptrdiff_t problem);
|
||||
|
||||
/* Left for compatibility with the old name invalid_arg */
|
||||
|
||||
# define invalid_arg(Context, Value, Problem) \
|
||||
argmatch_invalid (Context, Value, Problem)
|
||||
|
||||
|
||||
|
||||
/* Report on stderr the list of possible arguments. */
|
||||
|
||||
void argmatch_valid (char const *const *arglist,
|
||||
char const *vallist, size_t valsize);
|
||||
|
||||
# define ARGMATCH_VALID(Arglist, Vallist) \
|
||||
argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist))
|
||||
|
||||
|
||||
|
||||
/* Same as argmatch, but upon failure, reports a explanation on the
|
||||
failure, and exits using the function EXIT_FN. */
|
||||
|
||||
ptrdiff_t __xargmatch_internal (char const *context,
|
||||
char const *arg, char const *const *arglist,
|
||||
char const *vallist, size_t valsize,
|
||||
argmatch_exit_fn exit_fn);
|
||||
|
||||
/* Programmer friendly interface to __xargmatch_internal. */
|
||||
|
||||
# define XARGMATCH(Context, Arg, Arglist, Vallist) \
|
||||
((Vallist) [__xargmatch_internal (Context, Arg, Arglist, \
|
||||
(char const *) (Vallist), \
|
||||
sizeof *(Vallist), \
|
||||
argmatch_die)])
|
||||
|
||||
/* Convert a value into a corresponding argument. */
|
||||
|
||||
char const *argmatch_to_argument (char const *value,
|
||||
char const *const *arglist,
|
||||
char const *vallist, size_t valsize);
|
||||
|
||||
# define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist) \
|
||||
argmatch_to_argument (Value, Arglist, \
|
||||
(char const *) (Vallist), sizeof *(Vallist))
|
||||
|
||||
#endif /* ARGMATCH_H_ */
|
25
gnutar/lib/argp-ba.c
Normal file
25
gnutar/lib/argp-ba.c
Normal file
@ -0,0 +1,25 @@
|
||||
/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
|
||||
Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
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 set by the user program, it should point to string that is the
|
||||
bug-reporting address for the program. It will be printed by argp_help if
|
||||
the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help
|
||||
messages), embedded in a sentence that says something like `Report bugs to
|
||||
ADDR.'. */
|
||||
const char *argp_program_bug_address;
|
31
gnutar/lib/argp-eexst.c
Normal file
31
gnutar/lib/argp-eexst.c
Normal file
@ -0,0 +1,31 @@
|
||||
/* Default definition for ARGP_ERR_EXIT_STATUS
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sysexits.h>
|
||||
|
||||
#include "argp.h"
|
||||
|
||||
/* The exit status that argp will use when exiting due to a parsing error.
|
||||
If not defined or set by the user program, this defaults to EX_USAGE from
|
||||
<sysexits.h>. */
|
||||
error_t argp_err_exit_status = EX_USAGE;
|
435
gnutar/lib/argp-fmtstream.c
Normal file
435
gnutar/lib/argp-fmtstream.c
Normal file
@ -0,0 +1,435 @@
|
||||
/* Word-wrapping and line-truncating streams
|
||||
Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
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. */
|
||||
|
||||
/* This package emulates glibc `line_wrap_stream' semantics for systems that
|
||||
don't have that. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "argp-fmtstream.h"
|
||||
#include "argp-namefrob.h"
|
||||
|
||||
#ifndef ARGP_FMTSTREAM_USE_LINEWRAP
|
||||
|
||||
#ifndef isblank
|
||||
#define isblank(ch) ((ch)==' ' || (ch)=='\t')
|
||||
#endif
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# include <libio/libioP.h>
|
||||
# define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
|
||||
#endif
|
||||
|
||||
#define INIT_BUF_SIZE 200
|
||||
#define PRINTF_SIZE_GUESS 150
|
||||
|
||||
/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
|
||||
written on it with LMARGIN spaces and limits them to RMARGIN columns
|
||||
total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
|
||||
replacing the whitespace before them with a newline and WMARGIN spaces.
|
||||
Otherwise, chars beyond RMARGIN are simply dropped until a newline.
|
||||
Returns NULL if there was an error. */
|
||||
argp_fmtstream_t
|
||||
__argp_make_fmtstream (FILE *stream,
|
||||
size_t lmargin, size_t rmargin, ssize_t wmargin)
|
||||
{
|
||||
argp_fmtstream_t fs;
|
||||
|
||||
fs = (struct argp_fmtstream *) malloc (sizeof (struct argp_fmtstream));
|
||||
if (fs != NULL)
|
||||
{
|
||||
fs->stream = stream;
|
||||
|
||||
fs->lmargin = lmargin;
|
||||
fs->rmargin = rmargin;
|
||||
fs->wmargin = wmargin;
|
||||
fs->point_col = 0;
|
||||
fs->point_offs = 0;
|
||||
|
||||
fs->buf = (char *) malloc (INIT_BUF_SIZE);
|
||||
if (! fs->buf)
|
||||
{
|
||||
free (fs);
|
||||
fs = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
fs->p = fs->buf;
|
||||
fs->end = fs->buf + INIT_BUF_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
return fs;
|
||||
}
|
||||
#if 0
|
||||
/* Not exported. */
|
||||
#ifdef weak_alias
|
||||
weak_alias (__argp_make_fmtstream, argp_make_fmtstream)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Flush FS to its stream, and free it (but don't close the stream). */
|
||||
void
|
||||
__argp_fmtstream_free (argp_fmtstream_t fs)
|
||||
{
|
||||
__argp_fmtstream_update (fs);
|
||||
if (fs->p > fs->buf)
|
||||
{
|
||||
#ifdef USE_IN_LIBIO
|
||||
__fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
|
||||
#else
|
||||
fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
|
||||
#endif
|
||||
}
|
||||
free (fs->buf);
|
||||
free (fs);
|
||||
}
|
||||
#if 0
|
||||
/* Not exported. */
|
||||
#ifdef weak_alias
|
||||
weak_alias (__argp_fmtstream_free, argp_fmtstream_free)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Process FS's buffer so that line wrapping is done from POINT_OFFS to the
|
||||
end of its buffer. This code is mostly from glibc stdio/linewrap.c. */
|
||||
void
|
||||
__argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
{
|
||||
char *buf, *nl;
|
||||
size_t len;
|
||||
|
||||
/* Scan the buffer for newlines. */
|
||||
buf = fs->buf + fs->point_offs;
|
||||
while (buf < fs->p)
|
||||
{
|
||||
size_t r;
|
||||
|
||||
if (fs->point_col == 0 && fs->lmargin != 0)
|
||||
{
|
||||
/* We are starting a new line. Print spaces to the left margin. */
|
||||
const size_t pad = fs->lmargin;
|
||||
if (fs->p + pad < fs->end)
|
||||
{
|
||||
/* We can fit in them in the buffer by moving the
|
||||
buffer text up and filling in the beginning. */
|
||||
memmove (buf + pad, buf, fs->p - buf);
|
||||
fs->p += pad; /* Compensate for bigger buffer. */
|
||||
memset (buf, ' ', pad); /* Fill in the spaces. */
|
||||
buf += pad; /* Don't bother searching them. */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No buffer space for spaces. Must flush. */
|
||||
size_t i;
|
||||
for (i = 0; i < pad; i++)
|
||||
{
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (fs->stream, 0) > 0)
|
||||
putwc_unlocked (L' ', fs->stream);
|
||||
else
|
||||
#endif
|
||||
putc_unlocked (' ', fs->stream);
|
||||
}
|
||||
}
|
||||
fs->point_col = pad;
|
||||
}
|
||||
|
||||
len = fs->p - buf;
|
||||
nl = memchr (buf, '\n', len);
|
||||
|
||||
if (fs->point_col < 0)
|
||||
fs->point_col = 0;
|
||||
|
||||
if (!nl)
|
||||
{
|
||||
/* The buffer ends in a partial line. */
|
||||
|
||||
if (fs->point_col + len < fs->rmargin)
|
||||
{
|
||||
/* The remaining buffer text is a partial line and fits
|
||||
within the maximum line width. Advance point for the
|
||||
characters to be written and stop scanning. */
|
||||
fs->point_col += len;
|
||||
break;
|
||||
}
|
||||
else
|
||||
/* Set the end-of-line pointer for the code below to
|
||||
the end of the buffer. */
|
||||
nl = fs->p;
|
||||
}
|
||||
else if (fs->point_col + (nl - buf) < (ssize_t) fs->rmargin)
|
||||
{
|
||||
/* The buffer contains a full line that fits within the maximum
|
||||
line width. Reset point and scan the next line. */
|
||||
fs->point_col = 0;
|
||||
buf = nl + 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* This line is too long. */
|
||||
r = fs->rmargin - 1;
|
||||
|
||||
if (fs->wmargin < 0)
|
||||
{
|
||||
/* Truncate the line by overwriting the excess with the
|
||||
newline and anything after it in the buffer. */
|
||||
if (nl < fs->p)
|
||||
{
|
||||
memmove (buf + (r - fs->point_col), nl, fs->p - nl);
|
||||
fs->p -= buf + (r - fs->point_col) - nl;
|
||||
/* Reset point for the next line and start scanning it. */
|
||||
fs->point_col = 0;
|
||||
buf += r + 1; /* Skip full line plus \n. */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The buffer ends with a partial line that is beyond the
|
||||
maximum line width. Advance point for the characters
|
||||
written, and discard those past the max from the buffer. */
|
||||
fs->point_col += len;
|
||||
fs->p -= fs->point_col - r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Do word wrap. Go to the column just past the maximum line
|
||||
width and scan back for the beginning of the word there.
|
||||
Then insert a line break. */
|
||||
|
||||
char *p, *nextline;
|
||||
int i;
|
||||
|
||||
p = buf + (r + 1 - fs->point_col);
|
||||
while (p >= buf && !isblank (*p))
|
||||
--p;
|
||||
nextline = p + 1; /* This will begin the next line. */
|
||||
|
||||
if (nextline > buf)
|
||||
{
|
||||
/* Swallow separating blanks. */
|
||||
if (p >= buf)
|
||||
do
|
||||
--p;
|
||||
while (p >= buf && isblank (*p));
|
||||
nl = p + 1; /* The newline will replace the first blank. */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* A single word that is greater than the maximum line width.
|
||||
Oh well. Put it on an overlong line by itself. */
|
||||
p = buf + (r + 1 - fs->point_col);
|
||||
/* Find the end of the long word. */
|
||||
if (p < nl)
|
||||
do
|
||||
++p;
|
||||
while (p < nl && !isblank (*p));
|
||||
if (p == nl)
|
||||
{
|
||||
/* It already ends a line. No fussing required. */
|
||||
fs->point_col = 0;
|
||||
buf = nl + 1;
|
||||
continue;
|
||||
}
|
||||
/* We will move the newline to replace the first blank. */
|
||||
nl = p;
|
||||
/* Swallow separating blanks. */
|
||||
do
|
||||
++p;
|
||||
while (isblank (*p));
|
||||
/* The next line will start here. */
|
||||
nextline = p;
|
||||
}
|
||||
|
||||
/* Note: There are a bunch of tests below for
|
||||
NEXTLINE == BUF + LEN + 1; this case is where NL happens to fall
|
||||
at the end of the buffer, and NEXTLINE is in fact empty (and so
|
||||
we need not be careful to maintain its contents). */
|
||||
|
||||
if ((nextline == buf + len + 1
|
||||
? fs->end - nl < fs->wmargin + 1
|
||||
: nextline - (nl + 1) < fs->wmargin)
|
||||
&& fs->p > nextline)
|
||||
{
|
||||
/* The margin needs more blanks than we removed. */
|
||||
if (fs->end - fs->p > fs->wmargin + 1)
|
||||
/* Make some space for them. */
|
||||
{
|
||||
size_t mv = fs->p - nextline;
|
||||
memmove (nl + 1 + fs->wmargin, nextline, mv);
|
||||
nextline = nl + 1 + fs->wmargin;
|
||||
len = nextline + mv - buf;
|
||||
*nl++ = '\n';
|
||||
}
|
||||
else
|
||||
/* Output the first line so we can use the space. */
|
||||
{
|
||||
#ifdef _LIBC
|
||||
__fxprintf (fs->stream, "%.*s\n",
|
||||
(int) (nl - fs->buf), fs->buf);
|
||||
#else
|
||||
if (nl > fs->buf)
|
||||
fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream);
|
||||
putc_unlocked ('\n', fs->stream);
|
||||
#endif
|
||||
|
||||
len += buf - fs->buf;
|
||||
nl = buf = fs->buf;
|
||||
}
|
||||
}
|
||||
else
|
||||
/* We can fit the newline and blanks in before
|
||||
the next word. */
|
||||
*nl++ = '\n';
|
||||
|
||||
if (nextline - nl >= fs->wmargin
|
||||
|| (nextline == buf + len + 1 && fs->end - nextline >= fs->wmargin))
|
||||
/* Add blanks up to the wrap margin column. */
|
||||
for (i = 0; i < fs->wmargin; ++i)
|
||||
*nl++ = ' ';
|
||||
else
|
||||
for (i = 0; i < fs->wmargin; ++i)
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (fs->stream, 0) > 0)
|
||||
putwc_unlocked (L' ', fs->stream);
|
||||
else
|
||||
#endif
|
||||
putc_unlocked (' ', fs->stream);
|
||||
|
||||
/* Copy the tail of the original buffer into the current buffer
|
||||
position. */
|
||||
if (nl < nextline)
|
||||
memmove (nl, nextline, buf + len - nextline);
|
||||
len -= nextline - buf;
|
||||
|
||||
/* Continue the scan on the remaining lines in the buffer. */
|
||||
buf = nl;
|
||||
|
||||
/* Restore bufp to include all the remaining text. */
|
||||
fs->p = nl + len;
|
||||
|
||||
/* Reset the counter of what has been output this line. If wmargin
|
||||
is 0, we want to avoid the lmargin getting added, so we set
|
||||
point_col to a magic value of -1 in that case. */
|
||||
fs->point_col = fs->wmargin ? fs->wmargin : -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Remember that we've scanned as far as the end of the buffer. */
|
||||
fs->point_offs = fs->p - fs->buf;
|
||||
}
|
||||
|
||||
/* Ensure that FS has space for AMOUNT more bytes in its buffer, either by
|
||||
growing the buffer, or by flushing it. True is returned iff we succeed. */
|
||||
int
|
||||
__argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
|
||||
{
|
||||
if ((size_t) (fs->end - fs->p) < amount)
|
||||
{
|
||||
ssize_t wrote;
|
||||
|
||||
/* Flush FS's buffer. */
|
||||
__argp_fmtstream_update (fs);
|
||||
|
||||
#ifdef _LIBC
|
||||
__fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
|
||||
wrote = fs->p - fs->buf;
|
||||
#else
|
||||
wrote = fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
|
||||
#endif
|
||||
if (wrote == fs->p - fs->buf)
|
||||
{
|
||||
fs->p = fs->buf;
|
||||
fs->point_offs = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
fs->p -= wrote;
|
||||
fs->point_offs -= wrote;
|
||||
memmove (fs->buf, fs->buf + wrote, fs->p - fs->buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((size_t) (fs->end - fs->buf) < amount)
|
||||
/* Gotta grow the buffer. */
|
||||
{
|
||||
size_t old_size = fs->end - fs->buf;
|
||||
size_t new_size = old_size + amount;
|
||||
char *new_buf;
|
||||
|
||||
if (new_size < old_size || ! (new_buf = realloc (fs->buf, new_size)))
|
||||
{
|
||||
__set_errno (ENOMEM);
|
||||
return 0;
|
||||
}
|
||||
|
||||
fs->buf = new_buf;
|
||||
fs->end = new_buf + new_size;
|
||||
fs->p = fs->buf;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
ssize_t
|
||||
__argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...)
|
||||
{
|
||||
int out;
|
||||
size_t avail;
|
||||
size_t size_guess = PRINTF_SIZE_GUESS; /* How much space to reserve. */
|
||||
|
||||
do
|
||||
{
|
||||
va_list args;
|
||||
|
||||
if (! __argp_fmtstream_ensure (fs, size_guess))
|
||||
return -1;
|
||||
|
||||
va_start (args, fmt);
|
||||
avail = fs->end - fs->p;
|
||||
out = __vsnprintf (fs->p, avail, fmt, args);
|
||||
va_end (args);
|
||||
if ((size_t) out >= avail)
|
||||
size_guess = out + 1;
|
||||
}
|
||||
while ((size_t) out >= avail);
|
||||
|
||||
fs->p += out;
|
||||
|
||||
return out;
|
||||
}
|
||||
#if 0
|
||||
/* Not exported. */
|
||||
#ifdef weak_alias
|
||||
weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
|
301
gnutar/lib/argp-fmtstream.h
Normal file
301
gnutar/lib/argp-fmtstream.h
Normal file
@ -0,0 +1,301 @@
|
||||
/* Word-wrapping and line-truncating streams.
|
||||
Copyright (C) 1997, 2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
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. */
|
||||
|
||||
/* This package emulates glibc `line_wrap_stream' semantics for systems that
|
||||
don't have that. If the system does have it, it is just a wrapper for
|
||||
that. This header file is only used internally while compiling argp, and
|
||||
shouldn't be installed. */
|
||||
|
||||
#ifndef _ARGP_FMTSTREAM_H
|
||||
#define _ARGP_FMTSTREAM_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || __STRICT_ANSI__
|
||||
# define __format__ format
|
||||
# define __printf__ printf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
|
||||
|| (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
|
||||
/* line_wrap_stream is available, so use that. */
|
||||
#define ARGP_FMTSTREAM_USE_LINEWRAP
|
||||
#endif
|
||||
|
||||
#ifdef ARGP_FMTSTREAM_USE_LINEWRAP
|
||||
/* Just be a simple wrapper for line_wrap_stream; the semantics are
|
||||
*slightly* different, as line_wrap_stream doesn't actually make a new
|
||||
object, it just modifies the given stream (reversibly) to do
|
||||
line-wrapping. Since we control who uses this code, it doesn't matter. */
|
||||
|
||||
#include <linewrap.h>
|
||||
|
||||
typedef FILE *argp_fmtstream_t;
|
||||
|
||||
#define argp_make_fmtstream line_wrap_stream
|
||||
#define __argp_make_fmtstream line_wrap_stream
|
||||
#define argp_fmtstream_free line_unwrap_stream
|
||||
#define __argp_fmtstream_free line_unwrap_stream
|
||||
|
||||
#define __argp_fmtstream_putc(fs,ch) putc(ch,fs)
|
||||
#define argp_fmtstream_putc(fs,ch) putc(ch,fs)
|
||||
#define __argp_fmtstream_puts(fs,str) fputs(str,fs)
|
||||
#define argp_fmtstream_puts(fs,str) fputs(str,fs)
|
||||
#define __argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
|
||||
#define argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
|
||||
#define __argp_fmtstream_printf fprintf
|
||||
#define argp_fmtstream_printf fprintf
|
||||
|
||||
#define __argp_fmtstream_lmargin line_wrap_lmargin
|
||||
#define argp_fmtstream_lmargin line_wrap_lmargin
|
||||
#define __argp_fmtstream_set_lmargin line_wrap_set_lmargin
|
||||
#define argp_fmtstream_set_lmargin line_wrap_set_lmargin
|
||||
#define __argp_fmtstream_rmargin line_wrap_rmargin
|
||||
#define argp_fmtstream_rmargin line_wrap_rmargin
|
||||
#define __argp_fmtstream_set_rmargin line_wrap_set_rmargin
|
||||
#define argp_fmtstream_set_rmargin line_wrap_set_rmargin
|
||||
#define __argp_fmtstream_wmargin line_wrap_wmargin
|
||||
#define argp_fmtstream_wmargin line_wrap_wmargin
|
||||
#define __argp_fmtstream_set_wmargin line_wrap_set_wmargin
|
||||
#define argp_fmtstream_set_wmargin line_wrap_set_wmargin
|
||||
#define __argp_fmtstream_point line_wrap_point
|
||||
#define argp_fmtstream_point line_wrap_point
|
||||
|
||||
#else /* !ARGP_FMTSTREAM_USE_LINEWRAP */
|
||||
/* Guess we have to define our own version. */
|
||||
|
||||
struct argp_fmtstream
|
||||
{
|
||||
FILE *stream; /* The stream we're outputting to. */
|
||||
|
||||
size_t lmargin, rmargin; /* Left and right margins. */
|
||||
ssize_t wmargin; /* Margin to wrap to, or -1 to truncate. */
|
||||
|
||||
/* Point in buffer to which we've processed for wrapping, but not output. */
|
||||
size_t point_offs;
|
||||
/* Output column at POINT_OFFS, or -1 meaning 0 but don't add lmargin. */
|
||||
ssize_t point_col;
|
||||
|
||||
char *buf; /* Output buffer. */
|
||||
char *p; /* Current end of text in BUF. */
|
||||
char *end; /* Absolute end of BUF. */
|
||||
};
|
||||
|
||||
typedef struct argp_fmtstream *argp_fmtstream_t;
|
||||
|
||||
/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
|
||||
written on it with LMARGIN spaces and limits them to RMARGIN columns
|
||||
total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
|
||||
replacing the whitespace before them with a newline and WMARGIN spaces.
|
||||
Otherwise, chars beyond RMARGIN are simply dropped until a newline.
|
||||
Returns NULL if there was an error. */
|
||||
extern argp_fmtstream_t __argp_make_fmtstream (FILE *__stream,
|
||||
size_t __lmargin,
|
||||
size_t __rmargin,
|
||||
ssize_t __wmargin);
|
||||
extern argp_fmtstream_t argp_make_fmtstream (FILE *__stream,
|
||||
size_t __lmargin,
|
||||
size_t __rmargin,
|
||||
ssize_t __wmargin);
|
||||
|
||||
/* Flush __FS to its stream, and free it (but don't close the stream). */
|
||||
extern void __argp_fmtstream_free (argp_fmtstream_t __fs);
|
||||
extern void argp_fmtstream_free (argp_fmtstream_t __fs);
|
||||
|
||||
extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
|
||||
const char *__fmt, ...)
|
||||
__attribute__ ((__format__ (printf, 2, 3)));
|
||||
extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
|
||||
const char *__fmt, ...)
|
||||
__attribute__ ((__format__ (printf, 2, 3)));
|
||||
|
||||
extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
|
||||
extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
|
||||
|
||||
extern int __argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str);
|
||||
extern int argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str);
|
||||
|
||||
extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs,
|
||||
const char *__str, size_t __len);
|
||||
extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
|
||||
const char *__str, size_t __len);
|
||||
|
||||
/* Access macros for various bits of state. */
|
||||
#define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
|
||||
#define argp_fmtstream_rmargin(__fs) ((__fs)->rmargin)
|
||||
#define argp_fmtstream_wmargin(__fs) ((__fs)->wmargin)
|
||||
#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
|
||||
#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
|
||||
#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
|
||||
|
||||
/* Set __FS's left margin to LMARGIN and return the old value. */
|
||||
extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
|
||||
size_t __lmargin);
|
||||
extern size_t __argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
|
||||
size_t __lmargin);
|
||||
|
||||
/* Set __FS's right margin to __RMARGIN and return the old value. */
|
||||
extern size_t argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
|
||||
size_t __rmargin);
|
||||
extern size_t __argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
|
||||
size_t __rmargin);
|
||||
|
||||
/* Set __FS's wrap margin to __WMARGIN and return the old value. */
|
||||
extern size_t argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
|
||||
size_t __wmargin);
|
||||
extern size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
|
||||
size_t __wmargin);
|
||||
|
||||
/* Return the column number of the current output point in __FS. */
|
||||
extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
|
||||
extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
|
||||
|
||||
/* Internal routines. */
|
||||
extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
|
||||
extern void __argp_fmtstream_update (argp_fmtstream_t __fs);
|
||||
extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
|
||||
extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
/* Inline versions of above routines. */
|
||||
|
||||
#if !_LIBC
|
||||
#define __argp_fmtstream_putc argp_fmtstream_putc
|
||||
#define __argp_fmtstream_puts argp_fmtstream_puts
|
||||
#define __argp_fmtstream_write argp_fmtstream_write
|
||||
#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
|
||||
#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
|
||||
#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
|
||||
#define __argp_fmtstream_point argp_fmtstream_point
|
||||
#define __argp_fmtstream_update _argp_fmtstream_update
|
||||
#define __argp_fmtstream_ensure _argp_fmtstream_ensure
|
||||
#endif
|
||||
|
||||
#ifndef ARGP_FS_EI
|
||||
#define ARGP_FS_EI extern inline __attribute__ ((__gnu_inline__))
|
||||
#endif
|
||||
|
||||
ARGP_FS_EI size_t
|
||||
__argp_fmtstream_write (argp_fmtstream_t __fs,
|
||||
const char *__str, size_t __len)
|
||||
{
|
||||
if (__fs->p + __len <= __fs->end || __argp_fmtstream_ensure (__fs, __len))
|
||||
{
|
||||
memcpy (__fs->p, __str, __len);
|
||||
__fs->p += __len;
|
||||
return __len;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
ARGP_FS_EI int
|
||||
__argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str)
|
||||
{
|
||||
size_t __len = strlen (__str);
|
||||
if (__len)
|
||||
{
|
||||
size_t __wrote = __argp_fmtstream_write (__fs, __str, __len);
|
||||
return __wrote == __len ? 0 : -1;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
ARGP_FS_EI int
|
||||
__argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch)
|
||||
{
|
||||
if (__fs->p < __fs->end || __argp_fmtstream_ensure (__fs, 1))
|
||||
return *__fs->p++ = __ch;
|
||||
else
|
||||
return EOF;
|
||||
}
|
||||
|
||||
/* Set __FS's left margin to __LMARGIN and return the old value. */
|
||||
ARGP_FS_EI size_t
|
||||
__argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin)
|
||||
{
|
||||
size_t __old;
|
||||
if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
|
||||
__argp_fmtstream_update (__fs);
|
||||
__old = __fs->lmargin;
|
||||
__fs->lmargin = __lmargin;
|
||||
return __old;
|
||||
}
|
||||
|
||||
/* Set __FS's right margin to __RMARGIN and return the old value. */
|
||||
ARGP_FS_EI size_t
|
||||
__argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin)
|
||||
{
|
||||
size_t __old;
|
||||
if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
|
||||
__argp_fmtstream_update (__fs);
|
||||
__old = __fs->rmargin;
|
||||
__fs->rmargin = __rmargin;
|
||||
return __old;
|
||||
}
|
||||
|
||||
/* Set FS's wrap margin to __WMARGIN and return the old value. */
|
||||
ARGP_FS_EI size_t
|
||||
__argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin)
|
||||
{
|
||||
size_t __old;
|
||||
if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
|
||||
__argp_fmtstream_update (__fs);
|
||||
__old = __fs->wmargin;
|
||||
__fs->wmargin = __wmargin;
|
||||
return __old;
|
||||
}
|
||||
|
||||
/* Return the column number of the current output point in __FS. */
|
||||
ARGP_FS_EI size_t
|
||||
__argp_fmtstream_point (argp_fmtstream_t __fs)
|
||||
{
|
||||
if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
|
||||
__argp_fmtstream_update (__fs);
|
||||
return __fs->point_col >= 0 ? __fs->point_col : 0;
|
||||
}
|
||||
|
||||
#if !_LIBC
|
||||
#undef __argp_fmtstream_putc
|
||||
#undef __argp_fmtstream_puts
|
||||
#undef __argp_fmtstream_write
|
||||
#undef __argp_fmtstream_set_lmargin
|
||||
#undef __argp_fmtstream_set_rmargin
|
||||
#undef __argp_fmtstream_set_wmargin
|
||||
#undef __argp_fmtstream_point
|
||||
#undef __argp_fmtstream_update
|
||||
#undef __argp_fmtstream_ensure
|
||||
#endif
|
||||
|
||||
#endif /* __OPTIMIZE__ */
|
||||
|
||||
#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
|
||||
|
||||
#endif /* argp-fmtstream.h */
|
43
gnutar/lib/argp-fs-xinl.c
Normal file
43
gnutar/lib/argp-fs-xinl.c
Normal file
@ -0,0 +1,43 @@
|
||||
/* Real definitions for extern inline functions in argp-fmtstream.h
|
||||
Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define ARGP_FS_EI
|
||||
#undef __OPTIMIZE__
|
||||
#define __OPTIMIZE__ 1
|
||||
#include "argp-fmtstream.h"
|
||||
|
||||
#if 0
|
||||
/* Not exported. */
|
||||
/* Add weak aliases. */
|
||||
#if _LIBC - 0 && !defined (ARGP_FMTSTREAM_USE_LINEWRAP) && defined (weak_alias)
|
||||
|
||||
weak_alias (__argp_fmtstream_putc, argp_fmtstream_putc)
|
||||
weak_alias (__argp_fmtstream_puts, argp_fmtstream_puts)
|
||||
weak_alias (__argp_fmtstream_write, argp_fmtstream_write)
|
||||
weak_alias (__argp_fmtstream_set_lmargin, argp_fmtstream_set_lmargin)
|
||||
weak_alias (__argp_fmtstream_set_rmargin, argp_fmtstream_set_rmargin)
|
||||
weak_alias (__argp_fmtstream_set_wmargin, argp_fmtstream_set_wmargin)
|
||||
weak_alias (__argp_fmtstream_point, argp_fmtstream_point)
|
||||
|
||||
#endif
|
||||
#endif
|
1954
gnutar/lib/argp-help.c
Normal file
1954
gnutar/lib/argp-help.c
Normal file
File diff suppressed because it is too large
Load Diff
158
gnutar/lib/argp-namefrob.h
Normal file
158
gnutar/lib/argp-namefrob.h
Normal file
@ -0,0 +1,158 @@
|
||||
/* Name frobnication for compiling argp outside of glibc
|
||||
Copyright (C) 1997, 2003, 2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
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 !_LIBC
|
||||
/* This code is written for inclusion in gnu-libc, and uses names in the
|
||||
namespace reserved for libc. If we're not compiling in libc, define those
|
||||
names to be the normal ones instead. */
|
||||
|
||||
/* argp-parse functions */
|
||||
#undef __argp_parse
|
||||
#define __argp_parse argp_parse
|
||||
#undef __option_is_end
|
||||
#define __option_is_end _option_is_end
|
||||
#undef __option_is_short
|
||||
#define __option_is_short _option_is_short
|
||||
#undef __argp_input
|
||||
#define __argp_input _argp_input
|
||||
|
||||
/* argp-help functions */
|
||||
#undef __argp_help
|
||||
#define __argp_help argp_help
|
||||
#undef __argp_error
|
||||
#define __argp_error argp_error
|
||||
#undef __argp_failure
|
||||
#define __argp_failure argp_failure
|
||||
#undef __argp_state_help
|
||||
#define __argp_state_help argp_state_help
|
||||
#undef __argp_usage
|
||||
#define __argp_usage argp_usage
|
||||
|
||||
/* argp-fmtstream functions */
|
||||
#undef __argp_make_fmtstream
|
||||
#define __argp_make_fmtstream argp_make_fmtstream
|
||||
#undef __argp_fmtstream_free
|
||||
#define __argp_fmtstream_free argp_fmtstream_free
|
||||
#undef __argp_fmtstream_putc
|
||||
#define __argp_fmtstream_putc argp_fmtstream_putc
|
||||
#undef __argp_fmtstream_puts
|
||||
#define __argp_fmtstream_puts argp_fmtstream_puts
|
||||
#undef __argp_fmtstream_write
|
||||
#define __argp_fmtstream_write argp_fmtstream_write
|
||||
#undef __argp_fmtstream_printf
|
||||
#define __argp_fmtstream_printf argp_fmtstream_printf
|
||||
#undef __argp_fmtstream_set_lmargin
|
||||
#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
|
||||
#undef __argp_fmtstream_set_rmargin
|
||||
#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
|
||||
#undef __argp_fmtstream_set_wmargin
|
||||
#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
|
||||
#undef __argp_fmtstream_point
|
||||
#define __argp_fmtstream_point argp_fmtstream_point
|
||||
#undef __argp_fmtstream_update
|
||||
#define __argp_fmtstream_update _argp_fmtstream_update
|
||||
#undef __argp_fmtstream_ensure
|
||||
#define __argp_fmtstream_ensure _argp_fmtstream_ensure
|
||||
#undef __argp_fmtstream_lmargin
|
||||
#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
|
||||
#undef __argp_fmtstream_rmargin
|
||||
#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
|
||||
#undef __argp_fmtstream_wmargin
|
||||
#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
|
||||
|
||||
/* normal libc functions we call */
|
||||
#undef __flockfile
|
||||
#define __flockfile flockfile
|
||||
#undef __funlockfile
|
||||
#define __funlockfile funlockfile
|
||||
#undef __mempcpy
|
||||
#define __mempcpy mempcpy
|
||||
#undef __sleep
|
||||
#define __sleep sleep
|
||||
#undef __strcasecmp
|
||||
#define __strcasecmp strcasecmp
|
||||
#undef __strchrnul
|
||||
#define __strchrnul strchrnul
|
||||
#undef __strerror_r
|
||||
#define __strerror_r strerror_r
|
||||
#undef __strndup
|
||||
#define __strndup strndup
|
||||
#undef __vsnprintf
|
||||
#define __vsnprintf vsnprintf
|
||||
|
||||
#if defined(HAVE_DECL_CLEARERR_UNLOCKED) && !HAVE_DECL_CLEARERR_UNLOCKED
|
||||
# define clearerr_unlocked(x) clearerr (x)
|
||||
#endif
|
||||
#if defined(HAVE_DECL_FEOF_UNLOCKED) && !HAVE_DECL_FEOF_UNLOCKED
|
||||
# define feof_unlocked(x) feof (x)
|
||||
# endif
|
||||
#if defined(HAVE_DECL_FERROR_UNLOCKED) && !HAVE_DECL_FERROR_UNLOCKED
|
||||
# define ferror_unlocked(x) ferror (x)
|
||||
# endif
|
||||
#if defined(HAVE_DECL_FFLUSH_UNLOCKED) && !HAVE_DECL_FFLUSH_UNLOCKED
|
||||
# define fflush_unlocked(x) fflush (x)
|
||||
# endif
|
||||
#if defined(HAVE_DECL_FGETS_UNLOCKED) && !HAVE_DECL_FGETS_UNLOCKED
|
||||
# define fgets_unlocked(x,y,z) fgets (x,y,z)
|
||||
# endif
|
||||
#if defined(HAVE_DECL_FPUTC_UNLOCKED) && !HAVE_DECL_FPUTC_UNLOCKED
|
||||
# define fputc_unlocked(x,y) fputc (x,y)
|
||||
# endif
|
||||
#if defined(HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED
|
||||
# define fputs_unlocked(x,y) fputs (x,y)
|
||||
# endif
|
||||
#if defined(HAVE_DECL_FREAD_UNLOCKED) && !HAVE_DECL_FREAD_UNLOCKED
|
||||
# define fread_unlocked(w,x,y,z) fread (w,x,y,z)
|
||||
# endif
|
||||
#if defined(HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
|
||||
# define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
|
||||
# endif
|
||||
#if defined(HAVE_DECL_GETC_UNLOCKED) && !HAVE_DECL_GETC_UNLOCKED
|
||||
# define getc_unlocked(x) getc (x)
|
||||
# endif
|
||||
#if defined(HAVE_DECL_GETCHAR_UNLOCKED) && !HAVE_DECL_GETCHAR_UNLOCKED
|
||||
# define getchar_unlocked() getchar ()
|
||||
# endif
|
||||
#if defined(HAVE_DECL_PUTC_UNLOCKED) && !HAVE_DECL_PUTC_UNLOCKED
|
||||
# define putc_unlocked(x,y) putc (x,y)
|
||||
# endif
|
||||
#if defined(HAVE_DECL_PUTCHAR_UNLOCKED) && !HAVE_DECL_PUTCHAR_UNLOCKED
|
||||
# define putchar_unlocked(x) putchar (x)
|
||||
# endif
|
||||
|
||||
#endif /* !_LIBC */
|
||||
|
||||
#ifndef __set_errno
|
||||
#define __set_errno(e) (errno = (e))
|
||||
#endif
|
||||
|
||||
#if defined GNULIB_ARGP_DISABLE_DIRNAME
|
||||
# define __argp_base_name(arg) arg
|
||||
#elif defined GNULIB_ARGP_EXTERN_BASENAME
|
||||
extern char *__argp_base_name(const char *arg);
|
||||
#else
|
||||
# include "dirname.h"
|
||||
# define __argp_base_name base_name
|
||||
#endif
|
||||
|
||||
#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
|
||||
# define __argp_short_program_name() (program_invocation_short_name)
|
||||
#else
|
||||
extern char *__argp_short_program_name (void);
|
||||
#endif
|
953
gnutar/lib/argp-parse.c
Normal file
953
gnutar/lib/argp-parse.c
Normal file
@ -0,0 +1,953 @@
|
||||
/* Hierarchial argument parsing, layered over getopt
|
||||
Copyright (C) 1995-2000, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <alloca.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <getopt.h>
|
||||
#include <getopt_int.h>
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
# undef dgettext
|
||||
# define dgettext(domain, msgid) \
|
||||
INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES)
|
||||
#else
|
||||
# include "gettext.h"
|
||||
#endif
|
||||
#define N_(msgid) msgid
|
||||
|
||||
#include "argp.h"
|
||||
#include "argp-namefrob.h"
|
||||
|
||||
#define alignof(type) offsetof (struct { char c; type x; }, x)
|
||||
#define alignto(n, d) ((((n) + (d) - 1) / (d)) * (d))
|
||||
|
||||
/* Getopt return values. */
|
||||
#define KEY_END (-1) /* The end of the options. */
|
||||
#define KEY_ARG 1 /* A non-option argument. */
|
||||
#define KEY_ERR '?' /* An error parsing the options. */
|
||||
|
||||
/* The meta-argument used to prevent any further arguments being interpreted
|
||||
as options. */
|
||||
#define QUOTE "--"
|
||||
|
||||
/* The number of bits we steal in a long-option value for our own use. */
|
||||
#define GROUP_BITS CHAR_BIT
|
||||
|
||||
/* The number of bits available for the user value. */
|
||||
#define USER_BITS ((sizeof ((struct option *)0)->val * CHAR_BIT) - GROUP_BITS)
|
||||
#define USER_MASK ((1 << USER_BITS) - 1)
|
||||
|
||||
/* EZ alias for ARGP_ERR_UNKNOWN. */
|
||||
#define EBADKEY ARGP_ERR_UNKNOWN
|
||||
|
||||
/* Default options. */
|
||||
|
||||
/* When argp is given the --HANG switch, _ARGP_HANG is set and argp will sleep
|
||||
for one second intervals, decrementing _ARGP_HANG until it's zero. Thus
|
||||
you can force the program to continue by attaching a debugger and setting
|
||||
it to 0 yourself. */
|
||||
static volatile int _argp_hang;
|
||||
|
||||
#define OPT_PROGNAME -2
|
||||
#define OPT_USAGE -3
|
||||
#define OPT_HANG -4
|
||||
|
||||
static const struct argp_option argp_default_options[] =
|
||||
{
|
||||
{"help", '?', 0, 0, N_("give this help list"), -1},
|
||||
{"usage", OPT_USAGE, 0, 0, N_("give a short usage message"), 0},
|
||||
{"program-name",OPT_PROGNAME,N_("NAME"), OPTION_HIDDEN, N_("set the program name"), 0},
|
||||
{"HANG", OPT_HANG, N_("SECS"), OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
|
||||
N_("hang for SECS seconds (default 3600)"), 0},
|
||||
{NULL, 0, 0, 0, NULL, 0}
|
||||
};
|
||||
|
||||
static error_t
|
||||
argp_default_parser (int key, char *arg, struct argp_state *state)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
case '?':
|
||||
__argp_state_help (state, state->out_stream, ARGP_HELP_STD_HELP);
|
||||
break;
|
||||
case OPT_USAGE:
|
||||
__argp_state_help (state, state->out_stream,
|
||||
ARGP_HELP_USAGE | ARGP_HELP_EXIT_OK);
|
||||
break;
|
||||
|
||||
case OPT_PROGNAME: /* Set the program name. */
|
||||
#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_NAME
|
||||
program_invocation_name = arg;
|
||||
#endif
|
||||
/* [Note that some systems only have PROGRAM_INVOCATION_SHORT_NAME (aka
|
||||
__PROGNAME), in which case, PROGRAM_INVOCATION_NAME is just defined
|
||||
to be that, so we have to be a bit careful here.] */
|
||||
|
||||
/* Update what we use for messages. */
|
||||
state->name = __argp_base_name (arg);
|
||||
|
||||
#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
|
||||
program_invocation_short_name = state->name;
|
||||
#endif
|
||||
|
||||
if ((state->flags & (ARGP_PARSE_ARGV0 | ARGP_NO_ERRS))
|
||||
== ARGP_PARSE_ARGV0)
|
||||
/* Update what getopt uses too. */
|
||||
state->argv[0] = arg;
|
||||
|
||||
break;
|
||||
|
||||
case OPT_HANG:
|
||||
_argp_hang = atoi (arg ? arg : "3600");
|
||||
while (_argp_hang-- > 0)
|
||||
__sleep (1);
|
||||
break;
|
||||
|
||||
default:
|
||||
return EBADKEY;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct argp argp_default_argp =
|
||||
{argp_default_options, &argp_default_parser, NULL, NULL, NULL, NULL, "libc"};
|
||||
|
||||
|
||||
static const struct argp_option argp_version_options[] =
|
||||
{
|
||||
{"version", 'V', 0, 0, N_("print program version"), -1},
|
||||
{NULL, 0, 0, 0, NULL, 0}
|
||||
};
|
||||
|
||||
static error_t
|
||||
argp_version_parser (int key, char *arg, struct argp_state *state)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
case 'V':
|
||||
if (argp_program_version_hook)
|
||||
(*argp_program_version_hook) (state->out_stream, state);
|
||||
else if (argp_program_version)
|
||||
fprintf (state->out_stream, "%s\n", argp_program_version);
|
||||
else
|
||||
__argp_error (state, dgettext (state->root_argp->argp_domain,
|
||||
"(PROGRAM ERROR) No version known!?"));
|
||||
if (! (state->flags & ARGP_NO_EXIT))
|
||||
exit (0);
|
||||
break;
|
||||
default:
|
||||
return EBADKEY;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct argp argp_version_argp =
|
||||
{argp_version_options, &argp_version_parser, NULL, NULL, NULL, NULL, "libc"};
|
||||
|
||||
/* Returns the offset into the getopt long options array LONG_OPTIONS of a
|
||||
long option with called NAME, or -1 if none is found. Passing NULL as
|
||||
NAME will return the number of options. */
|
||||
static int
|
||||
find_long_option (struct option *long_options, const char *name)
|
||||
{
|
||||
struct option *l = long_options;
|
||||
while (l->name != NULL)
|
||||
if (name != NULL && strcmp (l->name, name) == 0)
|
||||
return l - long_options;
|
||||
else
|
||||
l++;
|
||||
if (name == NULL)
|
||||
return l - long_options;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* The state of a `group' during parsing. Each group corresponds to a
|
||||
particular argp structure from the tree of such descending from the top
|
||||
level argp passed to argp_parse. */
|
||||
struct group
|
||||
{
|
||||
/* This group's parsing function. */
|
||||
argp_parser_t parser;
|
||||
|
||||
/* Which argp this group is from. */
|
||||
const struct argp *argp;
|
||||
|
||||
/* Points to the point in SHORT_OPTS corresponding to the end of the short
|
||||
options for this group. We use it to determine from which group a
|
||||
particular short options is from. */
|
||||
char *short_end;
|
||||
|
||||
/* The number of non-option args sucessfully handled by this parser. */
|
||||
unsigned args_processed;
|
||||
|
||||
/* This group's parser's parent's group. */
|
||||
struct group *parent;
|
||||
unsigned parent_index; /* And the our position in the parent. */
|
||||
|
||||
/* These fields are swapped into and out of the state structure when
|
||||
calling this group's parser. */
|
||||
void *input, **child_inputs;
|
||||
void *hook;
|
||||
};
|
||||
|
||||
/* Call GROUP's parser with KEY and ARG, swapping any group-specific info
|
||||
from STATE before calling, and back into state afterwards. If GROUP has
|
||||
no parser, EBADKEY is returned. */
|
||||
static error_t
|
||||
group_parse (struct group *group, struct argp_state *state, int key, char *arg)
|
||||
{
|
||||
if (group->parser)
|
||||
{
|
||||
error_t err;
|
||||
state->hook = group->hook;
|
||||
state->input = group->input;
|
||||
state->child_inputs = group->child_inputs;
|
||||
state->arg_num = group->args_processed;
|
||||
err = (*group->parser)(key, arg, state);
|
||||
group->hook = state->hook;
|
||||
return err;
|
||||
}
|
||||
else
|
||||
return EBADKEY;
|
||||
}
|
||||
|
||||
struct parser
|
||||
{
|
||||
const struct argp *argp;
|
||||
|
||||
/* SHORT_OPTS is the getopt short options string for the union of all the
|
||||
groups of options. */
|
||||
char *short_opts;
|
||||
/* LONG_OPTS is the array of getop long option structures for the union of
|
||||
all the groups of options. */
|
||||
struct option *long_opts;
|
||||
/* OPT_DATA is the getopt data used for the re-entrant getopt. */
|
||||
struct _getopt_data opt_data;
|
||||
|
||||
/* States of the various parsing groups. */
|
||||
struct group *groups;
|
||||
/* The end of the GROUPS array. */
|
||||
struct group *egroup;
|
||||
/* An vector containing storage for the CHILD_INPUTS field in all groups. */
|
||||
void **child_inputs;
|
||||
|
||||
/* True if we think using getopt is still useful; if false, then
|
||||
remaining arguments are just passed verbatim with ARGP_KEY_ARG. This is
|
||||
cleared whenever getopt returns KEY_END, but may be set again if the user
|
||||
moves the next argument pointer backwards. */
|
||||
int try_getopt;
|
||||
|
||||
/* State block supplied to parsing routines. */
|
||||
struct argp_state state;
|
||||
|
||||
/* Memory used by this parser. */
|
||||
void *storage;
|
||||
};
|
||||
|
||||
/* The next usable entries in the various parser tables being filled in by
|
||||
convert_options. */
|
||||
struct parser_convert_state
|
||||
{
|
||||
struct parser *parser;
|
||||
char *short_end;
|
||||
struct option *long_end;
|
||||
void **child_inputs_end;
|
||||
};
|
||||
|
||||
/* Converts all options in ARGP (which is put in GROUP) and ancestors
|
||||
into getopt options stored in SHORT_OPTS and LONG_OPTS; SHORT_END and
|
||||
CVT->LONG_END are the points at which new options are added. Returns the
|
||||
next unused group entry. CVT holds state used during the conversion. */
|
||||
static struct group *
|
||||
convert_options (const struct argp *argp,
|
||||
struct group *parent, unsigned parent_index,
|
||||
struct group *group, struct parser_convert_state *cvt)
|
||||
{
|
||||
/* REAL is the most recent non-alias value of OPT. */
|
||||
const struct argp_option *real = argp->options;
|
||||
const struct argp_child *children = argp->children;
|
||||
|
||||
if (real || argp->parser)
|
||||
{
|
||||
const struct argp_option *opt;
|
||||
|
||||
if (real)
|
||||
for (opt = real; !__option_is_end (opt); opt++)
|
||||
{
|
||||
if (! (opt->flags & OPTION_ALIAS))
|
||||
/* OPT isn't an alias, so we can use values from it. */
|
||||
real = opt;
|
||||
|
||||
if (! (real->flags & OPTION_DOC))
|
||||
/* A real option (not just documentation). */
|
||||
{
|
||||
if (__option_is_short (opt))
|
||||
/* OPT can be used as a short option. */
|
||||
{
|
||||
*cvt->short_end++ = opt->key;
|
||||
if (real->arg)
|
||||
{
|
||||
*cvt->short_end++ = ':';
|
||||
if (real->flags & OPTION_ARG_OPTIONAL)
|
||||
*cvt->short_end++ = ':';
|
||||
}
|
||||
*cvt->short_end = '\0'; /* keep 0 terminated */
|
||||
}
|
||||
|
||||
if (opt->name
|
||||
&& find_long_option (cvt->parser->long_opts, opt->name) < 0)
|
||||
/* OPT can be used as a long option. */
|
||||
{
|
||||
cvt->long_end->name = opt->name;
|
||||
cvt->long_end->has_arg =
|
||||
(real->arg
|
||||
? (real->flags & OPTION_ARG_OPTIONAL
|
||||
? optional_argument
|
||||
: required_argument)
|
||||
: no_argument);
|
||||
cvt->long_end->flag = 0;
|
||||
/* we add a disambiguating code to all the user's
|
||||
values (which is removed before we actually call
|
||||
the function to parse the value); this means that
|
||||
the user loses use of the high 8 bits in all his
|
||||
values (the sign of the lower bits is preserved
|
||||
however)... */
|
||||
cvt->long_end->val =
|
||||
((opt->key | real->key) & USER_MASK)
|
||||
+ (((group - cvt->parser->groups) + 1) << USER_BITS);
|
||||
|
||||
/* Keep the LONG_OPTS list terminated. */
|
||||
(++cvt->long_end)->name = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
group->parser = argp->parser;
|
||||
group->argp = argp;
|
||||
group->short_end = cvt->short_end;
|
||||
group->args_processed = 0;
|
||||
group->parent = parent;
|
||||
group->parent_index = parent_index;
|
||||
group->input = 0;
|
||||
group->hook = 0;
|
||||
group->child_inputs = 0;
|
||||
|
||||
if (children)
|
||||
/* Assign GROUP's CHILD_INPUTS field some space from
|
||||
CVT->child_inputs_end.*/
|
||||
{
|
||||
unsigned num_children = 0;
|
||||
while (children[num_children].argp)
|
||||
num_children++;
|
||||
group->child_inputs = cvt->child_inputs_end;
|
||||
cvt->child_inputs_end += num_children;
|
||||
}
|
||||
|
||||
parent = group++;
|
||||
}
|
||||
else
|
||||
parent = 0;
|
||||
|
||||
if (children)
|
||||
{
|
||||
unsigned index = 0;
|
||||
while (children->argp)
|
||||
group =
|
||||
convert_options (children++->argp, parent, index++, group, cvt);
|
||||
}
|
||||
|
||||
return group;
|
||||
}
|
||||
|
||||
/* Find the merged set of getopt options, with keys appropiately prefixed. */
|
||||
static void
|
||||
parser_convert (struct parser *parser, const struct argp *argp, int flags)
|
||||
{
|
||||
struct parser_convert_state cvt;
|
||||
|
||||
cvt.parser = parser;
|
||||
cvt.short_end = parser->short_opts;
|
||||
cvt.long_end = parser->long_opts;
|
||||
cvt.child_inputs_end = parser->child_inputs;
|
||||
|
||||
if (flags & ARGP_IN_ORDER)
|
||||
*cvt.short_end++ = '-';
|
||||
else if (flags & ARGP_NO_ARGS)
|
||||
*cvt.short_end++ = '+';
|
||||
*cvt.short_end = '\0';
|
||||
|
||||
cvt.long_end->name = NULL;
|
||||
|
||||
parser->argp = argp;
|
||||
|
||||
if (argp)
|
||||
parser->egroup = convert_options (argp, 0, 0, parser->groups, &cvt);
|
||||
else
|
||||
parser->egroup = parser->groups; /* No parsers at all! */
|
||||
}
|
||||
|
||||
/* Lengths of various parser fields which we will allocated. */
|
||||
struct parser_sizes
|
||||
{
|
||||
size_t short_len; /* Getopt short options string. */
|
||||
size_t long_len; /* Getopt long options vector. */
|
||||
size_t num_groups; /* Group structures we allocate. */
|
||||
size_t num_child_inputs; /* Child input slots. */
|
||||
};
|
||||
|
||||
/* For ARGP, increments the NUM_GROUPS field in SZS by the total number of
|
||||
argp structures descended from it, and the SHORT_LEN & LONG_LEN fields by
|
||||
the maximum lengths of the resulting merged getopt short options string and
|
||||
long-options array, respectively. */
|
||||
static void
|
||||
calc_sizes (const struct argp *argp, struct parser_sizes *szs)
|
||||
{
|
||||
const struct argp_child *child = argp->children;
|
||||
const struct argp_option *opt = argp->options;
|
||||
|
||||
if (opt || argp->parser)
|
||||
{
|
||||
szs->num_groups++;
|
||||
if (opt)
|
||||
{
|
||||
int num_opts = 0;
|
||||
while (!__option_is_end (opt++))
|
||||
num_opts++;
|
||||
szs->short_len += num_opts * 3; /* opt + up to 2 `:'s */
|
||||
szs->long_len += num_opts;
|
||||
}
|
||||
}
|
||||
|
||||
if (child)
|
||||
while (child->argp)
|
||||
{
|
||||
calc_sizes ((child++)->argp, szs);
|
||||
szs->num_child_inputs++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Initializes PARSER to parse ARGP in a manner described by FLAGS. */
|
||||
static error_t
|
||||
parser_init (struct parser *parser, const struct argp *argp,
|
||||
int argc, char **argv, int flags, void *input)
|
||||
{
|
||||
error_t err = 0;
|
||||
struct group *group;
|
||||
struct parser_sizes szs;
|
||||
struct _getopt_data opt_data = _GETOPT_DATA_INITIALIZER;
|
||||
char *storage;
|
||||
size_t glen, gsum;
|
||||
size_t clen, csum;
|
||||
size_t llen, lsum;
|
||||
size_t slen, ssum;
|
||||
|
||||
szs.short_len = (flags & ARGP_NO_ARGS) ? 0 : 1;
|
||||
szs.long_len = 0;
|
||||
szs.num_groups = 0;
|
||||
szs.num_child_inputs = 0;
|
||||
|
||||
if (argp)
|
||||
calc_sizes (argp, &szs);
|
||||
|
||||
/* Lengths of the various bits of storage used by PARSER. */
|
||||
glen = (szs.num_groups + 1) * sizeof (struct group);
|
||||
clen = szs.num_child_inputs * sizeof (void *);
|
||||
llen = (szs.long_len + 1) * sizeof (struct option);
|
||||
slen = szs.short_len + 1;
|
||||
|
||||
/* Sums of previous lengths, properly aligned. There's no need to
|
||||
align gsum, since struct group is aligned at least as strictly as
|
||||
void * (since it contains a void * member). And there's no need
|
||||
to align lsum, since struct option is aligned at least as
|
||||
strictly as char. */
|
||||
gsum = glen;
|
||||
csum = alignto (gsum + clen, alignof (struct option));
|
||||
lsum = csum + llen;
|
||||
ssum = lsum + slen;
|
||||
|
||||
parser->storage = malloc (ssum);
|
||||
if (! parser->storage)
|
||||
return ENOMEM;
|
||||
|
||||
storage = parser->storage;
|
||||
parser->groups = parser->storage;
|
||||
parser->child_inputs = (void **) (storage + gsum);
|
||||
parser->long_opts = (struct option *) (storage + csum);
|
||||
parser->short_opts = storage + lsum;
|
||||
parser->opt_data = opt_data;
|
||||
|
||||
memset (parser->child_inputs, 0, clen);
|
||||
parser_convert (parser, argp, flags);
|
||||
|
||||
memset (&parser->state, 0, sizeof (struct argp_state));
|
||||
parser->state.root_argp = parser->argp;
|
||||
parser->state.argc = argc;
|
||||
parser->state.argv = argv;
|
||||
parser->state.flags = flags;
|
||||
parser->state.err_stream = stderr;
|
||||
parser->state.out_stream = stdout;
|
||||
parser->state.next = 0; /* Tell getopt to initialize. */
|
||||
parser->state.pstate = parser;
|
||||
|
||||
parser->try_getopt = 1;
|
||||
|
||||
/* Call each parser for the first time, giving it a chance to propagate
|
||||
values to child parsers. */
|
||||
if (parser->groups < parser->egroup)
|
||||
parser->groups->input = input;
|
||||
for (group = parser->groups;
|
||||
group < parser->egroup && (!err || err == EBADKEY);
|
||||
group++)
|
||||
{
|
||||
if (group->parent)
|
||||
/* If a child parser, get the initial input value from the parent. */
|
||||
group->input = group->parent->child_inputs[group->parent_index];
|
||||
|
||||
if (!group->parser
|
||||
&& group->argp->children && group->argp->children->argp)
|
||||
/* For the special case where no parsing function is supplied for an
|
||||
argp, propagate its input to its first child, if any (this just
|
||||
makes very simple wrapper argps more convenient). */
|
||||
group->child_inputs[0] = group->input;
|
||||
|
||||
err = group_parse (group, &parser->state, ARGP_KEY_INIT, 0);
|
||||
}
|
||||
if (err == EBADKEY)
|
||||
err = 0; /* Some parser didn't understand. */
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (parser->state.flags & ARGP_NO_ERRS)
|
||||
{
|
||||
parser->opt_data.opterr = 0;
|
||||
if (parser->state.flags & ARGP_PARSE_ARGV0)
|
||||
/* getopt always skips ARGV[0], so we have to fake it out. As long
|
||||
as OPTERR is 0, then it shouldn't actually try to access it. */
|
||||
parser->state.argv--, parser->state.argc++;
|
||||
}
|
||||
else
|
||||
parser->opt_data.opterr = 1; /* Print error messages. */
|
||||
|
||||
if (parser->state.argv == argv && argv[0])
|
||||
/* There's an argv[0]; use it for messages. */
|
||||
parser->state.name = __argp_base_name (argv[0]);
|
||||
else
|
||||
parser->state.name = __argp_short_program_name ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Free any storage consumed by PARSER (but not PARSER itself). */
|
||||
static error_t
|
||||
parser_finalize (struct parser *parser,
|
||||
error_t err, int arg_ebadkey, int *end_index)
|
||||
{
|
||||
struct group *group;
|
||||
|
||||
if (err == EBADKEY && arg_ebadkey)
|
||||
/* Suppress errors generated by unparsed arguments. */
|
||||
err = 0;
|
||||
|
||||
if (! err)
|
||||
{
|
||||
if (parser->state.next == parser->state.argc)
|
||||
/* We successfully parsed all arguments! Call all the parsers again,
|
||||
just a few more times... */
|
||||
{
|
||||
for (group = parser->groups;
|
||||
group < parser->egroup && (!err || err==EBADKEY);
|
||||
group++)
|
||||
if (group->args_processed == 0)
|
||||
err = group_parse (group, &parser->state, ARGP_KEY_NO_ARGS, 0);
|
||||
for (group = parser->egroup - 1;
|
||||
group >= parser->groups && (!err || err==EBADKEY);
|
||||
group--)
|
||||
err = group_parse (group, &parser->state, ARGP_KEY_END, 0);
|
||||
|
||||
if (err == EBADKEY)
|
||||
err = 0; /* Some parser didn't understand. */
|
||||
|
||||
/* Tell the user that all arguments are parsed. */
|
||||
if (end_index)
|
||||
*end_index = parser->state.next;
|
||||
}
|
||||
else if (end_index)
|
||||
/* Return any remaining arguments to the user. */
|
||||
*end_index = parser->state.next;
|
||||
else
|
||||
/* No way to return the remaining arguments, they must be bogus. */
|
||||
{
|
||||
if (!(parser->state.flags & ARGP_NO_ERRS)
|
||||
&& parser->state.err_stream)
|
||||
fprintf (parser->state.err_stream,
|
||||
dgettext (parser->argp->argp_domain,
|
||||
"%s: Too many arguments\n"),
|
||||
parser->state.name);
|
||||
err = EBADKEY;
|
||||
}
|
||||
}
|
||||
|
||||
/* Okay, we're all done, with either an error or success; call the parsers
|
||||
to indicate which one. */
|
||||
|
||||
if (err)
|
||||
{
|
||||
/* Maybe print an error message. */
|
||||
if (err == EBADKEY)
|
||||
/* An appropriate message describing what the error was should have
|
||||
been printed earlier. */
|
||||
__argp_state_help (&parser->state, parser->state.err_stream,
|
||||
ARGP_HELP_STD_ERR);
|
||||
|
||||
/* Since we didn't exit, give each parser an error indication. */
|
||||
for (group = parser->groups; group < parser->egroup; group++)
|
||||
group_parse (group, &parser->state, ARGP_KEY_ERROR, 0);
|
||||
}
|
||||
else
|
||||
/* Notify parsers of success, and propagate back values from parsers. */
|
||||
{
|
||||
/* We pass over the groups in reverse order so that child groups are
|
||||
given a chance to do there processing before passing back a value to
|
||||
the parent. */
|
||||
for (group = parser->egroup - 1
|
||||
; group >= parser->groups && (!err || err == EBADKEY)
|
||||
; group--)
|
||||
err = group_parse (group, &parser->state, ARGP_KEY_SUCCESS, 0);
|
||||
if (err == EBADKEY)
|
||||
err = 0; /* Some parser didn't understand. */
|
||||
}
|
||||
|
||||
/* Call parsers once more, to do any final cleanup. Errors are ignored. */
|
||||
for (group = parser->egroup - 1; group >= parser->groups; group--)
|
||||
group_parse (group, &parser->state, ARGP_KEY_FINI, 0);
|
||||
|
||||
if (err == EBADKEY)
|
||||
err = EINVAL;
|
||||
|
||||
free (parser->storage);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Call the user parsers to parse the non-option argument VAL, at the current
|
||||
position, returning any error. The state NEXT pointer is assumed to have
|
||||
been adjusted (by getopt) to point after this argument; this function will
|
||||
adjust it correctly to reflect however many args actually end up being
|
||||
consumed. */
|
||||
static error_t
|
||||
parser_parse_arg (struct parser *parser, char *val)
|
||||
{
|
||||
/* Save the starting value of NEXT, first adjusting it so that the arg
|
||||
we're parsing is again the front of the arg vector. */
|
||||
int index = --parser->state.next;
|
||||
error_t err = EBADKEY;
|
||||
struct group *group;
|
||||
int key = 0; /* Which of ARGP_KEY_ARG[S] we used. */
|
||||
|
||||
/* Try to parse the argument in each parser. */
|
||||
for (group = parser->groups
|
||||
; group < parser->egroup && err == EBADKEY
|
||||
; group++)
|
||||
{
|
||||
parser->state.next++; /* For ARGP_KEY_ARG, consume the arg. */
|
||||
key = ARGP_KEY_ARG;
|
||||
err = group_parse (group, &parser->state, key, val);
|
||||
|
||||
if (err == EBADKEY)
|
||||
/* This parser doesn't like ARGP_KEY_ARG; try ARGP_KEY_ARGS instead. */
|
||||
{
|
||||
parser->state.next--; /* For ARGP_KEY_ARGS, put back the arg. */
|
||||
key = ARGP_KEY_ARGS;
|
||||
err = group_parse (group, &parser->state, key, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (! err)
|
||||
{
|
||||
if (key == ARGP_KEY_ARGS)
|
||||
/* The default for ARGP_KEY_ARGS is to assume that if NEXT isn't
|
||||
changed by the user, *all* arguments should be considered
|
||||
consumed. */
|
||||
parser->state.next = parser->state.argc;
|
||||
|
||||
if (parser->state.next > index)
|
||||
/* Remember that we successfully processed a non-option
|
||||
argument -- but only if the user hasn't gotten tricky and set
|
||||
the clock back. */
|
||||
(--group)->args_processed += (parser->state.next - index);
|
||||
else
|
||||
/* The user wants to reparse some args, give getopt another try. */
|
||||
parser->try_getopt = 1;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Call the user parsers to parse the option OPT, with argument VAL, at the
|
||||
current position, returning any error. */
|
||||
static error_t
|
||||
parser_parse_opt (struct parser *parser, int opt, char *val)
|
||||
{
|
||||
/* The group key encoded in the high bits; 0 for short opts or
|
||||
group_number + 1 for long opts. */
|
||||
int group_key = opt >> USER_BITS;
|
||||
error_t err = EBADKEY;
|
||||
|
||||
if (group_key == 0)
|
||||
/* A short option. By comparing OPT's position in SHORT_OPTS to the
|
||||
various starting positions in each group's SHORT_END field, we can
|
||||
determine which group OPT came from. */
|
||||
{
|
||||
struct group *group;
|
||||
char *short_index = strchr (parser->short_opts, opt);
|
||||
|
||||
if (short_index)
|
||||
for (group = parser->groups; group < parser->egroup; group++)
|
||||
if (group->short_end > short_index)
|
||||
{
|
||||
err = group_parse (group, &parser->state, opt,
|
||||
parser->opt_data.optarg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
/* A long option. We use shifts instead of masking for extracting
|
||||
the user value in order to preserve the sign. */
|
||||
err =
|
||||
group_parse (&parser->groups[group_key - 1], &parser->state,
|
||||
(opt << GROUP_BITS) >> GROUP_BITS,
|
||||
parser->opt_data.optarg);
|
||||
|
||||
if (err == EBADKEY)
|
||||
/* At least currently, an option not recognized is an error in the
|
||||
parser, because we pre-compute which parser is supposed to deal
|
||||
with each option. */
|
||||
{
|
||||
static const char bad_key_err[] =
|
||||
N_("(PROGRAM ERROR) Option should have been recognized!?");
|
||||
if (group_key == 0)
|
||||
__argp_error (&parser->state, "-%c: %s", opt,
|
||||
dgettext (parser->argp->argp_domain, bad_key_err));
|
||||
else
|
||||
{
|
||||
struct option *long_opt = parser->long_opts;
|
||||
while (long_opt->val != opt && long_opt->name)
|
||||
long_opt++;
|
||||
__argp_error (&parser->state, "--%s: %s",
|
||||
long_opt->name ? long_opt->name : "???",
|
||||
dgettext (parser->argp->argp_domain, bad_key_err));
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Parse the next argument in PARSER (as indicated by PARSER->state.next).
|
||||
Any error from the parsers is returned, and *ARGP_EBADKEY indicates
|
||||
whether a value of EBADKEY is due to an unrecognized argument (which is
|
||||
generally not fatal). */
|
||||
static error_t
|
||||
parser_parse_next (struct parser *parser, int *arg_ebadkey)
|
||||
{
|
||||
int opt;
|
||||
error_t err = 0;
|
||||
|
||||
if (parser->state.quoted && parser->state.next < parser->state.quoted)
|
||||
/* The next argument pointer has been moved to before the quoted
|
||||
region, so pretend we never saw the quoting `--', and give getopt
|
||||
another chance. If the user hasn't removed it, getopt will just
|
||||
process it again. */
|
||||
parser->state.quoted = 0;
|
||||
|
||||
if (parser->try_getopt && !parser->state.quoted)
|
||||
/* Give getopt a chance to parse this. */
|
||||
{
|
||||
/* Put it back in OPTIND for getopt. */
|
||||
parser->opt_data.optind = parser->state.next;
|
||||
/* Distinguish KEY_ERR from a real option. */
|
||||
parser->opt_data.optopt = KEY_END;
|
||||
if (parser->state.flags & ARGP_LONG_ONLY)
|
||||
opt = _getopt_long_only_r (parser->state.argc, parser->state.argv,
|
||||
parser->short_opts, parser->long_opts, 0,
|
||||
&parser->opt_data);
|
||||
else
|
||||
opt = _getopt_long_r (parser->state.argc, parser->state.argv,
|
||||
parser->short_opts, parser->long_opts, 0,
|
||||
&parser->opt_data);
|
||||
/* And see what getopt did. */
|
||||
parser->state.next = parser->opt_data.optind;
|
||||
|
||||
if (opt == KEY_END)
|
||||
/* Getopt says there are no more options, so stop using
|
||||
getopt; we'll continue if necessary on our own. */
|
||||
{
|
||||
parser->try_getopt = 0;
|
||||
if (parser->state.next > 1
|
||||
&& strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
|
||||
== 0)
|
||||
/* Not only is this the end of the options, but it's a
|
||||
`quoted' region, which may have args that *look* like
|
||||
options, so we definitely shouldn't try to use getopt past
|
||||
here, whatever happens. */
|
||||
parser->state.quoted = parser->state.next;
|
||||
}
|
||||
else if (opt == KEY_ERR && parser->opt_data.optopt != KEY_END)
|
||||
/* KEY_ERR can have the same value as a valid user short
|
||||
option, but in the case of a real error, getopt sets OPTOPT
|
||||
to the offending character, which can never be KEY_END. */
|
||||
{
|
||||
*arg_ebadkey = 0;
|
||||
return EBADKEY;
|
||||
}
|
||||
}
|
||||
else
|
||||
opt = KEY_END;
|
||||
|
||||
if (opt == KEY_END)
|
||||
{
|
||||
/* We're past what getopt considers the options. */
|
||||
if (parser->state.next >= parser->state.argc
|
||||
|| (parser->state.flags & ARGP_NO_ARGS))
|
||||
/* Indicate that we're done. */
|
||||
{
|
||||
*arg_ebadkey = 1;
|
||||
return EBADKEY;
|
||||
}
|
||||
else
|
||||
/* A non-option arg; simulate what getopt might have done. */
|
||||
{
|
||||
opt = KEY_ARG;
|
||||
parser->opt_data.optarg = parser->state.argv[parser->state.next++];
|
||||
}
|
||||
}
|
||||
|
||||
if (opt == KEY_ARG)
|
||||
/* A non-option argument; try each parser in turn. */
|
||||
err = parser_parse_arg (parser, parser->opt_data.optarg);
|
||||
else
|
||||
err = parser_parse_opt (parser, opt, parser->opt_data.optarg);
|
||||
|
||||
if (err == EBADKEY)
|
||||
*arg_ebadkey = (opt == KEY_END || opt == KEY_ARG);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Parse the options strings in ARGC & ARGV according to the argp in ARGP.
|
||||
FLAGS is one of the ARGP_ flags above. If END_INDEX is non-NULL, the
|
||||
index in ARGV of the first unparsed option is returned in it. If an
|
||||
unknown option is present, EINVAL is returned; if some parser routine
|
||||
returned a non-zero value, it is returned; otherwise 0 is returned. */
|
||||
error_t
|
||||
__argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
|
||||
int *end_index, void *input)
|
||||
{
|
||||
error_t err;
|
||||
struct parser parser;
|
||||
|
||||
/* If true, then err == EBADKEY is a result of a non-option argument failing
|
||||
to be parsed (which in some cases isn't actually an error). */
|
||||
int arg_ebadkey = 0;
|
||||
|
||||
#ifndef _LIBC
|
||||
if (!(flags & ARGP_PARSE_ARGV0))
|
||||
{
|
||||
#ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
|
||||
if (!program_invocation_name)
|
||||
program_invocation_name = argv[0];
|
||||
#endif
|
||||
#ifdef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
|
||||
if (!program_invocation_short_name)
|
||||
program_invocation_short_name = __argp_base_name (argv[0]);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (! (flags & ARGP_NO_HELP))
|
||||
/* Add our own options. */
|
||||
{
|
||||
struct argp_child *child = alloca (4 * sizeof (struct argp_child));
|
||||
struct argp *top_argp = alloca (sizeof (struct argp));
|
||||
|
||||
/* TOP_ARGP has no options, it just serves to group the user & default
|
||||
argps. */
|
||||
memset (top_argp, 0, sizeof (*top_argp));
|
||||
top_argp->children = child;
|
||||
|
||||
memset (child, 0, 4 * sizeof (struct argp_child));
|
||||
|
||||
if (argp)
|
||||
(child++)->argp = argp;
|
||||
(child++)->argp = &argp_default_argp;
|
||||
if (argp_program_version || argp_program_version_hook)
|
||||
(child++)->argp = &argp_version_argp;
|
||||
child->argp = 0;
|
||||
|
||||
argp = top_argp;
|
||||
}
|
||||
|
||||
/* Construct a parser for these arguments. */
|
||||
err = parser_init (&parser, argp, argc, argv, flags, input);
|
||||
|
||||
if (! err)
|
||||
/* Parse! */
|
||||
{
|
||||
while (! err)
|
||||
err = parser_parse_next (&parser, &arg_ebadkey);
|
||||
err = parser_finalize (&parser, err, arg_ebadkey, end_index);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__argp_parse, argp_parse)
|
||||
#endif
|
||||
|
||||
/* Return the input field for ARGP in the parser corresponding to STATE; used
|
||||
by the help routines. */
|
||||
void *
|
||||
__argp_input (const struct argp *argp, const struct argp_state *state)
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
struct group *group;
|
||||
struct parser *parser = state->pstate;
|
||||
|
||||
for (group = parser->groups; group < parser->egroup; group++)
|
||||
if (group->argp == argp)
|
||||
return group->input;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__argp_input, _argp_input)
|
||||
#endif
|
28
gnutar/lib/argp-pin.c
Normal file
28
gnutar/lib/argp-pin.c
Normal file
@ -0,0 +1,28 @@
|
||||
/* Full and short program names for argp module
|
||||
Copyright (C) 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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
|
||||
char *program_invocation_short_name = 0;
|
||||
#endif
|
||||
#ifndef HAVE_PROGRAM_INVOCATION_NAME
|
||||
char *program_invocation_name = 0;
|
||||
#endif
|
||||
|
24
gnutar/lib/argp-pv.c
Normal file
24
gnutar/lib/argp-pv.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* Default definition for ARGP_PROGRAM_VERSION.
|
||||
Copyright (C) 1996, 1997, 1999, 2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
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 set by the user program to a non-zero value, then a default option
|
||||
--version is added (unless the ARGP_NO_HELP flag is used), which will
|
||||
print this string followed by a newline and exit (unless the
|
||||
ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
|
||||
const char *argp_program_version;
|
31
gnutar/lib/argp-pvh.c
Normal file
31
gnutar/lib/argp-pvh.c
Normal file
@ -0,0 +1,31 @@
|
||||
/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
|
||||
Copyright (C) 1996, 1997, 1999, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "argp.h"
|
||||
|
||||
/* If set by the user program to a non-zero value, then a default option
|
||||
--version is added (unless the ARGP_NO_HELP flag is used), which calls
|
||||
this function with a stream to print the version to and a pointer to the
|
||||
current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
|
||||
used). This variable takes precedent over ARGP_PROGRAM_VERSION. */
|
||||
void (*argp_program_version_hook) (FILE *stream, struct argp_state *state) = NULL;
|
43
gnutar/lib/argp-xinl.c
Normal file
43
gnutar/lib/argp-xinl.c
Normal file
@ -0,0 +1,43 @@
|
||||
/* Real definitions for extern inline functions in argp.h
|
||||
Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if defined _LIBC || defined HAVE_FEATURES_H
|
||||
# include <features.h>
|
||||
#endif
|
||||
|
||||
#ifndef __USE_EXTERN_INLINES
|
||||
# define __USE_EXTERN_INLINES 1
|
||||
#endif
|
||||
#define ARGP_EI
|
||||
#undef __OPTIMIZE__
|
||||
#define __OPTIMIZE__ 1
|
||||
#include "argp.h"
|
||||
|
||||
/* Add weak aliases. */
|
||||
#if _LIBC - 0 && defined (weak_alias)
|
||||
|
||||
weak_alias (__argp_usage, argp_usage)
|
||||
weak_alias (__option_is_short, _option_is_short)
|
||||
weak_alias (__option_is_end, _option_is_end)
|
||||
|
||||
#endif
|
622
gnutar/lib/argp.h
Normal file
622
gnutar/lib/argp.h
Normal file
@ -0,0 +1,622 @@
|
||||
/* Hierarchial argument parsing, layered over getopt.
|
||||
Copyright (C) 1995-1999,2003-2007 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
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 _ARGP_H
|
||||
#define _ARGP_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define __need_error_t
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef __THROW
|
||||
# define __THROW
|
||||
#endif
|
||||
#ifndef __NTH
|
||||
# define __NTH(fct) fct __THROW
|
||||
#endif
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || __STRICT_ANSI__
|
||||
# define __format__ format
|
||||
# define __printf__ printf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* GCC 2.95 and later have "__restrict"; C99 compilers have
|
||||
"restrict", and "configure" may have defined "restrict".
|
||||
Other compilers use __restrict, __restrict__, and _Restrict, and
|
||||
'configure' might #define 'restrict' to those words. */
|
||||
#ifndef __restrict
|
||||
# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
|
||||
# if 199901L <= __STDC_VERSION__
|
||||
# define __restrict restrict
|
||||
# else
|
||||
# define __restrict
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef __error_t_defined
|
||||
typedef int error_t;
|
||||
# define __error_t_defined
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* A description of a particular option. A pointer to an array of
|
||||
these is passed in the OPTIONS field of an argp structure. Each option
|
||||
entry can correspond to one long option and/or one short option; more
|
||||
names for the same option can be added by following an entry in an option
|
||||
array with options having the OPTION_ALIAS flag set. */
|
||||
struct argp_option
|
||||
{
|
||||
/* The long option name. For more than one name for the same option, you
|
||||
can use following options with the OPTION_ALIAS flag set. */
|
||||
const char *name;
|
||||
|
||||
/* What key is returned for this option. If > 0 and printable, then it's
|
||||
also accepted as a short option. */
|
||||
int key;
|
||||
|
||||
/* If non-NULL, this is the name of the argument associated with this
|
||||
option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */
|
||||
const char *arg;
|
||||
|
||||
/* OPTION_ flags. */
|
||||
int flags;
|
||||
|
||||
/* The doc string for this option. If both NAME and KEY are 0, This string
|
||||
will be printed outdented from the normal option column, making it
|
||||
useful as a group header (it will be the first thing printed in its
|
||||
group); in this usage, it's conventional to end the string with a `:'.
|
||||
|
||||
Write the initial value as N_("TEXT") if you want xgettext to collect
|
||||
it into a POT file. */
|
||||
const char *doc;
|
||||
|
||||
/* The group this option is in. In a long help message, options are sorted
|
||||
alphabetically within each group, and the groups presented in the order
|
||||
0, 1, 2, ..., n, -m, ..., -2, -1. Every entry in an options array with
|
||||
if this field 0 will inherit the group number of the previous entry, or
|
||||
zero if it's the first one, unless its a group header (NAME and KEY both
|
||||
0), in which case, the previous entry + 1 is the default. Automagic
|
||||
options such as --help are put into group -1. */
|
||||
int group;
|
||||
};
|
||||
|
||||
/* The argument associated with this option is optional. */
|
||||
#define OPTION_ARG_OPTIONAL 0x1
|
||||
|
||||
/* This option isn't displayed in any help messages. */
|
||||
#define OPTION_HIDDEN 0x2
|
||||
|
||||
/* This option is an alias for the closest previous non-alias option. This
|
||||
means that it will be displayed in the same help entry, and will inherit
|
||||
fields other than NAME and KEY from the aliased option. */
|
||||
#define OPTION_ALIAS 0x4
|
||||
|
||||
/* This option isn't actually an option (and so should be ignored by the
|
||||
actual option parser), but rather an arbitrary piece of documentation that
|
||||
should be displayed in much the same manner as the options. If this flag
|
||||
is set, then the option NAME field is displayed unmodified (e.g., no `--'
|
||||
prefix is added) at the left-margin (where a *short* option would normally
|
||||
be displayed), and the documentation string in the normal place. The NAME
|
||||
field will be translated using gettext, unless OPTION_NO_TRANS is set (see
|
||||
below). For purposes of sorting, any leading whitespace and punctuation is
|
||||
ignored, except that if the first non-whitespace character is not `-', this
|
||||
entry is displayed after all options (and OPTION_DOC entries with a leading
|
||||
`-') in the same group. */
|
||||
#define OPTION_DOC 0x8
|
||||
|
||||
/* This option shouldn't be included in `long' usage messages (but is still
|
||||
included in help messages). This is mainly intended for options that are
|
||||
completely documented in an argp's ARGS_DOC field, in which case including
|
||||
the option in the generic usage list would be redundant. For instance,
|
||||
if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to
|
||||
distinguish these two cases, -x should probably be marked
|
||||
OPTION_NO_USAGE. */
|
||||
#define OPTION_NO_USAGE 0x10
|
||||
|
||||
/* Valid only in conjunction with OPTION_DOC. This option disables translation
|
||||
of option name. */
|
||||
#define OPTION_NO_TRANS 0x20
|
||||
|
||||
|
||||
struct argp; /* fwd declare this type */
|
||||
struct argp_state; /* " */
|
||||
struct argp_child; /* " */
|
||||
|
||||
/* The type of a pointer to an argp parsing function. */
|
||||
typedef error_t (*argp_parser_t) (int key, char *arg,
|
||||
struct argp_state *state);
|
||||
|
||||
/* What to return for unrecognized keys. For special ARGP_KEY_ keys, such
|
||||
returns will simply be ignored. For user keys, this error will be turned
|
||||
into EINVAL (if the call to argp_parse is such that errors are propagated
|
||||
back to the user instead of exiting); returning EINVAL itself would result
|
||||
in an immediate stop to parsing in *all* cases. */
|
||||
#define ARGP_ERR_UNKNOWN E2BIG /* Hurd should never need E2BIG. XXX */
|
||||
|
||||
/* Special values for the KEY argument to an argument parsing function.
|
||||
ARGP_ERR_UNKNOWN should be returned if they aren't understood.
|
||||
|
||||
The sequence of keys to a parsing function is either (where each
|
||||
uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key):
|
||||
|
||||
INIT opt... NO_ARGS END SUCCESS -- No non-option arguments at all
|
||||
or INIT (opt | ARG)... END SUCCESS -- All non-option args parsed
|
||||
or INIT (opt | ARG)... SUCCESS -- Some non-option arg unrecognized
|
||||
|
||||
The third case is where every parser returned ARGP_KEY_UNKNOWN for an
|
||||
argument, in which case parsing stops at that argument (returning the
|
||||
unparsed arguments to the caller of argp_parse if requested, or stopping
|
||||
with an error message if not).
|
||||
|
||||
If an error occurs (either detected by argp, or because the parsing
|
||||
function returned an error value), then the parser is called with
|
||||
ARGP_KEY_ERROR, and no further calls are made. */
|
||||
|
||||
/* This is not an option at all, but rather a command line argument. If a
|
||||
parser receiving this key returns success, the fact is recorded, and the
|
||||
ARGP_KEY_NO_ARGS case won't be used. HOWEVER, if while processing the
|
||||
argument, a parser function decrements the NEXT field of the state it's
|
||||
passed, the option won't be considered processed; this is to allow you to
|
||||
actually modify the argument (perhaps into an option), and have it
|
||||
processed again. */
|
||||
#define ARGP_KEY_ARG 0
|
||||
/* There are remaining arguments not parsed by any parser, which may be found
|
||||
starting at (STATE->argv + STATE->next). If success is returned, but
|
||||
STATE->next left untouched, it's assumed that all arguments were consume,
|
||||
otherwise, the parser should adjust STATE->next to reflect any arguments
|
||||
consumed. */
|
||||
#define ARGP_KEY_ARGS 0x1000006
|
||||
/* There are no more command line arguments at all. */
|
||||
#define ARGP_KEY_END 0x1000001
|
||||
/* Because it's common to want to do some special processing if there aren't
|
||||
any non-option args, user parsers are called with this key if they didn't
|
||||
successfully process any non-option arguments. Called just before
|
||||
ARGP_KEY_END (where more general validity checks on previously parsed
|
||||
arguments can take place). */
|
||||
#define ARGP_KEY_NO_ARGS 0x1000002
|
||||
/* Passed in before any parsing is done. Afterwards, the values of each
|
||||
element of the CHILD_INPUT field, if any, in the state structure is
|
||||
copied to each child's state to be the initial value of the INPUT field. */
|
||||
#define ARGP_KEY_INIT 0x1000003
|
||||
/* Use after all other keys, including SUCCESS & END. */
|
||||
#define ARGP_KEY_FINI 0x1000007
|
||||
/* Passed in when parsing has successfully been completed (even if there are
|
||||
still arguments remaining). */
|
||||
#define ARGP_KEY_SUCCESS 0x1000004
|
||||
/* Passed in if an error occurs. */
|
||||
#define ARGP_KEY_ERROR 0x1000005
|
||||
|
||||
/* An argp structure contains a set of options declarations, a function to
|
||||
deal with parsing one, documentation string, a possible vector of child
|
||||
argp's, and perhaps a function to filter help output. When actually
|
||||
parsing options, getopt is called with the union of all the argp
|
||||
structures chained together through their CHILD pointers, with conflicts
|
||||
being resolved in favor of the first occurrence in the chain. */
|
||||
struct argp
|
||||
{
|
||||
/* An array of argp_option structures, terminated by an entry with both
|
||||
NAME and KEY having a value of 0. */
|
||||
const struct argp_option *options;
|
||||
|
||||
/* What to do with an option from this structure. KEY is the key
|
||||
associated with the option, and ARG is any associated argument (NULL if
|
||||
none was supplied). If KEY isn't understood, ARGP_ERR_UNKNOWN should be
|
||||
returned. If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then
|
||||
parsing is stopped immediately, and that value is returned from
|
||||
argp_parse(). For special (non-user-supplied) values of KEY, see the
|
||||
ARGP_KEY_ definitions below. */
|
||||
argp_parser_t parser;
|
||||
|
||||
/* A string describing what other arguments are wanted by this program. It
|
||||
is only used by argp_usage to print the `Usage:' message. If it
|
||||
contains newlines, the strings separated by them are considered
|
||||
alternative usage patterns, and printed on separate lines (lines after
|
||||
the first are prefix by ` or: ' instead of `Usage:'). */
|
||||
const char *args_doc;
|
||||
|
||||
/* If non-NULL, a string containing extra text to be printed before and
|
||||
after the options in a long help message (separated by a vertical tab
|
||||
`\v' character).
|
||||
Write the initial value as N_("BEFORE-TEXT") "\v" N_("AFTER-TEXT") if
|
||||
you want xgettext to collect the two pieces of text into a POT file. */
|
||||
const char *doc;
|
||||
|
||||
/* A vector of argp_children structures, terminated by a member with a 0
|
||||
argp field, pointing to child argps should be parsed with this one. Any
|
||||
conflicts are resolved in favor of this argp, or early argps in the
|
||||
CHILDREN list. This field is useful if you use libraries that supply
|
||||
their own argp structure, which you want to use in conjunction with your
|
||||
own. */
|
||||
const struct argp_child *children;
|
||||
|
||||
/* If non-zero, this should be a function to filter the output of help
|
||||
messages. KEY is either a key from an option, in which case TEXT is
|
||||
that option's help text, or a special key from the ARGP_KEY_HELP_
|
||||
defines, below, describing which other help text TEXT is. The function
|
||||
should return either TEXT, if it should be used as-is, a replacement
|
||||
string, which should be malloced, and will be freed by argp, or NULL,
|
||||
meaning `print nothing'. The value for TEXT is *after* any translation
|
||||
has been done, so if any of the replacement text also needs translation,
|
||||
that should be done by the filter function. INPUT is either the input
|
||||
supplied to argp_parse, or NULL, if argp_help was called directly. */
|
||||
char *(*help_filter) (int __key, const char *__text, void *__input);
|
||||
|
||||
/* If non-zero the strings used in the argp library are translated using
|
||||
the domain described by this string. Otherwise the currently installed
|
||||
default domain is used. */
|
||||
const char *argp_domain;
|
||||
};
|
||||
|
||||
/* Possible KEY arguments to a help filter function. */
|
||||
#define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceeding options. */
|
||||
#define ARGP_KEY_HELP_POST_DOC 0x2000002 /* Help text following options. */
|
||||
#define ARGP_KEY_HELP_HEADER 0x2000003 /* Option header string. */
|
||||
#define ARGP_KEY_HELP_EXTRA 0x2000004 /* After all other documentation;
|
||||
TEXT is NULL for this key. */
|
||||
/* Explanatory note emitted when duplicate option arguments have been
|
||||
suppressed. */
|
||||
#define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005
|
||||
#define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */
|
||||
|
||||
/* When an argp has a non-zero CHILDREN field, it should point to a vector of
|
||||
argp_child structures, each of which describes a subsidiary argp. */
|
||||
struct argp_child
|
||||
{
|
||||
/* The child parser. */
|
||||
const struct argp *argp;
|
||||
|
||||
/* Flags for this child. */
|
||||
int flags;
|
||||
|
||||
/* If non-zero, an optional header to be printed in help output before the
|
||||
child options. As a side-effect, a non-zero value forces the child
|
||||
options to be grouped together; to achieve this effect without actually
|
||||
printing a header string, use a value of "". */
|
||||
const char *header;
|
||||
|
||||
/* Where to group the child options relative to the other (`consolidated')
|
||||
options in the parent argp; the values are the same as the GROUP field
|
||||
in argp_option structs, but all child-groupings follow parent options at
|
||||
a particular group level. If both this field and HEADER are zero, then
|
||||
they aren't grouped at all, but rather merged with the parent options
|
||||
(merging the child's grouping levels with the parents). */
|
||||
int group;
|
||||
};
|
||||
|
||||
/* Parsing state. This is provided to parsing functions called by argp,
|
||||
which may examine and, as noted, modify fields. */
|
||||
struct argp_state
|
||||
{
|
||||
/* The top level ARGP being parsed. */
|
||||
const struct argp *root_argp;
|
||||
|
||||
/* The argument vector being parsed. May be modified. */
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
/* The index in ARGV of the next arg that to be parsed. May be modified. */
|
||||
int next;
|
||||
|
||||
/* The flags supplied to argp_parse. May be modified. */
|
||||
unsigned flags;
|
||||
|
||||
/* While calling a parsing function with a key of ARGP_KEY_ARG, this is the
|
||||
number of the current arg, starting at zero, and incremented after each
|
||||
such call returns. At all other times, this is the number of such
|
||||
arguments that have been processed. */
|
||||
unsigned arg_num;
|
||||
|
||||
/* If non-zero, the index in ARGV of the first argument following a special
|
||||
`--' argument (which prevents anything following being interpreted as an
|
||||
option). Only set once argument parsing has proceeded past this point. */
|
||||
int quoted;
|
||||
|
||||
/* An arbitrary pointer passed in from the user. */
|
||||
void *input;
|
||||
/* Values to pass to child parsers. This vector will be the same length as
|
||||
the number of children for the current parser. */
|
||||
void **child_inputs;
|
||||
|
||||
/* For the parser's use. Initialized to 0. */
|
||||
void *hook;
|
||||
|
||||
/* The name used when printing messages. This is initialized to ARGV[0],
|
||||
or PROGRAM_INVOCATION_NAME if that is unavailable. */
|
||||
char *name;
|
||||
|
||||
/* Streams used when argp prints something. */
|
||||
FILE *err_stream; /* For errors; initialized to stderr. */
|
||||
FILE *out_stream; /* For information; initialized to stdout. */
|
||||
|
||||
void *pstate; /* Private, for use by argp. */
|
||||
};
|
||||
|
||||
/* Flags for argp_parse (note that the defaults are those that are
|
||||
convenient for program command line parsing): */
|
||||
|
||||
/* Don't ignore the first element of ARGV. Normally (and always unless
|
||||
ARGP_NO_ERRS is set) the first element of the argument vector is
|
||||
skipped for option parsing purposes, as it corresponds to the program name
|
||||
in a command line. */
|
||||
#define ARGP_PARSE_ARGV0 0x01
|
||||
|
||||
/* Don't print error messages for unknown options to stderr; unless this flag
|
||||
is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program
|
||||
name in the error messages. This flag implies ARGP_NO_EXIT (on the
|
||||
assumption that silent exiting upon errors is bad behaviour). */
|
||||
#define ARGP_NO_ERRS 0x02
|
||||
|
||||
/* Don't parse any non-option args. Normally non-option args are parsed by
|
||||
calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg
|
||||
as the value. Since it's impossible to know which parse function wants to
|
||||
handle it, each one is called in turn, until one returns 0 or an error
|
||||
other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the
|
||||
argp_parse returns prematurely (but with a return value of 0). If all
|
||||
args have been parsed without error, all parsing functions are called one
|
||||
last time with a key of ARGP_KEY_END. This flag needn't normally be set,
|
||||
as the normal behavior is to stop parsing as soon as some argument can't
|
||||
be handled. */
|
||||
#define ARGP_NO_ARGS 0x04
|
||||
|
||||
/* Parse options and arguments in the same order they occur on the command
|
||||
line -- normally they're rearranged so that all options come first. */
|
||||
#define ARGP_IN_ORDER 0x08
|
||||
|
||||
/* Don't provide the standard long option --help, which causes usage and
|
||||
option help information to be output to stdout, and exit (0) called. */
|
||||
#define ARGP_NO_HELP 0x10
|
||||
|
||||
/* Don't exit on errors (they may still result in error messages). */
|
||||
#define ARGP_NO_EXIT 0x20
|
||||
|
||||
/* Use the gnu getopt `long-only' rules for parsing arguments. */
|
||||
#define ARGP_LONG_ONLY 0x40
|
||||
|
||||
/* Turns off any message-printing/exiting options. */
|
||||
#define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP)
|
||||
|
||||
/* Parse the options strings in ARGC & ARGV according to the options in ARGP.
|
||||
FLAGS is one of the ARGP_ flags above. If ARG_INDEX is non-NULL, the
|
||||
index in ARGV of the first unparsed option is returned in it. If an
|
||||
unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser
|
||||
routine returned a non-zero value, it is returned; otherwise 0 is
|
||||
returned. This function may also call exit unless the ARGP_NO_HELP flag
|
||||
is set. INPUT is a pointer to a value to be passed in to the parser. */
|
||||
extern error_t argp_parse (const struct argp *__restrict __argp,
|
||||
int /*argc*/, char **__restrict /*argv*/,
|
||||
unsigned __flags, int *__restrict __arg_index,
|
||||
void *__restrict __input);
|
||||
extern error_t __argp_parse (const struct argp *__restrict __argp,
|
||||
int /*argc*/, char **__restrict /*argv*/,
|
||||
unsigned __flags, int *__restrict __arg_index,
|
||||
void *__restrict __input);
|
||||
|
||||
/* Global variables. */
|
||||
|
||||
/* GNULIB makes sure both program_invocation_name and
|
||||
program_invocation_short_name are available */
|
||||
#ifdef GNULIB_PROGRAM_INVOCATION_NAME
|
||||
extern char *program_invocation_name;
|
||||
# undef HAVE_DECL_PROGRAM_INVOCATION_NAME
|
||||
# define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
|
||||
#endif
|
||||
|
||||
#ifdef GNULIB_PROGRAM_INVOCATION_SHORT_NAME
|
||||
extern char *program_invocation_short_name;
|
||||
# undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
|
||||
# define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1
|
||||
#endif
|
||||
|
||||
/* If defined or set by the user program to a non-zero value, then a default
|
||||
option --version is added (unless the ARGP_NO_HELP flag is used), which
|
||||
will print this string followed by a newline and exit (unless the
|
||||
ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
|
||||
extern const char *argp_program_version;
|
||||
|
||||
/* If defined or set by the user program to a non-zero value, then a default
|
||||
option --version is added (unless the ARGP_NO_HELP flag is used), which
|
||||
calls this function with a stream to print the version to and a pointer to
|
||||
the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
|
||||
used). This variable takes precedent over ARGP_PROGRAM_VERSION. */
|
||||
extern void (*argp_program_version_hook) (FILE *__restrict __stream,
|
||||
struct argp_state *__restrict
|
||||
__state);
|
||||
|
||||
/* If defined or set by the user program, it should point to string that is
|
||||
the bug-reporting address for the program. It will be printed by
|
||||
argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various
|
||||
standard help messages), embedded in a sentence that says something like
|
||||
`Report bugs to ADDR.'. */
|
||||
extern const char *argp_program_bug_address;
|
||||
|
||||
/* The exit status that argp will use when exiting due to a parsing error.
|
||||
If not defined or set by the user program, this defaults to EX_USAGE from
|
||||
<sysexits.h>. */
|
||||
extern error_t argp_err_exit_status;
|
||||
|
||||
/* Flags for argp_help. */
|
||||
#define ARGP_HELP_USAGE 0x01 /* a Usage: message. */
|
||||
#define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */
|
||||
#define ARGP_HELP_SEE 0x04 /* a `Try ... for more help' message. */
|
||||
#define ARGP_HELP_LONG 0x08 /* a long help message. */
|
||||
#define ARGP_HELP_PRE_DOC 0x10 /* doc string preceding long help. */
|
||||
#define ARGP_HELP_POST_DOC 0x20 /* doc string following long help. */
|
||||
#define ARGP_HELP_DOC (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)
|
||||
#define ARGP_HELP_BUG_ADDR 0x40 /* bug report address */
|
||||
#define ARGP_HELP_LONG_ONLY 0x80 /* modify output appropriately to
|
||||
reflect ARGP_LONG_ONLY mode. */
|
||||
|
||||
/* These ARGP_HELP flags are only understood by argp_state_help. */
|
||||
#define ARGP_HELP_EXIT_ERR 0x100 /* Call exit(1) instead of returning. */
|
||||
#define ARGP_HELP_EXIT_OK 0x200 /* Call exit(0) instead of returning. */
|
||||
|
||||
/* The standard thing to do after a program command line parsing error, if an
|
||||
error message has already been printed. */
|
||||
#define ARGP_HELP_STD_ERR \
|
||||
(ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
|
||||
/* The standard thing to do after a program command line parsing error, if no
|
||||
more specific error message has been printed. */
|
||||
#define ARGP_HELP_STD_USAGE \
|
||||
(ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
|
||||
/* The standard thing to do in response to a --help option. */
|
||||
#define ARGP_HELP_STD_HELP \
|
||||
(ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \
|
||||
| ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR)
|
||||
|
||||
/* Output a usage message for ARGP to STREAM. FLAGS are from the set
|
||||
ARGP_HELP_*. */
|
||||
extern void argp_help (const struct argp *__restrict __argp,
|
||||
FILE *__restrict __stream,
|
||||
unsigned __flags, char *__restrict __name);
|
||||
extern void __argp_help (const struct argp *__restrict __argp,
|
||||
FILE *__restrict __stream, unsigned __flags,
|
||||
char *__name);
|
||||
|
||||
/* The following routines are intended to be called from within an argp
|
||||
parsing routine (thus taking an argp_state structure as the first
|
||||
argument). They may or may not print an error message and exit, depending
|
||||
on the flags in STATE -- in any case, the caller should be prepared for
|
||||
them *not* to exit, and should return an appropiate error after calling
|
||||
them. [argp_usage & argp_error should probably be called argp_state_...,
|
||||
but they're used often enough that they should be short] */
|
||||
|
||||
/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are
|
||||
from the set ARGP_HELP_*. */
|
||||
extern void argp_state_help (const struct argp_state *__restrict __state,
|
||||
FILE *__restrict __stream,
|
||||
unsigned int __flags);
|
||||
extern void __argp_state_help (const struct argp_state *__restrict __state,
|
||||
FILE *__restrict __stream,
|
||||
unsigned int __flags);
|
||||
|
||||
/* Possibly output the standard usage message for ARGP to stderr and exit. */
|
||||
extern void argp_usage (const struct argp_state *__state);
|
||||
extern void __argp_usage (const struct argp_state *__state);
|
||||
|
||||
/* If appropriate, print the printf string FMT and following args, preceded
|
||||
by the program name and `:', to stderr, and followed by a `Try ... --help'
|
||||
message, then exit (1). */
|
||||
extern void argp_error (const struct argp_state *__restrict __state,
|
||||
const char *__restrict __fmt, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
extern void __argp_error (const struct argp_state *__restrict __state,
|
||||
const char *__restrict __fmt, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
|
||||
/* Similar to the standard gnu error-reporting function error(), but will
|
||||
respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
|
||||
to STATE->err_stream. This is useful for argument parsing code that is
|
||||
shared between program startup (when exiting is desired) and runtime
|
||||
option parsing (when typically an error code is returned instead). The
|
||||
difference between this function and argp_error is that the latter is for
|
||||
*parsing errors*, and the former is for other problems that occur during
|
||||
parsing but don't reflect a (syntactic) problem with the input. */
|
||||
extern void argp_failure (const struct argp_state *__restrict __state,
|
||||
int __status, int __errnum,
|
||||
const char *__restrict __fmt, ...)
|
||||
__attribute__ ((__format__ (__printf__, 4, 5)));
|
||||
extern void __argp_failure (const struct argp_state *__restrict __state,
|
||||
int __status, int __errnum,
|
||||
const char *__restrict __fmt, ...)
|
||||
__attribute__ ((__format__ (__printf__, 4, 5)));
|
||||
|
||||
/* Returns true if the option OPT is a valid short option. */
|
||||
extern int _option_is_short (const struct argp_option *__opt) __THROW;
|
||||
extern int __option_is_short (const struct argp_option *__opt) __THROW;
|
||||
|
||||
/* Returns true if the option OPT is in fact the last (unused) entry in an
|
||||
options array. */
|
||||
extern int _option_is_end (const struct argp_option *__opt) __THROW;
|
||||
extern int __option_is_end (const struct argp_option *__opt) __THROW;
|
||||
|
||||
/* Return the input field for ARGP in the parser corresponding to STATE; used
|
||||
by the help routines. */
|
||||
extern void *_argp_input (const struct argp *__restrict __argp,
|
||||
const struct argp_state *__restrict __state)
|
||||
__THROW;
|
||||
extern void *__argp_input (const struct argp *__restrict __argp,
|
||||
const struct argp_state *__restrict __state)
|
||||
__THROW;
|
||||
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
|
||||
# if !_LIBC
|
||||
# define __argp_usage argp_usage
|
||||
# define __argp_state_help argp_state_help
|
||||
# define __option_is_short _option_is_short
|
||||
# define __option_is_end _option_is_end
|
||||
# endif
|
||||
|
||||
# ifndef ARGP_EI
|
||||
# define ARGP_EI extern __inline__
|
||||
# endif
|
||||
|
||||
ARGP_EI void
|
||||
__argp_usage (const struct argp_state *__state)
|
||||
{
|
||||
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
|
||||
}
|
||||
|
||||
ARGP_EI int
|
||||
__NTH (__option_is_short (const struct argp_option *__opt))
|
||||
{
|
||||
if (__opt->flags & OPTION_DOC)
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
int __key = __opt->key;
|
||||
return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
|
||||
}
|
||||
}
|
||||
|
||||
ARGP_EI int
|
||||
__NTH (__option_is_end (const struct argp_option *__opt))
|
||||
{
|
||||
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
|
||||
}
|
||||
|
||||
# if !_LIBC
|
||||
# undef __argp_usage
|
||||
# undef __argp_state_help
|
||||
# undef __option_is_short
|
||||
# undef __option_is_end
|
||||
# endif
|
||||
#endif /* Use extern inlines. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* argp.h */
|
35
gnutar/lib/asnprintf.c
Normal file
35
gnutar/lib/asnprintf.c
Normal file
@ -0,0 +1,35 @@
|
||||
/* Formatted output to strings.
|
||||
Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Specification. */
|
||||
#include "vasnprintf.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
char *
|
||||
asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
char *result;
|
||||
|
||||
va_start (args, format);
|
||||
result = vasnprintf (resultbuf, lengthp, format, args);
|
||||
va_end (args);
|
||||
return result;
|
||||
}
|
86
gnutar/lib/at-func.c
Normal file
86
gnutar/lib/at-func.c
Normal file
@ -0,0 +1,86 @@
|
||||
/* Define an at-style functions like fstatat, unlinkat, fchownat, etc.
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 Jim Meyering */
|
||||
|
||||
#define CALL_FUNC(F) \
|
||||
(AT_FUNC_USE_F1_COND \
|
||||
? AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS) \
|
||||
: AT_FUNC_F2 (F AT_FUNC_POST_FILE_ARGS))
|
||||
|
||||
/* Call AT_FUNC_F1 or AT_FUNC_F2 (testing AT_FUNC_USE_F1_COND to
|
||||
determine which) to operate on FILE, which is in the directory
|
||||
open on descriptor FD. If possible, do it without changing the
|
||||
working directory. Otherwise, resort to using save_cwd/fchdir,
|
||||
then AT_FUNC_F?/restore_cwd. If either the save_cwd or the restore_cwd
|
||||
fails, then give a diagnostic and exit nonzero. */
|
||||
int
|
||||
AT_FUNC_NAME (int fd, char const *file AT_FUNC_POST_FILE_PARAM_DECLS)
|
||||
{
|
||||
struct saved_cwd saved_cwd;
|
||||
int saved_errno;
|
||||
int err;
|
||||
|
||||
if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file))
|
||||
return CALL_FUNC (file);
|
||||
|
||||
{
|
||||
char buf[OPENAT_BUFFER_SIZE];
|
||||
char *proc_file = openat_proc_name (buf, fd, file);
|
||||
if (proc_file)
|
||||
{
|
||||
int proc_result = CALL_FUNC (proc_file);
|
||||
int proc_errno = errno;
|
||||
if (proc_file != buf)
|
||||
free (proc_file);
|
||||
/* If the syscall succeeds, or if it fails with an unexpected
|
||||
errno value, then return right away. Otherwise, fall through
|
||||
and resort to using save_cwd/restore_cwd. */
|
||||
if (0 <= proc_result)
|
||||
return proc_result;
|
||||
if (! EXPECTED_ERRNO (proc_errno))
|
||||
{
|
||||
errno = proc_errno;
|
||||
return proc_result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (save_cwd (&saved_cwd) != 0)
|
||||
openat_save_fail (errno);
|
||||
|
||||
if (fchdir (fd) != 0)
|
||||
{
|
||||
saved_errno = errno;
|
||||
free_cwd (&saved_cwd);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
|
||||
err = CALL_FUNC (file);
|
||||
saved_errno = (err < 0 ? errno : 0);
|
||||
|
||||
if (restore_cwd (&saved_cwd) != 0)
|
||||
openat_restore_fail (errno);
|
||||
|
||||
free_cwd (&saved_cwd);
|
||||
|
||||
if (saved_errno)
|
||||
errno = saved_errno;
|
||||
return err;
|
||||
}
|
||||
#undef CALL_FUNC
|
364
gnutar/lib/backupfile.c
Normal file
364
gnutar/lib/backupfile.c
Normal file
@ -0,0 +1,364 @@
|
||||
/* backupfile.c -- make Emacs style backup file names
|
||||
|
||||
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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; see the file COPYING.
|
||||
If not, write to the Free Software Foundation,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Written by Paul Eggert and David MacKenzie.
|
||||
Some algorithms adapted from GNU Emacs. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "backupfile.h"
|
||||
|
||||
#include "argmatch.h"
|
||||
#include "dirname.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <dirent.h>
|
||||
#ifndef _D_EXACT_NAMLEN
|
||||
# define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name)
|
||||
#endif
|
||||
#if D_INO_IN_DIRENT
|
||||
# define REAL_DIR_ENTRY(dp) ((dp)->d_ino != 0)
|
||||
#else
|
||||
# define REAL_DIR_ENTRY(dp) 1
|
||||
#endif
|
||||
|
||||
#if ! (HAVE_PATHCONF && defined _PC_NAME_MAX)
|
||||
# define pathconf(file, option) (errno = -1)
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX_NAME_MAX
|
||||
# define _POSIX_NAME_MAX 14
|
||||
#endif
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
|
||||
#if defined _XOPEN_NAME_MAX
|
||||
# define NAME_MAX_MINIMUM _XOPEN_NAME_MAX
|
||||
#else
|
||||
# define NAME_MAX_MINIMUM _POSIX_NAME_MAX
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DOS_FILE_NAMES
|
||||
# define HAVE_DOS_FILE_NAMES 0
|
||||
#endif
|
||||
#ifndef HAVE_LONG_FILE_NAMES
|
||||
# define HAVE_LONG_FILE_NAMES 0
|
||||
#endif
|
||||
|
||||
/* ISDIGIT differs from isdigit, as follows:
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char
|
||||
or EOF.
|
||||
- It's typically faster.
|
||||
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
|
||||
ISDIGIT unless it's important to use the locale's definition
|
||||
of `digit' even when the host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
|
||||
|
||||
/* The results of opendir() in this file are not used with dirfd and fchdir,
|
||||
therefore save some unnecessary work in fchdir.c. */
|
||||
#undef opendir
|
||||
#undef closedir
|
||||
|
||||
/* The extension added to file names to produce a simple (as opposed
|
||||
to numbered) backup file name. */
|
||||
char const *simple_backup_suffix = "~";
|
||||
|
||||
|
||||
/* If FILE (which was of length FILELEN before an extension was
|
||||
appended to it) is too long, replace the extension with the single
|
||||
char E. If the result is still too long, remove the char just
|
||||
before E. */
|
||||
|
||||
static void
|
||||
check_extension (char *file, size_t filelen, char e)
|
||||
{
|
||||
char *base = last_component (file);
|
||||
size_t baselen = base_len (base);
|
||||
size_t baselen_max = HAVE_LONG_FILE_NAMES ? 255 : NAME_MAX_MINIMUM;
|
||||
|
||||
if (HAVE_DOS_FILE_NAMES || NAME_MAX_MINIMUM < baselen)
|
||||
{
|
||||
/* The new base name is long enough to require a pathconf check. */
|
||||
long name_max;
|
||||
|
||||
/* Temporarily modify the buffer into its parent directory name,
|
||||
invoke pathconf on the directory, and then restore the buffer. */
|
||||
char tmp[sizeof "."];
|
||||
memcpy (tmp, base, sizeof ".");
|
||||
strcpy (base, ".");
|
||||
errno = 0;
|
||||
name_max = pathconf (file, _PC_NAME_MAX);
|
||||
if (0 <= name_max || errno == 0)
|
||||
{
|
||||
long size = baselen_max = name_max;
|
||||
if (name_max != size)
|
||||
baselen_max = SIZE_MAX;
|
||||
}
|
||||
memcpy (base, tmp, sizeof ".");
|
||||
}
|
||||
|
||||
if (HAVE_DOS_FILE_NAMES && baselen_max <= 12)
|
||||
{
|
||||
/* Live within DOS's 8.3 limit. */
|
||||
char *dot = strchr (base, '.');
|
||||
if (!dot)
|
||||
baselen_max = 8;
|
||||
else
|
||||
{
|
||||
char const *second_dot = strchr (dot + 1, '.');
|
||||
baselen_max = (second_dot
|
||||
? second_dot - base
|
||||
: dot + 1 - base + 3);
|
||||
}
|
||||
}
|
||||
|
||||
if (baselen_max < baselen)
|
||||
{
|
||||
baselen = file + filelen - base;
|
||||
if (baselen_max <= baselen)
|
||||
baselen = baselen_max - 1;
|
||||
base[baselen] = e;
|
||||
base[baselen + 1] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/* Returned values for NUMBERED_BACKUP. */
|
||||
|
||||
enum numbered_backup_result
|
||||
{
|
||||
/* The new backup name is the same length as an existing backup
|
||||
name, so it's valid for that directory. */
|
||||
BACKUP_IS_SAME_LENGTH,
|
||||
|
||||
/* Some backup names already exist, but the returned name is longer
|
||||
than any of them, and its length should be checked. */
|
||||
BACKUP_IS_LONGER,
|
||||
|
||||
/* There are no existing backup names. The new name's length
|
||||
should be checked. */
|
||||
BACKUP_IS_NEW
|
||||
};
|
||||
|
||||
/* *BUFFER contains a file name. Store into *BUFFER the next backup
|
||||
name for the named file, with a version number greater than all the
|
||||
existing numbered backups. Reallocate *BUFFER as necessary; its
|
||||
initial allocated size is BUFFER_SIZE, which must be at least 4
|
||||
bytes longer than the file name to make room for the initially
|
||||
appended ".~1". FILELEN is the length of the original file name.
|
||||
The returned value indicates what kind of backup was found. If an
|
||||
I/O or other read error occurs, use the highest backup number that
|
||||
was found. */
|
||||
|
||||
static enum numbered_backup_result
|
||||
numbered_backup (char **buffer, size_t buffer_size, size_t filelen)
|
||||
{
|
||||
enum numbered_backup_result result = BACKUP_IS_NEW;
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
char *buf = *buffer;
|
||||
size_t versionlenmax = 1;
|
||||
char *base = last_component (buf);
|
||||
size_t base_offset = base - buf;
|
||||
size_t baselen = base_len (base);
|
||||
|
||||
/* Temporarily modify the buffer into its parent directory name,
|
||||
open the directory, and then restore the buffer. */
|
||||
char tmp[sizeof "."];
|
||||
memcpy (tmp, base, sizeof ".");
|
||||
strcpy (base, ".");
|
||||
dirp = opendir (buf);
|
||||
memcpy (base, tmp, sizeof ".");
|
||||
strcpy (base + baselen, ".~1~");
|
||||
|
||||
if (!dirp)
|
||||
return result;
|
||||
|
||||
while ((dp = readdir (dirp)) != NULL)
|
||||
{
|
||||
char const *p;
|
||||
char *q;
|
||||
bool all_9s;
|
||||
size_t versionlen;
|
||||
size_t new_buflen;
|
||||
|
||||
if (! REAL_DIR_ENTRY (dp) || _D_EXACT_NAMLEN (dp) < baselen + 4)
|
||||
continue;
|
||||
|
||||
if (memcmp (buf + base_offset, dp->d_name, baselen + 2) != 0)
|
||||
continue;
|
||||
|
||||
p = dp->d_name + baselen + 2;
|
||||
|
||||
/* Check whether this file has a version number and if so,
|
||||
whether it is larger. Use string operations rather than
|
||||
integer arithmetic, to avoid problems with integer overflow. */
|
||||
|
||||
if (! ('1' <= *p && *p <= '9'))
|
||||
continue;
|
||||
all_9s = (*p == '9');
|
||||
for (versionlen = 1; ISDIGIT (p[versionlen]); versionlen++)
|
||||
all_9s &= (p[versionlen] == '9');
|
||||
|
||||
if (! (p[versionlen] == '~' && !p[versionlen + 1]
|
||||
&& (versionlenmax < versionlen
|
||||
|| (versionlenmax == versionlen
|
||||
&& memcmp (buf + filelen + 2, p, versionlen) <= 0))))
|
||||
continue;
|
||||
|
||||
/* This directory has the largest version number seen so far.
|
||||
Append this highest numbered extension to the file name,
|
||||
prepending '0' to the number if it is all 9s. */
|
||||
|
||||
versionlenmax = all_9s + versionlen;
|
||||
result = (all_9s ? BACKUP_IS_LONGER : BACKUP_IS_SAME_LENGTH);
|
||||
new_buflen = filelen + 2 + versionlenmax + 1;
|
||||
if (buffer_size <= new_buflen)
|
||||
{
|
||||
buf = xnrealloc (buf, 2, new_buflen);
|
||||
buffer_size = new_buflen * 2;
|
||||
}
|
||||
q = buf + filelen;
|
||||
*q++ = '.';
|
||||
*q++ = '~';
|
||||
*q = '0';
|
||||
q += all_9s;
|
||||
memcpy (q, p, versionlen + 2);
|
||||
|
||||
/* Add 1 to the version number. */
|
||||
|
||||
q += versionlen;
|
||||
while (*--q == '9')
|
||||
*q = '0';
|
||||
++*q;
|
||||
}
|
||||
|
||||
closedir (dirp);
|
||||
*buffer = buf;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Return the name of the new backup file for the existing file FILE,
|
||||
allocated with malloc. Report an error and fail if out of memory.
|
||||
Do not call this function if backup_type == no_backups. */
|
||||
|
||||
char *
|
||||
find_backup_file_name (char const *file, enum backup_type backup_type)
|
||||
{
|
||||
size_t filelen = strlen (file);
|
||||
char *s;
|
||||
size_t ssize;
|
||||
bool simple = true;
|
||||
|
||||
/* Allow room for simple or ".~N~" backups. The guess must be at
|
||||
least sizeof ".~1~", but otherwise will be adjusted as needed. */
|
||||
size_t simple_backup_suffix_size = strlen (simple_backup_suffix) + 1;
|
||||
size_t backup_suffix_size_guess = simple_backup_suffix_size;
|
||||
enum { GUESS = sizeof ".~12345~" };
|
||||
if (backup_suffix_size_guess < GUESS)
|
||||
backup_suffix_size_guess = GUESS;
|
||||
|
||||
ssize = filelen + backup_suffix_size_guess + 1;
|
||||
s = xmalloc (ssize);
|
||||
memcpy (s, file, filelen + 1);
|
||||
|
||||
if (backup_type != simple_backups)
|
||||
switch (numbered_backup (&s, ssize, filelen))
|
||||
{
|
||||
case BACKUP_IS_SAME_LENGTH:
|
||||
return s;
|
||||
|
||||
case BACKUP_IS_LONGER:
|
||||
simple = false;
|
||||
break;
|
||||
|
||||
case BACKUP_IS_NEW:
|
||||
simple = (backup_type == numbered_existing_backups);
|
||||
break;
|
||||
}
|
||||
|
||||
if (simple)
|
||||
memcpy (s + filelen, simple_backup_suffix, simple_backup_suffix_size);
|
||||
check_extension (s, filelen, '~');
|
||||
return s;
|
||||
}
|
||||
|
||||
static char const * const backup_args[] =
|
||||
{
|
||||
/* In a series of synonyms, present the most meaningful first, so
|
||||
that argmatch_valid be more readable. */
|
||||
"none", "off",
|
||||
"simple", "never",
|
||||
"existing", "nil",
|
||||
"numbered", "t",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const enum backup_type backup_types[] =
|
||||
{
|
||||
no_backups, no_backups,
|
||||
simple_backups, simple_backups,
|
||||
numbered_existing_backups, numbered_existing_backups,
|
||||
numbered_backups, numbered_backups
|
||||
};
|
||||
|
||||
/* Ensure that these two vectors have the same number of elements,
|
||||
not counting the final NULL in the first one. */
|
||||
ARGMATCH_VERIFY (backup_args, backup_types);
|
||||
|
||||
/* Return the type of backup specified by VERSION.
|
||||
If VERSION is NULL or the empty string, return numbered_existing_backups.
|
||||
If VERSION is invalid or ambiguous, fail with a diagnostic appropriate
|
||||
for the specified CONTEXT. Unambiguous abbreviations are accepted. */
|
||||
|
||||
enum backup_type
|
||||
get_version (char const *context, char const *version)
|
||||
{
|
||||
if (version == 0 || *version == 0)
|
||||
return numbered_existing_backups;
|
||||
else
|
||||
return XARGMATCH (context, version, backup_args, backup_types);
|
||||
}
|
||||
|
||||
|
||||
/* Return the type of backup specified by VERSION.
|
||||
If VERSION is NULL, use the value of the envvar VERSION_CONTROL.
|
||||
If the specified string is invalid or ambiguous, fail with a diagnostic
|
||||
appropriate for the specified CONTEXT.
|
||||
Unambiguous abbreviations are accepted. */
|
||||
|
||||
enum backup_type
|
||||
xget_version (char const *context, char const *version)
|
||||
{
|
||||
if (version && *version)
|
||||
return get_version (context, version);
|
||||
else
|
||||
return get_version ("$VERSION_CONTROL", getenv ("VERSION_CONTROL"));
|
||||
}
|
61
gnutar/lib/backupfile.h
Normal file
61
gnutar/lib/backupfile.h
Normal file
@ -0,0 +1,61 @@
|
||||
/* backupfile.h -- declarations for making Emacs style backup file names
|
||||
|
||||
Copyright (C) 1990, 1991, 1992, 1997, 1998, 1999, 2003, 2004 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
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; see the file COPYING.
|
||||
If not, write to the Free Software Foundation,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef BACKUPFILE_H_
|
||||
# define BACKUPFILE_H_
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
|
||||
/* When to make backup files. */
|
||||
enum backup_type
|
||||
{
|
||||
/* Never make backups. */
|
||||
no_backups,
|
||||
|
||||
/* Make simple backups of every file. */
|
||||
simple_backups,
|
||||
|
||||
/* Make numbered backups of files that already have numbered backups,
|
||||
and simple backups of the others. */
|
||||
numbered_existing_backups,
|
||||
|
||||
/* Make numbered backups of every file. */
|
||||
numbered_backups
|
||||
};
|
||||
|
||||
# define VALID_BACKUP_TYPE(Type) \
|
||||
((unsigned int) (Type) <= numbered_backups)
|
||||
|
||||
extern char const *simple_backup_suffix;
|
||||
|
||||
char *find_backup_file_name (char const *, enum backup_type);
|
||||
enum backup_type get_version (char const *context, char const *arg);
|
||||
enum backup_type xget_version (char const *context, char const *arg);
|
||||
void addext (char *, char const *, int);
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* ! BACKUPFILE_H_ */
|
129
gnutar/lib/basename.c
Normal file
129
gnutar/lib/basename.c
Normal file
@ -0,0 +1,129 @@
|
||||
/* basename.c -- return the last element in a file name
|
||||
|
||||
Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "dirname.h"
|
||||
|
||||
#include <string.h>
|
||||
#include "xalloc.h"
|
||||
#include "xstrndup.h"
|
||||
|
||||
/* Return the address of the last file name component of NAME. If
|
||||
NAME has no relative file name components because it is a file
|
||||
system root, return the empty string. */
|
||||
|
||||
char *
|
||||
last_component (char const *name)
|
||||
{
|
||||
char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
|
||||
char const *p;
|
||||
bool saw_slash = false;
|
||||
|
||||
while (ISSLASH (*base))
|
||||
base++;
|
||||
|
||||
for (p = base; *p; p++)
|
||||
{
|
||||
if (ISSLASH (*p))
|
||||
saw_slash = true;
|
||||
else if (saw_slash)
|
||||
{
|
||||
base = p;
|
||||
saw_slash = false;
|
||||
}
|
||||
}
|
||||
|
||||
return (char *) base;
|
||||
}
|
||||
|
||||
|
||||
/* In general, we can't use the builtin `basename' function if available,
|
||||
since it has different meanings in different environments.
|
||||
In some environments the builtin `basename' modifies its argument.
|
||||
|
||||
Return the last file name component of NAME, allocated with
|
||||
xmalloc. On systems with drive letters, a leading "./"
|
||||
distinguishes relative names that would otherwise look like a drive
|
||||
letter. Unlike POSIX basename(), NAME cannot be NULL,
|
||||
base_name("") returns "", and the first trailing slash is not
|
||||
stripped.
|
||||
|
||||
If lstat (NAME) would succeed, then { chdir (dir_name (NAME));
|
||||
lstat (base_name (NAME)); } will access the same file. Likewise,
|
||||
if the sequence { chdir (dir_name (NAME));
|
||||
rename (base_name (NAME), "foo"); } succeeds, you have renamed NAME
|
||||
to "foo" in the same directory NAME was in. */
|
||||
|
||||
char *
|
||||
base_name (char const *name)
|
||||
{
|
||||
char const *base = last_component (name);
|
||||
size_t length;
|
||||
|
||||
/* If there is no last component, then name is a file system root or the
|
||||
empty string. */
|
||||
if (! *base)
|
||||
return xstrndup (name, base_len (name));
|
||||
|
||||
/* Collapse a sequence of trailing slashes into one. */
|
||||
length = base_len (base);
|
||||
if (ISSLASH (base[length]))
|
||||
length++;
|
||||
|
||||
/* On systems with drive letters, `a/b:c' must return `./b:c' rather
|
||||
than `b:c' to avoid confusion with a drive letter. On systems
|
||||
with pure POSIX semantics, this is not an issue. */
|
||||
if (FILE_SYSTEM_PREFIX_LEN (base))
|
||||
{
|
||||
char *p = xmalloc (length + 3);
|
||||
p[0] = '.';
|
||||
p[1] = '/';
|
||||
memcpy (p + 2, base, length);
|
||||
p[length + 2] = '\0';
|
||||
return p;
|
||||
}
|
||||
|
||||
/* Finally, copy the basename. */
|
||||
return xstrndup (base, length);
|
||||
}
|
||||
|
||||
/* Return the length of the basename NAME. Typically NAME is the
|
||||
value returned by base_name or last_component. Act like strlen
|
||||
(NAME), except omit all trailing slashes. */
|
||||
|
||||
size_t
|
||||
base_len (char const *name)
|
||||
{
|
||||
size_t len;
|
||||
size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
|
||||
|
||||
for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
|
||||
continue;
|
||||
|
||||
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1
|
||||
&& ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2])
|
||||
return 2;
|
||||
|
||||
if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len
|
||||
&& len == prefix_len && ISSLASH (name[prefix_len]))
|
||||
return prefix_len + 1;
|
||||
|
||||
return len;
|
||||
}
|
353
gnutar/lib/canonicalize-lgpl.c
Normal file
353
gnutar/lib/canonicalize-lgpl.c
Normal file
@ -0,0 +1,353 @@
|
||||
/* Return the canonical absolute name of a given file.
|
||||
Copyright (C) 1996-2003, 2005-2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Avoid a clash of our rpl_realpath() function with the prototype in
|
||||
<stdlib.h> on Solaris 2.5.1. */
|
||||
#undef realpath
|
||||
|
||||
#if !HAVE_CANONICALIZE_FILE_NAME || defined _LIBC
|
||||
|
||||
#include <alloca.h>
|
||||
|
||||
/* Specification. */
|
||||
#include "canonicalize.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if HAVE_UNISTD_H || defined _LIBC
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#if HAVE_SYS_PARAM_H || defined _LIBC
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
#ifndef MAXSYMLINKS
|
||||
# define MAXSYMLINKS 20
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef _LIBC
|
||||
# define __set_errno(e) errno = (e)
|
||||
# ifndef ENAMETOOLONG
|
||||
# define ENAMETOOLONG EINVAL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <shlib-compat.h>
|
||||
#else
|
||||
# define SHLIB_COMPAT(lib, introduced, obsoleted) 0
|
||||
# define versioned_symbol(lib, local, symbol, version)
|
||||
# define compat_symbol(lib, local, symbol, version)
|
||||
# define weak_alias(local, symbol)
|
||||
# define __canonicalize_file_name canonicalize_file_name
|
||||
# define __realpath rpl_realpath
|
||||
# include "pathmax.h"
|
||||
# include "allocsa.h"
|
||||
# if HAVE_GETCWD
|
||||
# ifdef VMS
|
||||
/* We want the directory in Unix syntax, not in VMS syntax. */
|
||||
# define __getcwd(buf, max) getcwd (buf, max, 0)
|
||||
# else
|
||||
# define __getcwd getcwd
|
||||
# endif
|
||||
# else
|
||||
# define __getcwd(buf, max) getwd (buf)
|
||||
# endif
|
||||
# define __readlink readlink
|
||||
/* On systems without symbolic links, call stat() instead of lstat(). */
|
||||
# if !defined S_ISNLK && !HAVE_READLINK
|
||||
# define lstat stat
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Return the canonical absolute name of file NAME. A canonical name
|
||||
does not contain any `.', `..' components nor any repeated path
|
||||
separators ('/') or symlinks. All path components must exist. If
|
||||
RESOLVED is null, the result is malloc'd; otherwise, if the
|
||||
canonical name is PATH_MAX chars or more, returns null with `errno'
|
||||
set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
|
||||
returns the name in RESOLVED. If the name cannot be resolved and
|
||||
RESOLVED is non-NULL, it contains the path of the first component
|
||||
that cannot be resolved. If the path can be resolved, RESOLVED
|
||||
holds the same value as the value returned. */
|
||||
|
||||
char *
|
||||
__realpath (const char *name, char *resolved)
|
||||
{
|
||||
char *rpath, *dest, *extra_buf = NULL;
|
||||
const char *start, *end, *rpath_limit;
|
||||
long int path_max;
|
||||
#if HAVE_READLINK
|
||||
int num_links = 0;
|
||||
#endif
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
/* As per Single Unix Specification V2 we must return an error if
|
||||
either parameter is a null pointer. We extend this to allow
|
||||
the RESOLVED parameter to be NULL in case the we are expected to
|
||||
allocate the room for the return value. */
|
||||
__set_errno (EINVAL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (name[0] == '\0')
|
||||
{
|
||||
/* As per Single Unix Specification V2 we must return an error if
|
||||
the name argument points to an empty string. */
|
||||
__set_errno (ENOENT);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef PATH_MAX
|
||||
path_max = PATH_MAX;
|
||||
#else
|
||||
path_max = pathconf (name, _PC_PATH_MAX);
|
||||
if (path_max <= 0)
|
||||
path_max = 1024;
|
||||
#endif
|
||||
|
||||
if (resolved == NULL)
|
||||
{
|
||||
rpath = malloc (path_max);
|
||||
if (rpath == NULL)
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
rpath = resolved;
|
||||
rpath_limit = rpath + path_max;
|
||||
|
||||
if (name[0] != '/')
|
||||
{
|
||||
if (!__getcwd (rpath, path_max))
|
||||
{
|
||||
rpath[0] = '\0';
|
||||
goto error;
|
||||
}
|
||||
dest = strchr (rpath, '\0');
|
||||
}
|
||||
else
|
||||
{
|
||||
rpath[0] = '/';
|
||||
dest = rpath + 1;
|
||||
}
|
||||
|
||||
for (start = end = name; *start; start = end)
|
||||
{
|
||||
#ifdef _LIBC
|
||||
struct stat64 st;
|
||||
#else
|
||||
struct stat st;
|
||||
#endif
|
||||
|
||||
/* Skip sequence of multiple path-separators. */
|
||||
while (*start == '/')
|
||||
++start;
|
||||
|
||||
/* Find end of path component. */
|
||||
for (end = start; *end && *end != '/'; ++end)
|
||||
/* Nothing. */;
|
||||
|
||||
if (end - start == 0)
|
||||
break;
|
||||
else if (end - start == 1 && start[0] == '.')
|
||||
/* nothing */;
|
||||
else if (end - start == 2 && start[0] == '.' && start[1] == '.')
|
||||
{
|
||||
/* Back up to previous component, ignore if at root already. */
|
||||
if (dest > rpath + 1)
|
||||
while ((--dest)[-1] != '/');
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t new_size;
|
||||
|
||||
if (dest[-1] != '/')
|
||||
*dest++ = '/';
|
||||
|
||||
if (dest + (end - start) >= rpath_limit)
|
||||
{
|
||||
ptrdiff_t dest_offset = dest - rpath;
|
||||
char *new_rpath;
|
||||
|
||||
if (resolved)
|
||||
{
|
||||
__set_errno (ENAMETOOLONG);
|
||||
if (dest > rpath + 1)
|
||||
dest--;
|
||||
*dest = '\0';
|
||||
goto error;
|
||||
}
|
||||
new_size = rpath_limit - rpath;
|
||||
if (end - start + 1 > path_max)
|
||||
new_size += end - start + 1;
|
||||
else
|
||||
new_size += path_max;
|
||||
new_rpath = (char *) realloc (rpath, new_size);
|
||||
if (new_rpath == NULL)
|
||||
goto error;
|
||||
rpath = new_rpath;
|
||||
rpath_limit = rpath + new_size;
|
||||
|
||||
dest = rpath + dest_offset;
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
dest = __mempcpy (dest, start, end - start);
|
||||
#else
|
||||
memcpy (dest, start, end - start);
|
||||
dest += end - start;
|
||||
#endif
|
||||
*dest = '\0';
|
||||
|
||||
#ifdef _LIBC
|
||||
if (__lxstat64 (_STAT_VER, rpath, &st) < 0)
|
||||
#else
|
||||
if (lstat (rpath, &st) < 0)
|
||||
#endif
|
||||
goto error;
|
||||
|
||||
#if HAVE_READLINK
|
||||
if (S_ISLNK (st.st_mode))
|
||||
{
|
||||
char *buf;
|
||||
size_t len;
|
||||
int n;
|
||||
|
||||
if (++num_links > MAXSYMLINKS)
|
||||
{
|
||||
__set_errno (ELOOP);
|
||||
goto error;
|
||||
}
|
||||
|
||||
buf = allocsa (path_max);
|
||||
if (!buf)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
n = __readlink (rpath, buf, path_max);
|
||||
if (n < 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
freesa (buf);
|
||||
errno = saved_errno;
|
||||
goto error;
|
||||
}
|
||||
buf[n] = '\0';
|
||||
|
||||
if (!extra_buf)
|
||||
{
|
||||
extra_buf = allocsa (path_max);
|
||||
if (!extra_buf)
|
||||
{
|
||||
freesa (buf);
|
||||
errno = ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
len = strlen (end);
|
||||
if ((long int) (n + len) >= path_max)
|
||||
{
|
||||
freesa (buf);
|
||||
__set_errno (ENAMETOOLONG);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Careful here, end may be a pointer into extra_buf... */
|
||||
memmove (&extra_buf[n], end, len + 1);
|
||||
name = end = memcpy (extra_buf, buf, n);
|
||||
|
||||
if (buf[0] == '/')
|
||||
dest = rpath + 1; /* It's an absolute symlink */
|
||||
else
|
||||
/* Back up to previous component, ignore if at root already: */
|
||||
if (dest > rpath + 1)
|
||||
while ((--dest)[-1] != '/');
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (dest > rpath + 1 && dest[-1] == '/')
|
||||
--dest;
|
||||
*dest = '\0';
|
||||
|
||||
if (extra_buf)
|
||||
freesa (extra_buf);
|
||||
|
||||
return resolved ? memcpy (resolved, rpath, dest - rpath + 1) : rpath;
|
||||
|
||||
error:
|
||||
{
|
||||
int saved_errno = errno;
|
||||
if (extra_buf)
|
||||
freesa (extra_buf);
|
||||
if (resolved)
|
||||
strcpy (resolved, rpath);
|
||||
else
|
||||
free (rpath);
|
||||
errno = saved_errno;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#ifdef _LIBC
|
||||
versioned_symbol (libc, __realpath, realpath, GLIBC_2_3);
|
||||
#endif
|
||||
|
||||
|
||||
#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3)
|
||||
char *
|
||||
__old_realpath (const char *name, char *resolved)
|
||||
{
|
||||
if (resolved == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return __realpath (name, resolved);
|
||||
}
|
||||
compat_symbol (libc, __old_realpath, realpath, GLIBC_2_0);
|
||||
#endif
|
||||
|
||||
|
||||
char *
|
||||
__canonicalize_file_name (const char *name)
|
||||
{
|
||||
return __realpath (name, NULL);
|
||||
}
|
||||
weak_alias (__canonicalize_file_name, canonicalize_file_name)
|
||||
|
||||
#else
|
||||
|
||||
/* This declaration is solely to ensure that after preprocessing
|
||||
this file is never empty. */
|
||||
typedef int dummy;
|
||||
|
||||
#endif
|
54
gnutar/lib/canonicalize.h
Normal file
54
gnutar/lib/canonicalize.h
Normal file
@ -0,0 +1,54 @@
|
||||
/* Return the canonical absolute name of a given file.
|
||||
Copyright (C) 1996-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; see the file COPYING.
|
||||
If not, write to the Free Software Foundation,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef CANONICALIZE_H_
|
||||
# define CANONICALIZE_H_
|
||||
|
||||
# if GNULIB_CANONICALIZE
|
||||
enum canonicalize_mode_t
|
||||
{
|
||||
/* All components must exist. */
|
||||
CAN_EXISTING = 0,
|
||||
|
||||
/* All components excluding last one must exist. */
|
||||
CAN_ALL_BUT_LAST = 1,
|
||||
|
||||
/* No requirements on components existence. */
|
||||
CAN_MISSING = 2
|
||||
};
|
||||
typedef enum canonicalize_mode_t canonicalize_mode_t;
|
||||
|
||||
/* Return a malloc'd string containing the canonical absolute name of
|
||||
the named file. This acts like canonicalize_file_name, except that
|
||||
whether components must exist depends on the canonicalize_mode_t
|
||||
argument. */
|
||||
char *canonicalize_filename_mode (const char *, canonicalize_mode_t);
|
||||
# endif
|
||||
|
||||
# if HAVE_DECL_CANONICALIZE_FILE_NAME
|
||||
# include <stdlib.h>
|
||||
# else
|
||||
/* Return a malloc'd string containing the canonical absolute name of
|
||||
the named file. If any file name component does not exist or is a
|
||||
symlink to a nonexistent file, return NULL. A canonical name does
|
||||
not contain any `.', `..' components nor any repeated file name
|
||||
separators ('/') or symlinks. */
|
||||
char *canonicalize_file_name (const char *);
|
||||
# endif
|
||||
|
||||
#endif /* !CANONICALIZE_H_ */
|
265
gnutar/lib/chdir-long.c
Normal file
265
gnutar/lib/chdir-long.c
Normal file
@ -0,0 +1,265 @@
|
||||
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
|
||||
Copyright (C) 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 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 Jim Meyering */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "chdir-long.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "openat.h"
|
||||
|
||||
#ifndef PATH_MAX
|
||||
# error "compile this file only if your system defines PATH_MAX"
|
||||
#endif
|
||||
|
||||
struct cd_buf
|
||||
{
|
||||
int fd;
|
||||
};
|
||||
|
||||
static inline void
|
||||
cdb_init (struct cd_buf *cdb)
|
||||
{
|
||||
cdb->fd = AT_FDCWD;
|
||||
}
|
||||
|
||||
static inline int
|
||||
cdb_fchdir (struct cd_buf const *cdb)
|
||||
{
|
||||
return fchdir (cdb->fd);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdb_free (struct cd_buf const *cdb)
|
||||
{
|
||||
if (0 <= cdb->fd)
|
||||
{
|
||||
bool close_fail = close (cdb->fd);
|
||||
assert (! close_fail);
|
||||
}
|
||||
}
|
||||
|
||||
/* Given a file descriptor of an open directory (or AT_FDCWD), CDB->fd,
|
||||
try to open the CDB->fd-relative directory, DIR. If the open succeeds,
|
||||
update CDB->fd with the resulting descriptor, close the incoming file
|
||||
descriptor, and return zero. Upon failure, return -1 and set errno. */
|
||||
static int
|
||||
cdb_advance_fd (struct cd_buf *cdb, char const *dir)
|
||||
{
|
||||
int new_fd = openat (cdb->fd, dir,
|
||||
O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
|
||||
if (new_fd < 0)
|
||||
return -1;
|
||||
|
||||
cdb_free (cdb);
|
||||
cdb->fd = new_fd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return a pointer to the first non-slash in S. */
|
||||
static inline char *
|
||||
find_non_slash (char const *s)
|
||||
{
|
||||
size_t n_slash = strspn (s, "/");
|
||||
return (char *) s + n_slash;
|
||||
}
|
||||
|
||||
/* This is a function much like chdir, but without the PATH_MAX limitation
|
||||
on the length of the directory name. A significant difference is that
|
||||
it must be able to modify (albeit only temporarily) the directory
|
||||
name. It handles an arbitrarily long directory name by operating
|
||||
on manageable portions of the name. On systems without the openat
|
||||
syscall, this means changing the working directory to more and more
|
||||
`distant' points along the long directory name and then restoring
|
||||
the working directory. If any of those attempts to save or restore
|
||||
the working directory fails, this function exits nonzero.
|
||||
|
||||
Note that this function may still fail with errno == ENAMETOOLONG, but
|
||||
only if the specified directory name contains a component that is long
|
||||
enough to provoke such a failure all by itself (e.g. if the component
|
||||
has length PATH_MAX or greater on systems that define PATH_MAX). */
|
||||
|
||||
int
|
||||
chdir_long (char *dir)
|
||||
{
|
||||
int e = chdir (dir);
|
||||
if (e == 0 || errno != ENAMETOOLONG)
|
||||
return e;
|
||||
|
||||
{
|
||||
size_t len = strlen (dir);
|
||||
char *dir_end = dir + len;
|
||||
struct cd_buf cdb;
|
||||
size_t n_leading_slash;
|
||||
|
||||
cdb_init (&cdb);
|
||||
|
||||
/* If DIR is the empty string, then the chdir above
|
||||
must have failed and set errno to ENOENT. */
|
||||
assert (0 < len);
|
||||
assert (PATH_MAX <= len);
|
||||
|
||||
/* Count leading slashes. */
|
||||
n_leading_slash = strspn (dir, "/");
|
||||
|
||||
/* Handle any leading slashes as well as any name that matches
|
||||
the regular expression, m!^//hostname[/]*! . Handling this
|
||||
prefix separately usually results in a single additional
|
||||
cdb_advance_fd call, but it's worthwhile, since it makes the
|
||||
code in the following loop cleaner. */
|
||||
if (n_leading_slash == 2)
|
||||
{
|
||||
int err;
|
||||
/* Find next slash.
|
||||
We already know that dir[2] is neither a slash nor '\0'. */
|
||||
char *slash = memchr (dir + 3, '/', dir_end - (dir + 3));
|
||||
if (slash == NULL)
|
||||
{
|
||||
errno = ENAMETOOLONG;
|
||||
return -1;
|
||||
}
|
||||
*slash = '\0';
|
||||
err = cdb_advance_fd (&cdb, dir);
|
||||
*slash = '/';
|
||||
if (err != 0)
|
||||
goto Fail;
|
||||
dir = find_non_slash (slash + 1);
|
||||
}
|
||||
else if (n_leading_slash)
|
||||
{
|
||||
if (cdb_advance_fd (&cdb, "/") != 0)
|
||||
goto Fail;
|
||||
dir += n_leading_slash;
|
||||
}
|
||||
|
||||
assert (*dir != '/');
|
||||
assert (dir <= dir_end);
|
||||
|
||||
while (PATH_MAX <= dir_end - dir)
|
||||
{
|
||||
int err;
|
||||
/* Find a slash that is PATH_MAX or fewer bytes away from dir.
|
||||
I.e. see if there is a slash that will give us a name of
|
||||
length PATH_MAX-1 or less. */
|
||||
char *slash = memrchr (dir, '/', PATH_MAX);
|
||||
if (slash == NULL)
|
||||
{
|
||||
errno = ENAMETOOLONG;
|
||||
return -1;
|
||||
}
|
||||
|
||||
*slash = '\0';
|
||||
assert (slash - dir < PATH_MAX);
|
||||
err = cdb_advance_fd (&cdb, dir);
|
||||
*slash = '/';
|
||||
if (err != 0)
|
||||
goto Fail;
|
||||
|
||||
dir = find_non_slash (slash + 1);
|
||||
}
|
||||
|
||||
if (dir < dir_end)
|
||||
{
|
||||
if (cdb_advance_fd (&cdb, dir) != 0)
|
||||
goto Fail;
|
||||
}
|
||||
|
||||
if (cdb_fchdir (&cdb) != 0)
|
||||
goto Fail;
|
||||
|
||||
cdb_free (&cdb);
|
||||
return 0;
|
||||
|
||||
Fail:
|
||||
{
|
||||
int saved_errno = errno;
|
||||
cdb_free (&cdb);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if TEST_CHDIR
|
||||
|
||||
# include <stdio.h>
|
||||
# include "closeout.h"
|
||||
# include "error.h"
|
||||
|
||||
char *program_name;
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
char *line = NULL;
|
||||
size_t n = 0;
|
||||
int len;
|
||||
|
||||
program_name = argv[0];
|
||||
atexit (close_stdout);
|
||||
|
||||
len = getline (&line, &n, stdin);
|
||||
if (len < 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
if (feof (stdin))
|
||||
exit (0);
|
||||
|
||||
error (EXIT_FAILURE, saved_errno,
|
||||
"reading standard input");
|
||||
}
|
||||
else if (len == 0)
|
||||
exit (0);
|
||||
|
||||
if (line[len-1] == '\n')
|
||||
line[len-1] = '\0';
|
||||
|
||||
if (chdir_long (line) != 0)
|
||||
error (EXIT_FAILURE, errno,
|
||||
"chdir_long failed: %s", line);
|
||||
|
||||
if (argc <= 1)
|
||||
{
|
||||
/* Using `pwd' here makes sense only if it is a robust implementation,
|
||||
like the one in coreutils after the 2004-04-19 changes. */
|
||||
char const *cmd = "pwd";
|
||||
execlp (cmd, (char *) NULL);
|
||||
error (EXIT_FAILURE, errno, "%s", cmd);
|
||||
}
|
||||
|
||||
fclose (stdin);
|
||||
fclose (stderr);
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
compile-command: "gcc -DTEST_CHDIR=1 -g -O -W -Wall chdir-long.c libcoreutils.a"
|
||||
End:
|
||||
*/
|
35
gnutar/lib/chdir-long.h
Normal file
35
gnutar/lib/chdir-long.h
Normal file
@ -0,0 +1,35 @@
|
||||
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
|
||||
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef PATH_MAX
|
||||
# ifdef MAXPATHLEN
|
||||
# define PATH_MAX MAXPATHLEN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* On systems without PATH_MAX, presume that chdir accepts
|
||||
arbitrarily long directory names. */
|
||||
#ifndef PATH_MAX
|
||||
# define chdir_long(Dir) chdir (Dir)
|
||||
#else
|
||||
int chdir_long (char *dir);
|
||||
#endif
|
104
gnutar/lib/chown.c
Normal file
104
gnutar/lib/chown.c
Normal file
@ -0,0 +1,104 @@
|
||||
/* provide consistent interface to chown for systems that don't interpret
|
||||
an ID of -1 as meaning `don't change the corresponding ID'.
|
||||
|
||||
Copyright (C) 1997, 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 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 Jim Meyering */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Specification. */
|
||||
#include <unistd.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* Below we refer to the system's chown(). */
|
||||
#undef chown
|
||||
|
||||
/* The results of open() in this file are not used with fchdir,
|
||||
therefore save some unnecessary work in fchdir.c. */
|
||||
#undef open
|
||||
#undef close
|
||||
|
||||
/* Provide a more-closely POSIX-conforming version of chown on
|
||||
systems with one or both of the following problems:
|
||||
- chown doesn't treat an ID of -1 as meaning
|
||||
`don't change the corresponding ID'.
|
||||
- chown doesn't dereference symlinks. */
|
||||
|
||||
int
|
||||
rpl_chown (const char *file, uid_t uid, gid_t gid)
|
||||
{
|
||||
#if CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE
|
||||
if (gid == (gid_t) -1 || uid == (uid_t) -1)
|
||||
{
|
||||
struct stat file_stats;
|
||||
|
||||
/* Stat file to get id(s) that should remain unchanged. */
|
||||
if (stat (file, &file_stats))
|
||||
return -1;
|
||||
|
||||
if (gid == (gid_t) -1)
|
||||
gid = file_stats.st_gid;
|
||||
|
||||
if (uid == (uid_t) -1)
|
||||
uid = file_stats.st_uid;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CHOWN_MODIFIES_SYMLINK
|
||||
{
|
||||
/* Handle the case in which the system-supplied chown function
|
||||
does *not* follow symlinks. Instead, it changes permissions
|
||||
on the symlink itself. To work around that, we open the
|
||||
file (but this can fail due to lack of read or write permission) and
|
||||
use fchown on the resulting descriptor. */
|
||||
int open_flags = O_NONBLOCK | O_NOCTTY;
|
||||
int fd = open (file, O_RDONLY | open_flags);
|
||||
if (0 <= fd
|
||||
|| (errno == EACCES
|
||||
&& 0 <= (fd = open (file, O_WRONLY | open_flags))))
|
||||
{
|
||||
int result = fchown (fd, uid, gid);
|
||||
int saved_errno = errno;
|
||||
|
||||
/* POSIX says fchown can fail with errno == EINVAL on sockets,
|
||||
so fall back on chown in that case. */
|
||||
struct stat sb;
|
||||
bool fchown_socket_failure =
|
||||
(result != 0 && saved_errno == EINVAL
|
||||
&& fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode));
|
||||
|
||||
close (fd);
|
||||
|
||||
if (! fchown_socket_failure)
|
||||
{
|
||||
errno = saved_errno;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
else if (errno != EACCES)
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return chown (file, uid, gid);
|
||||
}
|
76
gnutar/lib/close-stream.c
Normal file
76
gnutar/lib/close-stream.c
Normal file
@ -0,0 +1,76 @@
|
||||
/* Close a stream, with nicer error checking than fclose's.
|
||||
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "close-stream.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "__fpending.h"
|
||||
|
||||
#if USE_UNLOCKED_IO
|
||||
# include "unlocked-io.h"
|
||||
#endif
|
||||
|
||||
/* Close STREAM. Return 0 if successful, EOF (setting errno)
|
||||
otherwise. A failure might set errno to 0 if the error number
|
||||
cannot be determined.
|
||||
|
||||
If a program writes *anything* to STREAM, that program should close
|
||||
STREAM and make sure that it succeeds before exiting. Otherwise,
|
||||
suppose that you go to the extreme of checking the return status
|
||||
of every function that does an explicit write to STREAM. The last
|
||||
printf can succeed in writing to the internal stream buffer, and yet
|
||||
the fclose(STREAM) could still fail (due e.g., to a disk full error)
|
||||
when it tries to write out that buffered data. Thus, you would be
|
||||
left with an incomplete output file and the offending program would
|
||||
exit successfully. Even calling fflush is not always sufficient,
|
||||
since some file systems (NFS and CODA) buffer written/flushed data
|
||||
until an actual close call.
|
||||
|
||||
Besides, it's wasteful to check the return value from every call
|
||||
that writes to STREAM -- just let the internal stream state record
|
||||
the failure. That's what the ferror test is checking below. */
|
||||
|
||||
int
|
||||
close_stream (FILE *stream)
|
||||
{
|
||||
bool some_pending = (__fpending (stream) != 0);
|
||||
bool prev_fail = (ferror (stream) != 0);
|
||||
bool fclose_fail = (fclose (stream) != 0);
|
||||
|
||||
/* Return an error indication if there was a previous failure or if
|
||||
fclose failed, with one exception: ignore an fclose failure if
|
||||
there was no previous error, no data remains to be flushed, and
|
||||
fclose failed with EBADF. That can happen when a program like cp
|
||||
is invoked like this `cp a b >&-' (i.e., with standard output
|
||||
closed) and doesn't generate any output (hence no previous error
|
||||
and nothing to be flushed). */
|
||||
|
||||
if (prev_fail || (fclose_fail && (some_pending || errno != EBADF)))
|
||||
{
|
||||
if (! fclose_fail)
|
||||
errno = 0;
|
||||
return EOF;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
2
gnutar/lib/close-stream.h
Normal file
2
gnutar/lib/close-stream.h
Normal file
@ -0,0 +1,2 @@
|
||||
#include <stdio.h>
|
||||
int close_stream (FILE *stream);
|
86
gnutar/lib/closeout.c
Normal file
86
gnutar/lib/closeout.c
Normal file
@ -0,0 +1,86 @@
|
||||
/* Close standard output and standard error, exiting with a diagnostic on error.
|
||||
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "closeout.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "gettext.h"
|
||||
#define _(msgid) gettext (msgid)
|
||||
|
||||
#include "close-stream.h"
|
||||
#include "error.h"
|
||||
#include "exitfail.h"
|
||||
#include "quotearg.h"
|
||||
|
||||
static const char *file_name;
|
||||
|
||||
/* Set the file name to be reported in the event an error is detected
|
||||
by close_stdout. */
|
||||
void
|
||||
close_stdout_set_file_name (const char *file)
|
||||
{
|
||||
file_name = file;
|
||||
}
|
||||
|
||||
/* Close standard output. On error, issue a diagnostic and _exit
|
||||
with status 'exit_failure'.
|
||||
|
||||
Also close standard error. On error, _exit with status 'exit_failure'.
|
||||
|
||||
Since close_stdout is commonly registered via 'atexit', POSIX
|
||||
and the C standard both say that it should not call 'exit',
|
||||
because the behavior is undefined if 'exit' is called more than
|
||||
once. So it calls '_exit' instead of 'exit'. If close_stdout
|
||||
is registered via atexit before other functions are registered,
|
||||
the other functions can act before this _exit is invoked.
|
||||
|
||||
Applications that use close_stdout should flush any streams
|
||||
other than stdout and stderr before exiting, since the call to
|
||||
_exit will bypass other buffer flushing. Applications should
|
||||
be flushing and closing other streams anyway, to check for I/O
|
||||
errors. Also, applications should not use tmpfile, since _exit
|
||||
can bypass the removal of these files.
|
||||
|
||||
It's important to detect such failures and exit nonzero because many
|
||||
tools (most notably `make' and other build-management systems) depend
|
||||
on being able to detect failure in other tools via their exit status. */
|
||||
|
||||
void
|
||||
close_stdout (void)
|
||||
{
|
||||
if (close_stream (stdout) != 0)
|
||||
{
|
||||
char const *write_error = _("write error");
|
||||
if (file_name)
|
||||
error (0, errno, "%s: %s", quotearg_colon (file_name),
|
||||
write_error);
|
||||
else
|
||||
error (0, errno, "%s", write_error);
|
||||
|
||||
_exit (exit_failure);
|
||||
}
|
||||
|
||||
if (close_stream (stderr) != 0)
|
||||
_exit (exit_failure);
|
||||
}
|
33
gnutar/lib/closeout.h
Normal file
33
gnutar/lib/closeout.h
Normal file
@ -0,0 +1,33 @@
|
||||
/* Close standard output and standard error.
|
||||
|
||||
Copyright (C) 1998, 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 CLOSEOUT_H
|
||||
# define CLOSEOUT_H 1
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
void close_stdout_set_file_name (const char *file);
|
||||
void close_stdout (void);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif
|
639
gnutar/lib/config.charset
Executable file
639
gnutar/lib/config.charset
Executable file
@ -0,0 +1,639 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent table of character encoding aliases.
|
||||
#
|
||||
# Copyright (C) 2000-2004, 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# 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.
|
||||
#
|
||||
# The table consists of lines of the form
|
||||
# ALIAS CANONICAL
|
||||
#
|
||||
# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
|
||||
# ALIAS is compared in a case sensitive way.
|
||||
#
|
||||
# CANONICAL is the GNU canonical name for this character encoding.
|
||||
# It must be an encoding supported by libiconv. Support by GNU libc is
|
||||
# also desirable. CANONICAL is case insensitive. Usually an upper case
|
||||
# MIME charset name is preferred.
|
||||
# The current list of GNU canonical charset names is as follows.
|
||||
#
|
||||
# name MIME? used by which systems
|
||||
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin
|
||||
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
|
||||
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
|
||||
# ISO-8859-3 Y glibc solaris
|
||||
# ISO-8859-4 Y osf solaris freebsd netbsd darwin
|
||||
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
|
||||
# ISO-8859-6 Y glibc aix hpux solaris
|
||||
# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd darwin
|
||||
# ISO-8859-8 Y glibc aix hpux osf solaris
|
||||
# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
|
||||
# ISO-8859-13 glibc netbsd darwin
|
||||
# ISO-8859-14 glibc
|
||||
# ISO-8859-15 glibc aix osf solaris freebsd darwin
|
||||
# KOI8-R Y glibc solaris freebsd netbsd darwin
|
||||
# KOI8-U Y glibc freebsd netbsd darwin
|
||||
# KOI8-T glibc
|
||||
# CP437 dos
|
||||
# CP775 dos
|
||||
# CP850 aix osf dos
|
||||
# CP852 dos
|
||||
# CP855 dos
|
||||
# CP856 aix
|
||||
# CP857 dos
|
||||
# CP861 dos
|
||||
# CP862 dos
|
||||
# CP864 dos
|
||||
# CP865 dos
|
||||
# CP866 freebsd netbsd darwin dos
|
||||
# CP869 dos
|
||||
# CP874 woe32 dos
|
||||
# CP922 aix
|
||||
# CP932 aix woe32 dos
|
||||
# CP943 aix
|
||||
# CP949 osf woe32 dos
|
||||
# CP950 woe32 dos
|
||||
# CP1046 aix
|
||||
# CP1124 aix
|
||||
# CP1125 dos
|
||||
# CP1129 aix
|
||||
# CP1250 woe32
|
||||
# CP1251 glibc solaris netbsd darwin woe32
|
||||
# CP1252 aix woe32
|
||||
# CP1253 woe32
|
||||
# CP1254 woe32
|
||||
# CP1255 glibc woe32
|
||||
# CP1256 woe32
|
||||
# CP1257 woe32
|
||||
# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin
|
||||
# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin
|
||||
# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin
|
||||
# EUC-TW glibc aix hpux irix osf solaris netbsd
|
||||
# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin
|
||||
# BIG5-HKSCS glibc solaris
|
||||
# GBK glibc aix osf solaris woe32 dos
|
||||
# GB18030 glibc solaris netbsd
|
||||
# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
|
||||
# JOHAB glibc solaris woe32
|
||||
# TIS-620 glibc aix hpux osf solaris
|
||||
# VISCII Y glibc
|
||||
# TCVN5712-1 glibc
|
||||
# GEORGIAN-PS glibc
|
||||
# HP-ROMAN8 hpux
|
||||
# HP-ARABIC8 hpux
|
||||
# HP-GREEK8 hpux
|
||||
# HP-HEBREW8 hpux
|
||||
# HP-TURKISH8 hpux
|
||||
# HP-KANA8 hpux
|
||||
# DEC-KANJI osf
|
||||
# DEC-HANYU osf
|
||||
# UTF-8 Y glibc aix hpux osf solaris netbsd darwin
|
||||
#
|
||||
# Note: Names which are not marked as being a MIME name should not be used in
|
||||
# Internet protocols for information interchange (mail, news, etc.).
|
||||
#
|
||||
# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
|
||||
# must understand both names and treat them as equivalent.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
|
||||
host="$1"
|
||||
os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
|
||||
echo "# This file contains a table of character encoding aliases,"
|
||||
echo "# suitable for operating system '${os}'."
|
||||
echo "# It was automatically generated from config.charset."
|
||||
# List of references, updated during installation:
|
||||
echo "# Packages using this file: "
|
||||
case "$os" in
|
||||
linux-gnulibc1*)
|
||||
# Linux libc5 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
echo "C ASCII"
|
||||
echo "POSIX ASCII"
|
||||
for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
|
||||
en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
|
||||
en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
|
||||
es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
|
||||
et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
|
||||
fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
|
||||
it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
|
||||
sv_FI sv_SE; do
|
||||
echo "$l ISO-8859-1"
|
||||
echo "$l.iso-8859-1 ISO-8859-1"
|
||||
echo "$l.iso-8859-15 ISO-8859-15"
|
||||
echo "$l.iso-8859-15@euro ISO-8859-15"
|
||||
echo "$l@euro ISO-8859-15"
|
||||
echo "$l.cp-437 CP437"
|
||||
echo "$l.cp-850 CP850"
|
||||
echo "$l.cp-1252 CP1252"
|
||||
echo "$l.cp-1252@euro CP1252"
|
||||
#echo "$l.atari-st ATARI-ST" # not a commonly used encoding
|
||||
echo "$l.utf-8 UTF-8"
|
||||
echo "$l.utf-8@euro UTF-8"
|
||||
done
|
||||
for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
|
||||
sl_SI sr sr_CS sr_YU; do
|
||||
echo "$l ISO-8859-2"
|
||||
echo "$l.iso-8859-2 ISO-8859-2"
|
||||
echo "$l.cp-852 CP852"
|
||||
echo "$l.cp-1250 CP1250"
|
||||
echo "$l.utf-8 UTF-8"
|
||||
done
|
||||
for l in mk mk_MK ru ru_RU; do
|
||||
echo "$l ISO-8859-5"
|
||||
echo "$l.iso-8859-5 ISO-8859-5"
|
||||
echo "$l.koi8-r KOI8-R"
|
||||
echo "$l.cp-866 CP866"
|
||||
echo "$l.cp-1251 CP1251"
|
||||
echo "$l.utf-8 UTF-8"
|
||||
done
|
||||
for l in ar ar_SA; do
|
||||
echo "$l ISO-8859-6"
|
||||
echo "$l.iso-8859-6 ISO-8859-6"
|
||||
echo "$l.cp-864 CP864"
|
||||
#echo "$l.cp-868 CP868" # not a commonly used encoding
|
||||
echo "$l.cp-1256 CP1256"
|
||||
echo "$l.utf-8 UTF-8"
|
||||
done
|
||||
for l in el el_GR gr gr_GR; do
|
||||
echo "$l ISO-8859-7"
|
||||
echo "$l.iso-8859-7 ISO-8859-7"
|
||||
echo "$l.cp-869 CP869"
|
||||
echo "$l.cp-1253 CP1253"
|
||||
echo "$l.cp-1253@euro CP1253"
|
||||
echo "$l.utf-8 UTF-8"
|
||||
echo "$l.utf-8@euro UTF-8"
|
||||
done
|
||||
for l in he he_IL iw iw_IL; do
|
||||
echo "$l ISO-8859-8"
|
||||
echo "$l.iso-8859-8 ISO-8859-8"
|
||||
echo "$l.cp-862 CP862"
|
||||
echo "$l.cp-1255 CP1255"
|
||||
echo "$l.utf-8 UTF-8"
|
||||
done
|
||||
for l in tr tr_TR; do
|
||||
echo "$l ISO-8859-9"
|
||||
echo "$l.iso-8859-9 ISO-8859-9"
|
||||
echo "$l.cp-857 CP857"
|
||||
echo "$l.cp-1254 CP1254"
|
||||
echo "$l.utf-8 UTF-8"
|
||||
done
|
||||
for l in lt lt_LT lv lv_LV; do
|
||||
#echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
|
||||
echo "$l ISO-8859-13"
|
||||
done
|
||||
for l in ru_UA uk uk_UA; do
|
||||
echo "$l KOI8-U"
|
||||
done
|
||||
for l in zh zh_CN; do
|
||||
#echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
|
||||
echo "$l GB2312"
|
||||
done
|
||||
for l in ja ja_JP ja_JP.EUC; do
|
||||
echo "$l EUC-JP"
|
||||
done
|
||||
for l in ko ko_KR; do
|
||||
echo "$l EUC-KR"
|
||||
done
|
||||
for l in th th_TH; do
|
||||
echo "$l TIS-620"
|
||||
done
|
||||
for l in fa fa_IR; do
|
||||
#echo "$l ISIRI-3342" # a broken encoding
|
||||
echo "$l.utf-8 UTF-8"
|
||||
done
|
||||
;;
|
||||
linux* | *-gnu*)
|
||||
# With glibc-2.1 or newer, we don't need any canonicalization,
|
||||
# because glibc has iconv and both glibc and libiconv support all
|
||||
# GNU canonical names directly. Therefore, the Makefile does not
|
||||
# need to install the alias file at all.
|
||||
# The following applies only to glibc-2.0.x and older libcs.
|
||||
echo "ISO_646.IRV:1983 ASCII"
|
||||
;;
|
||||
aix*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-6 ISO-8859-6"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-8 ISO-8859-8"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "IBM-850 CP850"
|
||||
echo "IBM-856 CP856"
|
||||
echo "IBM-921 ISO-8859-13"
|
||||
echo "IBM-922 CP922"
|
||||
echo "IBM-932 CP932"
|
||||
echo "IBM-943 CP943"
|
||||
echo "IBM-1046 CP1046"
|
||||
echo "IBM-1124 CP1124"
|
||||
echo "IBM-1129 CP1129"
|
||||
echo "IBM-1252 CP1252"
|
||||
echo "IBM-eucCN GB2312"
|
||||
echo "IBM-eucJP EUC-JP"
|
||||
echo "IBM-eucKR EUC-KR"
|
||||
echo "IBM-eucTW EUC-TW"
|
||||
echo "big5 BIG5"
|
||||
echo "GBK GBK"
|
||||
echo "TIS-620 TIS-620"
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
hpux*)
|
||||
echo "iso88591 ISO-8859-1"
|
||||
echo "iso88592 ISO-8859-2"
|
||||
echo "iso88595 ISO-8859-5"
|
||||
echo "iso88596 ISO-8859-6"
|
||||
echo "iso88597 ISO-8859-7"
|
||||
echo "iso88598 ISO-8859-8"
|
||||
echo "iso88599 ISO-8859-9"
|
||||
echo "iso885915 ISO-8859-15"
|
||||
echo "roman8 HP-ROMAN8"
|
||||
echo "arabic8 HP-ARABIC8"
|
||||
echo "greek8 HP-GREEK8"
|
||||
echo "hebrew8 HP-HEBREW8"
|
||||
echo "turkish8 HP-TURKISH8"
|
||||
echo "kana8 HP-KANA8"
|
||||
echo "tis620 TIS-620"
|
||||
echo "big5 BIG5"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
echo "hp15CN GB2312"
|
||||
#echo "ccdc ?" # what is this?
|
||||
echo "SJIS SHIFT_JIS"
|
||||
echo "utf8 UTF-8"
|
||||
;;
|
||||
irix*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "eucCN GB2312"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
;;
|
||||
osf*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-4 ISO-8859-4"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-8 ISO-8859-8"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "cp850 CP850"
|
||||
echo "big5 BIG5"
|
||||
echo "dechanyu DEC-HANYU"
|
||||
echo "dechanzi GB2312"
|
||||
echo "deckanji DEC-KANJI"
|
||||
echo "deckorean EUC-KR"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
echo "GBK GBK"
|
||||
echo "KSC5601 CP949"
|
||||
echo "sdeckanji EUC-JP"
|
||||
echo "SJIS SHIFT_JIS"
|
||||
echo "TACTIS TIS-620"
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
solaris*)
|
||||
echo "646 ASCII"
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-3 ISO-8859-3"
|
||||
echo "ISO8859-4 ISO-8859-4"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-6 ISO-8859-6"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-8 ISO-8859-8"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "koi8-r KOI8-R"
|
||||
echo "ansi-1251 CP1251"
|
||||
echo "BIG5 BIG5"
|
||||
echo "Big5-HKSCS BIG5-HKSCS"
|
||||
echo "gb2312 GB2312"
|
||||
echo "GBK GBK"
|
||||
echo "GB18030 GB18030"
|
||||
echo "cns11643 EUC-TW"
|
||||
echo "5601 EUC-KR"
|
||||
echo "ko_KR.johap92 JOHAB"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "PCK SHIFT_JIS"
|
||||
echo "TIS620.2533 TIS-620"
|
||||
#echo "sun_eu_greek ?" # what is this?
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
freebsd* | os2*)
|
||||
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
# Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
|
||||
# reuse FreeBSD's locale data for OS/2.
|
||||
echo "C ASCII"
|
||||
echo "US-ASCII ASCII"
|
||||
for l in la_LN lt_LN; do
|
||||
echo "$l.ASCII ASCII"
|
||||
done
|
||||
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
|
||||
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
|
||||
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
|
||||
echo "$l.ISO_8859-1 ISO-8859-1"
|
||||
echo "$l.DIS_8859-15 ISO-8859-15"
|
||||
done
|
||||
for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
|
||||
echo "$l.ISO_8859-2 ISO-8859-2"
|
||||
done
|
||||
for l in la_LN lt_LT; do
|
||||
echo "$l.ISO_8859-4 ISO-8859-4"
|
||||
done
|
||||
for l in ru_RU ru_SU; do
|
||||
echo "$l.KOI8-R KOI8-R"
|
||||
echo "$l.ISO_8859-5 ISO-8859-5"
|
||||
echo "$l.CP866 CP866"
|
||||
done
|
||||
echo "uk_UA.KOI8-U KOI8-U"
|
||||
echo "zh_TW.BIG5 BIG5"
|
||||
echo "zh_TW.Big5 BIG5"
|
||||
echo "zh_CN.EUC GB2312"
|
||||
echo "ja_JP.EUC EUC-JP"
|
||||
echo "ja_JP.SJIS SHIFT_JIS"
|
||||
echo "ja_JP.Shift_JIS SHIFT_JIS"
|
||||
echo "ko_KR.EUC EUC-KR"
|
||||
;;
|
||||
netbsd*)
|
||||
echo "646 ASCII"
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-4 ISO-8859-4"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-13 ISO-8859-13"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "eucCN GB2312"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
echo "BIG5 BIG5"
|
||||
echo "SJIS SHIFT_JIS"
|
||||
;;
|
||||
darwin[56]*)
|
||||
# Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
echo "C ASCII"
|
||||
for l in en_AU en_CA en_GB en_US la_LN; do
|
||||
echo "$l.US-ASCII ASCII"
|
||||
done
|
||||
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
|
||||
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
|
||||
nl_NL no_NO pt_PT sv_SE; do
|
||||
echo "$l ISO-8859-1"
|
||||
echo "$l.ISO8859-1 ISO-8859-1"
|
||||
echo "$l.ISO8859-15 ISO-8859-15"
|
||||
done
|
||||
for l in la_LN; do
|
||||
echo "$l.ISO8859-1 ISO-8859-1"
|
||||
echo "$l.ISO8859-15 ISO-8859-15"
|
||||
done
|
||||
for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
|
||||
echo "$l.ISO8859-2 ISO-8859-2"
|
||||
done
|
||||
for l in la_LN lt_LT; do
|
||||
echo "$l.ISO8859-4 ISO-8859-4"
|
||||
done
|
||||
for l in ru_RU; do
|
||||
echo "$l.KOI8-R KOI8-R"
|
||||
echo "$l.ISO8859-5 ISO-8859-5"
|
||||
echo "$l.CP866 CP866"
|
||||
done
|
||||
for l in bg_BG; do
|
||||
echo "$l.CP1251 CP1251"
|
||||
done
|
||||
echo "uk_UA.KOI8-U KOI8-U"
|
||||
echo "zh_TW.BIG5 BIG5"
|
||||
echo "zh_TW.Big5 BIG5"
|
||||
echo "zh_CN.EUC GB2312"
|
||||
echo "ja_JP.EUC EUC-JP"
|
||||
echo "ja_JP.SJIS SHIFT_JIS"
|
||||
echo "ko_KR.EUC EUC-KR"
|
||||
;;
|
||||
darwin*)
|
||||
# Darwin 7.5 has nl_langinfo(CODESET), but it is useless:
|
||||
# - It returns the empty string when LANG is set to a locale of the
|
||||
# form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
|
||||
# LC_CTYPE file.
|
||||
# - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
|
||||
# the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
|
||||
# - The documentation says:
|
||||
# "... all code that calls BSD system routines should ensure
|
||||
# that the const *char parameters of these routines are in UTF-8
|
||||
# encoding. All BSD system functions expect their string
|
||||
# parameters to be in UTF-8 encoding and nothing else."
|
||||
# It also says
|
||||
# "An additional caveat is that string parameters for files,
|
||||
# paths, and other file-system entities must be in canonical
|
||||
# UTF-8. In a canonical UTF-8 Unicode string, all decomposable
|
||||
# characters are decomposed ..."
|
||||
# but this is not true: You can pass non-decomposed UTF-8 strings
|
||||
# to file system functions, and it is the OS which will convert
|
||||
# them to decomposed UTF-8 before accessing the file system.
|
||||
# - The Apple Terminal application displays UTF-8 by default.
|
||||
# - However, other applications are free to use different encodings:
|
||||
# - xterm uses ISO-8859-1 by default.
|
||||
# - TextEdit uses MacRoman by default.
|
||||
# We prefer UTF-8 over decomposed UTF-8-MAC because one should
|
||||
# minimize the use of decomposed Unicode. Unfortunately, through the
|
||||
# Darwin file system, decomposed UTF-8 strings are leaked into user
|
||||
# space nevertheless.
|
||||
echo "* UTF-8"
|
||||
;;
|
||||
beos*)
|
||||
# BeOS has a single locale, and it has UTF-8 encoding.
|
||||
echo "* UTF-8"
|
||||
;;
|
||||
msdosdjgpp*)
|
||||
# DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
echo "#"
|
||||
echo "# The encodings given here may not all be correct."
|
||||
echo "# If you find that the encoding given for your language and"
|
||||
echo "# country is not the one your DOS machine actually uses, just"
|
||||
echo "# correct it in this file, and send a mail to"
|
||||
echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
|
||||
echo "# and Bruno Haible <bruno@clisp.org>."
|
||||
echo "#"
|
||||
echo "C ASCII"
|
||||
# ISO-8859-1 languages
|
||||
echo "ca CP850"
|
||||
echo "ca_ES CP850"
|
||||
echo "da CP865" # not CP850 ??
|
||||
echo "da_DK CP865" # not CP850 ??
|
||||
echo "de CP850"
|
||||
echo "de_AT CP850"
|
||||
echo "de_CH CP850"
|
||||
echo "de_DE CP850"
|
||||
echo "en CP850"
|
||||
echo "en_AU CP850" # not CP437 ??
|
||||
echo "en_CA CP850"
|
||||
echo "en_GB CP850"
|
||||
echo "en_NZ CP437"
|
||||
echo "en_US CP437"
|
||||
echo "en_ZA CP850" # not CP437 ??
|
||||
echo "es CP850"
|
||||
echo "es_AR CP850"
|
||||
echo "es_BO CP850"
|
||||
echo "es_CL CP850"
|
||||
echo "es_CO CP850"
|
||||
echo "es_CR CP850"
|
||||
echo "es_CU CP850"
|
||||
echo "es_DO CP850"
|
||||
echo "es_EC CP850"
|
||||
echo "es_ES CP850"
|
||||
echo "es_GT CP850"
|
||||
echo "es_HN CP850"
|
||||
echo "es_MX CP850"
|
||||
echo "es_NI CP850"
|
||||
echo "es_PA CP850"
|
||||
echo "es_PY CP850"
|
||||
echo "es_PE CP850"
|
||||
echo "es_SV CP850"
|
||||
echo "es_UY CP850"
|
||||
echo "es_VE CP850"
|
||||
echo "et CP850"
|
||||
echo "et_EE CP850"
|
||||
echo "eu CP850"
|
||||
echo "eu_ES CP850"
|
||||
echo "fi CP850"
|
||||
echo "fi_FI CP850"
|
||||
echo "fr CP850"
|
||||
echo "fr_BE CP850"
|
||||
echo "fr_CA CP850"
|
||||
echo "fr_CH CP850"
|
||||
echo "fr_FR CP850"
|
||||
echo "ga CP850"
|
||||
echo "ga_IE CP850"
|
||||
echo "gd CP850"
|
||||
echo "gd_GB CP850"
|
||||
echo "gl CP850"
|
||||
echo "gl_ES CP850"
|
||||
echo "id CP850" # not CP437 ??
|
||||
echo "id_ID CP850" # not CP437 ??
|
||||
echo "is CP861" # not CP850 ??
|
||||
echo "is_IS CP861" # not CP850 ??
|
||||
echo "it CP850"
|
||||
echo "it_CH CP850"
|
||||
echo "it_IT CP850"
|
||||
echo "lt CP775"
|
||||
echo "lt_LT CP775"
|
||||
echo "lv CP775"
|
||||
echo "lv_LV CP775"
|
||||
echo "nb CP865" # not CP850 ??
|
||||
echo "nb_NO CP865" # not CP850 ??
|
||||
echo "nl CP850"
|
||||
echo "nl_BE CP850"
|
||||
echo "nl_NL CP850"
|
||||
echo "nn CP865" # not CP850 ??
|
||||
echo "nn_NO CP865" # not CP850 ??
|
||||
echo "no CP865" # not CP850 ??
|
||||
echo "no_NO CP865" # not CP850 ??
|
||||
echo "pt CP850"
|
||||
echo "pt_BR CP850"
|
||||
echo "pt_PT CP850"
|
||||
echo "sv CP850"
|
||||
echo "sv_SE CP850"
|
||||
# ISO-8859-2 languages
|
||||
echo "cs CP852"
|
||||
echo "cs_CZ CP852"
|
||||
echo "hr CP852"
|
||||
echo "hr_HR CP852"
|
||||
echo "hu CP852"
|
||||
echo "hu_HU CP852"
|
||||
echo "pl CP852"
|
||||
echo "pl_PL CP852"
|
||||
echo "ro CP852"
|
||||
echo "ro_RO CP852"
|
||||
echo "sk CP852"
|
||||
echo "sk_SK CP852"
|
||||
echo "sl CP852"
|
||||
echo "sl_SI CP852"
|
||||
echo "sq CP852"
|
||||
echo "sq_AL CP852"
|
||||
echo "sr CP852" # CP852 or CP866 or CP855 ??
|
||||
echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
|
||||
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
|
||||
# ISO-8859-3 languages
|
||||
echo "mt CP850"
|
||||
echo "mt_MT CP850"
|
||||
# ISO-8859-5 languages
|
||||
echo "be CP866"
|
||||
echo "be_BE CP866"
|
||||
echo "bg CP866" # not CP855 ??
|
||||
echo "bg_BG CP866" # not CP855 ??
|
||||
echo "mk CP866" # not CP855 ??
|
||||
echo "mk_MK CP866" # not CP855 ??
|
||||
echo "ru CP866"
|
||||
echo "ru_RU CP866"
|
||||
echo "uk CP1125"
|
||||
echo "uk_UA CP1125"
|
||||
# ISO-8859-6 languages
|
||||
echo "ar CP864"
|
||||
echo "ar_AE CP864"
|
||||
echo "ar_DZ CP864"
|
||||
echo "ar_EG CP864"
|
||||
echo "ar_IQ CP864"
|
||||
echo "ar_IR CP864"
|
||||
echo "ar_JO CP864"
|
||||
echo "ar_KW CP864"
|
||||
echo "ar_MA CP864"
|
||||
echo "ar_OM CP864"
|
||||
echo "ar_QA CP864"
|
||||
echo "ar_SA CP864"
|
||||
echo "ar_SY CP864"
|
||||
# ISO-8859-7 languages
|
||||
echo "el CP869"
|
||||
echo "el_GR CP869"
|
||||
# ISO-8859-8 languages
|
||||
echo "he CP862"
|
||||
echo "he_IL CP862"
|
||||
# ISO-8859-9 languages
|
||||
echo "tr CP857"
|
||||
echo "tr_TR CP857"
|
||||
# Japanese
|
||||
echo "ja CP932"
|
||||
echo "ja_JP CP932"
|
||||
# Chinese
|
||||
echo "zh_CN GBK"
|
||||
echo "zh_TW CP950" # not CP938 ??
|
||||
# Korean
|
||||
echo "kr CP949" # not CP934 ??
|
||||
echo "kr_KR CP949" # not CP934 ??
|
||||
# Thai
|
||||
echo "th CP874"
|
||||
echo "th_TH CP874"
|
||||
# Other
|
||||
echo "eo CP850"
|
||||
echo "eo_EO CP850"
|
||||
;;
|
||||
esac
|
32
gnutar/lib/creat-safer.c
Normal file
32
gnutar/lib/creat-safer.c
Normal file
@ -0,0 +1,32 @@
|
||||
/* Invoke creat, but avoid some glitches.
|
||||
|
||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 Jim Meyering. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "fcntl-safer.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "unistd-safer.h"
|
||||
|
||||
int
|
||||
creat_safer (char const *file, mode_t mode)
|
||||
{
|
||||
return fd_safer (creat (file, mode));
|
||||
}
|
50
gnutar/lib/dirent_.h
Normal file
50
gnutar/lib/dirent_.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* Wrapper around <dirent.h>.
|
||||
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
|
||||
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_DIRENT_H
|
||||
|
||||
/* The include_next requires a split double-inclusion guard. */
|
||||
#if @HAVE_INCLUDE_NEXT@
|
||||
# include_next <dirent.h>
|
||||
#else
|
||||
# include @ABSOLUTE_DIRENT_H@
|
||||
#endif
|
||||
|
||||
#ifndef _GL_DIRENT_H
|
||||
#define _GL_DIRENT_H
|
||||
|
||||
|
||||
/* Declare overridden functions. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if @REPLACE_FCHDIR@
|
||||
# define opendir rpl_opendir
|
||||
extern DIR * opendir (const char *);
|
||||
# define closedir rpl_closedir
|
||||
extern int closedir (DIR *);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _GL_DIRENT_H */
|
||||
#endif /* _GL_DIRENT_H */
|
29
gnutar/lib/dirfd.c
Normal file
29
gnutar/lib/dirfd.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* dirfd.c -- return the file descriptor associated with an open DIR*
|
||||
|
||||
Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 Jim Meyering. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "dirfd.h"
|
||||
|
||||
int
|
||||
dirfd (DIR const *dir_p)
|
||||
{
|
||||
return DIR_TO_FD (dir_p);
|
||||
}
|
29
gnutar/lib/dirfd.h
Normal file
29
gnutar/lib/dirfd.h
Normal file
@ -0,0 +1,29 @@
|
||||
/* Declare dirfd, if necessary.
|
||||
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 Jim Meyering. */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
#ifndef HAVE_DECL_DIRFD
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_DIRFD && !defined dirfd
|
||||
int dirfd (DIR const *);
|
||||
#endif
|
85
gnutar/lib/dirname.c
Normal file
85
gnutar/lib/dirname.c
Normal file
@ -0,0 +1,85 @@
|
||||
/* dirname.c -- return all but the last element in a file name
|
||||
|
||||
Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "dirname.h"
|
||||
|
||||
#include <string.h>
|
||||
#include "xalloc.h"
|
||||
|
||||
/* Return the length of the prefix of FILE that will be used by
|
||||
dir_name. If FILE is in the working directory, this returns zero
|
||||
even though `dir_name (FILE)' will return ".". Works properly even
|
||||
if there are trailing slashes (by effectively ignoring them). */
|
||||
|
||||
size_t
|
||||
dir_len (char const *file)
|
||||
{
|
||||
size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file);
|
||||
size_t length;
|
||||
|
||||
/* Advance prefix_length beyond important leading slashes. */
|
||||
prefix_length += (prefix_length != 0
|
||||
? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
|
||||
&& ISSLASH (file[prefix_length]))
|
||||
: (ISSLASH (file[0])
|
||||
? ((DOUBLE_SLASH_IS_DISTINCT_ROOT
|
||||
&& ISSLASH (file[1]) && ! ISSLASH (file[2])
|
||||
? 2 : 1))
|
||||
: 0));
|
||||
|
||||
/* Strip the basename and any redundant slashes before it. */
|
||||
for (length = last_component (file) - file;
|
||||
prefix_length < length; length--)
|
||||
if (! ISSLASH (file[length - 1]))
|
||||
break;
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
/* In general, we can't use the builtin `dirname' function if available,
|
||||
since it has different meanings in different environments.
|
||||
In some environments the builtin `dirname' modifies its argument.
|
||||
|
||||
Return the leading directories part of FILE, allocated with xmalloc.
|
||||
Works properly even if there are trailing slashes (by effectively
|
||||
ignoring them). Unlike POSIX dirname(), FILE cannot be NULL.
|
||||
|
||||
If lstat (FILE) would succeed, then { chdir (dir_name (FILE));
|
||||
lstat (base_name (FILE)); } will access the same file. Likewise,
|
||||
if the sequence { chdir (dir_name (FILE));
|
||||
rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE
|
||||
to "foo" in the same directory FILE was in. */
|
||||
|
||||
char *
|
||||
dir_name (char const *file)
|
||||
{
|
||||
size_t length = dir_len (file);
|
||||
bool append_dot = (length == 0
|
||||
|| (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
|
||||
&& length == FILE_SYSTEM_PREFIX_LEN (file)
|
||||
&& file[2] != '\0' && ! ISSLASH (file[2])));
|
||||
char *dir = xmalloc (length + append_dot + 1);
|
||||
memcpy (dir, file, length);
|
||||
if (append_dot)
|
||||
dir[length++] = '.';
|
||||
dir[length] = '\0';
|
||||
return dir;
|
||||
}
|
70
gnutar/lib/dirname.h
Normal file
70
gnutar/lib/dirname.h
Normal file
@ -0,0 +1,70 @@
|
||||
/* Take file names apart into directory and base names.
|
||||
|
||||
Copyright (C) 1998, 2001, 2003-2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 DIRNAME_H_
|
||||
# define DIRNAME_H_ 1
|
||||
|
||||
# include <stdbool.h>
|
||||
# include <stddef.h>
|
||||
|
||||
# ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
# endif
|
||||
|
||||
# ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
# endif
|
||||
|
||||
# ifndef FILE_SYSTEM_PREFIX_LEN
|
||||
# if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
|
||||
/* This internal macro assumes ASCII, but all hosts that support drive
|
||||
letters use ASCII. */
|
||||
# define _IS_DRIVE_LETTER(c) (((unsigned int) (c) | ('a' - 'A')) - 'a' \
|
||||
<= 'z' - 'a')
|
||||
# define FILE_SYSTEM_PREFIX_LEN(Filename) \
|
||||
(_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
|
||||
# else
|
||||
# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
|
||||
# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
|
||||
# endif
|
||||
|
||||
# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
|
||||
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
|
||||
# endif
|
||||
|
||||
# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
|
||||
# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
|
||||
# else
|
||||
# define IS_ABSOLUTE_FILE_NAME(F) \
|
||||
(ISSLASH ((F)[0]) || 0 < FILE_SYSTEM_PREFIX_LEN (F))
|
||||
# endif
|
||||
# define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
|
||||
|
||||
char *base_name (char const *file);
|
||||
char *dir_name (char const *file);
|
||||
size_t base_len (char const *file);
|
||||
size_t dir_len (char const *file);
|
||||
char *last_component (char const *file);
|
||||
|
||||
bool strip_trailing_slashes (char *file);
|
||||
|
||||
#endif /* not DIRNAME_H_ */
|
45
gnutar/lib/dup-safer.c
Normal file
45
gnutar/lib/dup-safer.c
Normal file
@ -0,0 +1,45 @@
|
||||
/* Invoke dup, but avoid some glitches.
|
||||
|
||||
Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "unistd-safer.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#ifndef STDERR_FILENO
|
||||
# define STDERR_FILENO 2
|
||||
#endif
|
||||
|
||||
/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
|
||||
STDERR_FILENO. */
|
||||
|
||||
int
|
||||
dup_safer (int fd)
|
||||
{
|
||||
#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
|
||||
does the right thing. */
|
||||
return fd_safer (dup (fd));
|
||||
#endif
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user