[Midnightbsd-cvs] src: contrib/cpio: We are no longer using GNU cpio.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Sep 29 20:26:26 EDT 2008
Log Message:
-----------
We are no longer using GNU cpio.
Removed Files:
-------------
src/contrib/cpio:
ABOUT-NLS
AUTHORS
COPYING
ChangeLog
INSTALL
MIDNIGHTBSD-upgrade
Makefile
NEWS
README
THANKS
TODO
config.h
config.log
config.status
stamp-h1
src/contrib/cpio/build-aux:
config.guess
config.rpath
config.sub
depcomp
install-sh
mdate-sh
missing
mkinstalldirs
texinfo.tex
ylwrap
src/contrib/cpio/doc:
Makefile
Makefile.am
Makefile.in
cpio.1
cpio.info
cpio.texi
gendocs_template
mt.1
stamp-vti
version.texi
src/contrib/cpio/lib:
Makefile
__fpending.c
__fpending.h
alloca_.h
allocsa.c
allocsa.h
allocsa.valgrind
argp-ba.c
argp-eexst.c
argp-fmtstream.c
argp-fmtstream.h
argp-fs-xinl.c
argp-help.c
argp-namefrob.h
argp-parse.c
argp-pin.c
argp-pv.c
argp-pvh.c
argp-xinl.c
argp.h
asnprintf.c
at-func.c
basename.c
canonicalize-lgpl.c
canonicalize.h
chdir-long.c
chdir-long.h
chown.c
close-stream.c
close-stream.h
closeout.c
closeout.h
creat-safer.c
dirent_.h
dirfd.c
dirfd.h
dirname.c
dirname.h
dup-safer.c
dup2.c
error.c
error.h
exit.h
exitfail.c
exitfail.h
fatal.c
fchdir.c
fchmodat.c
fchown-stub.c
fchownat.c
fcntl--.h
fcntl-safer.h
fcntl_.h
fd-safer.c
fileblocks.c
float+.h
float_.h
fstatat.c
full-write.c
full-write.h
getcwd.c
getcwd.h
getdate.c
getdate.h
getdate.y
getopt.c
getopt1.c
getopt_.h
getopt_int.h
gettext.h
gettime.c
gettimeofday.c
gnulib.mk
hash.c
hash.h
imaxtostr.c
intprops.h
inttostr.c
inttostr.h
inttypes_.h
lchown.c
lchown.h
localedir.h
lstat.c
lstat.h
malloc.c
mbchar.c
mbchar.h
mbuiter.h
memchr.c
mempcpy.c
mempcpy.h
memrchr.c
memrchr.h
minmax.h
mkdirat.c
mktime.c
obstack.c
obstack.h
offtostr.c
open-safer.c
openat-die.c
openat-priv.h
openat-proc.c
openat.c
openat.h
pathmax.h
paxconvert.c
paxerror.c
paxexit.c
paxlib.h
paxnames.c
pipe-safer.c
printf-args.c
printf-args.h
printf-parse.c
printf-parse.h
quote.c
quote.h
quotearg.c
quotearg.h
readlink.c
rmt-command.h
rmt.h
rtapelib.c
safe-read.c
safe-read.h
safe-write.c
safe-write.h
same-inode.h
save-cwd.c
save-cwd.h
savedir.c
savedir.h
setenv.c
setenv.h
size_max.h
sleep.c
stat-macros.h
stdint_.h
stdio_.h
stdlib_.h
stpcpy.c
stpcpy.h
strcase.h
strcasecmp.c
strchrnul.c
strchrnul.h
string_.h
stripslash.c
strncasecmp.c
strndup.c
strndup.h
strnlen.c
strnlen.h
strnlen1.c
strnlen1.h
strtol.c
sys_stat_.h
sys_time_.h
sysexits_.h
system-ioctl.h
system.h
time_.h
time_r.c
time_r.h
timespec.h
uinttostr.c
umaxtostr.c
unistd--.h
unistd-safer.h
unistd_.h
unlocked-io.h
unsetenv.c
utimens.c
utimens.h
vasnprintf.c
vasnprintf.h
verify.h
version-etc-fsf.c
version-etc.c
version-etc.h
vsnprintf.c
vsnprintf.h
wchar_.h
wctype_.h
wcwidth.h
xalloc-die.c
xalloc.h
xgetcwd.c
xgetcwd.h
xmalloc.c
xsize.h
xstrndup.c
xstrndup.h
src/contrib/cpio/lib/.deps:
__fpending.Po
alloca.Po
allocsa.Po
argmatch.Po
argp-ba.Po
argp-eexst.Po
argp-fmtstream.Po
argp-fs-xinl.Po
argp-help.Po
argp-parse.Po
argp-pin.Po
argp-pv.Po
argp-pvh.Po
argp-xinl.Po
asnprintf.Po
at-func.Po
basename.Po
canonicalize-lgpl.Po
chdir-long.Po
chown.Po
close-stream.Po
closeout.Po
creat-safer.Po
dirfd.Po
dirname.Po
dup-safer.Po
dup2.Po
error.Po
exitfail.Po
fatal.Po
fchdir.Po
fchmodat.Po
fchown-stub.Po
fchownat.Po
fd-safer.Po
fileblocks.Po
fnmatch.Po
fnmatch_loop.Po
fstatat.Po
full-write.Po
getcwd.Po
getdate.Po
getopt.Po
getopt1.Po
gettime.Po
gettimeofday.Po
hash.Po
imaxtostr.Po
inttostr.Po
lchown.Po
lstat.Po
malloc.Po
mempcpy.Po
memrchr.Po
mkdirat.Po
mktime.Po
obstack.Po
offtostr.Po
open-safer.Po
openat-die.Po
openat-proc.Po
openat.Po
paxerror.Po
paxexit.Po
paxnames.Po
pipe-safer.Po
printf-args.Po
printf-parse.Po
quote.Po
quotearg.Po
readlink.Po
rtapelib.Po
safe-read.Po
safe-write.Po
save-cwd.Po
savedir.Po
setenv.Po
sleep.Po
stpcpy.Po
strcasecmp.Po
strchrnul.Po
strdup.Po
strerror.Po
stripslash.Po
strncasecmp.Po
strndup.Po
strnlen.Po
strtol.Po
time_r.Po
uinttostr.Po
umaxtostr.Po
unsetenv.Po
utimens.Po
vasnprintf.Po
version-etc-fsf.Po
version-etc.Po
vsnprintf.Po
xalloc-die.Po
xgetcwd.Po
xmalloc.Po
xstrndup.Po
src/contrib/cpio/src:
Makefile
copyin.c
copyout.c
copypass.c
cpio.h
cpiohdr.h
defer.c
defer.h
dstring.c
dstring.h
extern.h
filemode.c
filetypes.h
global.c
idcache.c
main.c
makepath.c
safe-stat.h
tar.c
tar.h
tarhdr.h
userspec.c
util.c
src/contrib/cpio/src/.deps:
copyin.Po
copyout.Po
copypass.Po
defer.Po
dstring.Po
filemode.Po
global.Po
idcache.Po
main.Po
makepath.Po
mt.Po
tar.Po
userspec.Po
util.Po
-------------- next part --------------
--- contrib/cpio/src/tar.c
+++ /dev/null
@@ -1,494 +0,0 @@
-/* $MidnightBSD: src/contrib/cpio/src/tar.c,v 1.2 2007/07/18 03:55:15 laffer1 Exp $ */
-/* tar.c - read in write tar headers for cpio
- Copyright (C) 1992, 2001, 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 <system.h>
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "filetypes.h"
-#include "cpiohdr.h"
-#include "dstring.h"
-#include "extern.h"
-#include <rmt.h>
-#include "tarhdr.h"
-
-/* Stash the tar linkname in static storage. */
-
-static char *
-stash_tar_linkname (char *linkname)
-{
- static char hold_tar_linkname[TARLINKNAMESIZE + 1];
-
- strncpy (hold_tar_linkname, linkname, TARLINKNAMESIZE);
- hold_tar_linkname[TARLINKNAMESIZE] = '\0';
- return hold_tar_linkname;
-}
-
-/* Try to split a long file name into prefix and suffix parts separated
- by a slash. Return the length of the prefix (not counting the slash). */
-
-static size_t
-split_long_name (const char *name, size_t length)
-{
- size_t i;
-
- if (length > TARPREFIXSIZE)
- length = TARPREFIXSIZE+2;
- for (i = length - 1; i > 0; i--)
- if (name[i] == '/')
- break;
- return i;
-}
-
-/* Stash the tar filename and optional prefix in static storage. */
-
-static char *
-stash_tar_filename (char *prefix, char *filename)
-{
- static char hold_tar_filename[TARNAMESIZE + TARPREFIXSIZE + 2];
- if (prefix == NULL || *prefix == '\0')
- {
- strncpy (hold_tar_filename, filename, TARNAMESIZE);
- hold_tar_filename[TARNAMESIZE] = '\0';
- }
- else
- {
- strncpy (hold_tar_filename, prefix, TARPREFIXSIZE);
- hold_tar_filename[TARPREFIXSIZE] = '\0';
- strcat (hold_tar_filename, "/");
- strncat (hold_tar_filename, filename, TARNAMESIZE);
- hold_tar_filename[TARPREFIXSIZE + TARNAMESIZE] = '\0';
- }
- return hold_tar_filename;
-}
-
-/* Convert a number into a string of octal digits.
- Convert long VALUE into a DIGITS-digit field at WHERE,
- including a trailing space and room for a NUL. DIGITS==3 means
- 1 digit, a space, and room for a NUL.
-
- We assume the trailing NUL is already there and don't fill it in.
- This fact is used by start_header and finish_header, so don't change it!
-
- This is be equivalent to:
- sprintf (where, "%*lo ", digits - 2, value);
- except that sprintf fills in the trailing NUL and we don't. */
-
-static void
-to_oct (register long value, register int digits, register char *where)
-{
- --digits; /* Leave the trailing NUL slot alone. */
-
- /* Produce the digits -- at least one. */
- do
- {
- where[--digits] = '0' + (char) (value & 7); /* One octal digit. */
- value >>= 3;
- }
- while (digits > 0 && value != 0);
-
- /* Add leading zeroes, if necessary. */
- while (digits > 0)
- where[--digits] = '0';
-}
-
-
-
-/* Compute and return a checksum for TAR_HDR,
- counting the checksum bytes as if they were spaces. */
-
-unsigned int
-tar_checksum (struct tar_header *tar_hdr)
-{
- unsigned int sum = 0;
- char *p = (char *) tar_hdr;
- char *q = p + TARRECORDSIZE;
- int i;
-
- while (p < tar_hdr->chksum)
- sum += *p++ & 0xff;
- for (i = 0; i < 8; ++i)
- {
- sum += ' ';
- ++p;
- }
- while (p < q)
- sum += *p++ & 0xff;
- return sum;
-}
-
-/* Write out header FILE_HDR, including the file name, to file
- descriptor OUT_DES. */
-
-void
-write_out_tar_header (struct cpio_file_stat *file_hdr, int out_des)
-{
- int name_len;
- union tar_record tar_rec;
- struct tar_header *tar_hdr = (struct tar_header *) &tar_rec;
-
- memset (&tar_rec, 0, sizeof tar_rec);
-
- /* process_copy_out must ensure that file_hdr->c_name is short enough,
- or we will lose here. */
-
- name_len = strlen (file_hdr->c_name);
- if (name_len <= TARNAMESIZE)
- {
- strncpy (tar_hdr->name, file_hdr->c_name, name_len);
- }
- else
- {
- /* Fit as much as we can into `name', the rest into `prefix'. */
- int prefix_len = split_long_name (file_hdr->c_name, name_len);
-
- strncpy (tar_hdr->prefix, file_hdr->c_name, prefix_len);
- strncpy (tar_hdr->name, file_hdr->c_name + prefix_len + 1,
- name_len - prefix_len - 1);
- }
-
- /* Ustar standard (POSIX.1-1988) requires the mode to contain only 3 octal
- digits */
- to_oct (file_hdr->c_mode & MODE_ALL, 8, tar_hdr->mode);
- to_oct (file_hdr->c_uid, 8, tar_hdr->uid);
- to_oct (file_hdr->c_gid, 8, tar_hdr->gid);
- to_oct (file_hdr->c_filesize, 12, tar_hdr->size);
- to_oct (file_hdr->c_mtime, 12, tar_hdr->mtime);
-
- switch (file_hdr->c_mode & CP_IFMT)
- {
- case CP_IFREG:
- if (file_hdr->c_tar_linkname)
- {
- /* process_copy_out makes sure that c_tar_linkname is shorter
- than TARLINKNAMESIZE. */
- strncpy (tar_hdr->linkname, file_hdr->c_tar_linkname,
- TARLINKNAMESIZE);
- tar_hdr->typeflag = LNKTYPE;
- to_oct (0, 12, tar_hdr->size);
- }
- else
- tar_hdr->typeflag = REGTYPE;
- break;
- case CP_IFDIR:
- tar_hdr->typeflag = DIRTYPE;
- break;
- case CP_IFCHR:
- tar_hdr->typeflag = CHRTYPE;
- break;
- case CP_IFBLK:
- tar_hdr->typeflag = BLKTYPE;
- break;
-#ifdef CP_IFIFO
- case CP_IFIFO:
- tar_hdr->typeflag = FIFOTYPE;
- break;
-#endif /* CP_IFIFO */
-#ifdef CP_IFLNK
- case CP_IFLNK:
- tar_hdr->typeflag = SYMTYPE;
- /* process_copy_out makes sure that c_tar_linkname is shorter
- than TARLINKNAMESIZE. */
- strncpy (tar_hdr->linkname, file_hdr->c_tar_linkname,
- TARLINKNAMESIZE);
- to_oct (0, 12, tar_hdr->size);
- break;
-#endif /* CP_IFLNK */
- }
-
- if (archive_format == arf_ustar)
- {
- char *name;
-
- strncpy (tar_hdr->magic, TMAGIC, TMAGLEN);
- strncpy (tar_hdr->magic + TMAGLEN, TVERSION, TVERSLEN);
-
- name = getuser (file_hdr->c_uid);
- if (name)
- strcpy (tar_hdr->uname, name);
- name = getgroup (file_hdr->c_gid);
- if (name)
- strcpy (tar_hdr->gname, name);
-
- to_oct (file_hdr->c_rdev_maj, 8, tar_hdr->devmajor);
- to_oct (file_hdr->c_rdev_min, 8, tar_hdr->devminor);
- }
-
- to_oct (tar_checksum (tar_hdr), 8, tar_hdr->chksum);
-
- tape_buffered_write ((char *) &tar_rec, out_des, TARRECORDSIZE);
-}
-
-/* Return nonzero iff all the bytes in BLOCK are NUL.
- SIZE is the number of bytes to check in BLOCK; it must be a
- multiple of sizeof (long). */
-
-int
-null_block (long *block, int size)
-{
- register long *p = block;
- register int i = size / sizeof (long);
-
- while (i--)
- if (*p++)
- return 0;
- return 1;
-}
-
-/* Read a tar header, including the file name, from file descriptor IN_DES
- into FILE_HDR. */
-
-void
-read_in_tar_header (struct cpio_file_stat *file_hdr, int in_des)
-{
- long bytes_skipped = 0;
- int warned = false;
- union tar_record tar_rec;
- struct tar_header *tar_hdr = (struct tar_header *) &tar_rec;
- uid_t *uidp;
- gid_t *gidp;
-
- tape_buffered_read ((char *) &tar_rec, in_des, TARRECORDSIZE);
-
- /* Check for a block of 0's. */
- if (null_block ((long *) &tar_rec, TARRECORDSIZE))
- {
-#if 0
- /* Found one block of 512 0's. If the next block is also all 0's
- then this is the end of the archive. If not, assume the
- previous block was all corruption and continue reading
- the archive. */
- /* Commented out because GNU tar sometimes creates archives with
- only one block of 0's at the end. This happened for the
- cpio 2.0 distribution! */
- tape_buffered_read ((char *) &tar_rec, in_des, TARRECORDSIZE);
- if (null_block ((long *) &tar_rec, TARRECORDSIZE))
-#endif
- {
- file_hdr->c_name = CPIO_TRAILER_NAME;
- return;
- }
-#if 0
- bytes_skipped = TARRECORDSIZE;
-#endif
- }
-
- while (1)
- {
- file_hdr->c_chksum = FROM_OCTAL (tar_hdr->chksum);
-
- if (file_hdr->c_chksum != tar_checksum (tar_hdr))
- {
- /* If the checksum is bad, skip 1 byte and try again. When
- we try again we do not look for an EOF record (all zeros),
- because when we start skipping bytes in a corrupted archive
- the chances are pretty good that we might stumble across
- 2 blocks of 512 zeros (that probably is not really the last
- record) and it is better to miss the EOF and give the user
- a "premature EOF" error than to give up too soon on a corrupted
- archive. */
- if (!warned)
- {
- error (0, 0, _("invalid header: checksum error"));
- warned = true;
- }
- memmove (&tar_rec, ((char *) &tar_rec) + 1, TARRECORDSIZE - 1);
- tape_buffered_read (((char *) &tar_rec) + (TARRECORDSIZE - 1), in_des, 1);
- ++bytes_skipped;
- continue;
- }
-
- if (archive_format != arf_ustar)
- file_hdr->c_name = stash_tar_filename (NULL, tar_hdr->name);
- else
- file_hdr->c_name = stash_tar_filename (tar_hdr->prefix, tar_hdr->name);
- file_hdr->c_nlink = 1;
- file_hdr->c_mode = FROM_OCTAL (tar_hdr->mode);
- file_hdr->c_mode = file_hdr->c_mode & 07777;
- /* Debian hack: This version of cpio uses the -n flag also to extract
- tar archives using the numeric UID/GID instead of the user/group
- names in /etc/passwd and /etc/groups. (98/10/15) -BEM */
- if (archive_format == arf_ustar && !numeric_uid
- && (uidp = getuidbyname (tar_hdr->uname)))
- file_hdr->c_uid = *uidp;
- else
- file_hdr->c_uid = FROM_OCTAL (tar_hdr->uid);
-
- if (archive_format == arf_ustar && !numeric_uid
- && (gidp = getgidbyname (tar_hdr->gname)))
- file_hdr->c_gid = *gidp;
- else
- file_hdr->c_gid = FROM_OCTAL (tar_hdr->gid);
- file_hdr->c_filesize = FROM_OCTAL (tar_hdr->size);
- file_hdr->c_mtime = FROM_OCTAL (tar_hdr->mtime);
- file_hdr->c_rdev_maj = FROM_OCTAL (tar_hdr->devmajor);
- file_hdr->c_rdev_min = FROM_OCTAL (tar_hdr->devminor);
- file_hdr->c_tar_linkname = NULL;
-
- switch (tar_hdr->typeflag)
- {
- case REGTYPE:
- case CONTTYPE: /* For now, punt. */
- default:
- file_hdr->c_mode |= CP_IFREG;
- break;
- case DIRTYPE:
- file_hdr->c_mode |= CP_IFDIR;
- break;
- case CHRTYPE:
- file_hdr->c_mode |= CP_IFCHR;
- /* If a POSIX tar header has a valid linkname it's always supposed
- to set typeflag to be LNKTYPE. System V.4 tar seems to
- be broken, and for device files with multiple links it
- puts the name of the link into linkname, but leaves typeflag
- as CHRTYPE, BLKTYPE, FIFOTYPE, etc. */
- file_hdr->c_tar_linkname = stash_tar_linkname (tar_hdr->linkname);
-
- /* Does POSIX say that the filesize must be 0 for devices? We
- assume so, but HPUX's POSIX tar sets it to be 1 which causes
- us problems (when reading an archive we assume we can always
- skip to the next file by skipping filesize bytes). For
- now at least, it's easier to clear filesize for devices,
- rather than check everywhere we skip in copyin.c. */
- file_hdr->c_filesize = 0;
- break;
- case BLKTYPE:
- file_hdr->c_mode |= CP_IFBLK;
- file_hdr->c_tar_linkname = stash_tar_linkname (tar_hdr->linkname);
- file_hdr->c_filesize = 0;
- break;
-#ifdef CP_IFIFO
- case FIFOTYPE:
- file_hdr->c_mode |= CP_IFIFO;
- file_hdr->c_tar_linkname = stash_tar_linkname (tar_hdr->linkname);
- file_hdr->c_filesize = 0;
- break;
-#endif
- case SYMTYPE:
-#ifdef CP_IFLNK
- file_hdr->c_mode |= CP_IFLNK;
- file_hdr->c_tar_linkname = stash_tar_linkname (tar_hdr->linkname);
- file_hdr->c_filesize = 0;
- break;
- /* Else fall through. */
-#endif
- case LNKTYPE:
- file_hdr->c_mode |= CP_IFREG;
- file_hdr->c_tar_linkname = stash_tar_linkname (tar_hdr->linkname);
- file_hdr->c_filesize = 0;
- break;
-
- case AREGTYPE:
- /* Old tar format; if the last char in filename is '/' then it is
- a directory, otherwise it's a regular file. */
- if (file_hdr->c_name[strlen (file_hdr->c_name) - 1] == '/')
- file_hdr->c_mode |= CP_IFDIR;
- else
- file_hdr->c_mode |= CP_IFREG;
- break;
- case 'x': case 'g':
- /* ignore pax 'x' and 'g' extension entries. */
- /* skip body of this entry. */
- while (file_hdr->c_filesize > 0) {
- tape_buffered_read(((char*) &tar_rec), in_des,
- TARRECORDSIZE);
- if (file_hdr->c_filesize > TARRECORDSIZE)
- file_hdr->c_filesize -= TARRECORDSIZE;
- else
- file_hdr->c_filesize = 0;
- }
- /* Read next header and return that instead */
- read_in_tar_header(file_hdr, in_des);
- break;
- }
- break;
- }
- if (bytes_skipped > 0)
- warn_junk_bytes (bytes_skipped);
-}
-
-/* Return
- 2 if BUF is a valid POSIX tar header (the checksum is correct
- and it has the "ustar" magic string),
- 1 if BUF is a valid old tar header (the checksum is correct),
- 0 otherwise. */
-
-int
-is_tar_header (char *buf)
-{
- struct tar_header *tar_hdr = (struct tar_header *) buf;
- unsigned long chksum;
-
- chksum = FROM_OCTAL (tar_hdr->chksum);
-
- if (chksum != tar_checksum (tar_hdr))
- return 0;
-
- /* GNU tar 1.10 and previous set the magic field to be "ustar " instead
- of "ustar\0". Only look at the first 5 characters of the magic
- field so we can recognize old GNU tar ustar archives. */
- if (!strncmp (tar_hdr->magic, TMAGIC, TMAGLEN - 1))
- return 2;
- return 1;
-}
-
-/* Return true if the filename is too long to fit in a tar header.
- For old tar headers, if the filename's length is less than or equal
- to 100 then it will fit, otherwise it will not. For POSIX tar headers,
- if the filename's length is less than or equal to 100 then it
- will definitely fit, and if it is greater than 256 then it
- will definitely not fit. If the length is between 100 and 256,
- then the filename will fit only if it is possible to break it
- into a 155 character "prefix" and 100 character "name". There
- must be a slash between the "prefix" and the "name", although
- the slash is not stored or counted in either the "prefix" or
- the "name", and there must be at least one character in both
- the "prefix" and the "name". If it is not possible to break down
- the filename like this then it will not fit. */
-
-int
-is_tar_filename_too_long (char *name)
-{
- int whole_name_len;
- int prefix_name_len;
-
- whole_name_len = strlen (name);
- if (whole_name_len <= TARNAMESIZE)
- return false;
-
- if (archive_format != arf_ustar)
- return true;
-
- if (whole_name_len > TARNAMESIZE + TARPREFIXSIZE + 1)
- return true;
-
- /* See whether we can split up the name into acceptably-sized
- `prefix' and `name' (`p') pieces. */
- prefix_name_len = split_long_name (name, whole_name_len);
-
- /* Interestingly, a name consisting of a slash followed by
- TARNAMESIZE characters can't be stored, because the prefix
- would be empty, and thus ignored. */
- if (prefix_name_len == 0
- || whole_name_len - prefix_name_len - 1 > TARNAMESIZE)
- return true;
-
- return false;
-}
--- contrib/cpio/src/util.c
+++ /dev/null
@@ -1,1342 +0,0 @@
-/* util.c - Several utility routines for cpio.
- Copyright (C) 1990, 1991, 1992, 2001, 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 <system.h>
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "cpiohdr.h"
-#include "dstring.h"
-#include "extern.h"
-#include <paxlib.h>
-#include "filetypes.h"
-#include <safe-read.h>
-#include <full-write.h>
-#include <rmt.h>
-#include <hash.h>
-#include <utimens.h>
-
-#include <sys/ioctl.h>
-
-#ifdef HAVE_SYS_MTIO_H
-# ifdef HAVE_SYS_IO_TRIOCTL_H
-# include <sys/io/trioctl.h>
-# endif
-# include <sys/mtio.h>
-#endif
-
-#if !HAVE_DECL_ERRNO
-extern int errno;
-#endif
-
-/* Write `output_size' bytes of `output_buffer' to file
- descriptor OUT_DES and reset `output_size' and `out_buff'. */
-
-void
-tape_empty_output_buffer (int out_des)
-{
- int bytes_written;
-
-#ifdef BROKEN_LONG_TAPE_DRIVER
- static long output_bytes_before_lseek = 0;
-
- /* Some tape drivers seem to have a signed internal seek pointer and
- they lose if it overflows and becomes negative (e.g. when writing
- tapes > 2Gb). Doing an lseek (des, 0, SEEK_SET) seems to reset the
- seek pointer and prevent it from overflowing. */
- if (output_is_special
- && ( (output_bytes_before_lseek += output_size) >= 1073741824L) )
- {
- lseek(out_des, 0L, SEEK_SET);
- output_bytes_before_lseek = 0;
- }
-#endif
-
- bytes_written = rmtwrite (out_des, output_buffer, output_size);
- if (bytes_written != output_size)
- {
- int rest_bytes_written;
- int rest_output_size;
-
- if (output_is_special
- && (bytes_written >= 0
- || (bytes_written < 0
- && (errno == ENOSPC || errno == EIO || errno == ENXIO))))
- {
- get_next_reel (out_des);
- if (bytes_written > 0)
- rest_output_size = output_size - bytes_written;
- else
- rest_output_size = output_size;
- rest_bytes_written = rmtwrite (out_des, output_buffer,
- rest_output_size);
- if (rest_bytes_written != rest_output_size)
- error (1, errno, _("write error"));
- }
- else
- error (1, errno, _("write error"));
- }
- output_bytes += output_size;
- out_buff = output_buffer;
- output_size = 0;
-}
-
-static int sparse_write (int fildes, char *buf, unsigned int nbyte);
-
-/* Write `output_size' bytes of `output_buffer' to file
- descriptor OUT_DES and reset `output_size' and `out_buff'.
- If `swapping_halfwords' or `swapping_bytes' is set,
- do the appropriate swapping first. Our callers have
- to make sure to only set these flags if `output_size'
- is appropriate (a multiple of 4 for `swapping_halfwords',
- 2 for `swapping_bytes'). The fact that DISK_IO_BLOCK_SIZE
- must always be a multiple of 4 helps us (and our callers)
- insure this. */
-
-void
-disk_empty_output_buffer (int out_des)
-{
- int bytes_written;
-
- if (swapping_halfwords || swapping_bytes)
- {
- if (swapping_halfwords)
- {
- int complete_words;
- complete_words = output_size / 4;
- swahw_array (output_buffer, complete_words);
- if (swapping_bytes)
- swab_array (output_buffer, 2 * complete_words);
- }
- else
- {
- int complete_halfwords;
- complete_halfwords = output_size /2;
- swab_array (output_buffer, complete_halfwords);
- }
- }
-
- if (sparse_flag)
- bytes_written = sparse_write (out_des, output_buffer, output_size);
- else
- bytes_written = write (out_des, output_buffer, output_size);
-
- if (bytes_written != output_size)
- {
- error (1, errno, _("write error"));
- }
- output_bytes += output_size;
- out_buff = output_buffer;
- output_size = 0;
-}
-
-/* Exchange the halfwords of each element of the array of COUNT longs
- starting at PTR. PTR does not have to be aligned at a word
- boundary. */
-
-void
-swahw_array (char *ptr, int count)
-{
- char tmp;
-
- for (; count > 0; --count)
- {
- tmp = *ptr;
- *ptr = *(ptr + 2);
- *(ptr + 2) = tmp;
- ++ptr;
- tmp = *ptr;
- *ptr = *(ptr + 2);
- *(ptr + 2) = tmp;
- ptr += 3;
- }
-}
-
-/* Read at most NUM_BYTES or `io_block_size' bytes, whichever is smaller,
- into the start of `input_buffer' from file descriptor IN_DES.
- Set `input_size' to the number of bytes read and reset `in_buff'.
- Exit with an error if end of file is reached. */
-
-#ifdef BROKEN_LONG_TAPE_DRIVER
-static long input_bytes_before_lseek = 0;
-#endif
-
-static void
-tape_fill_input_buffer (int in_des, int num_bytes)
-{
-#ifdef BROKEN_LONG_TAPE_DRIVER
- /* Some tape drivers seem to have a signed internal seek pointer and
- they lose if it overflows and becomes negative (e.g. when writing
- tapes > 4Gb). Doing an lseek (des, 0, SEEK_SET) seems to reset the
- seek pointer and prevent it from overflowing. */
- if (input_is_special
- && ( (input_bytes_before_lseek += num_bytes) >= 1073741824L) )
- {
- lseek(in_des, 0L, SEEK_SET);
- input_bytes_before_lseek = 0;
- }
-#endif
- in_buff = input_buffer;
- num_bytes = (num_bytes < io_block_size) ? num_bytes : io_block_size;
- input_size = rmtread (in_des, input_buffer, num_bytes);
- if (input_size == 0 && input_is_special)
- {
- get_next_reel (in_des);
- input_size = rmtread (in_des, input_buffer, num_bytes);
- }
- if (input_size < 0)
- error (1, errno, _("read error"));
- if (input_size == 0)
- {
- error (0, 0, _("premature end of file"));
- exit (1);
- }
- input_bytes += input_size;
-}
-
-/* Read at most NUM_BYTES or `DISK_IO_BLOCK_SIZE' bytes, whichever is smaller,
- into the start of `input_buffer' from file descriptor IN_DES.
- Set `input_size' to the number of bytes read and reset `in_buff'.
- Exit with an error if end of file is reached. */
-
-static int
-disk_fill_input_buffer (int in_des, off_t num_bytes)
-{
- in_buff = input_buffer;
- num_bytes = (num_bytes < DISK_IO_BLOCK_SIZE) ? num_bytes : DISK_IO_BLOCK_SIZE;
- input_size = read (in_des, input_buffer, num_bytes);
- if (input_size < 0)
- {
- input_size = 0;
- return (-1);
- }
- else if (input_size == 0)
- return (1);
- input_bytes += input_size;
- return (0);
-}
-
-/* Copy NUM_BYTES of buffer IN_BUF to `out_buff', which may be partly full.
- When `out_buff' fills up, flush it to file descriptor OUT_DES. */
-
-void
-tape_buffered_write (char *in_buf, int out_des, off_t num_bytes)
-{
- off_t bytes_left = num_bytes; /* Bytes needing to be copied. */
- off_t space_left; /* Room left in output buffer. */
-
- while (bytes_left > 0)
- {
- space_left = io_block_size - output_size;
- if (space_left == 0)
- tape_empty_output_buffer (out_des);
- else
- {
- if (bytes_left < space_left)
- space_left = bytes_left;
- memcpy (out_buff, in_buf, (unsigned) space_left);
- out_buff += space_left;
- output_size += space_left;
- in_buf += space_left;
- bytes_left -= space_left;
- }
- }
-}
-
-/* Copy NUM_BYTES of buffer IN_BUF to `out_buff', which may be partly full.
- When `out_buff' fills up, flush it to file descriptor OUT_DES. */
-
-void
-disk_buffered_write (char *in_buf, int out_des, off_t num_bytes)
-{
- off_t bytes_left = num_bytes; /* Bytes needing to be copied. */
- off_t space_left; /* Room left in output buffer. */
-
- while (bytes_left > 0)
- {
- space_left = DISK_IO_BLOCK_SIZE - output_size;
- if (space_left == 0)
- disk_empty_output_buffer (out_des);
- else
- {
- if (bytes_left < space_left)
- space_left = bytes_left;
- memcpy (out_buff, in_buf, (unsigned) space_left);
- out_buff += space_left;
- output_size += space_left;
- in_buf += space_left;
- bytes_left -= space_left;
- }
- }
-}
-
-/* Copy NUM_BYTES of buffer `in_buff' into IN_BUF.
- `in_buff' may be partly full.
- When `in_buff' is exhausted, refill it from file descriptor IN_DES. */
-
-void
-tape_buffered_read (char *in_buf, int in_des, off_t num_bytes)
-{
- off_t bytes_left = num_bytes; /* Bytes needing to be copied. */
- off_t space_left; /* Bytes to copy from input buffer. */
-
- while (bytes_left > 0)
- {
- if (input_size == 0)
- tape_fill_input_buffer (in_des, io_block_size);
- if (bytes_left < input_size)
- space_left = bytes_left;
- else
- space_left = input_size;
- memcpy (in_buf, in_buff, (unsigned) space_left);
- in_buff += space_left;
- in_buf += space_left;
- input_size -= space_left;
- bytes_left -= space_left;
- }
-}
-
-/* Copy the the next NUM_BYTES bytes of `input_buffer' into PEEK_BUF.
- If NUM_BYTES bytes are not available, read the next `io_block_size' bytes
- into the end of `input_buffer' and update `input_size'.
-
- Return the number of bytes copied into PEEK_BUF.
- If the number of bytes returned is less than NUM_BYTES,
- then EOF has been reached. */
-
-int
-tape_buffered_peek (char *peek_buf, int in_des, int num_bytes)
-{
- long tmp_input_size;
- long got_bytes;
- char *append_buf;
-
-#ifdef BROKEN_LONG_TAPE_DRIVER
- /* Some tape drivers seem to have a signed internal seek pointer and
- they lose if it overflows and becomes negative (e.g. when writing
- tapes > 4Gb). Doing an lseek (des, 0, SEEK_SET) seems to reset the
- seek pointer and prevent it from overflowing. */
- if (input_is_special
- && ( (input_bytes_before_lseek += num_bytes) >= 1073741824L) )
- {
- lseek(in_des, 0L, SEEK_SET);
- input_bytes_before_lseek = 0;
- }
-#endif
-
- while (input_size < num_bytes)
- {
- append_buf = in_buff + input_size;
- if ( (append_buf - input_buffer) >= input_buffer_size)
- {
- /* We can keep up to 2 "blocks" (either the physical block size
- or 512 bytes(the size of a tar record), which ever is
- larger) in the input buffer when we are peeking. We
- assume that our caller will never be interested in peeking
- ahead at more than 512 bytes, so we know that by the time
- we need a 3rd "block" in the buffer we can throw away the
- first block to make room. */
- int half;
- half = input_buffer_size / 2;
- memmove (input_buffer, input_buffer + half, half);
- in_buff = in_buff - half;
- append_buf = append_buf - half;
- }
- tmp_input_size = rmtread (in_des, append_buf, io_block_size);
- if (tmp_input_size == 0)
- {
- if (input_is_special)
- {
- get_next_reel (in_des);
- tmp_input_size = rmtread (in_des, append_buf, io_block_size);
- }
- else
- break;
- }
- if (tmp_input_size < 0)
- error (1, errno, _("read error"));
- input_bytes += tmp_input_size;
- input_size += tmp_input_size;
- }
- if (num_bytes <= input_size)
- got_bytes = num_bytes;
- else
- got_bytes = input_size;
- memcpy (peek_buf, in_buff, (unsigned) got_bytes);
- return got_bytes;
-}
-
-/* Skip the next NUM_BYTES bytes of file descriptor IN_DES. */
-
-void
-tape_toss_input (int in_des, off_t num_bytes)
-{
- off_t bytes_left = num_bytes; /* Bytes needing to be copied. */
- off_t space_left; /* Bytes to copy from input buffer. */
-
- while (bytes_left > 0)
- {
- if (input_size == 0)
- tape_fill_input_buffer (in_des, io_block_size);
- if (bytes_left < input_size)
- space_left = bytes_left;
- else
- space_left = input_size;
-
- if (crc_i_flag && only_verify_crc_flag)
- {
- int k;
- for (k = 0; k < space_left; ++k)
- crc += in_buff[k] & 0xff;
- }
-
- in_buff += space_left;
- input_size -= space_left;
- bytes_left -= space_left;
- }
-}
-
-void
-write_nuls_to_file (off_t num_bytes, int out_des,
- void (*writer) (char *in_buf, int out_des, off_t num_bytes))
-{
- off_t blocks;
- off_t extra_bytes;
- off_t i;
- static char zeros_512[512];
-
- blocks = num_bytes / sizeof zeros_512;
- extra_bytes = num_bytes % sizeof zeros_512;
- for (i = 0; i < blocks; ++i)
- writer (zeros_512, out_des, sizeof zeros_512);
- if (extra_bytes)
- writer (zeros_512, out_des, extra_bytes);
-}
-
-/* Copy a file using the input and output buffers, which may start out
- partly full. After the copy, the files are not closed nor the last
- block flushed to output, and the input buffer may still be partly
- full. If `crc_i_flag' is set, add each byte to `crc'.
- IN_DES is the file descriptor for input;
- OUT_DES is the file descriptor for output;
- NUM_BYTES is the number of bytes to copy. */
-
-void
-copy_files_tape_to_disk (int in_des, int out_des, off_t num_bytes)
-{
- long size;
- long k;
-
- while (num_bytes > 0)
- {
- if (input_size == 0)
- tape_fill_input_buffer (in_des, io_block_size);
- size = (input_size < num_bytes) ? input_size : num_bytes;
- if (crc_i_flag)
- {
- for (k = 0; k < size; ++k)
- crc += in_buff[k] & 0xff;
- }
- disk_buffered_write (in_buff, out_des, size);
- num_bytes -= size;
- input_size -= size;
- in_buff += size;
- }
-}
-/* Copy a file using the input and output buffers, which may start out
- partly full. After the copy, the files are not closed nor the last
- block flushed to output, and the input buffer may still be partly
- full. If `crc_i_flag' is set, add each byte to `crc'.
- IN_DES is the file descriptor for input;
- OUT_DES is the file descriptor for output;
- NUM_BYTES is the number of bytes to copy. */
-
-void
-copy_files_disk_to_tape (int in_des, int out_des, off_t num_bytes,
- char *filename)
-{
- long size;
- long k;
- int rc;
- off_t original_num_bytes;
-
- original_num_bytes = num_bytes;
-
- while (num_bytes > 0)
- {
- if (input_size == 0)
- if (rc = disk_fill_input_buffer (in_des,
- num_bytes < DISK_IO_BLOCK_SIZE ?
- num_bytes : DISK_IO_BLOCK_SIZE))
- {
- if (rc > 0)
- {
- char buf[UINTMAX_STRSIZE_BOUND];
- error (0, 0,
- ngettext ("File %s shrunk by %s byte, padding with zeros",
- "File %s shrunk by %s bytes, padding with zeros",
- num_bytes),
- filename, STRINGIFY_BIGINT (num_bytes, buf));
- }
- else
- error (0, 0, _("Read error at byte %lld in file %s, padding with zeros"),
- original_num_bytes - num_bytes, filename);
- write_nuls_to_file (num_bytes, out_des, tape_buffered_write);
- break;
- }
- size = (input_size < num_bytes) ? input_size : num_bytes;
- if (crc_i_flag)
- {
- for (k = 0; k < size; ++k)
- crc += in_buff[k] & 0xff;
- }
- tape_buffered_write (in_buff, out_des, size);
- num_bytes -= size;
- input_size -= size;
- in_buff += size;
- }
-}
-/* Copy a file using the input and output buffers, which may start out
- partly full. After the copy, the files are not closed nor the last
- block flushed to output, and the input buffer may still be partly
- full. If `crc_i_flag' is set, add each byte to `crc'.
- IN_DES is the file descriptor for input;
- OUT_DES is the file descriptor for output;
- NUM_BYTES is the number of bytes to copy. */
-
-void
-copy_files_disk_to_disk (int in_des, int out_des, off_t num_bytes,
- char *filename)
-{
- long size;
- long k;
- off_t original_num_bytes;
- int rc;
-
- original_num_bytes = num_bytes;
- while (num_bytes > 0)
- {
- if (input_size == 0)
- if (rc = disk_fill_input_buffer (in_des, num_bytes))
- {
- if (rc > 0)
- {
- char buf[UINTMAX_STRSIZE_BOUND];
- error (0, 0,
- ngettext ("File %s shrunk by %s byte, padding with zeros",
- "File %s shrunk by %s bytes, padding with zeros",
- num_bytes),
- filename, STRINGIFY_BIGINT (num_bytes, buf));
- }
- else
- error (0, 0, _("Read error at byte %lld in file %s, padding with zeros"),
- original_num_bytes - num_bytes, filename);
- write_nuls_to_file (num_bytes, out_des, disk_buffered_write);
- break;
- }
- size = (input_size < num_bytes) ? input_size : num_bytes;
- if (crc_i_flag)
- {
- for (k = 0; k < size; ++k)
- crc += in_buff[k] & 0xff;
- }
- disk_buffered_write (in_buff, out_des, size);
- num_bytes -= size;
- input_size -= size;
- in_buff += size;
- }
-}
-
-/* Warn if file changed while it was being copied. */
-
-void
-warn_if_file_changed (char *file_name, unsigned long old_file_size,
- off_t old_file_mtime)
-{
- struct stat new_file_stat;
- if ((*xstat) (file_name, &new_file_stat) < 0)
- {
- stat_error (file_name);
- return;
- }
-
- /* Only check growth, shrinkage detected in copy_files_disk_to_{disk,tape}()
- */
- if (new_file_stat.st_size > old_file_size)
- error (0, 0,
- ngettext ("File %s grew, %"PRIuMAX" new byte not copied",
- "File %s grew, %"PRIuMAX" new bytes not copied",
- (long)(new_file_stat.st_size - old_file_size)),
- file_name, (uintmax_t) (new_file_stat.st_size - old_file_size));
-
- else if (new_file_stat.st_mtime != old_file_mtime)
- error (0, 0, _("File %s was modified while being copied"), file_name);
-}
-
-/* Create all directories up to but not including the last part of NAME.
- Do not destroy any nondirectories while creating directories. */
-
-void
-create_all_directories (char *name)
-{
- char *dir;
- int mode;
-#ifdef HPUX_CDF
- int cdf;
-#endif
-
- dir = dir_name (name);
- mode = 0700;
-#ifdef HPUX_CDF
- cdf = islastparentcdf (name);
- if (cdf)
- {
- dir [strlen (dir) - 1] = '\0'; /* remove final + */
- mode = 04700;
- }
-
-#endif
-
- if (dir == NULL)
- error (2, 0, _("virtual memory exhausted"));
-
- if (dir[0] != '.' || dir[1] != '\0')
- make_path (dir, mode, 0700, -1, -1, (char *) NULL);
-
- free (dir);
-}
-
-/* Prepare to append to an archive. We have been in
- process_copy_in, keeping track of the position where
- the last header started in `last_header_start'. Now we
- have the starting position of the last header (the TRAILER!!!
- header, or blank record for tar archives) and we want to start
- writing (appending) over the last header. The last header may
- be in the middle of a block, so to keep the buffering in sync
- we lseek back to the start of the block, read everything up
- to but not including the last header, lseek back to the start
- of the block, and then do a copy_buf_out of what we read.
- Actually, we probably don't have to worry so much about keeping the
- buffering perfect since you can only append to archives that
- are disk files. */
-
-void
-prepare_append (int out_file_des)
-{
- int start_of_header;
- int start_of_block;
- int useful_bytes_in_block;
- char *tmp_buf;
-
- start_of_header = last_header_start;
- /* Figure out how many bytes we will rewrite, and where they start. */
- useful_bytes_in_block = start_of_header % io_block_size;
- start_of_block = start_of_header - useful_bytes_in_block;
-
- if (lseek (out_file_des, start_of_block, SEEK_SET) < 0)
- error (1, errno, _("cannot seek on output"));
- if (useful_bytes_in_block > 0)
- {
- tmp_buf = (char *) xmalloc (useful_bytes_in_block);
- read (out_file_des, tmp_buf, useful_bytes_in_block);
- if (lseek (out_file_des, start_of_block, SEEK_SET) < 0)
- error (1, errno, _("cannot seek on output"));
- /* fix juo -- is this copy_tape_buf_out? or copy_disk? */
- tape_buffered_write (tmp_buf, out_file_des, useful_bytes_in_block);
- free (tmp_buf);
- }
-
- /* We are done reading the archive, so clear these since they
- will now be used for reading in files that we are appending
- to the archive. */
- input_size = 0;
- input_bytes = 0;
- in_buff = input_buffer;
-}
-
-/* Support for remembering inodes with multiple links. Used in the
- "copy in" and "copy pass" modes for making links instead of copying
- the file. */
-
-struct inode_val
-{
- unsigned long inode;
- unsigned long major_num;
- unsigned long minor_num;
- char *file_name;
-};
-
-/* Inode hash table. Allocated by first call to add_inode. */
-static Hash_table *hash_table = NULL;
-
-static size_t
-inode_val_hasher (const void *val, size_t n_buckets)
-{
- const struct inode_val *ival = val;
- return ival->inode % n_buckets;
-}
-
-static bool
-inode_val_compare (const void *val1, const void *val2)
-{
- const struct inode_val *ival1 = val1;
- const struct inode_val *ival2 = val2;
- return ival1->inode == ival2->inode
- && ival1->major_num == ival2->major_num
- && ival1->minor_num == ival2->minor_num;
-}
-
-char *
-find_inode_file (unsigned long node_num, unsigned long major_num,
- unsigned long minor_num)
-{
- struct inode_val sample;
- struct inode_val *ival;
-
- if (!hash_table)
- return NULL;
-
- sample.inode = node_num;
- sample.major_num = major_num;
- sample.minor_num = minor_num;
- ival = hash_lookup (hash_table, &sample);
- return ival ? ival->file_name : NULL;
-}
-
-/* Associate FILE_NAME with the inode NODE_NUM. (Insert into hash table.) */
-
-void
-add_inode (unsigned long node_num, char *file_name, unsigned long major_num,
- unsigned long minor_num)
-{
- struct inode_val *temp;
- struct inode_val *e;
-
- /* Create new inode record. */
- temp = (struct inode_val *) xmalloc (sizeof (struct inode_val));
- temp->inode = node_num;
- temp->major_num = major_num;
- temp->minor_num = minor_num;
- temp->file_name = xstrdup (file_name);
-
- if (!((hash_table
- || (hash_table = hash_initialize (0, 0, inode_val_hasher,
- inode_val_compare, 0)))
- && (e = hash_insert (hash_table, temp))))
- xalloc_die ();
- /* FIXME: e is not used */
-}
-
-
-/* Open FILE in the mode specified by the command line options
- and return an open file descriptor for it,
- or -1 if it can't be opened. */
-
-int
-open_archive (char *file)
-{
- int fd;
- void (*copy_in) (); /* Workaround for pcc bug. */
-
- copy_in = process_copy_in;
-
- if (copy_function == copy_in)
- fd = rmtopen (file, O_RDONLY | O_BINARY, MODE_RW, rsh_command_option);
- else
- {
- if (!append_flag)
- fd = rmtopen (file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, MODE_RW,
- rsh_command_option);
- else
- fd = rmtopen (file, O_RDWR | O_BINARY, MODE_RW, rsh_command_option);
- }
-
- return fd;
-}
-
-/* Attempt to rewind the tape drive on file descriptor TAPE_DES
- and take it offline. */
-
-void
-tape_offline (int tape_des)
-{
-#if defined(MTIOCTOP) && defined(MTOFFL)
- struct mtop control;
-
- control.mt_op = MTOFFL;
- control.mt_count = 1;
- rmtioctl (tape_des, MTIOCTOP, (char*) &control); /* Don't care if it fails. */
-#endif
-}
-
-/* The file on file descriptor TAPE_DES is assumed to be magnetic tape
- (or floppy disk or other device) and the end of the medium
- has been reached. Ask the user for to mount a new "tape" to continue
- the processing. If the user specified the device name on the
- command line (with the -I, -O, -F or --file options), then we can
- automatically re-open the same device to use the next medium. If the
- user did not specify the device name, then we have to ask them which
- device to use. */
-
-void
-get_next_reel (int tape_des)
-{
- static int reel_number = 1;
- FILE *tty_in; /* File for interacting with user. */
- FILE *tty_out; /* File for interacting with user. */
- int old_tape_des;
- char *next_archive_name;
- dynamic_string new_name;
- char *str_res;
-
- ds_init (&new_name, 128);
-
- /* Open files for interactive communication. */
- tty_in = fopen (TTY_NAME, "r");
- if (tty_in == NULL)
- error (2, errno, TTY_NAME);
- tty_out = fopen (TTY_NAME, "w");
- if (tty_out == NULL)
- error (2, errno, TTY_NAME);
-
- old_tape_des = tape_des;
- tape_offline (tape_des);
- rmtclose (tape_des);
-
- /* Give message and wait for carrage return. User should hit carrage return
- only after loading the next tape. */
- ++reel_number;
- if (new_media_message)
- fprintf (tty_out, "%s", new_media_message);
- else if (new_media_message_with_number)
- fprintf (tty_out, "%s%d%s", new_media_message_with_number, reel_number,
- new_media_message_after_number);
- else if (archive_name)
- fprintf (tty_out, _("Found end of tape. Load next tape and press RETURN. "));
- else
- fprintf (tty_out, _("Found end of tape. To continue, type device/file name when ready.\n"));
-
- fflush (tty_out);
-
- if (archive_name)
- {
- int c;
-
- do
- c = getc (tty_in);
- while (c != EOF && c != '\n');
-
- tape_des = open_archive (archive_name);
- if (tape_des == -1)
- open_error (archive_name);
- }
- else
- {
- do
- {
- if (tape_des < 0)
- {
- fprintf (tty_out,
- _("To continue, type device/file name when ready.\n"));
- fflush (tty_out);
- }
-
- str_res = ds_fgets (tty_in, &new_name);
- if (str_res == NULL || str_res[0] == '\0')
- exit (1);
- next_archive_name = str_res;
-
- tape_des = open_archive (next_archive_name);
- if (tape_des == -1)
- open_error (next_archive_name);
- }
- while (tape_des < 0);
- }
-
- /* We have to make sure that `tape_des' has not changed its value even
- though we closed it and reopened it, since there are local
- copies of it in other routines. This works fine on Unix (even with
- rmtread and rmtwrite) since open will always return the lowest
- available file descriptor and we haven't closed any files (e.g.,
- stdin, stdout or stderr) that were opened before we originally opened
- the archive. */
-
- if (tape_des != old_tape_des)
- error (1, 0, _("internal error: tape descriptor changed from %d to %d"),
- old_tape_des, tape_des);
-
- free (new_name.ds_string);
- fclose (tty_in);
- fclose (tty_out);
-}
-
-/* If MESSAGE does not contain the string "%d", make `new_media_message'
- a copy of MESSAGE. If MESSAGES does contain the string "%d", make
- `new_media_message_with_number' a copy of MESSAGE up to, but
- not including, the string "%d", and make `new_media_message_after_number'
- a copy of MESSAGE after the string "%d". */
-
-void
-set_new_media_message (char *message)
-{
- char *p;
- int prev_was_percent;
-
- p = message;
- prev_was_percent = 0;
- while (*p != '\0')
- {
- if (*p == 'd' && prev_was_percent)
- break;
- prev_was_percent = (*p == '%');
- ++p;
- }
- if (*p == '\0')
- {
- new_media_message = xstrdup (message);
- }
- else
- {
- int length = p - message - 1;
-
- new_media_message_with_number = xmalloc (length + 1);
- strncpy (new_media_message_with_number, message, length);
- new_media_message_with_number[length] = '\0';
- length = strlen (p + 1);
- new_media_message_after_number = xmalloc (length + 1);
- strcpy (new_media_message_after_number, p + 1);
- }
-}
-
-#ifdef SYMLINK_USES_UMASK
-/* Most machines always create symlinks with rwxrwxrwx protection,
- but some (HP/UX 8.07; maybe DEC's OSF on MIPS, too?) use the
- umask when creating symlinks, so if your umask is 022 you end
- up with rwxr-xr-x symlinks (although HP/UX seems to completely
- ignore the protection). There doesn't seem to be any way to
- manipulate the modes once the symlinks are created (e.g.
- a hypothetical "lchmod"), so to create them with the right
- modes we have to set the umask first. */
-
-int
-umasked_symlink (char *name1, char *name2, int mode)
-{
- int old_umask;
- int rc;
- mode = ~(mode & 0777) & 0777;
- old_umask = umask (mode);
- rc = symlink (name1, name2);
- umask (old_umask);
- return rc;
-}
-#endif /* SYMLINK_USES_UMASK */
-
-#ifdef HPUX_CDF
-/* When we create a cpio archive we mark CDF's by putting an extra `/'
- after their component name so we can distinguish the CDF's when we
- extract the archive (in case the "hidden" directory's files appear
- in the archive before the directory itself). E.g., in the path
- "a/b+/c", if b+ is a CDF, we will write this path as "a/b+//c" in
- the archive so when we extract the archive we will know that b+
- is actually a CDF, and not an ordinary directory whose name happens
- to end in `+'. We also do the same thing internally in copypass.c. */
-
-
-/* Take an input pathname and check it for CDF's. Insert an extra
- `/' in the pathname after each "hidden" directory. If we add
- any `/'s, return a malloced string instead of the original input
- string.
- FIXME: This creates a memory leak.
-*/
-
-char *
-add_cdf_double_slashes (char *input_name)
-{
- static char *ret_name = NULL; /* re-usuable return buffer (malloc'ed) */
- static int ret_size = -1; /* size of return buffer. */
- char *p;
- char *q;
- int n;
- struct stat dir_stat;
-
- /* Search for a `/' preceeded by a `+'. */
-
- for (p = input_name; *p != '\0'; ++p)
- {
- if ( (*p == '+') && (*(p + 1) == '/') )
- break;
- }
-
- /* If we didn't find a `/' preceeded by a `+' then there are
- no CDF's in this pathname. Return the original pathname. */
-
- if (*p == '\0')
- return input_name;
-
- /* There was a `/' preceeded by a `+' in the pathname. If it is a CDF
- then we will need to copy the input pathname to our return
- buffer so we can insert the extra `/'s. Since we can't tell
- yet whether or not it is a CDF we will just always copy the
- string to the return buffer. First we have to make sure the
- buffer is large enough to hold the string and any number of
- extra `/'s we might add. */
-
- n = 2 * (strlen (input_name) + 1);
- if (n >= ret_size)
- {
- if (ret_size < 0)
- ret_name = (char *) malloc (n);
- else
- ret_name = (char *)realloc (ret_name, n);
- ret_size = n;
- }
-
- /* Clear the `/' after this component, so we can stat the pathname
- up to and including this component. */
- ++p;
- *p = '\0';
- if ((*xstat) (input_name, &dir_stat) < 0)
- {
- stat_error (input_name);
- return input_name;
- }
-
- /* Now put back the `/' after this component and copy the pathname up to
- and including this component and its trailing `/' to the return
- buffer. */
- *p++ = '/';
- strncpy (ret_name, input_name, p - input_name);
- q = ret_name + (p - input_name);
-
- /* If it was a CDF, add another `/'. */
- if (S_ISDIR (dir_stat.st_mode) && (dir_stat.st_mode & 04000) )
- *q++ = '/';
-
- /* Go through the rest of the input pathname, copying it to the
- return buffer, and adding an extra `/' after each CDF. */
- while (*p != '\0')
- {
- if ( (*p == '+') && (*(p + 1) == '/') )
- {
- *q++ = *p++;
-
- *p = '\0';
- if ((*xstat) (input_name, &dir_stat) < 0)
- {
- stat_error (input_name);
- return input_name;
- }
- *p = '/';
-
- if (S_ISDIR (dir_stat.st_mode) && (dir_stat.st_mode & 04000) )
- *q++ = '/';
- }
- *q++ = *p++;
- }
- *q = '\0';
-
- return ret_name;
-}
-
-/* Is the last parent directory (e.g., c in a/b/c/d) a CDF? If the
- directory name ends in `+' and is followed by 2 `/'s instead of 1
- then it is. This is only the case for cpio archives, but we don't
- have to worry about tar because tar always has the directory before
- its files (or else we lose). */
-int
-islastparentcdf (char *path)
-{
- char *newpath;
- char *slash;
- int slash_count;
- int length; /* Length of result, not including NUL. */
-
- slash = strrchr (path, '/');
- if (slash == 0)
- return 0;
- else
- {
- slash_count = 0;
- while (slash > path && *slash == '/')
- {
- ++slash_count;
- --slash;
- }
-
-
- if ( (*slash == '+') && (slash_count >= 2) )
- return 1;
- }
- return 0;
-}
-#endif
-
-#define DISKBLOCKSIZE (512)
-
-static int
-buf_all_zeros (char *buf, int bufsize)
-{
- int i;
- for (i = 0; i < bufsize; ++i)
- {
- if (*buf++ != '\0')
- return 0;
- }
- return 1;
-}
-
-int delayed_seek_count = 0;
-
-/* Write NBYTE bytes from BUF to remote tape connection FILDES.
- Return the number of bytes written on success, -1 on error. */
-
-static int
-sparse_write (int fildes, char *buf, unsigned int nbyte)
-{
- int complete_block_count;
- int leftover_bytes_count;
- int seek_count;
- int write_count;
- char *cur_write_start;
- int lseek_rc;
- int write_rc;
- int i;
- enum { begin, in_zeros, not_in_zeros } state;
-
- complete_block_count = nbyte / DISKBLOCKSIZE;
- leftover_bytes_count = nbyte % DISKBLOCKSIZE;
-
- if (delayed_seek_count != 0)
- state = in_zeros;
- else
- state = begin;
-
- seek_count = delayed_seek_count;
-
- for (i = 0; i < complete_block_count; ++i)
- {
- switch (state)
- {
- case begin :
- if (buf_all_zeros (buf, DISKBLOCKSIZE))
- {
- seek_count = DISKBLOCKSIZE;
- state = in_zeros;
- }
- else
- {
- cur_write_start = buf;
- write_count = DISKBLOCKSIZE;
- state = not_in_zeros;
- }
- buf += DISKBLOCKSIZE;
- break;
-
- case in_zeros :
- if (buf_all_zeros (buf, DISKBLOCKSIZE))
- {
- seek_count += DISKBLOCKSIZE;
- }
- else
- {
- lseek (fildes, seek_count, SEEK_CUR);
- cur_write_start = buf;
- write_count = DISKBLOCKSIZE;
- state = not_in_zeros;
- }
- buf += DISKBLOCKSIZE;
- break;
-
- case not_in_zeros :
- if (buf_all_zeros (buf, DISKBLOCKSIZE))
- {
- write_rc = write (fildes, cur_write_start, write_count);
- seek_count = DISKBLOCKSIZE;
- state = in_zeros;
- }
- else
- {
- write_count += DISKBLOCKSIZE;
- }
- buf += DISKBLOCKSIZE;
- break;
- }
- }
-
- switch (state)
- {
- case begin :
- case in_zeros :
- delayed_seek_count = seek_count;
- break;
-
- case not_in_zeros :
- write_rc = write (fildes, cur_write_start, write_count);
- delayed_seek_count = 0;
- break;
- }
-
- if (leftover_bytes_count != 0)
- {
- if (delayed_seek_count != 0)
- {
- lseek_rc = lseek (fildes, delayed_seek_count, SEEK_CUR);
- delayed_seek_count = 0;
- }
- write_rc = write (fildes, buf, leftover_bytes_count);
- }
- return nbyte;
-}
-
-#define CPIO_UID(uid) (set_owner_flag ? set_owner : (uid))
-#define CPIO_GID(gid) (set_group_flag ? set_group : (gid))
-
-void
-stat_to_cpio (struct cpio_file_stat *hdr, struct stat *st)
-{
- hdr->c_dev_maj = major (st->st_dev);
- hdr->c_dev_min = minor (st->st_dev);
- hdr->c_ino = st->st_ino;
- /* For POSIX systems that don't define the S_IF macros,
- we can't assume that S_ISfoo means the standard Unix
- S_IFfoo bit(s) are set. So do it manually, with a
- different name. Bleah. */
- hdr->c_mode = (st->st_mode & 07777);
- if (S_ISREG (st->st_mode))
- hdr->c_mode |= CP_IFREG;
- else if (S_ISDIR (st->st_mode))
- hdr->c_mode |= CP_IFDIR;
-#ifdef S_ISBLK
- else if (S_ISBLK (st->st_mode))
- hdr->c_mode |= CP_IFBLK;
-#endif
-#ifdef S_ISCHR
- else if (S_ISCHR (st->st_mode))
- hdr->c_mode |= CP_IFCHR;
-#endif
-#ifdef S_ISFIFO
- else if (S_ISFIFO (st->st_mode))
- hdr->c_mode |= CP_IFIFO;
-#endif
-#ifdef S_ISLNK
- else if (S_ISLNK (st->st_mode))
- hdr->c_mode |= CP_IFLNK;
-#endif
-#ifdef S_ISSOCK
- else if (S_ISSOCK (st->st_mode))
- hdr->c_mode |= CP_IFSOCK;
-#endif
-#ifdef S_ISNWK
- else if (S_ISNWK (st->st_mode))
- hdr->c_mode |= CP_IFNWK;
-#endif
- hdr->c_uid = CPIO_UID (st->st_uid);
- hdr->c_gid = CPIO_GID (st->st_gid);
- hdr->c_nlink = st->st_nlink;
- hdr->c_rdev_maj = major (st->st_rdev);
- hdr->c_rdev_min = minor (st->st_rdev);
- hdr->c_mtime = st->st_mtime;
- hdr->c_filesize = st->st_size;
- hdr->c_chksum = 0;
- hdr->c_tar_linkname = NULL;
-}
-
-#ifndef HAVE_FCHOWN
-# define fchown(fd, uid, gid) (-1)
-#endif
-
-int
-fchown_or_chown (int fd, const char *name, uid_t uid, uid_t gid)
-{
- if (HAVE_FCHOWN && fd != -1)
- return fchown (fd, uid, gid);
- else
- return chown (name, uid, gid);
-}
-
-int
-fchmod_or_chmod (int fd, const char *name, mode_t mode)
-{
- if (HAVE_FCHMOD && fd != -1)
- return fchmod (fd, mode);
- else
- return chmod(name, mode);
-}
-
-void
-set_perms (int fd, struct cpio_file_stat *header)
-{
- if (!no_chown_flag)
- {
- uid_t uid = CPIO_UID (header->c_uid);
- gid_t gid = CPIO_GID (header->c_gid);
- if ((fchown_or_chown (fd, header->c_name, uid, gid) < 0)
- && errno != EPERM)
- chown_error_details (header->c_name, uid, gid);
- }
- /* chown may have turned off some permissions we wanted. */
- if (fchmod_or_chmod (fd, header->c_name, header->c_mode) < 0)
- chmod_error_details (header->c_name, header->c_mode);
-#ifdef HPUX_CDF
- if ((header->c_mode & CP_IFMT) && cdf_flag)
- /* Once we "hide" the directory with the chmod(),
- we have to refer to it using name+ instead of name. */
- file_hdr->c_name [cdf_char] = '+';
-#endif
- if (retain_time_flag)
- set_file_times (fd, header->c_name, header->c_mtime, header->c_mtime);
-}
-
-void
-set_file_times (int fd,
- const char *name, unsigned long atime, unsigned long mtime)
-{
- struct timespec ts[2];
-
- memset (&ts, 0, sizeof ts);
-
- ts[0].tv_sec = atime;
- ts[1].tv_sec = mtime;
-
- /* Silently ignore EROFS because reading the file won't have upset its
- timestamp if it's on a read-only filesystem. */
- if (gl_futimens (fd, name, ts) < 0 && errno != EROFS)
- utime_error (name);
-}
-
-/* Do we have to ignore absolute paths, and if so, does the filename
- have an absolute path? */
-void
-cpio_safer_name_suffix (char *name, bool link_target, bool absolute_names,
- bool strip_leading_dots)
-{
- char *p = safer_name_suffix (name, link_target, absolute_names);
- if (strip_leading_dots && strcmp (p, "./"))
- /* strip leading `./' from the filename. */
- while (*p == '.' && *(p + 1) == '/')
- {
- ++p;
- while (*p == '/')
- ++p;
- }
- if (p != name)
- memmove (name, p, (size_t)(strlen (p) + 1));
-}
-
--- contrib/cpio/src/main.c
+++ /dev/null
@@ -1,800 +0,0 @@
-/* main.c - main program and argument processing for cpio.
- Copyright (C) 1990, 1991, 1992, 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. */
-
-/* Written by Phil Nelson <phil at cs.wwu.edu>,
- David MacKenzie <djm at gnu.ai.mit.edu>,
- John Oleynick <juo at klinzhai.rutgers.edu>,
- and Sergey Poznyakoff <gray at mirddin.farlep.net> */
-
-#include <system.h>
-#include <paxlib.h>
-
-#include <stdio.h>
-#include <getopt.h>
-#include <argp.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
-
-#include "filetypes.h"
-#include "cpiohdr.h"
-#include "dstring.h"
-#include "extern.h"
-#include <rmt.h>
-#include <rmt-command.h>
-
-enum cpio_options {
- NO_ABSOLUTE_FILENAMES_OPTION=256,
- ABSOLUTE_FILENAMES_OPTION,
- NO_PRESERVE_OWNER_OPTION,
- ONLY_VERIFY_CRC_OPTION,
- RENAME_BATCH_FILE_OPTION,
- RSH_COMMAND_OPTION,
- QUIET_OPTION,
- SPARSE_OPTION,
- FORCE_LOCAL_OPTION,
- DEBUG_OPTION,
- BLOCK_SIZE_OPTION,
- TO_STDOUT_OPTION,
-
- HANG_OPTION,
- USAGE_OPTION,
- LICENSE_OPTION,
- VERSION_OPTION
-};
-
-const char *argp_program_version = "cpio (" PACKAGE_NAME ") " VERSION;
-const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
-static char doc[] = N_("GNU `cpio' copies files to and from archives\n\
-\n\
-Examples:\n\
- # Copy files named in name-list to the archive\n\
- cpio -o < name-list [> archive]\n\
- # Extract files from the archive\n\
- cpio -i [< archive]\n\
- # Copy files named in name-list to destination-directory\n\
- cpio -p destination-directory < name-list\n");
-
-/* Print usage error message and exit with error. */
-
-#define CHECK_USAGE(cond, opt, mode_opt) \
- if (cond) \
- ERROR((PAXEXIT_FAILURE, 0, _("%s is meaningless with %s"), opt, mode_opt));
-
-static struct argp_option options[] = {
- /* ********** */
-#define GRID 10
- {NULL, 0, NULL, 0,
- N_("Main operation mode:"), GRID },
- {"create", 'o', 0, 0,
- N_("Create the archive (run in copy-out mode)"), GRID },
- {"extract", 'i', 0, 0,
- N_("Extract files from an archive (run in copy-in mode)"), GRID },
- {"pass-through", 'p', 0, 0,
- N_("Run in copy-pass mode"), GRID },
- {"list", 't', 0, 0,
- N_("Print a table of contents of the input"), GRID },
-#undef GRID
-
- /* ********** */
-#define GRID 100
- {NULL, 0, NULL, 0,
- N_("Operation modifiers valid in any mode:"), GRID },
-
- {"file", 'F', N_("[[USER@]HOST:]FILE-NAME"), 0,
- N_("Use this FILE-NAME instead of standard input or output. Optional USER and HOST specify the user and host names in case of a remote archive"), GRID+1 },
- {"force-local", FORCE_LOCAL_OPTION, 0, 0,
- N_("Archive file is local, even if its name contains colons"), GRID+1 },
- {"format", 'H', N_("FORMAT"), 0,
- N_("Use given archive FORMAT"), GRID+1 },
- {NULL, 'B', NULL, 0,
- N_("Set the I/O block size to 5120 bytes"), GRID+1 },
- {"block-size", BLOCK_SIZE_OPTION, N_("BLOCK-SIZE"), 0,
- N_("Set the I/O block size to BLOCK-SIZE * 512 bytes"), GRID+1 },
- {NULL, 'c', NULL, 0,
- N_("Use the old portable (ASCII) archive format"), GRID+1 },
- {"dot", 'V', NULL, 0,
- N_("Print a \".\" for each file processed"), GRID+1 },
- {"io-size", 'C', N_("NUMBER"), 0,
- N_("Set the I/O block size to the given NUMBER of bytes"), GRID+1 },
- {"message", 'M', N_("STRING"), 0,
- N_("Print STRING when the end of a volume of the backup media is reached"),
- GRID+1 },
- {"nonmatching", 'f', 0, 0,
- N_("Only copy files that do not match any of the given patterns"), GRID+1 },
- {"numeric-uid-gid", 'n', 0, 0,
- N_("In the verbose table of contents listing, show numeric UID and GID"),
- GRID+1 },
- {"rsh-command", RSH_COMMAND_OPTION, N_("COMMAND"), 0,
- N_("Use remote COMMAND instead of rsh"), GRID+1 },
- {"quiet", QUIET_OPTION, NULL, 0,
- N_("Do not print the number of blocks copied"), GRID+1 },
- {"verbose", 'v', NULL, 0,
- N_("Verbosely list the files processed"), GRID+1 },
-#ifdef DEBUG_CPIO
- {"debug", DEBUG_OPTION, NULL, 0,
- N_("Enable debugging info"), GRID+1 },
-#endif
- {"warning", 'W', N_("FLAG"), 0,
- N_("Control warning display. Currently FLAG is one of 'none', 'truncate', 'all'. Multiple options accumulate."), GRID+1 },
-#undef GRID
-
- /* ********** */
-#define GRID 200
- {NULL, 0, NULL, 0,
- N_("Operation modifiers valid only in copy-in mode:"), GRID },
- {"pattern-file", 'E', N_("FILE"), 0,
- N_("Read additional patterns specifying filenames to extract or list from FILE"), 210},
- {"only-verify-crc", ONLY_VERIFY_CRC_OPTION, 0, 0,
- N_("When reading a CRC format archive, only verify the CRC's of each file in the archive, don't actually extract the files"), 210},
- {"rename", 'r', 0, 0,
- N_("Interactively rename files"), GRID+1 },
- {"rename-batch-file", RENAME_BATCH_FILE_OPTION, N_("FILE"), OPTION_HIDDEN,
- "", GRID+1 },
- {"swap", 'b', NULL, 0,
- N_("Swap both halfwords of words and bytes of halfwords in the data. Equivalent to -sS"), GRID+1 },
- {"swap-bytes", 's', NULL, 0,
- N_("Swap the bytes of each halfword in the files"), GRID+1 },
- {"swap-halfwords", 'S', NULL, 0,
- N_("Swap the halfwords of each word (4 bytes) in the files"),
- GRID+1 },
- {"to-stdout", TO_STDOUT_OPTION, NULL, 0,
- N_("Extract files to standard output"), GRID+1 },
-#undef GRID
-
- /* ********** */
-#define GRID 300
- {NULL, 0, NULL, 0,
- N_("Operation modifiers valid only in copy-out mode:"), GRID },
- {"append", 'A', 0, 0,
- N_("Append to an existing archive."), GRID+1 },
- {NULL, 'O', N_("[[USER@]HOST:]FILE-NAME"), 0,
- N_("Archive filename to use instead of standard output. Optional USER and HOST specify the user and host names in case of a remote archive"), GRID+1 },
-#undef GRID
-
- /* ********** */
-#define GRID 400
- {NULL, 0, NULL, 0,
- N_("Operation modifiers valid only in copy-pass mode:"), GRID},
- {"link", 'l', 0, 0,
- N_("Link files instead of copying them, when possible"), GRID+1 },
-
-#undef GRID
-
- /* ********** */
-#define GRID 500
- {NULL, 0, NULL, 0,
- N_("Operation modifiers valid in copy-in and copy-out modes:"), GRID },
- {"absolute-filenames", ABSOLUTE_FILENAMES_OPTION, 0, 0,
- N_("Do not strip file system prefix components from the file names"),
- GRID+1 },
- {"no-absolute-filenames", NO_ABSOLUTE_FILENAMES_OPTION, 0, 0,
- N_("Create all files relative to the current directory"), GRID+1 },
-#undef GRID
- /* ********** */
-#define GRID 600
- {NULL, 0, NULL, 0,
- N_("Operation modifiers valid in copy-out and copy-pass modes:"), GRID },
- {"null", '0', 0, 0,
- N_("A list of filenames is terminated by a null character instead of a newline"), GRID+1 },
- {NULL, 'I', N_("[[USER@]HOST:]FILE-NAME"), 0,
- N_("Archive filename to use instead of standard input. Optional USER and HOST specify the user and host names in case of a remote archive"), GRID+1 },
- {"dereference", 'L', 0, 0,
- N_("Dereference symbolic links (copy the files that they point to instead of copying the links)."), GRID+1 },
- {"owner", 'R', N_("[USER][:.][GROUP]"), 0,
- N_("Set the ownership of all files created to the specified USER and/or GROUP"), GRID+1 },
- {"reset-access-time", 'a', NULL, 0,
- N_("Reset the access times of files after reading them"), GRID+1 },
-
-#undef GRID
- /* ********** */
-#define GRID 700
- {NULL, 0, NULL, 0,
- N_("Operation modifiers valid in copy-in and copy-pass modes:"), GRID },
- {"preserve-modification-time", 'm', 0, 0,
- N_("Retain previous file modification times when creating files"), GRID+1 },
- {"make-directories", 'd', 0, 0,
- N_("Create leading directories where needed"), GRID+1 },
- {"no-preserve-owner", NO_PRESERVE_OWNER_OPTION, 0, 0,
- N_("Do not change the ownership of the files"), GRID+1 },
- {"unconditional", 'u', NULL, 0,
- N_("Replace all files unconditionally"), GRID+1 },
- {"sparse", SPARSE_OPTION, NULL, 0,
- N_("Write files with large blocks of zeros as sparse files"), GRID+1 },
-#undef GRID
-
- /* ********** */
-#define GRID 800
- {NULL, 0, NULL, 0,
- N_("Informative options:"), GRID },
-
- {"help", '?', 0, 0, N_("Give this help list"), -1},
- {"usage", USAGE_OPTION, 0, 0, N_("Give a short usage message"), -1},
- {"license", LICENSE_OPTION, 0, 0, N_("Print license and exit"), -1},
- {"version", VERSION_OPTION, 0, 0, N_("Print program version"), -1},
- /* FIXME -V (--dot) conflicts with the default short option for
- --version */
- {"HANG", HANG_OPTION, "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
- N_("hang for SECS seconds (default 3600)"), 0},
-#undef GRID
- {0, 0, 0, 0}
-};
-
-static char *input_archive_name = 0;
-static char *output_archive_name = 0;
-
-static void
-license ()
-{
- printf ("%s (%s) %s\n%s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION,
- "Copyright (C) 2004 Free Software Foundation, Inc.\n");
- printf (_(" GNU cpio is free software; you can redistribute it and/or modify\n"
- " it under the terms of the GNU General Public License as published by\n"
- " the Free Software Foundation; either version 2 of the License, or\n"
- " (at your option) any later version.\n"
- "\n"
- " GNU cpio is distributed in the hope that it will be useful,\n"
- " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- " GNU General Public License for more details.\n"
- "\n"
- " You should have received a copy of the GNU General Public License\n"
- " along with GNU cpio; if not, write to the Free Software Foundation,\n"
- " Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n\n"));
- exit (0);
-}
-
-static int
-warn_control (char *arg)
-{
- static struct warn_tab {
- char *name;
- int flag;
- } warn_tab[] = {
- { "none", CPIO_WARN_ALL },
- { "truncate", CPIO_WARN_TRUNCATE },
- { "all", CPIO_WARN_ALL },
- { NULL }
- };
- struct warn_tab *wt;
- int offset = 0;
-
- if (strcmp (arg, "none") == 0)
- {
- warn_option = 0;
- return 0;
- }
-
- if (strlen (arg) > 2 && memcmp (arg, "no-", 3) == 0)
- offset = 3;
-
- for (wt = warn_tab; wt->name; wt++)
- if (strcmp (arg + offset, wt->name) == 0)
- {
- if (offset)
- warn_option &= ~wt->flag;
- else
- warn_option |= wt->flag;
- return 0;
- }
-
- return 1;
-}
-
-static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
-{
- static volatile int _argp_hang;
- switch (key)
- {
- case '0': /* Read null-terminated filenames. */
- name_end = '\0';
- break;
-
- case 'a': /* Reset access times. */
- reset_time_flag = true;
- break;
-
- case 'A': /* Append to the archive. */
- append_flag = true;
- break;
-
- case 'b': /* Swap bytes and halfwords. */
- swap_bytes_flag = true;
- swap_halfwords_flag = true;
- break;
-
- case 'B': /* Set block size to 5120. */
- io_block_size = 5120;
- break;
-
- case BLOCK_SIZE_OPTION: /* --block-size */
- io_block_size = atoi (arg);
- if (io_block_size < 1)
- error (2, 0, _("invalid block size"));
- io_block_size *= 512;
- break;
-
- case 'c': /* Use the old portable ASCII format. */
- if (archive_format != arf_unknown)
- error (0, EXIT_FAILURE, _("Archive format multiply defined"));
-#ifdef SVR4_COMPAT
- archive_format = arf_newascii; /* -H newc. */
-#else
- archive_format = arf_oldascii; /* -H odc. */
-#endif
- break;
-
- case 'C': /* Block size. */
- io_block_size = atoi (arg);
- if (io_block_size < 1)
- error (2, 0, _("invalid block size"));
- break;
-
- case 'd': /* Create directories where needed. */
- create_dir_flag = true;
- break;
-
- case 'f': /* Only copy files not matching patterns. */
- copy_matching_files = false;
- break;
-
- case 'E': /* Pattern file name. */
- pattern_file_name = arg;
- break;
-
- case 'F': /* Archive file name. */
- archive_name = arg;
- break;
-
- case 'H': /* Header format name. */
- if (archive_format != arf_unknown)
- error (PAXEXIT_FAILURE, 0, _("Archive format multiply defined"));
- if (!strcasecmp (arg, "crc"))
- archive_format = arf_crcascii;
- else if (!strcasecmp (arg, "newc"))
- archive_format = arf_newascii;
- else if (!strcasecmp (arg, "odc"))
- archive_format = arf_oldascii;
- else if (!strcasecmp (arg, "bin"))
- archive_format = arf_binary;
- else if (!strcasecmp (arg, "ustar"))
- archive_format = arf_ustar;
- else if (!strcasecmp (arg, "tar"))
- archive_format = arf_tar;
- else if (!strcasecmp (arg, "hpodc"))
- archive_format = arf_hpoldascii;
- else if (!strcasecmp (arg, "hpbin"))
- archive_format = arf_hpbinary;
- else
- error (2, 0, _("\
-invalid archive format `%s'; valid formats are:\n\
-crc newc odc bin ustar tar (all-caps also recognized)"), arg);
- break;
-
- case 'i': /* Copy-in mode. */
- if (copy_function != 0)
- error (PAXEXIT_FAILURE, 0, _("Mode already defined"));
- copy_function = process_copy_in;
- break;
-
- case 'I': /* Input archive file name. */
- input_archive_name = arg;
- break;
-
- case 'k': /* Handle corrupted archives. We always handle
- corrupted archives, but recognize this
- option for compatability. */
- break;
-
- case 'l': /* Link files when possible. */
- link_flag = true;
- break;
-
- case 'L': /* Dereference symbolic links. */
- xstat = stat;
- break;
-
- case 'm': /* Retain previous file modify times. */
- retain_time_flag = true;
- break;
-
- case 'M': /* New media message. */
- set_new_media_message (arg);
- break;
-
- case 'n': /* Long list owner and group as numbers. */
- numeric_uid = true;
- break;
-
- case NO_ABSOLUTE_FILENAMES_OPTION: /* --no-absolute-filenames */
- no_abs_paths_flag = true;
- break;
-
- case ABSOLUTE_FILENAMES_OPTION: /* --absolute-filenames */
- no_abs_paths_flag = false;
- break;
-
- case NO_PRESERVE_OWNER_OPTION: /* --no-preserve-owner */
- if (set_owner_flag || set_group_flag)
- error (PAXEXIT_FAILURE, 0,
- _("--no-preserve-owner cannot be used with --owner"));
- no_chown_flag = true;
- break;
-
- case 'o': /* Copy-out mode. */
- if (copy_function != 0)
- error (PAXEXIT_FAILURE, 0, _("Mode already defined"));
- copy_function = process_copy_out;
- break;
-
- case 'O': /* Output archive file name. */
- output_archive_name = arg;
- break;
-
- case ONLY_VERIFY_CRC_OPTION:
- only_verify_crc_flag = true;
- break;
-
- case 'p': /* Copy-pass mode. */
- if (copy_function != 0)
- error (PAXEXIT_FAILURE, 0, _("Mode already defined"));
- copy_function = process_copy_pass;
- break;
-
- case RSH_COMMAND_OPTION:
- rsh_command_option = arg;
- break;
-
- case 'r': /* Interactively rename. */
- rename_flag = true;
- break;
-
- case RENAME_BATCH_FILE_OPTION:
- rename_batch_file = arg;
- break;
-
- case QUIET_OPTION:
- quiet_flag = true;
- break;
-
- case 'R': /* Set the owner. */
- if (no_chown_flag)
- error (PAXEXIT_FAILURE, 0,
- _("--owner cannot be used with --no-preserve-owner"));
- else
- {
- char *e, *u, *g;
-
- e = parse_user_spec (arg, &set_owner, &set_group, &u, &g);
- if (e)
- error (PAXEXIT_FAILURE, 0, "%s: %s", arg, e);
- if (u)
- {
- free (u);
- set_owner_flag = true;
- }
- if (g)
- {
- free (g);
- set_group_flag = true;
- }
- }
- break;
-
- case 's': /* Swap bytes. */
- swap_bytes_flag = true;
- break;
-
- case 'S': /* Swap halfwords. */
- swap_halfwords_flag = true;
- break;
-
- case 't': /* Only print a list. */
- table_flag = true;
- break;
-
- case 'u': /* Replace all! Unconditionally! */
- unconditional_flag = true;
- break;
-
- case 'v': /* Verbose! */
- verbose_flag = true;
- break;
-
- case 'V': /* Print `.' for each file. */
- dot_flag = true;
- break;
-
- case 'W':
- if (warn_control (arg))
- argp_error (state, _("Invalid value for --warning option: %s"), arg);
- break;
-
- case SPARSE_OPTION:
- sparse_flag = true;
- break;
-
- case FORCE_LOCAL_OPTION:
- force_local_option = 1;
- break;
-
-#ifdef DEBUG_CPIO
- case DEBUG_OPTION:
- debug_flag = true;
- break;
-#endif
-
- case TO_STDOUT_OPTION:
- to_stdout_option = true;
- break;
-
- case HANG_OPTION:
- _argp_hang = atoi (arg ? arg : "3600");
- while (_argp_hang-- > 0)
- sleep (1);
- break;
-
- case '?':
- argp_state_help (state, state->out_stream, ARGP_HELP_STD_HELP);
- break;
-
- case USAGE_OPTION:
- argp_state_help (state, state->out_stream,
- ARGP_HELP_USAGE | ARGP_HELP_EXIT_OK);
- break;
-
- case VERSION_OPTION:
- fprintf (state->out_stream, "%s\n", argp_program_version);
- exit (0);
-
- case LICENSE_OPTION:
- license ();
- break;
-
- default:
- return ARGP_ERR_UNKNOWN;
- }
- return 0;
-}
-
-static struct argp argp = {
- options,
- parse_opt,
- N_("[destination-directory]"),
- doc,
- NULL,
- NULL,
- NULL
-};
-
-/* Process the arguments. Set all options and set up the copy pass
- directory or the copy in patterns. */
-
-void
-process_args (int argc, char *argv[])
-{
- void (*copy_in) (); /* Work around for pcc bug. */
- void (*copy_out) ();
- int index;
-
- if (argc < 2)
- error (PAXEXIT_FAILURE, 0,
- _("You must specify one of -oipt options.\nTry `%s --help' or `%s --usage' for more information.\n"),
- program_name, program_name);
-
- xstat = lstat;
-
- if (argp_parse (&argp, argc, argv, ARGP_IN_ORDER|ARGP_NO_HELP, &index, NULL))
- exit (1);
-
- /* Do error checking and look at other args. */
-
- if (copy_function == 0)
- {
- if (table_flag)
- copy_function = process_copy_in;
- else
- error (PAXEXIT_FAILURE, 0,
- _("You must specify one of -oipt options.\nTry `%s --help' or `%s --usage' for more information.\n"),
- program_name, program_name);
- }
-
- /* Work around for pcc bug. */
- copy_in = process_copy_in;
- copy_out = process_copy_out;
-
- if (copy_function == copy_in)
- {
- archive_des = 0;
- CHECK_USAGE(link_flag, "--link", "--extract");
- CHECK_USAGE(reset_time_flag, "--reset", "--extract");
- CHECK_USAGE(xstat != lstat, "--dereference", "--extract");
- CHECK_USAGE(append_flag, "--append", "--extract");
- CHECK_USAGE(output_archive_name, "-O", "--extract");
- if (to_stdout_option)
- {
- CHECK_USAGE(create_dir_flag, "--make-directories", "--to-stdout");
- CHECK_USAGE(rename_flag, "--rename", "--to-stdout");
- CHECK_USAGE(no_chown_flag, "--no-preserve-owner", "--to-stdout");
- CHECK_USAGE(set_owner_flag||set_group_flag, "--owner", "--to-stdout");
- CHECK_USAGE(retain_time_flag, "--preserve-modification-time",
- "--to-stdout");
- }
-
- if (archive_name && input_archive_name)
- error (PAXEXIT_FAILURE, 0,
- _("Both -I and -F are used in copy-in mode"));
-
- if (archive_format == arf_crcascii)
- crc_i_flag = true;
- num_patterns = argc - index;
- save_patterns = &argv[index];
- if (input_archive_name)
- archive_name = input_archive_name;
- }
- else if (copy_function == copy_out)
- {
- if (index != argc)
- error (PAXEXIT_FAILURE, 0, _("Too many arguments"));
-
- archive_des = 1;
- CHECK_USAGE(create_dir_flag, "--make-directories", "--create");
- CHECK_USAGE(rename_flag, "--rename", "--create");
- CHECK_USAGE(table_flag, "--list", "--create");
- CHECK_USAGE(unconditional_flag, "--unconditional", "--create");
- CHECK_USAGE(link_flag, "--link", "--create");
- CHECK_USAGE(sparse_flag, "--sparse", "--create");
- CHECK_USAGE(retain_time_flag, "--preserve-modification-time",
- "--create");
- CHECK_USAGE(no_chown_flag, "--no-preserve-owner", "--create");
- CHECK_USAGE(swap_bytes_flag, "--swap-bytes (--swap)", "--create");
- CHECK_USAGE(swap_halfwords_flag, "--swap-halfwords (--swap)",
- "--create");
- CHECK_USAGE(to_stdout_option, "--to-stdout", "--create");
-
- if (append_flag && !(archive_name || output_archive_name))
- error (PAXEXIT_FAILURE, 0,
- _("--append is used but no archive file name is given (use -F or -O options)"));
-
- CHECK_USAGE(rename_batch_file, "--rename-batch-file", "--create");
- CHECK_USAGE(input_archive_name, "-I", "--create");
- if (archive_name && output_archive_name)
- error (PAXEXIT_FAILURE, 0,
- _("Both -O and -F are used in copy-out mode"));
-
- if (archive_format == arf_unknown)
- archive_format = arf_binary;
- if (output_archive_name)
- archive_name = output_archive_name;
- }
- else
- {
- /* Copy pass. */
- if (index < argc - 1)
- error (PAXEXIT_FAILURE, 0, _("Too many arguments"));
- else if (index > argc - 1)
- error (PAXEXIT_FAILURE, 0, _("Not enough arguments"));
-
- if (archive_format != arf_unknown)
- error (PAXEXIT_FAILURE, 0,
- _("Archive format is not specified in copy-pass mode (use --format option)"));
-
- CHECK_USAGE(swap_bytes_flag, "--swap-bytes (--swap)", "--pass-through");
- CHECK_USAGE(swap_halfwords_flag, "--swap-halfwords (--swap)",
- "--pass-through");
- CHECK_USAGE(table_flag, "--list", "--pass-through");
- CHECK_USAGE(rename_flag, "--rename", "--pass-through");
- CHECK_USAGE(append_flag, "--append", "--pass-through");
- CHECK_USAGE(rename_batch_file, "--rename-batch-file", "--pass-through");
- CHECK_USAGE(no_abs_paths_flag, "--no-absolute-pathnames",
- "--pass-through");
- CHECK_USAGE(no_abs_paths_flag, "--absolute-pathnames",
- "--pass-through");
- CHECK_USAGE(to_stdout_option, "--to-stdout", "--pass-through");
-
- directory_name = argv[index];
- }
-
- if (archive_name)
- {
- if (copy_function != copy_in && copy_function != copy_out)
- error (PAXEXIT_FAILURE, 0,
- _("-F can be used only with --create or --extract"));
- archive_des = open_archive (archive_name);
- if (archive_des < 0)
- error (PAXEXIT_FAILURE, errno, _("Cannot open %s"),
- quotearg_colon (archive_name));
- }
-
- /* Prevent SysV non-root users from giving away files inadvertantly.
- This happens automatically on BSD, where only root can give
- away files. */
- if (set_owner_flag == false && set_group_flag == false && geteuid ())
- no_chown_flag = true;
-}
-
-/* Initialize the input and output buffers to their proper size and
- initialize all variables associated with the input and output
- buffers. */
-
-void
-initialize_buffers ()
-{
- int in_buf_size, out_buf_size;
-
- if (copy_function == process_copy_in)
- {
- /* Make sure the input buffer can always hold 2 blocks and that it
- is big enough to hold 1 tar record (512 bytes) even if it
- is not aligned on a block boundary. The extra buffer space
- is needed by process_copyin and peek_in_buf to automatically
- figure out what kind of archive it is reading. */
- if (io_block_size >= 512)
- in_buf_size = 2 * io_block_size;
- else
- in_buf_size = 1024;
- out_buf_size = DISK_IO_BLOCK_SIZE;
- }
- else if (copy_function == process_copy_out)
- {
- in_buf_size = DISK_IO_BLOCK_SIZE;
- out_buf_size = io_block_size;
- }
- else
- {
- in_buf_size = DISK_IO_BLOCK_SIZE;
- out_buf_size = DISK_IO_BLOCK_SIZE;
- }
-
- input_buffer = (char *) xmalloc (in_buf_size);
- in_buff = input_buffer;
- input_buffer_size = in_buf_size;
- input_size = 0;
- input_bytes = 0;
-
- output_buffer = (char *) xmalloc (out_buf_size);
- out_buff = output_buffer;
- output_size = 0;
- output_bytes = 0;
-}
-
-int
-main (int argc, char *argv[])
-{
- setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE, LOCALEDIR);
- textdomain (PACKAGE);
-
- program_name = argv[0];
-
- process_args (argc, argv);
-
- initialize_buffers ();
-
- (*copy_function) ();
-
- if (archive_des >= 0 && rmtclose (archive_des) == -1)
- error (1, errno, _("error closing archive"));
-
- exit (0);
-}
--- contrib/cpio/src/dstring.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* dstring.c - The dynamic string handling routines used by cpio.
- Copyright (C) 1990, 1991, 1992, 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; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301 USA. */
-
-#if defined(HAVE_CONFIG_H)
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#if defined(HAVE_STRING_H) || defined(STDC_HEADERS)
-#include <string.h>
-#else
-#include <strings.h>
-#endif
-#include "dstring.h"
-
-char *xmalloc (unsigned n);
-char *xrealloc (char *p, unsigned n);
-
-/* Initialiaze dynamic string STRING with space for SIZE characters. */
-
-void
-ds_init (dynamic_string *string, int size)
-{
- string->ds_length = size;
- string->ds_string = (char *) xmalloc (size);
-}
-
-/* Expand dynamic string STRING, if necessary, to hold SIZE characters. */
-
-void
-ds_resize (dynamic_string *string, int size)
-{
- if (size > string->ds_length)
- {
- string->ds_length = size;
- string->ds_string = (char *) xrealloc ((char *) string->ds_string, size);
- }
-}
-
-/* Dynamic string S gets a string terminated by the EOS character
- (which is removed) from file F. S will increase
- in size during the function if the string from F is longer than
- the current size of S.
- Return NULL if end of file is detected. Otherwise,
- Return a pointer to the null-terminated string in S. */
-
-char *
-ds_fgetstr (FILE *f, dynamic_string *s, char eos)
-{
- int insize; /* Amount needed for line. */
- int strsize; /* Amount allocated for S. */
- int next_ch;
-
- /* Initialize. */
- insize = 0;
- strsize = s->ds_length;
-
- /* Read the input string. */
- next_ch = getc (f);
- while (next_ch != eos && next_ch != EOF)
- {
- if (insize >= strsize - 1)
- {
- ds_resize (s, strsize * 2 + 2);
- strsize = s->ds_length;
- }
- s->ds_string[insize++] = next_ch;
- next_ch = getc (f);
- }
- s->ds_string[insize++] = '\0';
-
- if (insize == 1 && next_ch == EOF)
- return NULL;
- else
- return s->ds_string;
-}
-
-char *
-ds_fgets (FILE *f, dynamic_string *s)
-{
- return ds_fgetstr (f, s, '\n');
-}
-
-char *
-ds_fgetname (FILE *f, dynamic_string *s)
-{
- return ds_fgetstr (f, s, '\0');
-}
--- contrib/cpio/src/copyout.c
+++ /dev/null
@@ -1,897 +0,0 @@
-/* copyout.c - create a cpio archive
- Copyright (C) 1990, 1991, 1992, 2001, 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. */
-
-#include <system.h>
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "filetypes.h"
-#include "cpiohdr.h"
-#include "dstring.h"
-#include "extern.h"
-#include "defer.h"
-#include <rmt.h>
-#include <paxlib.h>
-
-/* Read FILE_SIZE bytes of FILE_NAME from IN_FILE_DES and
- compute and return a checksum for them. */
-
-static unsigned int
-read_for_checksum (int in_file_des, int file_size, char *file_name)
-{
- unsigned int crc;
- char buf[BUFSIZ];
- int bytes_left;
- int bytes_read;
- int i;
-
- crc = 0;
-
- for (bytes_left = file_size; bytes_left > 0; bytes_left -= bytes_read)
- {
- bytes_read = read (in_file_des, buf, BUFSIZ);
- if (bytes_read < 0)
- error (1, errno, _("cannot read checksum for %s"), file_name);
- if (bytes_read == 0)
- break;
- if (bytes_left < bytes_read)
- bytes_read = bytes_left;
- for (i = 0; i < bytes_read; ++i)
- crc += buf[i] & 0xff;
- }
- if (lseek (in_file_des, 0L, SEEK_SET))
- error (1, errno, _("cannot read checksum for %s"), file_name);
-
- return crc;
-}
-
-/* Write out NULs to fill out the rest of the current block on
- OUT_FILE_DES. */
-
-static void
-tape_clear_rest_of_block (int out_file_des)
-{
- write_nuls_to_file (io_block_size - output_size, out_file_des,
- tape_buffered_write);
-}
-
-/* Write NULs on OUT_FILE_DES to move from OFFSET (the current location)
- to the end of the header. */
-
-static void
-tape_pad_output (int out_file_des, int offset)
-{
- size_t pad;
-
- if (archive_format == arf_newascii || archive_format == arf_crcascii)
- pad = (4 - (offset % 4)) % 4;
- else if (archive_format == arf_tar || archive_format == arf_ustar)
- pad = (512 - (offset % 512)) % 512;
- else if (archive_format != arf_oldascii && archive_format != arf_hpoldascii)
- pad = (2 - (offset % 2)) % 2;
- else
- pad = 0;
-
- if (pad != 0)
- write_nuls_to_file (pad, out_file_des, tape_buffered_write);
-}
-
-
-/* When creating newc and crc archives if a file has multiple (hard)
- links, we don't put any of them into the archive until we have seen
- all of them (or until we get to the end of the list of files that
- are going into the archive and know that we have seen all of the links
- to the file that we will see). We keep these "defered" files on
- this list. */
-
-struct deferment *deferouts = NULL;
-
-/* Count the number of other (hard) links to this file that have
- already been defered. */
-
-static int
-count_defered_links_to_dev_ino (struct cpio_file_stat *file_hdr)
-{
- struct deferment *d;
- int ino;
- int maj;
- int min;
- int count;
- ino = file_hdr->c_ino;
- maj = file_hdr->c_dev_maj;
- min = file_hdr->c_dev_min;
- count = 0;
- for (d = deferouts; d != NULL; d = d->next)
- {
- if ( (d->header.c_ino == ino) && (d->header.c_dev_maj == maj)
- && (d->header.c_dev_min == min) )
- ++count;
- }
- return count;
-}
-
-/* Is this file_hdr the last (hard) link to a file? I.e., have
- we already seen and defered all of the other links? */
-
-static int
-last_link (struct cpio_file_stat *file_hdr)
-{
- int other_files_sofar;
-
- other_files_sofar = count_defered_links_to_dev_ino (file_hdr);
- if (file_hdr->c_nlink == (other_files_sofar + 1) )
- {
- return 1;
- }
- return 0;
-}
-
-
-/* Add the file header for a link that is being defered to the deferouts
- list. */
-
-static void
-add_link_defer (struct cpio_file_stat *file_hdr)
-{
- struct deferment *d;
- d = create_deferment (file_hdr);
- d->next = deferouts;
- deferouts = d;
-}
-
-/* We are about to put a file into a newc or crc archive that is
- multiply linked. We have already seen and deferred all of the
- other links to the file but haven't written them into the archive.
- Write the other links into the archive, and remove them from the
- deferouts list. */
-
-static void
-writeout_other_defers (struct cpio_file_stat *file_hdr, int out_des)
-{
- struct deferment *d;
- struct deferment *d_prev;
- int ino;
- int maj;
- int min;
- ino = file_hdr->c_ino;
- maj = file_hdr->c_dev_maj;
- min = file_hdr->c_dev_min;
- d_prev = NULL;
- d = deferouts;
- while (d != NULL)
- {
- if ( (d->header.c_ino == ino) && (d->header.c_dev_maj == maj)
- && (d->header.c_dev_min == min) )
- {
- struct deferment *d_free;
- d->header.c_filesize = 0;
- write_out_header (&d->header, out_des);
- if (d_prev != NULL)
- d_prev->next = d->next;
- else
- deferouts = d->next;
- d_free = d;
- d = d->next;
- free_deferment (d_free);
- }
- else
- {
- d_prev = d;
- d = d->next;
- }
- }
- return;
-}
-
-/* Write a file into the archive. This code is the same as
- the code in process_copy_out(), but we need it here too
- for writeout_final_defers() to call. */
-
-static void
-writeout_defered_file (struct cpio_file_stat *header, int out_file_des)
-{
- int in_file_des;
- struct cpio_file_stat file_hdr;
-
- file_hdr = *header;
-
-
- in_file_des = open (header->c_name,
- O_RDONLY | O_BINARY, 0);
- if (in_file_des < 0)
- {
- open_error (header->c_name);
- return;
- }
-
- if (archive_format == arf_crcascii)
- file_hdr.c_chksum = read_for_checksum (in_file_des,
- file_hdr.c_filesize,
- header->c_name);
-
- if (write_out_header (&file_hdr, out_file_des))
- return;
- copy_files_disk_to_tape (in_file_des, out_file_des, file_hdr.c_filesize,
- header->c_name);
- warn_if_file_changed(header->c_name, file_hdr.c_filesize, file_hdr.c_mtime);
-
- if (archive_format == arf_tar || archive_format == arf_ustar)
- add_inode (file_hdr.c_ino, file_hdr.c_name, file_hdr.c_dev_maj,
- file_hdr.c_dev_min);
-
- tape_pad_output (out_file_des, file_hdr.c_filesize);
-
- if (reset_time_flag)
- set_file_times (in_file_des, file_hdr.c_name, file_hdr.c_mtime,
- file_hdr.c_mtime);
- if (close (in_file_des) < 0)
- close_error (header->c_name);
-}
-
-/* When writing newc and crc format archives we defer multiply linked
- files until we have seen all of the links to the file. If a file
- has links to it that aren't going into the archive, then we will
- never see the "last" link to the file, so at the end we just write
- all of the leftover defered files into the archive. */
-
-static void
-writeout_final_defers (int out_des)
-{
- struct deferment *d;
- int other_count;
- while (deferouts != NULL)
- {
- d = deferouts;
- other_count = count_defered_links_to_dev_ino (&d->header);
- if (other_count == 1)
- {
- writeout_defered_file (&d->header, out_des);
- }
- else
- {
- struct cpio_file_stat file_hdr;
- file_hdr = d->header;
- file_hdr.c_filesize = 0;
- write_out_header (&file_hdr, out_des);
- }
- deferouts = deferouts->next;
- }
-}
-
-/* FIXME: to_ascii could be used instead of to_oct() and to_octal() from tar,
- so it should be moved to paxutils too.
- Allowed values for logbase are: 1 (binary), 2, 3 (octal), 4 (hex) */
-int
-to_ascii (char *where, uintmax_t v, size_t digits, unsigned logbase)
-{
- static char codetab[] = "0123456789ABCDEF";
- int i = digits;
-
- do
- {
- where[--i] = codetab[(v & ((1 << logbase) - 1))];
- v >>= logbase;
- }
- while (i);
-
- return v != 0;
-}
-
-static void
-field_width_error (const char *filename, const char *fieldname)
-{
- error (0, 0, _("%s: field width not sufficient for storing %s"),
- filename, fieldname);
-}
-
-static void
-field_width_warning (const char *filename, const char *fieldname)
-{
- if (warn_option & CPIO_WARN_TRUNCATE)
- error (0, 0, _("%s: truncating %s"), filename, fieldname);
-}
-
-void
-to_ascii_or_warn (char *where, uintmax_t n, size_t digits,
- unsigned logbase,
- const char *filename, const char *fieldname)
-{
- if (to_ascii (where, n, digits, logbase))
- field_width_warning (filename, fieldname);
-}
-
-int
-to_ascii_or_error (char *where, uintmax_t n, size_t digits,
- unsigned logbase,
- const char *filename, const char *fieldname)
-{
- if (to_ascii (where, n, digits, logbase))
- {
- field_width_error (filename, fieldname);
- return 1;
- }
- return 0;
-}
-
-
-int
-write_out_new_ascii_header (const char *magic_string,
- struct cpio_file_stat *file_hdr, int out_des)
-{
- char ascii_header[110];
- char *p;
-
- p = stpcpy (ascii_header, magic_string);
- to_ascii_or_warn (p, file_hdr->c_ino, 8, LG_16,
- file_hdr->c_name, _("inode number"));
- p += 8;
- to_ascii_or_warn (p, file_hdr->c_mode, 8, LG_16, file_hdr->c_name,
- _("file mode"));
- p += 8;
- to_ascii_or_warn (p, file_hdr->c_uid, 8, LG_16, file_hdr->c_name,
- _("uid"));
- p += 8;
- to_ascii_or_warn (p, file_hdr->c_gid, 8, LG_16, file_hdr->c_name,
- _("gid"));
- p += 8;
- to_ascii_or_warn (p, file_hdr->c_nlink, 8, LG_16, file_hdr->c_name,
- _("number of links"));
- p += 8;
- to_ascii_or_warn (p, file_hdr->c_mtime, 8, LG_16, file_hdr->c_name,
- _("modification time"));
- p += 8;
- if (to_ascii_or_error (p, file_hdr->c_filesize, 8, LG_16, file_hdr->c_name,
- _("file size")))
- return 1;
- p += 8;
- if (to_ascii_or_error (p, file_hdr->c_dev_maj, 8, LG_16, file_hdr->c_name,
- _("device major number")))
- return 1;
- p += 8;
- if (to_ascii_or_error (p, file_hdr->c_dev_min, 8, LG_16, file_hdr->c_name,
- _("device minor number")))
- return 1;
- p += 8;
- if (to_ascii_or_error (p, file_hdr->c_rdev_maj, 8, LG_16, file_hdr->c_name,
- _("rdev major")))
- return 1;
- p += 8;
- if (to_ascii_or_error (p, file_hdr->c_rdev_min, 8, LG_16, file_hdr->c_name,
- _("rdev minor")))
- return 1;
- p += 8;
- if (to_ascii_or_error (p, file_hdr->c_namesize, 8, LG_16, file_hdr->c_name,
- _("name size")))
- return 1;
- p += 8;
- to_ascii (p, file_hdr->c_chksum & 0xffffffff, 8, LG_16);
-
- tape_buffered_write (ascii_header, out_des, sizeof ascii_header);
-
- /* Write file name to output. */
- tape_buffered_write (file_hdr->c_name, out_des, (long) file_hdr->c_namesize);
- tape_pad_output (out_des, file_hdr->c_namesize + sizeof ascii_header);
- return 0;
-}
-
-int
-write_out_old_ascii_header (dev_t dev, dev_t rdev,
- struct cpio_file_stat *file_hdr, int out_des)
-{
- char ascii_header[76];
- char *p = ascii_header;
-
- to_ascii (p, file_hdr->c_magic, 6, LG_8);
- p += 6;
- to_ascii_or_warn (p, dev, 6, LG_8, file_hdr->c_name, _("device number"));
- p += 6;
- to_ascii_or_warn (p, file_hdr->c_ino, 6, LG_8, file_hdr->c_name,
- _("inode number"));
- p += 6;
- to_ascii_or_warn (p, file_hdr->c_mode, 6, LG_8, file_hdr->c_name,
- _("file mode"));
- p += 6;
- to_ascii_or_warn (p, file_hdr->c_uid, 6, LG_8, file_hdr->c_name, _("uid"));
- p += 6;
- to_ascii_or_warn (p, file_hdr->c_gid, 6, LG_8, file_hdr->c_name, _("gid"));
- p += 6;
- to_ascii_or_warn (p, file_hdr->c_nlink, 6, LG_8, file_hdr->c_name,
- _("number of links"));
- p += 6;
- to_ascii_or_warn (p, rdev, 6, LG_8, file_hdr->c_name, _("rdev"));
- p += 6;
- to_ascii_or_warn (p, file_hdr->c_mtime, 11, LG_8, file_hdr->c_name,
- _("modification time"));
- p += 11;
- if (to_ascii_or_error (p, file_hdr->c_namesize, 6, LG_8, file_hdr->c_name,
- _("name size")))
- return 1;
- p += 6;
- if (to_ascii_or_error (p, file_hdr->c_filesize, 11, LG_8, file_hdr->c_name,
- _("file size")))
- return 1;
-
- tape_buffered_write (ascii_header, out_des, sizeof ascii_header);
-
- /* Write file name to output. */
- tape_buffered_write (file_hdr->c_name, out_des, file_hdr->c_namesize);
- return 0;
-}
-
-void
-hp_compute_dev (struct cpio_file_stat *file_hdr, dev_t *pdev, dev_t *prdev)
-{
- /* HP/UX cpio creates archives that look just like ordinary archives,
- but for devices it sets major = 0, minor = 1, and puts the
- actual major/minor number in the filesize field. */
- switch (file_hdr->c_mode & CP_IFMT)
- {
- case CP_IFCHR:
- case CP_IFBLK:
-#ifdef CP_IFSOCK
- case CP_IFSOCK:
-#endif
-#ifdef CP_IFIFO
- case CP_IFIFO:
-#endif
- file_hdr->c_filesize = makedev (file_hdr->c_rdev_maj,
- file_hdr->c_rdev_min);
- *pdev = *prdev = makedev (0, 1);
- break;
-
- default:
- *pdev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min);
- *prdev = makedev (file_hdr->c_rdev_maj, file_hdr->c_rdev_min);
- break;
- }
-}
-
-int
-write_out_binary_header (dev_t rdev,
- struct cpio_file_stat *file_hdr, int out_des)
-{
- struct old_cpio_header short_hdr;
-
- short_hdr.c_magic = 070707;
- short_hdr.c_dev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min);
-
- if ((warn_option & CPIO_WARN_TRUNCATE) && (file_hdr->c_ino >> 16) != 0)
- error (0, 0, _("%s: truncating inode number"), file_hdr->c_name);
-
- short_hdr.c_ino = file_hdr->c_ino & 0xFFFF;
- if (short_hdr.c_ino != file_hdr->c_ino)
- field_width_warning (file_hdr->c_name, _("inode number"));
-
- short_hdr.c_mode = file_hdr->c_mode & 0xFFFF;
- if (short_hdr.c_mode != file_hdr->c_mode)
- field_width_warning (file_hdr->c_name, _("file mode"));
-
- short_hdr.c_uid = file_hdr->c_uid & 0xFFFF;
- if (short_hdr.c_uid != file_hdr->c_uid)
- field_width_warning (file_hdr->c_name, _("uid"));
-
- short_hdr.c_gid = file_hdr->c_gid & 0xFFFF;
- if (short_hdr.c_gid != file_hdr->c_gid)
- field_width_warning (file_hdr->c_name, _("gid"));
-
- short_hdr.c_nlink = file_hdr->c_nlink & 0xFFFF;
- if (short_hdr.c_nlink != file_hdr->c_nlink)
- field_width_warning (file_hdr->c_name, _("number of links"));
-
- short_hdr.c_rdev = rdev;
- short_hdr.c_mtimes[0] = file_hdr->c_mtime >> 16;
- short_hdr.c_mtimes[1] = file_hdr->c_mtime & 0xFFFF;
-
- short_hdr.c_namesize = file_hdr->c_namesize & 0xFFFF;
- if (short_hdr.c_namesize != file_hdr->c_namesize)
- {
- field_width_error (file_hdr->c_name, _("name size"));
- return 1;
- }
-
- short_hdr.c_filesizes[0] = file_hdr->c_filesize >> 16;
- short_hdr.c_filesizes[1] = file_hdr->c_filesize & 0xFFFF;
-
- if (((off_t)short_hdr.c_filesizes[0] << 16) + short_hdr.c_filesizes[1]
- != file_hdr->c_filesize)
- {
- field_width_error (file_hdr->c_name, _("file size"));
- return 1;
- }
-
- /* Output the file header. */
- tape_buffered_write ((char *) &short_hdr, out_des, 26);
-
- /* Write file name to output. */
- tape_buffered_write (file_hdr->c_name, out_des, file_hdr->c_namesize);
-
- tape_pad_output (out_des, file_hdr->c_namesize + 26);
- return 0;
-}
-
-
-/* Write out header FILE_HDR, including the file name, to file
- descriptor OUT_DES. */
-
-int
-write_out_header (struct cpio_file_stat *file_hdr, int out_des)
-{
- dev_t dev;
- dev_t rdev;
-
- switch (archive_format)
- {
- case arf_newascii:
- return write_out_new_ascii_header ("070701", file_hdr, out_des);
-
- case arf_crcascii:
- return write_out_new_ascii_header ("070702", file_hdr, out_des);
-
- case arf_oldascii:
- return write_out_old_ascii_header (makedev (file_hdr->c_dev_maj,
- file_hdr->c_dev_min),
- makedev (file_hdr->c_rdev_maj,
- file_hdr->c_rdev_min),
- file_hdr, out_des);
-
- case arf_hpoldascii:
- hp_compute_dev (file_hdr, &dev, &rdev);
- return write_out_old_ascii_header (dev, rdev, file_hdr, out_des);
-
- case arf_tar:
- case arf_ustar:
- if (is_tar_filename_too_long (file_hdr->c_name))
- {
- error (0, 0, _("%s: file name too long"), file_hdr->c_name);
- return 1;
- }
- write_out_tar_header (file_hdr, out_des); /* FIXME: No error checking */
- return 0;
-
- case arf_binary:
- return write_out_binary_header (makedev (file_hdr->c_rdev_maj,
- file_hdr->c_rdev_min),
- file_hdr, out_des);
-
- case arf_hpbinary:
- hp_compute_dev (file_hdr, &dev, &rdev);
- /* FIXME: dev ignored. Should it be? */
- return write_out_binary_header (rdev, file_hdr, out_des);
-
- default:
- abort ();
- }
-}
-
-static void
-assign_string (char **pvar, char *value)
-{
- char *p = xrealloc (*pvar, strlen (value) + 1);
- strcpy (p, value);
- *pvar = p;
-}
-
-/* Read a list of file names from the standard input
- and write a cpio collection on the standard output.
- The format of the header depends on the compatibility (-c) flag. */
-
-void
-process_copy_out ()
-{
- int res; /* Result of functions. */
- dynamic_string input_name; /* Name of file read from stdin. */
- struct stat file_stat; /* Stat record for file. */
- struct cpio_file_stat file_hdr; /* Output header information. */
- int in_file_des; /* Source file descriptor. */
- int out_file_des; /* Output file descriptor. */
- char *orig_file_name = NULL;
-
- /* Initialize the copy out. */
- ds_init (&input_name, 128);
- file_hdr.c_magic = 070707;
-
- /* Check whether the output file might be a tape. */
- out_file_des = archive_des;
- if (_isrmt (out_file_des))
- {
- output_is_special = 1;
- output_is_seekable = 0;
- }
- else
- {
- if (fstat (out_file_des, &file_stat))
- error (1, errno, _("standard output is closed"));
- output_is_special =
-#ifdef S_ISBLK
- S_ISBLK (file_stat.st_mode) ||
-#endif
- S_ISCHR (file_stat.st_mode);
- output_is_seekable = S_ISREG (file_stat.st_mode);
- }
-
- if (append_flag)
- {
- process_copy_in ();
- prepare_append (out_file_des);
- }
-
- /* Copy files with names read from stdin. */
- while (ds_fgetstr (stdin, &input_name, name_end) != NULL)
- {
- /* Check for blank line. */
- if (input_name.ds_string[0] == 0)
- {
- error (0, 0, _("blank line ignored"));
- continue;
- }
-
- /* Process next file. */
- if ((*xstat) (input_name.ds_string, &file_stat) < 0)
- stat_error (input_name.ds_string);
- else
- {
- /* Set values in output header. */
- stat_to_cpio (&file_hdr, &file_stat);
-
- if (archive_format == arf_tar || archive_format == arf_ustar)
- {
- if (file_hdr.c_mode & CP_IFDIR)
- {
- int len = strlen (input_name.ds_string);
- /* Make sure the name ends with a slash */
- if (input_name.ds_string[len-1] != '/')
- {
- ds_resize (&input_name, len + 2);
- input_name.ds_string[len] = '/';
- input_name.ds_string[len+1] = 0;
- }
- }
- }
-
- assign_string (&orig_file_name, input_name.ds_string);
- cpio_safer_name_suffix (input_name.ds_string, false,
- !no_abs_paths_flag, true);
-#ifndef HPUX_CDF
- file_hdr.c_name = input_name.ds_string;
- file_hdr.c_namesize = strlen (input_name.ds_string) + 1;
-#else
- if ( (archive_format != arf_tar) && (archive_format != arf_ustar) )
- {
- /* We mark CDF's in cpio files by adding a 2nd `/' after the
- "hidden" directory name. We need to do this so we can
- properly recreate the directory as hidden (in case the
- files of a directory go into the archive before the
- directory itself (e.g from "find ... -depth ... | cpio")). */
- file_hdr.c_name = add_cdf_double_slashes (input_name.ds_string);
- file_hdr.c_namesize = strlen (file_hdr.c_name) + 1;
- }
- else
- {
- /* We don't mark CDF's in tar files. We assume the "hidden"
- directory will always go into the archive before any of
- its files. */
- file_hdr.c_name = input_name.ds_string;
- file_hdr.c_namesize = strlen (input_name.ds_string) + 1;
- }
-#endif
-
- /* Copy the named file to the output. */
- switch (file_hdr.c_mode & CP_IFMT)
- {
- case CP_IFREG:
- if (archive_format == arf_tar || archive_format == arf_ustar)
- {
- char *otherfile;
- if ((otherfile = find_inode_file (file_hdr.c_ino,
- file_hdr.c_dev_maj,
- file_hdr.c_dev_min)))
- {
- file_hdr.c_tar_linkname = otherfile;
- if (write_out_header (&file_hdr, out_file_des))
- continue;
- break;
- }
- }
- if ( (archive_format == arf_newascii || archive_format == arf_crcascii)
- && (file_hdr.c_nlink > 1) )
- {
- if (last_link (&file_hdr) )
- {
- writeout_other_defers (&file_hdr, out_file_des);
- }
- else
- {
- add_link_defer (&file_hdr);
- break;
- }
- }
- in_file_des = open (orig_file_name,
- O_RDONLY | O_BINARY, 0);
- if (in_file_des < 0)
- {
- open_error (orig_file_name);
- continue;
- }
-
- if (archive_format == arf_crcascii)
- file_hdr.c_chksum = read_for_checksum (in_file_des,
- file_hdr.c_filesize,
- orig_file_name);
-
- if (write_out_header (&file_hdr, out_file_des))
- continue;
- copy_files_disk_to_tape (in_file_des,
- out_file_des, file_hdr.c_filesize,
- orig_file_name);
- warn_if_file_changed(orig_file_name, file_hdr.c_filesize,
- file_hdr.c_mtime);
-
- if (archive_format == arf_tar || archive_format == arf_ustar)
- add_inode (file_hdr.c_ino, orig_file_name, file_hdr.c_dev_maj,
- file_hdr.c_dev_min);
-
- tape_pad_output (out_file_des, file_hdr.c_filesize);
-
- if (reset_time_flag)
- set_file_times (in_file_des,
- orig_file_name,
- file_stat.st_atime, file_stat.st_mtime);
- if (close (in_file_des) < 0)
- close_error (orig_file_name);
- break;
-
- case CP_IFDIR:
- file_hdr.c_filesize = 0;
- if (write_out_header (&file_hdr, out_file_des))
- continue;
- break;
-
- case CP_IFCHR:
- case CP_IFBLK:
-#ifdef CP_IFSOCK
- case CP_IFSOCK:
-#endif
-#ifdef CP_IFIFO
- case CP_IFIFO:
-#endif
- if (archive_format == arf_tar)
- {
- error (0, 0, _("%s not dumped: not a regular file"),
- orig_file_name);
- continue;
- }
- else if (archive_format == arf_ustar)
- {
- char *otherfile;
- if ((otherfile = find_inode_file (file_hdr.c_ino,
- file_hdr.c_dev_maj,
- file_hdr.c_dev_min)))
- {
- /* This file is linked to another file already in the
- archive, so write it out as a hard link. */
- file_hdr.c_mode = (file_stat.st_mode & 07777);
- file_hdr.c_mode |= CP_IFREG;
- file_hdr.c_tar_linkname = otherfile;
- if (write_out_header (&file_hdr, out_file_des))
- continue;
- break;
- }
- add_inode (file_hdr.c_ino, orig_file_name,
- file_hdr.c_dev_maj, file_hdr.c_dev_min);
- }
- file_hdr.c_filesize = 0;
- if (write_out_header (&file_hdr, out_file_des))
- continue;
- break;
-
-#ifdef CP_IFLNK
- case CP_IFLNK:
- {
- char *link_name = (char *) xmalloc (file_stat.st_size + 1);
- int link_size;
-
- link_size = readlink (orig_file_name, link_name,
- file_stat.st_size);
- if (link_size < 0)
- {
- readlink_warn (orig_file_name);
- free (link_name);
- continue;
- }
- link_name[link_size] = 0;
- cpio_safer_name_suffix (link_name, false,
- !no_abs_paths_flag, true);
- link_size = strlen (link_name);
- file_hdr.c_filesize = link_size;
- if (archive_format == arf_tar || archive_format == arf_ustar)
- {
- if (link_size + 1 > 100)
- {
- error (0, 0, _("%s: symbolic link too long"),
- file_hdr.c_name);
- }
- else
- {
- link_name[link_size] = '\0';
- file_hdr.c_tar_linkname = link_name;
- if (write_out_header (&file_hdr, out_file_des))
- continue;
- }
- }
- else
- {
- if (write_out_header (&file_hdr, out_file_des))
- continue;
- tape_buffered_write (link_name, out_file_des, link_size);
- tape_pad_output (out_file_des, link_size);
- }
- free (link_name);
- }
- break;
-#endif
-
- default:
- error (0, 0, _("%s: unknown file type"), orig_file_name);
- }
-
- if (verbose_flag)
- fprintf (stderr, "%s\n", orig_file_name);
- if (dot_flag)
- fputc ('.', stderr);
- }
- }
-
- free (orig_file_name);
-
- writeout_final_defers(out_file_des);
- /* The collection is complete; append the trailer. */
- file_hdr.c_ino = 0;
- file_hdr.c_mode = 0;
- file_hdr.c_uid = 0;
- file_hdr.c_gid = 0;
- file_hdr.c_nlink = 1; /* Must be 1 for crc format. */
- file_hdr.c_dev_maj = 0;
- file_hdr.c_dev_min = 0;
- file_hdr.c_rdev_maj = 0;
- file_hdr.c_rdev_min = 0;
- file_hdr.c_mtime = 0;
- file_hdr.c_chksum = 0;
-
- file_hdr.c_filesize = 0;
- file_hdr.c_namesize = 11;
- file_hdr.c_name = CPIO_TRAILER_NAME;
- if (archive_format != arf_tar && archive_format != arf_ustar)
- write_out_header (&file_hdr, out_file_des);
- else
- write_nuls_to_file (1024, out_file_des, tape_buffered_write);
-
- /* Fill up the output block. */
- tape_clear_rest_of_block (out_file_des);
- tape_empty_output_buffer (out_file_des);
- if (dot_flag)
- fputc ('\n', stderr);
- if (!quiet_flag)
- {
- res = (output_bytes + io_block_size - 1) / io_block_size;
- fprintf (stderr, ngettext ("%d block\n", "%d blocks\n", res), res);
- }
-}
-
-
--- contrib/cpio/src/tar.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Extended tar format from POSIX.1.
- Copyright (C) 1992 Free Software Foundation, Inc.
- Written by David J. MacKenzie.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General
-Public License along with this library; see the file COPYING.LIB.
-If not, write to the Free Software Foundation, Inc., 51 Franklin
-Street, Fifth Floor, Boston, MA 02110-1301 USA. */
-
-#ifndef _TAR_H
-
-#define _TAR_H 1
-
-
-/* A tar archive consists of 512-byte blocks.
- Each file in the archive has a header block followed by 0+ data blocks.
- Two blocks of NUL bytes indicate the end of the archive. */
-
-/* The fields of header blocks:
- All strings are stored as ISO 646 (approximately ASCII) strings.
-
- Fields are numeric unless otherwise noted below; numbers are ISO 646
- representations of octal numbers, with leading zeros as needed.
-
- linkname is only valid when typeflag==LNKTYPE. It doesn't use prefix;
- files that are links to pathnames >100 chars long can not be stored
- in a tar archive.
-
- If typeflag=={LNKTYPE,SYMTYPE,DIRTYPE} then size must be 0.
-
- devmajor and devminor are only valid for typeflag=={BLKTYPE,CHRTYPE}.
-
- chksum contains the sum of all 512 bytes in the header block,
- treating each byte as an 8-bit unsigned value and treating the
- 8 bytes of chksum as blank characters.
-
- uname and gname are used in preference to uid and gid, if those
- names exist locally.
-
- Field Name Byte Offset Length in Bytes Field Type
- name 0 100 NUL-terminated if NUL fits
- mode 100 8
- uid 108 8
- gid 116 8
- size 124 12
- mtime 136 12
- chksum 148 8
- typeflag 156 1 see below
- linkname 157 100 NUL-terminated if NUL fits
- magic 257 6 must be TMAGIC (NUL term.)
- version 263 2 must be TVERSION
- uname 265 32 NUL-terminated
- gname 297 32 NUL-terminated
- devmajor 329 8
- devminor 337 8
- prefix 345 155 NUL-terminated if NUL fits
-
- If the first character of prefix is '\0', the file name is name;
- otherwise, it is prefix/name. Files whose pathnames don't fit in that
- length can not be stored in a tar archive. */
-
-/* The bits in mode: */
-#define TSUID 04000
-#define TSGID 02000
-#define TSVTX 01000
-#define TUREAD 00400
-#define TUWRITE 00200
-#define TUEXEC 00100
-#define TGREAD 00040
-#define TGWRITE 00020
-#define TGEXEC 00010
-#define TOREAD 00004
-#define TOWRITE 00002
-#define TOEXEC 00001
-
-/* The values for typeflag:
- Values 'A'-'Z' are reserved for custom implementations.
- All other values are reserved for future POSIX.1 revisions. */
-
-#define REGTYPE '0' /* Regular file (preferred code). */
-#define AREGTYPE '\0' /* Regular file (alternate code). */
-#define LNKTYPE '1' /* Hard link. */
-#define SYMTYPE '2' /* Symbolic link (hard if not supported). */
-#define CHRTYPE '3' /* Character special. */
-#define BLKTYPE '4' /* Block special. */
-#define DIRTYPE '5' /* Directory. */
-#define FIFOTYPE '6' /* Named pipe. */
-#define CONTTYPE '7' /* Contiguous file */
- /* (regular file if not supported). */
-
-/* Contents of magic field and its length. */
-#define TMAGIC "ustar"
-#define TMAGLEN 6
-
-/* Contents of the version field and its length. */
-#define TVERSION "00"
-#define TVERSLEN 2
-
-
-#endif /* tar.h */
--- contrib/cpio/src/copypass.c
+++ /dev/null
@@ -1,431 +0,0 @@
-/* copypass.c - cpio copy pass sub-function.
- Copyright (C) 1990, 1991, 1992, 2001, 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. */
-
-#include <system.h>
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "filetypes.h"
-#include "cpiohdr.h"
-#include "dstring.h"
-#include "extern.h"
-#include "paxlib.h"
-
-#ifndef HAVE_LCHOWN
-# define lchown chown
-#endif
-
-
-/* A wrapper around set_perms using another set of arguments */
-static void
-set_copypass_perms (int fd, const char *name, struct stat *st)
-{
- struct cpio_file_stat header;
- header.c_name = name;
- stat_to_cpio (&header, st);
- set_perms (fd, &header);
-}
-
-/* Copy files listed on the standard input into directory `directory_name'.
- If `link_flag', link instead of copying. */
-
-void
-process_copy_pass ()
-{
- dynamic_string input_name; /* Name of file from stdin. */
- dynamic_string output_name; /* Name of new file. */
- int dirname_len; /* Length of `directory_name'. */
- int res; /* Result of functions. */
- char *slash; /* For moving past slashes in input name. */
- struct stat in_file_stat; /* Stat record for input file. */
- struct stat out_file_stat; /* Stat record for output file. */
- int in_file_des; /* Input file descriptor. */
- int out_file_des; /* Output file descriptor. */
- int existing_dir; /* True if file is a dir & already exists. */
-#ifdef HPUX_CDF
- int cdf_flag;
- int cdf_char;
-#endif
-
- umask (0); /* Reset umask to preserve modes of
- created files */
-
- /* Initialize the copy pass. */
- dirname_len = strlen (directory_name);
- ds_init (&input_name, 128);
- ds_init (&output_name, dirname_len + 2);
- strcpy (output_name.ds_string, directory_name);
- output_name.ds_string[dirname_len] = '/';
- output_is_seekable = true;
-
- /* Copy files with names read from stdin. */
- while (ds_fgetstr (stdin, &input_name, name_end) != NULL)
- {
- int link_res = -1;
-
- /* Check for blank line and ignore it if found. */
- if (input_name.ds_string[0] == '\0')
- {
- error (0, 0, _("blank line ignored"));
- continue;
- }
-
- /* Check for current directory and ignore it if found. */
- if (input_name.ds_string[0] == '.'
- && (input_name.ds_string[1] == '\0'
- || (input_name.ds_string[1] == '/'
- && input_name.ds_string[2] == '\0')))
- continue;
-
- if ((*xstat) (input_name.ds_string, &in_file_stat) < 0)
- {
- stat_error (input_name.ds_string);
- continue;
- }
-
- /* Make the name of the new file. */
- for (slash = input_name.ds_string; *slash == '/'; ++slash)
- ;
-#ifdef HPUX_CDF
- /* For CDF's we add a 2nd `/' after all "hidden" directories.
- This kind of a kludge, but it's what we do when creating
- archives, and it's easier to do this than to separately
- keep track of which directories in a path are "hidden". */
- slash = add_cdf_double_slashes (slash);
-#endif
- ds_resize (&output_name, dirname_len + strlen (slash) + 2);
- strcpy (output_name.ds_string + dirname_len + 1, slash);
-
- existing_dir = false;
- if (lstat (output_name.ds_string, &out_file_stat) == 0)
- {
- if (S_ISDIR (out_file_stat.st_mode)
- && S_ISDIR (in_file_stat.st_mode))
- {
- /* If there is already a directory there that
- we are trying to create, don't complain about it. */
- existing_dir = true;
- }
- else if (!unconditional_flag
- && in_file_stat.st_mtime <= out_file_stat.st_mtime)
- {
- error (0, 0, _("%s not created: newer or same age version exists"),
- output_name.ds_string);
- continue; /* Go to the next file. */
- }
- else if (S_ISDIR (out_file_stat.st_mode)
- ? rmdir (output_name.ds_string)
- : unlink (output_name.ds_string))
- {
- error (0, errno, _("cannot remove current %s"),
- output_name.ds_string);
- continue; /* Go to the next file. */
- }
- }
-
- /* Do the real copy or link. */
- if (S_ISREG (in_file_stat.st_mode))
- {
- /* Can the current file be linked to a another file?
- Set link_name to the original file name. */
- if (link_flag)
- /* User said to link it if possible. Try and link to
- the original copy. If that fails we'll still try
- and link to a copy we've already made. */
- link_res = link_to_name (output_name.ds_string,
- input_name.ds_string);
- if ( (link_res < 0) && (in_file_stat.st_nlink > 1) )
- link_res = link_to_maj_min_ino (output_name.ds_string,
- major (in_file_stat.st_dev),
- minor (in_file_stat.st_dev),
- in_file_stat.st_ino);
-
- /* If the file was not linked, copy contents of file. */
- if (link_res < 0)
- {
- in_file_des = open (input_name.ds_string,
- O_RDONLY | O_BINARY, 0);
- if (in_file_des < 0)
- {
- open_error (input_name.ds_string);
- continue;
- }
- out_file_des = open (output_name.ds_string,
- O_CREAT | O_WRONLY | O_BINARY, 0600);
- if (out_file_des < 0 && create_dir_flag)
- {
- create_all_directories (output_name.ds_string);
- out_file_des = open (output_name.ds_string,
- O_CREAT | O_WRONLY | O_BINARY, 0600);
- }
- if (out_file_des < 0)
- {
- open_error (output_name.ds_string);
- close (in_file_des);
- continue;
- }
-
- copy_files_disk_to_disk (in_file_des, out_file_des, in_file_stat.st_size, input_name.ds_string);
- disk_empty_output_buffer (out_file_des);
- /* Debian hack to fix a bug in the --sparse option.
- This bug has been reported to
- "bug-gnu-utils at prep.ai.mit.edu". (96/7/10) -BEM */
- if (delayed_seek_count > 0)
- {
- lseek (out_file_des, delayed_seek_count-1, SEEK_CUR);
- write (out_file_des, "", 1);
- delayed_seek_count = 0;
- }
-
- set_copypass_perms (out_file_des,
- output_name.ds_string, &in_file_stat);
-
- if (reset_time_flag)
- {
- set_file_times (in_file_des,
- input_name.ds_string,
- in_file_stat.st_atime,
- in_file_stat.st_mtime);
- set_file_times (out_file_des,
- output_name.ds_string,
- in_file_stat.st_atime,
- in_file_stat.st_mtime);
- }
-
- if (close (in_file_des) < 0)
- close_error (input_name.ds_string);
-
- if (close (out_file_des) < 0)
- close_error (output_name.ds_string);
-
- warn_if_file_changed(input_name.ds_string, in_file_stat.st_size,
- in_file_stat.st_mtime);
- }
- }
- else if (S_ISDIR (in_file_stat.st_mode))
- {
-#ifdef HPUX_CDF
- cdf_flag = 0;
-#endif
- if (!existing_dir)
- {
-#ifdef HPUX_CDF
- /* If the directory name ends in a + and is SUID,
- then it is a CDF. Strip the trailing + from the name
- before creating it. */
- cdf_char = strlen (output_name.ds_string) - 1;
- if ( (cdf_char > 0) &&
- (in_file_stat.st_mode & 04000) &&
- (output_name.ds_string [cdf_char] == '+') )
- {
- output_name.ds_string [cdf_char] = '\0';
- cdf_flag = 1;
- }
-#endif
- res = mkdir (output_name.ds_string, in_file_stat.st_mode);
-
- }
- else
- res = 0;
- if (res < 0 && create_dir_flag)
- {
- create_all_directories (output_name.ds_string);
- res = mkdir (output_name.ds_string, in_file_stat.st_mode);
- }
- if (res < 0)
- {
- /* In some odd cases where the output_name includes `.',
- the directory may have actually been created by
- create_all_directories(), so the mkdir will fail
- because the directory exists. If that's the case,
- don't complain about it. */
- if ( (errno != EEXIST) ||
- (lstat (output_name.ds_string, &out_file_stat) != 0) ||
- !(S_ISDIR (out_file_stat.st_mode) ) )
- {
- stat_error (output_name.ds_string);
- continue;
- }
- }
- set_copypass_perms (-1, output_name.ds_string, &in_file_stat);
- }
- else if (S_ISCHR (in_file_stat.st_mode) ||
- S_ISBLK (in_file_stat.st_mode) ||
-#ifdef S_ISFIFO
- S_ISFIFO (in_file_stat.st_mode) ||
-#endif
-#ifdef S_ISSOCK
- S_ISSOCK (in_file_stat.st_mode) ||
-#endif
- 0)
- {
- /* Can the current file be linked to a another file?
- Set link_name to the original file name. */
- if (link_flag)
- /* User said to link it if possible. */
- link_res = link_to_name (output_name.ds_string,
- input_name.ds_string);
- if ( (link_res < 0) && (in_file_stat.st_nlink > 1) )
- link_res = link_to_maj_min_ino (output_name.ds_string,
- major (in_file_stat.st_dev),
- minor (in_file_stat.st_dev),
- in_file_stat.st_ino);
-
- if (link_res < 0)
- {
- res = mknod (output_name.ds_string, in_file_stat.st_mode,
- in_file_stat.st_rdev);
- if (res < 0 && create_dir_flag)
- {
- create_all_directories (output_name.ds_string);
- res = mknod (output_name.ds_string, in_file_stat.st_mode,
- in_file_stat.st_rdev);
- }
- if (res < 0)
- {
- mknod_error (output_name.ds_string);
- continue;
- }
- set_copypass_perms (-1, output_name.ds_string, &in_file_stat);
- }
- }
-
-#ifdef S_ISLNK
- else if (S_ISLNK (in_file_stat.st_mode))
- {
- char *link_name;
- int link_size;
- link_name = (char *) xmalloc ((unsigned int) in_file_stat.st_size + 1);
-
- link_size = readlink (input_name.ds_string, link_name,
- in_file_stat.st_size);
- if (link_size < 0)
- {
- readlink_error (input_name.ds_string);
- free (link_name);
- continue;
- }
- link_name[link_size] = '\0';
-
- res = UMASKED_SYMLINK (link_name, output_name.ds_string,
- in_file_stat.st_mode);
- if (res < 0 && create_dir_flag)
- {
- create_all_directories (output_name.ds_string);
- res = UMASKED_SYMLINK (link_name, output_name.ds_string,
- in_file_stat.st_mode);
- }
- if (res < 0)
- {
- symlink_error (output_name.ds_string, link_name);
- free (link_name);
- continue;
- }
-
- /* Set the attributes of the new link. */
- if (!no_chown_flag)
- {
- uid_t uid = set_owner_flag ? set_owner : in_file_stat.st_uid;
- gid_t gid = set_group_flag ? set_group : in_file_stat.st_gid;
- if ((lchown (output_name.ds_string, uid, gid) < 0)
- && errno != EPERM)
- chown_error_details (output_name.ds_string, uid, gid);
- }
- free (link_name);
- }
-#endif
- else
- {
- error (0, 0, _("%s: unknown file type"), input_name.ds_string);
- }
-
- if (verbose_flag)
- fprintf (stderr, "%s\n", output_name.ds_string);
- if (dot_flag)
- fputc ('.', stderr);
- }
-
- if (dot_flag)
- fputc ('\n', stderr);
- if (!quiet_flag)
- {
- res = (output_bytes + io_block_size - 1) / io_block_size;
- fprintf (stderr, ngettext ("%d block\n", "%d blocks\n", res), res);
- }
-}
-
-/* Try and create a hard link from FILE_NAME to another file
- with the given major/minor device number and inode. If no other
- file with the same major/minor/inode numbers is known, add this file
- to the list of known files and associated major/minor/inode numbers
- and return -1. If another file with the same major/minor/inode
- numbers is found, try and create another link to it using
- link_to_name, and return 0 for success and -1 for failure. */
-
-int
-link_to_maj_min_ino (char *file_name, int st_dev_maj, int st_dev_min,
- int st_ino)
-{
- int link_res;
- char *link_name;
- link_res = -1;
- /* Is the file a link to a previously copied file? */
- link_name = find_inode_file (st_ino,
- st_dev_maj,
- st_dev_min);
- if (link_name == NULL)
- add_inode (st_ino, file_name,
- st_dev_maj,
- st_dev_min);
- else
- link_res = link_to_name (file_name, link_name);
- return link_res;
-}
-
-/* Try and create a hard link from LINK_NAME to LINK_TARGET. If
- `create_dir_flag' is set, any non-existent (parent) directories
- needed by LINK_NAME will be created. If the link is successfully
- created and `verbose_flag' is set, print "LINK_TARGET linked to LINK_NAME\n".
- If the link can not be created and `link_flag' is set, print
- "cannot link LINK_TARGET to LINK_NAME\n". Return 0 if the link
- is created, -1 otherwise. */
-
-int
-link_to_name (char *link_name, char *link_target)
-{
- int res = link (link_target, link_name);
- if (res < 0 && create_dir_flag)
- {
- create_all_directories (link_name);
- res = link (link_target, link_name);
- }
- if (res == 0)
- {
- if (verbose_flag)
- error (0, 0, _("%s linked to %s"),
- link_target, link_name);
- }
- else if (link_flag)
- {
- error (0, errno, _("cannot link %s to %s"),
- link_target, link_name);
- }
- return res;
-}
--- contrib/cpio/src/Makefile
+++ /dev/null
@@ -1,781 +0,0 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
-# src/Makefile. Generated from Makefile.in by configure.
-
-# 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.
-
-
-
-# This file is part of GNU cpio
-# Copyright (C) 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; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-
-
-
-pkgdatadir = $(datadir)/cpio
-pkgincludedir = $(includedir)/cpio
-pkglibdir = $(libdir)/cpio
-pkglibexecdir = $(libexecdir)/cpio
-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 = x86_64-mbsd-freebsd6.0
-host_triplet = x86_64-mbsd-freebsd6.0
-bin_PROGRAMS = cpio$(EXEEXT)
-EXTRA_PROGRAMS = mt$(EXEEXT)
-subdir = src
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
-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/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/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/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/getcwd-abort-bug.m4 \
- $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
- $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 \
- $(top_srcdir)/m4/gnulib-common.m4 \
- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.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/longlong.m4 \
- $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbrtowc.m4 \
- $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mempcpy.m4 \
- $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mktime.m4 \
- $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.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/rmt.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/size_max.m4 \
- $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/ssize_t.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/strtol.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/time_h.m4 \
- $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/timespec.m4 \
- $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/ulonglong.m4 \
- $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/utimbuf.m4 \
- $(top_srcdir)/m4/utimens.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/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \
- $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.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 =
-am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS)
-am_cpio_OBJECTS = copyin.$(OBJEXT) copyout.$(OBJEXT) \
- copypass.$(OBJEXT) defer.$(OBJEXT) dstring.$(OBJEXT) \
- global.$(OBJEXT) main.$(OBJEXT) tar.$(OBJEXT) util.$(OBJEXT) \
- filemode.$(OBJEXT) idcache.$(OBJEXT) makepath.$(OBJEXT) \
- userspec.$(OBJEXT)
-cpio_OBJECTS = $(am_cpio_OBJECTS)
-am__DEPENDENCIES_1 =
-cpio_DEPENDENCIES = ../lib/libcpio.a $(am__DEPENDENCIES_1)
-am_mt_OBJECTS = mt.$(OBJEXT)
-mt_OBJECTS = $(am_mt_OBJECTS)
-mt_DEPENDENCIES = ../lib/lib$(PACKAGE).a $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(cpio_SOURCES) $(mt_SOURCES)
-DIST_SOURCES = $(cpio_SOURCES) $(mt_SOURCES)
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ABSOLUTE_DIRENT_H =
-ABSOLUTE_FCNTL_H = "///usr/include/fcntl.h"
-ABSOLUTE_FLOAT_H =
-ABSOLUTE_INTTYPES_H = "///usr/include/inttypes.h"
-ABSOLUTE_STDINT_H = "///usr/include/stdint.h"
-ABSOLUTE_STDIO_H = "///usr/include/stdio.h"
-ABSOLUTE_STDLIB_H = "///usr/include/stdlib.h"
-ABSOLUTE_STRING_H = "///usr/include/string.h"
-ABSOLUTE_SYSEXITS_H = "///usr/include/sysexits.h"
-ABSOLUTE_SYS_STAT_H = "///usr/include/sys/stat.h"
-ABSOLUTE_SYS_TIME_H = "///usr/include/sys/time.h"
-ABSOLUTE_TIME_H = "///usr/include/time.h"
-ABSOLUTE_UNISTD_H = "///usr/include/unistd.h"
-ABSOLUTE_WCHAR_H =
-ABSOLUTE_WCTYPE_H = "///usr/include/wctype.h"
-ACLOCAL = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run aclocal-1.10a
-ALLOCA =
-ALLOCA_H = alloca.h
-AMTAR = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run tar
-AUTOCONF = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoheader
-AUTOM4TE = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autom4te
-AUTOMAKE = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run automake-1.10a
-AWK = nawk
-BITSIZEOF_PTRDIFF_T =
-BITSIZEOF_SIG_ATOMIC_T =
-BITSIZEOF_SIZE_T =
-BITSIZEOF_WCHAR_T =
-BITSIZEOF_WINT_T =
-CC = gcc -std=gnu99
-CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2
-CPIO_MT_PROG =
-CPP = gcc -E
-CPPFLAGS =
-CYGPATH_W = echo
-DEFAULT_RMT_COMMAND =
-DEFAULT_RMT_DIR = $(libexecdir)
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-DIRENT_H =
-ECHO_C =
-ECHO_N = -n
-ECHO_T =
-EGREP = /usr/bin/grep -E
-EOVERFLOW =
-EXEEXT =
-FCNTL_H = fcntl.h
-FLOAT_H =
-FNMATCH_H = fnmatch.h
-GETOPT_H = getopt.h
-GMSGFMT = /usr/local/bin/msgfmt
-GMSGFMT_015 = :
-GNULIB_CHOWN = 1
-GNULIB_DUP2 = 1
-GNULIB_FCHDIR = 1
-GNULIB_FFLUSH = 0
-GNULIB_FPRINTF_POSIX = 0
-GNULIB_FSEEK = 0
-GNULIB_FSEEKO = 0
-GNULIB_FTELL = 0
-GNULIB_FTELLO = 0
-GNULIB_FTRUNCATE = 0
-GNULIB_GETCWD = 1
-GNULIB_GETLOGIN_R = 0
-GNULIB_GETSUBOPT = 0
-GNULIB_IMAXABS = 0
-GNULIB_IMAXDIV = 0
-GNULIB_LSEEK = 0
-GNULIB_MBSCASECMP = 0
-GNULIB_MBSCASESTR = 0
-GNULIB_MBSCHR = 0
-GNULIB_MBSCSPN = 0
-GNULIB_MBSLEN = 0
-GNULIB_MBSNCASECMP = 0
-GNULIB_MBSPBRK = 0
-GNULIB_MBSPCASECMP = 0
-GNULIB_MBSRCHR = 0
-GNULIB_MBSSEP = 0
-GNULIB_MBSSPN = 0
-GNULIB_MBSSTR = 0
-GNULIB_MBSTOK_R = 0
-GNULIB_MEMMEM = 0
-GNULIB_MEMPCPY = 1
-GNULIB_MEMRCHR = 1
-GNULIB_MKDTEMP = 0
-GNULIB_MKSTEMP = 0
-GNULIB_PRINTF_POSIX = 0
-GNULIB_READLINK = 1
-GNULIB_SLEEP = 1
-GNULIB_SNPRINTF = 0
-GNULIB_SPRINTF_POSIX = 0
-GNULIB_STPCPY = 1
-GNULIB_STPNCPY = 0
-GNULIB_STRCASESTR = 0
-GNULIB_STRCHRNUL = 1
-GNULIB_STRDUP = 1
-GNULIB_STRNDUP = 1
-GNULIB_STRNLEN = 1
-GNULIB_STRPBRK = 0
-GNULIB_STRSEP = 0
-GNULIB_STRTOIMAX = 0
-GNULIB_STRTOK_R = 0
-GNULIB_STRTOUMAX = 0
-GNULIB_VASPRINTF = 0
-GNULIB_VFPRINTF_POSIX = 0
-GNULIB_VPRINTF_POSIX = 0
-GNULIB_VSNPRINTF = 1
-GNULIB_VSPRINTF_POSIX = 0
-GREP = /usr/bin/grep
-HAVE_DECL_GETLOGIN_R = 1
-HAVE_DECL_IMAXABS = 1
-HAVE_DECL_IMAXDIV = 1
-HAVE_DECL_MEMMEM = 1
-HAVE_DECL_MEMRCHR = 0
-HAVE_DECL_MKDIR = 1
-HAVE_DECL_SNPRINTF = 1
-HAVE_DECL_STRDUP = 1
-HAVE_DECL_STRNCASECMP = 1
-HAVE_DECL_STRNDUP = 1
-HAVE_DECL_STRNLEN = 0
-HAVE_DECL_STRTOIMAX = 1
-HAVE_DECL_STRTOK_R = 1
-HAVE_DECL_STRTOUMAX = 1
-HAVE_DECL_VSNPRINTF = 1
-HAVE_DUP2 = 1
-HAVE_FSEEKO = 1
-HAVE_FTELLO = 1
-HAVE_FTRUNCATE = 1
-HAVE_GETSUBOPT = 1
-HAVE_INTTYPES_H = 1
-HAVE_IO_H = 0
-HAVE_ISWCNTRL = 1
-HAVE_LONG_LONG_INT = 1
-HAVE_LSTAT = 1
-HAVE_MEMPCPY = 0
-HAVE_MKDTEMP = 1
-HAVE_READLINK = 1
-HAVE_SIGNED_SIG_ATOMIC_T =
-HAVE_SIGNED_WCHAR_T =
-HAVE_SIGNED_WINT_T =
-HAVE_SLEEP = 1
-HAVE_STDINT_H = 1
-HAVE_STPCPY = 1
-HAVE_STPNCPY = 1
-HAVE_STRCASECMP = 1
-HAVE_STRCASESTR = 1
-HAVE_STRCHRNUL = 0
-HAVE_STRNDUP = 1
-HAVE_STRPBRK = 1
-HAVE_STRSEP = 1
-HAVE_STRUCT_TIMEVAL = 1
-HAVE_SYSEXITS_H = 1
-HAVE_SYS_BITYPES_H =
-HAVE_SYS_INTTYPES_H =
-HAVE_SYS_TIME_H = 1
-HAVE_SYS_TYPES_H = 1
-HAVE_UNISTD_H = 1
-HAVE_UNSIGNED_LONG_LONG_INT = 1
-HAVE_VASPRINTF = 1
-HAVE_WCTYPE_H = 1
-HAVE_WINT_T = 1
-HAVE__BOOL = 1
-INSTALL = /usr/bin/install -c
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-INTLLIBS =
-INTL_MACOSX_LIBS =
-INTTYPES_H = inttypes.h
-LDFLAGS =
-LIBCPIO_LIBDEPS =
-LIBCPIO_LTLIBDEPS =
-LIBICONV = -liconv
-LIBINTL =
-LIBOBJS =
-LIBS =
-LIB_CLOCK_GETTIME =
-LIB_SETSOCKOPT =
-LTLIBICONV = -liconv
-LTLIBINTL =
-LTLIBOBJS =
-MAKEINFO = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run makeinfo
-MKDIR_P = ../build-aux/install-sh -c -d
-MSGFMT = /usr/local/bin/msgfmt
-MSGFMT_015 = :
-MSGMERGE = /usr/local/bin/msgmerge
-OBJEXT = o
-PACKAGE = cpio
-PACKAGE_BUGREPORT = bug-cpio at gnu.org
-PACKAGE_NAME = GNU cpio
-PACKAGE_STRING = GNU cpio 2.8
-PACKAGE_TARNAME = cpio
-PACKAGE_VERSION = 2.8
-PATH_SEPARATOR = :
-POSUB =
-PRIPTR_PREFIX = ""
-PRI_MACROS_BROKEN = 0
-PTRDIFF_T_SUFFIX =
-PU_RMT_PROG = rmt$(EXEEXT)
-RANLIB = ranlib
-REPLACE_CHOWN = 0
-REPLACE_FCHDIR = 0
-REPLACE_FFLUSH = 0
-REPLACE_FPRINTF = 0
-REPLACE_FSEEK = 0
-REPLACE_FSEEKO = 0
-REPLACE_FTELL = 0
-REPLACE_FTELLO = 0
-REPLACE_GETCWD = 1
-REPLACE_GETTIMEOFDAY = 0
-REPLACE_LOCALTIME_R = 0
-REPLACE_LSEEK = 0
-REPLACE_MKSTEMP = 0
-REPLACE_NANOSLEEP = GNULIB_PORTCHECK
-REPLACE_PRINTF = 0
-REPLACE_SNPRINTF = 0
-REPLACE_SPRINTF = 0
-REPLACE_STRPTIME = GNULIB_PORTCHECK
-REPLACE_TIMEGM = GNULIB_PORTCHECK
-REPLACE_VASPRINTF = 0
-REPLACE_VFPRINTF = 0
-REPLACE_VPRINTF = 0
-REPLACE_VSNPRINTF = 0
-REPLACE_VSPRINTF = 0
-SET_MAKE =
-SHELL = /bin/ksh
-SIG_ATOMIC_T_SUFFIX =
-SIZE_T_SUFFIX =
-STDBOOL_H =
-STDINT_H =
-STRIP =
-SYSEXITS_H =
-SYS_STAT_H = sys/stat.h
-SYS_TIME_H =
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = 0
-TIME_H_DEFINES_STRUCT_TIMESPEC = 1
-USE_NLS = no
-VERSION = 2.8
-WCHAR_H =
-WCHAR_T_SUFFIX =
-WCTYPE_H =
-WINT_T_SUFFIX =
-XGETTEXT = /usr/local/bin/xgettext
-XGETTEXT_015 = :
-YACC = byacc
-YFLAGS =
-abs_builddir = /home/laffer1/cpio/cpio-2.8/src
-abs_srcdir = /home/laffer1/cpio/cpio-2.8/src
-abs_top_builddir = /home/laffer1/cpio/cpio-2.8
-abs_top_srcdir = /home/laffer1/cpio/cpio-2.8
-ac_ct_CC = gcc
-am__include = include
-am__leading_dot = .
-am__quote =
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build = x86_64-mbsd-freebsd6.0
-build_alias = amd64-mbsd-freebsd6.0
-build_cpu = x86_64
-build_os = freebsd6.0
-build_vendor = mbsd
-builddir = .
-datadir = ${datarootdir}
-datarootdir = ${prefix}/share
-docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
-dvidir = ${docdir}
-exec_prefix = ${prefix}
-gl_LIBOBJS = __fpending.o argmatch.o asnprintf.o basename.o canonicalize-lgpl.o chdir-long.o close-stream.o closeout.o creat-safer.o dirname.o dup-safer.o error.o exitfail.o fchmodat.o fchownat.o fd-safer.o fnmatch.o getcwd.o getopt.o getopt1.o gettime.o hash.o imaxtostr.o lstat.o mempcpy.o memrchr.o mkdirat.o obstack.o offtostr.o open-safer.o openat.o openat-proc.o pipe-safer.o printf-args.o printf-parse.o quote.o quotearg.o safe-read.o safe-write.o save-cwd.o savedir.o strchrnul.o stripslash.o strnlen.o uinttostr.o umaxtostr.o utimens.o vasnprintf.o xgetcwd.o xmalloc.o
-gl_LTLIBOBJS = __fpending.lo argmatch.lo asnprintf.lo basename.lo canonicalize-lgpl.lo chdir-long.lo close-stream.lo closeout.lo creat-safer.lo dirname.lo dup-safer.lo error.lo exitfail.lo fchmodat.lo fchownat.lo fd-safer.lo fnmatch.lo getcwd.lo getopt.lo getopt1.lo gettime.lo hash.lo imaxtostr.lo lstat.lo mempcpy.lo memrchr.lo mkdirat.lo obstack.lo offtostr.lo open-safer.lo openat.lo openat-proc.lo pipe-safer.lo printf-args.lo printf-parse.lo quote.lo quotearg.lo safe-read.lo safe-write.lo save-cwd.lo savedir.lo strchrnul.lo stripslash.lo strnlen.lo uinttostr.lo umaxtostr.lo utimens.lo vasnprintf.lo xgetcwd.lo xmalloc.lo
-host = x86_64-mbsd-freebsd6.0
-host_alias =
-host_cpu = x86_64
-host_os = freebsd6.0
-host_vendor = mbsd
-htmldir = ${docdir}
-includedir = ${prefix}/include
-infodir = ${datarootdir}/info
-install_sh = $(SHELL) /home/laffer1/cpio/cpio-2.8/build-aux/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localedir = ${datarootdir}/locale
-localstatedir = ${prefix}/var
-mandir = ${datarootdir}/man
-mkdir_p = $(top_builddir)/build-aux/install-sh -c -d
-oldincludedir = /usr/include
-pdfdir = ${docdir}
-prefix = /usr/local
-program_transform_name = s,x,x,
-psdir = ${docdir}
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-srcdir = .
-sysconfdir = ${prefix}/etc
-target_alias = amd64-mbsd-freebsd6.0
-top_builddir = ..
-top_srcdir = ..
-INCLUDES = -I. -I.. -I$(top_srcdir)/lib
-cpio_SOURCES = \
- copyin.c\
- copyout.c\
- copypass.c\
- defer.c\
- dstring.c\
- global.c\
- main.c\
- tar.c\
- util.c\
- filemode.c\
- idcache.c\
- makepath.c\
- userspec.c
-
-noinst_HEADERS = \
- cpio.h\
- cpiohdr.h\
- tar.h\
- tarhdr.h\
- defer.h\
- dstring.h\
- extern.h\
- filetypes.h\
- safe-stat.h
-
-cpio_LDADD = ../lib/libcpio.a $(INTLLIBS)
-mt_SOURCES = mt.c
-mt_LDADD = ../lib/lib$(PACKAGE).a $(INTLLIBS)
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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 src/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnits src/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(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
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- done
-
-clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-installcheck-binPROGRAMS: $(bin_PROGRAMS)
- bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
- case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
- *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
- esac; \
- f=`echo "$$p" | \
- sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- for opt in --help --version; do \
- if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
- 2>c$${pid}_.err </dev/null \
- && test -n "`cat c$${pid}_.out`" \
- && test -z "`cat c$${pid}_.err`"; then :; \
- else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
- done; \
- done; rm -f c$${pid}_.???; exit $$bad
-cpio$(EXEEXT): $(cpio_OBJECTS) $(cpio_DEPENDENCIES)
- @rm -f cpio$(EXEEXT)
- $(LINK) $(cpio_OBJECTS) $(cpio_LDADD) $(LIBS)
-mt$(EXEEXT): $(mt_OBJECTS) $(mt_DEPENDENCIES)
- @rm -f mt$(EXEEXT)
- $(LINK) $(mt_OBJECTS) $(mt_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-include ./$(DEPDIR)/copyin.Po
-include ./$(DEPDIR)/copyout.Po
-include ./$(DEPDIR)/copypass.Po
-include ./$(DEPDIR)/defer.Po
-include ./$(DEPDIR)/dstring.Po
-include ./$(DEPDIR)/filemode.Po
-include ./$(DEPDIR)/global.Po
-include ./$(DEPDIR)/idcache.Po
-include ./$(DEPDIR)/main.Po
-include ./$(DEPDIR)/makepath.Po
-include ./$(DEPDIR)/mt.Po
-include ./$(DEPDIR)/tar.Po
-include ./$(DEPDIR)/userspec.Po
-include ./$(DEPDIR)/util.Po
-
-.c.o:
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-# source='$<' object='$@' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(COMPILE) -c $<
-
-.c.obj:
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-# source='$<' object='$@' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- 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
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS) $(HEADERS)
-installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-info: install-info-am
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-ps: install-ps-am
-
-installcheck-am: installcheck-binPROGRAMS
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic ctags distclean distclean-compile \
- distclean-generic distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-binPROGRAMS \
- 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 installcheck-binPROGRAMS \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
- ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS
-
-
-mt.o main.o: ../lib/rmt-command.h
-# 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:
--- contrib/cpio/src/cpio.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Extended cpio format from POSIX.1.
- Copyright (C) 1992, 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. */
-
-#ifndef _CPIO_H
-
-#define _CPIO_H 1
-
-/* A cpio archive consists of a sequence of files.
- Each file has a 76 byte header,
- a variable length, NUL terminated filename,
- and variable length file data.
- A header for a filename "TRAILER!!!" indicates the end of the archive. */
-
-#define CPIO_TRAILER_NAME "TRAILER!!!"
-
-/* All the fields in the header are ISO 646 (approximately ASCII) strings
- of octal numbers, left padded, not NUL terminated.
-
- Field Name Length in Bytes Notes
- c_magic 6 must be "070707"
- c_dev 6
- c_ino 6
- c_mode 6 see below for value
- c_uid 6
- c_gid 6
- c_nlink 6
- c_rdev 6 only valid for chr and blk special files
- c_mtime 11
- c_namesize 6 count includes terminating NUL in pathname
- c_filesize 11 must be 0 for FIFOs and directories */
-
-/* Values for c_mode, OR'd together: */
-
-#define C_IRUSR 000400
-#define C_IWUSR 000200
-#define C_IXUSR 000100
-#define C_IRGRP 000040
-#define C_IWGRP 000020
-#define C_IXGRP 000010
-#define C_IROTH 000004
-#define C_IWOTH 000002
-#define C_IXOTH 000001
-
-#define C_ISUID 004000
-#define C_ISGID 002000
-#define C_ISVTX 001000
-
-#define C_ISBLK 060000
-#define C_ISCHR 020000
-#define C_ISDIR 040000
-#define C_ISFIFO 010000
-#define C_ISSOCK 0140000
-#define C_ISLNK 0120000
-#define C_ISCTG 0110000
-#define C_ISREG 0100000
-
-#endif /* cpio.h */
--- contrib/cpio/src/cpiohdr.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Extended cpio header from POSIX.1.
- Copyright (C) 1992, 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 _CPIOHDR_H
-
-#define _CPIOHDR_H 1
-
-#include <cpio.h>
-
-struct old_cpio_header
-{
- unsigned short c_magic;
- short c_dev;
- unsigned short c_ino;
- unsigned short c_mode;
- unsigned short c_uid;
- unsigned short c_gid;
- unsigned short c_nlink;
- short c_rdev;
- unsigned short c_mtimes[2];
- unsigned short c_namesize;
- unsigned short c_filesizes[2];
-};
-
-struct old_ascii_header
-{
- char c_magic[6];
- char c_dev[6];
- char c_ino[6];
- char c_mode[6];
- char c_uid[6];
- char c_gid[6];
- char c_nlink[6];
- char c_rdev[6];
- char c_mtime[11];
- char c_namesize[6];
- char c_filesize[11];
-};
-
-/* "New" portable format and CRC format:
-
- Each file has a 110 byte header,
- a variable length, NUL terminated filename,
- and variable length file data.
- A header for a filename "TRAILER!!!" indicates the end of the archive. */
-
-/* All the fields in the header are ISO 646 (approximately ASCII) strings
- of hexadecimal numbers, left padded, not NUL terminated: */
-
-struct new_ascii_header
-{
- char c_magic[6]; /* "070701" for "new" portable format
- "070702" for CRC format */
- char c_ino[8];
- char c_mode[8];
- char c_uid[8];
- char c_gid[8];
- char c_nlink[8];
- char c_mtime[8];
- char c_filesize[8]; /* must be 0 for FIFOs and directories */
- char c_dev_maj[8];
- char c_dev_min[8];
- char c_rdev_maj[8]; /* only valid for chr and blk special files */
- char c_rdev_min[8]; /* only valid for chr and blk special files */
- char c_namesize[8]; /* count includes terminating NUL in pathname */
- char c_chksum[8]; /* 0 for "new" portable format; for CRC format
- the sum of all the bytes in the file */
-};
-
-struct cpio_file_stat /* Internal representation of a CPIO header */
-{
- unsigned short c_magic;
- ino_t c_ino;
- mode_t c_mode;
- uid_t c_uid;
- gid_t c_gid;
- size_t c_nlink;
- time_t c_mtime;
- off_t c_filesize;
- long c_dev_maj;
- long c_dev_min;
- long c_rdev_maj;
- long c_rdev_min;
- size_t c_namesize;
- unsigned long c_chksum;
- char *c_name;
- char *c_tar_linkname;
-};
-
-
-#endif /* cpiohdr.h */
--- contrib/cpio/src/global.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/* global.c - global variables and initial values for cpio.
- Copyright (C) 1990, 1991, 1992, 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. */
-
-#include <system.h>
-
-#include <sys/types.h>
-#include "cpiohdr.h"
-#include "dstring.h"
-#include "extern.h"
-
-/* If true, reset access times after reading files (-a). */
-int reset_time_flag = false;
-
-/* Block size value, initially 512. -B sets to 5120. */
-int io_block_size = 512;
-
-/* The header format to recognize and produce. */
-enum archive_format archive_format = arf_unknown;
-
-/* If true, create directories as needed. (-d with -i or -p) */
-int create_dir_flag = false;
-
-/* If true, interactively rename files. (-r) */
-int rename_flag = false;
-
-/* If non-NULL, the name of a file that will be read to
- rename all of the files in the archive. --rename-batch-file. */
-char *rename_batch_file = NULL;
-
-/* If true, print a table of contents of input. (-t) */
-int table_flag = false;
-
-/* If true, copy unconditionally (older replaces newer). (-u) */
-int unconditional_flag = false;
-
-/* If true, list the files processed, or ls -l style output with -t. (-v) */
-int verbose_flag = false;
-
-/* If true, print a . for each file processed. (-V) */
-int dot_flag = false;
-
-/* If true, link files whenever possible. Used with -p option. (-l) */
-int link_flag = false;
-
-/* If true, retain previous file modification time. (-m) */
-int retain_time_flag = false;
-
-/* Set true if crc_flag is true and we are doing a cpio -i. Used
- by copy_files so it knows whether to compute the crc. */
-int crc_i_flag = false;
-
-/* If true, append to end of archive. (-A) */
-int append_flag = false;
-
-/* If true, swap bytes of each file during cpio -i. */
-int swap_bytes_flag = false;
-
-/* If true, swap halfwords of each file during cpio -i. */
-int swap_halfwords_flag = false;
-
-/* If true, we are swapping halfwords on the current file. */
-int swapping_halfwords = false;
-
-/* If true, we are swapping bytes on the current file. */
-int swapping_bytes = false;
-
-/* If true, set ownership of all files to UID `set_owner'. */
-int set_owner_flag = false;
-uid_t set_owner;
-
-/* If true, set group ownership of all files to GID `set_group'. */
-int set_group_flag = false;
-gid_t set_group;
-
-/* If true, do not chown the files. */
-int no_chown_flag = false;
-
-/* If true, try to write sparse ("holey") files. */
-int sparse_flag = false;
-
-/* If true, don't report number of blocks copied. */
-int quiet_flag = false;
-
-/* If true, only read the archive and verify the files' CRC's, don't
- actually extract the files. */
-int only_verify_crc_flag = false;
-
-/* If true, don't use any absolute paths, prefix them by `./'. */
-int no_abs_paths_flag = false;
-
-#ifdef DEBUG_CPIO
-/* If true, print debugging information. */
-int debug_flag = false;
-#endif
-
-/* File position of last header read. Only used during -A to determine
- where the old TRAILER!!! record started. */
-int last_header_start = 0;
-
-/* With -i; if true, copy only files that match any of the given patterns;
- if false, copy only files that do not match any of the patterns. (-f) */
-int copy_matching_files = true;
-
-/* With -itv; if true, list numeric uid and gid instead of translating them
- into names. */
-int numeric_uid = false;
-
-/* Name of file containing additional patterns (-E). */
-char *pattern_file_name = NULL;
-
-/* Message to print when end of medium is reached (-M). */
-char *new_media_message = NULL;
-
-/* With -M with %d, message to print when end of medium is reached. */
-char *new_media_message_with_number = NULL;
-char *new_media_message_after_number = NULL;
-
-/* File descriptor containing the archive. */
-int archive_des;
-
-/* Name of file containing the archive, if known; NULL if stdin/out. */
-char *archive_name = NULL;
-
-/* Name of the remote shell command, if known; NULL otherwise. */
-char *rsh_command_option = NULL;
-
-/* CRC checksum. */
-unsigned int crc;
-
-/* Input and output buffers. */
-char *input_buffer, *output_buffer;
-
-/* The size of the input buffer. */
-long input_buffer_size;
-
-/* Current locations in `input_buffer' and `output_buffer'. */
-char *in_buff, *out_buff;
-
-/* Current number of bytes stored at `input_buff' and `output_buff'. */
-long input_size, output_size;
-
-/* Total number of bytes read and written for all files.
- Now that many tape drives hold more than 4Gb we need more than 32
- bits to hold input_bytes and output_bytes. But it's not worth
- the trouble of adding special multi-precision arithmetic if the
- compiler doesn't support 64 bit ints since input_bytes and
- output_bytes are only used to print the number of blocks copied. */
-#ifdef __GNUC__
-long long input_bytes, output_bytes;
-#else
-long input_bytes, output_bytes;
-#endif
-
-/* Saving of argument values for later reference. */
-char *directory_name = NULL;
-char **save_patterns;
-int num_patterns;
-
-/* Character that terminates file names read from stdin. */
-char name_end = '\n';
-
-/* true if input (cpio -i) or output (cpio -o) is a device node. */
-char input_is_special = false;
-char output_is_special = false;
-
-/* true if lseek works on the input. */
-char input_is_seekable = false;
-
-/* true if lseek works on the output. */
-char output_is_seekable = false;
-
-/* Print extra warning messages */
-unsigned int warn_option = 0;
-
-/* Extract to standard output? */
-bool to_stdout_option = false;
-
-/* The name this program was run with. */
-char *program_name;
-
-/* A pointer to either lstat or stat, depending on whether
- dereferencing of symlinks is done for input files. */
-int (*xstat) ();
-
-/* Which copy operation to perform. (-i, -o, -p) */
-void (*copy_function) () = 0;
--- contrib/cpio/src/defer.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* defer.h
- Copyright (C) 1993, 2001, 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. */
-
-struct deferment
- {
- struct deferment *next;
- struct cpio_file_stat header;
- };
-
-struct deferment *create_deferment (struct cpio_file_stat *file_hdr);
-void free_deferment (struct deferment *d);
--- contrib/cpio/src/extern.h
+++ /dev/null
@@ -1,221 +0,0 @@
-/* extern.h - External declarations for cpio. Requires system.h.
- Copyright (C) 1990, 1991, 1992, 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. */
-
-#include "paxlib.h"
-#include "quotearg.h"
-#include "quote.h"
-
-enum archive_format
-{
- arf_unknown, arf_binary, arf_oldascii, arf_newascii, arf_crcascii,
- arf_tar, arf_ustar, arf_hpoldascii, arf_hpbinary
-};
-
-extern enum archive_format archive_format;
-extern int reset_time_flag;
-extern int io_block_size;
-extern int create_dir_flag;
-extern int rename_flag;
-extern char *rename_batch_file;
-extern int table_flag;
-extern int unconditional_flag;
-extern int verbose_flag;
-extern int dot_flag;
-extern int link_flag;
-extern int retain_time_flag;
-extern int crc_i_flag;
-extern int append_flag;
-extern int swap_bytes_flag;
-extern int swap_halfwords_flag;
-extern int swapping_bytes;
-extern int swapping_halfwords;
-extern int set_owner_flag;
-extern uid_t set_owner;
-extern int set_group_flag;
-extern gid_t set_group;
-extern int no_chown_flag;
-extern int sparse_flag;
-extern int quiet_flag;
-extern int only_verify_crc_flag;
-extern int no_abs_paths_flag;
-extern unsigned int warn_option;
-
-/* Values for warn_option */
-#define CPIO_WARN_NONE 0
-#define CPIO_WARN_TRUNCATE 0x01
-#define CPIO_WARN_ALL (unsigned int)-1
-
-extern bool to_stdout_option;
-
-extern int last_header_start;
-extern int copy_matching_files;
-extern int numeric_uid;
-extern char *pattern_file_name;
-extern char *new_media_message;
-extern char *new_media_message_with_number;
-extern char *new_media_message_after_number;
-extern int archive_des;
-extern char *archive_name;
-extern char *rsh_command_option;
-extern unsigned int crc;
-extern int delayed_seek_count;
-#ifdef DEBUG_CPIO
-extern int debug_flag;
-#endif
-
-extern char *input_buffer, *output_buffer;
-extern char *in_buff, *out_buff;
-extern long input_buffer_size;
-extern long input_size, output_size;
-#ifdef __GNUC__
-extern long long input_bytes, output_bytes;
-#else
-extern long input_bytes, output_bytes;
-#endif
-extern char *directory_name;
-extern char **save_patterns;
-extern int num_patterns;
-extern char name_end;
-extern char input_is_special;
-extern char output_is_special;
-extern char input_is_seekable;
-extern char output_is_seekable;
-extern char *program_name;
-extern int (*xstat) ();
-extern void (*copy_function) ();
-
-
-/* copyin.c */
-void warn_junk_bytes (long bytes_skipped);
-/* FIXME: make read_* static in copyin.c */
-void read_in_header (struct cpio_file_stat *file_hdr, int in_des);
-void read_in_old_ascii (struct cpio_file_stat *file_hdr, int in_des);
-void read_in_new_ascii (struct cpio_file_stat *file_hdr, int in_des);
-void read_in_binary (struct cpio_file_stat *file_hdr,
- struct old_cpio_header *short_hdr, int in_des);
-void swab_array (char *arg, int count);
-void process_copy_in (void);
-void long_format (struct cpio_file_stat *file_hdr, char *link_name);
-void print_name_with_quoting (char *p);
-
-/* copyout.c */
-int write_out_header (struct cpio_file_stat *file_hdr, int out_des);
-void process_copy_out (void);
-
-/* copypass.c */
-void process_copy_pass (void);
-int link_to_maj_min_ino (char *file_name, int st_dev_maj,
- int st_dev_min, int st_ino);
-int link_to_name (char *link_name, char *link_target);
-
-/* dirname.c */
-char *dirname (char *path);
-
-/* filemode.c */
-void mode_string (unsigned int mode, char *str);
-
-/* idcache.c */
-#ifndef __MSDOS__
-char *getgroup ();
-char *getuser ();
-uid_t *getuidbyname ();
-gid_t *getgidbyname ();
-#endif
-
-/* main.c */
-void process_args (int argc, char *argv[]);
-void initialize_buffers (void);
-
-/* makepath.c */
-int make_path (char *argpath, int mode, int parent_mode,
- uid_t owner, gid_t group, char *verbose_fmt_string);
-
-/* tar.c */
-void write_out_tar_header (struct cpio_file_stat *file_hdr, int out_des);
-int null_block (long *block, int size);
-void read_in_tar_header (struct cpio_file_stat *file_hdr, int in_des);
-int otoa (char *s, unsigned long *n);
-int is_tar_header (char *buf);
-int is_tar_filename_too_long (char *name);
-
-/* userspec.c */
-#ifndef __MSDOS__
-char *parse_user_spec (char *name, uid_t *uid, gid_t *gid,
- char **username, char **groupname);
-#endif
-
-/* util.c */
-void tape_empty_output_buffer (int out_des);
-void disk_empty_output_buffer (int out_des);
-void swahw_array (char *ptr, int count);
-void tape_buffered_write (char *in_buf, int out_des, off_t num_bytes);
-void tape_buffered_read (char *in_buf, int in_des, off_t num_bytes);
-int tape_buffered_peek (char *peek_buf, int in_des, int num_bytes);
-void tape_toss_input (int in_des, off_t num_bytes);
-void copy_files_tape_to_disk (int in_des, int out_des, off_t num_bytes);
-void copy_files_disk_to_tape (int in_des, int out_des, off_t num_bytes, char *filename);
-void copy_files_disk_to_disk (int in_des, int out_des, off_t num_bytes, char *filename);
-void warn_if_file_changed (char *file_name, unsigned long old_file_size,
- off_t old_file_mtime);
-void create_all_directories (char *name);
-void prepare_append (int out_file_des);
-char *find_inode_file (unsigned long node_num,
- unsigned long major_num, unsigned long minor_num);
-void add_inode (unsigned long node_num, char *file_name,
- unsigned long major_num, unsigned long minor_num);
-int open_archive (char *file);
-void tape_offline (int tape_des);
-void get_next_reel (int tape_des);
-void set_new_media_message (char *message);
-#if defined(__MSDOS__) && !defined(__GNUC__)
-int chown (char *path, int owner, int group);
-#endif
-#ifdef __TURBOC__
-int utime (char *filename, struct utimbuf *utb);
-#endif
-#ifdef HPUX_CDF
-char *add_cdf_double_slashes (char *filename);
-#endif
-void write_nuls_to_file (off_t num_bytes, int out_des,
- void (*writer) (char *in_buf,
- int out_des, off_t num_bytes));
-#define DISK_IO_BLOCK_SIZE 512
-
-/* FIXME: Move to system.h? */
-#ifndef SYMLINK_USES_UMASK
-# define UMASKED_SYMLINK(name1,name2,mode) symlink(name1,name2)
-#else
-# define UMASKED_SYMLINK(name1,name2,mode) umasked_symlink(name1,name2,mode)
-#endif /* SYMLINK_USES_UMASK */
-
-void set_perms (int fd, struct cpio_file_stat *header);
-void set_file_times (int fd, const char *name, unsigned long atime,
- unsigned long mtime);
-void stat_to_cpio (struct cpio_file_stat *hdr, struct stat *st);
-void cpio_safer_name_suffix (char *name, bool link_target,
- bool absolute_names, bool strip_leading_dots);
-
-/* FIXME: These two defines should be defined in paxutils */
-#define LG_8 3
-#define LG_16 4
-
-uintmax_t from_ascii (char const *where, size_t digs, unsigned logbase);
-
-#define FROM_OCTAL(f) from_ascii (f, sizeof f, LG_8)
-#define FROM_HEX(f) from_ascii (f, sizeof f, LG_16)
-
--- contrib/cpio/src/filemode.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/* filemode.c -- make a string describing file modes
- Copyright (C) 1985, 1990, 1993, 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; 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 <sys/types.h>
-#include <sys/stat.h>
-
-#if !S_IRUSR
-# if S_IREAD
-# define S_IRUSR S_IREAD
-# else
-# define S_IRUSR 00400
-# endif
-#endif
-
-#if !S_IWUSR
-# if S_IWRITE
-# define S_IWUSR S_IWRITE
-# else
-# define S_IWUSR 00200
-# endif
-#endif
-
-#if !S_IXUSR
-# if S_IEXEC
-# define S_IXUSR S_IEXEC
-# else
-# define S_IXUSR 00100
-# endif
-#endif
-
-#ifdef STAT_MACROS_BROKEN
-#undef S_ISBLK
-#undef S_ISCHR
-#undef S_ISDIR
-#undef S_ISFIFO
-#undef S_ISLNK
-#undef S_ISMPB
-#undef S_ISMPC
-#undef S_ISNWK
-#undef S_ISREG
-#undef S_ISSOCK
-#endif /* STAT_MACROS_BROKEN. */
-
-#if !defined(S_ISBLK) && defined(S_IFBLK)
-#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
-#endif
-#if !defined(S_ISCHR) && defined(S_IFCHR)
-#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-#endif
-#if !defined(S_ISDIR) && defined(S_IFDIR)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-#if !defined(S_ISREG) && defined(S_IFREG)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-#if !defined(S_ISFIFO) && defined(S_IFIFO)
-#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-#endif
-#if !defined(S_ISLNK) && defined(S_IFLNK)
-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-#endif
-#if !defined(S_ISSOCK) && defined(S_IFSOCK)
-#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
-#endif
-#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
-#define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
-#define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
-#endif
-#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
-#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
-#endif
-
-/* Return a character indicating the type of file described by
- file mode BITS:
- 'd' for directories
- 'b' for block special files
- 'c' for character special files
- 'm' for multiplexor files
- 'l' for symbolic links
- 's' for sockets
- 'p' for fifos
- '-' for regular files
- '?' for any other file type. */
-
-static char
-ftypelet (long bits)
-{
-#ifdef S_ISBLK
- if (S_ISBLK (bits))
- return 'b';
-#endif
- if (S_ISCHR (bits))
- return 'c';
- if (S_ISDIR (bits))
- return 'd';
- if (S_ISREG (bits))
- return '-';
-#ifdef S_ISFIFO
- if (S_ISFIFO (bits))
- return 'p';
-#endif
-#ifdef S_ISLNK
- if (S_ISLNK (bits))
- return 'l';
-#endif
-#ifdef S_ISSOCK
- if (S_ISSOCK (bits))
- return 's';
-#endif
-#ifdef S_ISMPC
- if (S_ISMPC (bits))
- return 'm';
-#endif
-#ifdef S_ISNWK
- if (S_ISNWK (bits))
- return 'n';
-#endif
- return '?';
-}
-
-/* Look at read, write, and execute bits in BITS and set
- flags in CHARS accordingly. */
-
-static void
-rwx (unsigned short bits, char *chars)
-{
- chars[0] = (bits & S_IRUSR) ? 'r' : '-';
- chars[1] = (bits & S_IWUSR) ? 'w' : '-';
- chars[2] = (bits & S_IXUSR) ? 'x' : '-';
-}
-
-/* Set the 's' and 't' flags in file attributes string CHARS,
- according to the file mode BITS. */
-
-static void
-setst (unsigned short bits, char *chars)
-{
-#ifdef S_ISUID
- if (bits & S_ISUID)
- {
- if (chars[3] != 'x')
- /* Set-uid, but not executable by owner. */
- chars[3] = 'S';
- else
- chars[3] = 's';
- }
-#endif
-#ifdef S_ISGID
- if (bits & S_ISGID)
- {
- if (chars[6] != 'x')
- /* Set-gid, but not executable by group. */
- chars[6] = 'S';
- else
- chars[6] = 's';
- }
-#endif
-#ifdef S_ISVTX
- if (bits & S_ISVTX)
- {
- if (chars[9] != 'x')
- /* Sticky, but not executable by others. */
- chars[9] = 'T';
- else
- chars[9] = 't';
- }
-#endif
-}
-
-/* Like filemodestring (see below), but only the relevant part of the
- `struct stat' is given as an argument. */
-
-void
-mode_string (unsigned short mode, char *str)
-{
- str[0] = ftypelet ((long) mode);
- rwx ((mode & 0700) << 0, &str[1]);
- rwx ((mode & 0070) << 3, &str[4]);
- rwx ((mode & 0007) << 6, &str[7]);
- setst (mode, str);
-}
-
-/* filemodestring - fill in string STR with an ls-style ASCII
- representation of the st_mode field of file stats block STATP.
- 10 characters are stored in STR; no terminating null is added.
- The characters stored in STR are:
-
- 0 File type. 'd' for directory, 'c' for character
- special, 'b' for block special, 'm' for multiplex,
- 'l' for symbolic link, 's' for socket, 'p' for fifo,
- '-' for regular, '?' for any other file type
-
- 1 'r' if the owner may read, '-' otherwise.
-
- 2 'w' if the owner may write, '-' otherwise.
-
- 3 'x' if the owner may execute, 's' if the file is
- set-user-id, '-' otherwise.
- 'S' if the file is set-user-id, but the execute
- bit isn't set.
-
- 4 'r' if group members may read, '-' otherwise.
-
- 5 'w' if group members may write, '-' otherwise.
-
- 6 'x' if group members may execute, 's' if the file is
- set-group-id, '-' otherwise.
- 'S' if it is set-group-id but not executable.
-
- 7 'r' if any user may read, '-' otherwise.
-
- 8 'w' if any user may write, '-' otherwise.
-
- 9 'x' if any user may execute, 't' if the file is "sticky"
- (will be retained in swap space after execution), '-'
- otherwise.
- 'T' if the file is sticky but not executable. */
-
-void
-filemodestring (struct stat *statp, char *str)
-{
- mode_string (statp->st_mode, str);
-}
-
--- contrib/cpio/src/filetypes.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* filetypes.h - deal with POSIX annoyances
- Copyright (C) 1991 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 sys/types.h and sys/stat.h before this file. */
-
-#ifndef S_ISREG /* Doesn't have POSIX.1 stat stuff. */
-#define mode_t unsigned short
-#endif
-
-/* Define the POSIX macros for systems that lack them. */
-#if !defined(S_ISBLK) && defined(S_IFBLK)
-#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
-#endif
-#if !defined(S_ISCHR) && defined(S_IFCHR)
-#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-#endif
-#if !defined(S_ISDIR) && defined(S_IFDIR)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-#if !defined(S_ISREG) && defined(S_IFREG)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-#if !defined(S_ISFIFO) && defined(S_IFIFO)
-#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-#endif
-#if !defined(S_ISLNK) && defined(S_IFLNK)
-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-#endif
-#if !defined(S_ISSOCK) && defined(S_IFSOCK)
-#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
-#endif
-#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX network special */
-#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
-#endif
-
-/* Define the file type bits used in cpio archives.
- They have the same values as the S_IF bits in traditional Unix. */
-
-#define CP_IFMT 0170000 /* Mask for all file type bits. */
-
-#if defined(S_ISBLK)
-#define CP_IFBLK 0060000
-#endif
-#if defined(S_ISCHR)
-#define CP_IFCHR 0020000
-#endif
-#if defined(S_ISDIR)
-#define CP_IFDIR 0040000
-#endif
-#if defined(S_ISREG)
-#define CP_IFREG 0100000
-#endif
-#if defined(S_ISFIFO)
-#define CP_IFIFO 0010000
-#endif
-#if defined(S_ISLNK)
-#define CP_IFLNK 0120000
-#endif
-#if defined(S_ISSOCK)
-#define CP_IFSOCK 0140000
-#endif
-#if defined(S_ISNWK)
-#define CP_IFNWK 0110000
-#endif
-
-#ifndef S_ISLNK
-#define lstat stat
-#endif
-int lstat ();
-int stat ();
--- contrib/cpio/src/userspec.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/* userspec.c -- Parse a user and group string.
- Copyright (C) 1989, 1990, 1991, 1992, 2001,
- 2004, 2005 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301 USA. */
-
-/* Written by David MacKenzie <djm at gnu.ai.mit.edu>. */
-
-#include <system.h>
-
-#ifdef __GNUC__
-#define alloca __builtin_alloca
-#else
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#else
-#ifdef _AIX
- #pragma alloca
-#else
-char *alloca ();
-#endif
-#endif
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <pwd.h>
-#include <grp.h>
-
-#if !HAVE_DECL_GETPWNAM
-extern struct passwd *getpwnam (const char *name);
-#endif
-#if !HAVE_DECL_GETGRNAM
-extern struct group *getgrnam (const char *name);
-#endif
-#if !HAVE_DECL_GETGRGID
-extern struct group *getgrgid (gid_t gid);
-#endif
-
-#ifndef HAVE_ENDPWENT
-# define endpwent()
-#endif
-#ifndef HAVE_ENDGRENT
-# define endgrent()
-#endif
-
-/* Perform the equivalent of the statement `dest = strdup (src);',
- but obtaining storage via alloca instead of from the heap. */
-
-#define V_STRDUP(dest, src) \
- do \
- { \
- int _len = strlen ((src)); \
- (dest) = (char *) alloca (_len + 1); \
- strcpy (dest, src); \
- } \
- while (0)
-
-/* Return nonzero if STR represents an unsigned decimal integer,
- otherwise return 0. */
-
-static int
-isnumber_p (const char *str)
-{
- for (; *str; str++)
- if (!isdigit (*str))
- return 0;
- return 1;
-}
-
-/* Extract from NAME, which has the form "[user][:.][group]",
- a USERNAME, UID U, GROUPNAME, and GID G.
- Either user or group, or both, must be present.
- If the group is omitted but the ":" or "." separator is given,
- use the given user's login group.
-
- USERNAME and GROUPNAME will be in newly malloc'd memory.
- Either one might be NULL instead, indicating that it was not
- given and the corresponding numeric ID was left unchanged.
-
- Return NULL if successful, a static error message string if not. */
-
-const char *
-parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
- char **username_arg, char **groupname_arg)
-{
- static const char *tired = "virtual memory exhausted";
- const char *error_msg;
- char *spec; /* A copy we can write on. */
- struct passwd *pwd;
- struct group *grp;
- char *g, *u, *separator;
- char *groupname;
-
- error_msg = NULL;
- *username_arg = *groupname_arg = NULL;
- groupname = NULL;
-
- V_STRDUP (spec, spec_arg);
-
- /* Find the separator if there is one. */
- separator = strchr (spec, ':');
- if (separator == NULL)
- separator = strchr (spec, '.');
-
- /* Replace separator with a NUL. */
- if (separator != NULL)
- *separator = '\0';
-
- /* Set U and G to non-zero length strings corresponding to user and
- group specifiers or to NULL. */
- u = (*spec == '\0' ? NULL : spec);
-
- g = (separator == NULL || *(separator + 1) == '\0'
- ? NULL
- : separator + 1);
-
- if (u == NULL && g == NULL)
- return "can not omit both user and group";
-
- if (u != NULL)
- {
- pwd = getpwnam (u);
- if (pwd == NULL)
- {
-
- if (!isnumber_p (u))
- error_msg = _("invalid user");
- else
- {
- int use_login_group;
- use_login_group = (separator != NULL && g == NULL);
- if (use_login_group)
- error_msg = _("cannot get the login group of a numeric UID");
- else
- *uid = atoi (u);
- }
- }
- else
- {
- *uid = pwd->pw_uid;
- if (g == NULL && separator != NULL)
- {
- /* A separator was given, but a group was not specified,
- so get the login group. */
- *gid = pwd->pw_gid;
- grp = getgrgid (pwd->pw_gid);
- if (grp == NULL)
- {
- /* This is enough room to hold the unsigned decimal
- representation of any 32-bit quantity and the trailing
- zero byte. */
- char uint_buf[21];
- sprintf (uint_buf, "%u", (unsigned) (pwd->pw_gid));
- V_STRDUP (groupname, uint_buf);
- }
- else
- {
- V_STRDUP (groupname, grp->gr_name);
- }
- endgrent ();
- }
- }
- endpwent ();
- }
-
- if (g != NULL && error_msg == NULL)
- {
- /* Explicit group. */
- grp = getgrnam (g);
- if (grp == NULL)
- {
- if (!isnumber_p (g))
- error_msg = _("invalid group");
- else
- *gid = atoi (g);
- }
- else
- *gid = grp->gr_gid;
- endgrent (); /* Save a file descriptor. */
-
- if (error_msg == NULL)
- V_STRDUP (groupname, g);
- }
-
- if (error_msg == NULL)
- {
- if (u != NULL)
- {
- *username_arg = strdup (u);
- if (*username_arg == NULL)
- error_msg = tired;
- }
-
- if (groupname != NULL && error_msg == NULL)
- {
- *groupname_arg = strdup (groupname);
- if (*groupname_arg == NULL)
- {
- if (*username_arg != NULL)
- {
- free (*username_arg);
- *username_arg = NULL;
- }
- error_msg = tired;
- }
- }
- }
-
- return error_msg;
-}
-
-#ifdef TEST
-
-#define NULL_CHECK(s) ((s) == NULL ? "(null)" : (s))
-
-int
-main (int argc, char **argv)
-{
- int i;
-
- for (i = 1; i < argc; i++)
- {
- const char *e;
- char *username, *groupname;
- uid_t uid;
- gid_t gid;
- char *tmp;
-
- tmp = strdup (argv[i]);
- e = parse_user_spec (tmp, &uid, &gid, &username, &groupname);
- free (tmp);
- printf ("%s: %u %u %s %s %s\n",
- argv[i],
- (unsigned int) uid,
- (unsigned int) gid,
- NULL_CHECK (username),
- NULL_CHECK (groupname),
- NULL_CHECK (e));
- }
-
- exit (0);
-}
-
-#endif
--- contrib/cpio/src/dstring.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* dstring.h - Dynamic string handling include file. Requires strings.h.
- Copyright (C) 1990, 1991, 1992, 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; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301 USA. */
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-/* A dynamic string consists of record that records the size of an
- allocated string and the pointer to that string. The actual string
- is a normal zero byte terminated string that can be used with the
- usual string functions. The major difference is that the
- dynamic_string routines know how to get more space if it is needed
- by allocating new space and copying the current string. */
-
-typedef struct
-{
- int ds_length; /* Actual amount of storage allocated. */
- char *ds_string; /* String. */
-} dynamic_string;
-
-
-/* Macros that look similar to the original string functions.
- WARNING: These macros work only on pointers to dynamic string records.
- If used with a real record, an "&" must be used to get the pointer. */
-#define ds_strlen(s) strlen ((s)->ds_string)
-#define ds_strcmp(s1, s2) strcmp ((s1)->ds_string, (s2)->ds_string)
-#define ds_strncmp(s1, s2, n) strncmp ((s1)->ds_string, (s2)->ds_string, n)
-#define ds_index(s, c) index ((s)->ds_string, c)
-#define ds_rindex(s, c) rindex ((s)->ds_string, c)
-
-void ds_init (dynamic_string *string, int size);
-void ds_resize (dynamic_string *string, int size);
-char *ds_fgetname (FILE *f, dynamic_string *s);
-char *ds_fgets (FILE *f, dynamic_string *s);
-char *ds_fgetstr (FILE *f, dynamic_string *s, char eos);
--- contrib/cpio/src/safe-stat.h
+++ /dev/null
@@ -1 +0,0 @@
-#define SAFE_STAT(path,pbuf) stat(path,pbuf)
--- contrib/cpio/src/tarhdr.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Extended tar header from POSIX.1.
- Copyright (C) 1992 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 _TARHDR_H
-
-#define _TARHDR_H 1
-
-#include <tar.h>
-
-/* Size of `name' field. */
-#define TARNAMESIZE 100
-
-/* Size of `linkname' field. */
-#define TARLINKNAMESIZE 100
-
-/* Size of `prefix' field. */
-#define TARPREFIXSIZE 155
-
-/* Size of entire tar header. */
-#define TARRECORDSIZE 512
-
-struct tar_header
-{
- char name[TARNAMESIZE];
- char mode[8];
- char uid[8];
- char gid[8];
- char size[12];
- char mtime[12];
- char chksum[8];
- char typeflag;
- char linkname[TARLINKNAMESIZE];
- char magic[6];
- char version[2];
- char uname[32];
- char gname[32];
- char devmajor[8];
- char devminor[8];
- char prefix[TARPREFIXSIZE];
-};
-
-union tar_record
-{
- struct tar_header header;
- char buffer[TARRECORDSIZE];
-};
-
-#endif /* tarhdr.h */
--- contrib/cpio/src/copyin.c
+++ /dev/null
@@ -1,1579 +0,0 @@
-/* copyin.c - extract or list a cpio archive
- Copyright (C) 1990,1991,1992,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; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301 USA. */
-
-#include <system.h>
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "filetypes.h"
-#include "cpiohdr.h"
-#include "dstring.h"
-#include "extern.h"
-#include "defer.h"
-#include <rmt.h>
-#ifndef FNM_PATHNAME
-# include <fnmatch.h>
-#endif
-
-#ifndef HAVE_LCHOWN
-# define lchown(f,u,g) 0
-#endif
-
-static void copyin_regular_file(struct cpio_file_stat* file_hdr,
- int in_file_des);
-
-void
-warn_junk_bytes (long bytes_skipped)
-{
- error (0, 0, ngettext ("warning: skipped %ld byte of junk",
- "warning: skipped %ld bytes of junk", bytes_skipped),
- bytes_skipped);
-}
-
-
-static int
-query_rename(struct cpio_file_stat* file_hdr, FILE *tty_in, FILE *tty_out,
- FILE *rename_in)
-{
- char *str_res; /* Result for string function. */
- static dynamic_string new_name; /* New file name for rename option. */
- static int initialized_new_name = false;
- if (!initialized_new_name)
- {
- ds_init (&new_name, 128);
- initialized_new_name = true;
- }
-
- if (rename_flag)
- {
- fprintf (tty_out, _("rename %s -> "), file_hdr->c_name);
- fflush (tty_out);
- str_res = ds_fgets (tty_in, &new_name);
- }
- else
- {
- str_res = ds_fgetstr (rename_in, &new_name, '\n');
- }
- if (str_res == NULL || str_res[0] == 0)
- {
- return -1;
- }
- else
- /* Debian hack: file_hrd.c_name is sometimes set to
- point to static memory by code in tar.c. This
- causes a segfault. This has been fixed and an
- additional check to ensure that the file name
- is not too long has been added. (Reported by
- Horst Knobloch.) This bug has been reported to
- "bug-gnu-utils at prep.ai.mit.edu". (99/1/6) -BEM */
- {
- if (archive_format != arf_tar && archive_format != arf_ustar)
- {
- free (file_hdr->c_name);
- file_hdr->c_name = xstrdup (new_name.ds_string);
- }
- else
- {
- if (is_tar_filename_too_long (new_name.ds_string))
- error (0, 0, _("%s: file name too long"),
- new_name.ds_string);
- else
- strcpy (file_hdr->c_name, new_name.ds_string);
- }
- }
- return 0;
-}
-
-/* Skip the padding on IN_FILE_DES after a header or file,
- up to the next header.
- The number of bytes skipped is based on OFFSET -- the current offset
- from the last start of a header (or file) -- and the current
- header type. */
-
-static void
-tape_skip_padding (int in_file_des, int offset)
-{
- int pad;
-
- if (archive_format == arf_crcascii || archive_format == arf_newascii)
- pad = (4 - (offset % 4)) % 4;
- else if (archive_format == arf_binary || archive_format == arf_hpbinary)
- pad = (2 - (offset % 2)) % 2;
- else if (archive_format == arf_tar || archive_format == arf_ustar)
- pad = (512 - (offset % 512)) % 512;
- else
- pad = 0;
-
- if (pad != 0)
- tape_toss_input (in_file_des, pad);
-}
-
-
-static void
-list_file(struct cpio_file_stat* file_hdr, int in_file_des)
-{
- if (verbose_flag)
- {
-#ifdef CP_IFLNK
- if ((file_hdr->c_mode & CP_IFMT) == CP_IFLNK)
- {
- if (archive_format != arf_tar && archive_format != arf_ustar)
- {
- char *link_name = NULL; /* Name of hard and symbolic links. */
-
- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
- link_name[file_hdr->c_filesize] = '\0';
- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
- long_format (file_hdr, link_name);
- free (link_name);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- return;
- }
- else
- {
- long_format (file_hdr, file_hdr->c_tar_linkname);
- return;
- }
- }
- else
-#endif
- long_format (file_hdr, (char *) 0);
- }
- else
- {
- /* Debian hack: Modified to print a list of filenames
- terminiated by a null character when the -t and -0
- flags are used. This has been submitted as a
- suggestion to "bug-gnu-utils at prep.ai.mit.edu". -BEM */
- printf ("%s%c", file_hdr->c_name, name_end);
- }
-
- crc = 0;
- tape_toss_input (in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- if (only_verify_crc_flag)
- {
-#ifdef CP_IFLNK
- if ((file_hdr->c_mode & CP_IFMT) == CP_IFLNK)
- {
- return; /* links don't have a checksum */
- }
-#endif
- if (crc != file_hdr->c_chksum)
- {
- error (0, 0, _("%s: checksum error (0x%lx, should be 0x%lx)"),
- file_hdr->c_name, crc, file_hdr->c_chksum);
- }
- }
-}
-
-static int
-try_existing_file (struct cpio_file_stat* file_hdr, int in_file_des,
- int *existing_dir)
-{
- struct stat file_stat;
-
- *existing_dir = false;
- if (lstat (file_hdr->c_name, &file_stat) == 0)
- {
- if (S_ISDIR (file_stat.st_mode)
- && ((file_hdr->c_mode & CP_IFMT) == CP_IFDIR))
- {
- /* If there is already a directory there that
- we are trying to create, don't complain about
- it. */
- *existing_dir = true;
- return 0;
- }
- else if (!unconditional_flag
- && file_hdr->c_mtime <= file_stat.st_mtime)
- {
- error (0, 0, _("%s not created: newer or same age version exists"),
- file_hdr->c_name);
- tape_toss_input (in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- return -1; /* Go to the next file. */
- }
- else if (S_ISDIR (file_stat.st_mode)
- ? rmdir (file_hdr->c_name)
- : unlink (file_hdr->c_name))
- {
- error (0, errno, _("cannot remove current %s"),
- file_hdr->c_name);
- tape_toss_input (in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- return -1; /* Go to the next file. */
- }
- }
- return 0;
-}
-
-/* The newc and crc formats store multiply linked copies of the same file
- in the archive only once. The actual data is attached to the last link
- in the archive, and the other links all have a filesize of 0. When a
- file in the archive has multiple links and a filesize of 0, its data is
- probably "attatched" to another file in the archive, so we can't create
- it right away. We have to "defer" creating it until we have created
- the file that has the data "attatched" to it. We keep a list of the
- "defered" links on deferments. */
-
-struct deferment *deferments = NULL;
-
-/* Add a file header to the deferments list. For now they all just
- go on one list, although we could optimize this if necessary. */
-
-static void
-defer_copyin (struct cpio_file_stat *file_hdr)
-{
- struct deferment *d;
- d = create_deferment (file_hdr);
- d->next = deferments;
- deferments = d;
- return;
-}
-
-/* We just created a file that (probably) has some other links to it
- which have been defered. Go through all of the links on the deferments
- list and create any which are links to this file. */
-
-static void
-create_defered_links (struct cpio_file_stat *file_hdr)
-{
- struct deferment *d;
- struct deferment *d_prev;
- int ino;
- int maj;
- int min;
- int link_res;
- ino = file_hdr->c_ino;
- maj = file_hdr->c_dev_maj;
- min = file_hdr->c_dev_min;
- d = deferments;
- d_prev = NULL;
- while (d != NULL)
- {
- if ( (d->header.c_ino == ino) && (d->header.c_dev_maj == maj)
- && (d->header.c_dev_min == min) )
- {
- struct deferment *d_free;
- link_res = link_to_name (d->header.c_name, file_hdr->c_name);
- if (link_res < 0)
- {
- error (0, errno, _("cannot link %s to %s"),
- d->header.c_name, file_hdr->c_name);
- }
- if (d_prev != NULL)
- d_prev->next = d->next;
- else
- deferments = d->next;
- d_free = d;
- d = d->next;
- free_deferment (d_free);
- }
- else
- {
- d_prev = d;
- d = d->next;
- }
- }
-}
-
-/* We are skipping a file but there might be other links to it that we
- did not skip, so we have to copy its data for the other links. Find
- the first link that we didn't skip and try to create that. That will
- then create the other deferred links. */
-
-static int
-create_defered_links_to_skipped (struct cpio_file_stat *file_hdr,
- int in_file_des)
-{
- struct deferment *d;
- struct deferment *d_prev;
- int ino;
- int maj;
- int min;
- if (file_hdr->c_filesize == 0)
- {
- /* The file doesn't have any data attached to it so we don't have
- to bother. */
- return -1;
- }
- ino = file_hdr->c_ino;
- maj = file_hdr->c_dev_maj;
- min = file_hdr->c_dev_min;
- d = deferments;
- d_prev = NULL;
- while (d != NULL)
- {
- if ( (d->header.c_ino == ino) && (d->header.c_dev_maj == maj)
- && (d->header.c_dev_min == min) )
- {
- if (d_prev != NULL)
- d_prev->next = d->next;
- else
- deferments = d->next;
- free (file_hdr->c_name);
- file_hdr->c_name = xstrdup(d->header.c_name);
- free_deferment (d);
- copyin_regular_file(file_hdr, in_file_des);
- return 0;
- }
- else
- {
- d_prev = d;
- d = d->next;
- }
- }
- return -1;
-}
-
-/* If we had a multiply linked file that really was empty then we would
- have defered all of its links, since we never found any with data
- "attached", and they will still be on the deferment list even when
- we are done reading the whole archive. Write out all of these
- empty links that are still on the deferments list. */
-
-static void
-create_final_defers ()
-{
- struct deferment *d;
- int link_res;
- int out_file_des;
-
- for (d = deferments; d != NULL; d = d->next)
- {
- /* Debian hack: A line, which could cause an endless loop, was
- removed (97/1/2). It was reported by Ronald F. Guilmette to
- the upstream maintainers. -BEM */
- /* Debian hack: This was reported by Horst Knobloch. This bug has
- been reported to "bug-gnu-utils at prep.ai.mit.edu". (99/1/6) -BEM
- */
- link_res = link_to_maj_min_ino (d->header.c_name,
- d->header.c_dev_maj, d->header.c_dev_min,
- d->header.c_ino);
- if (link_res == 0)
- {
- continue;
- }
- out_file_des = open (d->header.c_name,
- O_CREAT | O_WRONLY | O_BINARY, 0600);
- if (out_file_des < 0 && create_dir_flag)
- {
- create_all_directories (d->header.c_name);
- out_file_des = open (d->header.c_name,
- O_CREAT | O_WRONLY | O_BINARY,
- 0600);
- }
- if (out_file_des < 0)
- {
- open_error (d->header.c_name);
- continue;
- }
-
- set_perms (out_file_des, &d->header);
-
- if (close (out_file_des) < 0)
- close_error (d->header.c_name);
-
- }
-}
-
-static void
-copyin_regular_file (struct cpio_file_stat* file_hdr, int in_file_des)
-{
- int out_file_des; /* Output file descriptor. */
-
- if (to_stdout_option)
- out_file_des = STDOUT_FILENO;
- else
- {
- /* Can the current file be linked to a previously copied file? */
- if (file_hdr->c_nlink > 1
- && (archive_format == arf_newascii
- || archive_format == arf_crcascii) )
- {
- int link_res;
- if (file_hdr->c_filesize == 0)
- {
- /* The newc and crc formats store multiply linked copies
- of the same file in the archive only once. The
- actual data is attached to the last link in the
- archive, and the other links all have a filesize
- of 0. Since this file has multiple links and a
- filesize of 0, its data is probably attatched to
- another file in the archive. Save the link, and
- process it later when we get the actual data. We
- can't just create it with length 0 and add the
- data later, in case the file is readonly. We still
- lose if its parent directory is readonly (and we aren't
- running as root), but there's nothing we can do about
- that. */
- defer_copyin (file_hdr);
- tape_toss_input (in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- return;
- }
- /* If the file has data (filesize != 0), then presumably
- any other links have already been defer_copyin'ed(),
- but GNU cpio version 2.0-2.2 didn't do that, so we
- still have to check for links here (and also in case
- the archive was created and later appeneded to). */
- /* Debian hack: (97/1/2) This was reported by Ronald
- F. Guilmette to the upstream maintainers. -BEM */
- link_res = link_to_maj_min_ino (file_hdr->c_name,
- file_hdr->c_dev_maj, file_hdr->c_dev_min,
- file_hdr->c_ino);
- if (link_res == 0)
- {
- tape_toss_input (in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- return;
- }
- }
- else if (file_hdr->c_nlink > 1
- && archive_format != arf_tar
- && archive_format != arf_ustar)
- {
- int link_res;
- /* Debian hack: (97/1/2) This was reported by Ronald
- F. Guilmette to the upstream maintainers. -BEM */
- link_res = link_to_maj_min_ino (file_hdr->c_name,
- file_hdr->c_dev_maj,
- file_hdr->c_dev_min,
- file_hdr->c_ino);
- if (link_res == 0)
- {
- tape_toss_input (in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- return;
- }
- }
- else if ((archive_format == arf_tar || archive_format == arf_ustar)
- && file_hdr->c_tar_linkname
- && file_hdr->c_tar_linkname[0] != '\0')
- {
- int link_res;
- link_res = link_to_name (file_hdr->c_name, file_hdr->c_tar_linkname);
- if (link_res < 0)
- {
- error (0, errno, _("cannot link %s to %s"),
- file_hdr->c_tar_linkname, file_hdr->c_name);
- }
- return;
- }
-
- /* If not linked, copy the contents of the file. */
- out_file_des = open (file_hdr->c_name,
- O_CREAT | O_WRONLY | O_BINARY, 0600);
-
- if (out_file_des < 0 && create_dir_flag)
- {
- create_all_directories (file_hdr->c_name);
- out_file_des = open (file_hdr->c_name,
- O_CREAT | O_WRONLY | O_BINARY,
- 0600);
- }
-
- if (out_file_des < 0)
- {
- open_error (file_hdr->c_name);
- tape_toss_input (in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- return;
- }
- }
-
- crc = 0;
- if (swap_halfwords_flag)
- {
- if ((file_hdr->c_filesize % 4) == 0)
- swapping_halfwords = true;
- else
- error (0, 0, _("cannot swap halfwords of %s: odd number of halfwords"),
- file_hdr->c_name);
- }
- if (swap_bytes_flag)
- {
- if ((file_hdr->c_filesize % 2) == 0)
- swapping_bytes = true;
- else
- error (0, 0, _("cannot swap bytes of %s: odd number of bytes"),
- file_hdr->c_name);
- }
- copy_files_tape_to_disk (in_file_des, out_file_des, file_hdr->c_filesize);
- disk_empty_output_buffer (out_file_des);
-
- if (to_stdout_option)
- {
- if (archive_format == arf_crcascii)
- {
- if (crc != file_hdr->c_chksum)
- error (0, 0, _("%s: checksum error (0x%lx, should be 0x%lx)"),
- file_hdr->c_name, crc, file_hdr->c_chksum);
- }
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- return;
- }
-
- /* Debian hack to fix a bug in the --sparse option.
- This bug has been reported to
- "bug-gnu-utils at prep.ai.mit.edu". (96/7/10) -BEM */
- if (delayed_seek_count > 0)
- {
- lseek (out_file_des, delayed_seek_count-1, SEEK_CUR);
- write (out_file_des, "", 1);
- delayed_seek_count = 0;
- }
-
- set_perms (out_file_des, file_hdr);
-
- if (close (out_file_des) < 0)
- close_error (file_hdr->c_name);
-
- if (archive_format == arf_crcascii)
- {
- if (crc != file_hdr->c_chksum)
- error (0, 0, _("%s: checksum error (0x%lx, should be 0x%lx)"),
- file_hdr->c_name, crc, file_hdr->c_chksum);
- }
-
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- if (file_hdr->c_nlink > 1
- && (archive_format == arf_newascii || archive_format == arf_crcascii) )
- {
- /* (see comment above for how the newc and crc formats
- store multiple links). Now that we have the data
- for this file, create any other links to it which
- we defered. */
- create_defered_links (file_hdr);
- }
-}
-
-static void
-copyin_directory (struct cpio_file_stat *file_hdr, int existing_dir)
-{
- int res; /* Result of various function calls. */
-#ifdef HPUX_CDF
- int cdf_flag; /* True if file is a CDF. */
- int cdf_char; /* Index of `+' char indicating a CDF. */
-#endif
-
- if (to_stdout_option)
- return;
-
- /* Strip any trailing `/'s off the filename; tar puts
- them on. We might as well do it here in case anybody
- else does too, since they cause strange things to happen. */
- strip_trailing_slashes (file_hdr->c_name);
-
- /* Ignore the current directory. It must already exist,
- and we don't want to change its permission, ownership
- or time. */
- if (file_hdr->c_name[0] == '.' && file_hdr->c_name[1] == '\0')
- {
- return;
- }
-
-#ifdef HPUX_CDF
- cdf_flag = 0;
-#endif
- if (!existing_dir)
-
- {
-#ifdef HPUX_CDF
- /* If the directory name ends in a + and is SUID,
- then it is a CDF. Strip the trailing + from
- the name before creating it. */
- cdf_char = strlen (file_hdr->c_name) - 1;
- if ( (cdf_char > 0) &&
- (file_hdr->c_mode & 04000) &&
- (file_hdr->c_name [cdf_char] == '+') )
- {
- file_hdr->c_name [cdf_char] = '\0';
- cdf_flag = 1;
- }
-#endif
- res = mkdir (file_hdr->c_name, file_hdr->c_mode);
- }
- else
- res = 0;
- if (res < 0 && create_dir_flag)
- {
- create_all_directories (file_hdr->c_name);
- res = mkdir (file_hdr->c_name, file_hdr->c_mode);
- }
- if (res < 0)
- {
- /* In some odd cases where the file_hdr->c_name includes `.',
- the directory may have actually been created by
- create_all_directories(), so the mkdir will fail
- because the directory exists. If that's the case,
- don't complain about it. */
- struct stat file_stat;
- if (errno != EEXIST)
- {
- mkdir_error (file_hdr->c_name);
- return;
- }
- if (lstat (file_hdr->c_name, &file_stat))
- {
- stat_error (file_hdr->c_name);
- return;
- }
- if (!(S_ISDIR (file_stat.st_mode)))
- {
- error (0, 0, _("%s is not a directory"),
- quotearg_colon (file_hdr->c_name));
- return;
- }
- }
-
- set_perms (-1, file_hdr);
-}
-
-static void
-copyin_device (struct cpio_file_stat* file_hdr)
-{
- int res; /* Result of various function calls. */
-
- if (to_stdout_option)
- return;
-
- if (file_hdr->c_nlink > 1 && archive_format != arf_tar
- && archive_format != arf_ustar)
- {
- int link_res;
- /* Debian hack: This was reported by Horst
- Knobloch. This bug has been reported to
- "bug-gnu-utils at prep.ai.mit.edu". (99/1/6) -BEM */
- link_res = link_to_maj_min_ino (file_hdr->c_name,
- file_hdr->c_dev_maj, file_hdr->c_dev_min,
- file_hdr->c_ino);
- if (link_res == 0)
- {
- return;
- }
- }
- else if (archive_format == arf_ustar &&
- file_hdr->c_tar_linkname &&
- file_hdr->c_tar_linkname [0] != '\0')
- {
- int link_res;
- link_res = link_to_name (file_hdr->c_name,
- file_hdr->c_tar_linkname);
- if (link_res < 0)
- {
- error (0, errno, _("cannot link %s to %s"),
- file_hdr->c_tar_linkname, file_hdr->c_name);
- /* Something must be wrong, because we couldn't
- find the file to link to. But can we assume
- that the device maj/min numbers are correct
- and fall through to the mknod? It's probably
- safer to just return, rather than possibly
- creating a bogus device file. */
- }
- return;
- }
-
- res = mknod (file_hdr->c_name, file_hdr->c_mode,
- makedev (file_hdr->c_rdev_maj, file_hdr->c_rdev_min));
- if (res < 0 && create_dir_flag)
- {
- create_all_directories (file_hdr->c_name);
- res = mknod (file_hdr->c_name, file_hdr->c_mode,
- makedev (file_hdr->c_rdev_maj, file_hdr->c_rdev_min));
- }
- if (res < 0)
- {
- mknod_error (file_hdr->c_name);
- return;
- }
- if (!no_chown_flag)
- {
- uid_t uid = set_owner_flag ? set_owner : file_hdr->c_uid;
- gid_t gid = set_group_flag ? set_group : file_hdr->c_gid;
- if ((chown (file_hdr->c_name, uid, gid) < 0)
- && errno != EPERM)
- chown_error_details (file_hdr->c_name, uid, gid);
- }
- /* chown may have turned off some permissions we wanted. */
- if (chmod (file_hdr->c_name, file_hdr->c_mode) < 0)
- chmod_error_details (file_hdr->c_name, file_hdr->c_mode);
- if (retain_time_flag)
- set_file_times (-1, file_hdr->c_name, file_hdr->c_mtime,
- file_hdr->c_mtime);
-}
-
-static void
-copyin_link(struct cpio_file_stat *file_hdr, int in_file_des)
-{
- char *link_name = NULL; /* Name of hard and symbolic links. */
- int res; /* Result of various function calls. */
-
- if (to_stdout_option)
- return;
-
- if (archive_format != arf_tar && archive_format != arf_ustar)
- {
- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
- link_name[file_hdr->c_filesize] = '\0';
- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- }
- else
- {
- link_name = xstrdup (file_hdr->c_tar_linkname);
- }
-
- res = UMASKED_SYMLINK (link_name, file_hdr->c_name,
- file_hdr->c_mode);
- if (res < 0 && create_dir_flag)
- {
- create_all_directories (file_hdr->c_name);
- res = UMASKED_SYMLINK (link_name, file_hdr->c_name,
- file_hdr->c_mode);
- }
- if (res < 0)
- {
- error (0, errno, _("%s: Cannot symlink to %s"),
- quotearg_colon (link_name), quote_n (1, file_hdr->c_name));
- free (link_name);
- return;
- }
- if (!no_chown_flag)
- {
- uid_t uid = set_owner_flag ? set_owner : file_hdr->c_uid;
- gid_t gid = set_group_flag ? set_group : file_hdr->c_gid;
- if ((lchown (file_hdr->c_name, uid, gid) < 0)
- && errno != EPERM)
- chown_error_details (file_hdr->c_name, uid, gid);
- }
- free (link_name);
-}
-
-static void
-copyin_file (struct cpio_file_stat* file_hdr, int in_file_des)
-{
- int existing_dir;
-
- if (!to_stdout_option
- && try_existing_file (file_hdr, in_file_des, &existing_dir) < 0)
- return;
-
- /* Do the real copy or link. */
- switch (file_hdr->c_mode & CP_IFMT)
- {
- case CP_IFREG:
- copyin_regular_file (file_hdr, in_file_des);
- break;
-
- case CP_IFDIR:
- copyin_directory (file_hdr, existing_dir);
- break;
-
- case CP_IFCHR:
- case CP_IFBLK:
-#ifdef CP_IFSOCK
- case CP_IFSOCK:
-#endif
-#ifdef CP_IFIFO
- case CP_IFIFO:
-#endif
- copyin_device (file_hdr);
- break;
-
-#ifdef CP_IFLNK
- case CP_IFLNK:
- copyin_link (file_hdr, in_file_des);
- break;
-#endif
-
- default:
- error (0, 0, _("%s: unknown file type"), file_hdr->c_name);
- tape_toss_input (in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- }
-}
-
-
-/* Current time for verbose table. */
-static time_t current_time;
-
-
-/* Print the file described by FILE_HDR in long format.
- If LINK_NAME is nonzero, it is the name of the file that
- this file is a symbolic link to. */
-
-void
-long_format (struct cpio_file_stat *file_hdr, char *link_name)
-{
- char mbuf[11];
- char tbuf[40];
- time_t when;
-
- mode_string (file_hdr->c_mode, mbuf);
- mbuf[10] = '\0';
-
- /* Get time values ready to print. */
- when = file_hdr->c_mtime;
- strcpy (tbuf, ctime (&when));
- if (current_time - when > 6L * 30L * 24L * 60L * 60L
- || current_time - when < 0L)
- {
- /* The file is older than 6 months, or in the future.
- Show the year instead of the time of day. */
- strcpy (tbuf + 11, tbuf + 19);
- }
- tbuf[16] = '\0';
-
- printf ("%s %3lu ", mbuf, file_hdr->c_nlink);
-
- if (numeric_uid)
- printf ("%-8u %-8u ", (unsigned int) file_hdr->c_uid,
- (unsigned int) file_hdr->c_gid);
- else
- printf ("%-8.8s %-8.8s ", getuser (file_hdr->c_uid),
- getgroup (file_hdr->c_gid));
-
- if ((file_hdr->c_mode & CP_IFMT) == CP_IFCHR
- || (file_hdr->c_mode & CP_IFMT) == CP_IFBLK)
- printf ("%3lu, %3lu ", file_hdr->c_rdev_maj,
- file_hdr->c_rdev_min);
- else
- printf ("%8"PRIuMAX" ", (uintmax_t) file_hdr->c_filesize);
-
- printf ("%s ", tbuf + 4);
-
- print_name_with_quoting (file_hdr->c_name);
- if (link_name)
- {
- printf (" -> ");
- print_name_with_quoting (link_name);
- }
- putc ('\n', stdout);
-}
-
-void
-print_name_with_quoting (register char *p)
-{
- register unsigned char c;
-
- while ( (c = *p++) )
- {
- switch (c)
- {
- case '\\':
- printf ("\\\\");
- break;
-
- case '\n':
- printf ("\\n");
- break;
-
- case '\b':
- printf ("\\b");
- break;
-
- case '\r':
- printf ("\\r");
- break;
-
- case '\t':
- printf ("\\t");
- break;
-
- case '\f':
- printf ("\\f");
- break;
-
- case ' ':
- printf ("\\ ");
- break;
-
- case '"':
- printf ("\\\"");
- break;
-
- default:
- if (c > 040 && c < 0177)
- putchar (c);
- else
- printf ("\\%03o", (unsigned int) c);
- }
- }
-}
-
-/* Read a pattern file (for the -E option). Put a list of
- `num_patterns' elements in `save_patterns'. Any patterns that were
- already in `save_patterns' (from the command line) are preserved. */
-
-static void
-read_pattern_file ()
-{
- int max_new_patterns;
- char **new_save_patterns;
- int new_num_patterns;
- int i;
- dynamic_string pattern_name;
- FILE *pattern_fp;
-
- if (num_patterns < 0)
- num_patterns = 0;
- max_new_patterns = 1 + num_patterns;
- new_save_patterns = (char **) xmalloc (max_new_patterns * sizeof (char *));
- new_num_patterns = num_patterns;
- ds_init (&pattern_name, 128);
-
- pattern_fp = fopen (pattern_file_name, "r");
- if (pattern_fp == NULL)
- open_error (pattern_file_name);
- while (ds_fgetstr (pattern_fp, &pattern_name, '\n') != NULL)
- {
- if (new_num_patterns >= max_new_patterns)
- {
- max_new_patterns += 1;
- new_save_patterns = (char **)
- xrealloc ((char *) new_save_patterns,
- max_new_patterns * sizeof (char *));
- }
- new_save_patterns[new_num_patterns] = xstrdup (pattern_name.ds_string);
- ++new_num_patterns;
- }
- if (ferror (pattern_fp) || fclose (pattern_fp) == EOF)
- close_error (pattern_file_name);
-
- for (i = 0; i < num_patterns; ++i)
- new_save_patterns[i] = save_patterns[i];
-
- save_patterns = new_save_patterns;
- num_patterns = new_num_patterns;
-}
-
-
-uintmax_t
-from_ascii (char const *where, size_t digs, unsigned logbase)
-{
- uintmax_t value = 0;
- char const *buf = where;
- char const *end = buf + digs;
- int overflow = 0;
- static char codetab[] = "0123456789ABCDEF";
-
- for (; *buf == ' '; buf++)
- {
- if (buf == end)
- return 0;
- }
-
- if (buf == end || *buf == 0)
- return 0;
- while (1)
- {
- unsigned d;
-
- char *p = strchr (codetab, toupper (*buf));
- if (!p)
- {
- error (0, 0, _("Malformed number %.*s"), digs, where);
- break;
- }
-
- d = p - codetab;
- if ((d >> logbase) > 1)
- {
- error (0, 0, _("Malformed number %.*s"), digs, where);
- break;
- }
- value += d;
- if (++buf == end || *buf == 0)
- break;
- overflow |= value ^ (value << logbase >> logbase);
- value <<= logbase;
- }
- if (overflow)
- error (0, 0, _("Archive value %.*s is out of range"),
- digs, where);
- return value;
-}
-
-
-
-/* Return 16-bit integer I with the bytes swapped. */
-#define swab_short(i) ((((i) << 8) & 0xff00) | (((i) >> 8) & 0x00ff))
-
-/* Read the header, including the name of the file, from file
- descriptor IN_DES into FILE_HDR. */
-
-void
-read_in_header (struct cpio_file_stat *file_hdr, int in_des)
-{
- union {
- char str[6];
- unsigned short num;
- struct old_cpio_header old_header;
- } magic;
- long bytes_skipped = 0; /* Bytes of junk found before magic number. */
-
- /* Search for a valid magic number. */
-
- if (archive_format == arf_unknown)
- {
- char tmpbuf[512];
- int check_tar;
- int peeked_bytes;
-
- while (archive_format == arf_unknown)
- {
- peeked_bytes = tape_buffered_peek (tmpbuf, in_des, 512);
- if (peeked_bytes < 6)
- error (1, 0, _("premature end of archive"));
-
- if (!strncmp (tmpbuf, "070701", 6))
- archive_format = arf_newascii;
- else if (!strncmp (tmpbuf, "070707", 6))
- archive_format = arf_oldascii;
- else if (!strncmp (tmpbuf, "070702", 6))
- {
- archive_format = arf_crcascii;
- crc_i_flag = true;
- }
- else if ((*((unsigned short *) tmpbuf) == 070707) ||
- (*((unsigned short *) tmpbuf) == swab_short ((unsigned short) 070707)))
- archive_format = arf_binary;
- else if (peeked_bytes >= 512
- && (check_tar = is_tar_header (tmpbuf)))
- {
- if (check_tar == 2)
- archive_format = arf_ustar;
- else
- archive_format = arf_tar;
- }
- else
- {
- tape_buffered_read ((char *) tmpbuf, in_des, 1L);
- ++bytes_skipped;
- }
- }
- }
-
- if (archive_format == arf_tar || archive_format == arf_ustar)
- {
- if (append_flag)
- last_header_start = input_bytes - io_block_size +
- (in_buff - input_buffer);
- if (bytes_skipped > 0)
- warn_junk_bytes (bytes_skipped);
-
- read_in_tar_header (file_hdr, in_des);
- return;
- }
-
- file_hdr->c_tar_linkname = NULL;
-
- tape_buffered_read (magic.str, in_des, 6L);
- while (1)
- {
- if (append_flag)
- last_header_start = input_bytes - io_block_size
- + (in_buff - input_buffer) - 6;
- if (archive_format == arf_newascii
- && !strncmp (magic.str, "070701", 6))
- {
- if (bytes_skipped > 0)
- warn_junk_bytes (bytes_skipped);
- file_hdr->c_magic = 070701;
- read_in_new_ascii (file_hdr, in_des);
- break;
- }
- if (archive_format == arf_crcascii
- && !strncmp (magic.str, "070702", 6))
- {
- if (bytes_skipped > 0)
- warn_junk_bytes (bytes_skipped);
- file_hdr->c_magic = 070702;
- read_in_new_ascii (file_hdr, in_des);
- break;
- }
- if ( (archive_format == arf_oldascii || archive_format == arf_hpoldascii)
- && !strncmp (magic.str, "070707", 6))
- {
- if (bytes_skipped > 0)
- warn_junk_bytes (bytes_skipped);
- file_hdr->c_magic = 070707;
- read_in_old_ascii (file_hdr, in_des);
- break;
- }
- if ( (archive_format == arf_binary || archive_format == arf_hpbinary)
- && (magic.num == 070707
- || magic.num == swab_short ((unsigned short) 070707)))
- {
- /* Having to skip 1 byte because of word alignment is normal. */
- if (bytes_skipped > 0)
- warn_junk_bytes (bytes_skipped);
- file_hdr->c_magic = 070707;
- read_in_binary (file_hdr, &magic.old_header, in_des);
- break;
- }
- bytes_skipped++;
- memmove (magic.str, magic.str + 1, 5);
- tape_buffered_read (magic.str, in_des, 1L);
- }
-}
-
-/* Fill in FILE_HDR by reading an old-format ASCII format cpio header from
- file descriptor IN_DES, except for the magic number, which is
- already filled in. */
-
-void
-read_in_old_ascii (struct cpio_file_stat *file_hdr, int in_des)
-{
- struct old_ascii_header ascii_header;
- unsigned long dev;
-
- tape_buffered_read (ascii_header.c_dev, in_des,
- sizeof ascii_header - sizeof ascii_header.c_magic);
- dev = FROM_OCTAL (ascii_header.c_dev);
- file_hdr->c_dev_maj = major (dev);
- file_hdr->c_dev_min = minor (dev);
-
- file_hdr->c_ino = FROM_OCTAL (ascii_header.c_ino);
- file_hdr->c_mode = FROM_OCTAL (ascii_header.c_mode);
- file_hdr->c_uid = FROM_OCTAL (ascii_header.c_uid);
- file_hdr->c_gid = FROM_OCTAL (ascii_header.c_gid);
- file_hdr->c_nlink = FROM_OCTAL (ascii_header.c_nlink);
- dev = FROM_OCTAL (ascii_header.c_rdev);
- file_hdr->c_rdev_maj = major (dev);
- file_hdr->c_rdev_min = minor (dev);
-
- file_hdr->c_mtime = FROM_OCTAL (ascii_header.c_mtime);
- file_hdr->c_namesize = FROM_OCTAL (ascii_header.c_namesize);
- file_hdr->c_filesize = FROM_OCTAL (ascii_header.c_filesize);
-
- /* Read file name from input. */
- if (file_hdr->c_name != NULL)
- free (file_hdr->c_name);
- file_hdr->c_name = (char *) xmalloc (file_hdr->c_namesize + 1);
- tape_buffered_read (file_hdr->c_name, in_des, (long) file_hdr->c_namesize);
-
- /* HP/UX cpio creates archives that look just like ordinary archives,
- but for devices it sets major = 0, minor = 1, and puts the
- actual major/minor number in the filesize field. See if this
- is an HP/UX cpio archive, and if so fix it. We have to do this
- here because process_copy_in() assumes filesize is always 0
- for devices. */
- switch (file_hdr->c_mode & CP_IFMT)
- {
- case CP_IFCHR:
- case CP_IFBLK:
-#ifdef CP_IFSOCK
- case CP_IFSOCK:
-#endif
-#ifdef CP_IFIFO
- case CP_IFIFO:
-#endif
- if (file_hdr->c_filesize != 0
- && file_hdr->c_rdev_maj == 0
- && file_hdr->c_rdev_min == 1)
- {
- file_hdr->c_rdev_maj = major (file_hdr->c_filesize);
- file_hdr->c_rdev_min = minor (file_hdr->c_filesize);
- file_hdr->c_filesize = 0;
- }
- break;
- default:
- break;
- }
-}
-
-/* Fill in FILE_HDR by reading a new-format ASCII format cpio header from
- file descriptor IN_DES, except for the magic number, which is
- already filled in. */
-
-void
-read_in_new_ascii (struct cpio_file_stat *file_hdr, int in_des)
-{
- struct new_ascii_header ascii_header;
-
- tape_buffered_read (ascii_header.c_ino, in_des,
- sizeof ascii_header - sizeof ascii_header.c_magic);
-
- file_hdr->c_ino = FROM_HEX (ascii_header.c_ino);
- file_hdr->c_mode = FROM_HEX (ascii_header.c_mode);
- file_hdr->c_uid = FROM_HEX (ascii_header.c_uid);
- file_hdr->c_gid = FROM_HEX (ascii_header.c_gid);
- file_hdr->c_nlink = FROM_HEX (ascii_header.c_nlink);
- file_hdr->c_mtime = FROM_HEX (ascii_header.c_mtime);
- file_hdr->c_filesize = FROM_HEX (ascii_header.c_filesize);
- file_hdr->c_dev_maj = FROM_HEX (ascii_header.c_dev_maj);
- file_hdr->c_dev_min = FROM_HEX (ascii_header.c_dev_min);
- file_hdr->c_rdev_maj = FROM_HEX (ascii_header.c_rdev_maj);
- file_hdr->c_rdev_min = FROM_HEX (ascii_header.c_rdev_min);
- file_hdr->c_namesize = FROM_HEX (ascii_header.c_namesize);
- file_hdr->c_chksum = FROM_HEX (ascii_header.c_chksum);
-
- /* Read file name from input. */
- if (file_hdr->c_name != NULL)
- free (file_hdr->c_name);
- file_hdr->c_name = (char *) xmalloc (file_hdr->c_namesize);
- tape_buffered_read (file_hdr->c_name, in_des, (long) file_hdr->c_namesize);
-
- /* In SVR4 ASCII format, the amount of space allocated for the header
- is rounded up to the next long-word, so we might need to drop
- 1-3 bytes. */
- tape_skip_padding (in_des, file_hdr->c_namesize + 110);
-}
-
-/* Fill in FILE_HDR by reading a binary format cpio header from
- file descriptor IN_DES, except for the first 6 bytes (the magic
- number, device, and inode number), which are already filled in. */
-
-void
-read_in_binary (struct cpio_file_stat *file_hdr,
- struct old_cpio_header *short_hdr,
- int in_des)
-{
- file_hdr->c_magic = short_hdr->c_magic;
-
- tape_buffered_read (((char *) short_hdr) + 6, in_des,
- sizeof *short_hdr - 6 /* = 20 */);
-
- /* If the magic number is byte swapped, fix the header. */
- if (file_hdr->c_magic == swab_short ((unsigned short) 070707))
- {
- static int warned = 0;
-
- /* Alert the user that they might have to do byte swapping on
- the file contents. */
- if (warned == 0)
- {
- error (0, 0, _("warning: archive header has reverse byte-order"));
- warned = 1;
- }
- swab_array ((char *) &short_hdr, 13);
- }
-
- file_hdr->c_dev_maj = major (short_hdr->c_dev);
- file_hdr->c_dev_min = minor (short_hdr->c_dev);
- file_hdr->c_ino = short_hdr->c_ino;
- file_hdr->c_mode = short_hdr->c_mode;
- file_hdr->c_uid = short_hdr->c_uid;
- file_hdr->c_gid = short_hdr->c_gid;
- file_hdr->c_nlink = short_hdr->c_nlink;
- file_hdr->c_rdev_maj = major (short_hdr->c_rdev);
- file_hdr->c_rdev_min = minor (short_hdr->c_rdev);
- file_hdr->c_mtime = (unsigned long) short_hdr->c_mtimes[0] << 16
- | short_hdr->c_mtimes[1];
-
- file_hdr->c_namesize = short_hdr->c_namesize;
- file_hdr->c_filesize = (unsigned long) short_hdr->c_filesizes[0] << 16
- | short_hdr->c_filesizes[1];
-
- /* Read file name from input. */
- if (file_hdr->c_name != NULL)
- free (file_hdr->c_name);
- file_hdr->c_name = (char *) xmalloc (file_hdr->c_namesize);
- tape_buffered_read (file_hdr->c_name, in_des, (long) file_hdr->c_namesize);
-
- /* In binary mode, the amount of space allocated in the header for
- the filename is `c_namesize' rounded up to the next short-word,
- so we might need to drop a byte. */
- if (file_hdr->c_namesize % 2)
- tape_toss_input (in_des, 1L);
-
- /* HP/UX cpio creates archives that look just like ordinary archives,
- but for devices it sets major = 0, minor = 1, and puts the
- actual major/minor number in the filesize field. See if this
- is an HP/UX cpio archive, and if so fix it. We have to do this
- here because process_copy_in() assumes filesize is always 0
- for devices. */
- switch (file_hdr->c_mode & CP_IFMT)
- {
- case CP_IFCHR:
- case CP_IFBLK:
-#ifdef CP_IFSOCK
- case CP_IFSOCK:
-#endif
-#ifdef CP_IFIFO
- case CP_IFIFO:
-#endif
- if (file_hdr->c_filesize != 0
- && file_hdr->c_rdev_maj == 0
- && file_hdr->c_rdev_min == 1)
- {
- file_hdr->c_rdev_maj = major (file_hdr->c_filesize);
- file_hdr->c_rdev_min = minor (file_hdr->c_filesize);
- file_hdr->c_filesize = 0;
- }
- break;
- default:
- break;
- }
-}
-
-/* Exchange the bytes of each element of the array of COUNT shorts
- starting at PTR. */
-
-void
-swab_array (char *ptr, int count)
-{
- char tmp;
-
- while (count-- > 0)
- {
- tmp = *ptr;
- *ptr = *(ptr + 1);
- ++ptr;
- *ptr = tmp;
- ++ptr;
- }
-}
-
-/* Read the collection from standard input and create files
- in the file system. */
-
-void
-process_copy_in ()
-{
- char done = false; /* True if trailer reached. */
- FILE *tty_in = NULL; /* Interactive file for rename option. */
- FILE *tty_out = NULL; /* Interactive file for rename option. */
- FILE *rename_in = NULL; /* Batch file for rename option. */
- struct stat file_stat; /* Output file stat record. */
- struct cpio_file_stat file_hdr; /* Output header information. */
- int in_file_des; /* Input file descriptor. */
- char skip_file; /* Flag for use with patterns. */
- int i; /* Loop index variable. */
-
- umask (0); /* Reset umask to preserve modes of
- created files */
-
- /* Initialize the copy in. */
- if (pattern_file_name)
- {
- read_pattern_file ();
- }
- file_hdr.c_name = NULL;
-
- if (rename_batch_file)
- {
- rename_in = fopen (rename_batch_file, "r");
- if (rename_in == NULL)
- {
- error (2, errno, TTY_NAME);
- }
- }
- else if (rename_flag)
- {
- /* Open interactive file pair for rename operation. */
- tty_in = fopen (TTY_NAME, "r");
- if (tty_in == NULL)
- {
- error (2, errno, TTY_NAME);
- }
- tty_out = fopen (TTY_NAME, "w");
- if (tty_out == NULL)
- {
- error (2, errno, TTY_NAME);
- }
- }
-
- /* Get date and time if needed for processing the table option. */
- if (table_flag && verbose_flag)
- {
- time (¤t_time);
- }
-
- /* Check whether the input file might be a tape. */
- in_file_des = archive_des;
- if (_isrmt (in_file_des))
- {
- input_is_special = 1;
- input_is_seekable = 0;
- }
- else
- {
- if (fstat (in_file_des, &file_stat))
- error (1, errno, _("standard input is closed"));
- input_is_special =
-#ifdef S_ISBLK
- S_ISBLK (file_stat.st_mode) ||
-#endif
- S_ISCHR (file_stat.st_mode);
- input_is_seekable = S_ISREG (file_stat.st_mode);
- }
- output_is_seekable = true;
-
- /* While there is more input in the collection, process the input. */
- while (!done)
- {
- swapping_halfwords = swapping_bytes = false;
-
- /* Start processing the next file by reading the header. */
- read_in_header (&file_hdr, in_file_des);
-
-#ifdef DEBUG_CPIO
- if (debug_flag)
- {
- struct cpio_file_stat *h;
- h = &file_hdr;
- fprintf (stderr,
- "magic = 0%o, ino = %d, mode = 0%o, uid = %d, gid = %d\n",
- h->c_magic, h->c_ino, h->c_mode, h->c_uid, h->c_gid);
- fprintf (stderr,
- "nlink = %d, mtime = %d, filesize = %d, dev_maj = 0x%x\n",
- h->c_nlink, h->c_mtime, h->c_filesize, h->c_dev_maj);
- fprintf (stderr,
- "dev_min = 0x%x, rdev_maj = 0x%x, rdev_min = 0x%x, namesize = %d\n",
- h->c_dev_min, h->c_rdev_maj, h->c_rdev_min, h->c_namesize);
- fprintf (stderr,
- "chksum = %d, name = \"%s\", tar_linkname = \"%s\"\n",
- h->c_chksum, h->c_name,
- h->c_tar_linkname ? h->c_tar_linkname : "(null)" );
-
- }
-#endif
- /* Is this the header for the TRAILER file? */
- if (strcmp (CPIO_TRAILER_NAME, file_hdr.c_name) == 0)
- {
- done = true;
- break;
- }
-
- cpio_safer_name_suffix (file_hdr.c_name, false, !no_abs_paths_flag,
- false);
-
- /* Does the file name match one of the given patterns? */
- if (num_patterns <= 0)
- skip_file = false;
- else
- {
- skip_file = copy_matching_files;
- for (i = 0; i < num_patterns
- && skip_file == copy_matching_files; i++)
- {
- if (fnmatch (save_patterns[i], file_hdr.c_name, 0) == 0)
- skip_file = !copy_matching_files;
- }
- }
-
- if (skip_file)
- {
- /* If we're skipping a file with links, there might be other
- links that we didn't skip, and this file might have the
- data for the links. If it does, we'll copy in the data
- to the links, but not to this file. */
- if (file_hdr.c_nlink > 1 && (archive_format == arf_newascii
- || archive_format == arf_crcascii) )
- {
- if (create_defered_links_to_skipped(&file_hdr, in_file_des) < 0)
- {
- tape_toss_input (in_file_des, file_hdr.c_filesize);
- tape_skip_padding (in_file_des, file_hdr.c_filesize);
- }
- }
- else
- {
- tape_toss_input (in_file_des, file_hdr.c_filesize);
- tape_skip_padding (in_file_des, file_hdr.c_filesize);
- }
- }
- else if (table_flag)
- {
- list_file(&file_hdr, in_file_des);
- }
- else if (append_flag)
- {
- tape_toss_input (in_file_des, file_hdr.c_filesize);
- tape_skip_padding (in_file_des, file_hdr.c_filesize);
- }
- else if (only_verify_crc_flag)
- {
-#ifdef CP_IFLNK
- if ((file_hdr.c_mode & CP_IFMT) == CP_IFLNK)
- {
- if (archive_format != arf_tar && archive_format != arf_ustar)
- {
- tape_toss_input (in_file_des, file_hdr.c_filesize);
- tape_skip_padding (in_file_des, file_hdr.c_filesize);
- continue;
- }
- }
-#endif
- crc = 0;
- tape_toss_input (in_file_des, file_hdr.c_filesize);
- tape_skip_padding (in_file_des, file_hdr.c_filesize);
- if (crc != file_hdr.c_chksum)
- {
- error (0, 0, _("%s: checksum error (0x%lx, should be 0x%lx)"),
- file_hdr.c_name, crc, file_hdr.c_chksum);
- }
- /* Debian hack: -v and -V now work with --only-verify-crc.
- (99/11/10) -BEM */
- if (verbose_flag)
- {
- fprintf (stderr, "%s\n", file_hdr.c_name);
- }
- if (dot_flag)
- {
- fputc ('.', stderr);
- }
- }
- else
- {
- /* Copy the input file into the directory structure. */
-
- /* Do we need to rename the file? */
- if (rename_flag || rename_batch_file)
- {
- if (query_rename(&file_hdr, tty_in, tty_out, rename_in) < 0)
- {
- tape_toss_input (in_file_des, file_hdr.c_filesize);
- tape_skip_padding (in_file_des, file_hdr.c_filesize);
- continue;
- }
- }
-
- copyin_file(&file_hdr, in_file_des);
-
- if (verbose_flag)
- fprintf (stderr, "%s\n", file_hdr.c_name);
- if (dot_flag)
- fputc ('.', stderr);
- }
- }
-
- if (dot_flag)
- fputc ('\n', stderr);
-
- if (append_flag)
- return;
-
- if (archive_format == arf_newascii || archive_format == arf_crcascii)
- {
- create_final_defers ();
- }
- if (!quiet_flag)
- {
- int blocks;
- blocks = (input_bytes + io_block_size - 1) / io_block_size;
- fprintf (stderr, ngettext ("%d block\n", "%d blocks\n", blocks), blocks);
- }
-}
-
--- contrib/cpio/src/idcache.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/* idcache.c -- map user and group IDs, cached for speed
- Copyright (C) 1985, 1988, 1989, 1990, 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; 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 <stdio.h>
-#include <sys/types.h>
-#include <pwd.h>
-#include <grp.h>
-
-#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
-#include <string.h>
-#else
-#include <strings.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifndef _POSIX_VERSION
-struct passwd *getpwuid ();
-struct passwd *getpwnam ();
-struct group *getgrgid ();
-struct group *getgrnam ();
-#endif
-
-char *xmalloc ();
-char *xstrdup ();
-
-struct userid
-{
- union
- {
- uid_t u;
- gid_t g;
- } id;
- char *name;
- struct userid *next;
-};
-
-static struct userid *user_alist;
-
-/* The members of this list have names not in the local passwd file. */
-static struct userid *nouser_alist;
-
-/* Translate UID to a login name or a stringified number,
- with cache. */
-
-char *
-getuser (uid_t uid)
-{
- register struct userid *tail;
- struct passwd *pwent;
- char usernum_string[20];
-
- for (tail = user_alist; tail; tail = tail->next)
- if (tail->id.u == uid)
- return tail->name;
-
- pwent = getpwuid (uid);
- tail = (struct userid *) xmalloc (sizeof (struct userid));
- tail->id.u = uid;
- if (pwent == 0)
- {
- sprintf (usernum_string, "%u", (unsigned) uid);
- tail->name = xstrdup (usernum_string);
- }
- else
- tail->name = xstrdup (pwent->pw_name);
-
- /* Add to the head of the list, so most recently used is first. */
- tail->next = user_alist;
- user_alist = tail;
- return tail->name;
-}
-
-/* Translate USER to a UID, with cache.
- Return NULL if there is no such user.
- (We also cache which user names have no passwd entry,
- so we don't keep looking them up.) */
-
-uid_t *
-getuidbyname (char *user)
-{
- register struct userid *tail;
- struct passwd *pwent;
-
- for (tail = user_alist; tail; tail = tail->next)
- /* Avoid a function call for the most common case. */
- if (*tail->name == *user && !strcmp (tail->name, user))
- return &tail->id.u;
-
- for (tail = nouser_alist; tail; tail = tail->next)
- /* Avoid a function call for the most common case. */
- if (*tail->name == *user && !strcmp (tail->name, user))
- return 0;
-
- pwent = getpwnam (user);
-
- tail = (struct userid *) xmalloc (sizeof (struct userid));
- tail->name = xstrdup (user);
-
- /* Add to the head of the list, so most recently used is first. */
- if (pwent)
- {
- tail->id.u = pwent->pw_uid;
- tail->next = user_alist;
- user_alist = tail;
- return &tail->id.u;
- }
-
- tail->next = nouser_alist;
- nouser_alist = tail;
- return 0;
-}
-
-/* Use the same struct as for userids. */
-static struct userid *group_alist;
-static struct userid *nogroup_alist;
-
-/* Translate GID to a group name or a stringified number,
- with cache. */
-
-char *
-getgroup (gid_t gid)
-{
- register struct userid *tail;
- struct group *grent;
- char groupnum_string[20];
-
- for (tail = group_alist; tail; tail = tail->next)
- if (tail->id.g == gid)
- return tail->name;
-
- grent = getgrgid (gid);
- tail = (struct userid *) xmalloc (sizeof (struct userid));
- tail->id.g = gid;
- if (grent == 0)
- {
- sprintf (groupnum_string, "%u", (unsigned int) gid);
- tail->name = xstrdup (groupnum_string);
- }
- else
- tail->name = xstrdup (grent->gr_name);
-
- /* Add to the head of the list, so most recently used is first. */
- tail->next = group_alist;
- group_alist = tail;
- return tail->name;
-}
-
-/* Translate GROUP to a UID, with cache.
- Return NULL if there is no such group.
- (We also cache which group names have no group entry,
- so we don't keep looking them up.) */
-
-gid_t *
-getgidbyname (char *group)
-{
- register struct userid *tail;
- struct group *grent;
-
- for (tail = group_alist; tail; tail = tail->next)
- /* Avoid a function call for the most common case. */
- if (*tail->name == *group && !strcmp (tail->name, group))
- return &tail->id.g;
-
- for (tail = nogroup_alist; tail; tail = tail->next)
- /* Avoid a function call for the most common case. */
- if (*tail->name == *group && !strcmp (tail->name, group))
- return 0;
-
- grent = getgrnam (group);
-
- tail = (struct userid *) xmalloc (sizeof (struct userid));
- tail->name = xstrdup (group);
-
- /* Add to the head of the list, so most recently used is first. */
- if (grent)
- {
- tail->id.g = grent->gr_gid;
- tail->next = group_alist;
- group_alist = tail;
- return &tail->id.g;
- }
-
- tail->next = nogroup_alist;
- nogroup_alist = tail;
- return 0;
-}
--- contrib/cpio/src/makepath.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/* makepath.c -- Ensure that a directory path exists.
- Copyright (C) 1990, 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 David MacKenzie <djm at gnu.ai.mit.edu> and
- Jim Meyering <meyering at cs.utexas.edu>. */
-
-/* This copy of makepath is almost like the fileutils one, but has
- changes for HPUX CDF's. Maybe the 2 versions of makepath can
- come together again in the future. */
-
-#include <system.h>
-#include <paxlib.h>
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-/* Ensure that the directory ARGPATH exists.
- Remove any trailing slashes from ARGPATH before calling this function.
-
- Make any leading directories that don't already exist, with
- permissions PARENT_MODE.
- If the last element of ARGPATH does not exist, create it as
- a new directory with permissions MODE.
- If OWNER and GROUP are non-negative, make them the UID and GID of
- created directories.
- If VERBOSE_FMT_STRING is nonzero, use it as a printf format
- string for printing a message after successfully making a directory,
- with the name of the directory that was just made as an argument.
-
- Return 0 if ARGPATH exists as a directory with the proper
- ownership and permissions when done, otherwise 1. */
-
-int
-make_path (char *argpath,
- int mode,
- int parent_mode,
- uid_t owner,
- gid_t group,
- char *verbose_fmt_string)
-{
- char *dirpath; /* A copy we can scribble NULs on. */
- struct stat stats;
- int retval = 0;
- int oldmask = umask (0);
- dirpath = alloca (strlen (argpath) + 1);
- strcpy (dirpath, argpath);
-
- if (stat (dirpath, &stats))
- {
- char *slash;
- int tmp_mode; /* Initial perms for leading dirs. */
- int re_protect; /* Should leading dirs be unwritable? */
- struct ptr_list
- {
- char *dirname_end;
- struct ptr_list *next;
- };
- struct ptr_list *p, *leading_dirs = NULL;
-
- /* If leading directories shouldn't be writable or executable,
- or should have set[ug]id or sticky bits set and we are setting
- their owners, we need to fix their permissions after making them. */
- if (((parent_mode & 0300) != 0300)
- || (owner != (uid_t) -1 && group != (gid_t) -1
- && (parent_mode & 07000) != 0))
- {
- tmp_mode = 0700;
- re_protect = 1;
- }
- else
- {
- tmp_mode = parent_mode;
- re_protect = 0;
- }
-
- slash = dirpath;
- while (*slash == '/')
- slash++;
- while ((slash = strchr (slash, '/')))
- {
-#ifdef HPUX_CDF
- int iscdf;
- iscdf = 0;
-#endif
- *slash = '\0';
- if (stat (dirpath, &stats))
- {
-#ifdef HPUX_CDF
- /* If this component of the pathname ends in `+' and is
- followed by 2 `/'s, then this is a CDF. We remove the
- `+' from the name and create the directory. Later
- we will "hide" the directory. */
- if ( (*(slash +1) == '/') && (*(slash -1) == '+') )
- {
- iscdf = 1;
- *(slash -1) = '\0';
- }
-#endif
- if (mkdir (dirpath, tmp_mode))
- {
- error (0, errno, _("cannot make directory `%s'"), dirpath);
- umask (oldmask);
- return 1;
- }
- else
- {
- if (verbose_fmt_string != NULL)
- error (0, 0, verbose_fmt_string, dirpath);
-
- if (owner != (uid_t) -1 && group != (gid_t) -1
- && chown (dirpath, owner, group)
-#ifdef AFS
- && errno != EPERM
-#endif
- )
- {
- chown_error_details (dirpath, owner, group);
- retval = 1;
- }
- if (re_protect)
- {
- struct ptr_list *new = (struct ptr_list *)
- alloca (sizeof (struct ptr_list));
- new->dirname_end = slash;
- new->next = leading_dirs;
- leading_dirs = new;
- }
-#ifdef HPUX_CDF
- if (iscdf)
- {
- /* If this is a CDF, "hide" the directory by setting
- its hidden/setuid bit. Also add the `+' back to
- its name (since once it's "hidden" we must refer
- to as `name+' instead of `name'). */
- chmod (dirpath, 04700);
- *(slash - 1) = '+';
- }
-#endif
- }
- }
- else if (!S_ISDIR (stats.st_mode))
- {
- error (0, 0, _("`%s' exists but is not a directory"), dirpath);
- umask (oldmask);
- return 1;
- }
-
- *slash++ = '/';
-
- /* Avoid unnecessary calls to `stat' when given
- pathnames containing multiple adjacent slashes. */
- while (*slash == '/')
- slash++;
- }
-
- /* We're done making leading directories.
- Make the final component of the path. */
-
- if (mkdir (dirpath, mode))
- {
- /* In some cases, if the final component in dirpath was `.' then we
- just got an EEXIST error from that last mkdir(). If that's
- the case, ignore it. */
- if ( (errno != EEXIST) ||
- (stat (dirpath, &stats) != 0) ||
- (!S_ISDIR (stats.st_mode) ) )
- {
- error (0, errno, _("cannot make directory `%s'"), dirpath);
- umask (oldmask);
- return 1;
- }
- }
- if (verbose_fmt_string != NULL)
- error (0, 0, verbose_fmt_string, dirpath);
-
- if (owner != (uid_t) -1 && group != (gid_t) -1)
- {
- if (chown (dirpath, owner, group)
-#ifdef AFS
- && errno != EPERM
-#endif
- )
- {
- chown_error_details (dirpath, owner, group);
- retval = 1;
- }
- }
- /* chown may have turned off some permission bits we wanted. */
- if ((mode & 07000) != 0 && chmod (dirpath, mode))
- {
- chmod_error_details (dirpath, mode);
- retval = 1;
- }
-
- /* If the mode for leading directories didn't include owner "wx"
- privileges, we have to reset their protections to the correct
- value. */
- for (p = leading_dirs; p != NULL; p = p->next)
- {
- *p->dirname_end = '\0';
-#if 0
- /* cpio always calls make_path with parent mode 0700, so
- we don't have to do this. If we ever do have to do this,
- we have to stat the directory first to get the setuid
- bit so we don't break HP CDF's. */
- if (chmod (dirpath, parent_mode))
- {
- chmod_error_details (dirpath, parent_mode);
- retval = 1;
- }
-#endif
-
- }
- }
- else
- {
- /* We get here if the entire path already exists. */
-
- if (!S_ISDIR (stats.st_mode))
- {
- error (0, 0, _("`%s' exists but is not a directory"), dirpath);
- umask (oldmask);
- return 1;
- }
-
- /* chown must precede chmod because on some systems,
- chown clears the set[ug]id bits for non-superusers,
- resulting in incorrect permissions.
- On System V, users can give away files with chown and then not
- be able to chmod them. So don't give files away. */
-
- if (owner != (uid_t) -1 && group != (gid_t) -1
- && chown (dirpath, owner, group)
-#ifdef AFS
- && errno != EPERM
-#endif
- )
- {
- chown_error_details (dirpath, owner, group);
- retval = 1;
- }
- if (chmod (dirpath, mode))
- {
- chmod_error_details (dirpath, mode);
- retval = 1;
- }
- }
-
- umask (oldmask);
- return retval;
-}
--- contrib/cpio/src/defer.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* defer.c - handle "defered" links in newc and crc archives
- Copyright (C) 1993, 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. */
-
-#include <system.h>
-
-#include <stdio.h>
-#include <sys/types.h>
-#include "cpiohdr.h"
-#include "extern.h"
-#include "defer.h"
-
-struct deferment *
-create_deferment (struct cpio_file_stat *file_hdr)
-{
- struct deferment *d;
- d = (struct deferment *) xmalloc (sizeof (struct deferment) );
- d->header = *file_hdr;
- d->header.c_name = (char *) xmalloc (strlen (file_hdr->c_name) + 1);
- strcpy (d->header.c_name, file_hdr->c_name);
- return d;
-}
-
-void
-free_deferment (struct deferment *d)
-{
- free (d->header.c_name);
- free (d);
-}
--- contrib/cpio/lib/.deps/printf-parse.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argp-ba.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/close-stream.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/asnprintf.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/offtostr.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/sleep.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/dup-safer.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/version-etc-fsf.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/strncasecmp.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/hash.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/dup2.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/strerror.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/gettimeofday.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/strcasecmp.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argp-xinl.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/dirname.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argp-eexst.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/uinttostr.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/strchrnul.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/inttostr.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/pipe-safer.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/strtol.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argp-pin.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/mempcpy.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/fnmatch.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/unsetenv.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/paxerror.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/fchdir.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/xstrndup.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/fnmatch_loop.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/alloca.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/safe-read.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/mktime.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argp-parse.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/mkdirat.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/vasnprintf.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/lstat.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/at-func.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/setenv.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/stpcpy.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/save-cwd.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/lchown.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/full-write.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argp-fmtstream.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/fatal.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argmatch.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/canonicalize-lgpl.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/openat.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/xgetcwd.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/version-etc.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/fchmodat.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/utimens.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/strndup.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/fstatat.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/strnlen.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/safe-write.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/readlink.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/getopt1.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/xalloc-die.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/fchownat.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/getdate.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/gettime.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/closeout.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/obstack.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/allocsa.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/printf-args.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/fileblocks.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/time_r.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/quote.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/imaxtostr.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/strdup.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/exitfail.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argp-help.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/chown.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/fd-safer.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/getopt.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argp-pvh.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argp-pv.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/stripslash.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/getcwd.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/error.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/openat-proc.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/malloc.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/umaxtostr.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/xmalloc.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/creat-safer.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/fchown-stub.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/vsnprintf.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/basename.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/argp-fs-xinl.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/paxnames.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/dirfd.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/__fpending.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/savedir.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/openat-die.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/paxexit.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/memrchr.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/open-safer.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/chdir-long.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/quotearg.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/lib/.deps/rtapelib.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/build-aux/config.rpath
+++ /dev/null
@@ -1,614 +0,0 @@
-#! /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 at 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 at 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
--- contrib/cpio/build-aux/missing
+++ /dev/null
@@ -1,367 +0,0 @@
-#! /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 at 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 at 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:
--- contrib/cpio/build-aux/mkinstalldirs
+++ /dev/null
@@ -1,161 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-
-scriptversion=2006-05-11.19
-
-# Original author: Noah Friedman <friedman at prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain.
-#
-# This file is maintained in Automake, please report
-# bugs to <bug-automake at gnu.org> or send patches to
-# <automake-patches at 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 at 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:
--- contrib/cpio/build-aux/install-sh
+++ /dev/null
@@ -1,519 +0,0 @@
-#!/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:
--- contrib/cpio/build-aux/texinfo.tex
+++ /dev/null
@@ -1,8641 +0,0 @@
-% texinfo.tex -- TeX macros to handle Texinfo files.
-%
-% Load plain if necessary, i.e., if running under initex.
-\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
-%
-\def\texinfoversion{2007-05-04.09}
-%
-% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
-% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007 Free Software Foundation, Inc.
-%
-% This texinfo.tex file is free software; you can redistribute it and/or
-% modify it under the terms of the GNU General Public License as
-% published by the Free Software Foundation; either version 2, or (at
-% your option) any later version.
-%
-% This texinfo.tex file 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 texinfo.tex file; see the file COPYING. If not, write
-% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-% Boston, MA 02110-1301, USA.
-%
-% As a special exception, when this file is read by TeX when processing
-% a Texinfo source document, you may use the result without
-% restriction. (This has been our intent since Texinfo was invented.)
-%
-% Please try the latest version of texinfo.tex before submitting bug
-% reports; you can get the latest version from:
-% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
-% ftp://tug.org/tex/texinfo.tex
-% (and all CTAN mirrors, see http://www.ctan.org).
-% The texinfo.tex in any given distribution could well be out
-% of date, so if that's what you're using, please check.
-%
-% Send bug reports to bug-texinfo at gnu.org. Please include including a
-% complete document in each bug report with which we can reproduce the
-% problem. Patches are, of course, greatly appreciated.
-%
-% To process a Texinfo manual with TeX, it's most reliable to use the
-% texi2dvi shell script that comes with the distribution. For a simple
-% manual foo.texi, however, you can get away with this:
-% tex foo.texi
-% texindex foo.??
-% tex foo.texi
-% tex foo.texi
-% dvips foo.dvi -o # or whatever; this makes foo.ps.
-% The extra TeX runs get the cross-reference information correct.
-% Sometimes one run after texindex suffices, and sometimes you need more
-% than two; texi2dvi does it as many times as necessary.
-%
-% It is possible to adapt texinfo.tex for other languages, to some
-% extent. You can get the existing language-specific files from the
-% full Texinfo distribution.
-%
-% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
-
-
-\message{Loading texinfo [version \texinfoversion]:}
-
-% If in a .fmt file, print the version number
-% and turn on active characters that we couldn't do earlier because
-% they might have appeared in the input file name.
-\everyjob{\message{[Texinfo version \texinfoversion]}%
- \catcode`+=\active \catcode`\_=\active}
-
-
-\chardef\other=12
-
-% We never want plain's \outer definition of \+ in Texinfo.
-% For @tex, we can use \tabalign.
-\let\+ = \relax
-
-% Save some plain tex macros whose names we will redefine.
-\let\ptexb=\b
-\let\ptexbullet=\bullet
-\let\ptexc=\c
-\let\ptexcomma=\,
-\let\ptexdot=\.
-\let\ptexdots=\dots
-\let\ptexend=\end
-\let\ptexequiv=\equiv
-\let\ptexexclam=\!
-\let\ptexfootnote=\footnote
-\let\ptexgtr=>
-\let\ptexhat=^
-\let\ptexi=\i
-\let\ptexindent=\indent
-\let\ptexinsert=\insert
-\let\ptexlbrace=\{
-\let\ptexless=<
-\let\ptexnewwrite\newwrite
-\let\ptexnoindent=\noindent
-\let\ptexplus=+
-\let\ptexrbrace=\}
-\let\ptexslash=\/
-\let\ptexstar=\*
-\let\ptext=\t
-
-% If this character appears in an error message or help string, it
-% starts a new line in the output.
-\newlinechar = `^^J
-
-% Use TeX 3.0's \inputlineno to get the line number, for better error
-% messages, but if we're using an old version of TeX, don't do anything.
-%
-\ifx\inputlineno\thisisundefined
- \let\linenumber = \empty % Pre-3.0.
-\else
- \def\linenumber{l.\the\inputlineno:\space}
-\fi
-
-% Set up fixed words for English if not already set.
-\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
-\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
-\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
-\ifx\putwordin\undefined \gdef\putwordin{in}\fi
-\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
-\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
-\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
-\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
-\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
-\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
-\ifx\putwordof\undefined \gdef\putwordof{of}\fi
-\ifx\putwordon\undefined \gdef\putwordon{on}\fi
-\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
-\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
-\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
-\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
-\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
-\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
-\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
-%
-\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
-\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
-\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
-\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
-\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
-\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
-\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
-\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
-\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
-\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
-\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
-\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
-%
-\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
-\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
-\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
-\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
-\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
-
-% Since the category of space is not known, we have to be careful.
-\chardef\spacecat = 10
-\def\spaceisspace{\catcode`\ =\spacecat}
-
-% sometimes characters are active, so we need control sequences.
-\chardef\colonChar = `\:
-\chardef\commaChar = `\,
-\chardef\dashChar = `\-
-\chardef\dotChar = `\.
-\chardef\exclamChar= `\!
-\chardef\lquoteChar= `\`
-\chardef\questChar = `\?
-\chardef\rquoteChar= `\'
-\chardef\semiChar = `\;
-\chardef\underChar = `\_
-
-% Ignore a token.
-%
-\def\gobble#1{}
-
-% The following is used inside several \edef's.
-\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
-
-% Hyphenation fixes.
-\hyphenation{
- Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
- ap-pen-dix bit-map bit-maps
- data-base data-bases eshell fall-ing half-way long-est man-u-script
- man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
- par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
- spell-ing spell-ings
- stand-alone strong-est time-stamp time-stamps which-ever white-space
- wide-spread wrap-around
-}
-
-% Margin to add to right of even pages, to left of odd pages.
-\newdimen\bindingoffset
-\newdimen\normaloffset
-\newdimen\pagewidth \newdimen\pageheight
-
-% For a final copy, take out the rectangles
-% that mark overfull boxes (in case you have decided
-% that the text looks ok even though it passes the margin).
-%
-\def\finalout{\overfullrule=0pt}
-
-% @| inserts a changebar to the left of the current line. It should
-% surround any changed text. This approach does *not* work if the
-% change spans more than two lines of output. To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change).
-%
-\def\|{%
- % \vadjust can only be used in horizontal mode.
- \leavevmode
- %
- % Append this vertical mode material after the current line in the output.
- \vadjust{%
- % We want to insert a rule with the height and depth of the current
- % leading; that is exactly what \strutbox is supposed to record.
- \vskip-\baselineskip
- %
- % \vadjust-items are inserted at the left edge of the type. So
- % the \llap here moves out into the left-hand margin.
- \llap{%
- %
- % For a thicker or thinner bar, change the `1pt'.
- \vrule height\baselineskip width1pt
- %
- % This is the space between the bar and the text.
- \hskip 12pt
- }%
- }%
-}
-
-% Sometimes it is convenient to have everything in the transcript file
-% and nothing on the terminal. We don't just call \tracingall here,
-% since that produces some useless output on the terminal. We also make
-% some effort to order the tracing commands to reduce output in the log
-% file; cf. trace.sty in LaTeX.
-%
-\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
-\def\loggingall{%
- \tracingstats2
- \tracingpages1
- \tracinglostchars2 % 2 gives us more in etex
- \tracingparagraphs1
- \tracingoutput1
- \tracingmacros2
- \tracingrestores1
- \showboxbreadth\maxdimen \showboxdepth\maxdimen
- \ifx\eTeXversion\undefined\else % etex gives us more logging
- \tracingscantokens1
- \tracingifs1
- \tracinggroups1
- \tracingnesting2
- \tracingassigns1
- \fi
- \tracingcommands3 % 3 gives us more in etex
- \errorcontextlines16
-}%
-
-% add check for \lastpenalty to plain's definitions. If the last thing
-% we did was a \nobreak, we don't want to insert more space.
-%
-\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
- \removelastskip\penalty-50\smallskip\fi\fi}
-\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
- \removelastskip\penalty-100\medskip\fi\fi}
-\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
- \removelastskip\penalty-200\bigskip\fi\fi}
-
-% For @cropmarks command.
-% Do @cropmarks to get crop marks.
-%
-\newif\ifcropmarks
-\let\cropmarks = \cropmarkstrue
-%
-% Dimensions to add cropmarks at corners.
-% Added by P. A. MacKay, 12 Nov. 1986
-%
-\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
-\newdimen\cornerlong \cornerlong=1pc
-\newdimen\cornerthick \cornerthick=.3pt
-\newdimen\topandbottommargin \topandbottommargin=.75in
-
-% Main output routine.
-\chardef\PAGE = 255
-\output = {\onepageout{\pagecontents\PAGE}}
-
-\newbox\headlinebox
-\newbox\footlinebox
-
-% \onepageout takes a vbox as an argument. Note that \pagecontents
-% does insertions, but you have to call it yourself.
-\def\onepageout#1{%
- \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
- %
- \ifodd\pageno \advance\hoffset by \bindingoffset
- \else \advance\hoffset by -\bindingoffset\fi
- %
- % Do this outside of the \shipout so @code etc. will be expanded in
- % the headline as they should be, not taken literally (outputting ''code).
- \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
- \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
- %
- {%
- % Have to do this stuff outside the \shipout because we want it to
- % take effect in \write's, yet the group defined by the \vbox ends
- % before the \shipout runs.
- %
- \indexdummies % don't expand commands in the output.
- \normalturnoffactive % \ in index entries must not stay \, e.g., if
- % the page break happens to be in the middle of an example.
- % We don't want .vr (or whatever) entries like this:
- % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
- % "\acronym" won't work when it's read back in;
- % it needs to be
- % {\code {{\tt \backslashcurfont }acronym}
- \shipout\vbox{%
- % Do this early so pdf references go to the beginning of the page.
- \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
- %
- \ifcropmarks \vbox to \outervsize\bgroup
- \hsize = \outerhsize
- \vskip-\topandbottommargin
- \vtop to0pt{%
- \line{\ewtop\hfil\ewtop}%
- \nointerlineskip
- \line{%
- \vbox{\moveleft\cornerthick\nstop}%
- \hfill
- \vbox{\moveright\cornerthick\nstop}%
- }%
- \vss}%
- \vskip\topandbottommargin
- \line\bgroup
- \hfil % center the page within the outer (page) hsize.
- \ifodd\pageno\hskip\bindingoffset\fi
- \vbox\bgroup
- \fi
- %
- \unvbox\headlinebox
- \pagebody{#1}%
- \ifdim\ht\footlinebox > 0pt
- % Only leave this space if the footline is nonempty.
- % (We lessened \vsize for it in \oddfootingyyy.)
- % The \baselineskip=24pt in plain's \makefootline has no effect.
- \vskip 24pt
- \unvbox\footlinebox
- \fi
- %
- \ifcropmarks
- \egroup % end of \vbox\bgroup
- \hfil\egroup % end of (centering) \line\bgroup
- \vskip\topandbottommargin plus1fill minus1fill
- \boxmaxdepth = \cornerthick
- \vbox to0pt{\vss
- \line{%
- \vbox{\moveleft\cornerthick\nsbot}%
- \hfill
- \vbox{\moveright\cornerthick\nsbot}%
- }%
- \nointerlineskip
- \line{\ewbot\hfil\ewbot}%
- }%
- \egroup % \vbox from first cropmarks clause
- \fi
- }% end of \shipout\vbox
- }% end of group with \indexdummies
- \advancepageno
- \ifnum\outputpenalty>-20000 \else\dosupereject\fi
-}
-
-\newinsert\margin \dimen\margin=\maxdimen
-
-\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
-{\catcode`\@ =11
-\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
-% marginal hacks, juha at viisa.uucp (Juha Takala)
-\ifvoid\margin\else % marginal info is present
- \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
-\dimen@=\dp#1 \unvbox#1
-\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
-\ifr at ggedbottom \kern-\dimen@ \vfil \fi}
-}
-
-% Here are the rules for the cropmarks. Note that they are
-% offset so that the space between them is truly \outerhsize or \outervsize
-% (P. A. MacKay, 12 November, 1986)
-%
-\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
-\def\nstop{\vbox
- {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
-\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
-\def\nsbot{\vbox
- {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
-
-% Parse an argument, then pass it to #1. The argument is the rest of
-% the input line (except we remove a trailing comment). #1 should be a
-% macro which expects an ordinary undelimited TeX argument.
-%
-\def\parsearg{\parseargusing{}}
-\def\parseargusing#1#2{%
- \def\argtorun{#2}%
- \begingroup
- \obeylines
- \spaceisspace
- #1%
- \parseargline\empty% Insert the \empty token, see \finishparsearg below.
-}
-
-{\obeylines %
- \gdef\parseargline#1^^M{%
- \endgroup % End of the group started in \parsearg.
- \argremovecomment #1\comment\ArgTerm%
- }%
-}
-
-% First remove any @comment, then any @c comment.
-\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
-\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
-
-% Each occurence of `\^^M' or `<space>\^^M' is replaced by a single space.
-%
-% \argremovec might leave us with trailing space, e.g.,
-% @end itemize @c foo
-% This space token undergoes the same procedure and is eventually removed
-% by \finishparsearg.
-%
-\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
-\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
-\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
- \def\temp{#3}%
- \ifx\temp\empty
- % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
- \let\temp\finishparsearg
- \else
- \let\temp\argcheckspaces
- \fi
- % Put the space token in:
- \temp#1 #3\ArgTerm
-}
-
-% If a _delimited_ argument is enclosed in braces, they get stripped; so
-% to get _exactly_ the rest of the line, we had to prevent such situation.
-% We prepended an \empty token at the very beginning and we expand it now,
-% just before passing the control to \argtorun.
-% (Similarily, we have to think about #3 of \argcheckspacesY above: it is
-% either the null string, or it ends with \^^M---thus there is no danger
-% that a pair of braces would be stripped.
-%
-% But first, we have to remove the trailing space token.
-%
-\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
-
-% \parseargdef\foo{...}
-% is roughly equivalent to
-% \def\foo{\parsearg\Xfoo}
-% \def\Xfoo#1{...}
-%
-% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
-% favourite TeX trick. --kasal, 16nov03
-
-\def\parseargdef#1{%
- \expandafter \doparseargdef \csname\string#1\endcsname #1%
-}
-\def\doparseargdef#1#2{%
- \def#2{\parsearg#1}%
- \def#1##1%
-}
-
-% Several utility definitions with active space:
-{
- \obeyspaces
- \gdef\obeyedspace{ }
-
- % Make each space character in the input produce a normal interword
- % space in the output. Don't allow a line break at this space, as this
- % is used only in environments like @example, where each line of input
- % should produce a line of output anyway.
- %
- \gdef\sepspaces{\obeyspaces\let =\tie}
-
- % If an index command is used in an @example environment, any spaces
- % therein should become regular spaces in the raw index file, not the
- % expansion of \tie (\leavevmode \penalty \@M \ ).
- \gdef\unsepspaces{\let =\space}
-}
-
-
-\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
-
-% Define the framework for environments in texinfo.tex. It's used like this:
-%
-% \envdef\foo{...}
-% \def\Efoo{...}
-%
-% It's the responsibility of \envdef to insert \begingroup before the
-% actual body; @end closes the group after calling \Efoo. \envdef also
-% defines \thisenv, so the current environment is known; @end checks
-% whether the environment name matches. The \checkenv macro can also be
-% used to check whether the current environment is the one expected.
-%
-% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
-% are not treated as enviroments; they don't open a group. (The
-% implementation of @end takes care not to call \endgroup in this
-% special case.)
-
-
-% At runtime, environments start with this:
-\def\startenvironment#1{\begingroup\def\thisenv{#1}}
-% initialize
-\let\thisenv\empty
-
-% ... but they get defined via ``\envdef\foo{...}'':
-\long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
-\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
-
-% Check whether we're in the right environment:
-\def\checkenv#1{%
- \def\temp{#1}%
- \ifx\thisenv\temp
- \else
- \badenverr
- \fi
-}
-
-% Evironment mismatch, #1 expected:
-\def\badenverr{%
- \errhelp = \EMsimple
- \errmessage{This command can appear only \inenvironment\temp,
- not \inenvironment\thisenv}%
-}
-\def\inenvironment#1{%
- \ifx#1\empty
- out of any environment%
- \else
- in environment \expandafter\string#1%
- \fi
-}
-
-% @end foo executes the definition of \Efoo.
-% But first, it executes a specialized version of \checkenv
-%
-\parseargdef\end{%
- \if 1\csname iscond.#1\endcsname
- \else
- % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
- \expandafter\checkenv\csname#1\endcsname
- \csname E#1\endcsname
- \endgroup
- \fi
-}
-
-\newhelp\EMsimple{Press RETURN to continue.}
-
-
-%% Simple single-character @ commands
-
-% @@ prints an @
-% Kludge this until the fonts are right (grr).
-\def\@{{\tt\char64}}
-
-% This is turned off because it was never documented
-% and you can use @w{...} around a quote to suppress ligatures.
-%% Define @` and @' to be the same as ` and '
-%% but suppressing ligatures.
-%\def\`{{`}}
-%\def\'{{'}}
-
-% Used to generate quoted braces.
-\def\mylbrace {{\tt\char123}}
-\def\myrbrace {{\tt\char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
-\begingroup
- % Definitions to produce \{ and \} commands for indices,
- % and @{ and @} for the aux/toc files.
- \catcode`\{ = \other \catcode`\} = \other
- \catcode`\[ = 1 \catcode`\] = 2
- \catcode`\! = 0 \catcode`\\ = \other
- !gdef!lbracecmd[\{]%
- !gdef!rbracecmd[\}]%
- !gdef!lbraceatcmd[@{]%
- !gdef!rbraceatcmd[@}]%
-!endgroup
-
-% @comma{} to avoid , parsing problems.
-\let\comma = ,
-
-% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
-\let\, = \c
-\let\dotaccent = \.
-\def\ringaccent#1{{\accent23 #1}}
-\let\tieaccent = \t
-\let\ubaraccent = \b
-\let\udotaccent = \d
-
-% Other special characters: @questiondown @exclamdown @ordf @ordm
-% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
-\def\questiondown{?`}
-\def\exclamdown{!`}
-\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
-\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
-
-% Dotless i and dotless j, used for accents.
-\def\imacro{i}
-\def\jmacro{j}
-\def\dotless#1{%
- \def\temp{#1}%
- \ifx\temp\imacro \ptexi
- \else\ifx\temp\jmacro \j
- \else \errmessage{@dotless can be used only with i or j}%
- \fi\fi
-}
-
-% The \TeX{} logo, as in plain, but resetting the spacing so that a
-% period following counts as ending a sentence. (Idea found in latex.)
-%
-\edef\TeX{\TeX \spacefactor=1000 }
-
-% @LaTeX{} logo. Not quite the same results as the definition in
-% latex.ltx, since we use a different font for the raised A; it's most
-% convenient for us to use an explicitly smaller font, rather than using
-% the \scriptstyle font (since we don't reset \scriptstyle and
-% \scriptscriptstyle).
-%
-\def\LaTeX{%
- L\kern-.36em
- {\setbox0=\hbox{T}%
- \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
- \kern-.15em
- \TeX
-}
-
-% Be sure we're in horizontal mode when doing a tie, since we make space
-% equivalent to this in @example-like environments. Otherwise, a space
-% at the beginning of a line will start with \penalty -- and
-% since \penalty is valid in vertical mode, we'd end up putting the
-% penalty on the vertical list instead of in the new paragraph.
-{\catcode`@ = 11
- % Avoid using \@M directly, because that causes trouble
- % if the definition is written into an index file.
- \global\let\tiepenalty = \@M
- \gdef\tie{\leavevmode\penalty\tiepenalty\ }
-}
-
-% @: forces normal size whitespace following.
-\def\:{\spacefactor=1000 }
-
-% @* forces a line break.
-\def\*{\hfil\break\hbox{}\ignorespaces}
-
-% @/ allows a line break.
-\let\/=\allowbreak
-
-% @. is an end-of-sentence period.
-\def\.{.\spacefactor=\endofsentencespacefactor\space}
-
-% @! is an end-of-sentence bang.
-\def\!{!\spacefactor=\endofsentencespacefactor\space}
-
-% @? is an end-of-sentence query.
-\def\?{?\spacefactor=\endofsentencespacefactor\space}
-
-% @frenchspacing on|off says whether to put extra space after punctuation.
-%
-\def\onword{on}
-\def\offword{off}
-%
-\parseargdef\frenchspacing{%
- \def\temp{#1}%
- \ifx\temp\onword \plainfrenchspacing
- \else\ifx\temp\offword \plainnonfrenchspacing
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
- \fi\fi
-}
-
-% @w prevents a word break. Without the \leavevmode, @w at the
-% beginning of a paragraph, when TeX is still in vertical mode, would
-% produce a whole line of output instead of starting the paragraph.
-\def\w#1{\leavevmode\hbox{#1}}
-
-% @group ... @end group forces ... to be all on one page, by enclosing
-% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
-% to keep its height that of a normal line. According to the rules for
-% \topskip (p.114 of the TeXbook), the glue inserted is
-% max (\topskip - \ht (first item), 0). If that height is large,
-% therefore, no glue is inserted, and the space between the headline and
-% the text is small, which looks bad.
-%
-% Another complication is that the group might be very large. This can
-% cause the glue on the previous page to be unduly stretched, because it
-% does not have much material. In this case, it's better to add an
-% explicit \vfill so that the extra space is at the bottom. The
-% threshold for doing this is if the group is more than \vfilllimit
-% percent of a page (\vfilllimit can be changed inside of @tex).
-%
-\newbox\groupbox
-\def\vfilllimit{0.7}
-%
-\envdef\group{%
- \ifnum\catcode`\^^M=\active \else
- \errhelp = \groupinvalidhelp
- \errmessage{@group invalid in context where filling is enabled}%
- \fi
- \startsavinginserts
- %
- \setbox\groupbox = \vtop\bgroup
- % Do @comment since we are called inside an environment such as
- % @example, where each end-of-line in the input causes an
- % end-of-line in the output. We don't want the end-of-line after
- % the `@group' to put extra space in the output. Since @group
- % should appear on a line by itself (according to the Texinfo
- % manual), we don't worry about eating any user text.
- \comment
-}
-%
-% The \vtop produces a box with normal height and large depth; thus, TeX puts
-% \baselineskip glue before it, and (when the next line of text is done)
-% \lineskip glue after it. Thus, space below is not quite equal to space
-% above. But it's pretty close.
-\def\Egroup{%
- % To get correct interline space between the last line of the group
- % and the first line afterwards, we have to propagate \prevdepth.
- \endgraf % Not \par, as it may have been set to \lisppar.
- \global\dimen1 = \prevdepth
- \egroup % End the \vtop.
- % \dimen0 is the vertical size of the group's box.
- \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
- % \dimen2 is how much space is left on the page (more or less).
- \dimen2 = \pageheight \advance\dimen2 by -\pagetotal
- % if the group doesn't fit on the current page, and it's a big big
- % group, force a page break.
- \ifdim \dimen0 > \dimen2
- \ifdim \pagetotal < \vfilllimit\pageheight
- \page
- \fi
- \fi
- \box\groupbox
- \prevdepth = \dimen1
- \checkinserts
-}
-%
-% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
-% message, so this ends up printing `@group can only ...'.
-%
-\newhelp\groupinvalidhelp{%
-group can only be used in environments such as @example,^^J%
-where each line of input produces a line of output.}
-
-% @need space-in-mils
-% forces a page break if there is not space-in-mils remaining.
-
-\newdimen\mil \mil=0.001in
-
-% Old definition--didn't work.
-%\parseargdef\need{\par %
-%% This method tries to make TeX break the page naturally
-%% if the depth of the box does not fit.
-%{\baselineskip=0pt%
-%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
-%\prevdepth=-1000pt
-%}}
-
-\parseargdef\need{%
- % Ensure vertical mode, so we don't make a big box in the middle of a
- % paragraph.
- \par
- %
- % If the @need value is less than one line space, it's useless.
- \dimen0 = #1\mil
- \dimen2 = \ht\strutbox
- \advance\dimen2 by \dp\strutbox
- \ifdim\dimen0 > \dimen2
- %
- % Do a \strut just to make the height of this box be normal, so the
- % normal leading is inserted relative to the preceding line.
- % And a page break here is fine.
- \vtop to #1\mil{\strut\vfil}%
- %
- % TeX does not even consider page breaks if a penalty added to the
- % main vertical list is 10000 or more. But in order to see if the
- % empty box we just added fits on the page, we must make it consider
- % page breaks. On the other hand, we don't want to actually break the
- % page after the empty box. So we use a penalty of 9999.
- %
- % There is an extremely small chance that TeX will actually break the
- % page at this \penalty, if there are no other feasible breakpoints in
- % sight. (If the user is using lots of big @group commands, which
- % almost-but-not-quite fill up a page, TeX will have a hard time doing
- % good page breaking, for example.) However, I could not construct an
- % example where a page broke at this \penalty; if it happens in a real
- % document, then we can reconsider our strategy.
- \penalty9999
- %
- % Back up by the size of the box, whether we did a page break or not.
- \kern -#1\mil
- %
- % Do not allow a page break right after this kern.
- \nobreak
- \fi
-}
-
-% @br forces paragraph break (and is undocumented).
-
-\let\br = \par
-
-% @page forces the start of a new page.
-%
-\def\page{\par\vfill\supereject}
-
-% @exdent text....
-% outputs text on separate line in roman font, starting at standard page margin
-
-% This records the amount of indent in the innermost environment.
-% That's how much \exdent should take out.
-\newskip\exdentamount
-
-% This defn is used inside fill environments such as @defun.
-\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
-
-% This defn is used inside nofill environments such as @example.
-\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
- \leftline{\hskip\leftskip{\rm#1}}}}
-
-% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
-% paragraph. For more general purposes, use the \margin insertion
-% class. WHICH is `l' or `r'.
-%
-\newskip\inmarginspacing \inmarginspacing=1cm
-\def\strutdepth{\dp\strutbox}
-%
-\def\doinmargin#1#2{\strut\vadjust{%
- \nobreak
- \kern-\strutdepth
- \vtop to \strutdepth{%
- \baselineskip=\strutdepth
- \vss
- % if you have multiple lines of stuff to put here, you'll need to
- % make the vbox yourself of the appropriate size.
- \ifx#1l%
- \llap{\ignorespaces #2\hskip\inmarginspacing}%
- \else
- \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
- \fi
- \null
- }%
-}}
-\def\inleftmargin{\doinmargin l}
-\def\inrightmargin{\doinmargin r}
-%
-% @inmargin{TEXT [, RIGHT-TEXT]}
-% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
-% else use TEXT for both).
-%
-\def\inmargin#1{\parseinmargin #1,,\finish}
-\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
- \setbox0 = \hbox{\ignorespaces #2}%
- \ifdim\wd0 > 0pt
- \def\lefttext{#1}% have both texts
- \def\righttext{#2}%
- \else
- \def\lefttext{#1}% have only one text
- \def\righttext{#1}%
- \fi
- %
- \ifodd\pageno
- \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
- \else
- \def\temp{\inleftmargin\lefttext}%
- \fi
- \temp
-}
-
-% @include file insert text of that file as input.
-%
-\def\include{\parseargusing\filenamecatcodes\includezzz}
-\def\includezzz#1{%
- \pushthisfilestack
- \def\thisfile{#1}%
- {%
- \makevalueexpandable
- \def\temp{\input #1 }%
- \expandafter
- }\temp
- \popthisfilestack
-}
-\def\filenamecatcodes{%
- \catcode`\\=\other
- \catcode`~=\other
- \catcode`^=\other
- \catcode`_=\other
- \catcode`|=\other
- \catcode`<=\other
- \catcode`>=\other
- \catcode`+=\other
- \catcode`-=\other
-}
-
-\def\pushthisfilestack{%
- \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
-}
-\def\pushthisfilestackX{%
- \expandafter\pushthisfilestackY\thisfile\StackTerm
-}
-\def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
- \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
-}
-
-\def\popthisfilestack{\errthisfilestackempty}
-\def\errthisfilestackempty{\errmessage{Internal error:
- the stack of filenames is empty.}}
-
-\def\thisfile{}
-
-% @center line
-% outputs that line, centered.
-%
-\parseargdef\center{%
- \ifhmode
- \let\next\centerH
- \else
- \let\next\centerV
- \fi
- \next{\hfil \ignorespaces#1\unskip \hfil}%
-}
-\def\centerH#1{%
- {%
- \hfil\break
- \advance\hsize by -\leftskip
- \advance\hsize by -\rightskip
- \line{#1}%
- \break
- }%
-}
-\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
-
-% @sp n outputs n lines of vertical space
-
-\parseargdef\sp{\vskip #1\baselineskip}
-
-% @comment ...line which is ignored...
-% @c is the same as @comment
-% @ignore ... @end ignore is another way to write a comment
-
-\def\comment{\begingroup \catcode`\^^M=\other%
-\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
-\commentxxx}
-{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
-
-\let\c=\comment
-
-% @paragraphindent NCHARS
-% We'll use ems for NCHARS, close enough.
-% NCHARS can also be the word `asis' or `none'.
-% We cannot feasibly implement @paragraphindent asis, though.
-%
-\def\asisword{asis} % no translation, these are keywords
-\def\noneword{none}
-%
-\parseargdef\paragraphindent{%
- \def\temp{#1}%
- \ifx\temp\asisword
- \else
- \ifx\temp\noneword
- \defaultparindent = 0pt
- \else
- \defaultparindent = #1em
- \fi
- \fi
- \parindent = \defaultparindent
-}
-
-% @exampleindent NCHARS
-% We'll use ems for NCHARS like @paragraphindent.
-% It seems @exampleindent asis isn't necessary, but
-% I preserve it to make it similar to @paragraphindent.
-\parseargdef\exampleindent{%
- \def\temp{#1}%
- \ifx\temp\asisword
- \else
- \ifx\temp\noneword
- \lispnarrowing = 0pt
- \else
- \lispnarrowing = #1em
- \fi
- \fi
-}
-
-% @firstparagraphindent WORD
-% If WORD is `none', then suppress indentation of the first paragraph
-% after a section heading. If WORD is `insert', then do indent at such
-% paragraphs.
-%
-% The paragraph indentation is suppressed or not by calling
-% \suppressfirstparagraphindent, which the sectioning commands do.
-% We switch the definition of this back and forth according to WORD.
-% By default, we suppress indentation.
-%
-\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
-\def\insertword{insert}
-%
-\parseargdef\firstparagraphindent{%
- \def\temp{#1}%
- \ifx\temp\noneword
- \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
- \else\ifx\temp\insertword
- \let\suppressfirstparagraphindent = \relax
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @firstparagraphindent option `\temp'}%
- \fi\fi
-}
-
-% Here is how we actually suppress indentation. Redefine \everypar to
-% \kern backwards by \parindent, and then reset itself to empty.
-%
-% We also make \indent itself not actually do anything until the next
-% paragraph.
-%
-\gdef\dosuppressfirstparagraphindent{%
- \gdef\indent{%
- \restorefirstparagraphindent
- \indent
- }%
- \gdef\noindent{%
- \restorefirstparagraphindent
- \noindent
- }%
- \global\everypar = {%
- \kern -\parindent
- \restorefirstparagraphindent
- }%
-}
-
-\gdef\restorefirstparagraphindent{%
- \global \let \indent = \ptexindent
- \global \let \noindent = \ptexnoindent
- \global \everypar = {}%
-}
-
-
-% @asis just yields its argument. Used with @table, for example.
-%
-\def\asis#1{#1}
-
-% @math outputs its argument in math mode.
-%
-% One complication: _ usually means subscripts, but it could also mean
-% an actual _ character, as in @math{@var{some_variable} + 1}. So make
-% _ active, and distinguish by seeing if the current family is \slfam,
-% which is what @var uses.
-{
- \catcode`\_ = \active
- \gdef\mathunderscore{%
- \catcode`\_=\active
- \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
- }
-}
-% Another complication: we want \\ (and @\) to output a \ character.
-% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
-% this is not advertised and we don't care. Texinfo does not
-% otherwise define @\.
-%
-% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
-\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
-%
-\def\math{%
- \tex
- \mathunderscore
- \let\\ = \mathbackslash
- \mathactive
- $\finishmath
-}
-\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
-
-% Some active characters (such as <) are spaced differently in math.
-% We have to reset their definitions in case the @math was an argument
-% to a command which sets the catcodes (such as @item or @section).
-%
-{
- \catcode`^ = \active
- \catcode`< = \active
- \catcode`> = \active
- \catcode`+ = \active
- \gdef\mathactive{%
- \let^ = \ptexhat
- \let< = \ptexless
- \let> = \ptexgtr
- \let+ = \ptexplus
- }
-}
-
-% @bullet and @minus need the same treatment as @math, just above.
-\def\bullet{$\ptexbullet$}
-\def\minus{$-$}
-
-% @dots{} outputs an ellipsis using the current font.
-% We do .5em per period so that it has the same spacing in the cm
-% typewriter fonts as three actual period characters; on the other hand,
-% in other typewriter fonts three periods are wider than 1.5em. So do
-% whichever is larger.
-%
-\def\dots{%
- \leavevmode
- \setbox0=\hbox{...}% get width of three periods
- \ifdim\wd0 > 1.5em
- \dimen0 = \wd0
- \else
- \dimen0 = 1.5em
- \fi
- \hbox to \dimen0{%
- \hskip 0pt plus.25fil
- .\hskip 0pt plus1fil
- .\hskip 0pt plus1fil
- .\hskip 0pt plus.5fil
- }%
-}
-
-% @enddots{} is an end-of-sentence ellipsis.
-%
-\def\enddots{%
- \dots
- \spacefactor=\endofsentencespacefactor
-}
-
-% @comma{} is so commas can be inserted into text without messing up
-% Texinfo's parsing.
-%
-\let\comma = ,
-
-% @refill is a no-op.
-\let\refill=\relax
-
-% If working on a large document in chapters, it is convenient to
-% be able to disable indexing, cross-referencing, and contents, for test runs.
-% This is done with @novalidate (before @setfilename).
-%
-\newif\iflinks \linkstrue % by default we want the aux files.
-\let\novalidate = \linksfalse
-
-% @setfilename is done at the beginning of every texinfo file.
-% So open here the files we need to have open while reading the input.
-% This makes it possible to make a .fmt file for texinfo.
-\def\setfilename{%
- \fixbackslash % Turn off hack to swallow `\input texinfo'.
- \iflinks
- \tryauxfile
- % Open the new aux file. TeX will close it automatically at exit.
- \immediate\openout\auxfile=\jobname.aux
- \fi % \openindices needs to do some work in any case.
- \openindices
- \let\setfilename=\comment % Ignore extra @setfilename cmds.
- %
- % If texinfo.cnf is present on the system, read it.
- % Useful for site-wide @afourpaper, etc.
- \openin 1 texinfo.cnf
- \ifeof 1 \else \input texinfo.cnf \fi
- \closein 1
- %
- \comment % Ignore the actual filename.
-}
-
-% Called from \setfilename.
-%
-\def\openindices{%
- \newindex{cp}%
- \newcodeindex{fn}%
- \newcodeindex{vr}%
- \newcodeindex{tp}%
- \newcodeindex{ky}%
- \newcodeindex{pg}%
-}
-
-% @bye.
-\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
-
-
-\message{pdf,}
-% adobe `portable' document format
-\newcount\tempnum
-\newcount\lnkcount
-\newtoks\filename
-\newcount\filenamelength
-\newcount\pgn
-\newtoks\toksA
-\newtoks\toksB
-\newtoks\toksC
-\newtoks\toksD
-\newbox\boxA
-\newcount\countA
-\newif\ifpdf
-\newif\ifpdfmakepagedest
-
-% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
-% can be set). So we test for \relax and 0 as well as \undefined,
-% borrowed from ifpdf.sty.
-\ifx\pdfoutput\undefined
-\else
- \ifx\pdfoutput\relax
- \else
- \ifcase\pdfoutput
- \else
- \pdftrue
- \fi
- \fi
-\fi
-
-% PDF uses PostScript string constants for the names of xref targets,
-% for display in the outlines, and in other places. Thus, we have to
-% double any backslashes. Otherwise, a name like "\node" will be
-% interpreted as a newline (\n), followed by o, d, e. Not good.
-% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
-% (and related messages, the final outcome is that it is up to the TeX
-% user to double the backslashes and otherwise make the string valid, so
-% that's what we do).
-
-% double active backslashes.
-%
-{\catcode`\@=0 \catcode`\\=\active
- @gdef at activebackslashdouble{%
- @catcode`@\=@active
- @let\=@doublebackslash}
-}
-
-% To handle parens, we must adopt a different approach, since parens are
-% not active characters. hyperref.dtx (which has the same problem as
-% us) handles it with this amazing macro to replace tokens, with minor
-% changes for Texinfo. It is included here under the GPL by permission
-% from the author, Heiko Oberdiek.
-%
-% #1 is the tokens to replace.
-% #2 is the replacement.
-% #3 is the control sequence with the string.
-%
-\def\HyPsdSubst#1#2#3{%
- \def\HyPsdReplace##1#1##2\END{%
- ##1%
- \ifx\\##2\\%
- \else
- #2%
- \HyReturnAfterFi{%
- \HyPsdReplace##2\END
- }%
- \fi
- }%
- \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
-}
-\long\def\HyReturnAfterFi#1\fi{\fi#1}
-
-% #1 is a control sequence in which to do the replacements.
-\def\backslashparens#1{%
- \xdef#1{#1}% redefine it as its expansion; the definition is simply
- % \lastnode when called from \setref -> \pdfmkdest.
- \HyPsdSubst{(}{\realbackslash(}{#1}%
- \HyPsdSubst{)}{\realbackslash)}{#1}%
-}
-
-\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
-with PDF output, and none of those formats could be found. (.eps cannot
-be supported due to the design of the PDF format; use regular TeX (DVI
-output) for that.)}
-
-\ifpdf
- \input pdfcolor
- \pdfcatalog{/PageMode /UseOutlines}
- %
- % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
- \def\dopdfimage#1#2#3{%
- \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
- \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
- %
- % pdftex (and the PDF format) support .png, .jpg, .pdf (among
- % others). Let's try in that order.
- \let\pdfimgext=\empty
- \begingroup
- \openin 1 #1.png \ifeof 1
- \openin 1 #1.jpg \ifeof 1
- \openin 1 #1.jpeg \ifeof 1
- \openin 1 #1.JPG \ifeof 1
- \openin 1 #1.pdf \ifeof 1
- \errhelp = \nopdfimagehelp
- \errmessage{Could not find image file #1 for pdf}%
- \else \gdef\pdfimgext{pdf}%
- \fi
- \else \gdef\pdfimgext{JPG}%
- \fi
- \else \gdef\pdfimgext{jpeg}%
- \fi
- \else \gdef\pdfimgext{jpg}%
- \fi
- \else \gdef\pdfimgext{png}%
- \fi
- \closein 1
- \endgroup
- %
- % without \immediate, pdftex seg faults when the same image is
- % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
- \ifnum\pdftexversion < 14
- \immediate\pdfimage
- \else
- \immediate\pdfximage
- \fi
- \ifdim \wd0 >0pt width \imagewidth \fi
- \ifdim \wd2 >0pt height \imageheight \fi
- \ifnum\pdftexversion<13
- #1.\pdfimgext
- \else
- {#1.\pdfimgext}%
- \fi
- \ifnum\pdftexversion < 14 \else
- \pdfrefximage \pdflastximage
- \fi}
- %
- \def\pdfmkdest#1{{%
- % We have to set dummies so commands such as @code, and characters
- % such as \, aren't expanded when present in a section title.
- \indexnofonts
- \turnoffactive
- \activebackslashdouble
- \makevalueexpandable
- \def\pdfdestname{#1}%
- \backslashparens\pdfdestname
- \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
- }}
- %
- % used to mark target names; must be expandable.
- \def\pdfmkpgn#1{#1}
- %
- % by default, use a color that is dark enough to print on paper as
- % nearly black, but still distinguishable for online viewing.
- % (Defined in pdfcolor.tex.)
- \let\urlcolor = \BrickRed
- \let\linkcolor = \BrickRed
- \def\endlink{\Black\pdfendlink}
- %
- % Adding outlines to PDF; macros for calculating structure of outlines
- % come from Petr Olsak
- \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
- \else \csname#1\endcsname \fi}
- \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
- \advance\tempnum by 1
- \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
- %
- % #1 is the section text, which is what will be displayed in the
- % outline by the pdf viewer. #2 is the pdf expression for the number
- % of subentries (or empty, for subsubsections). #3 is the node text,
- % which might be empty if this toc entry had no corresponding node.
- % #4 is the page number
- %
- \def\dopdfoutline#1#2#3#4{%
- % Generate a link to the node text if that exists; else, use the
- % page number. We could generate a destination for the section
- % text in the case where a section has no node, but it doesn't
- % seem worth the trouble, since most documents are normally structured.
- \def\pdfoutlinedest{#3}%
- \ifx\pdfoutlinedest\empty
- \def\pdfoutlinedest{#4}%
- \else
- % Doubled backslashes in the name.
- {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
- \backslashparens\pdfoutlinedest}%
- \fi
- %
- % Also double the backslashes in the display string.
- {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
- \backslashparens\pdfoutlinetext}%
- %
- \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
- }
- %
- \def\pdfmakeoutlines{%
- \begingroup
- % Thanh's hack / proper braces in bookmarks
- \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
- \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
- %
- % Read toc silently, to get counts of subentries for \pdfoutline.
- \def\numchapentry##1##2##3##4{%
- \def\thischapnum{##2}%
- \def\thissecnum{0}%
- \def\thissubsecnum{0}%
- }%
- \def\numsecentry##1##2##3##4{%
- \advancenumber{chap\thischapnum}%
- \def\thissecnum{##2}%
- \def\thissubsecnum{0}%
- }%
- \def\numsubsecentry##1##2##3##4{%
- \advancenumber{sec\thissecnum}%
- \def\thissubsecnum{##2}%
- }%
- \def\numsubsubsecentry##1##2##3##4{%
- \advancenumber{subsec\thissubsecnum}%
- }%
- \def\thischapnum{0}%
- \def\thissecnum{0}%
- \def\thissubsecnum{0}%
- %
- % use \def rather than \let here because we redefine \chapentry et
- % al. a second time, below.
- \def\appentry{\numchapentry}%
- \def\appsecentry{\numsecentry}%
- \def\appsubsecentry{\numsubsecentry}%
- \def\appsubsubsecentry{\numsubsubsecentry}%
- \def\unnchapentry{\numchapentry}%
- \def\unnsecentry{\numsecentry}%
- \def\unnsubsecentry{\numsubsecentry}%
- \def\unnsubsubsecentry{\numsubsubsecentry}%
- \readdatafile{toc}%
- %
- % Read toc second time, this time actually producing the outlines.
- % The `-' means take the \expnumber as the absolute number of
- % subentries, which we calculated on our first read of the .toc above.
- %
- % We use the node names as the destinations.
- \def\numchapentry##1##2##3##4{%
- \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
- \def\numsecentry##1##2##3##4{%
- \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
- \def\numsubsecentry##1##2##3##4{%
- \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
- \def\numsubsubsecentry##1##2##3##4{% count is always zero
- \dopdfoutline{##1}{}{##3}{##4}}%
- %
- % PDF outlines are displayed using system fonts, instead of
- % document fonts. Therefore we cannot use special characters,
- % since the encoding is unknown. For example, the eogonek from
- % Latin 2 (0xea) gets translated to a | character. Info from
- % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
- %
- % xx to do this right, we have to translate 8-bit characters to
- % their "best" equivalent, based on the @documentencoding. Right
- % now, I guess we'll just let the pdf reader have its way.
- \indexnofonts
- \setupdatafile
- \catcode`\\=\active \otherbackslash
- \input \tocreadfilename
- \endgroup
- }
- %
- \def\skipspaces#1{\def\PP{#1}\def\D{|}%
- \ifx\PP\D\let\nextsp\relax
- \else\let\nextsp\skipspaces
- \ifx\p\space\else\addtokens{\filename}{\PP}%
- \advance\filenamelength by 1
- \fi
- \fi
- \nextsp}
- \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
- \ifnum\pdftexversion < 14
- \let \startlink \pdfannotlink
- \else
- \let \startlink \pdfstartlink
- \fi
- % make a live url in pdf output.
- \def\pdfurl#1{%
- \begingroup
- % it seems we really need yet another set of dummies; have not
- % tried to figure out what each command should do in the context
- % of @url. for now, just make @/ a no-op, that's the only one
- % people have actually reported a problem with.
- %
- \normalturnoffactive
- \def\@{@}%
- \let\/=\empty
- \makevalueexpandable
- \leavevmode\urlcolor
- \startlink attr{/Border [0 0 0]}%
- user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
- \endgroup}
- \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
- \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
- \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
- \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
- \def\maketoks{%
- \expandafter\poptoks\the\toksA|ENDTOKS|\relax
- \ifx\first0\adn0
- \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
- \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
- \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
- \else
- \ifnum0=\countA\else\makelink\fi
- \ifx\first.\let\next=\done\else
- \let\next=\maketoks
- \addtokens{\toksB}{\the\toksD}
- \ifx\first,\addtokens{\toksB}{\space}\fi
- \fi
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \next}
- \def\makelink{\addtokens{\toksB}%
- {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
- \def\pdflink#1{%
- \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
- \linkcolor #1\endlink}
- \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
-\else
- \let\pdfmkdest = \gobble
- \let\pdfurl = \gobble
- \let\endlink = \relax
- \let\linkcolor = \relax
- \let\pdfmakeoutlines = \relax
-\fi % \ifx\pdfoutput
-
-
-\message{fonts,}
-
-% Change the current font style to #1, remembering it in \curfontstyle.
-% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
-% italics, not bold italics.
-%
-\def\setfontstyle#1{%
- \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
- \csname ten#1\endcsname % change the current font
-}
-
-% Select #1 fonts with the current style.
-%
-\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
-
-\def\rm{\fam=0 \setfontstyle{rm}}
-\def\it{\fam=\itfam \setfontstyle{it}}
-\def\sl{\fam=\slfam \setfontstyle{sl}}
-\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
-\def\tt{\fam=\ttfam \setfontstyle{tt}}
-
-% Texinfo sort of supports the sans serif font style, which plain TeX does not.
-% So we set up a \sf.
-\newfam\sffam
-\def\sf{\fam=\sffam \setfontstyle{sf}}
-\let\li = \sf % Sometimes we call it \li, not \sf.
-
-% We don't need math for this font style.
-\def\ttsl{\setfontstyle{ttsl}}
-
-
-% Default leading.
-\newdimen\textleading \textleading = 13.2pt
-
-% Set the baselineskip to #1, and the lineskip and strut size
-% correspondingly. There is no deep meaning behind these magic numbers
-% used as factors; they just match (closely enough) what Knuth defined.
-%
-\def\lineskipfactor{.08333}
-\def\strutheightpercent{.70833}
-\def\strutdepthpercent {.29167}
-%
-\def\setleading#1{%
- \normalbaselineskip = #1\relax
- \normallineskip = \lineskipfactor\normalbaselineskip
- \normalbaselines
- \setbox\strutbox =\hbox{%
- \vrule width0pt height\strutheightpercent\baselineskip
- depth \strutdepthpercent \baselineskip
- }%
-}
-
-%
-% PDF CMaps. See also LaTeX's t1.cmap.
-%
-% \cmapOT1
-\ifpdf
- \begingroup
- \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
- \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
-%%DocumentNeededResources: ProcSet (CIDInit)
-%%IncludeResource: ProcSet (CIDInit)
-%%BeginResource: CMap (TeX-OT1-0)
-%%Title: (TeX-OT1-0 TeX OT1 0)
-%%Version: 1.000
-%%EndComments
-/CIDInit /ProcSet findresource begin
-12 dict begin
-begincmap
-/CIDSystemInfo
-<< /Registry (TeX)
-/Ordering (OT1)
-/Supplement 0
->> def
-/CMapName /TeX-OT1-0 def
-/CMapType 2 def
-1 begincodespacerange
-<00> <7F>
-endcodespacerange
-8 beginbfrange
-<00> <01> <0393>
-<09> <0A> <03A8>
-<23> <26> <0023>
-<28> <3B> <0028>
-<3F> <5B> <003F>
-<5D> <5E> <005D>
-<61> <7A> <0061>
-<7B> <7C> <2013>
-endbfrange
-40 beginbfchar
-<02> <0398>
-<03> <039B>
-<04> <039E>
-<05> <03A0>
-<06> <03A3>
-<07> <03D2>
-<08> <03A6>
-<0B> <00660066>
-<0C> <00660069>
-<0D> <0066006C>
-<0E> <006600660069>
-<0F> <00660066006C>
-<10> <0131>
-<11> <0237>
-<12> <0060>
-<13> <00B4>
-<14> <02C7>
-<15> <02D8>
-<16> <00AF>
-<17> <02DA>
-<18> <00B8>
-<19> <00DF>
-<1A> <00E6>
-<1B> <0153>
-<1C> <00F8>
-<1D> <00C6>
-<1E> <0152>
-<1F> <00D8>
-<21> <0021>
-<22> <201D>
-<27> <2019>
-<3C> <00A1>
-<3D> <003D>
-<3E> <00BF>
-<5C> <201C>
-<5F> <02D9>
-<60> <2018>
-<7D> <02DD>
-<7E> <007E>
-<7F> <00A8>
-endbfchar
-endcmap
-CMapName currentdict /CMap defineresource pop
-end
-end
-%%EndResource
-%%EOF
- }\endgroup
- \expandafter\edef\csname cmapOT1\endcsname#1{%
- \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
- }%
-%
-% \cmapOT1IT
- \begingroup
- \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
- \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
-%%DocumentNeededResources: ProcSet (CIDInit)
-%%IncludeResource: ProcSet (CIDInit)
-%%BeginResource: CMap (TeX-OT1IT-0)
-%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
-%%Version: 1.000
-%%EndComments
-/CIDInit /ProcSet findresource begin
-12 dict begin
-begincmap
-/CIDSystemInfo
-<< /Registry (TeX)
-/Ordering (OT1IT)
-/Supplement 0
->> def
-/CMapName /TeX-OT1IT-0 def
-/CMapType 2 def
-1 begincodespacerange
-<00> <7F>
-endcodespacerange
-8 beginbfrange
-<00> <01> <0393>
-<09> <0A> <03A8>
-<25> <26> <0025>
-<28> <3B> <0028>
-<3F> <5B> <003F>
-<5D> <5E> <005D>
-<61> <7A> <0061>
-<7B> <7C> <2013>
-endbfrange
-42 beginbfchar
-<02> <0398>
-<03> <039B>
-<04> <039E>
-<05> <03A0>
-<06> <03A3>
-<07> <03D2>
-<08> <03A6>
-<0B> <00660066>
-<0C> <00660069>
-<0D> <0066006C>
-<0E> <006600660069>
-<0F> <00660066006C>
-<10> <0131>
-<11> <0237>
-<12> <0060>
-<13> <00B4>
-<14> <02C7>
-<15> <02D8>
-<16> <00AF>
-<17> <02DA>
-<18> <00B8>
-<19> <00DF>
-<1A> <00E6>
-<1B> <0153>
-<1C> <00F8>
-<1D> <00C6>
-<1E> <0152>
-<1F> <00D8>
-<21> <0021>
-<22> <201D>
-<23> <0023>
-<24> <00A3>
-<27> <2019>
-<3C> <00A1>
-<3D> <003D>
-<3E> <00BF>
-<5C> <201C>
-<5F> <02D9>
-<60> <2018>
-<7D> <02DD>
-<7E> <007E>
-<7F> <00A8>
-endbfchar
-endcmap
-CMapName currentdict /CMap defineresource pop
-end
-end
-%%EndResource
-%%EOF
- }\endgroup
- \expandafter\edef\csname cmapOT1IT\endcsname#1{%
- \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
- }%
-%
-% \cmapOT1TT
- \begingroup
- \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
- \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
-%%DocumentNeededResources: ProcSet (CIDInit)
-%%IncludeResource: ProcSet (CIDInit)
-%%BeginResource: CMap (TeX-OT1TT-0)
-%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
-%%Version: 1.000
-%%EndComments
-/CIDInit /ProcSet findresource begin
-12 dict begin
-begincmap
-/CIDSystemInfo
-<< /Registry (TeX)
-/Ordering (OT1TT)
-/Supplement 0
->> def
-/CMapName /TeX-OT1TT-0 def
-/CMapType 2 def
-1 begincodespacerange
-<00> <7F>
-endcodespacerange
-5 beginbfrange
-<00> <01> <0393>
-<09> <0A> <03A8>
-<21> <26> <0021>
-<28> <5F> <0028>
-<61> <7E> <0061>
-endbfrange
-32 beginbfchar
-<02> <0398>
-<03> <039B>
-<04> <039E>
-<05> <03A0>
-<06> <03A3>
-<07> <03D2>
-<08> <03A6>
-<0B> <2191>
-<0C> <2193>
-<0D> <0027>
-<0E> <00A1>
-<0F> <00BF>
-<10> <0131>
-<11> <0237>
-<12> <0060>
-<13> <00B4>
-<14> <02C7>
-<15> <02D8>
-<16> <00AF>
-<17> <02DA>
-<18> <00B8>
-<19> <00DF>
-<1A> <00E6>
-<1B> <0153>
-<1C> <00F8>
-<1D> <00C6>
-<1E> <0152>
-<1F> <00D8>
-<20> <2423>
-<27> <2019>
-<60> <2018>
-<7F> <00A8>
-endbfchar
-endcmap
-CMapName currentdict /CMap defineresource pop
-end
-end
-%%EndResource
-%%EOF
- }\endgroup
- \expandafter\edef\csname cmapOT1TT\endcsname#1{%
- \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
- }%
-\else
- \expandafter\let\csname cmapOT1\endcsname\gobble
- \expandafter\let\csname cmapOT1IT\endcsname\gobble
- \expandafter\let\csname cmapOT1TT\endcsname\gobble
-\fi
-
-
-% Set the font macro #1 to the font named #2, adding on the
-% specified font prefix (normally `cm').
-% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
-% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
-% empty to omit).
-\def\setfont#1#2#3#4#5{%
- \font#1=\fontprefix#2#3 scaled #4
- \csname cmap#5\endcsname#1%
-}
-% This is what gets called when #5 of \setfont is empty.
-\let\cmap\gobble
-
-
-% Use cm as the default font prefix.
-% To specify the font prefix, you must define \fontprefix
-% before you read in texinfo.tex.
-\ifx\fontprefix\undefined
-\def\fontprefix{cm}
-\fi
-% Support font families that don't use the same naming scheme as CM.
-\def\rmshape{r}
-\def\rmbshape{bx} %where the normal face is bold
-\def\bfshape{b}
-\def\bxshape{bx}
-\def\ttshape{tt}
-\def\ttbshape{tt}
-\def\ttslshape{sltt}
-\def\itshape{ti}
-\def\itbshape{bxti}
-\def\slshape{sl}
-\def\slbshape{bxsl}
-\def\sfshape{ss}
-\def\sfbshape{ss}
-\def\scshape{csc}
-\def\scbshape{csc}
-
-% Definitions for a main text size of 11pt. This is the default in
-% Texinfo.
-%
-\def\definetextfontsizexi{%
-% Text fonts (11.2pt, magstep1).
-\def\textnominalsize{11pt}
-\edef\mainmagstep{\magstephalf}
-\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
-\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
-\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
-\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
-\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
-\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
-\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
-\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
-\font\texti=cmmi10 scaled \mainmagstep
-\font\textsy=cmsy10 scaled \mainmagstep
-
-% A few fonts for @defun names and args.
-\setfont\defbf\bfshape{10}{\magstep1}{OT1}
-\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
-\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
-
-% Fonts for indices, footnotes, small examples (9pt).
-\def\smallnominalsize{9pt}
-\setfont\smallrm\rmshape{9}{1000}{OT1}
-\setfont\smalltt\ttshape{9}{1000}{OT1TT}
-\setfont\smallbf\bfshape{10}{900}{OT1}
-\setfont\smallit\itshape{9}{1000}{OT1IT}
-\setfont\smallsl\slshape{9}{1000}{OT1}
-\setfont\smallsf\sfshape{9}{1000}{OT1}
-\setfont\smallsc\scshape{10}{900}{OT1}
-\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
-\font\smalli=cmmi9
-\font\smallsy=cmsy9
-
-% Fonts for small examples (8pt).
-\def\smallernominalsize{8pt}
-\setfont\smallerrm\rmshape{8}{1000}{OT1}
-\setfont\smallertt\ttshape{8}{1000}{OT1TT}
-\setfont\smallerbf\bfshape{10}{800}{OT1}
-\setfont\smallerit\itshape{8}{1000}{OT1IT}
-\setfont\smallersl\slshape{8}{1000}{OT1}
-\setfont\smallersf\sfshape{8}{1000}{OT1}
-\setfont\smallersc\scshape{10}{800}{OT1}
-\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
-\font\smalleri=cmmi8
-\font\smallersy=cmsy8
-
-% Fonts for title page (20.4pt):
-\def\titlenominalsize{20pt}
-\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
-\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
-\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
-\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
-\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
-\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
-\let\titlebf=\titlerm
-\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
-\font\titlei=cmmi12 scaled \magstep3
-\font\titlesy=cmsy10 scaled \magstep4
-\def\authorrm{\secrm}
-\def\authortt{\sectt}
-
-% Chapter (and unnumbered) fonts (17.28pt).
-\def\chapnominalsize{17pt}
-\setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
-\setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
-\setfont\chapsl\slbshape{10}{\magstep3}{OT1}
-\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
-\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
-\setfont\chapsf\sfbshape{17}{1000}{OT1}
-\let\chapbf=\chaprm
-\setfont\chapsc\scbshape{10}{\magstep3}{OT1}
-\font\chapi=cmmi12 scaled \magstep2
-\font\chapsy=cmsy10 scaled \magstep3
-
-% Section fonts (14.4pt).
-\def\secnominalsize{14pt}
-\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
-\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
-\setfont\secsl\slbshape{10}{\magstep2}{OT1}
-\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
-\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
-\setfont\secsf\sfbshape{12}{\magstep1}{OT1}
-\let\secbf\secrm
-\setfont\secsc\scbshape{10}{\magstep2}{OT1}
-\font\seci=cmmi12 scaled \magstep1
-\font\secsy=cmsy10 scaled \magstep2
-
-% Subsection fonts (13.15pt).
-\def\ssecnominalsize{13pt}
-\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
-\setfont\ssecit\itbshape{10}{1315}{OT1IT}
-\setfont\ssecsl\slbshape{10}{1315}{OT1}
-\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
-\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
-\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
-\let\ssecbf\ssecrm
-\setfont\ssecsc\scbshape{10}{1315}{OT1}
-\font\sseci=cmmi12 scaled \magstephalf
-\font\ssecsy=cmsy10 scaled 1315
-
-% Reduced fonts for @acro in text (10pt).
-\def\reducednominalsize{10pt}
-\setfont\reducedrm\rmshape{10}{1000}{OT1}
-\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
-\setfont\reducedbf\bfshape{10}{1000}{OT1}
-\setfont\reducedit\itshape{10}{1000}{OT1IT}
-\setfont\reducedsl\slshape{10}{1000}{OT1}
-\setfont\reducedsf\sfshape{10}{1000}{OT1}
-\setfont\reducedsc\scshape{10}{1000}{OT1}
-\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
-\font\reducedi=cmmi10
-\font\reducedsy=cmsy10
-
-% reset the current fonts
-\textfonts
-\rm
-} % end of 11pt text font size definitions
-
-
-% Definitions to make the main text be 10pt Computer Modern, with
-% section, chapter, etc., sizes following suit. This is for the GNU
-% Press printing of the Emacs 22 manual. Maybe other manuals in the
-% future. Used with @smallbook, which sets the leading to 12pt.
-%
-\def\definetextfontsizex{%
-% Text fonts (10pt).
-\def\textnominalsize{10pt}
-\edef\mainmagstep{1000}
-\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
-\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
-\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
-\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
-\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
-\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
-\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
-\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
-\font\texti=cmmi10 scaled \mainmagstep
-\font\textsy=cmsy10 scaled \mainmagstep
-
-% A few fonts for @defun names and args.
-\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
-\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
-\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
-
-% Fonts for indices, footnotes, small examples (9pt).
-\def\smallnominalsize{9pt}
-\setfont\smallrm\rmshape{9}{1000}{OT1}
-\setfont\smalltt\ttshape{9}{1000}{OT1TT}
-\setfont\smallbf\bfshape{10}{900}{OT1}
-\setfont\smallit\itshape{9}{1000}{OT1IT}
-\setfont\smallsl\slshape{9}{1000}{OT1}
-\setfont\smallsf\sfshape{9}{1000}{OT1}
-\setfont\smallsc\scshape{10}{900}{OT1}
-\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
-\font\smalli=cmmi9
-\font\smallsy=cmsy9
-
-% Fonts for small examples (8pt).
-\def\smallernominalsize{8pt}
-\setfont\smallerrm\rmshape{8}{1000}{OT1}
-\setfont\smallertt\ttshape{8}{1000}{OT1TT}
-\setfont\smallerbf\bfshape{10}{800}{OT1}
-\setfont\smallerit\itshape{8}{1000}{OT1IT}
-\setfont\smallersl\slshape{8}{1000}{OT1}
-\setfont\smallersf\sfshape{8}{1000}{OT1}
-\setfont\smallersc\scshape{10}{800}{OT1}
-\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
-\font\smalleri=cmmi8
-\font\smallersy=cmsy8
-
-% Fonts for title page (20.4pt):
-\def\titlenominalsize{20pt}
-\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
-\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
-\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
-\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
-\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
-\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
-\let\titlebf=\titlerm
-\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
-\font\titlei=cmmi12 scaled \magstep3
-\font\titlesy=cmsy10 scaled \magstep4
-\def\authorrm{\secrm}
-\def\authortt{\sectt}
-
-% Chapter fonts (14.4pt).
-\def\chapnominalsize{14pt}
-\setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
-\setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
-\setfont\chapsl\slbshape{10}{\magstep2}{OT1}
-\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
-\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
-\setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
-\let\chapbf\chaprm
-\setfont\chapsc\scbshape{10}{\magstep2}{OT1}
-\font\chapi=cmmi12 scaled \magstep1
-\font\chapsy=cmsy10 scaled \magstep2
-
-% Section fonts (12pt).
-\def\secnominalsize{12pt}
-\setfont\secrm\rmbshape{12}{1000}{OT1}
-\setfont\secit\itbshape{10}{\magstep1}{OT1IT}
-\setfont\secsl\slbshape{10}{\magstep1}{OT1}
-\setfont\sectt\ttbshape{12}{1000}{OT1TT}
-\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
-\setfont\secsf\sfbshape{12}{1000}{OT1}
-\let\secbf\secrm
-\setfont\secsc\scbshape{10}{\magstep1}{OT1}
-\font\seci=cmmi12
-\font\secsy=cmsy10 scaled \magstep1
-
-% Subsection fonts (10pt).
-\def\ssecnominalsize{10pt}
-\setfont\ssecrm\rmbshape{10}{1000}{OT1}
-\setfont\ssecit\itbshape{10}{1000}{OT1IT}
-\setfont\ssecsl\slbshape{10}{1000}{OT1}
-\setfont\ssectt\ttbshape{10}{1000}{OT1TT}
-\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
-\setfont\ssecsf\sfbshape{10}{1000}{OT1}
-\let\ssecbf\ssecrm
-\setfont\ssecsc\scbshape{10}{1000}{OT1}
-\font\sseci=cmmi10
-\font\ssecsy=cmsy10
-
-% Reduced fonts for @acro in text (9pt).
-\def\reducednominalsize{9pt}
-\setfont\reducedrm\rmshape{9}{1000}{OT1}
-\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
-\setfont\reducedbf\bfshape{10}{900}{OT1}
-\setfont\reducedit\itshape{9}{1000}{OT1IT}
-\setfont\reducedsl\slshape{9}{1000}{OT1}
-\setfont\reducedsf\sfshape{9}{1000}{OT1}
-\setfont\reducedsc\scshape{10}{900}{OT1}
-\setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
-\font\reducedi=cmmi9
-\font\reducedsy=cmsy9
-
-% reduce space between paragraphs
-\divide\parskip by 2
-
-% reset the current fonts
-\textfonts
-\rm
-} % end of 10pt text font size definitions
-
-
-% We provide the user-level command
-% @fonttextsize 10
-% (or 11) to redefine the text font size. pt is assumed.
-%
-\def\xword{10}
-\def\xiword{11}
-%
-\parseargdef\fonttextsize{%
- \def\textsizearg{#1}%
- \wlog{doing @fonttextsize \textsizearg}%
- %
- % Set \globaldefs so that documents can use this inside @tex, since
- % makeinfo 4.8 does not support it, but we need it nonetheless.
- %
- \begingroup \globaldefs=1
- \ifx\textsizearg\xword \definetextfontsizex
- \else \ifx\textsizearg\xiword \definetextfontsizexi
- \else
- \errhelp=\EMsimple
- \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
- \fi\fi
- \endgroup
-}
-
-
-% In order for the font changes to affect most math symbols and letters,
-% we have to define the \textfont of the standard families. Since
-% texinfo doesn't allow for producing subscripts and superscripts except
-% in the main text, we don't bother to reset \scriptfont and
-% \scriptscriptfont (which would also require loading a lot more fonts).
-%
-\def\resetmathfonts{%
- \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
- \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
- \textfont\ttfam=\tentt \textfont\sffam=\tensf
-}
-
-% The font-changing commands redefine the meanings of \tenSTYLE, instead
-% of just \STYLE. We do this because \STYLE needs to also set the
-% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
-% \tenSTYLE to set the current font.
-%
-% Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower). These relative commands are used in
-% the LaTeX logo and acronyms.
-%
-% This all needs generalizing, badly.
-%
-\def\textfonts{%
- \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
- \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
- \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
- \let\tenttsl=\textttsl
- \def\curfontsize{text}%
- \def\lsize{reduced}\def\lllsize{smaller}%
- \resetmathfonts \setleading{\textleading}}
-\def\titlefonts{%
- \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
- \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
- \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
- \let\tenttsl=\titlettsl
- \def\curfontsize{title}%
- \def\lsize{chap}\def\lllsize{subsec}%
- \resetmathfonts \setleading{25pt}}
-\def\titlefont#1{{\titlefonts\rm #1}}
-\def\chapfonts{%
- \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
- \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
- \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
- \let\tenttsl=\chapttsl
- \def\curfontsize{chap}%
- \def\lsize{sec}\def\lllsize{text}%
- \resetmathfonts \setleading{19pt}}
-\def\secfonts{%
- \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
- \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
- \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
- \let\tenttsl=\secttsl
- \def\curfontsize{sec}%
- \def\lsize{subsec}\def\lllsize{reduced}%
- \resetmathfonts \setleading{16pt}}
-\def\subsecfonts{%
- \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
- \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
- \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
- \let\tenttsl=\ssecttsl
- \def\curfontsize{ssec}%
- \def\lsize{text}\def\lllsize{small}%
- \resetmathfonts \setleading{15pt}}
-\let\subsubsecfonts = \subsecfonts
-\def\reducedfonts{%
- \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
- \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
- \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
- \let\tenttsl=\reducedttsl
- \def\curfontsize{reduced}%
- \def\lsize{small}\def\lllsize{smaller}%
- \resetmathfonts \setleading{10.5pt}}
-\def\smallfonts{%
- \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
- \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
- \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
- \let\tenttsl=\smallttsl
- \def\curfontsize{small}%
- \def\lsize{smaller}\def\lllsize{smaller}%
- \resetmathfonts \setleading{10.5pt}}
-\def\smallerfonts{%
- \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
- \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
- \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
- \let\tenttsl=\smallerttsl
- \def\curfontsize{smaller}%
- \def\lsize{smaller}\def\lllsize{smaller}%
- \resetmathfonts \setleading{9.5pt}}
-
-% Set the fonts to use with the @small... environments.
-\let\smallexamplefonts = \smallfonts
-
-% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
-% can fit this many characters:
-% 8.5x11=86 smallbook=72 a4=90 a5=69
-% If we use \scriptfonts (8pt), then we can fit this many characters:
-% 8.5x11=90+ smallbook=80 a4=90+ a5=77
-% For me, subjectively, the few extra characters that fit aren't worth
-% the additional smallness of 8pt. So I'm making the default 9pt.
-%
-% By the way, for comparison, here's what fits with @example (10pt):
-% 8.5x11=71 smallbook=60 a4=75 a5=58
-%
-% I wish the USA used A4 paper.
-% --karl, 24jan03.
-
-
-% Set up the default fonts, so we can use them for creating boxes.
-%
-\definetextfontsizexi
-
-% Define these so they can be easily changed for other fonts.
-\def\angleleft{$\langle$}
-\def\angleright{$\rangle$}
-
-% Count depth in font-changes, for error checks
-\newcount\fontdepth \fontdepth=0
-
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}{OT1}
-\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}{OT1}
-\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
-
-%% Add scribe-like font environments, plus @l for inline lisp (usually sans
-%% serif) and @ii for TeX italic
-
-% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
-% unless the following character is such as not to need one.
-\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
- \ptexslash\fi\fi\fi}
-\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
-\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
-
-% like \smartslanted except unconditionally uses \ttsl.
-% @var is set to this for defun arguments.
-\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
-
-% like \smartslanted except unconditionally use \sl. We never want
-% ttsl for book titles, do we?
-\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
-
-\let\i=\smartitalic
-\let\slanted=\smartslanted
-\let\var=\smartslanted
-\let\dfn=\smartslanted
-\let\emph=\smartitalic
-
-% @b, explicit bold.
-\def\b#1{{\bf #1}}
-\let\strong=\b
-
-% @sansserif, explicit sans.
-\def\sansserif#1{{\sf #1}}
-
-% We can't just use \exhyphenpenalty, because that only has effect at
-% the end of a paragraph. Restore normal hyphenation at the end of the
-% group within which \nohyphenation is presumably called.
-%
-\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
-\def\restorehyphenation{\hyphenchar\font = `- }
-
-% Set sfcode to normal for the chars that usually have another value.
-% Can't use plain's \frenchspacing because it uses the `\x notation, and
-% sometimes \x has an active definition that messes things up.
-%
-\catcode`@=11
- \def\plainfrenchspacing{%
- \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
- \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
- \def\endofsentencespacefactor{1000}% for @. and friends
- }
- \def\plainnonfrenchspacing{%
- \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
- \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
- \def\endofsentencespacefactor{3000}% for @. and friends
- }
-\catcode`@=\other
-\def\endofsentencespacefactor{3000}% default
-
-\def\t#1{%
- {\tt \rawbackslash \plainfrenchspacing #1}%
- \null
-}
-\def\samp#1{`\tclose{#1}'\null}
-\setfont\keyrm\rmshape{8}{1000}{OT1}
-\font\keysy=cmsy9
-\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
- \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
- \vbox{\hrule\kern-0.4pt
- \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
- \kern-0.4pt\hrule}%
- \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-\def\key #1{{\nohyphenation \uppercase{#1}}\null}
-% The old definition, with no lozenge:
-%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
-
-% @file, @option are the same as @samp.
-\let\file=\samp
-\let\option=\samp
-
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
-\def\tclose#1{%
- {%
- % Change normal interword space to be same as for the current font.
- \spaceskip = \fontdimen2\font
- %
- % Switch to typewriter.
- \tt
- %
- % But `\ ' produces the large typewriter interword space.
- \def\ {{\spaceskip = 0pt{} }}%
- %
- % Turn off hyphenation.
- \nohyphenation
- %
- \rawbackslash
- \plainfrenchspacing
- #1%
- }%
- \null
-}
-
-% We *must* turn on hyphenation at `-' and `_' in @code.
-% Otherwise, it is too hard to avoid overfull hboxes
-% in the Emacs manual, the Library manual, etc.
-
-% Unfortunately, TeX uses one parameter (\hyphenchar) to control
-% both hyphenation at - and hyphenation within words.
-% We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate at a dash.
-% -- rms.
-{
- \catcode`\-=\active \catcode`\_=\active
- \catcode`\'=\active \catcode`\`=\active
- %
- \global\def\code{\begingroup
- \catcode\rquoteChar=\active \catcode\lquoteChar=\active
- \let'\codequoteright \let`\codequoteleft
- %
- \catcode\dashChar=\active \catcode\underChar=\active
- \ifallowcodebreaks
- \let-\codedash
- \let_\codeunder
- \else
- \let-\realdash
- \let_\realunder
- \fi
- \codex
- }
-}
-
-\def\realdash{-}
-\def\codedash{-\discretionary{}{}{}}
-\def\codeunder{%
- % this is all so @math{@code{var_name}+1} can work. In math mode, _
- % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
- % will therefore expand the active definition of _, which is us
- % (inside @code that is), therefore an endless loop.
- \ifusingtt{\ifmmode
- \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
- \else\normalunderscore \fi
- \discretionary{}{}{}}%
- {\_}%
-}
-\def\codex #1{\tclose{#1}\endgroup}
-
-% An additional complication: the above will allow breaks after, e.g.,
-% each of the four underscores in __typeof__. This is undesirable in
-% some manuals, especially if they don't have long identifiers in
-% general. @allowcodebreaks provides a way to control this.
-%
-\newif\ifallowcodebreaks \allowcodebreakstrue
-
-\def\keywordtrue{true}
-\def\keywordfalse{false}
-
-\parseargdef\allowcodebreaks{%
- \def\txiarg{#1}%
- \ifx\txiarg\keywordtrue
- \allowcodebreakstrue
- \else\ifx\txiarg\keywordfalse
- \allowcodebreaksfalse
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
- \fi\fi
-}
-
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-
-% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
-% `example' (@kbd uses ttsl only inside of @example and friends),
-% or `code' (@kbd uses normal tty font always).
-\parseargdef\kbdinputstyle{%
- \def\txiarg{#1}%
- \ifx\txiarg\worddistinct
- \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
- \else\ifx\txiarg\wordexample
- \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
- \else\ifx\txiarg\wordcode
- \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
- \fi\fi\fi
-}
-\def\worddistinct{distinct}
-\def\wordexample{example}
-\def\wordcode{code}
-
-% Default is `distinct.'
-\kbdinputstyle distinct
-
-\def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\look}}\fi
-\else{\tclose{\kbdfont\look}}\fi}
-
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
-\let\command=\code
-
-% @uref (abbreviation for `urlref') takes an optional (comma-separated)
-% second argument specifying the text to display and an optional third
-% arg as text to display instead of (rather than in addition to) the url
-% itself. First (mandatory) arg is the url. Perhaps eventually put in
-% a hypertex \special here.
-%
-\def\uref#1{\douref #1,,,\finish}
-\def\douref#1,#2,#3,#4\finish{\begingroup
- \unsepspaces
- \pdfurl{#1}%
- \setbox0 = \hbox{\ignorespaces #3}%
- \ifdim\wd0 > 0pt
- \unhbox0 % third arg given, show only that
- \else
- \setbox0 = \hbox{\ignorespaces #2}%
- \ifdim\wd0 > 0pt
- \ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
- \else
- \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
- \fi
- \else
- \code{#1}% only url given, so show it
- \fi
- \fi
- \endlink
-\endgroup}
-
-% @url synonym for @uref, since that's how everyone uses it.
-%
-\let\url=\uref
-
-% rms does not like angle brackets --karl, 17may97.
-% So now @email is just like @uref, unless we are pdf.
-%
-%\def\email#1{\angleleft{\tt #1}\angleright}
-\ifpdf
- \def\email#1{\doemail#1,,\finish}
- \def\doemail#1,#2,#3\finish{\begingroup
- \unsepspaces
- \pdfurl{mailto:#1}%
- \setbox0 = \hbox{\ignorespaces #2}%
- \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
- \endlink
- \endgroup}
-\else
- \let\email=\uref
-\fi
-
-% Check if we are currently using a typewriter font. Since all the
-% Computer Modern typewriter fonts have zero interword stretch (and
-% shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
-
-% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
-% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
-%
-\def\dmn#1{\thinspace #1}
-
-\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
-
-% @l was never documented to mean ``switch to the Lisp font'',
-% and it is not used as such in any manual I can find. We need it for
-% Polish suppressed-l. --karl, 22sep96.
-%\def\l#1{{\li #1}\null}
-
-% Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\rm #1}} % roman font
-\def\sc#1{{\smallcaps#1}} % smallcaps font
-\def\ii#1{{\it #1}} % italic font
-
-% @acronym for "FBI", "NATO", and the like.
-% We print this one point size smaller, since it's intended for
-% all-uppercase.
-%
-\def\acronym#1{\doacronym #1,,\finish}
-\def\doacronym#1,#2,#3\finish{%
- {\selectfonts\lsize #1}%
- \def\temp{#2}%
- \ifx\temp\empty \else
- \space ({\unsepspaces \ignorespaces \temp \unskip})%
- \fi
-}
-
-% @abbr for "Comput. J." and the like.
-% No font change, but don't do end-of-sentence spacing.
-%
-\def\abbr#1{\doabbr #1,,\finish}
-\def\doabbr#1,#2,#3\finish{%
- {\plainfrenchspacing #1}%
- \def\temp{#2}%
- \ifx\temp\empty \else
- \space ({\unsepspaces \ignorespaces \temp \unskip})%
- \fi
-}
-
-% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
-%
-\def\pounds{{\it\$}}
-
-% @euro{} comes from a separate font, depending on the current style.
-% We use the free feym* fonts from the eurosym package by Henrik
-% Theiling, which support regular, slanted, bold and bold slanted (and
-% "outlined" (blackboard board, sort of) versions, which we don't need).
-% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
-%
-% Although only regular is the truly official Euro symbol, we ignore
-% that. The Euro is designed to be slightly taller than the regular
-% font height.
-%
-% feymr - regular
-% feymo - slanted
-% feybr - bold
-% feybo - bold slanted
-%
-% There is no good (free) typewriter version, to my knowledge.
-% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
-% Hmm.
-%
-% Also doesn't work in math. Do we need to do math with euro symbols?
-% Hope not.
-%
-%
-\def\euro{{\eurofont e}}
-\def\eurofont{%
- % We set the font at each command, rather than predefining it in
- % \textfonts and the other font-switching commands, so that
- % installations which never need the symbol don't have to have the
- % font installed.
- %
- % There is only one designed size (nominal 10pt), so we always scale
- % that to the current nominal size.
- %
- % By the way, simply using "at 1em" works for cmr10 and the like, but
- % does not work for cmbx10 and other extended/shrunken fonts.
- %
- \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
- %
- \ifx\curfontstyle\bfstylename
- % bold:
- \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
- \else
- % regular:
- \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
- \fi
- \thiseurofont
-}
-
-% @registeredsymbol - R in a circle. The font for the R should really
-% be smaller yet, but lllsize is the best we can do for now.
-% Adapted from the plain.tex definition of \copyright.
-%
-\def\registeredsymbol{%
- $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
- \hfil\crcr\Orb}}%
- }$%
-}
-
-% @textdegree - the normal degrees sign.
-%
-\def\textdegree{$^\circ$}
-
-% Laurent Siebenmann reports \Orb undefined with:
-% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
-% so we'll define it if necessary.
-%
-\ifx\Orb\undefined
-\def\Orb{\mathhexbox20D}
-\fi
-
-
-\message{page headings,}
-
-\newskip\titlepagetopglue \titlepagetopglue = 1.5in
-\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
-
-% First the title page. Must do @settitle before @titlepage.
-\newif\ifseenauthor
-\newif\iffinishedtitlepage
-
-% Do an implicit @contents or @shortcontents after @end titlepage if the
-% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
-%
-\newif\ifsetcontentsaftertitlepage
- \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
-\newif\ifsetshortcontentsaftertitlepage
- \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
-
-\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
- \endgroup\page\hbox{}\page}
-
-\envdef\titlepage{%
- % Open one extra group, as we want to close it in the middle of \Etitlepage.
- \begingroup
- \parindent=0pt \textfonts
- % Leave some space at the very top of the page.
- \vglue\titlepagetopglue
- % No rule at page bottom unless we print one at the top with @title.
- \finishedtitlepagetrue
- %
- % Most title ``pages'' are actually two pages long, with space
- % at the top of the second. We don't want the ragged left on the second.
- \let\oldpage = \page
- \def\page{%
- \iffinishedtitlepage\else
- \finishtitlepage
- \fi
- \let\page = \oldpage
- \page
- \null
- }%
-}
-
-\def\Etitlepage{%
- \iffinishedtitlepage\else
- \finishtitlepage
- \fi
- % It is important to do the page break before ending the group,
- % because the headline and footline are only empty inside the group.
- % If we use the new definition of \page, we always get a blank page
- % after the title page, which we certainly don't want.
- \oldpage
- \endgroup
- %
- % Need this before the \...aftertitlepage checks so that if they are
- % in effect the toc pages will come out with page numbers.
- \HEADINGSon
- %
- % If they want short, they certainly want long too.
- \ifsetshortcontentsaftertitlepage
- \shortcontents
- \contents
- \global\let\shortcontents = \relax
- \global\let\contents = \relax
- \fi
- %
- \ifsetcontentsaftertitlepage
- \contents
- \global\let\contents = \relax
- \global\let\shortcontents = \relax
- \fi
-}
-
-\def\finishtitlepage{%
- \vskip4pt \hrule height 2pt width \hsize
- \vskip\titlepagebottomglue
- \finishedtitlepagetrue
-}
-
-%%% Macros to be used within @titlepage:
-
-\let\subtitlerm=\tenrm
-\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
-
-\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
- \let\tt=\authortt}
-
-\parseargdef\title{%
- \checkenv\titlepage
- \leftline{\titlefonts\rm #1}
- % print a rule at the page bottom also.
- \finishedtitlepagefalse
- \vskip4pt \hrule height 4pt width \hsize \vskip4pt
-}
-
-\parseargdef\subtitle{%
- \checkenv\titlepage
- {\subtitlefont \rightline{#1}}%
-}
-
-% @author should come last, but may come many times.
-% It can also be used inside @quotation.
-%
-\parseargdef\author{%
- \def\temp{\quotation}%
- \ifx\thisenv\temp
- \def\quotationauthor{#1}% printed in \Equotation.
- \else
- \checkenv\titlepage
- \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
- {\authorfont \leftline{#1}}%
- \fi
-}
-
-
-%%% Set up page headings and footings.
-
-\let\thispage=\folio
-
-\newtoks\evenheadline % headline on even pages
-\newtoks\oddheadline % headline on odd pages
-\newtoks\evenfootline % footline on even pages
-\newtoks\oddfootline % footline on odd pages
-
-% Now make TeX use those variables
-\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
- \else \the\evenheadline \fi}}
-\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
- \else \the\evenfootline \fi}\HEADINGShook}
-\let\HEADINGShook=\relax
-
-% Commands to set those variables.
-% For example, this is what @headings on does
-% @evenheading @thistitle|@thispage|@thischapter
-% @oddheading @thischapter|@thispage|@thistitle
-% @evenfooting @thisfile||
-% @oddfooting ||@thisfile
-
-
-\def\evenheading{\parsearg\evenheadingxxx}
-\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
-\def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
-\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\def\oddheading{\parsearg\oddheadingxxx}
-\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
-\def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
-\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
-
-\def\evenfooting{\parsearg\evenfootingxxx}
-\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
-\def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
-\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
-
-\def\oddfooting{\parsearg\oddfootingxxx}
-\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
-\def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
- \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
- %
- % Leave some space for the footline. Hopefully ok to assume
- % @evenfooting will not be used by itself.
- \global\advance\pageheight by -12pt
- \global\advance\vsize by -12pt
-}
-
-\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
-
-
-% @headings double turns headings on for double-sided printing.
-% @headings single turns headings on for single-sided printing.
-% @headings off turns them off.
-% @headings on same as @headings double, retained for compatibility.
-% @headings after turns on double-sided headings after this page.
-% @headings doubleafter turns on double-sided headings after this page.
-% @headings singleafter turns on single-sided headings after this page.
-% By default, they are off at the start of a document,
-% and turned `on' after @end titlepage.
-
-\def\headings #1 {\csname HEADINGS#1\endcsname}
-
-\def\HEADINGSoff{%
-\global\evenheadline={\hfil} \global\evenfootline={\hfil}
-\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
-\HEADINGSoff
-% When we turn headings on, set the page number to 1.
-% For double-sided printing, put current file name in lower left corner,
-% chapter name on inside top of right hand pages, document
-% title on inside top of left hand pages, and page numbers on outside top
-% edge of all pages.
-\def\HEADINGSdouble{%
-\global\pageno=1
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-\global\let\contentsalignmacro = \chapoddpage
-}
-\let\contentsalignmacro = \chappager
-
-% For single-sided printing, chapter title goes across top left of page,
-% page number on top right.
-\def\HEADINGSsingle{%
-\global\pageno=1
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-\global\let\contentsalignmacro = \chappager
-}
-\def\HEADINGSon{\HEADINGSdouble}
-
-\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
-\let\HEADINGSdoubleafter=\HEADINGSafter
-\def\HEADINGSdoublex{%
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-\global\let\contentsalignmacro = \chapoddpage
-}
-
-\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
-\def\HEADINGSsinglex{%
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
-\global\let\contentsalignmacro = \chappager
-}
-
-% Subroutines used in generating headings
-% This produces Day Month Year style of output.
-% Only define if not already defined, in case a txi-??.tex file has set
-% up a different format (e.g., txi-cs.tex does this).
-\ifx\today\undefined
-\def\today{%
- \number\day\space
- \ifcase\month
- \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
- \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
- \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
- \fi
- \space\number\year}
-\fi
-
-% @settitle line... specifies the title of the document, for headings.
-% It generates no output of its own.
-\def\thistitle{\putwordNoTitle}
-\def\settitle{\parsearg{\gdef\thistitle}}
-
-
-\message{tables,}
-% Tables -- @table, @ftable, @vtable, @item(x).
-
-% default indentation of table text
-\newdimen\tableindent \tableindent=.8in
-% default indentation of @itemize and @enumerate text
-\newdimen\itemindent \itemindent=.3in
-% margin between end of table item and start of table text.
-\newdimen\itemmargin \itemmargin=.1in
-
-% used internally for \itemindent minus \itemmargin
-\newdimen\itemmax
-
-% Note @table, @ftable, and @vtable define @item, @itemx, etc., with
-% these defs.
-% They also define \itemindex
-% to index the item name in whatever manner is desired (perhaps none).
-
-\newif\ifitemxneedsnegativevskip
-
-\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
-
-\def\internalBitem{\smallbreak \parsearg\itemzzz}
-\def\internalBitemx{\itemxpar \parsearg\itemzzz}
-
-\def\itemzzz #1{\begingroup %
- \advance\hsize by -\rightskip
- \advance\hsize by -\tableindent
- \setbox0=\hbox{\itemindicate{#1}}%
- \itemindex{#1}%
- \nobreak % This prevents a break before @itemx.
- %
- % If the item text does not fit in the space we have, put it on a line
- % by itself, and do not allow a page break either before or after that
- % line. We do not start a paragraph here because then if the next
- % command is, e.g., @kindex, the whatsit would get put into the
- % horizontal list on a line by itself, resulting in extra blank space.
- \ifdim \wd0>\itemmax
- %
- % Make this a paragraph so we get the \parskip glue and wrapping,
- % but leave it ragged-right.
- \begingroup
- \advance\leftskip by-\tableindent
- \advance\hsize by\tableindent
- \advance\rightskip by0pt plus1fil
- \leavevmode\unhbox0\par
- \endgroup
- %
- % We're going to be starting a paragraph, but we don't want the
- % \parskip glue -- logically it's part of the @item we just started.
- \nobreak \vskip-\parskip
- %
- % Stop a page break at the \parskip glue coming up. However, if
- % what follows is an environment such as @example, there will be no
- % \parskip glue; then the negative vskip we just inserted would
- % cause the example and the item to crash together. So we use this
- % bizarre value of 10001 as a signal to \aboveenvbreak to insert
- % \parskip glue after all. Section titles are handled this way also.
- %
- \penalty 10001
- \endgroup
- \itemxneedsnegativevskipfalse
- \else
- % The item text fits into the space. Start a paragraph, so that the
- % following text (if any) will end up on the same line.
- \noindent
- % Do this with kerns and \unhbox so that if there is a footnote in
- % the item text, it can migrate to the main vertical list and
- % eventually be printed.
- \nobreak\kern-\tableindent
- \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
- \unhbox0
- \nobreak\kern\dimen0
- \endgroup
- \itemxneedsnegativevskiptrue
- \fi
-}
-
-\def\item{\errmessage{@item while not in a list environment}}
-\def\itemx{\errmessage{@itemx while not in a list environment}}
-
-% @table, @ftable, @vtable.
-\envdef\table{%
- \let\itemindex\gobble
- \tablecheck{table}%
-}
-\envdef\ftable{%
- \def\itemindex ##1{\doind {fn}{\code{##1}}}%
- \tablecheck{ftable}%
-}
-\envdef\vtable{%
- \def\itemindex ##1{\doind {vr}{\code{##1}}}%
- \tablecheck{vtable}%
-}
-\def\tablecheck#1{%
- \ifnum \the\catcode`\^^M=\active
- \endgroup
- \errmessage{This command won't work in this context; perhaps the problem is
- that we are \inenvironment\thisenv}%
- \def\next{\doignore{#1}}%
- \else
- \let\next\tablex
- \fi
- \next
-}
-\def\tablex#1{%
- \def\itemindicate{#1}%
- \parsearg\tabley
-}
-\def\tabley#1{%
- {%
- \makevalueexpandable
- \edef\temp{\noexpand\tablez #1\space\space\space}%
- \expandafter
- }\temp \endtablez
-}
-\def\tablez #1 #2 #3 #4\endtablez{%
- \aboveenvbreak
- \ifnum 0#1>0 \advance \leftskip by #1\mil \fi
- \ifnum 0#2>0 \tableindent=#2\mil \fi
- \ifnum 0#3>0 \advance \rightskip by #3\mil \fi
- \itemmax=\tableindent
- \advance \itemmax by -\itemmargin
- \advance \leftskip by \tableindent
- \exdentamount=\tableindent
- \parindent = 0pt
- \parskip = \smallskipamount
- \ifdim \parskip=0pt \parskip=2pt \fi
- \let\item = \internalBitem
- \let\itemx = \internalBitemx
-}
-\def\Etable{\endgraf\afterenvbreak}
-\let\Eftable\Etable
-\let\Evtable\Etable
-\let\Eitemize\Etable
-\let\Eenumerate\Etable
-
-% This is the counter used by @enumerate, which is really @itemize
-
-\newcount \itemno
-
-\envdef\itemize{\parsearg\doitemize}
-
-\def\doitemize#1{%
- \aboveenvbreak
- \itemmax=\itemindent
- \advance\itemmax by -\itemmargin
- \advance\leftskip by \itemindent
- \exdentamount=\itemindent
- \parindent=0pt
- \parskip=\smallskipamount
- \ifdim\parskip=0pt \parskip=2pt \fi
- \def\itemcontents{#1}%
- % @itemize with no arg is equivalent to @itemize @bullet.
- \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
- \let\item=\itemizeitem
-}
-
-% Definition of @item while inside @itemize and @enumerate.
-%
-\def\itemizeitem{%
- \advance\itemno by 1 % for enumerations
- {\let\par=\endgraf \smallbreak}% reasonable place to break
- {%
- % If the document has an @itemize directly after a section title, a
- % \nobreak will be last on the list, and \sectionheading will have
- % done a \vskip-\parskip. In that case, we don't want to zero
- % parskip, or the item text will crash with the heading. On the
- % other hand, when there is normal text preceding the item (as there
- % usually is), we do want to zero parskip, or there would be too much
- % space. In that case, we won't have a \nobreak before. At least
- % that's the theory.
- \ifnum\lastpenalty<10000 \parskip=0in \fi
- \noindent
- \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
- \vadjust{\penalty 1200}}% not good to break after first line of item.
- \flushcr
-}
-
-% \splitoff TOKENS\endmark defines \first to be the first token in
-% TOKENS, and \rest to be the remainder.
-%
-\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
-
-% Allow an optional argument of an uppercase letter, lowercase letter,
-% or number, to specify the first label in the enumerated list. No
-% argument is the same as `1'.
-%
-\envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
-\def\enumeratey #1 #2\endenumeratey{%
- % If we were given no argument, pretend we were given `1'.
- \def\thearg{#1}%
- \ifx\thearg\empty \def\thearg{1}\fi
- %
- % Detect if the argument is a single token. If so, it might be a
- % letter. Otherwise, the only valid thing it can be is a number.
- % (We will always have one token, because of the test we just made.
- % This is a good thing, since \splitoff doesn't work given nothing at
- % all -- the first parameter is undelimited.)
- \expandafter\splitoff\thearg\endmark
- \ifx\rest\empty
- % Only one token in the argument. It could still be anything.
- % A ``lowercase letter'' is one whose \lccode is nonzero.
- % An ``uppercase letter'' is one whose \lccode is both nonzero, and
- % not equal to itself.
- % Otherwise, we assume it's a number.
- %
- % We need the \relax at the end of the \ifnum lines to stop TeX from
- % continuing to look for a <number>.
- %
- \ifnum\lccode\expandafter`\thearg=0\relax
- \numericenumerate % a number (we hope)
- \else
- % It's a letter.
- \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
- \lowercaseenumerate % lowercase letter
- \else
- \uppercaseenumerate % uppercase letter
- \fi
- \fi
- \else
- % Multiple tokens in the argument. We hope it's a number.
- \numericenumerate
- \fi
-}
-
-% An @enumerate whose labels are integers. The starting integer is
-% given in \thearg.
-%
-\def\numericenumerate{%
- \itemno = \thearg
- \startenumeration{\the\itemno}%
-}
-
-% The starting (lowercase) letter is in \thearg.
-\def\lowercaseenumerate{%
- \itemno = \expandafter`\thearg
- \startenumeration{%
- % Be sure we're not beyond the end of the alphabet.
- \ifnum\itemno=0
- \errmessage{No more lowercase letters in @enumerate; get a bigger
- alphabet}%
- \fi
- \char\lccode\itemno
- }%
-}
-
-% The starting (uppercase) letter is in \thearg.
-\def\uppercaseenumerate{%
- \itemno = \expandafter`\thearg
- \startenumeration{%
- % Be sure we're not beyond the end of the alphabet.
- \ifnum\itemno=0
- \errmessage{No more uppercase letters in @enumerate; get a bigger
- alphabet}
- \fi
- \char\uccode\itemno
- }%
-}
-
-% Call \doitemize, adding a period to the first argument and supplying the
-% common last two arguments. Also subtract one from the initial value in
-% \itemno, since @item increments \itemno.
-%
-\def\startenumeration#1{%
- \advance\itemno by -1
- \doitemize{#1.}\flushcr
-}
-
-% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
-% to @enumerate.
-%
-\def\alphaenumerate{\enumerate{a}}
-\def\capsenumerate{\enumerate{A}}
-\def\Ealphaenumerate{\Eenumerate}
-\def\Ecapsenumerate{\Eenumerate}
-
-
-% @multitable macros
-% Amy Hendrickson, 8/18/94, 3/6/96
-%
-% @multitable ... @end multitable will make as many columns as desired.
-% Contents of each column will wrap at width given in preamble. Width
-% can be specified either with sample text given in a template line,
-% or in percent of \hsize, the current width of text on page.
-
-% Table can continue over pages but will only break between lines.
-
-% To make preamble:
-%
-% Either define widths of columns in terms of percent of \hsize:
-% @multitable @columnfractions .25 .3 .45
-% @item ...
-%
-% Numbers following @columnfractions are the percent of the total
-% current hsize to be used for each column. You may use as many
-% columns as desired.
-
-
-% Or use a template:
-% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
-% @item ...
-% using the widest term desired in each column.
-
-% Each new table line starts with @item, each subsequent new column
-% starts with @tab. Empty columns may be produced by supplying @tab's
-% with nothing between them for as many times as empty columns are needed,
-% ie, @tab at tab@tab will produce two empty columns.
-
-% @item, @tab do not need to be on their own lines, but it will not hurt
-% if they are.
-
-% Sample multitable:
-
-% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
-% @item first col stuff @tab second col stuff @tab third col
-% @item
-% first col stuff
-% @tab
-% second col stuff
-% @tab
-% third col
-% @item first col stuff @tab second col stuff
-% @tab Many paragraphs of text may be used in any column.
-%
-% They will wrap at the width determined by the template.
-% @item at tab@tab This will be in third column.
-% @end multitable
-
-% Default dimensions may be reset by user.
-% @multitableparskip is vertical space between paragraphs in table.
-% @multitableparindent is paragraph indent in table.
-% @multitablecolmargin is horizontal space to be left between columns.
-% @multitablelinespace is space to leave between table items, baseline
-% to baseline.
-% 0pt means it depends on current normal line spacing.
-%
-\newskip\multitableparskip
-\newskip\multitableparindent
-\newdimen\multitablecolspace
-\newskip\multitablelinespace
-\multitableparskip=0pt
-\multitableparindent=6pt
-\multitablecolspace=12pt
-\multitablelinespace=0pt
-
-% Macros used to set up halign preamble:
-%
-\let\endsetuptable\relax
-\def\xendsetuptable{\endsetuptable}
-\let\columnfractions\relax
-\def\xcolumnfractions{\columnfractions}
-\newif\ifsetpercent
-
-% #1 is the @columnfraction, usually a decimal number like .5, but might
-% be just 1. We just use it, whatever it is.
-%
-\def\pickupwholefraction#1 {%
- \global\advance\colcount by 1
- \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
- \setuptable
-}
-
-\newcount\colcount
-\def\setuptable#1{%
- \def\firstarg{#1}%
- \ifx\firstarg\xendsetuptable
- \let\go = \relax
- \else
- \ifx\firstarg\xcolumnfractions
- \global\setpercenttrue
- \else
- \ifsetpercent
- \let\go\pickupwholefraction
- \else
- \global\advance\colcount by 1
- \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
- % separator; typically that is always in the input, anyway.
- \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
- \fi
- \fi
- \ifx\go\pickupwholefraction
- % Put the argument back for the \pickupwholefraction call, so
- % we'll always have a period there to be parsed.
- \def\go{\pickupwholefraction#1}%
- \else
- \let\go = \setuptable
- \fi%
- \fi
- \go
-}
-
-% multitable-only commands.
-%
-% @headitem starts a heading row, which we typeset in bold.
-% Assignments have to be global since we are inside the implicit group
-% of an alignment entry. Note that \everycr resets \everytab.
-\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}%
-%
-% A \tab used to include \hskip1sp. But then the space in a template
-% line is not enough. That is bad. So let's go back to just `&' until
-% we encounter the problem it was intended to solve again.
-% --karl, nathan at acm.org, 20apr99.
-\def\tab{\checkenv\multitable &\the\everytab}%
-
-% @multitable ... @end multitable definitions:
-%
-\newtoks\everytab % insert after every tab.
-%
-\envdef\multitable{%
- \vskip\parskip
- \startsavinginserts
- %
- % @item within a multitable starts a normal row.
- % We use \def instead of \let so that if one of the multitable entries
- % contains an @itemize, we don't choke on the \item (seen as \crcr aka
- % \endtemplate) expanding \doitemize.
- \def\item{\crcr}%
- %
- \tolerance=9500
- \hbadness=9500
- \setmultitablespacing
- \parskip=\multitableparskip
- \parindent=\multitableparindent
- \overfullrule=0pt
- \global\colcount=0
- %
- \everycr = {%
- \noalign{%
- \global\everytab={}%
- \global\colcount=0 % Reset the column counter.
- % Check for saved footnotes, etc.
- \checkinserts
- % Keeps underfull box messages off when table breaks over pages.
- %\filbreak
- % Maybe so, but it also creates really weird page breaks when the
- % table breaks over pages. Wouldn't \vfil be better? Wait until the
- % problem manifests itself, so it can be fixed for real --karl.
- }%
- }%
- %
- \parsearg\domultitable
-}
-\def\domultitable#1{%
- % To parse everything between @multitable and @item:
- \setuptable#1 \endsetuptable
- %
- % This preamble sets up a generic column definition, which will
- % be used as many times as user calls for columns.
- % \vtop will set a single line and will also let text wrap and
- % continue for many paragraphs if desired.
- \halign\bgroup &%
- \global\advance\colcount by 1
- \multistrut
- \vtop{%
- % Use the current \colcount to find the correct column width:
- \hsize=\expandafter\csname col\the\colcount\endcsname
- %
- % In order to keep entries from bumping into each other
- % we will add a \leftskip of \multitablecolspace to all columns after
- % the first one.
- %
- % If a template has been used, we will add \multitablecolspace
- % to the width of each template entry.
- %
- % If the user has set preamble in terms of percent of \hsize we will
- % use that dimension as the width of the column, and the \leftskip
- % will keep entries from bumping into each other. Table will start at
- % left margin and final column will justify at right margin.
- %
- % Make sure we don't inherit \rightskip from the outer environment.
- \rightskip=0pt
- \ifnum\colcount=1
- % The first column will be indented with the surrounding text.
- \advance\hsize by\leftskip
- \else
- \ifsetpercent \else
- % If user has not set preamble in terms of percent of \hsize
- % we will advance \hsize by \multitablecolspace.
- \advance\hsize by \multitablecolspace
- \fi
- % In either case we will make \leftskip=\multitablecolspace:
- \leftskip=\multitablecolspace
- \fi
- % Ignoring space at the beginning and end avoids an occasional spurious
- % blank line, when TeX decides to break the line at the space before the
- % box from the multistrut, so the strut ends up on a line by itself.
- % For example:
- % @multitable @columnfractions .11 .89
- % @item @code{#}
- % @tab Legal holiday which is valid in major parts of the whole country.
- % Is automatically provided with highlighting sequences respectively
- % marking characters.
- \noindent\ignorespaces##\unskip\multistrut
- }\cr
-}
-\def\Emultitable{%
- \crcr
- \egroup % end the \halign
- \global\setpercentfalse
-}
-
-\def\setmultitablespacing{%
- \def\multistrut{\strut}% just use the standard line spacing
- %
- % Compute \multitablelinespace (if not defined by user) for use in
- % \multitableparskip calculation. We used define \multistrut based on
- % this, but (ironically) that caused the spacing to be off.
- % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
-\ifdim\multitablelinespace=0pt
-\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
-\global\advance\multitablelinespace by-\ht0
-\fi
-%% Test to see if parskip is larger than space between lines of
-%% table. If not, do nothing.
-%% If so, set to same dimension as multitablelinespace.
-\ifdim\multitableparskip>\multitablelinespace
-\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
- %% than skip between lines in the table.
-\fi%
-\ifdim\multitableparskip=0pt
-\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
- %% than skip between lines in the table.
-\fi}
-
-
-\message{conditionals,}
-
-% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
-% @ifnotxml always succeed. They currently do nothing; we don't
-% attempt to check whether the conditionals are properly nested. But we
-% have to remember that they are conditionals, so that @end doesn't
-% attempt to close an environment group.
-%
-\def\makecond#1{%
- \expandafter\let\csname #1\endcsname = \relax
- \expandafter\let\csname iscond.#1\endcsname = 1
-}
-\makecond{iftex}
-\makecond{ifnotdocbook}
-\makecond{ifnothtml}
-\makecond{ifnotinfo}
-\makecond{ifnotplaintext}
-\makecond{ifnotxml}
-
-% Ignore @ignore, @ifhtml, @ifinfo, and the like.
-%
-\def\direntry{\doignore{direntry}}
-\def\documentdescription{\doignore{documentdescription}}
-\def\docbook{\doignore{docbook}}
-\def\html{\doignore{html}}
-\def\ifdocbook{\doignore{ifdocbook}}
-\def\ifhtml{\doignore{ifhtml}}
-\def\ifinfo{\doignore{ifinfo}}
-\def\ifnottex{\doignore{ifnottex}}
-\def\ifplaintext{\doignore{ifplaintext}}
-\def\ifxml{\doignore{ifxml}}
-\def\ignore{\doignore{ignore}}
-\def\menu{\doignore{menu}}
-\def\xml{\doignore{xml}}
-
-% Ignore text until a line `@end #1', keeping track of nested conditionals.
-%
-% A count to remember the depth of nesting.
-\newcount\doignorecount
-
-\def\doignore#1{\begingroup
- % Scan in ``verbatim'' mode:
- \obeylines
- \catcode`\@ = \other
- \catcode`\{ = \other
- \catcode`\} = \other
- %
- % Make sure that spaces turn into tokens that match what \doignoretext wants.
- \spaceisspace
- %
- % Count number of #1's that we've seen.
- \doignorecount = 0
- %
- % Swallow text until we reach the matching `@end #1'.
- \dodoignore{#1}%
-}
-
-{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
- \obeylines %
- %
- \gdef\dodoignore#1{%
- % #1 contains the command name as a string, e.g., `ifinfo'.
- %
- % Define a command to find the next `@end #1'.
- \long\def\doignoretext##1^^M at end #1{%
- \doignoretextyyy##1^^M@#1\_STOP_}%
- %
- % And this command to find another #1 command, at the beginning of a
- % line. (Otherwise, we would consider a line `@c @ifset', for
- % example, to count as an @ifset for nesting.)
- \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
- %
- % And now expand that command.
- \doignoretext ^^M%
- }%
-}
-
-\def\doignoreyyy#1{%
- \def\temp{#1}%
- \ifx\temp\empty % Nothing found.
- \let\next\doignoretextzzz
- \else % Found a nested condition, ...
- \advance\doignorecount by 1
- \let\next\doignoretextyyy % ..., look for another.
- % If we're here, #1 ends with ^^M\ifinfo (for example).
- \fi
- \next #1% the token \_STOP_ is present just after this macro.
-}
-
-% We have to swallow the remaining "\_STOP_".
-%
-\def\doignoretextzzz#1{%
- \ifnum\doignorecount = 0 % We have just found the outermost @end.
- \let\next\enddoignore
- \else % Still inside a nested condition.
- \advance\doignorecount by -1
- \let\next\doignoretext % Look for the next @end.
- \fi
- \next
-}
-
-% Finish off ignored text.
-{ \obeylines%
- % Ignore anything after the last `@end #1'; this matters in verbatim
- % environments, where otherwise the newline after an ignored conditional
- % would result in a blank line in the output.
- \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
-}
-
-
-% @set VAR sets the variable VAR to an empty value.
-% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
-%
-% Since we want to separate VAR from REST-OF-LINE (which might be
-% empty), we can't just use \parsearg; we have to insert a space of our
-% own to delimit the rest of the line, and then take it out again if we
-% didn't need it.
-% We rely on the fact that \parsearg sets \catcode`\ =10.
-%
-\parseargdef\set{\setyyy#1 \endsetyyy}
-\def\setyyy#1 #2\endsetyyy{%
- {%
- \makevalueexpandable
- \def\temp{#2}%
- \edef\next{\gdef\makecsname{SET#1}}%
- \ifx\temp\empty
- \next{}%
- \else
- \setzzz#2\endsetzzz
- \fi
- }%
-}
-% Remove the trailing space \setxxx inserted.
-\def\setzzz#1 \endsetzzz{\next{#1}}
-
-% @clear VAR clears (i.e., unsets) the variable VAR.
-%
-\parseargdef\clear{%
- {%
- \makevalueexpandable
- \global\expandafter\let\csname SET#1\endcsname=\relax
- }%
-}
-
-% @value{foo} gets the text saved in variable foo.
-\def\value{\begingroup\makevalueexpandable\valuexxx}
-\def\valuexxx#1{\expandablevalue{#1}\endgroup}
-{
- \catcode`\- = \active \catcode`\_ = \active
- %
- \gdef\makevalueexpandable{%
- \let\value = \expandablevalue
- % We don't want these characters active, ...
- \catcode`\-=\other \catcode`\_=\other
- % ..., but we might end up with active ones in the argument if
- % we're called from @code, as @code{@value{foo-bar_}}, though.
- % So \let them to their normal equivalents.
- \let-\realdash \let_\normalunderscore
- }
-}
-
-% We have this subroutine so that we can handle at least some @value's
-% properly in indexes (we call \makevalueexpandable in \indexdummies).
-% The command has to be fully expandable (if the variable is set), since
-% the result winds up in the index file. This means that if the
-% variable's value contains other Texinfo commands, it's almost certain
-% it will fail (although perhaps we could fix that with sufficient work
-% to do a one-level expansion on the result, instead of complete).
-%
-\def\expandablevalue#1{%
- \expandafter\ifx\csname SET#1\endcsname\relax
- {[No value for ``#1'']}%
- \message{Variable `#1', used in @value, is not set.}%
- \else
- \csname SET#1\endcsname
- \fi
-}
-
-% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
-% with @set.
-%
-% To get special treatment of `@end ifset,' call \makeond and the redefine.
-%
-\makecond{ifset}
-\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
-\def\doifset#1#2{%
- {%
- \makevalueexpandable
- \let\next=\empty
- \expandafter\ifx\csname SET#2\endcsname\relax
- #1% If not set, redefine \next.
- \fi
- \expandafter
- }\next
-}
-\def\ifsetfail{\doignore{ifset}}
-
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
-% defined with @set, or has been undefined with @clear.
-%
-% The `\else' inside the `\doifset' parameter is a trick to reuse the
-% above code: if the variable is not set, do nothing, if it is set,
-% then redefine \next to \ifclearfail.
-%
-\makecond{ifclear}
-\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
-\def\ifclearfail{\doignore{ifclear}}
-
-% @dircategory CATEGORY -- specify a category of the dir file
-% which this file should belong to. Ignore this in TeX.
-\let\dircategory=\comment
-
-% @defininfoenclose.
-\let\definfoenclose=\comment
-
-
-\message{indexing,}
-% Index generation facilities
-
-% Define \newwrite to be identical to plain tex's \newwrite
-% except not \outer, so it can be used within macros and \if's.
-\edef\newwrite{\makecsname{ptexnewwrite}}
-
-% \newindex {foo} defines an index named foo.
-% It automatically defines \fooindex such that
-% \fooindex ...rest of line... puts an entry in the index foo.
-% It also defines \fooindfile to be the number of the output channel for
-% the file that accumulates this index. The file's extension is foo.
-% The name of an index should be no more than 2 characters long
-% for the sake of vms.
-%
-\def\newindex#1{%
- \iflinks
- \expandafter\newwrite \csname#1indfile\endcsname
- \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
- \fi
- \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
- \noexpand\doindex{#1}}
-}
-
-% @defindex foo == \newindex{foo}
-%
-\def\defindex{\parsearg\newindex}
-
-% Define @defcodeindex, like @defindex except put all entries in @code.
-%
-\def\defcodeindex{\parsearg\newcodeindex}
-%
-\def\newcodeindex#1{%
- \iflinks
- \expandafter\newwrite \csname#1indfile\endcsname
- \openout \csname#1indfile\endcsname \jobname.#1
- \fi
- \expandafter\xdef\csname#1index\endcsname{%
- \noexpand\docodeindex{#1}}%
-}
-
-
-% @synindex foo bar makes index foo feed into index bar.
-% Do this instead of @defindex foo if you don't want it as a separate index.
-%
-% @syncodeindex foo bar similar, but put all entries made for index foo
-% inside @code.
-%
-\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
-\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
-
-% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
-% #3 the target index (bar).
-\def\dosynindex#1#2#3{%
- % Only do \closeout if we haven't already done it, else we'll end up
- % closing the target index.
- \expandafter \ifx\csname donesynindex#2\endcsname \undefined
- % The \closeout helps reduce unnecessary open files; the limit on the
- % Acorn RISC OS is a mere 16 files.
- \expandafter\closeout\csname#2indfile\endcsname
- \expandafter\let\csname\donesynindex#2\endcsname = 1
- \fi
- % redefine \fooindfile:
- \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
- \expandafter\let\csname#2indfile\endcsname=\temp
- % redefine \fooindex:
- \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
-}
-
-% Define \doindex, the driver for all \fooindex macros.
-% Argument #1 is generated by the calling \fooindex macro,
-% and it is "foo", the name of the index.
-
-% \doindex just uses \parsearg; it calls \doind for the actual work.
-% This is because \doind is more useful to call from other macros.
-
-% There is also \dosubind {index}{topic}{subtopic}
-% which makes an entry in a two-level index such as the operation index.
-
-\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
-\def\singleindexer #1{\doind{\indexname}{#1}}
-
-% like the previous two, but they put @code around the argument.
-\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
-\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
-
-% Take care of Texinfo commands that can appear in an index entry.
-% Since there are some commands we want to expand, and others we don't,
-% we have to laboriously prevent expansion for those that we don't.
-%
-\def\indexdummies{%
- \escapechar = `\\ % use backslash in output files.
- \def\@{@}% change to @@ when we switch to @ as escape char in index files.
- \def\ {\realbackslash\space }%
- %
- % Need these in case \tex is in effect and \{ is a \delimiter again.
- % But can't use \lbracecmd and \rbracecmd because texindex assumes
- % braces and backslashes are used only as delimiters.
- \let\{ = \mylbrace
- \let\} = \myrbrace
- %
- % I don't entirely understand this, but when an index entry is
- % generated from a macro call, the \endinput which \scanmacro inserts
- % causes processing to be prematurely terminated. This is,
- % apparently, because \indexsorttmp is fully expanded, and \endinput
- % is an expandable command. The redefinition below makes \endinput
- % disappear altogether for that purpose -- although logging shows that
- % processing continues to some further point. On the other hand, it
- % seems \endinput does not hurt in the printed index arg, since that
- % is still getting written without apparent harm.
- %
- % Sample source (mac-idx3.tex, reported by Graham Percival to
- % help-texinfo, 22may06):
- % @macro funindex {WORD}
- % @findex xyz
- % @end macro
- % ...
- % @funindex commtest
- %
- % The above is not enough to reproduce the bug, but it gives the flavor.
- %
- % Sample whatsit resulting:
- % . at write3{\entry{xyz}{@folio }{@code {xyz at endinput }}}
- %
- % So:
- \let\endinput = \empty
- %
- % Do the redefinitions.
- \commondummies
-}
-
-% For the aux and toc files, @ is the escape character. So we want to
-% redefine everything using @ as the escape character (instead of
-% \realbackslash, still used for index files). When everything uses @,
-% this will be simpler.
-%
-\def\atdummies{%
- \def\@{@@}%
- \def\ {@ }%
- \let\{ = \lbraceatcmd
- \let\} = \rbraceatcmd
- %
- % Do the redefinitions.
- \commondummies
- \otherbackslash
-}
-
-% Called from \indexdummies and \atdummies.
-%
-\def\commondummies{%
- %
- % \definedummyword defines \#1 as \string\#1\space, thus effectively
- % preventing its expansion. This is used only for control% words,
- % not control letters, because the \space would be incorrect for
- % control characters, but is needed to separate the control word
- % from whatever follows.
- %
- % For control letters, we have \definedummyletter, which omits the
- % space.
- %
- % These can be used both for control words that take an argument and
- % those that do not. If it is followed by {arg} in the input, then
- % that will dutifully get written to the index (or wherever).
- %
- \def\definedummyword ##1{\def##1{\string##1\space}}%
- \def\definedummyletter##1{\def##1{\string##1}}%
- \let\definedummyaccent\definedummyletter
- %
- \commondummiesnofonts
- %
- \definedummyletter\_%
- %
- % Non-English letters.
- \definedummyword\AA
- \definedummyword\AE
- \definedummyword\L
- \definedummyword\OE
- \definedummyword\O
- \definedummyword\aa
- \definedummyword\ae
- \definedummyword\l
- \definedummyword\oe
- \definedummyword\o
- \definedummyword\ss
- \definedummyword\exclamdown
- \definedummyword\questiondown
- \definedummyword\ordf
- \definedummyword\ordm
- %
- % Although these internal commands shouldn't show up, sometimes they do.
- \definedummyword\bf
- \definedummyword\gtr
- \definedummyword\hat
- \definedummyword\less
- \definedummyword\sf
- \definedummyword\sl
- \definedummyword\tclose
- \definedummyword\tt
- %
- \definedummyword\LaTeX
- \definedummyword\TeX
- %
- % Assorted special characters.
- \definedummyword\bullet
- \definedummyword\comma
- \definedummyword\copyright
- \definedummyword\registeredsymbol
- \definedummyword\dots
- \definedummyword\enddots
- \definedummyword\equiv
- \definedummyword\error
- \definedummyword\euro
- \definedummyword\expansion
- \definedummyword\minus
- \definedummyword\pounds
- \definedummyword\point
- \definedummyword\print
- \definedummyword\result
- \definedummyword\textdegree
- %
- % We want to disable all macros so that they are not expanded by \write.
- \macrolist
- %
- \normalturnoffactive
- %
- % Handle some cases of @value -- where it does not contain any
- % (non-fully-expandable) commands.
- \makevalueexpandable
-}
-
-% \commondummiesnofonts: common to \commondummies and \indexnofonts.
-%
-\def\commondummiesnofonts{%
- % Control letters and accents.
- \definedummyletter\!%
- \definedummyaccent\"%
- \definedummyaccent\'%
- \definedummyletter\*%
- \definedummyaccent\,%
- \definedummyletter\.%
- \definedummyletter\/%
- \definedummyletter\:%
- \definedummyaccent\=%
- \definedummyletter\?%
- \definedummyaccent\^%
- \definedummyaccent\`%
- \definedummyaccent\~%
- \definedummyword\u
- \definedummyword\v
- \definedummyword\H
- \definedummyword\dotaccent
- \definedummyword\ringaccent
- \definedummyword\tieaccent
- \definedummyword\ubaraccent
- \definedummyword\udotaccent
- \definedummyword\dotless
- %
- % Texinfo font commands.
- \definedummyword\b
- \definedummyword\i
- \definedummyword\r
- \definedummyword\sc
- \definedummyword\t
- %
- % Commands that take arguments.
- \definedummyword\acronym
- \definedummyword\cite
- \definedummyword\code
- \definedummyword\command
- \definedummyword\dfn
- \definedummyword\emph
- \definedummyword\env
- \definedummyword\file
- \definedummyword\kbd
- \definedummyword\key
- \definedummyword\math
- \definedummyword\option
- \definedummyword\pxref
- \definedummyword\ref
- \definedummyword\samp
- \definedummyword\strong
- \definedummyword\tie
- \definedummyword\uref
- \definedummyword\url
- \definedummyword\var
- \definedummyword\verb
- \definedummyword\w
- \definedummyword\xref
-}
-
-% \indexnofonts is used when outputting the strings to sort the index
-% by, and when constructing control sequence names. It eliminates all
-% control sequences and just writes whatever the best ASCII sort string
-% would be for a given command (usually its argument).
-%
-\def\indexnofonts{%
- % Accent commands should become @asis.
- \def\definedummyaccent##1{\let##1\asis}%
- % We can just ignore other control letters.
- \def\definedummyletter##1{\let##1\empty}%
- % Hopefully, all control words can become @asis.
- \let\definedummyword\definedummyaccent
- %
- \commondummiesnofonts
- %
- % Don't no-op \tt, since it isn't a user-level command
- % and is used in the definitions of the active chars like <, >, |, etc.
- % Likewise with the other plain tex font commands.
- %\let\tt=\asis
- %
- \def\ { }%
- \def\@{@}%
- % how to handle braces?
- \def\_{\normalunderscore}%
- %
- % Non-English letters.
- \def\AA{AA}%
- \def\AE{AE}%
- \def\L{L}%
- \def\OE{OE}%
- \def\O{O}%
- \def\aa{aa}%
- \def\ae{ae}%
- \def\l{l}%
- \def\oe{oe}%
- \def\o{o}%
- \def\ss{ss}%
- \def\exclamdown{!}%
- \def\questiondown{?}%
- \def\ordf{a}%
- \def\ordm{o}%
- %
- \def\LaTeX{LaTeX}%
- \def\TeX{TeX}%
- %
- % Assorted special characters.
- % (The following {} will end up in the sort string, but that's ok.)
- \def\bullet{bullet}%
- \def\comma{,}%
- \def\copyright{copyright}%
- \def\registeredsymbol{R}%
- \def\dots{...}%
- \def\enddots{...}%
- \def\equiv{==}%
- \def\error{error}%
- \def\euro{euro}%
- \def\expansion{==>}%
- \def\minus{-}%
- \def\pounds{pounds}%
- \def\point{.}%
- \def\print{-|}%
- \def\result{=>}%
- \def\textdegree{degrees}%
- %
- % We need to get rid of all macros, leaving only the arguments (if present).
- % Of course this is not nearly correct, but it is the best we can do for now.
- % makeinfo does not expand macros in the argument to @deffn, which ends up
- % writing an index entry, and texindex isn't prepared for an index sort entry
- % that starts with \.
- %
- % Since macro invocations are followed by braces, we can just redefine them
- % to take a single TeX argument. The case of a macro invocation that
- % goes to end-of-line is not handled.
- %
- \macrolist
-}
-
-\let\indexbackslash=0 %overridden during \printindex.
-\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
-
-% Most index entries go through here, but \dosubind is the general case.
-% #1 is the index name, #2 is the entry text.
-\def\doind#1#2{\dosubind{#1}{#2}{}}
-
-% Workhorse for all \fooindexes.
-% #1 is name of index, #2 is stuff to put there, #3 is subentry --
-% empty if called from \doind, as we usually are (the main exception
-% is with most defuns, which call us directly).
-%
-\def\dosubind#1#2#3{%
- \iflinks
- {%
- % Store the main index entry text (including the third arg).
- \toks0 = {#2}%
- % If third arg is present, precede it with a space.
- \def\thirdarg{#3}%
- \ifx\thirdarg\empty \else
- \toks0 = \expandafter{\the\toks0 \space #3}%
- \fi
- %
- \edef\writeto{\csname#1indfile\endcsname}%
- %
- \safewhatsit\dosubindwrite
- }%
- \fi
-}
-
-% Write the entry in \toks0 to the index file:
-%
-\def\dosubindwrite{%
- % Put the index entry in the margin if desired.
- \ifx\SETmarginindex\relax\else
- \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
- \fi
- %
- % Remember, we are within a group.
- \indexdummies % Must do this here, since \bf, etc expand at this stage
- \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
- % so it will be output as is; and it will print as backslash.
- %
- % Process the index entry with all font commands turned off, to
- % get the string to sort by.
- {\indexnofonts
- \edef\temp{\the\toks0}% need full expansion
- \xdef\indexsorttmp{\temp}%
- }%
- %
- % Set up the complete index entry, with both the sort key and
- % the original text, including any font commands. We write
- % three arguments to \entry to the .?? file (four in the
- % subentry case), texindex reduces to two when writing the .??s
- % sorted result.
- \edef\temp{%
- \write\writeto{%
- \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
- }%
- \temp
-}
-
-% Take care of unwanted page breaks/skips around a whatsit:
-%
-% If a skip is the last thing on the list now, preserve it
-% by backing up by \lastskip, doing the \write, then inserting
-% the skip again. Otherwise, the whatsit generated by the
-% \write or \pdfdest will make \lastskip zero. The result is that
-% sequences like this:
-% @end defun
-% @tindex whatever
-% @defun ...
-% will have extra space inserted, because the \medbreak in the
-% start of the @defun won't see the skip inserted by the @end of
-% the previous defun.
-%
-% But don't do any of this if we're not in vertical mode. We
-% don't want to do a \vskip and prematurely end a paragraph.
-%
-% Avoid page breaks due to these extra skips, too.
-%
-% But wait, there is a catch there:
-% We'll have to check whether \lastskip is zero skip. \ifdim is not
-% sufficient for this purpose, as it ignores stretch and shrink parts
-% of the skip. The only way seems to be to check the textual
-% representation of the skip.
-%
-% The following is almost like \def\zeroskipmacro{0.0pt} except that
-% the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
-%
-\edef\zeroskipmacro{\expandafter\the\csname z at skip\endcsname}
-%
-\newskip\whatsitskip
-\newcount\whatsitpenalty
-%
-% ..., ready, GO:
-%
-\def\safewhatsit#1{%
-\ifhmode
- #1%
-\else
- % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
- \whatsitskip = \lastskip
- \edef\lastskipmacro{\the\lastskip}%
- \whatsitpenalty = \lastpenalty
- %
- % If \lastskip is nonzero, that means the last item was a
- % skip. And since a skip is discardable, that means this
- % -\skip0 glue we're inserting is preceded by a
- % non-discardable item, therefore it is not a potential
- % breakpoint, therefore no \nobreak needed.
- \ifx\lastskipmacro\zeroskipmacro
- \else
- \vskip-\whatsitskip
- \fi
- %
- #1%
- %
- \ifx\lastskipmacro\zeroskipmacro
- % If \lastskip was zero, perhaps the last item was a penalty, and
- % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
- % to re-insert the same penalty (values >10000 are used for various
- % signals); since we just inserted a non-discardable item, any
- % following glue (such as a \parskip) would be a breakpoint. For example:
- %
- % @deffn deffn-whatever
- % @vindex index-whatever
- % Description.
- % would allow a break between the index-whatever whatsit
- % and the "Description." paragraph.
- \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
- \else
- % On the other hand, if we had a nonzero \lastskip,
- % this make-up glue would be preceded by a non-discardable item
- % (the whatsit from the \write), so we must insert a \nobreak.
- \nobreak\vskip\whatsitskip
- \fi
-\fi
-}
-
-% The index entry written in the file actually looks like
-% \entry {sortstring}{page}{topic}
-% or
-% \entry {sortstring}{page}{topic}{subtopic}
-% The texindex program reads in these files and writes files
-% containing these kinds of lines:
-% \initial {c}
-% before the first topic whose initial is c
-% \entry {topic}{pagelist}
-% for a topic that is used without subtopics
-% \primary {topic}
-% for the beginning of a topic that is used with subtopics
-% \secondary {subtopic}{pagelist}
-% for each subtopic.
-
-% Define the user-accessible indexing commands
-% @findex, @vindex, @kindex, @cindex.
-
-\def\findex {\fnindex}
-\def\kindex {\kyindex}
-\def\cindex {\cpindex}
-\def\vindex {\vrindex}
-\def\tindex {\tpindex}
-\def\pindex {\pgindex}
-
-\def\cindexsub {\begingroup\obeylines\cindexsub}
-{\obeylines %
-\gdef\cindexsub "#1" #2^^M{\endgroup %
-\dosubind{cp}{#2}{#1}}}
-
-% Define the macros used in formatting output of the sorted index material.
-
-% @printindex causes a particular index (the ??s file) to get printed.
-% It does not print any chapter heading (usually an @unnumbered).
-%
-\parseargdef\printindex{\begingroup
- \dobreak \chapheadingskip{10000}%
- %
- \smallfonts \rm
- \tolerance = 9500
- \plainfrenchspacing
- \everypar = {}% don't want the \kern\-parindent from indentation suppression.
- %
- % See if the index file exists and is nonempty.
- % Change catcode of @ here so that if the index file contains
- % \initial {@}
- % as its first line, TeX doesn't complain about mismatched braces
- % (because it thinks @} is a control sequence).
- \catcode`\@ = 11
- \openin 1 \jobname.#1s
- \ifeof 1
- % \enddoublecolumns gets confused if there is no text in the index,
- % and it loses the chapter title and the aux file entries for the
- % index. The easiest way to prevent this problem is to make sure
- % there is some text.
- \putwordIndexNonexistent
- \else
- %
- % If the index file exists but is empty, then \openin leaves \ifeof
- % false. We have to make TeX try to read something from the file, so
- % it can discover if there is anything in it.
- \read 1 to \temp
- \ifeof 1
- \putwordIndexIsEmpty
- \else
- % Index files are almost Texinfo source, but we use \ as the escape
- % character. It would be better to use @, but that's too big a change
- % to make right now.
- \def\indexbackslash{\backslashcurfont}%
- \catcode`\\ = 0
- \escapechar = `\\
- \begindoublecolumns
- \input \jobname.#1s
- \enddoublecolumns
- \fi
- \fi
- \closein 1
-\endgroup}
-
-% These macros are used by the sorted index file itself.
-% Change them to control the appearance of the index.
-
-\def\initial#1{{%
- % Some minor font changes for the special characters.
- \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
- %
- % Remove any glue we may have, we'll be inserting our own.
- \removelastskip
- %
- % We like breaks before the index initials, so insert a bonus.
- \nobreak
- \vskip 0pt plus 3\baselineskip
- \penalty 0
- \vskip 0pt plus -3\baselineskip
- %
- % Typeset the initial. Making this add up to a whole number of
- % baselineskips increases the chance of the dots lining up from column
- % to column. It still won't often be perfect, because of the stretch
- % we need before each entry, but it's better.
- %
- % No shrink because it confuses \balancecolumns.
- \vskip 1.67\baselineskip plus .5\baselineskip
- \leftline{\secbf #1}%
- % Do our best not to break after the initial.
- \nobreak
- \vskip .33\baselineskip plus .1\baselineskip
-}}
-
-% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
-% then page number (#2) flushed to the right margin. It is used for index
-% and table of contents entries. The paragraph is indented by \leftskip.
-%
-% A straightforward implementation would start like this:
-% \def\entry#1#2{...
-% But this frozes the catcodes in the argument, and can cause problems to
-% @code, which sets - active. This problem was fixed by a kludge---
-% ``-'' was active throughout whole index, but this isn't really right.
-%
-% The right solution is to prevent \entry from swallowing the whole text.
-% --kasal, 21nov03
-\def\entry{%
- \begingroup
- %
- % Start a new paragraph if necessary, so our assignments below can't
- % affect previous text.
- \par
- %
- % Do not fill out the last line with white space.
- \parfillskip = 0in
- %
- % No extra space above this paragraph.
- \parskip = 0in
- %
- % Do not prefer a separate line ending with a hyphen to fewer lines.
- \finalhyphendemerits = 0
- %
- % \hangindent is only relevant when the entry text and page number
- % don't both fit on one line. In that case, bob suggests starting the
- % dots pretty far over on the line. Unfortunately, a large
- % indentation looks wrong when the entry text itself is broken across
- % lines. So we use a small indentation and put up with long leaders.
- %
- % \hangafter is reset to 1 (which is the value we want) at the start
- % of each paragraph, so we need not do anything with that.
- \hangindent = 2em
- %
- % When the entry text needs to be broken, just fill out the first line
- % with blank space.
- \rightskip = 0pt plus1fil
- %
- % A bit of stretch before each entry for the benefit of balancing
- % columns.
- \vskip 0pt plus1pt
- %
- % Swallow the left brace of the text (first parameter):
- \afterassignment\doentry
- \let\temp =
-}
-\def\doentry{%
- \bgroup % Instead of the swallowed brace.
- \noindent
- \aftergroup\finishentry
- % And now comes the text of the entry.
-}
-\def\finishentry#1{%
- % #1 is the page number.
- %
- % The following is kludged to not output a line of dots in the index if
- % there are no page numbers. The next person who breaks this will be
- % cursed by a Unix daemon.
- \setbox\boxA = \hbox{#1}%
- \ifdim\wd\boxA = 0pt
- \ %
- \else
- %
- % If we must, put the page number on a line of its own, and fill out
- % this line with blank space. (The \hfil is overwhelmed with the
- % fill leaders glue in \indexdotfill if the page number does fit.)
- \hfil\penalty50
- \null\nobreak\indexdotfill % Have leaders before the page number.
- %
- % The `\ ' here is removed by the implicit \unskip that TeX does as
- % part of (the primitive) \par. Without it, a spurious underfull
- % \hbox ensues.
- \ifpdf
- \pdfgettoks#1.%
- \ \the\toksA
- \else
- \ #1%
- \fi
- \fi
- \par
- \endgroup
-}
-
-% Like plain.tex's \dotfill, except uses up at least 1 em.
-\def\indexdotfill{\cleaders
- \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
-
-\def\primary #1{\line{#1\hfil}}
-
-\newskip\secondaryindent \secondaryindent=0.5cm
-\def\secondary#1#2{{%
- \parfillskip=0in
- \parskip=0in
- \hangindent=1in
- \hangafter=1
- \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
- \ifpdf
- \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
- \else
- #2
- \fi
- \par
-}}
-
-% Define two-column mode, which we use to typeset indexes.
-% Adapted from the TeXbook, page 416, which is to say,
-% the manmac.tex format used to print the TeXbook itself.
-\catcode`\@=11
-
-\newbox\partialpage
-\newdimen\doublecolumnhsize
-
-\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
- % Grab any single-column material above us.
- \output = {%
- %
- % Here is a possibility not foreseen in manmac: if we accumulate a
- % whole lot of material, we might end up calling this \output
- % routine twice in a row (see the doublecol-lose test, which is
- % essentially a couple of indexes with @setchapternewpage off). In
- % that case we just ship out what is in \partialpage with the normal
- % output routine. Generally, \partialpage will be empty when this
- % runs and this will be a no-op. See the indexspread.tex test case.
- \ifvoid\partialpage \else
- \onepageout{\pagecontents\partialpage}%
- \fi
- %
- \global\setbox\partialpage = \vbox{%
- % Unvbox the main output page.
- \unvbox\PAGE
- \kern-\topskip \kern\baselineskip
- }%
- }%
- \eject % run that output routine to set \partialpage
- %
- % Use the double-column output routine for subsequent pages.
- \output = {\doublecolumnout}%
- %
- % Change the page size parameters. We could do this once outside this
- % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
- % format, but then we repeat the same computation. Repeating a couple
- % of assignments once per index is clearly meaningless for the
- % execution time, so we may as well do it in one place.
- %
- % First we halve the line length, less a little for the gutter between
- % the columns. We compute the gutter based on the line length, so it
- % changes automatically with the paper format. The magic constant
- % below is chosen so that the gutter has the same value (well, +-<1pt)
- % as it did when we hard-coded it.
- %
- % We put the result in a separate register, \doublecolumhsize, so we
- % can restore it in \pagesofar, after \hsize itself has (potentially)
- % been clobbered.
- %
- \doublecolumnhsize = \hsize
- \advance\doublecolumnhsize by -.04154\hsize
- \divide\doublecolumnhsize by 2
- \hsize = \doublecolumnhsize
- %
- % Double the \vsize as well. (We don't need a separate register here,
- % since nobody clobbers \vsize.)
- \vsize = 2\vsize
-}
-
-% The double-column output routine for all double-column pages except
-% the last.
-%
-\def\doublecolumnout{%
- \splittopskip=\topskip \splitmaxdepth=\maxdepth
- % Get the available space for the double columns -- the normal
- % (undoubled) page height minus any material left over from the
- % previous page.
- \dimen@ = \vsize
- \divide\dimen@ by 2
- \advance\dimen@ by -\ht\partialpage
- %
- % box0 will be the left-hand column, box2 the right.
- \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
- \onepageout\pagesofar
- \unvbox255
- \penalty\outputpenalty
-}
-%
-% Re-output the contents of the output page -- any previous material,
-% followed by the two boxes we just split, in box0 and box2.
-\def\pagesofar{%
- \unvbox\partialpage
- %
- \hsize = \doublecolumnhsize
- \wd0=\hsize \wd2=\hsize
- \hbox to\pagewidth{\box0\hfil\box2}%
-}
-%
-% All done with double columns.
-\def\enddoublecolumns{%
- % The following penalty ensures that the page builder is exercised
- % _before_ we change the output routine. This is necessary in the
- % following situation:
- %
- % The last section of the index consists only of a single entry.
- % Before this section, \pagetotal is less than \pagegoal, so no
- % break occurs before the last section starts. However, the last
- % section, consisting of \initial and the single \entry, does not
- % fit on the page and has to be broken off. Without the following
- % penalty the page builder will not be exercised until \eject
- % below, and by that time we'll already have changed the output
- % routine to the \balancecolumns version, so the next-to-last
- % double-column page will be processed with \balancecolumns, which
- % is wrong: The two columns will go to the main vertical list, with
- % the broken-off section in the recent contributions. As soon as
- % the output routine finishes, TeX starts reconsidering the page
- % break. The two columns and the broken-off section both fit on the
- % page, because the two columns now take up only half of the page
- % goal. When TeX sees \eject from below which follows the final
- % section, it invokes the new output routine that we've set after
- % \balancecolumns below; \onepageout will try to fit the two columns
- % and the final section into the vbox of \pageheight (see
- % \pagebody), causing an overfull box.
- %
- % Note that glue won't work here, because glue does not exercise the
- % page builder, unlike penalties (see The TeXbook, pp. 280-281).
- \penalty0
- %
- \output = {%
- % Split the last of the double-column material. Leave it on the
- % current page, no automatic page break.
- \balancecolumns
- %
- % If we end up splitting too much material for the current page,
- % though, there will be another page break right after this \output
- % invocation ends. Having called \balancecolumns once, we do not
- % want to call it again. Therefore, reset \output to its normal
- % definition right away. (We hope \balancecolumns will never be
- % called on to balance too much material, but if it is, this makes
- % the output somewhat more palatable.)
- \global\output = {\onepageout{\pagecontents\PAGE}}%
- }%
- \eject
- \endgroup % started in \begindoublecolumns
- %
- % \pagegoal was set to the doubled \vsize above, since we restarted
- % the current page. We're now back to normal single-column
- % typesetting, so reset \pagegoal to the normal \vsize (after the
- % \endgroup where \vsize got restored).
- \pagegoal = \vsize
-}
-%
-% Called at the end of the double column material.
-\def\balancecolumns{%
- \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
- \dimen@ = \ht0
- \advance\dimen@ by \topskip
- \advance\dimen@ by-\baselineskip
- \divide\dimen@ by 2 % target to split to
- %debug\message{final 2-column material height=\the\ht0, target=\the\dimen at .}%
- \splittopskip = \topskip
- % Loop until we get a decent breakpoint.
- {%
- \vbadness = 10000
- \loop
- \global\setbox3 = \copy0
- \global\setbox1 = \vsplit3 to \dimen@
- \ifdim\ht3>\dimen@
- \global\advance\dimen@ by 1pt
- \repeat
- }%
- %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
- \setbox0=\vbox to\dimen@{\unvbox1}%
- \setbox2=\vbox to\dimen@{\unvbox3}%
- %
- \pagesofar
-}
-\catcode`\@ = \other
-
-
-\message{sectioning,}
-% Chapters, sections, etc.
-
-% \unnumberedno is an oxymoron, of course. But we count the unnumbered
-% sections so that we can refer to them unambiguously in the pdf
-% outlines by their "section number". We avoid collisions with chapter
-% numbers by starting them at 10000. (If a document ever has 10000
-% chapters, we're in trouble anyway, I'm sure.)
-\newcount\unnumberedno \unnumberedno = 10000
-\newcount\chapno
-\newcount\secno \secno=0
-\newcount\subsecno \subsecno=0
-\newcount\subsubsecno \subsubsecno=0
-
-% This counter is funny since it counts through charcodes of letters A, B, ...
-\newcount\appendixno \appendixno = `\@
-%
-% \def\appendixletter{\char\the\appendixno}
-% We do the following ugly conditional instead of the above simple
-% construct for the sake of pdftex, which needs the actual
-% letter in the expansion, not just typeset.
-%
-\def\appendixletter{%
- \ifnum\appendixno=`A A%
- \else\ifnum\appendixno=`B B%
- \else\ifnum\appendixno=`C C%
- \else\ifnum\appendixno=`D D%
- \else\ifnum\appendixno=`E E%
- \else\ifnum\appendixno=`F F%
- \else\ifnum\appendixno=`G G%
- \else\ifnum\appendixno=`H H%
- \else\ifnum\appendixno=`I I%
- \else\ifnum\appendixno=`J J%
- \else\ifnum\appendixno=`K K%
- \else\ifnum\appendixno=`L L%
- \else\ifnum\appendixno=`M M%
- \else\ifnum\appendixno=`N N%
- \else\ifnum\appendixno=`O O%
- \else\ifnum\appendixno=`P P%
- \else\ifnum\appendixno=`Q Q%
- \else\ifnum\appendixno=`R R%
- \else\ifnum\appendixno=`S S%
- \else\ifnum\appendixno=`T T%
- \else\ifnum\appendixno=`U U%
- \else\ifnum\appendixno=`V V%
- \else\ifnum\appendixno=`W W%
- \else\ifnum\appendixno=`X X%
- \else\ifnum\appendixno=`Y Y%
- \else\ifnum\appendixno=`Z Z%
- % The \the is necessary, despite appearances, because \appendixletter is
- % expanded while writing the .toc file. \char\appendixno is not
- % expandable, thus it is written literally, thus all appendixes come out
- % with the same letter (or @) in the toc without it.
- \else\char\the\appendixno
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
-
-% Each @chapter defines this as the name of the chapter.
-% page headings and footings can use it. @section does likewise.
-% However, they are not reliable, because we don't use marks.
-\def\thischapter{}
-\def\thissection{}
-
-\newcount\absseclevel % used to calculate proper heading level
-\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
-
-% @raisesections: treat @section as chapter, @subsection as section, etc.
-\def\raisesections{\global\advance\secbase by -1}
-\let\up=\raisesections % original BFox name
-
-% @lowersections: treat @chapter as section, @section as subsection, etc.
-\def\lowersections{\global\advance\secbase by 1}
-\let\down=\lowersections % original BFox name
-
-% we only have subsub.
-\chardef\maxseclevel = 3
-%
-% A numbered section within an unnumbered changes to unnumbered too.
-% To achive this, remember the "biggest" unnum. sec. we are currently in:
-\chardef\unmlevel = \maxseclevel
-%
-% Trace whether the current chapter is an appendix or not:
-% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
-\def\chapheadtype{N}
-
-% Choose a heading macro
-% #1 is heading type
-% #2 is heading level
-% #3 is text for heading
-\def\genhead#1#2#3{%
- % Compute the abs. sec. level:
- \absseclevel=#2
- \advance\absseclevel by \secbase
- % Make sure \absseclevel doesn't fall outside the range:
- \ifnum \absseclevel < 0
- \absseclevel = 0
- \else
- \ifnum \absseclevel > 3
- \absseclevel = 3
- \fi
- \fi
- % The heading type:
- \def\headtype{#1}%
- \if \headtype U%
- \ifnum \absseclevel < \unmlevel
- \chardef\unmlevel = \absseclevel
- \fi
- \else
- % Check for appendix sections:
- \ifnum \absseclevel = 0
- \edef\chapheadtype{\headtype}%
- \else
- \if \headtype A\if \chapheadtype N%
- \errmessage{@appendix... within a non-appendix chapter}%
- \fi\fi
- \fi
- % Check for numbered within unnumbered:
- \ifnum \absseclevel > \unmlevel
- \def\headtype{U}%
- \else
- \chardef\unmlevel = 3
- \fi
- \fi
- % Now print the heading:
- \if \headtype U%
- \ifcase\absseclevel
- \unnumberedzzz{#3}%
- \or \unnumberedseczzz{#3}%
- \or \unnumberedsubseczzz{#3}%
- \or \unnumberedsubsubseczzz{#3}%
- \fi
- \else
- \if \headtype A%
- \ifcase\absseclevel
- \appendixzzz{#3}%
- \or \appendixsectionzzz{#3}%
- \or \appendixsubseczzz{#3}%
- \or \appendixsubsubseczzz{#3}%
- \fi
- \else
- \ifcase\absseclevel
- \chapterzzz{#3}%
- \or \seczzz{#3}%
- \or \numberedsubseczzz{#3}%
- \or \numberedsubsubseczzz{#3}%
- \fi
- \fi
- \fi
- \suppressfirstparagraphindent
-}
-
-% an interface:
-\def\numhead{\genhead N}
-\def\apphead{\genhead A}
-\def\unnmhead{\genhead U}
-
-% @chapter, @appendix, @unnumbered. Increment top-level counter, reset
-% all lower-level sectioning counters to zero.
-%
-% Also set \chaplevelprefix, which we prepend to @float sequence numbers
-% (e.g., figures), q.v. By default (before any chapter), that is empty.
-\let\chaplevelprefix = \empty
-%
-\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
-\def\chapterzzz#1{%
- % section resetting is \global in case the chapter is in a group, such
- % as an @include file.
- \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
- \global\advance\chapno by 1
- %
- % Used for \float.
- \gdef\chaplevelprefix{\the\chapno.}%
- \resetallfloatnos
- %
- \message{\putwordChapter\space \the\chapno}%
- %
- % Write the actual heading.
- \chapmacro{#1}{Ynumbered}{\the\chapno}%
- %
- % So @section and the like are numbered underneath this chapter.
- \global\let\section = \numberedsec
- \global\let\subsection = \numberedsubsec
- \global\let\subsubsection = \numberedsubsubsec
-}
-
-\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz
-\def\appendixzzz#1{%
- \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
- \global\advance\appendixno by 1
- \gdef\chaplevelprefix{\appendixletter.}%
- \resetallfloatnos
- %
- \def\appendixnum{\putwordAppendix\space \appendixletter}%
- \message{\appendixnum}%
- %
- \chapmacro{#1}{Yappendix}{\appendixletter}%
- %
- \global\let\section = \appendixsec
- \global\let\subsection = \appendixsubsec
- \global\let\subsubsection = \appendixsubsubsec
-}
-
-\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
-\def\unnumberedzzz#1{%
- \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
- \global\advance\unnumberedno by 1
- %
- % Since an unnumbered has no number, no prefix for figures.
- \global\let\chaplevelprefix = \empty
- \resetallfloatnos
- %
- % This used to be simply \message{#1}, but TeX fully expands the
- % argument to \message. Therefore, if #1 contained @-commands, TeX
- % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
- % expanded @cite (which turns out to cause errors because \cite is meant
- % to be executed, not expanded).
- %
- % Anyway, we don't want the fully-expanded definition of @cite to appear
- % as a result of the \message, we just want `@cite' itself. We use
- % \the<toks register> to achieve this: TeX expands \the<toks> only once,
- % simply yielding the contents of <toks register>. (We also do this for
- % the toc entries.)
- \toks0 = {#1}%
- \message{(\the\toks0)}%
- %
- \chapmacro{#1}{Ynothing}{\the\unnumberedno}%
- %
- \global\let\section = \unnumberedsec
- \global\let\subsection = \unnumberedsubsec
- \global\let\subsubsection = \unnumberedsubsubsec
-}
-
-% @centerchap is like @unnumbered, but the heading is centered.
-\outer\parseargdef\centerchap{%
- % Well, we could do the following in a group, but that would break
- % an assumption that \chapmacro is called at the outermost level.
- % Thus we are safer this way: --kasal, 24feb04
- \let\centerparametersmaybe = \centerparameters
- \unnmhead0{#1}%
- \let\centerparametersmaybe = \relax
-}
-
-% @top is like @unnumbered.
-\let\top\unnumbered
-
-% Sections.
-\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
-\def\seczzz#1{%
- \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
- \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
-}
-
-\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
-\def\appendixsectionzzz#1{%
- \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
- \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
-}
-\let\appendixsec\appendixsection
-
-\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
-\def\unnumberedseczzz#1{%
- \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
- \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
-}
-
-% Subsections.
-\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
-\def\numberedsubseczzz#1{%
- \global\subsubsecno=0 \global\advance\subsecno by 1
- \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
-}
-
-\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
-\def\appendixsubseczzz#1{%
- \global\subsubsecno=0 \global\advance\subsecno by 1
- \sectionheading{#1}{subsec}{Yappendix}%
- {\appendixletter.\the\secno.\the\subsecno}%
-}
-
-\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
-\def\unnumberedsubseczzz#1{%
- \global\subsubsecno=0 \global\advance\subsecno by 1
- \sectionheading{#1}{subsec}{Ynothing}%
- {\the\unnumberedno.\the\secno.\the\subsecno}%
-}
-
-% Subsubsections.
-\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
-\def\numberedsubsubseczzz#1{%
- \global\advance\subsubsecno by 1
- \sectionheading{#1}{subsubsec}{Ynumbered}%
- {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
-}
-
-\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
-\def\appendixsubsubseczzz#1{%
- \global\advance\subsubsecno by 1
- \sectionheading{#1}{subsubsec}{Yappendix}%
- {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
-}
-
-\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
-\def\unnumberedsubsubseczzz#1{%
- \global\advance\subsubsecno by 1
- \sectionheading{#1}{subsubsec}{Ynothing}%
- {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
-}
-
-% These macros control what the section commands do, according
-% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
-% Define them by default for a numbered chapter.
-\let\section = \numberedsec
-\let\subsection = \numberedsubsec
-\let\subsubsection = \numberedsubsubsec
-
-% Define @majorheading, @heading and @subheading
-
-% NOTE on use of \vbox for chapter headings, section headings, and such:
-% 1) We use \vbox rather than the earlier \line to permit
-% overlong headings to fold.
-% 2) \hyphenpenalty is set to 10000 because hyphenation in a
-% heading is obnoxious; this forbids it.
-% 3) Likewise, headings look best if no \parindent is used, and
-% if justification is not attempted. Hence \raggedright.
-
-
-\def\majorheading{%
- {\advance\chapheadingskip by 10pt \chapbreak }%
- \parsearg\chapheadingzzz
-}
-
-\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
-\def\chapheadingzzz#1{%
- {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}%
- \bigskip \par\penalty 200\relax
- \suppressfirstparagraphindent
-}
-
-% @heading, @subheading, @subsubheading.
-\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
- \suppressfirstparagraphindent}
-\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
- \suppressfirstparagraphindent}
-\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
- \suppressfirstparagraphindent}
-
-% These macros generate a chapter, section, etc. heading only
-% (including whitespace, linebreaking, etc. around it),
-% given all the information in convenient, parsed form.
-
-%%% Args are the skip and penalty (usually negative)
-\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
-
-%%% Define plain chapter starts, and page on/off switching for it
-% Parameter controlling skip before chapter headings (if needed)
-
-\newskip\chapheadingskip
-
-\def\chapbreak{\dobreak \chapheadingskip {-4000}}
-\def\chappager{\par\vfill\supereject}
-\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
-
-\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
-
-\def\CHAPPAGoff{%
-\global\let\contentsalignmacro = \chappager
-\global\let\pchapsepmacro=\chapbreak
-\global\let\pagealignmacro=\chappager}
-
-\def\CHAPPAGon{%
-\global\let\contentsalignmacro = \chappager
-\global\let\pchapsepmacro=\chappager
-\global\let\pagealignmacro=\chappager
-\global\def\HEADINGSon{\HEADINGSsingle}}
-
-\def\CHAPPAGodd{%
-\global\let\contentsalignmacro = \chapoddpage
-\global\let\pchapsepmacro=\chapoddpage
-\global\let\pagealignmacro=\chapoddpage
-\global\def\HEADINGSon{\HEADINGSdouble}}
-
-\CHAPPAGon
-
-% Chapter opening.
-%
-% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
-% Yappendix, Yomitfromtoc), #3 the chapter number.
-%
-% To test against our argument.
-\def\Ynothingkeyword{Ynothing}
-\def\Yomitfromtockeyword{Yomitfromtoc}
-\def\Yappendixkeyword{Yappendix}
-%
-\def\chapmacro#1#2#3{%
- \pchapsepmacro
- {%
- \chapfonts \rm
- %
- % Have to define \thissection before calling \donoderef, because the
- % xref code eventually uses it. On the other hand, it has to be called
- % after \pchapsepmacro, or the headline will change too soon.
- \gdef\thissection{#1}%
- \gdef\thischaptername{#1}%
- %
- % Only insert the separating space if we have a chapter/appendix
- % number, and don't print the unnumbered ``number''.
- \def\temptype{#2}%
- \ifx\temptype\Ynothingkeyword
- \setbox0 = \hbox{}%
- \def\toctype{unnchap}%
- \gdef\thischapternum{}%
- \gdef\thischapter{#1}%
- \else\ifx\temptype\Yomitfromtockeyword
- \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
- \def\toctype{omit}%
- \gdef\thischapternum{}%
- \gdef\thischapter{}%
- \else\ifx\temptype\Yappendixkeyword
- \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
- \def\toctype{app}%
- \xdef\thischapternum{\appendixletter}%
- % We don't substitute the actual chapter name into \thischapter
- % because we don't want its macros evaluated now. And we don't
- % use \thissection because that changes with each section.
- %
- \xdef\thischapter{\putwordAppendix{} \appendixletter:
- \noexpand\thischaptername}%
- \else
- \setbox0 = \hbox{#3\enspace}%
- \def\toctype{numchap}%
- \xdef\thischapternum{\the\chapno}%
- \xdef\thischapter{\putwordChapter{} \the\chapno:
- \noexpand\thischaptername}%
- \fi\fi\fi
- %
- % Write the toc entry for this chapter. Must come before the
- % \donoderef, because we include the current node name in the toc
- % entry, and \donoderef resets it to empty.
- \writetocentry{\toctype}{#1}{#3}%
- %
- % For pdftex, we have to write out the node definition (aka, make
- % the pdfdest) after any page break, but before the actual text has
- % been typeset. If the destination for the pdf outline is after the
- % text, then jumping from the outline may wind up with the text not
- % being visible, for instance under high magnification.
- \donoderef{#2}%
- %
- % Typeset the actual heading.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
- \hangindent=\wd0 \centerparametersmaybe
- \unhbox0 #1\par}%
- }%
- \nobreak\bigskip % no page break after a chapter title
- \nobreak
-}
-
-% @centerchap -- centered and unnumbered.
-\let\centerparametersmaybe = \relax
-\def\centerparameters{%
- \advance\rightskip by 3\rightskip
- \leftskip = \rightskip
- \parfillskip = 0pt
-}
-
-
-% I don't think this chapter style is supported any more, so I'm not
-% updating it with the new noderef stuff. We'll see. --karl, 11aug03.
-%
-\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
-%
-\def\unnchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}\bigskip \par\nobreak
-}
-\def\chfopen #1#2{\chapoddpage {\chapfonts
-\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
-\par\penalty 5000 %
-}
-\def\centerchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt
- \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
-}
-\def\CHAPFopen{%
- \global\let\chapmacro=\chfopen
- \global\let\centerchapmacro=\centerchfopen}
-
-
-% Section titles. These macros combine the section number parts and
-% call the generic \sectionheading to do the printing.
-%
-\newskip\secheadingskip
-\def\secheadingbreak{\dobreak \secheadingskip{-1000}}
-
-% Subsection titles.
-\newskip\subsecheadingskip
-\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
-
-% Subsubsection titles.
-\def\subsubsecheadingskip{\subsecheadingskip}
-\def\subsubsecheadingbreak{\subsecheadingbreak}
-
-
-% Print any size, any type, section title.
-%
-% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
-% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
-% section number.
-%
-\def\sectionheading#1#2#3#4{%
- {%
- % Switch to the right set of fonts.
- \csname #2fonts\endcsname \rm
- %
- % Insert space above the heading.
- \csname #2headingbreak\endcsname
- %
- % Only insert the space after the number if we have a section number.
- \def\sectionlevel{#2}%
- \def\temptype{#3}%
- %
- \ifx\temptype\Ynothingkeyword
- \setbox0 = \hbox{}%
- \def\toctype{unn}%
- \gdef\thissection{#1}%
- \else\ifx\temptype\Yomitfromtockeyword
- % for @headings -- no section number, don't include in toc,
- % and don't redefine \thissection.
- \setbox0 = \hbox{}%
- \def\toctype{omit}%
- \let\sectionlevel=\empty
- \else\ifx\temptype\Yappendixkeyword
- \setbox0 = \hbox{#4\enspace}%
- \def\toctype{app}%
- \gdef\thissection{#1}%
- \else
- \setbox0 = \hbox{#4\enspace}%
- \def\toctype{num}%
- \gdef\thissection{#1}%
- \fi\fi\fi
- %
- % Write the toc entry (before \donoderef). See comments in \chapmacro.
- \writetocentry{\toctype\sectionlevel}{#1}{#4}%
- %
- % Write the node reference (= pdf destination for pdftex).
- % Again, see comments in \chapmacro.
- \donoderef{#3}%
- %
- % Interline glue will be inserted when the vbox is completed.
- % That glue will be a valid breakpoint for the page, since it'll be
- % preceded by a whatsit (usually from the \donoderef, or from the
- % \writetocentry if there was no node). We don't want to allow that
- % break, since then the whatsits could end up on page n while the
- % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
- \nobreak
- %
- % Output the actual section heading.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
- \hangindent=\wd0 % zero if no section number
- \unhbox0 #1}%
- }%
- % Add extra space after the heading -- half of whatever came above it.
- % Don't allow stretch, though.
- \kern .5 \csname #2headingskip\endcsname
- %
- % Do not let the kern be a potential breakpoint, as it would be if it
- % was followed by glue.
- \nobreak
- %
- % We'll almost certainly start a paragraph next, so don't let that
- % glue accumulate. (Not a breakpoint because it's preceded by a
- % discardable item.)
- \vskip-\parskip
- %
- % This is purely so the last item on the list is a known \penalty >
- % 10000. This is so \startdefun can avoid allowing breakpoints after
- % section headings. Otherwise, it would insert a valid breakpoint between:
- %
- % @section sec-whatever
- % @deffn def-whatever
- \penalty 10001
-}
-
-
-\message{toc,}
-% Table of contents.
-\newwrite\tocfile
-
-% Write an entry to the toc file, opening it if necessary.
-% Called from @chapter, etc.
-%
-% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
-% We append the current node name (if any) and page number as additional
-% arguments for the \{chap,sec,...}entry macros which will eventually
-% read this. The node name is used in the pdf outlines as the
-% destination to jump to.
-%
-% We open the .toc file for writing here instead of at @setfilename (or
-% any other fixed time) so that @contents can be anywhere in the document.
-% But if #1 is `omit', then we don't do anything. This is used for the
-% table of contents chapter openings themselves.
-%
-\newif\iftocfileopened
-\def\omitkeyword{omit}%
-%
-\def\writetocentry#1#2#3{%
- \edef\writetoctype{#1}%
- \ifx\writetoctype\omitkeyword \else
- \iftocfileopened\else
- \immediate\openout\tocfile = \jobname.toc
- \global\tocfileopenedtrue
- \fi
- %
- \iflinks
- {\atdummies
- \edef\temp{%
- \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
- \temp
- }%
- \fi
- \fi
- %
- % Tell \shipout to create a pdf destination on each page, if we're
- % writing pdf. These are used in the table of contents. We can't
- % just write one on every page because the title pages are numbered
- % 1 and 2 (the page numbers aren't printed), and so are the first
- % two pages of the document. Thus, we'd have two destinations named
- % `1', and two named `2'.
- \ifpdf \global\pdfmakepagedesttrue \fi
-}
-
-
-% These characters do not print properly in the Computer Modern roman
-% fonts, so we must take special care. This is more or less redundant
-% with the Texinfo input format setup at the end of this file.
-%
-\def\activecatcodes{%
- \catcode`\"=\active
- \catcode`\$=\active
- \catcode`\<=\active
- \catcode`\>=\active
- \catcode`\\=\active
- \catcode`\^=\active
- \catcode`\_=\active
- \catcode`\|=\active
- \catcode`\~=\active
-}
-
-
-% Read the toc file, which is essentially Texinfo input.
-\def\readtocfile{%
- \setupdatafile
- \activecatcodes
- \input \tocreadfilename
-}
-
-\newskip\contentsrightmargin \contentsrightmargin=1in
-\newcount\savepageno
-\newcount\lastnegativepageno \lastnegativepageno = -1
-
-% Prepare to read what we've written to \tocfile.
-%
-\def\startcontents#1{%
- % If @setchapternewpage on, and @headings double, the contents should
- % start on an odd page, unlike chapters. Thus, we maintain
- % \contentsalignmacro in parallel with \pagealignmacro.
- % From: Torbjorn Granlund <tege at matematik.su.se>
- \contentsalignmacro
- \immediate\closeout\tocfile
- %
- % Don't need to put `Contents' or `Short Contents' in the headline.
- % It is abundantly clear what they are.
- \def\thischapter{}%
- \chapmacro{#1}{Yomitfromtoc}{}%
- %
- \savepageno = \pageno
- \begingroup % Set up to handle contents files properly.
- \raggedbottom % Worry more about breakpoints than the bottom.
- \advance\hsize by -\contentsrightmargin % Don't use the full line length.
- %
- % Roman numerals for page numbers.
- \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
-}
-
-% redefined for the two-volume lispref. We always output on
-% \jobname.toc even if this is redefined.
-%
-\def\tocreadfilename{\jobname.toc}
-
-% Normal (long) toc.
-%
-\def\contents{%
- \startcontents{\putwordTOC}%
- \openin 1 \tocreadfilename\space
- \ifeof 1 \else
- \readtocfile
- \fi
- \vfill \eject
- \contentsalignmacro % in case @setchapternewpage odd is in effect
- \ifeof 1 \else
- \pdfmakeoutlines
- \fi
- \closein 1
- \endgroup
- \lastnegativepageno = \pageno
- \global\pageno = \savepageno
-}
-
-% And just the chapters.
-\def\summarycontents{%
- \startcontents{\putwordShortTOC}%
- %
- \let\numchapentry = \shortchapentry
- \let\appentry = \shortchapentry
- \let\unnchapentry = \shortunnchapentry
- % We want a true roman here for the page numbers.
- \secfonts
- \let\rm=\shortcontrm \let\bf=\shortcontbf
- \let\sl=\shortcontsl \let\tt=\shortconttt
- \rm
- \hyphenpenalty = 10000
- \advance\baselineskip by 1pt % Open it up a little.
- \def\numsecentry##1##2##3##4{}
- \let\appsecentry = \numsecentry
- \let\unnsecentry = \numsecentry
- \let\numsubsecentry = \numsecentry
- \let\appsubsecentry = \numsecentry
- \let\unnsubsecentry = \numsecentry
- \let\numsubsubsecentry = \numsecentry
- \let\appsubsubsecentry = \numsecentry
- \let\unnsubsubsecentry = \numsecentry
- \openin 1 \tocreadfilename\space
- \ifeof 1 \else
- \readtocfile
- \fi
- \closein 1
- \vfill \eject
- \contentsalignmacro % in case @setchapternewpage odd is in effect
- \endgroup
- \lastnegativepageno = \pageno
- \global\pageno = \savepageno
-}
-\let\shortcontents = \summarycontents
-
-% Typeset the label for a chapter or appendix for the short contents.
-% The arg is, e.g., `A' for an appendix, or `3' for a chapter.
-%
-\def\shortchaplabel#1{%
- % This space should be enough, since a single number is .5em, and the
- % widest letter (M) is 1em, at least in the Computer Modern fonts.
- % But use \hss just in case.
- % (This space doesn't include the extra space that gets added after
- % the label; that gets put in by \shortchapentry above.)
- %
- % We'd like to right-justify chapter numbers, but that looks strange
- % with appendix letters. And right-justifying numbers and
- % left-justifying letters looks strange when there is less than 10
- % chapters. Have to read the whole toc once to know how many chapters
- % there are before deciding ...
- \hbox to 1em{#1\hss}%
-}
-
-% These macros generate individual entries in the table of contents.
-% The first argument is the chapter or section name.
-% The last argument is the page number.
-% The arguments in between are the chapter number, section number, ...
-
-% Chapters, in the main contents.
-\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
-%
-% Chapters, in the short toc.
-% See comments in \dochapentry re vbox and related settings.
-\def\shortchapentry#1#2#3#4{%
- \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
-}
-
-% Appendices, in the main contents.
-% Need the word Appendix, and a fixed-size box.
-%
-\def\appendixbox#1{%
- % We use M since it's probably the widest letter.
- \setbox0 = \hbox{\putwordAppendix{} M}%
- \hbox to \wd0{\putwordAppendix{} #1\hss}}
-%
-\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
-
-% Unnumbered chapters.
-\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
-\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
-
-% Sections.
-\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
-\let\appsecentry=\numsecentry
-\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
-
-% Subsections.
-\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
-\let\appsubsecentry=\numsubsecentry
-\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
-
-% And subsubsections.
-\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
-\let\appsubsubsecentry=\numsubsubsecentry
-\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
-
-% This parameter controls the indentation of the various levels.
-% Same as \defaultparindent.
-\newdimen\tocindent \tocindent = 15pt
-
-% Now for the actual typesetting. In all these, #1 is the text and #2 is the
-% page number.
-%
-% If the toc has to be broken over pages, we want it to be at chapters
-% if at all possible; hence the \penalty.
-\def\dochapentry#1#2{%
- \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
- \begingroup
- \chapentryfonts
- \tocentry{#1}{\dopageno\bgroup#2\egroup}%
- \endgroup
- \nobreak\vskip .25\baselineskip plus.1\baselineskip
-}
-
-\def\dosecentry#1#2{\begingroup
- \secentryfonts \leftskip=\tocindent
- \tocentry{#1}{\dopageno\bgroup#2\egroup}%
-\endgroup}
-
-\def\dosubsecentry#1#2{\begingroup
- \subsecentryfonts \leftskip=2\tocindent
- \tocentry{#1}{\dopageno\bgroup#2\egroup}%
-\endgroup}
-
-\def\dosubsubsecentry#1#2{\begingroup
- \subsubsecentryfonts \leftskip=3\tocindent
- \tocentry{#1}{\dopageno\bgroup#2\egroup}%
-\endgroup}
-
-% We use the same \entry macro as for the index entries.
-\let\tocentry = \entry
-
-% Space between chapter (or whatever) number and the title.
-\def\labelspace{\hskip1em \relax}
-
-\def\dopageno#1{{\rm #1}}
-\def\doshortpageno#1{{\rm #1}}
-
-\def\chapentryfonts{\secfonts \rm}
-\def\secentryfonts{\textfonts}
-\def\subsecentryfonts{\textfonts}
-\def\subsubsecentryfonts{\textfonts}
-
-
-\message{environments,}
-% @foo ... @end foo.
-
-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
-%
-% Since these characters are used in examples, it should be an even number of
-% \tt widths. Each \tt character is 1en, so two makes it 1em.
-%
-\def\point{$\star$}
-\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
-\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
-\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
-\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
-
-% The @error{} command.
-% Adapted from the TeXbook's \boxit.
-%
-\newbox\errorbox
-%
-{\tentt \global\dimen0 = 3em}% Width of the box.
-\dimen2 = .55pt % Thickness of rules
-% The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
-%
-\setbox\errorbox=\hbox to \dimen0{\hfil
- \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
- \advance\hsize by -2\dimen2 % Rules.
- \vbox{%
- \hrule height\dimen2
- \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
- \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
- \kern3pt\vrule width\dimen2}% Space to right.
- \hrule height\dimen2}
- \hfil}
-%
-\def\error{\leavevmode\lower.7ex\copy\errorbox}
-
-% @tex ... @end tex escapes into raw Tex temporarily.
-% One exception: @ is still an escape character, so that @end tex works.
-% But \@ or @@ will get a plain tex @ character.
-
-\envdef\tex{%
- \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
- \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
- \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
- \catcode `\%=14
- \catcode `\+=\other
- \catcode `\"=\other
- \catcode `\|=\other
- \catcode `\<=\other
- \catcode `\>=\other
- \escapechar=`\\
- %
- \let\b=\ptexb
- \let\bullet=\ptexbullet
- \let\c=\ptexc
- \let\,=\ptexcomma
- \let\.=\ptexdot
- \let\dots=\ptexdots
- \let\equiv=\ptexequiv
- \let\!=\ptexexclam
- \let\i=\ptexi
- \let\indent=\ptexindent
- \let\noindent=\ptexnoindent
- \let\{=\ptexlbrace
- \let\+=\tabalign
- \let\}=\ptexrbrace
- \let\/=\ptexslash
- \let\*=\ptexstar
- \let\t=\ptext
- \let\frenchspacing=\plainfrenchspacing
- %
- \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
- \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
- \def\@{@}%
-}
-% There is no need to define \Etex.
-
-% Define @lisp ... @end lisp.
-% @lisp environment forms a group so it can rebind things,
-% including the definition of @end lisp (which normally is erroneous).
-
-% Amount to narrow the margins by for @lisp.
-\newskip\lispnarrowing \lispnarrowing=0.4in
-
-% This is the definition that ^^M gets inside @lisp, @example, and other
-% such environments. \null is better than a space, since it doesn't
-% have any width.
-\def\lisppar{\null\endgraf}
-
-% This space is always present above and below environments.
-\newskip\envskipamount \envskipamount = 0pt
-
-% Make spacing and below environment symmetrical. We use \parskip here
-% to help in doing that, since in @example-like environments \parskip
-% is reset to zero; thus the \afterenvbreak inserts no space -- but the
-% start of the next paragraph will insert \parskip.
-%
-\def\aboveenvbreak{{%
- % =10000 instead of <10000 because of a special case in \itemzzz and
- % \sectionheading, q.v.
- \ifnum \lastpenalty=10000 \else
- \advance\envskipamount by \parskip
- \endgraf
- \ifdim\lastskip<\envskipamount
- \removelastskip
- % it's not a good place to break if the last penalty was \nobreak
- % or better ...
- \ifnum\lastpenalty<10000 \penalty-50 \fi
- \vskip\envskipamount
- \fi
- \fi
-}}
-
-\let\afterenvbreak = \aboveenvbreak
-
-% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
-% also clear it, so that its embedded environments do the narrowing again.
-\let\nonarrowing=\relax
-
-% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
-% environment contents.
-\font\circle=lcircle10
-\newdimen\circthick
-\newdimen\cartouter\newdimen\cartinner
-\newskip\normbskip\newskip\normpskip\newskip\normlskip
-\circthick=\fontdimen8\circle
-%
-\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
-\def\ctr{{\hskip 6pt\circle\char'010}}
-\def\cbl{{\circle\char'012\hskip -6pt}}
-\def\cbr{{\hskip 6pt\circle\char'011}}
-\def\carttop{\hbox to \cartouter{\hskip\lskip
- \ctl\leaders\hrule height\circthick\hfil\ctr
- \hskip\rskip}}
-\def\cartbot{\hbox to \cartouter{\hskip\lskip
- \cbl\leaders\hrule height\circthick\hfil\cbr
- \hskip\rskip}}
-%
-\newskip\lskip\newskip\rskip
-
-\envdef\cartouche{%
- \ifhmode\par\fi % can't be in the midst of a paragraph.
- \startsavinginserts
- \lskip=\leftskip \rskip=\rightskip
- \leftskip=0pt\rightskip=0pt % we want these *outside*.
- \cartinner=\hsize \advance\cartinner by-\lskip
- \advance\cartinner by-\rskip
- \cartouter=\hsize
- \advance\cartouter by 18.4pt % allow for 3pt kerns on either
- % side, and for 6pt waste from
- % each corner char, and rule thickness
- \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
- % Flag to tell @lisp, etc., not to narrow margin.
- \let\nonarrowing = t%
- \vbox\bgroup
- \baselineskip=0pt\parskip=0pt\lineskip=0pt
- \carttop
- \hbox\bgroup
- \hskip\lskip
- \vrule\kern3pt
- \vbox\bgroup
- \kern3pt
- \hsize=\cartinner
- \baselineskip=\normbskip
- \lineskip=\normlskip
- \parskip=\normpskip
- \vskip -\parskip
- \comment % For explanation, see the end of \def\group.
-}
-\def\Ecartouche{%
- \ifhmode\par\fi
- \kern3pt
- \egroup
- \kern3pt\vrule
- \hskip\rskip
- \egroup
- \cartbot
- \egroup
- \checkinserts
-}
-
-
-% This macro is called at the beginning of all the @example variants,
-% inside a group.
-\def\nonfillstart{%
- \aboveenvbreak
- \hfuzz = 12pt % Don't be fussy
- \sepspaces % Make spaces be word-separators rather than space tokens.
- \let\par = \lisppar % don't ignore blank lines
- \obeylines % each line of input is a line of output
- \parskip = 0pt
- \parindent = 0pt
- \emergencystretch = 0pt % don't try to avoid overfull boxes
- \ifx\nonarrowing\relax
- \advance \leftskip by \lispnarrowing
- \exdentamount=\lispnarrowing
- \else
- \let\nonarrowing = \relax
- \fi
- \let\exdent=\nofillexdent
-}
-
-% If you want all examples etc. small: @set dispenvsize small.
-% If you want even small examples the full size: @set dispenvsize nosmall.
-% This affects the following displayed environments:
-% @example, @display, @format, @lisp
-%
-\def\smallword{small}
-\def\nosmallword{nosmall}
-\let\SETdispenvsize\relax
-\def\setnormaldispenv{%
- \ifx\SETdispenvsize\smallword
- % end paragraph for sake of leading, in case document has no blank
- % line. This is redundant with what happens in \aboveenvbreak, but
- % we need to do it before changing the fonts, and it's inconvenient
- % to change the fonts afterward.
- \ifnum \lastpenalty=10000 \else \endgraf \fi
- \smallexamplefonts \rm
- \fi
-}
-\def\setsmalldispenv{%
- \ifx\SETdispenvsize\nosmallword
- \else
- \ifnum \lastpenalty=10000 \else \endgraf \fi
- \smallexamplefonts \rm
- \fi
-}
-
-% We often define two environments, @foo and @smallfoo.
-% Let's do it by one command:
-\def\makedispenv #1#2{
- \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
- \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
- \expandafter\let\csname E#1\endcsname \afterenvbreak
- \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
-}
-
-% Define two synonyms:
-\def\maketwodispenvs #1#2#3{
- \makedispenv{#1}{#3}
- \makedispenv{#2}{#3}
-}
-
-% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
-%
-% @smallexample and @smalllisp: use smaller fonts.
-% Originally contributed by Pavel at xerox.
-%
-\maketwodispenvs {lisp}{example}{%
- \nonfillstart
- \tt\quoteexpand
- \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
- \gobble % eat return
-}
-% @display/@smalldisplay: same as @lisp except keep current font.
-%
-\makedispenv {display}{%
- \nonfillstart
- \gobble
-}
-
-% @format/@smallformat: same as @display except don't narrow margins.
-%
-\makedispenv{format}{%
- \let\nonarrowing = t%
- \nonfillstart
- \gobble
-}
-
-% @flushleft: same as @format, but doesn't obey \SETdispenvsize.
-\envdef\flushleft{%
- \let\nonarrowing = t%
- \nonfillstart
- \gobble
-}
-\let\Eflushleft = \afterenvbreak
-
-% @flushright.
-%
-\envdef\flushright{%
- \let\nonarrowing = t%
- \nonfillstart
- \advance\leftskip by 0pt plus 1fill
- \gobble
-}
-\let\Eflushright = \afterenvbreak
-
-
-% @quotation does normal linebreaking (hence we can't use \nonfillstart)
-% and narrows the margins. We keep \parskip nonzero in general, since
-% we're doing normal filling. So, when using \aboveenvbreak and
-% \afterenvbreak, temporarily make \parskip 0.
-%
-\envdef\quotation{%
- {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
- \parindent=0pt
- %
- % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
- \ifx\nonarrowing\relax
- \advance\leftskip by \lispnarrowing
- \advance\rightskip by \lispnarrowing
- \exdentamount = \lispnarrowing
- \else
- \let\nonarrowing = \relax
- \fi
- \parsearg\quotationlabel
-}
-
-% We have retained a nonzero parskip for the environment, since we're
-% doing normal filling.
-%
-\def\Equotation{%
- \par
- \ifx\quotationauthor\undefined\else
- % indent a bit.
- \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
- \fi
- {\parskip=0pt \afterenvbreak}%
-}
-
-% If we're given an argument, typeset it in bold with a colon after.
-\def\quotationlabel#1{%
- \def\temp{#1}%
- \ifx\temp\empty \else
- {\bf #1: }%
- \fi
-}
-
-
-% LaTeX-like @verbatim... at end verbatim and @verb{<char>...<char>}
-% If we want to allow any <char> as delimiter,
-% we need the curly braces so that makeinfo sees the @verb command, eg:
-% `@verbx...x' would look like the '@verbx' command. --janneke at gnu.org
-%
-% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
-%
-% [Knuth] p.344; only we need to do the other characters Texinfo sets
-% active too. Otherwise, they get lost as the first character on a
-% verbatim line.
-\def\dospecials{%
- \do\ \do\\\do\{\do\}\do\$\do\&%
- \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
- \do\<\do\>\do\|\do\@\do+\do\"%
-}
-%
-% [Knuth] p. 380
-\def\uncatcodespecials{%
- \def\do##1{\catcode`##1=\other}\dospecials}
-%
-% [Knuth] pp. 380,381,391
-% Disable Spanish ligatures ?` and !` of \tt font
-\begingroup
- \catcode`\`=\active\gdef`{\relax\lq}
-\endgroup
-%
-% Setup for the @verb command.
-%
-% Eight spaces for a tab
-\begingroup
- \catcode`\^^I=\active
- \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
-\endgroup
-%
-\def\setupverb{%
- \tt % easiest (and conventionally used) font for verbatim
- \def\par{\leavevmode\endgraf}%
- \catcode`\`=\active
- \tabeightspaces
- % Respect line breaks,
- % print special symbols as themselves, and
- % make each space count
- % must do in this order:
- \obeylines \uncatcodespecials \sepspaces
-}
-
-% Setup for the @verbatim environment
-%
-% Real tab expansion
-\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
-%
-\def\starttabbox{\setbox0=\hbox\bgroup}
-
-% Allow an option to not replace quotes with a regular directed right
-% quote/apostrophe (char 0x27), but instead use the undirected quote
-% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
-% the default, but it works for pasting with more pdf viewers (at least
-% evince), the lilypond developers report. xpdf does work with the
-% regular 0x27.
-%
-\def\codequoteright{%
- \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
- '%
- \else
- \char'15
- \fi
-}
-%
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
-%
-\def\codequoteleft{%
- \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
- `%
- \else
- \char'22
- \fi
-}
-%
-\begingroup
- \catcode`\^^I=\active
- \gdef\tabexpand{%
- \catcode`\^^I=\active
- \def^^I{\leavevmode\egroup
- \dimen0=\wd0 % the width so far, or since the previous tab
- \divide\dimen0 by\tabw
- \multiply\dimen0 by\tabw % compute previous multiple of \tabw
- \advance\dimen0 by\tabw % advance to next multiple of \tabw
- \wd0=\dimen0 \box0 \starttabbox
- }%
- }
- \catcode`\'=\active
- \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
- %
- \catcode`\`=\active
- \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
- %
- \gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
-\endgroup
-
-% start the verbatim environment.
-\def\setupverbatim{%
- \let\nonarrowing = t%
- \nonfillstart
- % Easiest (and conventionally used) font for verbatim
- \tt
- \def\par{\leavevmode\egroup\box0\endgraf}%
- \catcode`\`=\active
- \tabexpand
- \quoteexpand
- % Respect line breaks,
- % print special symbols as themselves, and
- % make each space count
- % must do in this order:
- \obeylines \uncatcodespecials \sepspaces
- \everypar{\starttabbox}%
-}
-
-% Do the @verb magic: verbatim text is quoted by unique
-% delimiter characters. Before first delimiter expect a
-% right brace, after last delimiter expect closing brace:
-%
-% \def\doverb'{'<char>#1<char>'}'{#1}
-%
-% [Knuth] p. 382; only eat outer {}
-\begingroup
- \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
- \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
-\endgroup
-%
-\def\verb{\begingroup\setupverb\doverb}
-%
-%
-% Do the @verbatim magic: define the macro \doverbatim so that
-% the (first) argument ends when '@end verbatim' is reached, ie:
-%
-% \def\doverbatim#1 at end verbatim{#1}
-%
-% For Texinfo it's a lot easier than for LaTeX,
-% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
-% we need not redefine '\', '{' and '}'.
-%
-% Inspired by LaTeX's verbatim command set [latex.ltx]
-%
-\begingroup
- \catcode`\ =\active
- \obeylines %
- % ignore everything up to the first ^^M, that's the newline at the end
- % of the @verbatim input line itself. Otherwise we get an extra blank
- % line in the output.
- \xdef\doverbatim#1^^M#2 at end verbatim{#2\noexpand\end\gobble verbatim}%
- % We really want {...\end verbatim} in the body of the macro, but
- % without the active space; thus we have to use \xdef and \gobble.
-\endgroup
-%
-\envdef\verbatim{%
- \setupverbatim\doverbatim
-}
-\let\Everbatim = \afterenvbreak
-
-
-% @verbatiminclude FILE - insert text of file in verbatim environment.
-%
-\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
-%
-\def\doverbatiminclude#1{%
- {%
- \makevalueexpandable
- \setupverbatim
- \input #1
- \afterenvbreak
- }%
-}
-
-% @copying ... @end copying.
-% Save the text away for @insertcopying later.
-%
-% We save the uninterpreted tokens, rather than creating a box.
-% Saving the text in a box would be much easier, but then all the
-% typesetting commands (@smallbook, font changes, etc.) have to be done
-% beforehand -- and a) we want @copying to be done first in the source
-% file; b) letting users define the frontmatter in as flexible order as
-% possible is very desirable.
-%
-\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
-\def\docopying#1 at end copying{\endgroup\def\copyingtext{#1}}
-%
-\def\insertcopying{%
- \begingroup
- \parindent = 0pt % paragraph indentation looks wrong on title page
- \scanexp\copyingtext
- \endgroup
-}
-
-
-\message{defuns,}
-% @defun etc.
-
-\newskip\defbodyindent \defbodyindent=.4in
-\newskip\defargsindent \defargsindent=50pt
-\newskip\deflastargmargin \deflastargmargin=18pt
-\newcount\defunpenalty
-
-% Start the processing of @deffn:
-\def\startdefun{%
- \ifnum\lastpenalty<10000
- \medbreak
- \defunpenalty=10003 % Will keep this @deffn together with the
- % following @def command, see below.
- \else
- % If there are two @def commands in a row, we'll have a \nobreak,
- % which is there to keep the function description together with its
- % header. But if there's nothing but headers, we need to allow a
- % break somewhere. Check specifically for penalty 10002, inserted
- % by \printdefunline, instead of 10000, since the sectioning
- % commands also insert a nobreak penalty, and we don't want to allow
- % a break between a section heading and a defun.
- %
- % As a minor refinement, we avoid "club" headers by signalling
- % with penalty of 10003 after the very first @deffn in the
- % sequence (see above), and penalty of 10002 after any following
- % @def command.
- \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
- %
- % Similarly, after a section heading, do not allow a break.
- % But do insert the glue.
- \medskip % preceded by discardable penalty, so not a breakpoint
- \fi
- %
- \parindent=0in
- \advance\leftskip by \defbodyindent
- \exdentamount=\defbodyindent
-}
-
-\def\dodefunx#1{%
- % First, check whether we are in the right environment:
- \checkenv#1%
- %
- % As above, allow line break if we have multiple x headers in a row.
- % It's not a great place, though.
- \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
- %
- % And now, it's time to reuse the body of the original defun:
- \expandafter\gobbledefun#1%
-}
-\def\gobbledefun#1\startdefun{}
-
-% \printdefunline \deffnheader{text}
-%
-\def\printdefunline#1#2{%
- \begingroup
- % call \deffnheader:
- #1#2 \endheader
- % common ending:
- \interlinepenalty = 10000
- \advance\rightskip by 0pt plus 1fil
- \endgraf
- \nobreak\vskip -\parskip
- \penalty\defunpenalty % signal to \startdefun and \dodefunx
- % Some of the @defun-type tags do not enable magic parentheses,
- % rendering the following check redundant. But we don't optimize.
- \checkparencounts
- \endgroup
-}
-
-\def\Edefun{\endgraf\medbreak}
-
-% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
-% the only thing remainnig is to define \deffnheader.
-%
-\def\makedefun#1{%
- \expandafter\let\csname E#1\endcsname = \Edefun
- \edef\temp{\noexpand\domakedefun
- \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
- \temp
-}
-
-% \domakedefun \deffn \deffnx \deffnheader
-%
-% Define \deffn and \deffnx, without parameters.
-% \deffnheader has to be defined explicitly.
-%
-\def\domakedefun#1#2#3{%
- \envdef#1{%
- \startdefun
- \parseargusing\activeparens{\printdefunline#3}%
- }%
- \def#2{\dodefunx#1}%
- \def#3%
-}
-
-%%% Untyped functions:
-
-% @deffn category name args
-\makedefun{deffn}{\deffngeneral{}}
-
-% @deffn category class name args
-\makedefun{defop}#1 {\defopon{#1\ \putwordon}}
-
-% \defopon {category on}class name args
-\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
-
-% \deffngeneral {subind}category name args
-%
-\def\deffngeneral#1#2 #3 #4\endheader{%
- % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
- \dosubind{fn}{\code{#3}}{#1}%
- \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
-}
-
-%%% Typed functions:
-
-% @deftypefn category type name args
-\makedefun{deftypefn}{\deftypefngeneral{}}
-
-% @deftypeop category class type name args
-\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
-
-% \deftypeopon {category on}class type name args
-\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
-
-% \deftypefngeneral {subind}category type name args
-%
-\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
- \dosubind{fn}{\code{#4}}{#1}%
- \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
-}
-
-%%% Typed variables:
-
-% @deftypevr category type var args
-\makedefun{deftypevr}{\deftypecvgeneral{}}
-
-% @deftypecv category class type var args
-\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
-
-% \deftypecvof {category of}class type var args
-\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
-
-% \deftypecvgeneral {subind}category type var args
-%
-\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
- \dosubind{vr}{\code{#4}}{#1}%
- \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
-}
-
-%%% Untyped variables:
-
-% @defvr category var args
-\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
-
-% @defcv category class var args
-\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
-
-% \defcvof {category of}class var args
-\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
-
-%%% Type:
-% @deftp category name args
-\makedefun{deftp}#1 #2 #3\endheader{%
- \doind{tp}{\code{#2}}%
- \defname{#1}{}{#2}\defunargs{#3\unskip}%
-}
-
-% Remaining @defun-like shortcuts:
-\makedefun{defun}{\deffnheader{\putwordDeffunc} }
-\makedefun{defmac}{\deffnheader{\putwordDefmac} }
-\makedefun{defspec}{\deffnheader{\putwordDefspec} }
-\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
-\makedefun{defvar}{\defvrheader{\putwordDefvar} }
-\makedefun{defopt}{\defvrheader{\putwordDefopt} }
-\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
-\makedefun{defmethod}{\defopon\putwordMethodon}
-\makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
-\makedefun{defivar}{\defcvof\putwordInstanceVariableof}
-\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
-
-% \defname, which formats the name of the @def (not the args).
-% #1 is the category, such as "Function".
-% #2 is the return type, if any.
-% #3 is the function name.
-%
-% We are followed by (but not passed) the arguments, if any.
-%
-\def\defname#1#2#3{%
- % Get the values of \leftskip and \rightskip as they were outside the @def...
- \advance\leftskip by -\defbodyindent
- %
- % How we'll format the type name. Putting it in brackets helps
- % distinguish it from the body text that may end up on the next line
- % just below it.
- \def\temp{#1}%
- \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
- %
- % Figure out line sizes for the paragraph shape.
- % The first line needs space for \box0; but if \rightskip is nonzero,
- % we need only space for the part of \box0 which exceeds it:
- \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
- % The continuations:
- \dimen2=\hsize \advance\dimen2 by -\defargsindent
- % (plain.tex says that \dimen1 should be used only as global.)
- \parshape 2 0in \dimen0 \defargsindent \dimen2
- %
- % Put the type name to the right margin.
- \noindent
- \hbox to 0pt{%
- \hfil\box0 \kern-\hsize
- % \hsize has to be shortened this way:
- \kern\leftskip
- % Intentionally do not respect \rightskip, since we need the space.
- }%
- %
- % Allow all lines to be underfull without complaint:
- \tolerance=10000 \hbadness=10000
- \exdentamount=\defbodyindent
- {%
- % defun fonts. We use typewriter by default (used to be bold) because:
- % . we're printing identifiers, they should be in tt in principle.
- % . in languages with many accents, such as Czech or French, it's
- % common to leave accents off identifiers. The result looks ok in
- % tt, but exceedingly strange in rm.
- % . we don't want -- and --- to be treated as ligatures.
- % . this still does not fix the ?` and !` ligatures, but so far no
- % one has made identifiers using them :).
- \df \tt
- \def\temp{#2}% return value type
- \ifx\temp\empty\else \tclose{\temp} \fi
- #3% output function name
- }%
- {\rm\enskip}% hskip 0.5 em of \tenrm
- %
- \boldbrax
- % arguments will be output next, if any.
-}
-
-% Print arguments in slanted roman (not ttsl), inconsistently with using
-% tt for the name. This is because literal text is sometimes needed in
-% the argument list (groff manual), and ttsl and tt are not very
-% distinguishable. Prevent hyphenation at `-' chars.
-%
-\def\defunargs#1{%
- % use sl by default (not ttsl),
- % tt for the names.
- \df \sl \hyphenchar\font=0
- %
- % On the other hand, if an argument has two dashes (for instance), we
- % want a way to get ttsl. Let's try @var for that.
- \let\var=\ttslanted
- #1%
- \sl\hyphenchar\font=45
-}
-
-% We want ()&[] to print specially on the defun line.
-%
-\def\activeparens{%
- \catcode`\(=\active \catcode`\)=\active
- \catcode`\[=\active \catcode`\]=\active
- \catcode`\&=\active
-}
-
-% Make control sequences which act like normal parenthesis chars.
-\let\lparen = ( \let\rparen = )
-
-% Be sure that we always have a definition for `(', etc. For example,
-% if the fn name has parens in it, \boldbrax will not be in effect yet,
-% so TeX would otherwise complain about undefined control sequence.
-{
- \activeparens
- \global\let(=\lparen \global\let)=\rparen
- \global\let[=\lbrack \global\let]=\rbrack
- \global\let& = \&
-
- \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
- \gdef\magicamp{\let&=\amprm}
-}
-
-\newcount\parencount
-
-% If we encounter &foo, then turn on ()-hacking afterwards
-\newif\ifampseen
-\def\amprm#1 {\ampseentrue{\bf\ }}
-
-\def\parenfont{%
- \ifampseen
- % At the first level, print parens in roman,
- % otherwise use the default font.
- \ifnum \parencount=1 \rm \fi
- \else
- % The \sf parens (in \boldbrax) actually are a little bolder than
- % the contained text. This is especially needed for [ and ] .
- \sf
- \fi
-}
-\def\infirstlevel#1{%
- \ifampseen
- \ifnum\parencount=1
- #1%
- \fi
- \fi
-}
-\def\bfafterword#1 {#1 \bf}
-
-\def\opnr{%
- \global\advance\parencount by 1
- {\parenfont(}%
- \infirstlevel \bfafterword
-}
-\def\clnr{%
- {\parenfont)}%
- \infirstlevel \sl
- \global\advance\parencount by -1
-}
-
-\newcount\brackcount
-\def\lbrb{%
- \global\advance\brackcount by 1
- {\bf[}%
-}
-\def\rbrb{%
- {\bf]}%
- \global\advance\brackcount by -1
-}
-
-\def\checkparencounts{%
- \ifnum\parencount=0 \else \badparencount \fi
- \ifnum\brackcount=0 \else \badbrackcount \fi
-}
-\def\badparencount{%
- \errmessage{Unbalanced parentheses in @def}%
- \global\parencount=0
-}
-\def\badbrackcount{%
- \errmessage{Unbalanced square braces in @def}%
- \global\brackcount=0
-}
-
-
-\message{macros,}
-% @macro.
-
-% To do this right we need a feature of e-TeX, \scantokens,
-% which we arrange to emulate with a temporary file in ordinary TeX.
-\ifx\eTeXversion\undefined
- \newwrite\macscribble
- \def\scantokens#1{%
- \toks0={#1}%
- \immediate\openout\macscribble=\jobname.tmp
- \immediate\write\macscribble{\the\toks0}%
- \immediate\closeout\macscribble
- \input \jobname.tmp
- }
-\fi
-
-\def\scanmacro#1{%
- \begingroup
- \newlinechar`\^^M
- \let\xeatspaces\eatspaces
- % Undo catcode changes of \startcontents and \doprintindex
- % When called from @insertcopying or (short)caption, we need active
- % backslash to get it printed correctly. Previously, we had
- % \catcode`\\=\other instead. We'll see whether a problem appears
- % with macro expansion. --kasal, 19aug04
- \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
- % ... and \example
- \spaceisspace
- %
- % Append \endinput to make sure that TeX does not see the ending newline.
- % I've verified that it is necessary both for e-TeX and for ordinary TeX
- % --kasal, 29nov03
- \scantokens{#1\endinput}%
- \endgroup
-}
-
-\def\scanexp#1{%
- \edef\temp{\noexpand\scanmacro{#1}}%
- \temp
-}
-
-\newcount\paramno % Count of parameters
-\newtoks\macname % Macro name
-\newif\ifrecursive % Is it recursive?
-
-% List of all defined macros in the form
-% \definedummyword\macro1\definedummyword\macro2...
-% Currently is also contains all @aliases; the list can be split
-% if there is a need.
-\def\macrolist{}
-
-% Add the macro to \macrolist
-\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
-\def\addtomacrolistxxx#1{%
- \toks0 = \expandafter{\macrolist\definedummyword#1}%
- \xdef\macrolist{\the\toks0}%
-}
-
-% Utility routines.
-% This does \let #1 = #2, with \csnames; that is,
-% \let \csname#1\endcsname = \csname#2\endcsname
-% (except of course we have to play expansion games).
-%
-\def\cslet#1#2{%
- \expandafter\let
- \csname#1\expandafter\endcsname
- \csname#2\endcsname
-}
-
-% Trim leading and trailing spaces off a string.
-% Concepts from aro-bend problem 15 (see CTAN).
-{\catcode`\@=11
-\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
-\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
-\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
-\def\unbrace#1{#1}
-\unbrace{\gdef\trim@@@ #1 } #2@{#1}
-}
-
-% Trim a single trailing ^^M off a string.
-{\catcode`\^^M=\other \catcode`\Q=3%
-\gdef\eatcr #1{\eatcra #1Q^^MQ}%
-\gdef\eatcra#1^^MQ{\eatcrb#1Q}%
-\gdef\eatcrb#1Q#2Q{#1}%
-}
-
-% Macro bodies are absorbed as an argument in a context where
-% all characters are catcode 10, 11 or 12, except \ which is active
-% (as in normal texinfo). It is necessary to change the definition of \.
-
-% It's necessary to have hard CRs when the macro is executed. This is
-% done by making ^^M (\endlinechar) catcode 12 when reading the macro
-% body, and then making it the \newlinechar in \scanmacro.
-
-\def\scanctxt{%
- \catcode`\"=\other
- \catcode`\+=\other
- \catcode`\<=\other
- \catcode`\>=\other
- \catcode`\@=\other
- \catcode`\^=\other
- \catcode`\_=\other
- \catcode`\|=\other
- \catcode`\~=\other
-}
-
-\def\scanargctxt{%
- \scanctxt
- \catcode`\\=\other
- \catcode`\^^M=\other
-}
-
-\def\macrobodyctxt{%
- \scanctxt
- \catcode`\{=\other
- \catcode`\}=\other
- \catcode`\^^M=\other
- \usembodybackslash
-}
-
-\def\macroargctxt{%
- \scanctxt
- \catcode`\\=\other
-}
-
-% \mbodybackslash is the definition of \ in @macro bodies.
-% It maps \foo\ => \csname macarg.foo\endcsname => #N
-% where N is the macro parameter number.
-% We define \csname macarg.\endcsname to be \realbackslash, so
-% \\ in macro replacement text gets you a backslash.
-
-{\catcode`@=0 @catcode`@\=@active
- @gdef at usembodybackslash{@let\=@mbodybackslash}
- @gdef at mbodybackslash#1\{@csname macarg.#1 at endcsname}
-}
-\expandafter\def\csname macarg.\endcsname{\realbackslash}
-
-\def\macro{\recursivefalse\parsearg\macroxxx}
-\def\rmacro{\recursivetrue\parsearg\macroxxx}
-
-\def\macroxxx#1{%
- \getargs{#1}% now \macname is the macname and \argl the arglist
- \ifx\argl\empty % no arguments
- \paramno=0%
- \else
- \expandafter\parsemargdef \argl;%
- \fi
- \if1\csname ismacro.\the\macname\endcsname
- \message{Warning: redefining \the\macname}%
- \else
- \expandafter\ifx\csname \the\macname\endcsname \relax
- \else \errmessage{Macro name \the\macname\space already defined}\fi
- \global\cslet{macsave.\the\macname}{\the\macname}%
- \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
- \addtomacrolist{\the\macname}%
- \fi
- \begingroup \macrobodyctxt
- \ifrecursive \expandafter\parsermacbody
- \else \expandafter\parsemacbody
- \fi}
-
-\parseargdef\unmacro{%
- \if1\csname ismacro.#1\endcsname
- \global\cslet{#1}{macsave.#1}%
- \global\expandafter\let \csname ismacro.#1\endcsname=0%
- % Remove the macro name from \macrolist:
- \begingroup
- \expandafter\let\csname#1\endcsname \relax
- \let\definedummyword\unmacrodo
- \xdef\macrolist{\macrolist}%
- \endgroup
- \else
- \errmessage{Macro #1 not defined}%
- \fi
-}
-
-% Called by \do from \dounmacro on each macro. The idea is to omit any
-% macro definitions that have been changed to \relax.
-%
-\def\unmacrodo#1{%
- \ifx #1\relax
- % remove this
- \else
- \noexpand\definedummyword \noexpand#1%
- \fi
-}
-
-% This makes use of the obscure feature that if the last token of a
-% <parameter list> is #, then the preceding argument is delimited by
-% an opening brace, and that opening brace is not consumed.
-\def\getargs#1{\getargsxxx#1{}}
-\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
-\def\getmacname #1 #2\relax{\macname={#1}}
-\def\getmacargs#1{\def\argl{#1}}
-
-% Parse the optional {params} list. Set up \paramno and \paramlist
-% so \defmacro knows what to do. Define \macarg.blah for each blah
-% in the params list, to be ##N where N is the position in that list.
-% That gets used by \mbodybackslash (above).
-
-% We need to get `macro parameter char #' into several definitions.
-% The technique used is stolen from LaTeX: let \hash be something
-% unexpandable, insert that wherever you need a #, and then redefine
-% it to # just before using the token list produced.
-%
-% The same technique is used to protect \eatspaces till just before
-% the macro is used.
-
-\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
- \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
-\def\parsemargdefxxx#1,{%
- \if#1;\let\next=\relax
- \else \let\next=\parsemargdefxxx
- \advance\paramno by 1%
- \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
- {\xeatspaces{\hash\the\paramno}}%
- \edef\paramlist{\paramlist\hash\the\paramno,}%
- \fi\next}
-
-% These two commands read recursive and nonrecursive macro bodies.
-% (They're different since rec and nonrec macros end differently.)
-
-\long\def\parsemacbody#1 at end macro%
-{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
-\long\def\parsermacbody#1 at end rmacro%
-{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
-
-% This defines the macro itself. There are six cases: recursive and
-% nonrecursive macros of zero, one, and many arguments.
-% Much magic with \expandafter here.
-% \xdef is used so that macro definitions will survive the file
-% they're defined in; @include reads the file inside a group.
-\def\defmacro{%
- \let\hash=##% convert placeholders to macro parameter chars
- \ifrecursive
- \ifcase\paramno
- % 0
- \expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\scanmacro{\temp}}%
- \or % 1
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\braceorline
- \expandafter\noexpand\csname\the\macname xxx\endcsname}%
- \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
- \egroup\noexpand\scanmacro{\temp}}%
- \else % many
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{\egroup\noexpand\scanmacro{\temp}}%
- \fi
- \else
- \ifcase\paramno
- % 0
- \expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
- \or % 1
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\braceorline
- \expandafter\noexpand\csname\the\macname xxx\endcsname}%
- \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
- \egroup
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
- \else % many
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \expandafter\noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{%
- \egroup
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
- \fi
- \fi}
-
-\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
-
-% \braceorline decides whether the next nonwhitespace character is a
-% {. If so it reads up to the closing }, if not, it reads the whole
-% line. Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg)
-\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
-\def\braceorlinexxx{%
- \ifx\nchar\bgroup\else
- \expandafter\parsearg
- \fi \macnamexxx}
-
-
-% @alias.
-% We need some trickery to remove the optional spaces around the equal
-% sign. Just make them active and then expand them all to nothing.
-\def\alias{\parseargusing\obeyspaces\aliasxxx}
-\def\aliasxxx #1{\aliasyyy#1\relax}
-\def\aliasyyy #1=#2\relax{%
- {%
- \expandafter\let\obeyedspace=\empty
- \addtomacrolist{#1}%
- \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
- }%
- \next
-}
-
-
-\message{cross references,}
-
-\newwrite\auxfile
-\newif\ifhavexrefs % True if xref values are known.
-\newif\ifwarnedxrefs % True if we warned once that they aren't known.
-
-% @inforef is relatively simple.
-\def\inforef #1{\inforefzzz #1,,,,**}
-\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
- node \samp{\ignorespaces#1{}}}
-
-% @node's only job in TeX is to define \lastnode, which is used in
-% cross-references. The @node line might or might not have commas, and
-% might or might not have spaces before the first comma, like:
-% @node foo , bar , ...
-% We don't want such trailing spaces in the node name.
-%
-\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
-%
-% also remove a trailing comma, in case of something like this:
-% @node Help-Cross, , , Cross-refs
-\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
-\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
-
-\let\nwnode=\node
-\let\lastnode=\empty
-
-% Write a cross-reference definition for the current node. #1 is the
-% type (Ynumbered, Yappendix, Ynothing).
-%
-\def\donoderef#1{%
- \ifx\lastnode\empty\else
- \setref{\lastnode}{#1}%
- \global\let\lastnode=\empty
- \fi
-}
-
-% @anchor{NAME} -- define xref target at arbitrary point.
-%
-\newcount\savesfregister
-%
-\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
-\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
-\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
-
-% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
-% anchor), which consists of three parts:
-% 1) NAME-title - the current sectioning name taken from \thissection,
-% or the anchor name.
-% 2) NAME-snt - section number and type, passed as the SNT arg, or
-% empty for anchors.
-% 3) NAME-pg - the page number.
-%
-% This is called from \donoderef, \anchor, and \dofloat. In the case of
-% floats, there is an additional part, which is not written here:
-% 4) NAME-lof - the text as it should appear in a @listoffloats.
-%
-\def\setref#1#2{%
- \pdfmkdest{#1}%
- \iflinks
- {%
- \atdummies % preserve commands, but don't expand them
- \edef\writexrdef##1##2{%
- \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
- ##1}{##2}}% these are parameters of \writexrdef
- }%
- \toks0 = \expandafter{\thissection}%
- \immediate \writexrdef{title}{\the\toks0 }%
- \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
- \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout
- }%
- \fi
-}
-
-% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
-% the node name, #2 the name of the Info cross-reference, #3 the printed
-% node name, #4 the name of the Info file, #5 the name of the printed
-% manual. All but the node name can be omitted.
-%
-\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
-\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
-\def\ref#1{\xrefX[#1,,,,,,,]}
-\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
- \unsepspaces
- \def\printedmanual{\ignorespaces #5}%
- \def\printedrefname{\ignorespaces #3}%
- \setbox1=\hbox{\printedmanual\unskip}%
- \setbox0=\hbox{\printedrefname\unskip}%
- \ifdim \wd0 = 0pt
- % No printed node name was explicitly given.
- \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
- % Use the node name inside the square brackets.
- \def\printedrefname{\ignorespaces #1}%
- \else
- % Use the actual chapter/section title appear inside
- % the square brackets. Use the real section title if we have it.
- \ifdim \wd1 > 0pt
- % It is in another manual, so we don't have it.
- \def\printedrefname{\ignorespaces #1}%
- \else
- \ifhavexrefs
- % We know the real title if we have the xref values.
- \def\printedrefname{\refx{#1-title}{}}%
- \else
- % Otherwise just copy the Info node name.
- \def\printedrefname{\ignorespaces #1}%
- \fi%
- \fi
- \fi
- \fi
- %
- % Make link in pdf output.
- \ifpdf
- \leavevmode
- \getfilename{#4}%
- {\indexnofonts
- \turnoffactive
- % See comments at \activebackslashdouble.
- {\activebackslashdouble \xdef\pdfxrefdest{#1}%
- \backslashparens\pdfxrefdest}%
- %
- \ifnum\filenamelength>0
- \startlink attr{/Border [0 0 0]}%
- goto file{\the\filename.pdf} name{\pdfxrefdest}%
- \else
- \startlink attr{/Border [0 0 0]}%
- goto name{\pdfmkpgn{\pdfxrefdest}}%
- \fi
- }%
- \linkcolor
- \fi
- %
- % Float references are printed completely differently: "Figure 1.2"
- % instead of "[somenode], p.3". We distinguish them by the
- % LABEL-title being set to a magic string.
- {%
- % Have to otherify everything special to allow the \csname to
- % include an _ in the xref name, etc.
- \indexnofonts
- \turnoffactive
- \expandafter\global\expandafter\let\expandafter\Xthisreftitle
- \csname XR#1-title\endcsname
- }%
- \iffloat\Xthisreftitle
- % If the user specified the print name (third arg) to the ref,
- % print it instead of our usual "Figure 1.2".
- \ifdim\wd0 = 0pt
- \refx{#1-snt}{}%
- \else
- \printedrefname
- \fi
- %
- % if the user also gave the printed manual name (fifth arg), append
- % "in MANUALNAME".
- \ifdim \wd1 > 0pt
- \space \putwordin{} \cite{\printedmanual}%
- \fi
- \else
- % node/anchor (non-float) references.
- %
- % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
- % insert empty discretionaries after hyphens, which means that it will
- % not find a line break at a hyphen in a node names. Since some manuals
- % are best written with fairly long node names, containing hyphens, this
- % is a loss. Therefore, we give the text of the node name again, so it
- % is as if TeX is seeing it for the first time.
- \ifdim \wd1 > 0pt
- \putwordsection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
- \else
- % _ (for example) has to be the character _ for the purposes of the
- % control sequence corresponding to the node, but it has to expand
- % into the usual \leavevmode...\vrule stuff for purposes of
- % printing. So we \turnoffactive for the \refx-snt, back on for the
- % printing, back off for the \refx-pg.
- {\turnoffactive
- % Only output a following space if the -snt ref is nonempty; for
- % @unnumbered and @anchor, it won't be.
- \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
- \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
- }%
- % output the `[mynode]' via a macro so it can be overridden.
- \xrefprintnodename\printedrefname
- %
- % But we always want a comma and a space:
- ,\space
- %
- % output the `page 3'.
- \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
- \fi
- \fi
- \endlink
-\endgroup}
-
-% This macro is called from \xrefX for the `[nodename]' part of xref
-% output. It's a separate macro only so it can be changed more easily,
-% since square brackets don't work well in some documents. Particularly
-% one that Bob is working on :).
-%
-\def\xrefprintnodename#1{[#1]}
-
-% Things referred to by \setref.
-%
-\def\Ynothing{}
-\def\Yomitfromtoc{}
-\def\Ynumbered{%
- \ifnum\secno=0
- \putwordChapter at tie \the\chapno
- \else \ifnum\subsecno=0
- \putwordSection at tie \the\chapno.\the\secno
- \else \ifnum\subsubsecno=0
- \putwordSection at tie \the\chapno.\the\secno.\the\subsecno
- \else
- \putwordSection at tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
- \fi\fi\fi
-}
-\def\Yappendix{%
- \ifnum\secno=0
- \putwordAppendix at tie @char\the\appendixno{}%
- \else \ifnum\subsecno=0
- \putwordSection at tie @char\the\appendixno.\the\secno
- \else \ifnum\subsubsecno=0
- \putwordSection at tie @char\the\appendixno.\the\secno.\the\subsecno
- \else
- \putwordSection at tie
- @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
- \fi\fi\fi
-}
-
-% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
-% If its value is nonempty, SUFFIX is output afterward.
-%
-\def\refx#1#2{%
- {%
- \indexnofonts
- \otherbackslash
- \expandafter\global\expandafter\let\expandafter\thisrefX
- \csname XR#1\endcsname
- }%
- \ifx\thisrefX\relax
- % If not defined, say something at least.
- \angleleft un\-de\-fined\angleright
- \iflinks
- \ifhavexrefs
- \message{\linenumber Undefined cross reference `#1'.}%
- \else
- \ifwarnedxrefs\else
- \global\warnedxrefstrue
- \message{Cross reference values unknown; you must run TeX again.}%
- \fi
- \fi
- \fi
- \else
- % It's defined, so just use it.
- \thisrefX
- \fi
- #2% Output the suffix in any case.
-}
-
-% This is the macro invoked by entries in the aux file. Usually it's
-% just a \def (we prepend XR to the control sequence name to avoid
-% collisions). But if this is a float type, we have more work to do.
-%
-\def\xrdef#1#2{%
- {% The node name might contain 8-bit characters, which in our current
- % implementation are changed to commands like @'e. Don't let these
- % mess up the control sequence name.
- \indexnofonts
- \turnoffactive
- \xdef\safexrefname{#1}%
- }%
- %
- \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
- %
- % Was that xref control sequence that we just defined for a float?
- \expandafter\iffloat\csname XR\safexrefname\endcsname
- % it was a float, and we have the (safe) float type in \iffloattype.
- \expandafter\let\expandafter\floatlist
- \csname floatlist\iffloattype\endcsname
- %
- % Is this the first time we've seen this float type?
- \expandafter\ifx\floatlist\relax
- \toks0 = {\do}% yes, so just \do
- \else
- % had it before, so preserve previous elements in list.
- \toks0 = \expandafter{\floatlist\do}%
- \fi
- %
- % Remember this xref in the control sequence \floatlistFLOATTYPE,
- % for later use in \listoffloats.
- \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
- {\safexrefname}}%
- \fi
-}
-
-% Read the last existing aux file, if any. No error if none exists.
-%
-\def\tryauxfile{%
- \openin 1 \jobname.aux
- \ifeof 1 \else
- \readdatafile{aux}%
- \global\havexrefstrue
- \fi
- \closein 1
-}
-
-\def\setupdatafile{%
- \catcode`\^^@=\other
- \catcode`\^^A=\other
- \catcode`\^^B=\other
- \catcode`\^^C=\other
- \catcode`\^^D=\other
- \catcode`\^^E=\other
- \catcode`\^^F=\other
- \catcode`\^^G=\other
- \catcode`\^^H=\other
- \catcode`\^^K=\other
- \catcode`\^^L=\other
- \catcode`\^^N=\other
- \catcode`\^^P=\other
- \catcode`\^^Q=\other
- \catcode`\^^R=\other
- \catcode`\^^S=\other
- \catcode`\^^T=\other
- \catcode`\^^U=\other
- \catcode`\^^V=\other
- \catcode`\^^W=\other
- \catcode`\^^X=\other
- \catcode`\^^Z=\other
- \catcode`\^^[=\other
- \catcode`\^^\=\other
- \catcode`\^^]=\other
- \catcode`\^^^=\other
- \catcode`\^^_=\other
- % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
- % in xref tags, i.e., node names. But since ^^e4 notation isn't
- % supported in the main text, it doesn't seem desirable. Furthermore,
- % that is not enough: for node names that actually contain a ^
- % character, we would end up writing a line like this: 'xrdef {'hat
- % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
- % argument, and \hat is not an expandable control sequence. It could
- % all be worked out, but why? Either we support ^^ or we don't.
- %
- % The other change necessary for this was to define \auxhat:
- % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
- % and then to call \auxhat in \setq.
- %
- \catcode`\^=\other
- %
- % Special characters. Should be turned off anyway, but...
- \catcode`\~=\other
- \catcode`\[=\other
- \catcode`\]=\other
- \catcode`\"=\other
- \catcode`\_=\other
- \catcode`\|=\other
- \catcode`\<=\other
- \catcode`\>=\other
- \catcode`\$=\other
- \catcode`\#=\other
- \catcode`\&=\other
- \catcode`\%=\other
- \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
- %
- % This is to support \ in node names and titles, since the \
- % characters end up in a \csname. It's easier than
- % leaving it active and making its active definition an actual \
- % character. What I don't understand is why it works in the *value*
- % of the xrdef. Seems like it should be a catcode12 \, and that
- % should not typeset properly. But it works, so I'm moving on for
- % now. --karl, 15jan04.
- \catcode`\\=\other
- %
- % Make the characters 128-255 be printing characters.
- {%
- \count1=128
- \def\loop{%
- \catcode\count1=\other
- \advance\count1 by 1
- \ifnum \count1<256 \loop \fi
- }%
- }%
- %
- % @ is our escape character in .aux files, and we need braces.
- \catcode`\{=1
- \catcode`\}=2
- \catcode`\@=0
-}
-
-\def\readdatafile#1{%
-\begingroup
- \setupdatafile
- \input\jobname.#1
-\endgroup}
-
-
-\message{insertions,}
-% including footnotes.
-
-\newcount \footnoteno
-
-% The trailing space in the following definition for supereject is
-% vital for proper filling; pages come out unaligned when you do a
-% pagealignmacro call if that space before the closing brace is
-% removed. (Generally, numeric constants should always be followed by a
-% space to prevent strange expansion errors.)
-\def\supereject{\par\penalty -20000\footnoteno =0 }
-
-% @footnotestyle is meaningful for info output only.
-\let\footnotestyle=\comment
-
-{\catcode `\@=11
-%
-% Auto-number footnotes. Otherwise like plain.
-\gdef\footnote{%
- \let\indent=\ptexindent
- \let\noindent=\ptexnoindent
- \global\advance\footnoteno by \@ne
- \edef\thisfootno{$^{\the\footnoteno}$}%
- %
- % In case the footnote comes at the end of a sentence, preserve the
- % extra spacing after we do the footnote number.
- \let\@sf\empty
- \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
- %
- % Remove inadvertent blank space before typesetting the footnote number.
- \unskip
- \thisfootno\@sf
- \dofootnote
-}%
-
-% Don't bother with the trickery in plain.tex to not require the
-% footnote text as a parameter. Our footnotes don't need to be so general.
-%
-% Oh yes, they do; otherwise, @ifset (and anything else that uses
-% \parseargline) fails inside footnotes because the tokens are fixed when
-% the footnote is read. --karl, 16nov96.
-%
-\gdef\dofootnote{%
- \insert\footins\bgroup
- % We want to typeset this text as a normal paragraph, even if the
- % footnote reference occurs in (for example) a display environment.
- % So reset some parameters.
- \hsize=\pagewidth
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\ht\strutbox % top baseline for broken footnotes
- \splitmaxdepth\dp\strutbox
- \floatingpenalty\@MM
- \leftskip\z at skip
- \rightskip\z at skip
- \spaceskip\z at skip
- \xspaceskip\z at skip
- \parindent\defaultparindent
- %
- \smallfonts \rm
- %
- % Because we use hanging indentation in footnotes, a @noindent appears
- % to exdent this text, so make it be a no-op. makeinfo does not use
- % hanging indentation so @noindent can still be needed within footnote
- % text after an @example or the like (not that this is good style).
- \let\noindent = \relax
- %
- % Hang the footnote text off the number. Use \everypar in case the
- % footnote extends for more than one paragraph.
- \everypar = {\hang}%
- \textindent{\thisfootno}%
- %
- % Don't crash into the line above the footnote text. Since this
- % expands into a box, it must come within the paragraph, lest it
- % provide a place where TeX can split the footnote.
- \footstrut
- \futurelet\next\fo at t
-}
-}%end \catcode `\@=11
-
-% In case a @footnote appears in a vbox, save the footnote text and create
-% the real \insert just after the vbox finished. Otherwise, the insertion
-% would be lost.
-% Similarily, if a @footnote appears inside an alignment, save the footnote
-% text to a box and make the \insert when a row of the table is finished.
-% And the same can be done for other insert classes. --kasal, 16nov03.
-
-% Replace the \insert primitive by a cheating macro.
-% Deeper inside, just make sure that the saved insertions are not spilled
-% out prematurely.
-%
-\def\startsavinginserts{%
- \ifx \insert\ptexinsert
- \let\insert\saveinsert
- \else
- \let\checkinserts\relax
- \fi
-}
-
-% This \insert replacement works for both \insert\footins{foo} and
-% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
-%
-\def\saveinsert#1{%
- \edef\next{\noexpand\savetobox \makeSAVEname#1}%
- \afterassignment\next
- % swallow the left brace
- \let\temp =
-}
-\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
-\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
-
-\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
-
-\def\placesaveins#1{%
- \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
- {\box#1}%
-}
-
-% eat @SAVE -- beware, all of them have catcode \other:
-{
- \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
- \gdef\gobblesave @SAVE{}
-}
-
-% initialization:
-\def\newsaveins #1{%
- \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
- \next
-}
-\def\newsaveinsX #1{%
- \csname newbox\endcsname #1%
- \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
- \checksaveins #1}%
-}
-
-% initialize:
-\let\checkinserts\empty
-\newsaveins\footins
-\newsaveins\margin
-
-
-% @image. We use the macros from epsf.tex to support this.
-% If epsf.tex is not installed and @image is used, we complain.
-%
-% Check for and read epsf.tex up front. If we read it only at @image
-% time, we might be inside a group, and then its definitions would get
-% undone and the next image would fail.
-\openin 1 = epsf.tex
-\ifeof 1 \else
- % Do not bother showing banner with epsf.tex v2.7k (available in
- % doc/epsf.tex and on ctan).
- \def\epsfannounce{\toks0 = }%
- \input epsf.tex
-\fi
-\closein 1
-%
-% We will only complain once about lack of epsf.tex.
-\newif\ifwarnednoepsf
-\newhelp\noepsfhelp{epsf.tex must be installed for images to
- work. It is also included in the Texinfo distribution, or you can get
- it from ftp://tug.org/tex/epsf.tex.}
-%
-\def\image#1{%
- \ifx\epsfbox\undefined
- \ifwarnednoepsf \else
- \errhelp = \noepsfhelp
- \errmessage{epsf.tex not found, images will be ignored}%
- \global\warnednoepsftrue
- \fi
- \else
- \imagexxx #1,,,,,\finish
- \fi
-}
-%
-% Arguments to @image:
-% #1 is (mandatory) image filename; we tack on .eps extension.
-% #2 is (optional) width, #3 is (optional) height.
-% #4 is (ignored optional) html alt text.
-% #5 is (ignored optional) extension.
-% #6 is just the usual extra ignored arg for parsing this stuff.
-\newif\ifimagevmode
-\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
- \catcode`\^^M = 5 % in case we're inside an example
- \normalturnoffactive % allow _ et al. in names
- % If the image is by itself, center it.
- \ifvmode
- \imagevmodetrue
- \nobreak\bigskip
- % Usually we'll have text after the image which will insert
- % \parskip glue, so insert it here too to equalize the space
- % above and below.
- \nobreak\vskip\parskip
- \nobreak
- \line\bgroup
- \fi
- %
- % Output the image.
- \ifpdf
- \dopdfimage{#1}{#2}{#3}%
- \else
- % \epsfbox itself resets \epsf?size at each figure.
- \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
- \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
- \epsfbox{#1.eps}%
- \fi
- %
- \ifimagevmode \egroup \bigbreak \fi % space after the image
-\endgroup}
-
-
-% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
-% etc. We don't actually implement floating yet, we always include the
-% float "here". But it seemed the best name for the future.
-%
-\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
-
-% There may be a space before second and/or third parameter; delete it.
-\def\eatcommaspace#1, {#1,}
-
-% #1 is the optional FLOATTYPE, the text label for this float, typically
-% "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
-% this float will not be numbered and cannot be referred to.
-%
-% #2 is the optional xref label. Also must be present for the float to
-% be referable.
-%
-% #3 is the optional positioning argument; for now, it is ignored. It
-% will somehow specify the positions allowed to float to (here, top, bottom).
-%
-% We keep a separate counter for each FLOATTYPE, which we reset at each
-% chapter-level command.
-\let\resetallfloatnos=\empty
-%
-\def\dofloat#1,#2,#3,#4\finish{%
- \let\thiscaption=\empty
- \let\thisshortcaption=\empty
- %
- % don't lose footnotes inside @float.
- %
- % BEWARE: when the floats start float, we have to issue warning whenever an
- % insert appears inside a float which could possibly float. --kasal, 26may04
- %
- \startsavinginserts
- %
- % We can't be used inside a paragraph.
- \par
- %
- \vtop\bgroup
- \def\floattype{#1}%
- \def\floatlabel{#2}%
- \def\floatloc{#3}% we do nothing with this yet.
- %
- \ifx\floattype\empty
- \let\safefloattype=\empty
- \else
- {%
- % the floattype might have accents or other special characters,
- % but we need to use it in a control sequence name.
- \indexnofonts
- \turnoffactive
- \xdef\safefloattype{\floattype}%
- }%
- \fi
- %
- % If label is given but no type, we handle that as the empty type.
- \ifx\floatlabel\empty \else
- % We want each FLOATTYPE to be numbered separately (Figure 1,
- % Table 1, Figure 2, ...). (And if no label, no number.)
- %
- \expandafter\getfloatno\csname\safefloattype floatno\endcsname
- \global\advance\floatno by 1
- %
- {%
- % This magic value for \thissection is output by \setref as the
- % XREFLABEL-title value. \xrefX uses it to distinguish float
- % labels (which have a completely different output format) from
- % node and anchor labels. And \xrdef uses it to construct the
- % lists of floats.
- %
- \edef\thissection{\floatmagic=\safefloattype}%
- \setref{\floatlabel}{Yfloat}%
- }%
- \fi
- %
- % start with \parskip glue, I guess.
- \vskip\parskip
- %
- % Don't suppress indentation if a float happens to start a section.
- \restorefirstparagraphindent
-}
-
-% we have these possibilities:
-% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
-% @float Foo,lbl & no caption: Foo 1.1
-% @float Foo & @caption{Cap}: Foo: Cap
-% @float Foo & no caption: Foo
-% @float ,lbl & Caption{Cap}: 1.1: Cap
-% @float ,lbl & no caption: 1.1
-% @float & @caption{Cap}: Cap
-% @float & no caption:
-%
-\def\Efloat{%
- \let\floatident = \empty
- %
- % In all cases, if we have a float type, it comes first.
- \ifx\floattype\empty \else \def\floatident{\floattype}\fi
- %
- % If we have an xref label, the number comes next.
- \ifx\floatlabel\empty \else
- \ifx\floattype\empty \else % if also had float type, need tie first.
- \appendtomacro\floatident{\tie}%
- \fi
- % the number.
- \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
- \fi
- %
- % Start the printed caption with what we've constructed in
- % \floatident, but keep it separate; we need \floatident again.
- \let\captionline = \floatident
- %
- \ifx\thiscaption\empty \else
- \ifx\floatident\empty \else
- \appendtomacro\captionline{: }% had ident, so need a colon between
- \fi
- %
- % caption text.
- \appendtomacro\captionline{\scanexp\thiscaption}%
- \fi
- %
- % If we have anything to print, print it, with space before.
- % Eventually this needs to become an \insert.
- \ifx\captionline\empty \else
- \vskip.5\parskip
- \captionline
- %
- % Space below caption.
- \vskip\parskip
- \fi
- %
- % If have an xref label, write the list of floats info. Do this
- % after the caption, to avoid chance of it being a breakpoint.
- \ifx\floatlabel\empty \else
- % Write the text that goes in the lof to the aux file as
- % \floatlabel-lof. Besides \floatident, we include the short
- % caption if specified, else the full caption if specified, else nothing.
- {%
- \atdummies
- %
- % since we read the caption text in the macro world, where ^^M
- % is turned into a normal character, we have to scan it back, so
- % we don't write the literal three characters "^^M" into the aux file.
- \scanexp{%
- \xdef\noexpand\gtemp{%
- \ifx\thisshortcaption\empty
- \thiscaption
- \else
- \thisshortcaption
- \fi
- }%
- }%
- \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
- \ifx\gtemp\empty \else : \gtemp \fi}}%
- }%
- \fi
- \egroup % end of \vtop
- %
- % place the captured inserts
- %
- % BEWARE: when the floats start floating, we have to issue warning
- % whenever an insert appears inside a float which could possibly
- % float. --kasal, 26may04
- %
- \checkinserts
-}
-
-% Append the tokens #2 to the definition of macro #1, not expanding either.
-%
-\def\appendtomacro#1#2{%
- \expandafter\def\expandafter#1\expandafter{#1#2}%
-}
-
-% @caption, @shortcaption
-%
-\def\caption{\docaption\thiscaption}
-\def\shortcaption{\docaption\thisshortcaption}
-\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
-\def\defcaption#1#2{\egroup \def#1{#2}}
-
-% The parameter is the control sequence identifying the counter we are
-% going to use. Create it if it doesn't exist and assign it to \floatno.
-\def\getfloatno#1{%
- \ifx#1\relax
- % Haven't seen this figure type before.
- \csname newcount\endcsname #1%
- %
- % Remember to reset this floatno at the next chap.
- \expandafter\gdef\expandafter\resetallfloatnos
- \expandafter{\resetallfloatnos #1=0 }%
- \fi
- \let\floatno#1%
-}
-
-% \setref calls this to get the XREFLABEL-snt value. We want an @xref
-% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
-% first read the @float command.
-%
-\def\Yfloat{\floattype at tie \chaplevelprefix\the\floatno}%
-
-% Magic string used for the XREFLABEL-title value, so \xrefX can
-% distinguish floats from other xref types.
-\def\floatmagic{!!float!!}
-
-% #1 is the control sequence we are passed; we expand into a conditional
-% which is true if #1 represents a float ref. That is, the magic
-% \thissection value which we \setref above.
-%
-\def\iffloat#1{\expandafter\doiffloat#1==\finish}
-%
-% #1 is (maybe) the \floatmagic string. If so, #2 will be the
-% (safe) float type for this float. We set \iffloattype to #2.
-%
-\def\doiffloat#1=#2=#3\finish{%
- \def\temp{#1}%
- \def\iffloattype{#2}%
- \ifx\temp\floatmagic
-}
-
-% @listoffloats FLOATTYPE - print a list of floats like a table of contents.
-%
-\parseargdef\listoffloats{%
- \def\floattype{#1}% floattype
- {%
- % the floattype might have accents or other special characters,
- % but we need to use it in a control sequence name.
- \indexnofonts
- \turnoffactive
- \xdef\safefloattype{\floattype}%
- }%
- %
- % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
- \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
- \ifhavexrefs
- % if the user said @listoffloats foo but never @float foo.
- \message{\linenumber No `\safefloattype' floats to list.}%
- \fi
- \else
- \begingroup
- \leftskip=\tocindent % indent these entries like a toc
- \let\do=\listoffloatsdo
- \csname floatlist\safefloattype\endcsname
- \endgroup
- \fi
-}
-
-% This is called on each entry in a list of floats. We're passed the
-% xref label, in the form LABEL-title, which is how we save it in the
-% aux file. We strip off the -title and look up \XRLABEL-lof, which
-% has the text we're supposed to typeset here.
-%
-% Figures without xref labels will not be included in the list (since
-% they won't appear in the aux file).
-%
-\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
-\def\listoffloatsdoentry#1-title\finish{{%
- % Can't fully expand XR#1-lof because it can contain anything. Just
- % pass the control sequence. On the other hand, XR#1-pg is just the
- % page number, and we want to fully expand that so we can get a link
- % in pdf output.
- \toksA = \expandafter{\csname XR#1-lof\endcsname}%
- %
- % use the same \entry macro we use to generate the TOC and index.
- \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
- \writeentry
-}}
-
-
-\message{localization,}
-
-% @documentlanguage is usually given very early, just after
-% @setfilename. If done too late, it may not override everything
-% properly. Single argument is the language abbreviation.
-% It would be nice if we could set up a hyphenation file here.
-%
-\parseargdef\documentlanguage{%
- \tex % read txi-??.tex file in plain TeX.
- % Read the file if it exists.
- \openin 1 txi-#1.tex
- \ifeof 1
- \errhelp = \nolanghelp
- \errmessage{Cannot read language file txi-#1.tex}%
- \else
- \input txi-#1.tex
- \fi
- \closein 1
- \endgroup
-}
-\newhelp\nolanghelp{The given language definition file cannot be found or
-is empty. Maybe you need to install it? In the current directory
-should work if nowhere else does.}
-
-% Set the catcode of characters 128 through 255 to the specified number.
-%
-\def\setnonasciicharscatcode#1{%
- \count255=128
- \loop\ifnum\count255<256
- \global\catcode\count255=#1
- \advance\count255 by 1
- \repeat
-}
-
-% @documentencoding sets the definition of non-ASCII characters
-% according to the specified encoding.
-%
-\parseargdef\documentencoding{%
- % Encoding being declared for the document.
- \def\declaredencoding{\csname #1.enc\endcsname}%
- %
- % Supported encodings: names converted to tokens in order to be able
- % to compare them with \ifx.
- \def\ascii{\csname US-ASCII.enc\endcsname}%
- \def\latnine{\csname ISO-8859-15.enc\endcsname}%
- \def\latone{\csname ISO-8859-1.enc\endcsname}%
- \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
- \def\utfeight{\csname UTF-8.enc\endcsname}%
- %
- \ifx \declaredencoding \ascii
- \asciichardefs
- %
- \else \ifx \declaredencoding \lattwo
- \setnonasciicharscatcode\active
- \lattwochardefs
- %
- \else \ifx \declaredencoding \latone
- \setnonasciicharscatcode\active
- \latonechardefs
- %
- \else \ifx \declaredencoding \latnine
- \setnonasciicharscatcode\active
- \latninechardefs
- %
- \else \ifx \declaredencoding \utfeight
- \setnonasciicharscatcode\active
- \utfeightchardefs
- %
- \else
- \message{Unknown document encoding #1, ignoring.}%
- %
- \fi % utfeight
- \fi % latnine
- \fi % latone
- \fi % lattwo
- \fi % ascii
-}
-
-% A message to be logged when using a character that isn't available
-% the default font encoding (OT1).
-%
-\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
-
-% Take account of \c (plain) vs. \, (Texinfo) difference.
-\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
-
-% First, make active non-ASCII characters in order for them to be
-% correctly categorized when TeX reads the replacement text of
-% macros containing the character definitions.
-\setnonasciicharscatcode\active
-%
-% Latin1 (ISO-8859-1) character definitions.
-\def\latonechardefs{%
- \gdef^^a0{~}
- \gdef^^a1{\exclamdown}
- \gdef^^a2{\missingcharmsg{CENT SIGN}}
- \gdef^^a3{{\pounds}}
- \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
- \gdef^^a5{\missingcharmsg{YEN SIGN}}
- \gdef^^a6{\missingcharmsg{BROKEN BAR}}
- \gdef^^a7{\S}
- \gdef^^a8{\"{}}
- \gdef^^a9{\copyright}
- \gdef^^aa{\ordf}
- \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}}
- \gdef^^ac{$\lnot$}
- \gdef^^ad{\-}
- \gdef^^ae{\registeredsymbol}
- \gdef^^af{\={}}
- %
- \gdef^^b0{\textdegree}
- \gdef^^b1{$\pm$}
- \gdef^^b2{$^2$}
- \gdef^^b3{$^3$}
- \gdef^^b4{\'{}}
- \gdef^^b5{$\mu$}
- \gdef^^b6{\P}
- %
- \gdef^^b7{$^.$}
- \gdef^^b8{\cedilla\ }
- \gdef^^b9{$^1$}
- \gdef^^ba{\ordm}
- %
- \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
- \gdef^^bc{$1\over4$}
- \gdef^^bd{$1\over2$}
- \gdef^^be{$3\over4$}
- \gdef^^bf{\questiondown}
- %
- \gdef^^c0{\`A}
- \gdef^^c1{\'A}
- \gdef^^c2{\^A}
- \gdef^^c3{\~A}
- \gdef^^c4{\"A}
- \gdef^^c5{\ringaccent A}
- \gdef^^c6{\AE}
- \gdef^^c7{\cedilla C}
- \gdef^^c8{\`E}
- \gdef^^c9{\'E}
- \gdef^^ca{\^E}
- \gdef^^cb{\"E}
- \gdef^^cc{\`I}
- \gdef^^cd{\'I}
- \gdef^^ce{\^I}
- \gdef^^cf{\"I}
- %
- \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}}
- \gdef^^d1{\~N}
- \gdef^^d2{\`O}
- \gdef^^d3{\'O}
- \gdef^^d4{\^O}
- \gdef^^d5{\~O}
- \gdef^^d6{\"O}
- \gdef^^d7{$\times$}
- \gdef^^d8{\O}
- \gdef^^d9{\`U}
- \gdef^^da{\'U}
- \gdef^^db{\^U}
- \gdef^^dc{\"U}
- \gdef^^dd{\'Y}
- \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}}
- \gdef^^df{\ss}
- %
- \gdef^^e0{\`a}
- \gdef^^e1{\'a}
- \gdef^^e2{\^a}
- \gdef^^e3{\~a}
- \gdef^^e4{\"a}
- \gdef^^e5{\ringaccent a}
- \gdef^^e6{\ae}
- \gdef^^e7{\cedilla c}
- \gdef^^e8{\`e}
- \gdef^^e9{\'e}
- \gdef^^ea{\^e}
- \gdef^^eb{\"e}
- \gdef^^ec{\`{\dotless i}}
- \gdef^^ed{\'{\dotless i}}
- \gdef^^ee{\^{\dotless i}}
- \gdef^^ef{\"{\dotless i}}
- %
- \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}}
- \gdef^^f1{\~n}
- \gdef^^f2{\`o}
- \gdef^^f3{\'o}
- \gdef^^f4{\^o}
- \gdef^^f5{\~o}
- \gdef^^f6{\"o}
- \gdef^^f7{$\div$}
- \gdef^^f8{\o}
- \gdef^^f9{\`u}
- \gdef^^fa{\'u}
- \gdef^^fb{\^u}
- \gdef^^fc{\"u}
- \gdef^^fd{\'y}
- \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}}
- \gdef^^ff{\"y}
-}
-
-% Latin9 (ISO-8859-15) encoding character definitions.
-\def\latninechardefs{%
- % Encoding is almost identical to Latin1.
- \latonechardefs
- %
- \gdef^^a4{\euro}
- \gdef^^a6{\v S}
- \gdef^^a8{\v s}
- \gdef^^b4{\v Z}
- \gdef^^b8{\v z}
- \gdef^^bc{\OE}
- \gdef^^bd{\oe}
- \gdef^^be{\"Y}
-}
-
-% Latin2 (ISO-8859-2) character definitions.
-\def\lattwochardefs{%
- \gdef^^a0{~}
- \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}}
- \gdef^^a2{\u{}}
- \gdef^^a3{\L}
- \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
- \gdef^^a5{\v L}
- \gdef^^a6{\'S}
- \gdef^^a7{\S}
- \gdef^^a8{\"{}}
- \gdef^^a9{\v S}
- \gdef^^aa{\cedilla S}
- \gdef^^ab{\v T}
- \gdef^^ac{\'Z}
- \gdef^^ad{\-}
- \gdef^^ae{\v Z}
- \gdef^^af{\dotaccent Z}
- %
- \gdef^^b0{\textdegree}
- \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}}
- \gdef^^b2{\missingcharmsg{OGONEK}}
- \gdef^^b3{\l}
- \gdef^^b4{\'{}}
- \gdef^^b5{\v l}
- \gdef^^b6{\'s}
- \gdef^^b7{\v{}}
- \gdef^^b8{\cedilla\ }
- \gdef^^b9{\v s}
- \gdef^^ba{\cedilla s}
- \gdef^^bb{\v t}
- \gdef^^bc{\'z}
- \gdef^^bd{\H{}}
- \gdef^^be{\v z}
- \gdef^^bf{\dotaccent z}
- %
- \gdef^^c0{\'R}
- \gdef^^c1{\'A}
- \gdef^^c2{\^A}
- \gdef^^c3{\u A}
- \gdef^^c4{\"A}
- \gdef^^c5{\'L}
- \gdef^^c6{\'C}
- \gdef^^c7{\cedilla C}
- \gdef^^c8{\v C}
- \gdef^^c9{\'E}
- \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}}
- \gdef^^cb{\"E}
- \gdef^^cc{\v E}
- \gdef^^cd{\'I}
- \gdef^^ce{\^I}
- \gdef^^cf{\v D}
- %
- \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
- \gdef^^d1{\'N}
- \gdef^^d2{\v N}
- \gdef^^d3{\'O}
- \gdef^^d4{\^O}
- \gdef^^d5{\H O}
- \gdef^^d6{\"O}
- \gdef^^d7{$\times$}
- \gdef^^d8{\v R}
- \gdef^^d9{\ringaccent U}
- \gdef^^da{\'U}
- \gdef^^db{\H U}
- \gdef^^dc{\"U}
- \gdef^^dd{\'Y}
- \gdef^^de{\cedilla T}
- \gdef^^df{\ss}
- %
- \gdef^^e0{\'r}
- \gdef^^e1{\'a}
- \gdef^^e2{\^a}
- \gdef^^e3{\u a}
- \gdef^^e4{\"a}
- \gdef^^e5{\'l}
- \gdef^^e6{\'c}
- \gdef^^e7{\cedilla c}
- \gdef^^e8{\v c}
- \gdef^^e9{\'e}
- \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}}
- \gdef^^eb{\"e}
- \gdef^^ec{\v e}
- \gdef^^ed{\'\i}
- \gdef^^ee{\^\i}
- \gdef^^ef{\v d}
- %
- \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
- \gdef^^f1{\'n}
- \gdef^^f2{\v n}
- \gdef^^f3{\'o}
- \gdef^^f4{\^o}
- \gdef^^f5{\H o}
- \gdef^^f6{\"o}
- \gdef^^f7{$\div$}
- \gdef^^f8{\v r}
- \gdef^^f9{\ringaccent u}
- \gdef^^fa{\'u}
- \gdef^^fb{\H u}
- \gdef^^fc{\"u}
- \gdef^^fd{\'y}
- \gdef^^fe{\cedilla t}
- \gdef^^ff{\dotaccent{}}
-}
-
-% UTF-8 character definitions.
-%
-% This code to support UTF-8 is based on LaTeX's utf8.def, with some
-% changes for Texinfo conventions. It is included here under the GPL by
-% permission from Frank Mittelbach and the LaTeX team.
-%
-\newcount\countUTFx
-\newcount\countUTFy
-\newcount\countUTFz
-
-\gdef\UTFviiiTwoOctets#1#2{\expandafter
- \UTFviiiDefined\csname u8:#1\string #2\endcsname}
-%
-\gdef\UTFviiiThreeOctets#1#2#3{\expandafter
- \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
-%
-\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
- \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
-
-\gdef\UTFviiiDefined#1{%
- \ifx #1\relax
- \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
- \else
- \expandafter #1%
- \fi
-}
-
-\begingroup
- \catcode`\~13
- \catcode`\"12
-
- \def\UTFviiiLoop{%
- \global\catcode\countUTFx\active
- \uccode`\~\countUTFx
- \uppercase\expandafter{\UTFviiiTmp}%
- \advance\countUTFx by 1
- \ifnum\countUTFx < \countUTFy
- \expandafter\UTFviiiLoop
- \fi}
-
- \countUTFx = "C2
- \countUTFy = "E0
- \def\UTFviiiTmp{%
- \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
- \UTFviiiLoop
-
- \countUTFx = "E0
- \countUTFy = "F0
- \def\UTFviiiTmp{%
- \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
- \UTFviiiLoop
-
- \countUTFx = "F0
- \countUTFy = "F4
- \def\UTFviiiTmp{%
- \xdef~{\noexpand\UTFviiiFourOctets\string~}}
- \UTFviiiLoop
-\endgroup
-
-\begingroup
- \catcode`\"=12
- \catcode`\<=12
- \catcode`\.=12
- \catcode`\,=12
- \catcode`\;=12
- \catcode`\!=12
- \catcode`\~=13
-
- \gdef\DeclareUnicodeCharacter#1#2{%
- \countUTFz = "#1\relax
- \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
- \begingroup
- \parseXMLCharref
- \def\UTFviiiTwoOctets##1##2{%
- \csname u8:##1\string ##2\endcsname}%
- \def\UTFviiiThreeOctets##1##2##3{%
- \csname u8:##1\string ##2\string ##3\endcsname}%
- \def\UTFviiiFourOctets##1##2##3##4{%
- \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter
- \gdef\UTFviiiTmp{#2}%
- \endgroup}
-
- \gdef\parseXMLCharref{%
- \ifnum\countUTFz < "A0\relax
- \errhelp = \EMsimple
- \errmessage{Cannot define Unicode char value < 00A0}%
- \else\ifnum\countUTFz < "800\relax
- \parseUTFviiiA,%
- \parseUTFviiiB C\UTFviiiTwoOctets.,%
- \else\ifnum\countUTFz < "10000\relax
- \parseUTFviiiA;%
- \parseUTFviiiA,%
- \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
- \else
- \parseUTFviiiA;%
- \parseUTFviiiA,%
- \parseUTFviiiA!%
- \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
- \fi\fi\fi
- }
-
- \gdef\parseUTFviiiA#1{%
- \countUTFx = \countUTFz
- \divide\countUTFz by 64
- \countUTFy = \countUTFz
- \multiply\countUTFz by 64
- \advance\countUTFx by -\countUTFz
- \advance\countUTFx by 128
- \uccode `#1\countUTFx
- \countUTFz = \countUTFy}
-
- \gdef\parseUTFviiiB#1#2#3#4{%
- \advance\countUTFz by "#10\relax
- \uccode `#3\countUTFz
- \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
-\endgroup
-
-\def\utfeightchardefs{%
- \DeclareUnicodeCharacter{00A0}{\tie}
- \DeclareUnicodeCharacter{00A1}{\exclamdown}
- \DeclareUnicodeCharacter{00A3}{\pounds}
- \DeclareUnicodeCharacter{00A8}{\"{ }}
- \DeclareUnicodeCharacter{00A9}{\copyright}
- \DeclareUnicodeCharacter{00AA}{\ordf}
- \DeclareUnicodeCharacter{00AD}{\-}
- \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
- \DeclareUnicodeCharacter{00AF}{\={ }}
-
- \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
- \DeclareUnicodeCharacter{00B4}{\'{ }}
- \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
- \DeclareUnicodeCharacter{00BA}{\ordm}
- \DeclareUnicodeCharacter{00BF}{\questiondown}
-
- \DeclareUnicodeCharacter{00C0}{\`A}
- \DeclareUnicodeCharacter{00C1}{\'A}
- \DeclareUnicodeCharacter{00C2}{\^A}
- \DeclareUnicodeCharacter{00C3}{\~A}
- \DeclareUnicodeCharacter{00C4}{\"A}
- \DeclareUnicodeCharacter{00C5}{\AA}
- \DeclareUnicodeCharacter{00C6}{\AE}
- \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
- \DeclareUnicodeCharacter{00C8}{\`E}
- \DeclareUnicodeCharacter{00C9}{\'E}
- \DeclareUnicodeCharacter{00CA}{\^E}
- \DeclareUnicodeCharacter{00CB}{\"E}
- \DeclareUnicodeCharacter{00CC}{\`I}
- \DeclareUnicodeCharacter{00CD}{\'I}
- \DeclareUnicodeCharacter{00CE}{\^I}
- \DeclareUnicodeCharacter{00CF}{\"I}
-
- \DeclareUnicodeCharacter{00D1}{\~N}
- \DeclareUnicodeCharacter{00D2}{\`O}
- \DeclareUnicodeCharacter{00D3}{\'O}
- \DeclareUnicodeCharacter{00D4}{\^O}
- \DeclareUnicodeCharacter{00D5}{\~O}
- \DeclareUnicodeCharacter{00D6}{\"O}
- \DeclareUnicodeCharacter{00D8}{\O}
- \DeclareUnicodeCharacter{00D9}{\`U}
- \DeclareUnicodeCharacter{00DA}{\'U}
- \DeclareUnicodeCharacter{00DB}{\^U}
- \DeclareUnicodeCharacter{00DC}{\"U}
- \DeclareUnicodeCharacter{00DD}{\'Y}
- \DeclareUnicodeCharacter{00DF}{\ss}
-
- \DeclareUnicodeCharacter{00E0}{\`a}
- \DeclareUnicodeCharacter{00E1}{\'a}
- \DeclareUnicodeCharacter{00E2}{\^a}
- \DeclareUnicodeCharacter{00E3}{\~a}
- \DeclareUnicodeCharacter{00E4}{\"a}
- \DeclareUnicodeCharacter{00E5}{\aa}
- \DeclareUnicodeCharacter{00E6}{\ae}
- \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
- \DeclareUnicodeCharacter{00E8}{\`e}
- \DeclareUnicodeCharacter{00E9}{\'e}
- \DeclareUnicodeCharacter{00EA}{\^e}
- \DeclareUnicodeCharacter{00EB}{\"e}
- \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
- \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
- \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
- \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
-
- \DeclareUnicodeCharacter{00F1}{\~n}
- \DeclareUnicodeCharacter{00F2}{\`o}
- \DeclareUnicodeCharacter{00F3}{\'o}
- \DeclareUnicodeCharacter{00F4}{\^o}
- \DeclareUnicodeCharacter{00F5}{\~o}
- \DeclareUnicodeCharacter{00F6}{\"o}
- \DeclareUnicodeCharacter{00F8}{\o}
- \DeclareUnicodeCharacter{00F9}{\`u}
- \DeclareUnicodeCharacter{00FA}{\'u}
- \DeclareUnicodeCharacter{00FB}{\^u}
- \DeclareUnicodeCharacter{00FC}{\"u}
- \DeclareUnicodeCharacter{00FD}{\'y}
- \DeclareUnicodeCharacter{00FF}{\"y}
-
- \DeclareUnicodeCharacter{0100}{\=A}
- \DeclareUnicodeCharacter{0101}{\=a}
- \DeclareUnicodeCharacter{0102}{\u{A}}
- \DeclareUnicodeCharacter{0103}{\u{a}}
- \DeclareUnicodeCharacter{0106}{\'C}
- \DeclareUnicodeCharacter{0107}{\'c}
- \DeclareUnicodeCharacter{0108}{\^C}
- \DeclareUnicodeCharacter{0109}{\^c}
- \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
- \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
- \DeclareUnicodeCharacter{010C}{\v{C}}
- \DeclareUnicodeCharacter{010D}{\v{c}}
- \DeclareUnicodeCharacter{010E}{\v{D}}
-
- \DeclareUnicodeCharacter{0112}{\=E}
- \DeclareUnicodeCharacter{0113}{\=e}
- \DeclareUnicodeCharacter{0114}{\u{E}}
- \DeclareUnicodeCharacter{0115}{\u{e}}
- \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
- \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
- \DeclareUnicodeCharacter{011A}{\v{E}}
- \DeclareUnicodeCharacter{011B}{\v{e}}
- \DeclareUnicodeCharacter{011C}{\^G}
- \DeclareUnicodeCharacter{011D}{\^g}
- \DeclareUnicodeCharacter{011E}{\u{G}}
- \DeclareUnicodeCharacter{011F}{\u{g}}
-
- \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
- \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
- \DeclareUnicodeCharacter{0124}{\^H}
- \DeclareUnicodeCharacter{0125}{\^h}
- \DeclareUnicodeCharacter{0128}{\~I}
- \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
- \DeclareUnicodeCharacter{012A}{\=I}
- \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
- \DeclareUnicodeCharacter{012C}{\u{I}}
- \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
-
- \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
- \DeclareUnicodeCharacter{0131}{\dotless{i}}
- \DeclareUnicodeCharacter{0132}{IJ}
- \DeclareUnicodeCharacter{0133}{ij}
- \DeclareUnicodeCharacter{0134}{\^J}
- \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
- \DeclareUnicodeCharacter{0139}{\'L}
- \DeclareUnicodeCharacter{013A}{\'l}
-
- \DeclareUnicodeCharacter{0141}{\L}
- \DeclareUnicodeCharacter{0142}{\l}
- \DeclareUnicodeCharacter{0143}{\'N}
- \DeclareUnicodeCharacter{0144}{\'n}
- \DeclareUnicodeCharacter{0147}{\v{N}}
- \DeclareUnicodeCharacter{0148}{\v{n}}
- \DeclareUnicodeCharacter{014C}{\=O}
- \DeclareUnicodeCharacter{014D}{\=o}
- \DeclareUnicodeCharacter{014E}{\u{O}}
- \DeclareUnicodeCharacter{014F}{\u{o}}
-
- \DeclareUnicodeCharacter{0150}{\H{O}}
- \DeclareUnicodeCharacter{0151}{\H{o}}
- \DeclareUnicodeCharacter{0152}{\OE}
- \DeclareUnicodeCharacter{0153}{\oe}
- \DeclareUnicodeCharacter{0154}{\'R}
- \DeclareUnicodeCharacter{0155}{\'r}
- \DeclareUnicodeCharacter{0158}{\v{R}}
- \DeclareUnicodeCharacter{0159}{\v{r}}
- \DeclareUnicodeCharacter{015A}{\'S}
- \DeclareUnicodeCharacter{015B}{\'s}
- \DeclareUnicodeCharacter{015C}{\^S}
- \DeclareUnicodeCharacter{015D}{\^s}
- \DeclareUnicodeCharacter{015E}{\cedilla{S}}
- \DeclareUnicodeCharacter{015F}{\cedilla{s}}
-
- \DeclareUnicodeCharacter{0160}{\v{S}}
- \DeclareUnicodeCharacter{0161}{\v{s}}
- \DeclareUnicodeCharacter{0162}{\cedilla{t}}
- \DeclareUnicodeCharacter{0163}{\cedilla{T}}
- \DeclareUnicodeCharacter{0164}{\v{T}}
-
- \DeclareUnicodeCharacter{0168}{\~U}
- \DeclareUnicodeCharacter{0169}{\~u}
- \DeclareUnicodeCharacter{016A}{\=U}
- \DeclareUnicodeCharacter{016B}{\=u}
- \DeclareUnicodeCharacter{016C}{\u{U}}
- \DeclareUnicodeCharacter{016D}{\u{u}}
- \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
- \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
-
- \DeclareUnicodeCharacter{0170}{\H{U}}
- \DeclareUnicodeCharacter{0171}{\H{u}}
- \DeclareUnicodeCharacter{0174}{\^W}
- \DeclareUnicodeCharacter{0175}{\^w}
- \DeclareUnicodeCharacter{0176}{\^Y}
- \DeclareUnicodeCharacter{0177}{\^y}
- \DeclareUnicodeCharacter{0178}{\"Y}
- \DeclareUnicodeCharacter{0179}{\'Z}
- \DeclareUnicodeCharacter{017A}{\'z}
- \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
- \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
- \DeclareUnicodeCharacter{017D}{\v{Z}}
- \DeclareUnicodeCharacter{017E}{\v{z}}
-
- \DeclareUnicodeCharacter{01C4}{D\v{Z}}
- \DeclareUnicodeCharacter{01C5}{D\v{z}}
- \DeclareUnicodeCharacter{01C6}{d\v{z}}
- \DeclareUnicodeCharacter{01C7}{LJ}
- \DeclareUnicodeCharacter{01C8}{Lj}
- \DeclareUnicodeCharacter{01C9}{lj}
- \DeclareUnicodeCharacter{01CA}{NJ}
- \DeclareUnicodeCharacter{01CB}{Nj}
- \DeclareUnicodeCharacter{01CC}{nj}
- \DeclareUnicodeCharacter{01CD}{\v{A}}
- \DeclareUnicodeCharacter{01CE}{\v{a}}
- \DeclareUnicodeCharacter{01CF}{\v{I}}
-
- \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
- \DeclareUnicodeCharacter{01D1}{\v{O}}
- \DeclareUnicodeCharacter{01D2}{\v{o}}
- \DeclareUnicodeCharacter{01D3}{\v{U}}
- \DeclareUnicodeCharacter{01D4}{\v{u}}
-
- \DeclareUnicodeCharacter{01E2}{\={\AE}}
- \DeclareUnicodeCharacter{01E3}{\={\ae}}
- \DeclareUnicodeCharacter{01E6}{\v{G}}
- \DeclareUnicodeCharacter{01E7}{\v{g}}
- \DeclareUnicodeCharacter{01E8}{\v{K}}
- \DeclareUnicodeCharacter{01E9}{\v{k}}
-
- \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
- \DeclareUnicodeCharacter{01F1}{DZ}
- \DeclareUnicodeCharacter{01F2}{Dz}
- \DeclareUnicodeCharacter{01F3}{dz}
- \DeclareUnicodeCharacter{01F4}{\'G}
- \DeclareUnicodeCharacter{01F5}{\'g}
- \DeclareUnicodeCharacter{01F8}{\`N}
- \DeclareUnicodeCharacter{01F9}{\`n}
- \DeclareUnicodeCharacter{01FC}{\'{\AE}}
- \DeclareUnicodeCharacter{01FD}{\'{\ae}}
- \DeclareUnicodeCharacter{01FE}{\'{\O}}
- \DeclareUnicodeCharacter{01FF}{\'{\o}}
-
- \DeclareUnicodeCharacter{021E}{\v{H}}
- \DeclareUnicodeCharacter{021F}{\v{h}}
-
- \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
- \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
- \DeclareUnicodeCharacter{0228}{\cedilla{E}}
- \DeclareUnicodeCharacter{0229}{\cedilla{e}}
- \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
- \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
-
- \DeclareUnicodeCharacter{0232}{\=Y}
- \DeclareUnicodeCharacter{0233}{\=y}
- \DeclareUnicodeCharacter{0237}{\dotless{j}}
-
- \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
- \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
- \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
- \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
- \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
- \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
- \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
- \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
- \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
- \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
- \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
- \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
-
- \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
- \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
-
- \DeclareUnicodeCharacter{1E20}{\=G}
- \DeclareUnicodeCharacter{1E21}{\=g}
- \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
- \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
- \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
- \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
- \DeclareUnicodeCharacter{1E26}{\"H}
- \DeclareUnicodeCharacter{1E27}{\"h}
-
- \DeclareUnicodeCharacter{1E30}{\'K}
- \DeclareUnicodeCharacter{1E31}{\'k}
- \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
- \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
- \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
- \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
- \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
- \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
- \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
- \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
- \DeclareUnicodeCharacter{1E3E}{\'M}
- \DeclareUnicodeCharacter{1E3F}{\'m}
-
- \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
- \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
- \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
- \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
- \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
- \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
- \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
- \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
- \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
- \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
-
- \DeclareUnicodeCharacter{1E54}{\'P}
- \DeclareUnicodeCharacter{1E55}{\'p}
- \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
- \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
- \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
- \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
- \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
- \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
- \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
- \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
-
- \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
- \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
- \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
- \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
- \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
- \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
- \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
- \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
- \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
- \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
-
- \DeclareUnicodeCharacter{1E7C}{\~V}
- \DeclareUnicodeCharacter{1E7D}{\~v}
- \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
- \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
-
- \DeclareUnicodeCharacter{1E80}{\`W}
- \DeclareUnicodeCharacter{1E81}{\`w}
- \DeclareUnicodeCharacter{1E82}{\'W}
- \DeclareUnicodeCharacter{1E83}{\'w}
- \DeclareUnicodeCharacter{1E84}{\"W}
- \DeclareUnicodeCharacter{1E85}{\"w}
- \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
- \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
- \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
- \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
- \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
- \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
- \DeclareUnicodeCharacter{1E8C}{\"X}
- \DeclareUnicodeCharacter{1E8D}{\"x}
- \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
- \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
-
- \DeclareUnicodeCharacter{1E90}{\^Z}
- \DeclareUnicodeCharacter{1E91}{\^z}
- \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
- \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
- \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
- \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
- \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
- \DeclareUnicodeCharacter{1E97}{\"t}
- \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
- \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
-
- \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
- \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
-
- \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
- \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
- \DeclareUnicodeCharacter{1EBC}{\~E}
- \DeclareUnicodeCharacter{1EBD}{\~e}
-
- \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
- \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
- \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
- \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
-
- \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
- \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
-
- \DeclareUnicodeCharacter{1EF2}{\`Y}
- \DeclareUnicodeCharacter{1EF3}{\`y}
- \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
-
- \DeclareUnicodeCharacter{1EF8}{\~Y}
- \DeclareUnicodeCharacter{1EF9}{\~y}
-
- \DeclareUnicodeCharacter{2013}{--}
- \DeclareUnicodeCharacter{2014}{---}
- \DeclareUnicodeCharacter{2022}{\bullet}
- \DeclareUnicodeCharacter{2026}{\dots}
- \DeclareUnicodeCharacter{20AC}{\euro}
-
- \DeclareUnicodeCharacter{2192}{\expansion}
- \DeclareUnicodeCharacter{21D2}{\result}
-
- \DeclareUnicodeCharacter{2212}{\minus}
- \DeclareUnicodeCharacter{2217}{\point}
- \DeclareUnicodeCharacter{2261}{\equiv}
-}% end of \utfeightchardefs
-
-
-% US-ASCII character definitions.
-\def\asciichardefs{% nothing need be done
- \relax
-}
-
-% Make non-ASCII characters printable again for compatibility with
-% existing Texinfo documents that may use them, even without declaring a
-% document encoding.
-%
-\setnonasciicharscatcode \other
-
-
-\message{formatting,}
-
-\newdimen\defaultparindent \defaultparindent = 15pt
-
-\chapheadingskip = 15pt plus 4pt minus 2pt
-\secheadingskip = 12pt plus 3pt minus 2pt
-\subsecheadingskip = 9pt plus 2pt minus 2pt
-
-% Prevent underfull vbox error messages.
-\vbadness = 10000
-
-% Don't be so finicky about underfull hboxes, either.
-\hbadness = 2000
-
-% Following George Bush, just get rid of widows and orphans.
-\widowpenalty=10000
-\clubpenalty=10000
-
-% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
-% using an old version of TeX, don't do anything. We want the amount of
-% stretch added to depend on the line length, hence the dependence on
-% \hsize. We call this whenever the paper size is set.
-%
-\def\setemergencystretch{%
- \ifx\emergencystretch\thisisundefined
- % Allow us to assign to \emergencystretch anyway.
- \def\emergencystretch{\dimen0}%
- \else
- \emergencystretch = .15\hsize
- \fi
-}
-
-% Parameters in order: 1) textheight; 2) textwidth;
-% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
-% 7) physical page height; 8) physical page width.
-%
-% We also call \setleading{\textleading}, so the caller should define
-% \textleading. The caller should also set \parskip.
-%
-\def\internalpagesizes#1#2#3#4#5#6#7#8{%
- \voffset = #3\relax
- \topskip = #6\relax
- \splittopskip = \topskip
- %
- \vsize = #1\relax
- \advance\vsize by \topskip
- \outervsize = \vsize
- \advance\outervsize by 2\topandbottommargin
- \pageheight = \vsize
- %
- \hsize = #2\relax
- \outerhsize = \hsize
- \advance\outerhsize by 0.5in
- \pagewidth = \hsize
- %
- \normaloffset = #4\relax
- \bindingoffset = #5\relax
- %
- \ifpdf
- \pdfpageheight #7\relax
- \pdfpagewidth #8\relax
- \fi
- %
- \setleading{\textleading}
- %
- \parindent = \defaultparindent
- \setemergencystretch
-}
-
-% @letterpaper (the default).
-\def\letterpaper{{\globaldefs = 1
- \parskip = 3pt plus 2pt minus 1pt
- \textleading = 13.2pt
- %
- % If page is nothing but text, make it come out even.
- \internalpagesizes{46\baselineskip}{6in}%
- {\voffset}{.25in}%
- {\bindingoffset}{36pt}%
- {11in}{8.5in}%
-}}
-
-% Use @smallbook to reset parameters for 7x9.25 trim size.
-\def\smallbook{{\globaldefs = 1
- \parskip = 2pt plus 1pt
- \textleading = 12pt
- %
- \internalpagesizes{7.5in}{5in}%
- {-.2in}{0in}%
- {\bindingoffset}{16pt}%
- {9.25in}{7in}%
- %
- \lispnarrowing = 0.3in
- \tolerance = 700
- \hfuzz = 1pt
- \contentsrightmargin = 0pt
- \defbodyindent = .5cm
-}}
-
-% Use @smallerbook to reset parameters for 6x9 trim size.
-% (Just testing, parameters still in flux.)
-\def\smallerbook{{\globaldefs = 1
- \parskip = 1.5pt plus 1pt
- \textleading = 12pt
- %
- \internalpagesizes{7.4in}{4.8in}%
- {-.2in}{-.4in}%
- {0pt}{14pt}%
- {9in}{6in}%
- %
- \lispnarrowing = 0.25in
- \tolerance = 700
- \hfuzz = 1pt
- \contentsrightmargin = 0pt
- \defbodyindent = .4cm
-}}
-
-% Use @afourpaper to print on European A4 paper.
-\def\afourpaper{{\globaldefs = 1
- \parskip = 3pt plus 2pt minus 1pt
- \textleading = 13.2pt
- %
- % Double-side printing via postscript on Laserjet 4050
- % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
- % To change the settings for a different printer or situation, adjust
- % \normaloffset until the front-side and back-side texts align. Then
- % do the same for \bindingoffset. You can set these for testing in
- % your texinfo source file like this:
- % @tex
- % \global\normaloffset = -6mm
- % \global\bindingoffset = 10mm
- % @end tex
- \internalpagesizes{51\baselineskip}{160mm}
- {\voffset}{\hoffset}%
- {\bindingoffset}{44pt}%
- {297mm}{210mm}%
- %
- \tolerance = 700
- \hfuzz = 1pt
- \contentsrightmargin = 0pt
- \defbodyindent = 5mm
-}}
-
-% Use @afivepaper to print on European A5 paper.
-% From romildo at urano.iceb.ufop.br, 2 July 2000.
-% He also recommends making @example and @lisp be small.
-\def\afivepaper{{\globaldefs = 1
- \parskip = 2pt plus 1pt minus 0.1pt
- \textleading = 12.5pt
- %
- \internalpagesizes{160mm}{120mm}%
- {\voffset}{\hoffset}%
- {\bindingoffset}{8pt}%
- {210mm}{148mm}%
- %
- \lispnarrowing = 0.2in
- \tolerance = 800
- \hfuzz = 1.2pt
- \contentsrightmargin = 0pt
- \defbodyindent = 2mm
- \tableindent = 12mm
-}}
-
-% A specific text layout, 24x15cm overall, intended for A4 paper.
-\def\afourlatex{{\globaldefs = 1
- \afourpaper
- \internalpagesizes{237mm}{150mm}%
- {\voffset}{4.6mm}%
- {\bindingoffset}{7mm}%
- {297mm}{210mm}%
- %
- % Must explicitly reset to 0 because we call \afourpaper.
- \globaldefs = 0
-}}
-
-% Use @afourwide to print on A4 paper in landscape format.
-\def\afourwide{{\globaldefs = 1
- \afourpaper
- \internalpagesizes{241mm}{165mm}%
- {\voffset}{-2.95mm}%
- {\bindingoffset}{7mm}%
- {297mm}{210mm}%
- \globaldefs = 0
-}}
-
-% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
-% Perhaps we should allow setting the margins, \topskip, \parskip,
-% and/or leading, also. Or perhaps we should compute them somehow.
-%
-\parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
-\def\pagesizesyyy#1,#2,#3\finish{{%
- \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
- \globaldefs = 1
- %
- \parskip = 3pt plus 2pt minus 1pt
- \setleading{\textleading}%
- %
- \dimen0 = #1
- \advance\dimen0 by \voffset
- %
- \dimen2 = \hsize
- \advance\dimen2 by \normaloffset
- %
- \internalpagesizes{#1}{\hsize}%
- {\voffset}{\normaloffset}%
- {\bindingoffset}{44pt}%
- {\dimen0}{\dimen2}%
-}}
-
-% Set default to letter.
-%
-\letterpaper
-
-
-\message{and turning on texinfo input format.}
-
-% Define macros to output various characters with catcode for normal text.
-\catcode`\"=\other
-\catcode`\~=\other
-\catcode`\^=\other
-\catcode`\_=\other
-\catcode`\|=\other
-\catcode`\<=\other
-\catcode`\>=\other
-\catcode`\+=\other
-\catcode`\$=\other
-\def\normaldoublequote{"}
-\def\normaltilde{~}
-\def\normalcaret{^}
-\def\normalunderscore{_}
-\def\normalverticalbar{|}
-\def\normalless{<}
-\def\normalgreater{>}
-\def\normalplus{+}
-\def\normaldollar{$}%$ font-lock fix
-
-% This macro is used to make a character print one way in \tt
-% (where it can probably be output as-is), and another way in other fonts,
-% where something hairier probably needs to be done.
-%
-% #1 is what to print if we are indeed using \tt; #2 is what to print
-% otherwise. Since all the Computer Modern typewriter fonts have zero
-% interword stretch (and shrink), and it is reasonable to expect all
-% typewriter fonts to have this, we can check that font parameter.
-%
-\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
-
-% Same as above, but check for italic font. Actually this also catches
-% non-italic slanted fonts since it is impossible to distinguish them from
-% italic fonts. But since this is only used by $ and it uses \sl anyway
-% this is not a problem.
-\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
-
-% Turn off all special characters except @
-% (and those which the user can use as if they were ordinary).
-% Most of these we simply print from the \tt font, but for some, we can
-% use math or other variants that look better in normal text.
-
-\catcode`\"=\active
-\def\activedoublequote{{\tt\char34}}
-\let"=\activedoublequote
-\catcode`\~=\active
-\def~{{\tt\char126}}
-\chardef\hat=`\^
-\catcode`\^=\active
-\def^{{\tt \hat}}
-
-\catcode`\_=\active
-\def_{\ifusingtt\normalunderscore\_}
-\let\realunder=_
-% Subroutine for the previous macro.
-\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
-
-\catcode`\|=\active
-\def|{{\tt\char124}}
-\chardef \less=`\<
-\catcode`\<=\active
-\def<{{\tt \less}}
-\chardef \gtr=`\>
-\catcode`\>=\active
-\def>{{\tt \gtr}}
-\catcode`\+=\active
-\def+{{\tt \char 43}}
-\catcode`\$=\active
-\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
-
-% If a .fmt file is being used, characters that might appear in a file
-% name cannot be active until we have parsed the command line.
-% So turn them off again, and have \everyjob (or @setfilename) turn them on.
-% \otherifyactive is called near the end of this file.
-\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
-
-% Used sometimes to turn off (effectively) the active characters even after
-% parsing them.
-\def\turnoffactive{%
- \normalturnoffactive
- \otherbackslash
-}
-
-\catcode`\@=0
-
-% \backslashcurfont outputs one backslash character in current font,
-% as in \char`\\.
-\global\chardef\backslashcurfont=`\\
-\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
-
-% \realbackslash is an actual character `\' with catcode other, and
-% \doublebackslash is two of them (for the pdf outlines).
-{\catcode`\\=\other @gdef at realbackslash{\} @gdef at doublebackslash{\\}}
-
-% In texinfo, backslash is an active character; it prints the backslash
-% in fixed width font.
-\catcode`\\=\active
- at def@normalbackslash{{@tt at backslashcurfont}}
-% On startup, @fixbackslash assigns:
-% @let \ = @normalbackslash
-
-% \rawbackslash defines an active \ to do \backslashcurfont.
-% \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.
- at gdef@rawbackslash{@let\=@backslashcurfont}
- at gdef@otherbackslash{@let\=@realbackslash}
-
-% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'.
-%
- at def@normalturnoffactive{%
- @let\=@normalbackslash
- @let"=@normaldoublequote
- @let~=@normaltilde
- @let^=@normalcaret
- @let_=@normalunderscore
- @let|=@normalverticalbar
- @let<=@normalless
- @let>=@normalgreater
- @let+=@normalplus
- @let$=@normaldollar %$ font-lock fix
- @unsepspaces
-}
-
-% Make _ and + \other characters, temporarily.
-% This is canceled by @fixbackslash.
- at otherifyactive
-
-% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
-% That is what \eatinput is for; after that, the `\' should revert to printing
-% a backslash.
-%
- at gdef@eatinput input texinfo{@fixbackslash}
- at global@let\ = @eatinput
-
-% On the other hand, perhaps the file did not have a `\input texinfo'. Then
-% the first `\' in the file would cause an error. This macro tries to fix
-% that, assuming it is called before the first `\' could plausibly occur.
-% Also turn back on active characters that might appear in the input
-% file name, in case not using a pre-dumped format.
-%
- at gdef@fixbackslash{%
- @ifx\@eatinput @let\ = @normalbackslash @fi
- @catcode`+=@active
- @catcode`@_=@active
-}
-
-% Say @foo, not \foo, in error messages.
- at escapechar = `@@
-
-% These look ok in all fonts, so just make them not special.
- at catcode`@& = @other
- at catcode`@# = @other
- at catcode`@% = @other
-
-
- at c Local variables:
- at c eval: (add-hook 'write-file-hooks 'time-stamp)
- at c page-delimiter: "^\\\\message"
- at c time-stamp-start: "def\\\\texinfoversion{"
- at c time-stamp-format: "%:y-%02m-%02d.%02H"
- at c time-stamp-end: "}"
- at c End:
-
- at c vim:sw=2:
-
- at ignore
- arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
- at end ignore
--- contrib/cpio/build-aux/config.sub
+++ /dev/null
@@ -1,1626 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-04-29'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches at gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray)
- os=
- basic_machine=$1
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | score \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # Motorola 68HC11/12.
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16c)
- basic_machine=cr16c-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc) basic_machine=powerpc-unknown
- ;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- mmix)
- basic_machine=mmix-knuth
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -tpf*)
- os=-tpf
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -kaos*)
- os=-kaos
- ;;
- -zvmoe)
- os=-zvmoe
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mep-*)
- os=-elf
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
- ;;
- *-ibm)
- os=-aix
- ;;
- *-knuth)
- os=-mmixware
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -os400*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -tpf*)
- vendor=ibm
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
--- contrib/cpio/build-aux/depcomp
+++ /dev/null
@@ -1,589 +0,0 @@
-#! /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 at 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 at 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:
--- contrib/cpio/build-aux/mdate-sh
+++ /dev/null
@@ -1,205 +0,0 @@
-#!/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 at 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 at gnu.org> or send patches to
-# <automake-patches at 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 at 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:
--- contrib/cpio/build-aux/ylwrap
+++ /dev/null
@@ -1,223 +0,0 @@
-#! /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 at 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 at gnu.org> or send patches to
-# <automake-patches at 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 at 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:
--- contrib/cpio/build-aux/config.guess
+++ /dev/null
@@ -1,1516 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-05-17'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per at bothner.com>.
-# Please send patches to <config-patches at gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[45])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo frv-unknown-linux-gnu
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa:Linux:*:*)
- echo xtensa-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel at ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes at openmarket.com>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- # From seanf at swdc.stratus.com.
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green at stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- # From Paul.Green at stratus.com.
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
--- contrib/cpio/doc/stamp-vti
+++ /dev/null
@@ -1,4 +0,0 @@
- at set UPDATED 7 June 2007
- at set UPDATED-MONTH June 2007
- at set EDITION 2.8
- at set VERSION 2.8
--- contrib/cpio/doc/version.texi
+++ /dev/null
@@ -1,4 +0,0 @@
- at set UPDATED 7 June 2007
- at set UPDATED-MONTH June 2007
- at set EDITION 2.8
- at set VERSION 2.8
--- contrib/cpio/doc/gendocs_template
+++ /dev/null
@@ -1,108 +0,0 @@
-<?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.2 2005/05/19 09:35:29 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 at 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 at gnu.org"><em>gnu at 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 at gnu.org"><em>webmasters at 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: 2005/05/19 09:35:29 $ $Author: gray $
-<!-- timestamp end -->
-</p>
-</div>
-
-</body>
-</html>
--- contrib/cpio/doc/Makefile.in
+++ /dev/null
@@ -1,659 +0,0 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# This file is part of GNU cpio
-# Copyright (C) 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; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/stamp-vti $(srcdir)/version.texi
-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/bison.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/d-ino.m4 $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/double-slash-root.m4 \
- $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/eoverflow.m4 \
- $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exitfail.m4 \
- $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
- $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fileblocks.m4 \
- $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.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/getopt.m4 \
- $(top_srcdir)/m4/gettext_gl.m4 $(top_srcdir)/m4/gettime.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gnulib.m4 \
- $(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/iconv.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/longdouble.m4 \
- $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
- $(top_srcdir)/m4/mbchar.m4 $(top_srcdir)/m4/mbiter.m4 \
- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
- $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \
- $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/minmax.m4 \
- $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/openat.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/rmt.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/signed.m4 $(top_srcdir)/m4/size_max.m4 \
- $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.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/stpcpy.m4 $(top_srcdir)/m4/strcase.m4 \
- $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strndup.m4 \
- $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strtol.m4 \
- $(top_srcdir)/m4/sysexits.m4 $(top_srcdir)/m4/system.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/unlocked-io.m4 \
- $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utimens.m4 \
- $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \
- $(top_srcdir)/m4/vsnprintf.m4 $(top_srcdir)/m4/wchar_t.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/xsize.m4 $(top_srcdir)/m4/xstrndup.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 = $(srcdir)/cpio.info
-TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
-am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
-DVIS = cpio.dvi
-PDFS = cpio.pdf
-PSS = cpio.ps
-HTMLS = cpio.html
-TEXINFOS = cpio.texi
-TEXI2DVI = texi2dvi
-TEXI2PDF = $(TEXI2DVI) --pdf --batch
-MAKEINFOHTML = $(MAKEINFO) --html
-AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
-DVIPS = dvips
-am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
-man1dir = $(mandir)/man1
-NROFF = nroff
-MANS = $(man_MANS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@
-ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@
-ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-ALLOCA_H = @ALLOCA_H@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOM4TE = @AUTOM4TE@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-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@
-CPIO_MT_PROG = @CPIO_MT_PROG@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFAULT_RMT_COMMAND = @DEFAULT_RMT_COMMAND@
-DEFAULT_RMT_DIR = @DEFAULT_RMT_DIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EOVERFLOW = @EOVERFLOW@
-EXEEXT = @EXEEXT@
-FCNTL_H = @FCNTL_H@
-FNMATCH_H = @FNMATCH_H@
-GETOPT_H = @GETOPT_H@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GREP = @GREP@
-HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
-HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
-HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
-HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
-HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
-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_STDINT_H = @HAVE_STDINT_H@
-HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
-HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
-HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
-HAVE_WCHAR_H = @HAVE_WCHAR_H@
-HAVE__BOOL = @HAVE__BOOL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-INTTYPES_H = @INTTYPES_H@
-LDFLAGS = @LDFLAGS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
-LIB_SETSOCKOPT = @LIB_SETSOCKOPT@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-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@
-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@
-UNISTD_H = @UNISTD_H@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
-WINT_T_SUFFIX = @WINT_T_SUFFIX@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-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@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-info_TEXINFOS = cpio.texi
-man_MANS = cpio.1 mt.1
-EXTRA_DIST = $(man_MANS) gendocs_template
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .dvi .html .info .pdf .ps .texi
-$(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
-
-.texi.info:
- restore=: && backupdir="$(am__leading_dot)am$$$$" && \
- am__cwd=`pwd` && cd $(srcdir) && \
- rm -rf $$backupdir && mkdir $$backupdir && \
- 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; \
- cd "$$am__cwd"; \
- if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $@ $<; \
- then \
- rc=0; \
- cd $(srcdir); \
- else \
- rc=$$?; \
- cd $(srcdir) && \
- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
- fi; \
- rm -rf $$backupdir; exit $$rc
-
-.texi.dvi:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) $<
-
-.texi.pdf:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) $<
-
-.texi.html:
- rm -rf $(@:.html=.htp)
- if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $(@:.html=.htp) $<; \
- then \
- rm -rf $@; \
- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
- mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
- else \
- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
- rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
- exit 1; \
- fi
-$(srcdir)/cpio.info: cpio.texi $(srcdir)/version.texi
-cpio.dvi: cpio.texi $(srcdir)/version.texi
-cpio.pdf: cpio.texi $(srcdir)/version.texi
-cpio.html: cpio.texi $(srcdir)/version.texi
-$(srcdir)/version.texi: $(srcdir)/stamp-vti
-$(srcdir)/stamp-vti: cpio.texi $(top_srcdir)/configure
- @(dir=.; test -f ./cpio.texi || dir=$(srcdir); \
- set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/cpio.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)
- - at 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:
- $(DVIPS) -o $@ $<
-
-uninstall-info-am:
- @$(PRE_UNINSTALL)
- @if (install-info --version && \
- install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- relfile=`echo "$$file" | sed 's|^.*/||'`; \
- echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
- install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
- done; \
- else :; fi
- @$(NORMAL_UNINSTALL)
- @list='$(INFO_DEPS)'; \
- for file in $$list; do \
- relfile=`echo "$$file" | sed 's|^.*/||'`; \
- relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
- (if cd "$(DESTDIR)$(infodir)"; then \
- echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
- rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
- else :; fi); \
- done
-
-dist-info: $(INFO_DEPS)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- list='$(INFO_DEPS)'; \
- for base in $$list; do \
- case $$base in \
- $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
- esac; \
- if test -f $$base; then d=.; else d=$(srcdir); fi; \
- for file in $$d/$$base*; do \
- relfile=`expr "$$file" : "$$d/\(.*\)"`; \
- test -f $(distdir)/$$relfile || \
- cp -p $$file $(distdir)/$$relfile; \
- done; \
- done
-
-mostlyclean-aminfo:
- -rm -rf cpio.aux cpio.cp cpio.cps cpio.fn cpio.fns cpio.ky cpio.kys cpio.log \
- cpio.pg cpio.pgs cpio.tmp cpio.toc cpio.tp cpio.tps cpio.vr \
- cpio.vrs cpio.dvi cpio.pdf cpio.ps cpio.html
-
-maintainer-clean-aminfo:
- @list='$(INFO_DEPS)'; for i in $$list; do \
- i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
- echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
- rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
- done
-install-man1: $(man1_MANS) $(man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$(top_distdir)" distdir="$(distdir)" \
- dist-info
-check-am: all-am
-check: check-am
-all-am: Makefile $(INFO_DEPS) $(MANS)
-installdirs:
- for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am: $(DVIS)
-
-html: html-am
-
-html-am: $(HTMLS)
-
-info: info-am
-
-info-am: $(INFO_DEPS)
-
-install-data-am: install-info-am install-man
-
-install-exec-am:
-
-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-man1
-
-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-info-am uninstall-man
-
-uninstall-man: uninstall-man1
-
-.PHONY: all all-am check check-am clean clean-generic dist-info \
- distclean distclean-generic distdir dvi dvi-am html html-am \
- info info-am install install-am install-data install-data-am \
- install-exec install-exec-am install-info install-info-am \
- install-man install-man1 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-info-am uninstall-man \
- uninstall-man1
-
-
-# Make sure you set TEXINPUT
-manual:
- TEXINPUTS=$(srcdir):$(top_srcdir)/scripts:$$TEXINPUTS \
- gendocs.sh cpio 'GNU cpio 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:
--- contrib/cpio/doc/cpio.texi
+++ /dev/null
@@ -1,602 +0,0 @@
-\input texinfo @c -*-texinfo-*-
- at c %**start of header
- at setfilename cpio.info
- at settitle cpio
- at setchapternewpage off
- at c %**end of header
-
- at dircategory Archiving
- at direntry
-* Cpio: (cpio). Copy-in-copy-out archiver to tape or disk.
- at end direntry
-
- at include version.texi
-
- at copying
-This manual documents GNU cpio (version @value{VERSION}, @value{UPDATED}).
-
-Copyright @copyright{} 1995, 2001, 2002, 2004 Free Software Foundation, Inc.
- at sp 1
- at quotation
-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, 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 have freedom to copy and modify
-this GNU Manual, like GNU software. Copies published by the Free
-Software Foundation raise funds for GNU development.''
- at end quotation
- at end copying
-
- at titlepage
- at title GNU CPIO
- at subtitle @value{VERSION} @value{UPDATED}
- at author by Robert Carleton
- at c copyright page
- at page
- at vskip 0pt plus 1filll
- at insertcopying
- at sp 2
-Published by the Free Software Foundation @*
-51 Franklin Street, Fifth Floor, @*
-Boston, MA 02110-1301, USA @*
- at end titlepage
-
- at node Top, Introduction, (dir), (dir)
- at comment node-name, next, previous, up
-
- at ifinfo
- at top
-
-GNU cpio is a tool for creating and extracting archives, or copying
-files from one place to another. It handles a number of cpio formats as
-well as reading and writing tar files. This is the first edition of the
-GNU cpio documentation and is consistent with @value{VERSION}.
-
- at end ifinfo
-
- at menu
-* Introduction::
-* Tutorial:: Getting started.
-* Invoking cpio:: How to invoke @command{cpio}.
-* Media:: Using tapes and other archive media.
-* Reports:: Reporting bugs or suggestions
-* Concept Index:: Concept index.
-
- at detailmenu
- --- The Detailed Node Listing ---
-
-Invoking cpio
-
-* Copy-out mode::
-* Copy-in mode::
-* Copy-pass mode::
-* Options::
-
- at end detailmenu
- at end menu
-
- at node Introduction, Tutorial, Top, Top
- at comment node-name, next, previous, up
- at chapter Introduction
-
-GNU cpio copies files into or out of a cpio or tar archive, The archive
-can be another file on the disk, a magnetic tape, or a pipe.
-
-GNU cpio supports the following archive formats: binary, old ASCII, new
-ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar. The
-tar format is provided for compatibility with the tar program. By
-default, cpio creates binary format archives, for compatibility with
-older cpio programs. When extracting from archives, cpio automatically
-recognizes which kind of archive it is reading and can read archives
-created on machines with a different byte-order.
-
- at node Tutorial, Invoking cpio, Introduction, Top
- at comment node-name, next, previous, up
- at chapter Tutorial
- at cindex creating a cpio archive
- at cindex extracting a cpio archive
- at cindex copying directory structures
- at cindex passing directory structures
-
-
-GNU cpio performs three primary functions. Copying files to an
-archive, Extracting files from an archive, and passing files to another
-directory tree. An archive can be a file on disk, one or more floppy
-disks, or one or more tapes.
-
-When creating an archive, cpio takes the list of files to be processed
-from the standard input, and then sends the archive to the standard
-output, or to the device defined by the @option{-F} option.
- at xref{Copy-out mode}. Usually find or ls is used to provide this list
-to the standard input. In the following example you can see the
-possibilities for archiving the contents of a single directory.
-
-
- at example
- at cartouche
-% ls | cpio -ov > directory.cpio
- at end cartouche
- at end example
-
-The @option{-o} option creates the archive, and the @option{-v} option
-prints the names of the files archived as they are added. Notice that
-the options can be put together after a single @option{-} or can be placed
-separately on the command line. The @samp{>} redirects the cpio output
-to the file @samp{directory.cpio}.
-
-
-If you wanted to archive an entire directory tree, the find command can
-provide the file list to cpio:
-
-
- at example
- at cartouche
-% find . -print -depth | cpio -ov > tree.cpio
- at end cartouche
- at end example
-
-
-This will take all the files in the current directory, the directories
-below and place them in the archive tree.cpio. Again the @option{-o}
-creates an archive, and the @option{-v} option shows you the name of the
-files as they are archived. @xref{Copy-out mode}. Using the @samp{.} in the
-find statement will give you more flexibility when doing restores, as it
-will save file names with a relative path vice a hard wired, absolute
-path. The @option{-depth} option forces @samp{find} to print of the
-entries in a directory before printing the directory itself. This
-limits the effects of restrictive directory permissions by printing the
-directory entries in a directory before the directory name itself.
-
-
-
-
-Extracting an archive requires a bit more thought because cpio will not
-create directories by default. Another characteristic, is it will not
-overwrite existing files unless you tell it to.
-
-
- at example
- at cartouche
-% cpio -iv < directory.cpio
- at end cartouche
- at end example
-
-This will retrieve the files archived in the file directory.cpio and
-place them in the present directory. The @option{-i} option extracts the
-archive and the @option{-v} shows the file names as they are extracted.
-If you are dealing with an archived directory tree, you need to use the
- at option{-d} option to create directories as necessary, something like:
-
- at example
- at cartouche
-% cpio -idv < tree.cpio
- at end cartouche
- at end example
-
-This will take the contents of the archive tree.cpio and extract it to
-the current directory. If you try to extract the files on top of files
-of the same name that already exist (and have the same or later
-modification time) cpio will not extract the file unless told to do so
-by the -u option. @xref{Copy-in mode}.
-
-
-In copy-pass mode, cpio copies files from one directory tree to another,
-combining the copy-out and copy-in steps without actually using an
-archive. It reads the list of files to copy from the standard input;
-the directory into which it will copy them is given as a non-option
-argument. @xref{Copy-pass mode}.
-
- at example
- at cartouche
-% find . -depth -print0 | cpio --null -pvd new-dir
- at end cartouche
- at end example
-
-
-The example shows copying the files of the present directory, and
-sub-directories to a new directory called new-dir. Some new options are
-the @option{-print0} available with GNU find, combined with the
- at option{--null} option of cpio. These two options act together to send
-file names between find and cpio, even if special characters are
-embedded in the file names. Another is @option{-p}, which tells cpio to
-pass the files it finds to the directory @samp{new-dir}.
-
- at node Invoking cpio, Media, Tutorial, Top
- at comment node-name, next, previous, up
- at chapter Invoking cpio
- at cindex invoking cpio
- at cindex command line options
-
- at menu
-* Copy-out mode::
-* Copy-in mode::
-* Copy-pass mode::
-* Options::
- at end menu
-
- at node Copy-out mode, Copy-in mode, Invoking cpio, Invoking cpio
- at comment node-name, next, previous, up
- at section Copy-out mode
-
-In copy-out mode, cpio copies files into an archive. It reads a list
-of filenames, one per line, on the standard input, and writes the
-archive onto the standard output. A typical way to generate the list
-of filenames is with the find command; you should give find the -depth
-option to minimize problems with permissions on directories that are
-unreadable.
- at xref{Options}.
-
- at example
-cpio @{-o|--create@} [-0acvABLV] [-C bytes] [-H format]
-[-M message] [-O [[user@@]host:]archive] [-F [[user@@]host:]archive]
-[--file=[[user@@]host:]archive] [--format=format]
-[--message=message][--null] [--reset-access-time] [--verbose]
-[--dot] [--append] [--block-size=blocks] [--dereference]
-[--io-size=bytes] [--rsh-command=command] [--help] [--version]
-< name-list [> archive]
- at end example
-
- at node Copy-in mode, Copy-pass mode, Copy-out mode, Invoking cpio
- at comment node-name, next, previous, up
- at section Copy-in mode
-
-In copy-in mode, cpio copies files out of an archive or lists the
-archive contents. It reads the archive from the standard input. Any
-non-option command line arguments are shell globbing patterns; only
-files in the archive whose names match one or more of those patterns are
-copied from the archive. Unlike in the shell, an initial @samp{.} in a
-filename does match a wildcard at the start of a pattern, and a @samp{/} in a
-filename can match wildcards. If no patterns are given, all files are
-extracted. @xref{Options}.
-
- at example
-cpio @{-i|--extract@} [-bcdfmnrtsuvBSV] [-C bytes] [-E file]
-[-H format] [-M message] [-R [user][:.][group]]
-[-I [[user@@]host:]archive] [-F [[user@@]host:]archive]
-[--file=[[user@@]host:]archive] [--make-directories]
-[--nonmatching] [--preserve-modification-time]
-[--numeric-uid-gid] [--rename] [--list] [--swap-bytes] [--swap]
-[--dot] [--unconditional] [--verbose] [--block-size=blocks]
-[--swap-halfwords] [--io-size=bytes] [--pattern-file=file]
-[--format=format] [--owner=[user][:.][group]]
-[--no-preserve-owner] [--message=message] [--help] [--version]
-[--no-absolute-filenames] [--sparse] [-only-verify-crc] [-quiet]
-[--rsh-command=command] [pattern...] [< archive]
- at end example
-
- at node Copy-pass mode, Options, Copy-in mode, Invoking cpio
- at comment node-name, next, previous, up
- at section Copy-pass mode
-
-In copy-pass mode, cpio copies files from one directory tree to
-another, combining the copy-out and copy-in steps without actually
-using an archive. It reads the list of files to copy from the
-standard input; the directory into which it will copy them is given as
-a non-option argument.
- at xref{Options}.
-
- at example
-cpio @{-p|--pass-through@} [-0adlmuvLV] [-R [user][:.][group]]
-[--null] [--reset-access-time] [--make-directories] [--link]
-[--preserve-modification-time] [--unconditional] [--verbose]
-[--dot] [--dereference] [--owner=[user][:.][group]] [--sparse]
-[--no-preserve-owner] [--help] [--version] destination-directory
-< name-list
- at end example
-
-
-
- at node Options, , Copy-pass mode, Invoking cpio
- at comment node-name, next, previous, up
- at section Options
-
-
- at table @code
-
-
- at item -0
- at itemx --null
-Read a list of filenames terminated by a null character, instead of a
-newline, so that files whose names contain newlines can be archived.
-GNU find is one way to produce a list of null-terminated filenames.
-This option may be used in copy-out and copy-pass modes.
-
- at item -a
- at itemx --reset-access-time
-Reset the access times of files after reading them, so
-that it does not look like they have just been read.
-
- at item -A
- at itemx --append
-Append to an existing archive. Only works in copy-out
-mode. The archive must be a disk file specified with
-the @option{-O} or @option{-F} (@option{--file}) option.
-
- at item -b
- at itemx --swap
-Swap both halfwords of words and bytes of halfwords in the data.
-Equivalent to -sS. This option may be used in copy-in mode. Use this
-option to convert 32-bit integers between big-endian and little-endian
-machines.
-
- at item -B
-Set the I/O block size to 5120 bytes. Initially the
-block size is 512 bytes.
-
- at item --block-size=@var{block-size}
-Set the I/O block size to @var{block-size} * 512 bytes.
-
- at item -c
-Use the old portable (ASCII) archive format.
-
- at item -C @var{io-size}
- at itemx --io-size=@var{io-size}
-Set the I/O block size to @var{io-size} bytes.
-
- at item -d
- at itemx --make-directories
-Create leading directories where needed.
-
- at item -E @var{file}
- at itemx --pattern-file=@var{file}
-Read additional patterns specifying filenames to extract or list from
- at var{file}. The lines of @var{file} are treated as if they had been non-option
-arguments to cpio. This option is used in copy-in mode,
-
- at item -f
- at itemx --nonmatching
-Only copy files that do not match any of the given
-patterns.
-
- at item -F @var{archive}
- at itemx --file=@var{archive}
-Archive filename to use instead of standard input or output. To use a
-tape drive on another machine as the archive, use a filename that starts
-with @samp{@var{hostname}:}, where @var{hostname} is the name or IP
-address of the machine. The hostname can be preceded by a username and an
- at samp{@@} to access the remote tape drive as that user, if you have
-permission to do so (typically an entry in that user's @file{~/.rhosts}
-file).
-
- at item --force-local
-With @option{-F}, @option{-I}, or @option{-O}, take the archive file name to be a
-local file even if it contains a colon, which would
-ordinarily indicate a remote host name.
-
- at item -H @var{format}
- at itemx --format=@var{format}
-Use archive format @var{format}. The valid formats are listed below; the same
-names are also recognized in all-caps. The default in copy-in mode is
-to automatically detect the archive format, and in copy-out mode is
- at samp{bin}.
-
- at table @samp
- at item bin
-The obsolete binary format.
-
- at item odc
-The old (POSIX.1) portable format.
-
- at item newc
-The new (SVR4) portable format, which supports file systems having more
-than 65536 i-nodes.
-
- at item crc
-The new (SVR4) portable format with a checksum added.
-
- at item tar
-The old tar format.
-
- at item ustar
-The POSIX.1 tar format. Also recognizes GNU tar archives, which are
-similar but not identical.
-
- at item hpbin
-The obsolete binary format used by HPUX's cpio (which stores device
-files differently).
-
- at item hpodc
-The portable format used by HPUX's cpio (which stores device files
-differently).
- at end table
-
- at item -i
- at itemx --extract
-Run in copy-in mode.
- at xref{Copy-in mode}.
-
- at item -I @var{archive}
-Archive filename to use instead of standard input. To use a tape drive
-on another machine as the archive, use a filename that starts with
- at samp{@var{hostname}:}, where @var{hostname} is the name or IP address
-of the remote host. The hostname can be preceded by a username and an @samp{@@} to
-access the remote tape drive as that user, if you have permission to do
-so (typically an entry in that user's @file{~/.rhosts} file).
-
- at item -k
-Ignored; for compatibility with other versions of cpio.
-
- at item -l
- at itemx --link
-Link files instead of copying them, when possible.
-
- at item -L
- at itemx --dereference
-Copy the file that a symbolic link points to, rather than the symbolic
-link itself.
-
- at item -m
- at itemx --preserve-modification-time
-Retain previous file modification times when creating files.
-
- at item -M @var{message}
- at itemx --message=@var{message}
-Print @var{message} when the end of a volume of the backup media (such as a
-tape or a floppy disk) is reached, to prompt the user to insert a new
-volume. If @var{message} contains the string @samp{%d}, it is replaced by the
-current volume number (starting at 1).
-
- at item -n
- at itemx --numeric-uid-gid
-Show numeric UID and GID instead of translating them into names when using the
- at option{--verbose} option.
-
- at item --no-absolute-filenames
-Create all files relative to the current directory in copy-in mode, even
-if they have an absolute file name in the archive.
-
- at item --no-preserve-owner
-Do not change the ownership of the files; leave them owned by the user
-extracting them. This is the default for non-root users, so that users
-on System V don't inadvertantly give away files. This option can be
-used in copy-in mode and copy-pass mode
-
- at item -o
- at itemx --create
-Run in copy-out mode.
- at xref{Copy-out mode}.
-
- at item -O @var{archive}
-Archive filename to use instead of standard output. To use a tape drive
-on another machine as the archive, use a filename that starts with
- at samp{@var{hostname}:}, where @var{hostname} is the name or IP address
-of the machine. The hostname can be preceded by a username and an @samp{@@} to
-access the remote tape drive as that user, if you have permission to do
-so (typically an entry in that user's @file{~/.rhosts} file).
-
- at item --only-verify-crc
-Verify the CRC's of each file in the archive, when reading a CRC format
-archive. Don't actually extract the files.
-
- at item -p
- at itemx --pass-through
-Run in copy-pass mode.
- at xref{Copy-pass mode}.
-
- at item --quiet
-Do not print the number of blocks copied.
-
- at item -r
- at itemx --rename
-Interactively rename files.
-
- at item -R @var{owner}
- at itemx --owner @var{owner}
-
-In copy-in and copy-pass mode, set the ownership of all files created
-to the specified @var{owner} (this operation is allowed only for the
-super-user). In copy-out mode, store the supplied owner information in
-the archive.
-
-The argument can be either the user name or the user name
-and group name, separated by a dot or a colon, or the group name,
-preceeded by a dot or a colon, as shown in the examples below:
-
- at smallexample
- at group
-cpio --owner smith
-cpio --owner smith:
-cpio --owner smith:users
-cpio --owner :users
- at end group
- at end smallexample
-
- at noindent
-If the group is omitted but the @samp{:} or @samp{.} separator is
-given, as in the second example. the given user's login group will be
-used.
-
- at item --rsh-command=@var{command}
-Notifies cpio that is should use @var{command} to communicate with remote
-devices.
-
- at item -s
- at itemx --swap-bytes
-Swap the bytes of each halfword (pair of bytes) in the files. This option
-can be used in copy-in mode.
-
- at item -S
- at itemx --swap-halfwords
-Swap the halfwords of each word (4 bytes) in the files. This option may
-be used in copy-in mode.
-
- at item --sparse
-Write files with large blocks of zeros as sparse files. This option is
-used in copy-in and copy-pass modes.
-
- at item -t
- at itemx --list
-Print a table of contents of the input.
-
- at item -u
- at itemx --unconditional
-Replace all files, without asking whether to replace
-existing newer files with older files.
-
- at item -v
- at itemx --verbose
-List the files processed, or with @option{-t}, give an @samp{ls -l} style
-table of contents listing. In a verbose table of contents of a ustar
-archive, user and group names in the archive that do not exist on the
-local system are replaced by the names that correspond locally to the
-numeric UID and GID stored in the archive.
-
- at item -V
- at itemx --dot
-Print a @samp{.} for each file processed.
-
- at item --version
-Print the cpio program version number and exit.
- at end table
-
-
- at node Media, Reports, Invoking cpio, Top
- at comment node-name, next, previous, up
- at chapter Magnetic Media
- at cindex magnetic media
-
-Archives are usually written on removable media--tape cartridges, mag
-tapes, or floppy disks.
-
-The amount of data a tape or disk holds depends not only on its size,
-but also on how it is formatted. A 2400 foot long reel of mag tape
-holds 40 megabytes of data when formated at 1600 bits per inch. The
-physically smaller EXABYTE tape cartridge holds 2.3 gigabytes.
-
-Magnetic media are re-usable--once the archive on a tape is no longer
-needed, the archive can be erased and the tape or disk used over. Media
-quality does deteriorate with use, however. Most tapes or disks should
-be disgarded when they begin to produce data errors.
-
-Magnetic media are written and erased using magnetic fields, and should
-be protected from such fields to avoid damage to stored data. Sticking
-a floppy disk to a filing cabinet using a magnet is probably not a good
-idea.
-
- at node Reports, Concept Index, Media, Top
- at chapter Reporting bugs or suggestions
-
-It is possible you will encounter a bug in @command{cpio}.
-If this happens, we would like to hear about it. As the purpose of bug
-reporting is to improve software, please be sure to include maximum
-information when reporting a bug. The information needed is:
-
- at itemize @bullet
- at item Version of the package you are using.
- at item Compilation options used when configuring the package.
- at item Conditions under which the bug appears.
- at end itemize
-
-Send your report to <bug-cpio@@gnu.org>. Allow us a couple of
-days to answer.
-
- at node Concept Index, , Reports, Top
- at comment node-name, next, previous, up
- at unnumbered Concept Index
- at printindex cp
- at contents
- at bye
--- contrib/cpio/doc/cpio.1
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH CPIO 1L \" -*- nroff -*-
-.SH NAME
-cpio \- copy files to and from archives
-.SH SYNOPSIS
-.B cpio
-{\-o|\-\-create} [\-0acvABLV] [\-C bytes] [\-H format] [\-M message]
-[\-O [[user@]host:]archive] [\-F [[user@]host:]archive]
-[\-\-file=[[user@]host:]archive] [\-\-format=format] [\-\-message=message]
-[\-\-null] [\-\-reset-access-time] [\-\-verbose] [\-\-dot] [\-\-append]
-[\-\-block-size=blocks] [\-\-dereference] [\-\-io-size=bytes] [\-\-quiet]
-[\-\-force\-local] [\-\-rsh-command=command] [\-\-help] [\-\-version]
-< name-list [> archive]
-
-.B cpio
-{\-i|\-\-extract} [\-bcdfmnrtsuvBSV] [\-C bytes] [\-E file] [\-H format]
-[\-M message] [\-R [user][:.][group]] [\-I [[user@]host:]archive]
-[\-F [[user@]host:]archive] [\-\-file=[[user@]host:]archive]
-[\-\-make-directories] [\-\-nonmatching] [\-\-preserve-modification-time]
-[\-\-numeric-uid-gid] [\-\-rename] [\-t|\-\-list] [\-\-swap-bytes] [\-\-swap] [\-\-dot]
-[\-\-unconditional] [\-\-verbose] [\-\-block-size=blocks] [\-\-swap-halfwords]
-[\-\-io-size=bytes] [\-\-pattern-file=file] [\-\-format=format]
-[\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message]
-[\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse]
-[\-\-only\-verify\-crc] [\-\-quiet] [\-\-rsh-command=command] [\-\-help]
-[\-\-version] [pattern...] [< archive]
-
-.B cpio
-{\-p|\-\-pass-through} [\-0adlmuvLV] [\-R [user][:.][group]]
-[\-\-null] [\-\-reset-access-time] [\-\-make-directories] [\-\-link] [\-\-quiet]
-[\-\-preserve-modification-time] [\-\-unconditional] [\-\-verbose] [\-\-dot]
-[\-\-dereference] [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner]
-[\-\-sparse] [\-\-help] [\-\-version] destination-directory < name-list
-.SH DESCRIPTION
-GNU cpio is fully documented in the texinfo documentation. To access the
-help from your command line, type
-.PP
-\fBinfo cpio
-.PP
-The online copy of the documentation is available at the following address:
-.PP
-http://www.gnu.org/software/cpio/manual
--- contrib/cpio/doc/mt.1
+++ /dev/null
@@ -1,126 +0,0 @@
-.TH MT 1L \" -*- nroff -*-
-.SH NAME
-mt \- control magnetic tape drive operation
-.SH SYNOPSIS
-.B mt
-[\-V] [\-f device] [\-\-file=device] [\-\-rsh-command=command] [\-\-version]
-operation [count]
-.SH DESCRIPTION
-This manual page
-documents the GNU version of
-.BR mt .
-.B mt
-performs the given
-.IR operation ,
-which must be one of the tape operations listed below, on a tape
-drive.
-.PP
-The default tape device to operate on is taken from the file
-.I /usr/include/sys/mtio.h
-when
-.B mt
-is compiled. It can be overridden by giving a device file name in
-the environment variable
-.BR TAPE
-or by a command line option (see below), which also overrides the
-environment variable.
-.PP
-The device must be either a character special file or a
-remote tape drive. To use a tape drive on another machine as the
-archive, use a filename that starts with `HOSTNAME:'. The
-hostname can be preceded by a username and an `@' to access the remote
-tape drive as that user, if you have permission to do so (typically an
-entry in that user's `~/.rhosts' file).
-.PP
-The available operations are listed below. Unique abbreviations are
-accepted. Not all operations are available on all systems, or work on
-all types of tape drives.
-Some operations optionally take a repeat count, which can be given
-after the operation name and defaults to 1.
-.IP "eof, weof"
-Write
-.I count
-EOF marks at current position.
-.IP fsf
-Forward space
-.I count
-files.
-The tape is positioned on the first block of the next file.
-.IP bsf
-Backward space
-.I count
-files.
-The tape is positioned on the first block of the next file.
-.IP fsr
-Forward space
-.I count
-records.
-.IP bsr
-Backward space
-.I count
-records.
-.IP bsfm
-Backward space
-.I count
-file marks.
-The tape is positioned on the beginning-of-the-tape side of
-the file mark.
-.IP fsfm
-Forward space
-.I count
-file marks.
-The tape is positioned on the beginning-of-the-tape side of
-the file mark.
-.IP asf
-Absolute space to file number
-.IR count .
-Equivalent to rewind followed by fsf
-.IR count .
-.IP seek
-Seek to block number
-.IR count .
-.IP eom
-Space to the end of the recorded media on the tape
-(for appending files onto tapes).
-.IP rewind
-Rewind the tape.
-.IP "offline, rewoffl"
-Rewind the tape and, if applicable, unload the tape.
-.IP status
-Print status information about the tape unit.
-.IP retension
-Rewind the tape, then wind it to the end of the reel,
-then rewind it again.
-.IP erase
-Erase the tape.
-.PP
-.B mt
-exits with a status of 0 if the operation succeeded, 1 if the
-operation or device name given was invalid, or 2 if the operation
-failed.
-.SS OPTIONS
-.TP
-.I "\-f, \-\-file=device"
-Use
-.I device
-as the file name of the tape drive to operate on.
-To use a
-tape drive on another machine, use a filename that
-starts with `HOSTNAME:'. The hostname can be preceded by a
-username and an `@' to access the remote tape drive as that user, if
-you have permission to do so (typically an entry in that user's
-`~/.rhosts' file).
-.TP
-.I "\-\-rsh-command=command"
-Notifies
-.B mt
-that it should use
-.I command
-to communicate with remote devices instead of
-.I /usr/bin/ssh
-or
-.IR /usr/bin/rsh .
-.TP
-.I "\-V, \-\-version"
-Print the version number of
-.BR mt .
--- contrib/cpio/doc/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-# This file is part of GNU cpio
-# Copyright (C) 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; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-
-info_TEXINFOS = cpio.texi
-man_MANS = cpio.1 mt.1
-EXTRA_DIST = $(man_MANS) gendocs_template
-
-# Make sure you set TEXINPUT
-manual:
- TEXINPUTS=$(srcdir):$(top_srcdir)/scripts:$$TEXINPUTS \
- gendocs.sh cpio 'GNU cpio manual'
--- contrib/cpio/doc/cpio.info
+++ /dev/null
@@ -1,516 +0,0 @@
-This is cpio.info, produced by makeinfo version 4.8 from cpio.texi.
-
-INFO-DIR-SECTION Archiving
-START-INFO-DIR-ENTRY
-* Cpio: (cpio). Copy-in-copy-out archiver to tape or disk.
-END-INFO-DIR-ENTRY
-
- This manual documents GNU cpio (version 2.7, 6 July 2006).
-
- Copyright (C) 1995, 2001, 2002, 2004 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.2 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 have freedom to copy and
- modify this GNU Manual, like GNU software. Copies published by
- the Free Software Foundation raise funds for GNU development."
-
-
-File: cpio.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
-
-cpio
-****
-
-GNU cpio is a tool for creating and extracting archives, or copying
-files from one place to another. It handles a number of cpio formats as
-well as reading and writing tar files. This is the first edition of the
-GNU cpio documentation and is consistant with 2.7.
-
-* Menu:
-
-* Introduction::
-* Tutorial:: Getting started.
-* Invoking `cpio':: How to invoke `cpio'.
-* Media:: Using tapes and other archive media.
-* Reports:: Reporting bugs or suggestions
-* Concept Index:: Concept index.
-
- --- The Detailed Node Listing ---
-
-Invoking cpio
-
-* Copy-out mode::
-* Copy-in mode::
-* Copy-pass mode::
-* Options::
-
-
-File: cpio.info, Node: Introduction, Next: Tutorial, Prev: Top, Up: Top
-
-1 Introduction
-**************
-
-GNU cpio copies files into or out of a cpio or tar archive, The archive
-can be another file on the disk, a magnetic tape, or a pipe.
-
- GNU cpio supports the following archive formats: binary, old ASCII,
-new ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar.
-The tar format is provided for compatibility with the tar program. By
-default, cpio creates binary format archives, for compatibility with
-older cpio programs. When extracting from archives, cpio automatically
-recognizes which kind of archive it is reading and can read archives
-created on machines with a different byte-order.
-
-
-File: cpio.info, Node: Tutorial, Next: Invoking `cpio', Prev: Introduction, Up: Top
-
-2 Tutorial
-**********
-
-GNU cpio performs three primary functions. Copying files to an
-archive, Extracting files from an archive, and passing files to another
-directory tree. An archive can be a file on disk, one or more floppy
-disks, or one or more tapes.
-
- When creating an archive, cpio takes the list of files to be
-processed from the standard input, and then sends the archive to the
-standard output, or to the device defined by the `-F' option. *Note
-Copy-out mode::. Usually find or ls is used to provide this list to
-the standard input. In the following example you can see the
-possibilities for archiving the contents of a single directory.
-
- % ls | cpio -ov > directory.cpio
-
- The `-o' option creates the archive, and the `-v' option prints the
-names of the files archived as they are added. Notice that the options
-can be put together after a single `-' or can be placed separately on
-the command line. The `>' redirects the cpio output to the file
-`directory.cpio'.
-
- If you wanted to archive an entire directory tree, the find command
-can provide the file list to cpio:
-
- % find . -print -depth | cpio -ov > tree.cpio
-
- This will take all the files in the current directory, the
-directories below and place them in the archive tree.cpio. Again the
-`-o' creates an archive, and the `-v' option shows you the name of the
-files as they are archived. *Note Copy-out mode::. Using the `.' in
-the find statement will give you more flexibility when doing restores,
-as it will save file names with a relative path vice a hard wired,
-absolute path. The `-depth' option forces `find' to print of the
-entries in a directory before printing the directory itself. This
-limits the effects of restrictive directory permissions by printing the
-directory entries in a directory before the directory name itself.
-
- Extracting an archive requires a bit more thought because cpio will
-not create directories by default. Another characteristic, is it will
-not overwrite existing files unless you tell it to.
-
- % cpio -iv < directory.cpio
-
- This will retrieve the files archived in the file directory.cpio and
-place them in the present directory. The `-i' option extracts the
-archive and the `-v' shows the file names as they are extracted. If
-you are dealing with an archived directory tree, you need to use the
-`-d' option to create directories as necessary, something like:
-
- % cpio -idv < tree.cpio
-
- This will take the contents of the archive tree.cpio and extract it
-to the current directory. If you try to extract the files on top of
-files of the same name that already exist (and have the same or later
-modification time) cpio will not extract the file unless told to do so
-by the -u option. *Note Copy-in mode::.
-
- In copy-pass mode, cpio copies files from one directory tree to
-another, combining the copy-out and copy-in steps without actually
-using an archive. It reads the list of files to copy from the standard
-input; the directory into which it will copy them is given as a
-non-option argument. *Note Copy-pass mode::.
-
- % find . -depth -print0 | cpio --null -pvd new-dir
-
- The example shows copying the files of the present directory, and
-sub-directories to a new directory called new-dir. Some new options are
-the `-print0' available with GNU find, combined with the `--null'
-option of cpio. These two options act together to send file names
-between find and cpio, even if special characters are embedded in the
-file names. Another is `-p', which tells cpio to pass the files it
-finds to the directory `new-dir'.
-
-
-File: cpio.info, Node: Invoking `cpio', Next: Media, Prev: Tutorial, Up: Top
-
-3 Invoking cpio
-***************
-
-* Menu:
-
-* Copy-out mode::
-* Copy-in mode::
-* Copy-pass mode::
-* Options::
-
-
-File: cpio.info, Node: Copy-out mode, Next: Copy-in mode, Prev: Invoking `cpio', Up: Invoking `cpio'
-
-3.1 Copy-out mode
-=================
-
-In copy-out mode, cpio copies files into an archive. It reads a list
-of filenames, one per line, on the standard input, and writes the
-archive onto the standard output. A typical way to generate the list
-of filenames is with the find command; you should give find the -depth
-option to minimize problems with permissions on directories that are
-unreadable. *Note Options::.
-
- cpio {-o|--create} [-0acvABLV] [-C bytes] [-H format]
- [-M message] [-O [[user@]host:]archive] [-F [[user@]host:]archive]
- [--file=[[user@]host:]archive] [--format=format]
- [--message=message][--null] [--reset-access-time] [--verbose]
- [--dot] [--append] [--block-size=blocks] [--dereference]
- [--io-size=bytes] [--rsh-command=command] [--help] [--version]
- < name-list [> archive]
-
-
-File: cpio.info, Node: Copy-in mode, Next: Copy-pass mode, Prev: Copy-out mode, Up: Invoking `cpio'
-
-3.2 Copy-in mode
-================
-
-In copy-in mode, cpio copies files out of an archive or lists the
-archive contents. It reads the archive from the standard input. Any
-non-option command line arguments are shell globbing patterns; only
-files in the archive whose names match one or more of those patterns are
-copied from the archive. Unlike in the shell, an initial `.' in a
-filename does match a wildcard at the start of a pattern, and a `/' in a
-filename can match wildcards. If no patterns are given, all files are
-extracted. *Note Options::.
-
- cpio {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes] [-E file]
- [-H format] [-M message] [-R [user][:.][group]]
- [-I [[user@]host:]archive] [-F [[user@]host:]archive]
- [--file=[[user@]host:]archive] [--make-directories]
- [--nonmatching] [--preserve-modification-time]
- [--numeric-uid-gid] [--rename] [--list] [--swap-bytes] [--swap]
- [--dot] [--unconditional] [--verbose] [--block-size=blocks]
- [--swap-halfwords] [--io-size=bytes] [--pattern-file=file]
- [--format=format] [--owner=[user][:.][group]]
- [--no-preserve-owner] [--message=message] [--help] [--version]
- [--no-absolute-filenames] [--sparse] [-only-verify-crc] [-quiet]
- [--rsh-command=command] [pattern...] [< archive]
-
-
-File: cpio.info, Node: Copy-pass mode, Next: Options, Prev: Copy-in mode, Up: Invoking `cpio'
-
-3.3 Copy-pass mode
-==================
-
-In copy-pass mode, cpio copies files from one directory tree to
-another, combining the copy-out and copy-in steps without actually
-using an archive. It reads the list of files to copy from the standard
-input; the directory into which it will copy them is given as a
-non-option argument. *Note Options::.
-
- cpio {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]]
- [--null] [--reset-access-time] [--make-directories] [--link]
- [--preserve-modification-time] [--unconditional] [--verbose]
- [--dot] [--dereference] [--owner=[user][:.][group]] [--sparse]
- [--no-preserve-owner] [--help] [--version] destination-directory
- < name-list
-
-
-File: cpio.info, Node: Options, Prev: Copy-pass mode, Up: Invoking `cpio'
-
-3.4 Options
-===========
-
-`-0, --null'
- Read a list of filenames terminated by a null character, instead
- of a newline, so that files whose names contain newlines can be
- archived. GNU find is one way to produce a list of
- null-terminated filenames. This option may be used in copy-out
- and copy-pass modes.
-
-`-a, --reset-access-time'
- Reset the access times of files after reading them, so that it
- does not look like they have just been read.
-
-`-A, --append'
- Append to an existing archive. Only works in copy-out mode. The
- archive must be a disk file specified with the -O or -F (-file)
- option.
-
-`-b, --swap'
- Swap both halfwords of words and bytes of halfwords in the data.
- Equivalent to -sS. This option may be used in copy-in mode. Use
- this option to convert 32-bit integers between big-endian and
- little-endian machines.
-
-`-B'
- Set the I/O block size to 5120 bytes. Initially the block size is
- 512 bytes.
-
-`--block-size=BLOCK-SIZE'
- Set the I/O block size to BLOCK-SIZE * 512 bytes.
-
-`-c'
- Use the old portable (ASCII) archive format.
-
-`-C IO-SIZE, --io-size=IO-SIZE'
- Set the I/O block size to IO-SIZE bytes.
-
-`-d, --make-directories'
- Create leading directories where needed.
-
-`-E FILE, --pattern-file=FILE'
- Read additional patterns specifying filenames to extract or list
- from FILE. The lines of FILE are treated as if they had been
- non-option arguments to cpio. This option is used in copy-in mode,
-
-`-f, --nonmatching'
- Only copy files that do not match any of the given patterns.
-
-`-F, --file=archive'
- Archive filename to use instead of standard input or output. To
- use a tape drive on another machine as the archive, use a filename
- that starts with `HOSTNAME:'. The hostname can be preceded by a
- username and an `@' to access the remote tape drive as that user,
- if you have permission to do so (typically an entry in that user's
- `~/.rhosts' file).
-
-`--force-local'
- With -F, -I, or -O, take the archive file name to be a local file
- even if it contains a colon, which would ordinarily indicate a
- remote host name.
-
-`-H FORMAT, --format=FORMAT'
- Use archive format FORMAT. The valid formats are listed below;
- the same names are also recognized in all-caps. The default in
- copy-in mode is to automatically detect the archive format, and in
- copy-out mode is `bin'.
-
- `bin'
- The obsolete binary format.
-
- `odc'
- The old (POSIX.1) portable format.
-
- `newc'
- The new (SVR4) portable format, which supports file systems
- having more than 65536 i-nodes.
-
- `crc'
- The new (SVR4) portable format with a checksum added.
-
- `tar'
- The old tar format.
-
- `ustar'
- The POSIX.1 tar format. Also recognizes GNU tar archives,
- which are similar but not identical.
-
- `hpbin'
- The obsolete binary format used by HPUX's cpio (which stores
- device files differently).
-
- `hpodc'
- The portable format used by HPUX's cpio (which stores device
- files differently).
-
-`-i, --extract'
- Run in copy-in mode. *Note Copy-in mode::.
-
-`-I archive'
- Archive filename to use instead of standard input. To use a tape
- drive on another machine as the archive, use a filename that
- starts with `HOSTNAME:'. The hostname can be preceded by a
- username and an `@' to access the remote tape drive as that user,
- if you have permission to do so (typically an entry in that user's
- `~/.rhosts' file).
-
-`-k'
- Ignored; for compatibility with other versions of cpio.
-
-`-l, --link'
- Link files instead of copying them, when possible.
-
-`-L, --dereference'
- Copy the file that a symbolic link points to, rather than the
- symbolic link itself.
-
-`-m, --preserve-modification-time'
- Retain previous file modification times when creating files.
-
-`-M MESSAGE, --message=MESSAGE'
- Print MESSAGE when the end of a volume of the backup media (such
- as a tape or a floppy disk) is reached, to prompt the user to
- insert a new volume. If MESSAGE contains the string "%d", it is
- replaced by the current volume number (starting at 1).
-
-`-n, --numeric-uid-gid'
- Show numeric UID and GID instead of translating them into names
- when using the `--verbose option'.
-
-`--no-absolute-filenames'
- Create all files relative to the current directory in copy-in
- mode, even if they have an absolute file name in the archive.
-
-`--no-preserve-owner'
- Do not change the ownership of the files; leave them owned by the
- user extracting them. This is the default for non-root users, so
- that users on System V don't inadvertantly give away files. This
- option can be used in copy-in mode and copy-pass mode
-
-`-o, --create'
- Run in copy-out mode. *Note Copy-out mode::.
-
-`-O archive'
- Archive filename to use instead of standard output. To use a tape
- drive on another machine as the archive, use a filename that
- starts with `HOSTNAME:'. The hostname can be preceded by a
- username and an `@' to access the remote tape drive as that user,
- if you have permission to do so (typically an entry in that user's
- `~/.rhosts' file).
-
-`--only-verify-crc'
- Verify the CRC's of each file in the archive, when reading a CRC
- format archive. Don't actually extract the files.
-
-`-p, --pass-through'
- Run in copy-pass mode. *Note Copy-pass mode::.
-
-`--quiet'
- Do not print the number of blocks copied.
-
-`-r, --rename'
- Interactively rename files.
-
-`-R [user][:.][group], --owner [user][:.][group]'
- Set the ownership of all files created to the specified user and/or
- group in copy-out and copy-pass modes. Either the user, the
- group, or both, must be present. If the group is omitted but the
- ":" or "." separator is given, use the given user's login group.
- Only the super-user can change files' ownership.
-
-`--rsh-command=COMMAND'
- Notifies cpio that is should use COMMAND to communicate with remote
- devices.
-
-`-s, --swap-bytes'
- Swap the bytes of each halfword (pair of bytes) in the files.This
- option can be used in copy-in mode.
-
-`-S, --swap-halfwords'
- Swap the halfwords of each word (4 bytes) in the files. This
- option may be used in copy-in mode.
-
-`--sparse'
- Write files with large blocks of zeros as sparse files. This
- option is used in copy-in and copy-pass modes.
-
-`-t, --list'
- Print a table of contents of the input.
-
-`-u, --unconditional'
- Replace all files, without asking whether to replace existing
- newer files with older files.
-
-`-v, --verbose'
- List the files processed, or with `-t', give an `ls -l' style
- table of contents listing. In a verbose table of contents of a
- ustar archive, user and group names in the archive that do not
- exist on the local system are replaced by the names that
- correspond locally to the numeric UID and GID stored in the
- archive.
-
-`-V --dot'
- Print a `.' for each file processed.
-
-`--version'
- Print the cpio program version number and exit.
-
-
-File: cpio.info, Node: Media, Next: Reports, Prev: Invoking `cpio', Up: Top
-
-4 Magnetic Media
-****************
-
-Archives are usually written on removable media-tape cartridges, mag
-tapes, or floppy disks.
-
- The amount of data a tape or disk holds depends not only on its size,
-but also on how it is formatted. A 2400 foot long reel of mag tape
-holds 40 megabytes of data when formated at 1600 bits per inch. The
-physically smaller EXABYTE tape cartridge holds 2.3 gigabytes.
-
- Magnetic media are re-usable-once the archive on a tape is no longer
-needed, the archive can be erased and the tape or disk used over. Media
-quality does deteriorate with use, however. Most tapes or disks should
-be disgarded when they begin to produce data errors.
-
- Magnetic media are written and erased using magnetic fields, and
-should be protected from such fields to avoid damage to stored data.
-Sticking a floppy disk to a filing cabinet using a magnet is probably
-not a good idea.
-
-
-File: cpio.info, Node: Reports, Next: Concept Index, Prev: Media, Up: Top
-
-5 Reporting bugs or suggestions
-*******************************
-
-It is possible you will encounter a bug in `cpio'. If this happens, we
-would like to hear about it. As the purpose of bug reporting is to
-improve software, please be sure to include maximum information when
-reporting a bug. The information needed is:
-
- * Version of the package you are using.
-
- * Compilation options used when configuring the package.
-
- * Conditions under which the bug appears.
-
- Send your report to <bug-cpio at gnu.org>. Allow us a couple of days to
-answer.
-
-
-File: cpio.info, Node: Concept Index, Prev: Reports, Up: Top
-
-Concept Index
-*************
-
--* Menu:
-
-* command line options: Invoking `cpio'. (line 6)
-* copying directory structures: Tutorial. (line 6)
-* creating a cpio archive: Tutorial. (line 6)
-* extracting a cpio archive: Tutorial. (line 6)
-* invoking cpio: Invoking `cpio'. (line 6)
-* magnetic media: Media. (line 6)
-* passing directory structures: Tutorial. (line 6)
-
-
-
-Tag Table:
-Node: Top1008
-Node: Introduction1789
-Node: Tutorial2505
-Node: Invoking `cpio'6178
-Node: Copy-out mode6371
-Node: Copy-in mode7305
-Node: Copy-pass mode8692
-Node: Options9493
-Node: Media16769
-Node: Reports17750
-Node: Concept Index18381
-
-End Tag Table
--- contrib/cpio/doc/Makefile
+++ /dev/null
@@ -1,912 +0,0 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
-# doc/Makefile. Generated from Makefile.in by configure.
-
-# 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.
-
-
-
-# This file is part of GNU cpio
-# Copyright (C) 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; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-
-pkgdatadir = $(datadir)/cpio
-pkgincludedir = $(includedir)/cpio
-pkglibdir = $(libdir)/cpio
-pkglibexecdir = $(libexecdir)/cpio
-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 = x86_64-mbsd-freebsd6.0
-host_triplet = x86_64-mbsd-freebsd6.0
-subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/stamp-vti $(srcdir)/version.texi
-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/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/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/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/getcwd-abort-bug.m4 \
- $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
- $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 \
- $(top_srcdir)/m4/gnulib-common.m4 \
- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.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/longlong.m4 \
- $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbrtowc.m4 \
- $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mempcpy.m4 \
- $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mktime.m4 \
- $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.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/rmt.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/size_max.m4 \
- $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/ssize_t.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/strtol.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/time_h.m4 \
- $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/timespec.m4 \
- $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/ulonglong.m4 \
- $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/utimbuf.m4 \
- $(top_srcdir)/m4/utimens.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/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \
- $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.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 = $(srcdir)/cpio.info
-TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
-am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
-DVIS = cpio.dvi
-PDFS = cpio.pdf
-PSS = cpio.ps
-HTMLS = cpio.html
-TEXINFOS = cpio.texi
-TEXI2DVI = texi2dvi
-TEXI2PDF = $(TEXI2DVI) --pdf --batch
-MAKEINFOHTML = $(MAKEINFO) --html
-AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
-DVIPS = dvips
-am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
-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|^.*/||'`;
-man1dir = $(mandir)/man1
-NROFF = nroff
-MANS = $(man_MANS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ABSOLUTE_DIRENT_H =
-ABSOLUTE_FCNTL_H = "///usr/include/fcntl.h"
-ABSOLUTE_FLOAT_H =
-ABSOLUTE_INTTYPES_H = "///usr/include/inttypes.h"
-ABSOLUTE_STDINT_H = "///usr/include/stdint.h"
-ABSOLUTE_STDIO_H = "///usr/include/stdio.h"
-ABSOLUTE_STDLIB_H = "///usr/include/stdlib.h"
-ABSOLUTE_STRING_H = "///usr/include/string.h"
-ABSOLUTE_SYSEXITS_H = "///usr/include/sysexits.h"
-ABSOLUTE_SYS_STAT_H = "///usr/include/sys/stat.h"
-ABSOLUTE_SYS_TIME_H = "///usr/include/sys/time.h"
-ABSOLUTE_TIME_H = "///usr/include/time.h"
-ABSOLUTE_UNISTD_H = "///usr/include/unistd.h"
-ABSOLUTE_WCHAR_H =
-ABSOLUTE_WCTYPE_H = "///usr/include/wctype.h"
-ACLOCAL = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run aclocal-1.10a
-ALLOCA =
-ALLOCA_H = alloca.h
-AMTAR = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run tar
-AUTOCONF = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoheader
-AUTOM4TE = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autom4te
-AUTOMAKE = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run automake-1.10a
-AWK = nawk
-BITSIZEOF_PTRDIFF_T =
-BITSIZEOF_SIG_ATOMIC_T =
-BITSIZEOF_SIZE_T =
-BITSIZEOF_WCHAR_T =
-BITSIZEOF_WINT_T =
-CC = gcc -std=gnu99
-CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2
-CPIO_MT_PROG =
-CPP = gcc -E
-CPPFLAGS =
-CYGPATH_W = echo
-DEFAULT_RMT_COMMAND =
-DEFAULT_RMT_DIR = $(libexecdir)
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-DIRENT_H =
-ECHO_C =
-ECHO_N = -n
-ECHO_T =
-EGREP = /usr/bin/grep -E
-EOVERFLOW =
-EXEEXT =
-FCNTL_H = fcntl.h
-FLOAT_H =
-FNMATCH_H = fnmatch.h
-GETOPT_H = getopt.h
-GMSGFMT = /usr/local/bin/msgfmt
-GMSGFMT_015 = :
-GNULIB_CHOWN = 1
-GNULIB_DUP2 = 1
-GNULIB_FCHDIR = 1
-GNULIB_FFLUSH = 0
-GNULIB_FPRINTF_POSIX = 0
-GNULIB_FSEEK = 0
-GNULIB_FSEEKO = 0
-GNULIB_FTELL = 0
-GNULIB_FTELLO = 0
-GNULIB_FTRUNCATE = 0
-GNULIB_GETCWD = 1
-GNULIB_GETLOGIN_R = 0
-GNULIB_GETSUBOPT = 0
-GNULIB_IMAXABS = 0
-GNULIB_IMAXDIV = 0
-GNULIB_LSEEK = 0
-GNULIB_MBSCASECMP = 0
-GNULIB_MBSCASESTR = 0
-GNULIB_MBSCHR = 0
-GNULIB_MBSCSPN = 0
-GNULIB_MBSLEN = 0
-GNULIB_MBSNCASECMP = 0
-GNULIB_MBSPBRK = 0
-GNULIB_MBSPCASECMP = 0
-GNULIB_MBSRCHR = 0
-GNULIB_MBSSEP = 0
-GNULIB_MBSSPN = 0
-GNULIB_MBSSTR = 0
-GNULIB_MBSTOK_R = 0
-GNULIB_MEMMEM = 0
-GNULIB_MEMPCPY = 1
-GNULIB_MEMRCHR = 1
-GNULIB_MKDTEMP = 0
-GNULIB_MKSTEMP = 0
-GNULIB_PRINTF_POSIX = 0
-GNULIB_READLINK = 1
-GNULIB_SLEEP = 1
-GNULIB_SNPRINTF = 0
-GNULIB_SPRINTF_POSIX = 0
-GNULIB_STPCPY = 1
-GNULIB_STPNCPY = 0
-GNULIB_STRCASESTR = 0
-GNULIB_STRCHRNUL = 1
-GNULIB_STRDUP = 1
-GNULIB_STRNDUP = 1
-GNULIB_STRNLEN = 1
-GNULIB_STRPBRK = 0
-GNULIB_STRSEP = 0
-GNULIB_STRTOIMAX = 0
-GNULIB_STRTOK_R = 0
-GNULIB_STRTOUMAX = 0
-GNULIB_VASPRINTF = 0
-GNULIB_VFPRINTF_POSIX = 0
-GNULIB_VPRINTF_POSIX = 0
-GNULIB_VSNPRINTF = 1
-GNULIB_VSPRINTF_POSIX = 0
-GREP = /usr/bin/grep
-HAVE_DECL_GETLOGIN_R = 1
-HAVE_DECL_IMAXABS = 1
-HAVE_DECL_IMAXDIV = 1
-HAVE_DECL_MEMMEM = 1
-HAVE_DECL_MEMRCHR = 0
-HAVE_DECL_MKDIR = 1
-HAVE_DECL_SNPRINTF = 1
-HAVE_DECL_STRDUP = 1
-HAVE_DECL_STRNCASECMP = 1
-HAVE_DECL_STRNDUP = 1
-HAVE_DECL_STRNLEN = 0
-HAVE_DECL_STRTOIMAX = 1
-HAVE_DECL_STRTOK_R = 1
-HAVE_DECL_STRTOUMAX = 1
-HAVE_DECL_VSNPRINTF = 1
-HAVE_DUP2 = 1
-HAVE_FSEEKO = 1
-HAVE_FTELLO = 1
-HAVE_FTRUNCATE = 1
-HAVE_GETSUBOPT = 1
-HAVE_INTTYPES_H = 1
-HAVE_IO_H = 0
-HAVE_ISWCNTRL = 1
-HAVE_LONG_LONG_INT = 1
-HAVE_LSTAT = 1
-HAVE_MEMPCPY = 0
-HAVE_MKDTEMP = 1
-HAVE_READLINK = 1
-HAVE_SIGNED_SIG_ATOMIC_T =
-HAVE_SIGNED_WCHAR_T =
-HAVE_SIGNED_WINT_T =
-HAVE_SLEEP = 1
-HAVE_STDINT_H = 1
-HAVE_STPCPY = 1
-HAVE_STPNCPY = 1
-HAVE_STRCASECMP = 1
-HAVE_STRCASESTR = 1
-HAVE_STRCHRNUL = 0
-HAVE_STRNDUP = 1
-HAVE_STRPBRK = 1
-HAVE_STRSEP = 1
-HAVE_STRUCT_TIMEVAL = 1
-HAVE_SYSEXITS_H = 1
-HAVE_SYS_BITYPES_H =
-HAVE_SYS_INTTYPES_H =
-HAVE_SYS_TIME_H = 1
-HAVE_SYS_TYPES_H = 1
-HAVE_UNISTD_H = 1
-HAVE_UNSIGNED_LONG_LONG_INT = 1
-HAVE_VASPRINTF = 1
-HAVE_WCTYPE_H = 1
-HAVE_WINT_T = 1
-HAVE__BOOL = 1
-INSTALL = /usr/bin/install -c
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-INTLLIBS =
-INTL_MACOSX_LIBS =
-INTTYPES_H = inttypes.h
-LDFLAGS =
-LIBCPIO_LIBDEPS =
-LIBCPIO_LTLIBDEPS =
-LIBICONV = -liconv
-LIBINTL =
-LIBOBJS =
-LIBS =
-LIB_CLOCK_GETTIME =
-LIB_SETSOCKOPT =
-LTLIBICONV = -liconv
-LTLIBINTL =
-LTLIBOBJS =
-MAKEINFO = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run makeinfo
-MKDIR_P = ../build-aux/install-sh -c -d
-MSGFMT = /usr/local/bin/msgfmt
-MSGFMT_015 = :
-MSGMERGE = /usr/local/bin/msgmerge
-OBJEXT = o
-PACKAGE = cpio
-PACKAGE_BUGREPORT = bug-cpio at gnu.org
-PACKAGE_NAME = GNU cpio
-PACKAGE_STRING = GNU cpio 2.8
-PACKAGE_TARNAME = cpio
-PACKAGE_VERSION = 2.8
-PATH_SEPARATOR = :
-POSUB =
-PRIPTR_PREFIX = ""
-PRI_MACROS_BROKEN = 0
-PTRDIFF_T_SUFFIX =
-PU_RMT_PROG = rmt$(EXEEXT)
-RANLIB = ranlib
-REPLACE_CHOWN = 0
-REPLACE_FCHDIR = 0
-REPLACE_FFLUSH = 0
-REPLACE_FPRINTF = 0
-REPLACE_FSEEK = 0
-REPLACE_FSEEKO = 0
-REPLACE_FTELL = 0
-REPLACE_FTELLO = 0
-REPLACE_GETCWD = 1
-REPLACE_GETTIMEOFDAY = 0
-REPLACE_LOCALTIME_R = 0
-REPLACE_LSEEK = 0
-REPLACE_MKSTEMP = 0
-REPLACE_NANOSLEEP = GNULIB_PORTCHECK
-REPLACE_PRINTF = 0
-REPLACE_SNPRINTF = 0
-REPLACE_SPRINTF = 0
-REPLACE_STRPTIME = GNULIB_PORTCHECK
-REPLACE_TIMEGM = GNULIB_PORTCHECK
-REPLACE_VASPRINTF = 0
-REPLACE_VFPRINTF = 0
-REPLACE_VPRINTF = 0
-REPLACE_VSNPRINTF = 0
-REPLACE_VSPRINTF = 0
-SET_MAKE =
-SHELL = /bin/ksh
-SIG_ATOMIC_T_SUFFIX =
-SIZE_T_SUFFIX =
-STDBOOL_H =
-STDINT_H =
-STRIP =
-SYSEXITS_H =
-SYS_STAT_H = sys/stat.h
-SYS_TIME_H =
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = 0
-TIME_H_DEFINES_STRUCT_TIMESPEC = 1
-USE_NLS = no
-VERSION = 2.8
-WCHAR_H =
-WCHAR_T_SUFFIX =
-WCTYPE_H =
-WINT_T_SUFFIX =
-XGETTEXT = /usr/local/bin/xgettext
-XGETTEXT_015 = :
-YACC = byacc
-YFLAGS =
-abs_builddir = /home/laffer1/cpio/cpio-2.8/doc
-abs_srcdir = /home/laffer1/cpio/cpio-2.8/doc
-abs_top_builddir = /home/laffer1/cpio/cpio-2.8
-abs_top_srcdir = /home/laffer1/cpio/cpio-2.8
-ac_ct_CC = gcc
-am__include = include
-am__leading_dot = .
-am__quote =
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build = x86_64-mbsd-freebsd6.0
-build_alias = amd64-mbsd-freebsd6.0
-build_cpu = x86_64
-build_os = freebsd6.0
-build_vendor = mbsd
-builddir = .
-datadir = ${datarootdir}
-datarootdir = ${prefix}/share
-docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
-dvidir = ${docdir}
-exec_prefix = ${prefix}
-gl_LIBOBJS = __fpending.o argmatch.o asnprintf.o basename.o canonicalize-lgpl.o chdir-long.o close-stream.o closeout.o creat-safer.o dirname.o dup-safer.o error.o exitfail.o fchmodat.o fchownat.o fd-safer.o fnmatch.o getcwd.o getopt.o getopt1.o gettime.o hash.o imaxtostr.o lstat.o mempcpy.o memrchr.o mkdirat.o obstack.o offtostr.o open-safer.o openat.o openat-proc.o pipe-safer.o printf-args.o printf-parse.o quote.o quotearg.o safe-read.o safe-write.o save-cwd.o savedir.o strchrnul.o stripslash.o strnlen.o uinttostr.o umaxtostr.o utimens.o vasnprintf.o xgetcwd.o xmalloc.o
-gl_LTLIBOBJS = __fpending.lo argmatch.lo asnprintf.lo basename.lo canonicalize-lgpl.lo chdir-long.lo close-stream.lo closeout.lo creat-safer.lo dirname.lo dup-safer.lo error.lo exitfail.lo fchmodat.lo fchownat.lo fd-safer.lo fnmatch.lo getcwd.lo getopt.lo getopt1.lo gettime.lo hash.lo imaxtostr.lo lstat.lo mempcpy.lo memrchr.lo mkdirat.lo obstack.lo offtostr.lo open-safer.lo openat.lo openat-proc.lo pipe-safer.lo printf-args.lo printf-parse.lo quote.lo quotearg.lo safe-read.lo safe-write.lo save-cwd.lo savedir.lo strchrnul.lo stripslash.lo strnlen.lo uinttostr.lo umaxtostr.lo utimens.lo vasnprintf.lo xgetcwd.lo xmalloc.lo
-host = x86_64-mbsd-freebsd6.0
-host_alias =
-host_cpu = x86_64
-host_os = freebsd6.0
-host_vendor = mbsd
-htmldir = ${docdir}
-includedir = ${prefix}/include
-infodir = ${datarootdir}/info
-install_sh = $(SHELL) /home/laffer1/cpio/cpio-2.8/build-aux/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localedir = ${datarootdir}/locale
-localstatedir = ${prefix}/var
-mandir = ${datarootdir}/man
-mkdir_p = $(top_builddir)/build-aux/install-sh -c -d
-oldincludedir = /usr/include
-pdfdir = ${docdir}
-prefix = /usr/local
-program_transform_name = s,x,x,
-psdir = ${docdir}
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-srcdir = .
-sysconfdir = ${prefix}/etc
-target_alias = amd64-mbsd-freebsd6.0
-top_builddir = ..
-top_srcdir = ..
-info_TEXINFOS = cpio.texi
-man_MANS = cpio.1 mt.1
-EXTRA_DIST = $(man_MANS) gendocs_template
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .dvi .html .info .pdf .ps .texi
-$(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
-
-.texi.info:
- restore=: && backupdir="$(am__leading_dot)am$$$$" && \
- am__cwd=`pwd` && cd $(srcdir) && \
- rm -rf $$backupdir && mkdir $$backupdir && \
- if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
- for f in $@ $@-[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 && \
- cd "$$am__cwd"; \
- if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $@ $<; \
- then \
- rc=0; \
- cd $(srcdir); \
- else \
- rc=$$?; \
- cd $(srcdir) && \
- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
- fi; \
- rm -rf $$backupdir; exit $$rc
-
-.texi.dvi:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) $<
-
-.texi.pdf:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) $<
-
-.texi.html:
- rm -rf $(@:.html=.htp)
- if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $(@:.html=.htp) $<; \
- then \
- rm -rf $@; \
- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
- mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
- else \
- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
- rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
- exit 1; \
- fi
-$(srcdir)/cpio.info: cpio.texi $(srcdir)/version.texi
-cpio.dvi: cpio.texi $(srcdir)/version.texi
-cpio.pdf: cpio.texi $(srcdir)/version.texi
-cpio.html: cpio.texi $(srcdir)/version.texi
-$(srcdir)/version.texi: $(srcdir)/stamp-vti
-$(srcdir)/stamp-vti: cpio.texi $(top_srcdir)/configure
- @(dir=.; test -f ./cpio.texi || dir=$(srcdir); \
- set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/cpio.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)
- - at 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 cpio.aux cpio.cp cpio.cps cpio.fn cpio.fns cpio.ky cpio.kys cpio.log \
- cpio.pg cpio.pgs cpio.tmp cpio.toc cpio.tp cpio.tps cpio.vr \
- cpio.vrs cpio.dvi cpio.pdf cpio.ps cpio.html
-
-maintainer-clean-aminfo:
- @list='$(INFO_DEPS)'; for i in $$list; do \
- i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
- echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
- rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
- done
-install-man1: $(man1_MANS) $(man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-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) $(MANS)
-installdirs:
- for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am: $(DVIS)
-
-html: html-am
-
-html-am: $(HTMLS)
-
-info: info-am
-
-info-am: $(INFO_DEPS)
-
-install-data-am: install-info-am install-man
-
-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-man1
-
-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-man uninstall-pdf-am uninstall-ps-am
-
-uninstall-man: uninstall-man1
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic 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-man1 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-man \
- uninstall-man1 uninstall-pdf-am uninstall-ps-am
-
-
-# Make sure you set TEXINPUT
-manual:
- TEXINPUTS=$(srcdir):$(top_srcdir)/scripts:$$TEXINPUTS \
- gendocs.sh cpio 'GNU cpio 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:
--- contrib/cpio/config.log
+++ /dev/null
@@ -1,13120 +0,0 @@
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by GNU cpio configure 2.8, which was
-generated by GNU Autoconf 2.60. Invocation command line was
-
- $ ./configure --disable-nls --without-libiconv-prefix --without-libintl-prefix --build=amd64-mbsd-freebsd6.0 --target=amd64-mbsd-freebsd6.0
-
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = m5.midnightbsd.org
-uname -m = i386
-uname -r = 0.2-CURRENT
-uname -s = MidnightBSD
-uname -v = MidnightBSD 0.2-CURRENT #8: Sun Jul 15 23:21:22 EDT 2007 root at m5.midnightbsd.org:/usr/obj/usr/src/sys/GENERIC
-
-/usr/bin/uname -p = i386
-/bin/uname -X = unknown
-
-/bin/arch = unknown
-/usr/bin/arch -k = unknown
-/usr/convex/getsysinfo = unknown
-/usr/bin/hostinfo = unknown
-/bin/machine = unknown
-/usr/bin/oslevel = unknown
-/bin/universe = unknown
-
-PATH: /sbin
-PATH: /bin
-PATH: /usr/sbin
-PATH: /usr/bin
-PATH: /usr/games
-PATH: /usr/local/sbin
-PATH: /usr/local/bin
-PATH: /usr/X11R6/bin
-PATH: /root/bin
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-configure:2072: checking for a BSD-compatible install
-configure:2128: result: /usr/bin/install -c
-configure:2139: checking whether build environment is sane
-configure:2182: result: yes
-configure:2210: checking for a thread-safe mkdir -p
-configure:2249: result: build-aux/install-sh -c -d
-configure:2262: checking for gawk
-configure:2292: result: no
-configure:2262: checking for mawk
-configure:2292: result: no
-configure:2262: checking for nawk
-configure:2278: found /usr/bin/nawk
-configure:2289: result: nawk
-configure:2300: checking whether make sets $(MAKE)
-configure:2321: result: yes
-configure:2532: checking for style of include used by make
-configure:2560: result: GNU
-configure:2630: checking for gcc
-configure:2646: found /usr/bin/gcc
-configure:2657: result: gcc
-configure:2895: checking for C compiler version
-configure:2902: gcc --version >&5
-gcc (GCC) 3.4.4 [MidnightBSD] 20050518
-Copyright (C) 2004 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-configure:2905: $? = 0
-configure:2912: gcc -v >&5
-Using built-in specs.
-Configured with: FreeBSD/i386 system compiler
-Thread model: posix
-gcc version 3.4.4 [MidnightBSD] 20050518
-configure:2915: $? = 0
-configure:2922: gcc -V >&5
-gcc: `-V' option must have argument
-configure:2925: $? = 1
-configure:2948: checking for C compiler default output file name
-configure:2975: gcc conftest.c >&5
-configure:2978: $? = 0
-configure:3024: result: a.out
-configure:3029: checking whether the C compiler works
-configure:3039: ./a.out
-configure:3042: $? = 0
-configure:3059: result: yes
-configure:3066: checking whether we are cross compiling
-configure:3068: result: no
-configure:3071: checking for suffix of executables
-configure:3078: gcc -o conftest conftest.c >&5
-configure:3081: $? = 0
-configure:3105: result:
-configure:3111: checking for suffix of object files
-configure:3137: gcc -c conftest.c >&5
-configure:3140: $? = 0
-configure:3163: result: o
-configure:3167: checking whether we are using the GNU C compiler
-configure:3196: gcc -c conftest.c >&5
-configure:3202: $? = 0
-configure:3209: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:3212: $? = 0
-configure:3219: test -s conftest.o
-configure:3222: $? = 0
-configure:3236: result: yes
-configure:3241: checking whether gcc accepts -g
-configure:3271: gcc -c -g conftest.c >&5
-configure:3277: $? = 0
-configure:3284: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:3287: $? = 0
-configure:3294: test -s conftest.o
-configure:3297: $? = 0
-configure:3427: result: yes
-configure:3444: checking for gcc option to accept ISO C89
-configure:3518: gcc -c -g -O2 conftest.c >&5
-configure:3524: $? = 0
-configure:3531: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:3534: $? = 0
-configure:3541: test -s conftest.o
-configure:3544: $? = 0
-configure:3564: result: none needed
-configure:3584: checking dependency style of gcc
-configure:3675: result: gcc3
-configure:3696: checking how to run the C preprocessor
-configure:3736: gcc -E conftest.c
-configure:3742: $? = 0
-configure:3780: gcc -E conftest.c
-conftest.c:11:28: ac_nonexistent.h: No such file or directory
-configure:3786: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| /* end confdefs.h. */
-| #include <ac_nonexistent.h>
-configure:3826: result: gcc -E
-configure:3855: gcc -E conftest.c
-configure:3861: $? = 0
-configure:3899: gcc -E conftest.c
-conftest.c:11:28: ac_nonexistent.h: No such file or directory
-configure:3905: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| /* end confdefs.h. */
-| #include <ac_nonexistent.h>
-configure:3950: checking for grep that handles long lines and -e
-configure:4024: result: /usr/bin/grep
-configure:4029: checking for egrep
-configure:4107: result: /usr/bin/grep -E
-configure:4113: checking for AIX
-configure:4135: result: no
-configure:4141: checking for ANSI C header files
-configure:4171: gcc -c -g -O2 conftest.c >&5
-configure:4177: $? = 0
-configure:4184: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4187: $? = 0
-configure:4194: test -s conftest.o
-configure:4197: $? = 0
-configure:4293: gcc -o conftest -g -O2 conftest.c >&5
-configure:4296: $? = 0
-configure:4302: ./conftest
-configure:4305: $? = 0
-configure:4322: result: yes
-configure:4346: checking for sys/types.h
-configure:4367: gcc -c -g -O2 conftest.c >&5
-configure:4373: $? = 0
-configure:4380: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4383: $? = 0
-configure:4390: test -s conftest.o
-configure:4393: $? = 0
-configure:4406: result: yes
-configure:4346: checking for sys/stat.h
-configure:4367: gcc -c -g -O2 conftest.c >&5
-configure:4373: $? = 0
-configure:4380: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4383: $? = 0
-configure:4390: test -s conftest.o
-configure:4393: $? = 0
-configure:4406: result: yes
-configure:4346: checking for stdlib.h
-configure:4367: gcc -c -g -O2 conftest.c >&5
-configure:4373: $? = 0
-configure:4380: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4383: $? = 0
-configure:4390: test -s conftest.o
-configure:4393: $? = 0
-configure:4406: result: yes
-configure:4346: checking for string.h
-configure:4367: gcc -c -g -O2 conftest.c >&5
-configure:4373: $? = 0
-configure:4380: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4383: $? = 0
-configure:4390: test -s conftest.o
-configure:4393: $? = 0
-configure:4406: result: yes
-configure:4346: checking for memory.h
-configure:4367: gcc -c -g -O2 conftest.c >&5
-configure:4373: $? = 0
-configure:4380: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4383: $? = 0
-configure:4390: test -s conftest.o
-configure:4393: $? = 0
-configure:4406: result: yes
-configure:4346: checking for strings.h
-configure:4367: gcc -c -g -O2 conftest.c >&5
-configure:4373: $? = 0
-configure:4380: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4383: $? = 0
-configure:4390: test -s conftest.o
-configure:4393: $? = 0
-configure:4406: result: yes
-configure:4346: checking for inttypes.h
-configure:4367: gcc -c -g -O2 conftest.c >&5
-configure:4373: $? = 0
-configure:4380: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4383: $? = 0
-configure:4390: test -s conftest.o
-configure:4393: $? = 0
-configure:4406: result: yes
-configure:4346: checking for stdint.h
-configure:4367: gcc -c -g -O2 conftest.c >&5
-configure:4373: $? = 0
-configure:4380: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4383: $? = 0
-configure:4390: test -s conftest.o
-configure:4393: $? = 0
-configure:4406: result: yes
-configure:4346: checking for unistd.h
-configure:4367: gcc -c -g -O2 conftest.c >&5
-configure:4373: $? = 0
-configure:4380: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4383: $? = 0
-configure:4390: test -s conftest.o
-configure:4393: $? = 0
-configure:4406: result: yes
-configure:4428: checking minix/config.h usability
-configure:4445: gcc -c -g -O2 conftest.c >&5
-conftest.c:54:26: minix/config.h: No such file or directory
-configure:4451: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <minix/config.h>
-configure:4482: result: no
-configure:4486: checking minix/config.h presence
-configure:4501: gcc -E conftest.c
-conftest.c:21:26: minix/config.h: No such file or directory
-configure:4507: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| /* end confdefs.h. */
-| #include <minix/config.h>
-configure:4528: result: no
-configure:4561: checking for minix/config.h
-configure:4568: result: no
-configure:4607: checking whether it is safe to define __EXTENSIONS__
-configure:4635: gcc -c -g -O2 conftest.c >&5
-configure:4641: $? = 0
-configure:4648: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:4651: $? = 0
-configure:4658: test -s conftest.o
-configure:4661: $? = 0
-configure:4673: result: yes
-configure:4738: checking for gcc
-configure:4765: result: gcc
-configure:5003: checking for C compiler version
-configure:5010: gcc --version >&5
-gcc (GCC) 3.4.4 [MidnightBSD] 20050518
-Copyright (C) 2004 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-configure:5013: $? = 0
-configure:5020: gcc -v >&5
-Using built-in specs.
-Configured with: FreeBSD/i386 system compiler
-Thread model: posix
-gcc version 3.4.4 [MidnightBSD] 20050518
-configure:5023: $? = 0
-configure:5030: gcc -V >&5
-gcc: `-V' option must have argument
-configure:5033: $? = 1
-configure:5036: checking whether we are using the GNU C compiler
-configure:5105: result: yes
-configure:5110: checking whether gcc accepts -g
-configure:5296: result: yes
-configure:5313: checking for gcc option to accept ISO C89
-configure:5433: result: none needed
-configure:5453: checking dependency style of gcc
-configure:5544: result: gcc3
-configure:5564: checking how to run the C preprocessor
-configure:5694: result: gcc -E
-configure:5723: gcc -E conftest.c
-configure:5729: $? = 0
-configure:5767: gcc -E conftest.c
-conftest.c:24:28: ac_nonexistent.h: No such file or directory
-configure:5773: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| /* end confdefs.h. */
-| #include <ac_nonexistent.h>
-configure:5818: checking whether gcc needs -traditional
-conftest.c:24:20: termio.h: No such file or directory
-configure:5860: result: no
-configure:5880: checking for a BSD-compatible install
-configure:5936: result: /usr/bin/install -c
-configure:5990: checking for ranlib
-configure:6006: found /usr/bin/ranlib
-configure:6017: result: ranlib
-configure:6047: checking for bison
-configure:6077: result: no
-configure:6047: checking for byacc
-configure:6063: found /usr/bin/byacc
-configure:6074: result: byacc
-configure:6088: checking for gcc option to accept ISO C99
-configure:6218: gcc -c -g -O2 conftest.c >&5
-conftest.c:45: error: syntax error before "text"
-conftest.c: In function `test_restrict':
-conftest.c:50: error: 'for' loop initial declaration used outside C99 mode
-conftest.c:50: error: `text' undeclared (first use in this function)
-conftest.c:50: error: (Each undeclared identifier is reported only once
-conftest.c:50: error: for each function it appears in.)
-conftest.c: In function `main':
-conftest.c:101: error: syntax error before "newvar"
-conftest.c:110: error: 'for' loop initial declaration used outside C99 mode
-conftest.c:126: error: `newvar' undeclared (first use in this function)
-configure:6224: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| /* end confdefs.h. */
-| #include <stdarg.h>
-| #include <stdbool.h>
-| #include <stdlib.h>
-| #include <wchar.h>
-| #include <stdio.h>
-|
-| struct incomplete_array
-| {
-| int datasize;
-| double data[];
-| };
-|
-| struct named_init {
-| int number;
-| const wchar_t *name;
-| double average;
-| };
-|
-| typedef const char *ccp;
-|
-| static inline int
-| test_restrict(ccp restrict text)
-| {
-| // See if C++-style comments work.
-| // Iterate through items via the restricted pointer.
-| // Also check for declarations in for loops.
-| for (unsigned int i = 0; *(text+i) != '\0'; ++i)
-| continue;
-| return 0;
-| }
-|
-| // Check varargs and va_copy work.
-| static void
-| test_varargs(const char *format, ...)
-| {
-| va_list args;
-| va_start(args, format);
-| va_list args_copy;
-| va_copy(args_copy, args);
-|
-| const char *str;
-| int number;
-| float fnumber;
-|
-| while (*format)
-| {
-| switch (*format++)
-| {
-| case 's': // string
-| str = va_arg(args_copy, const char *);
-| break;
-| case 'd': // int
-| number = va_arg(args_copy, int);
-| break;
-| case 'f': // float
-| fnumber = (float) va_arg(args_copy, double);
-| break;
-| default:
-| break;
-| }
-| }
-| va_end(args_copy);
-| va_end(args);
-| }
-|
-| int
-| main ()
-| {
-|
-| // Check bool and long long datatypes.
-| _Bool success = false;
-| long long int bignum = -1234567890LL;
-| unsigned long long int ubignum = 1234567890uLL;
-|
-| // Check restrict.
-| if (test_restrict("String literal") != 0)
-| success = true;
-| char *restrict newvar = "Another string";
-|
-| // Check varargs.
-| test_varargs("s, d' f .", "string", 65, 34.234);
-|
-| // Check incomplete arrays work.
-| struct incomplete_array *ia =
-| malloc(sizeof(struct incomplete_array) + (sizeof(double) * 10));
-| ia->datasize = 10;
-| for (int i = 0; i < ia->datasize; ++i)
-| ia->data[i] = (double) i * 1.234;
-|
-| // Check named initialisers.
-| struct named_init ni = {
-| .number = 34,
-| .name = L"Test wide string",
-| .average = 543.34343,
-| };
-|
-| ni.number = 58;
-|
-| int dynamic_array[ni.number];
-| dynamic_array[43] = 543;
-|
-| // work around unused variable warnings
-| return bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x';
-|
-| ;
-| return 0;
-| }
-configure:6218: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:6224: $? = 0
-configure:6231: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:6234: $? = 0
-configure:6241: test -s conftest.o
-configure:6244: $? = 0
-configure:6271: result: -std=gnu99
-configure:6418: checking for gcc -std=gnu99 option to accept ISO Standard C
-configure:6429: result: -std=gnu99
-configure:6440: checking for function prototypes
-configure:6443: result: yes
-configure:6468: checking for special C compiler options needed for large files
-configure:6595: result: no
-configure:6601: checking for _FILE_OFFSET_BITS value needed for large files
-configure:6637: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:6643: $? = 0
-configure:6650: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:6653: $? = 0
-configure:6660: test -s conftest.o
-configure:6663: $? = 0
-configure:6744: result: no
-configure:6754: checking for _LARGE_FILES value needed for large files
-configure:6790: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:6796: $? = 0
-configure:6803: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:6806: $? = 0
-configure:6813: test -s conftest.o
-configure:6816: $? = 0
-configure:6897: result: no
-configure:6910: checking return type of signal handlers
-configure:6938: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:32: error: void value not ignored as it ought to be
-configure:6944: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| /* end confdefs.h. */
-| #include <sys/types.h>
-| #include <signal.h>
-|
-| int
-| main ()
-| {
-| return *(signal (0, 0)) (0) == 1;
-| ;
-| return 0;
-| }
-configure:6976: result: void
-configure:6984: checking whether sys/types.h defines makedev
-configure:7010: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:7016: $? = 0
-configure:7023: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:7026: $? = 0
-configure:7033: test -s conftest
-configure:7036: $? = 0
-configure:7050: result: yes
-configure:7385: checking for an ANSI C-conforming const
-configure:7460: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:7466: $? = 0
-configure:7473: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:7476: $? = 0
-configure:7483: test -s conftest.o
-configure:7486: $? = 0
-configure:7498: result: yes
-configure:7508: checking for uid_t in sys/types.h
-configure:7531: result: yes
-configure:7546: checking for gid_t
-configure:7576: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:7582: $? = 0
-configure:7589: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:7592: $? = 0
-configure:7599: test -s conftest.o
-configure:7602: $? = 0
-configure:7614: result: yes
-configure:7626: checking for ANSI C header files
-configure:7807: result: yes
-configure:7825: checking for dirent.h that defines DIR
-configure:7854: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:7860: $? = 0
-configure:7867: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:7870: $? = 0
-configure:7877: test -s conftest.o
-configure:7880: $? = 0
-configure:7893: result: yes
-configure:7906: checking for library containing opendir
-configure:7947: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:7953: $? = 0
-configure:7960: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:7963: $? = 0
-configure:7970: test -s conftest
-configure:7973: $? = 0
-configure:7997: result: none required
-configure:8113: checking for fchmod
-configure:8169: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:8175: $? = 0
-configure:8182: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:8185: $? = 0
-configure:8192: test -s conftest
-configure:8195: $? = 0
-configure:8209: result: yes
-configure:8113: checking for fchown
-configure:8169: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:8175: $? = 0
-configure:8182: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:8185: $? = 0
-configure:8192: test -s conftest
-configure:8195: $? = 0
-configure:8209: result: yes
-configure:8223: checking for working alloca.h
-configure:8250: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c:31:20: alloca.h: No such file or directory
-conftest.c: In function `main':
-conftest.c:35: warning: implicit declaration of function `alloca'
-configure:8256: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| /* end confdefs.h. */
-| #include <alloca.h>
-| int
-| main ()
-| {
-| char *p = (char *) alloca (2 * sizeof (int));
-| if (p) return 0;
-| ;
-| return 0;
-| }
-configure:8289: result: no
-configure:8299: checking for alloca
-configure:8346: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:8352: $? = 0
-configure:8359: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:8362: $? = 0
-configure:8369: test -s conftest
-configure:8372: $? = 0
-configure:8385: result: yes
-configure:8634: checking for stdlib.h
-configure:8640: result: yes
-configure:8798: checking for GNU libc compatible malloc
-configure:8832: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:8835: $? = 0
-configure:8841: ./conftest
-configure:8844: $? = 0
-configure:8860: result: yes
-configure:8876: checking for long long int
-configure:8909: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:8915: $? = 0
-configure:8922: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:8925: $? = 0
-configure:8932: test -s conftest
-configure:8935: $? = 0
-configure:8976: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:8979: $? = 0
-configure:8985: ./conftest
-configure:8988: $? = 0
-configure:9013: result: yes
-configure:9023: checking for inline
-configure:9049: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:9055: $? = 0
-configure:9062: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:9065: $? = 0
-configure:9072: test -s conftest.o
-configure:9075: $? = 0
-configure:9090: result: inline
-configure:9109: checking for C/C++ restrict keyword
-configure:9145: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:9151: $? = 0
-configure:9158: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:9161: $? = 0
-configure:9168: test -s conftest.o
-configure:9171: $? = 0
-configure:9186: result: restrict
-configure:9202: checking whether getenv is declared
-configure:9232: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:9238: $? = 0
-configure:9245: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:9248: $? = 0
-configure:9255: test -s conftest.o
-configure:9258: $? = 0
-configure:9270: result: yes
-configure:9290: checking whether clearerr_unlocked is declared
-configure:9320: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:9326: $? = 0
-configure:9333: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:9336: $? = 0
-configure:9343: test -s conftest.o
-configure:9346: $? = 0
-configure:9358: result: yes
-configure:9378: checking whether feof_unlocked is declared
-configure:9408: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:9414: $? = 0
-configure:9421: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:9424: $? = 0
-configure:9431: test -s conftest.o
-configure:9434: $? = 0
-configure:9446: result: yes
-configure:9466: checking whether ferror_unlocked is declared
-configure:9496: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:9502: $? = 0
-configure:9509: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:9512: $? = 0
-configure:9519: test -s conftest.o
-configure:9522: $? = 0
-configure:9534: result: yes
-configure:9554: checking whether fflush_unlocked is declared
-configure:9584: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:76: error: `fflush_unlocked' undeclared (first use in this function)
-conftest.c:76: error: (Each undeclared identifier is reported only once
-conftest.c:76: error: for each function it appears in.)
-configure:9590: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| #ifndef fflush_unlocked
-| char *p = (char *) fflush_unlocked;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:9622: result: no
-configure:9642: checking whether fgets_unlocked is declared
-configure:9672: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:77: error: `fgets_unlocked' undeclared (first use in this function)
-conftest.c:77: error: (Each undeclared identifier is reported only once
-conftest.c:77: error: for each function it appears in.)
-configure:9678: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| #ifndef fgets_unlocked
-| char *p = (char *) fgets_unlocked;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:9710: result: no
-configure:9730: checking whether fputc_unlocked is declared
-configure:9760: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:78: error: `fputc_unlocked' undeclared (first use in this function)
-conftest.c:78: error: (Each undeclared identifier is reported only once
-conftest.c:78: error: for each function it appears in.)
-configure:9766: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| #ifndef fputc_unlocked
-| char *p = (char *) fputc_unlocked;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:9798: result: no
-configure:9818: checking whether fputs_unlocked is declared
-configure:9848: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:79: error: `fputs_unlocked' undeclared (first use in this function)
-conftest.c:79: error: (Each undeclared identifier is reported only once
-conftest.c:79: error: for each function it appears in.)
-configure:9854: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| #ifndef fputs_unlocked
-| char *p = (char *) fputs_unlocked;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:9886: result: no
-configure:9906: checking whether fread_unlocked is declared
-configure:9936: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:80: error: `fread_unlocked' undeclared (first use in this function)
-conftest.c:80: error: (Each undeclared identifier is reported only once
-conftest.c:80: error: for each function it appears in.)
-configure:9942: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| #ifndef fread_unlocked
-| char *p = (char *) fread_unlocked;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:9974: result: no
-configure:9994: checking whether fwrite_unlocked is declared
-configure:10024: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:81: error: `fwrite_unlocked' undeclared (first use in this function)
-conftest.c:81: error: (Each undeclared identifier is reported only once
-conftest.c:81: error: for each function it appears in.)
-configure:10030: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| #ifndef fwrite_unlocked
-| char *p = (char *) fwrite_unlocked;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:10062: result: no
-configure:10082: checking whether getc_unlocked is declared
-configure:10112: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10118: $? = 0
-configure:10125: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10128: $? = 0
-configure:10135: test -s conftest.o
-configure:10138: $? = 0
-configure:10150: result: yes
-configure:10170: checking whether getchar_unlocked is declared
-configure:10200: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10206: $? = 0
-configure:10213: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10216: $? = 0
-configure:10223: test -s conftest.o
-configure:10226: $? = 0
-configure:10238: result: yes
-configure:10258: checking whether putc_unlocked is declared
-configure:10288: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10294: $? = 0
-configure:10301: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10304: $? = 0
-configure:10311: test -s conftest.o
-configure:10314: $? = 0
-configure:10326: result: yes
-configure:10346: checking whether putchar_unlocked is declared
-configure:10376: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10382: $? = 0
-configure:10389: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10392: $? = 0
-configure:10399: test -s conftest.o
-configure:10402: $? = 0
-configure:10414: result: yes
-configure:10441: checking for flockfile
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for funlockfile
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for canonicalize_file_name
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//ccD5hubM.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:85: undefined reference to `canonicalize_file_name'
-configure:10503: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| /* end confdefs.h. */
-| /* Define canonicalize_file_name to an innocuous variant, in case <limits.h> declares canonicalize_file_name.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define canonicalize_file_name innocuous_canonicalize_file_name
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char canonicalize_file_name (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef canonicalize_file_name
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char canonicalize_file_name ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_canonicalize_file_name || defined __stub___canonicalize_file_name
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return canonicalize_file_name ();
-| ;
-| return 0;
-| }
-configure:10537: result: no
-configure:10441: checking for getcwd
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for readlink
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for dup2
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for fchdir
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for btowc
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for iswctype
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for mbsrtowcs
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for mempcpy
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c:81: warning: conflicting types for built-in function 'mempcpy'
-/var/tmp//ccPKXpZZ.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:92: undefined reference to `mempcpy'
-configure:10503: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| /* end confdefs.h. */
-| /* Define mempcpy to an innocuous variant, in case <limits.h> declares mempcpy.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define mempcpy innocuous_mempcpy
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char mempcpy (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef mempcpy
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char mempcpy ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_mempcpy || defined __stub___mempcpy
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return mempcpy ();
-| ;
-| return 0;
-| }
-configure:10537: result: no
-configure:10441: checking for wmemchr
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for wmemcpy
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for wmempcpy
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//ccPIPtrn.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:94: undefined reference to `wmempcpy'
-configure:10503: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| /* end confdefs.h. */
-| /* Define wmempcpy to an innocuous variant, in case <limits.h> declares wmempcpy.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define wmempcpy innocuous_wmempcpy
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char wmempcpy (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef wmempcpy
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char wmempcpy ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_wmempcpy || defined __stub___wmempcpy
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return wmempcpy ();
-| ;
-| return 0;
-| }
-configure:10537: result: no
-configure:10441: checking for gettimeofday
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for nanotime
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//ccBrctul.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:95: undefined reference to `nanotime'
-configure:10503: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| /* end confdefs.h. */
-| /* Define nanotime to an innocuous variant, in case <limits.h> declares nanotime.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define nanotime innocuous_nanotime
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char nanotime (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef nanotime
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char nanotime ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_nanotime || defined __stub___nanotime
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return nanotime ();
-| ;
-| return 0;
-| }
-configure:10537: result: no
-configure:10441: checking for alarm
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for lchmod
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for fdopendir
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//ccPObZ2K.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:97: undefined reference to `fdopendir'
-configure:10503: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| /* end confdefs.h. */
-| /* Define fdopendir to an innocuous variant, in case <limits.h> declares fdopendir.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define fdopendir innocuous_fdopendir
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char fdopendir (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef fdopendir
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char fdopendir ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_fdopendir || defined __stub___fdopendir
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return fdopendir ();
-| ;
-| return 0;
-| }
-configure:10537: result: no
-configure:10441: checking for mbsinit
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for setenv
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for sleep
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for strerror
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for lstat
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for pipe
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for futimes
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for futimesat
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//cc4HsFd2.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:104: undefined reference to `futimesat'
-configure:10503: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| /* end confdefs.h. */
-| /* Define futimesat to an innocuous variant, in case <limits.h> declares futimesat.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define futimesat innocuous_futimesat
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char futimesat (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef futimesat
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char futimesat ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_futimesat || defined __stub___futimesat
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return futimesat ();
-| ;
-| return 0;
-| }
-configure:10537: result: no
-configure:10441: checking for vasnprintf
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//ccRqeQ8u.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:104: undefined reference to `vasnprintf'
-configure:10503: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| /* end confdefs.h. */
-| /* Define vasnprintf to an innocuous variant, in case <limits.h> declares vasnprintf.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define vasnprintf innocuous_vasnprintf
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char vasnprintf (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef vasnprintf
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char vasnprintf ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_vasnprintf || defined __stub___vasnprintf
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return vasnprintf ();
-| ;
-| return 0;
-| }
-configure:10537: result: no
-configure:10441: checking for iswcntrl
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for mkfifo
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10441: checking for setlocale
-configure:10497: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:10503: $? = 0
-configure:10510: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10513: $? = 0
-configure:10520: test -s conftest
-configure:10523: $? = 0
-configure:10537: result: yes
-configure:10577: checking features.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:106:22: features.h: No such file or directory
-configure:10600: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <features.h>
-configure:10631: result: no
-configure:10635: checking features.h presence
-configure:10650: gcc -E conftest.c
-conftest.c:73:22: features.h: No such file or directory
-configure:10656: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| /* end confdefs.h. */
-| #include <features.h>
-configure:10677: result: no
-configure:10710: checking for features.h
-configure:10718: result: no
-configure:10577: checking linewrap.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:106:22: linewrap.h: No such file or directory
-configure:10600: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <linewrap.h>
-configure:10631: result: no
-configure:10635: checking linewrap.h presence
-configure:10650: gcc -E conftest.c
-conftest.c:73:22: linewrap.h: No such file or directory
-configure:10656: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| /* end confdefs.h. */
-| #include <linewrap.h>
-configure:10677: result: no
-configure:10710: checking for linewrap.h
-configure:10718: result: no
-configure:10577: checking sys/param.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking sys/param.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for sys/param.h
-configure:10718: result: yes
-configure:10567: checking for unistd.h
-configure:10573: result: yes
-configure:10577: checking dirent.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking dirent.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for dirent.h
-configure:10718: result: yes
-configure:10577: checking fcntl.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking fcntl.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for fcntl.h
-configure:10718: result: yes
-configure:10577: checking float.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking float.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for float.h
-configure:10718: result: yes
-configure:10577: checking wctype.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking wctype.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for wctype.h
-configure:10718: result: yes
-configure:10577: checking stdio_ext.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:112:23: stdio_ext.h: No such file or directory
-configure:10600: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <stdio_ext.h>
-configure:10631: result: no
-configure:10635: checking stdio_ext.h presence
-configure:10650: gcc -E conftest.c
-conftest.c:79:23: stdio_ext.h: No such file or directory
-configure:10656: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| /* end confdefs.h. */
-| #include <stdio_ext.h>
-configure:10677: result: no
-configure:10710: checking for stdio_ext.h
-configure:10718: result: no
-configure:10577: checking sys/time.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking sys/time.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for sys/time.h
-configure:10718: result: yes
-configure:10567: checking for stdint.h
-configure:10573: result: yes
-configure:10567: checking for inttypes.h
-configure:10573: result: yes
-configure:10577: checking stdio.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking stdio.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for stdio.h
-configure:10718: result: yes
-configure:10567: checking for stdlib.h
-configure:10573: result: yes
-configure:10567: checking for string.h
-configure:10573: result: yes
-configure:10567: checking for sys/stat.h
-configure:10573: result: yes
-configure:10577: checking sysexits.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking sysexits.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for sysexits.h
-configure:10718: result: yes
-configure:10577: checking time.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking time.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for time.h
-configure:10718: result: yes
-configure:10577: checking utime.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking utime.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for utime.h
-configure:10718: result: yes
-configure:10577: checking wchar.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking wchar.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for wchar.h
-configure:10718: result: yes
-configure:10577: checking net/errno.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:123:23: net/errno.h: No such file or directory
-configure:10600: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <net/errno.h>
-configure:10631: result: no
-configure:10635: checking net/errno.h presence
-configure:10650: gcc -E conftest.c
-conftest.c:90:23: net/errno.h: No such file or directory
-configure:10656: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| /* end confdefs.h. */
-| #include <net/errno.h>
-configure:10677: result: no
-configure:10710: checking for net/errno.h
-configure:10718: result: no
-configure:10577: checking sys/inet.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:123:22: sys/inet.h: No such file or directory
-configure:10600: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/inet.h>
-configure:10631: result: no
-configure:10635: checking sys/inet.h presence
-configure:10650: gcc -E conftest.c
-conftest.c:90:22: sys/inet.h: No such file or directory
-configure:10656: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| /* end confdefs.h. */
-| #include <sys/inet.h>
-configure:10677: result: no
-configure:10710: checking for sys/inet.h
-configure:10718: result: no
-configure:10577: checking netdb.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking netdb.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for netdb.h
-configure:10718: result: yes
-configure:10567: checking for memory.h
-configure:10573: result: yes
-configure:10577: checking sys/wait.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking sys/wait.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for sys/wait.h
-configure:10718: result: yes
-configure:10577: checking sys/gentape.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:126:25: sys/gentape.h: No such file or directory
-configure:10600: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/gentape.h>
-configure:10631: result: no
-configure:10635: checking sys/gentape.h presence
-configure:10650: gcc -E conftest.c
-conftest.c:93:25: sys/gentape.h: No such file or directory
-configure:10656: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| /* end confdefs.h. */
-| #include <sys/gentape.h>
-configure:10677: result: no
-configure:10710: checking for sys/gentape.h
-configure:10718: result: no
-configure:10577: checking sys/tape.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:126:22: sys/tape.h: No such file or directory
-configure:10600: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/tape.h>
-configure:10631: result: no
-configure:10635: checking sys/tape.h presence
-configure:10650: gcc -E conftest.c
-conftest.c:93:22: sys/tape.h: No such file or directory
-configure:10656: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| /* end confdefs.h. */
-| #include <sys/tape.h>
-configure:10677: result: no
-configure:10710: checking for sys/tape.h
-configure:10718: result: no
-configure:10577: checking sys/device.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:126:24: sys/device.h: No such file or directory
-configure:10600: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/device.h>
-configure:10631: result: no
-configure:10635: checking sys/device.h presence
-configure:10650: gcc -E conftest.c
-conftest.c:93:24: sys/device.h: No such file or directory
-configure:10656: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| /* end confdefs.h. */
-| #include <sys/device.h>
-configure:10677: result: no
-configure:10710: checking for sys/device.h
-configure:10718: result: no
-configure:10577: checking sys/tprintf.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:126:25: sys/tprintf.h: No such file or directory
-configure:10600: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/tprintf.h>
-configure:10631: result: no
-configure:10635: checking sys/tprintf.h presence
-configure:10650: gcc -E conftest.c
-conftest.c:93:25: sys/tprintf.h: No such file or directory
-configure:10656: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| /* end confdefs.h. */
-| #include <sys/tprintf.h>
-configure:10677: result: no
-configure:10710: checking for sys/tprintf.h
-configure:10718: result: no
-configure:10577: checking sys/mtio.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking sys/mtio.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for sys/mtio.h
-configure:10718: result: yes
-configure:10577: checking sgtty.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking sgtty.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for sgtty.h
-configure:10718: result: yes
-configure:10577: checking sys/io/trioctl.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:128:28: sys/io/trioctl.h: No such file or directory
-configure:10600: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <sys/io/trioctl.h>
-configure:10631: result: no
-configure:10635: checking sys/io/trioctl.h presence
-configure:10650: gcc -E conftest.c
-conftest.c:95:28: sys/io/trioctl.h: No such file or directory
-configure:10656: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| /* end confdefs.h. */
-| #include <sys/io/trioctl.h>
-configure:10677: result: no
-configure:10710: checking for sys/io/trioctl.h
-configure:10718: result: no
-configure:10577: checking locale.h usability
-configure:10594: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:10600: $? = 0
-configure:10607: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:10610: $? = 0
-configure:10617: test -s conftest.o
-configure:10620: $? = 0
-configure:10631: result: yes
-configure:10635: checking locale.h presence
-configure:10650: gcc -E conftest.c
-configure:10656: $? = 0
-configure:10677: result: yes
-configure:10710: checking for locale.h
-configure:10718: result: yes
-configure:10743: checking whether canonicalize_file_name is declared
-configure:10773: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:133: error: `canonicalize_file_name' undeclared (first use in this function)
-conftest.c:133: error: (Each undeclared identifier is reported only once
-conftest.c:133: error: for each function it appears in.)
-configure:10779: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| #ifndef canonicalize_file_name
-| char *p = (char *) canonicalize_file_name;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:10811: result: no
-configure:10885: checking for unistd.h
-configure:10891: result: yes
-configure:11049: checking for working chown
-configure:11092: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:11095: $? = 0
-configure:11101: ./conftest
-configure:11104: $? = 0
-configure:11122: result: yes
-configure:11133: checking whether chown(2) dereferences symlinks
-configure:11176: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:11179: $? = 0
-configure:11185: ./conftest
-configure:11188: $? = 0
-configure:11206: result: yes
-configure:11218: checking whether system is Windows or MSDOS
-configure:11247: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:104: error: syntax error before "MSDOS"
-configure:11253: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| /* end confdefs.h. */
-|
-| int
-| main ()
-| {
-| #if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
-| neither MSDOS nor Windows
-| #endif
-| ;
-| return 0;
-| }
-configure:11286: result: no
-configure:11400: checking build system type
-configure:11418: result: x86_64-mbsd-freebsd6.0
-configure:11440: checking host system type
-configure:11455: result: x86_64-mbsd-freebsd6.0
-configure:11479: checking whether // is distinct from /
-configure:11508: result: no
-configure:11524: checking whether strerror_r is declared
-configure:11554: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:11560: $? = 0
-configure:11567: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:11570: $? = 0
-configure:11577: test -s conftest.o
-configure:11580: $? = 0
-configure:11592: result: yes
-configure:11614: checking for strerror_r
-configure:11670: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:11676: $? = 0
-configure:11683: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:11686: $? = 0
-configure:11693: test -s conftest
-configure:11696: $? = 0
-configure:11710: result: yes
-configure:11720: checking whether strerror_r returns char *
-configure:11754: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:142: error: invalid type argument of `unary *'
-conftest.c:143: warning: initialization makes pointer from integer without a cast
-configure:11760: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-|
-| char buf[100];
-| char x = *strerror_r (0, buf, sizeof buf);
-| char *p = strerror_r (0, buf, sizeof buf);
-| return !p || x;
-|
-| ;
-| return 0;
-| }
-configure:11853: result: no
-configure:11887: checking for mbstate_t
-configure:11914: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:11920: $? = 0
-configure:11927: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:11930: $? = 0
-configure:11937: test -s conftest.o
-configure:11940: $? = 0
-configure:11952: result: yes
-configure:12022: checking whether getcwd (NULL, 0) allocates memory for result
-configure:12060: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:12063: $? = 0
-configure:12069: ./conftest
-configure:12072: $? = 0
-configure:12088: result: yes
-configure:12092: checking whether getcwd is declared
-configure:12122: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:12128: $? = 0
-configure:12135: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:12138: $? = 0
-configure:12145: test -s conftest.o
-configure:12148: $? = 0
-configure:12160: result: yes
-configure:12179: checking for stdbool.h that conforms to C99
-configure:12272: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:12278: $? = 0
-configure:12285: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:12288: $? = 0
-configure:12295: test -s conftest.o
-configure:12298: $? = 0
-configure:12310: result: yes
-configure:12312: checking for _Bool
-configure:12342: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:12348: $? = 0
-configure:12355: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:12358: $? = 0
-configure:12365: test -s conftest.o
-configure:12368: $? = 0
-configure:12380: result: yes
-configure:12425: checking for compound literals
-configure:12452: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:108: error: initializer element is not constant
-configure:12458: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| /* end confdefs.h. */
-| struct s { int i, j; }; struct s s = (struct s) { 1, 2 };
-| int
-| main ()
-| {
-| struct s t = (struct s) { 3, 4 };
-| if (t.i != 0) return 0;
-| ;
-| return 0;
-| }
-configure:12490: result: no
-configure:12500: checking whether struct tm is in sys/time.h or time.h
-configure:12528: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:12534: $? = 0
-configure:12541: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:12544: $? = 0
-configure:12551: test -s conftest.o
-configure:12554: $? = 0
-configure:12566: result: time.h
-configure:12577: checking for struct tm.tm_gmtoff
-configure:12606: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:12612: $? = 0
-configure:12619: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:12622: $? = 0
-configure:12629: test -s conftest.o
-configure:12632: $? = 0
-configure:12704: result: yes
-configure:12732: checking getopt.h usability
-configure:12749: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:12755: $? = 0
-configure:12762: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:12765: $? = 0
-configure:12772: test -s conftest.o
-configure:12775: $? = 0
-configure:12786: result: yes
-configure:12790: checking getopt.h presence
-configure:12805: gcc -E conftest.c
-configure:12811: $? = 0
-configure:12832: result: yes
-configure:12865: checking for getopt.h
-configure:12873: result: yes
-configure:12895: checking for getopt_long_only
-configure:12951: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:12957: $? = 0
-configure:12964: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:12967: $? = 0
-configure:12974: test -s conftest
-configure:12977: $? = 0
-configure:12991: result: yes
-configure:13006: checking whether optreset is declared
-configure:13037: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:13043: $? = 0
-configure:13050: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:13053: $? = 0
-configure:13060: test -s conftest.o
-configure:13063: $? = 0
-configure:13075: result: yes
-configure:13259: checking absolute name of <sys/time.h>
-configure:13284: result: ///usr/include/sys/time.h
-configure:13300: checking for struct timeval
-configure:13330: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:13336: $? = 0
-configure:13343: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:13346: $? = 0
-configure:13353: test -s conftest.o
-configure:13356: $? = 0
-configure:13368: result: yes
-configure:13389: checking for off_t
-configure:13419: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:13425: $? = 0
-configure:13432: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:13435: $? = 0
-configure:13442: test -s conftest.o
-configure:13445: $? = 0
-configure:13457: result: yes
-configure:13470: checking for unsigned long long int
-configure:13501: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:13507: $? = 0
-configure:13514: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:13517: $? = 0
-configure:13524: test -s conftest
-configure:13527: $? = 0
-configure:13540: result: yes
-configure:13588: checking absolute name of <stdint.h>
-configure:13613: result: ///usr/include/stdint.h
-configure:13630: checking whether stdint.h conforms to C99
-configure:13782: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:13788: $? = 0
-configure:13795: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:13798: $? = 0
-configure:13805: test -s conftest.o
-configure:13808: $? = 0
-configure:13820: result: yes
-configure:14718: checking for inttypes.h
-configure:14724: result: yes
-configure:14883: checking whether the inttypes.h PRIxNN macros are broken
-configure:14914: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:14920: $? = 0
-configure:14927: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:14930: $? = 0
-configure:14937: test -s conftest.o
-configure:14940: $? = 0
-configure:14953: result: no
-configure:14969: checking whether imaxabs is declared
-configure:14999: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:15005: $? = 0
-configure:15012: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:15015: $? = 0
-configure:15022: test -s conftest.o
-configure:15025: $? = 0
-configure:15037: result: yes
-configure:15057: checking whether imaxdiv is declared
-configure:15087: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:15093: $? = 0
-configure:15100: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:15103: $? = 0
-configure:15110: test -s conftest.o
-configure:15113: $? = 0
-configure:15125: result: yes
-configure:15145: checking whether strtoimax is declared
-configure:15175: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:15181: $? = 0
-configure:15188: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:15191: $? = 0
-configure:15198: test -s conftest.o
-configure:15201: $? = 0
-configure:15213: result: yes
-configure:15233: checking whether strtoumax is declared
-configure:15263: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:15269: $? = 0
-configure:15276: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:15279: $? = 0
-configure:15286: test -s conftest.o
-configure:15289: $? = 0
-configure:15301: result: yes
-configure:15337: checking whether lchown is declared
-configure:15367: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:15373: $? = 0
-configure:15380: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:15383: $? = 0
-configure:15390: test -s conftest.o
-configure:15393: $? = 0
-configure:15405: result: yes
-configure:15469: checking whether memrchr is declared
-configure:15499: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:157: error: `memrchr' undeclared (first use in this function)
-conftest.c:157: error: (Each undeclared identifier is reported only once
-conftest.c:157: error: for each function it appears in.)
-configure:15505: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| #ifndef memrchr
-| char *p = (char *) memrchr;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:15537: result: no
-configure:15581: checking for ssize_t
-configure:15608: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:15614: $? = 0
-configure:15621: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:15624: $? = 0
-configure:15631: test -s conftest.o
-configure:15634: $? = 0
-configure:15646: result: yes
-configure:15724: checking whether strdup is declared
-configure:15754: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:15760: $? = 0
-configure:15767: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:15770: $? = 0
-configure:15777: test -s conftest.o
-configure:15780: $? = 0
-configure:15792: result: yes
-configure:15826: checking absolute name of <string.h>
-configure:15851: result: ///usr/include/string.h
-configure:15862: checking whether strndup is declared
-configure:15892: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:15898: $? = 0
-configure:15905: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:15908: $? = 0
-configure:15915: test -s conftest.o
-configure:15918: $? = 0
-configure:15930: result: yes
-configure:15950: checking whether strnlen is declared
-configure:15980: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:161: error: `strnlen' undeclared (first use in this function)
-conftest.c:161: error: (Each undeclared identifier is reported only once
-conftest.c:161: error: for each function it appears in.)
-configure:15986: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| #ifndef strnlen
-| char *p = (char *) strnlen;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:16018: result: no
-configure:16043: checking whether stat file-mode macros are broken
-configure:16091: result: no
-configure:16133: checking for struct timespec in <time.h>
-configure:16160: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:16166: $? = 0
-configure:16173: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:16176: $? = 0
-configure:16183: test -s conftest.o
-configure:16186: $? = 0
-configure:16198: result: yes
-configure:16283: checking absolute name of <time.h>
-configure:16308: result: ///usr/include/time.h
-configure:16326: checking determine whether the utimes function works
-configure:16399: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:16402: $? = 0
-configure:16408: ./conftest
-configure:16411: $? = 0
-configure:16427: result: yes
-configure:16455: checking for struct utimbuf
-configure:16488: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:16494: $? = 0
-configure:16501: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:16504: $? = 0
-configure:16511: test -s conftest.o
-configure:16514: $? = 0
-configure:16526: result: yes
-configure:16551: checking for EOVERFLOW
-configure:17034: result: yes
-configure:17053: checking for wchar_t
-configure:17080: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:17086: $? = 0
-configure:17093: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:17096: $? = 0
-configure:17103: test -s conftest.o
-configure:17106: $? = 0
-configure:17118: result: yes
-configure:17129: checking for wint_t
-configure:17164: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:17170: $? = 0
-configure:17177: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:17180: $? = 0
-configure:17187: test -s conftest.o
-configure:17190: $? = 0
-configure:17202: result: yes
-configure:17212: checking for size_t
-configure:17242: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:17248: $? = 0
-configure:17255: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:17258: $? = 0
-configure:17265: test -s conftest.o
-configure:17268: $? = 0
-configure:17280: result: yes
-configure:17293: checking for inttypes.h
-configure:17320: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:17326: $? = 0
-configure:17333: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:17336: $? = 0
-configure:17343: test -s conftest.o
-configure:17346: $? = 0
-configure:17358: result: yes
-configure:17369: checking for stdint.h
-configure:17396: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:17402: $? = 0
-configure:17409: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:17412: $? = 0
-configure:17419: test -s conftest.o
-configure:17422: $? = 0
-configure:17434: result: yes
-configure:17458: checking for intmax_t
-configure:17493: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:17499: $? = 0
-configure:17506: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:17509: $? = 0
-configure:17516: test -s conftest.o
-configure:17519: $? = 0
-configure:17531: result: yes
-configure:17552: checking whether vsnprintf is declared
-configure:17582: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:17588: $? = 0
-configure:17595: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:17598: $? = 0
-configure:17605: test -s conftest.o
-configure:17608: $? = 0
-configure:17620: result: yes
-configure:17657: checking for stdint.h
-configure:17663: result: yes
-configure:17821: checking for SIZE_MAX
-configure:18721: result: yes
-configure:18843: checking whether program_invocation_name is declared
-configure:18874: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:144: error: `program_invocation_name' undeclared (first use in this function)
-conftest.c:144: error: (Each undeclared identifier is reported only once
-conftest.c:144: error: for each function it appears in.)
-configure:18880: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| /* end confdefs.h. */
-| #include <errno.h>
-|
-| int
-| main ()
-| {
-| #ifndef program_invocation_name
-| char *p = (char *) program_invocation_name;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:18912: result: no
-configure:18928: checking whether program_invocation_short_name is declared
-configure:18959: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:145: error: `program_invocation_short_name' undeclared (first use in this function)
-conftest.c:145: error: (Each undeclared identifier is reported only once
-conftest.c:145: error: for each function it appears in.)
-configure:18965: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| /* end confdefs.h. */
-| #include <errno.h>
-|
-| int
-| main ()
-| {
-| #ifndef program_invocation_short_name
-| char *p = (char *) program_invocation_short_name;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:18997: result: no
-configure:19018: checking whether program_invocation_name is defined
-configure:19041: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:140:18: argp.h: No such file or directory
-conftest.c: In function `main':
-conftest.c:144: error: `program_invocation_name' undeclared (first use in this function)
-conftest.c:144: error: (Each undeclared identifier is reported only once
-conftest.c:144: error: for each function it appears in.)
-configure:19047: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| /* end confdefs.h. */
-| #include <argp.h>
-| int
-| main ()
-| {
-| program_invocation_name = "test";
-| ;
-| return 0;
-| }
-configure:19080: result: no
-configure:19086: checking whether program_invocation_short_name is defined
-configure:19109: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:140:18: argp.h: No such file or directory
-conftest.c: In function `main':
-conftest.c:144: error: `program_invocation_short_name' undeclared (first use in this function)
-conftest.c:144: error: (Each undeclared identifier is reported only once
-conftest.c:144: error: for each function it appears in.)
-configure:19115: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| /* end confdefs.h. */
-| #include <argp.h>
-| int
-| main ()
-| {
-| program_invocation_short_name = "test";
-| ;
-| return 0;
-| }
-configure:19148: result: no
-configure:19313: checking whether this system has an arbitrary file name length limit
-configure:19339: result: yes
-configure:19490: checking for library containing clock_gettime
-configure:19531: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:19537: $? = 0
-configure:19544: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:19547: $? = 0
-configure:19554: test -s conftest
-configure:19557: $? = 0
-configure:19581: result: none required
-configure:19596: checking for clock_gettime
-configure:19652: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:19658: $? = 0
-configure:19665: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:19668: $? = 0
-configure:19675: test -s conftest
-configure:19678: $? = 0
-configure:19692: result: yes
-configure:19596: checking for clock_settime
-configure:19652: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:19658: $? = 0
-configure:19665: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:19668: $? = 0
-configure:19675: test -s conftest
-configure:19678: $? = 0
-configure:19692: result: yes
-configure:19721: checking for d_ino member in directory struct
-configure:19761: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:19764: $? = 0
-configure:19770: ./conftest
-configure:19773: $? = 0
-configure:19789: result: yes
-configure:19807: checking for dirfd
-configure:19863: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//ccfuqqec.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:179: undefined reference to `dirfd'
-configure:19869: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| /* end confdefs.h. */
-| /* Define dirfd to an innocuous variant, in case <limits.h> declares dirfd.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define dirfd innocuous_dirfd
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char dirfd (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef dirfd
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char dirfd ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_dirfd || defined __stub___dirfd
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return dirfd ();
-| ;
-| return 0;
-| }
-configure:19903: result: no
-configure:19913: checking whether dirfd is declared
-configure:19945: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:19951: $? = 0
-configure:19958: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:19961: $? = 0
-configure:19968: test -s conftest.o
-configure:19971: $? = 0
-configure:19983: result: yes
-configure:20002: checking whether dirfd is a macro
-configure:20029: result: yes
-configure:20251: checking whether // is distinct from /
-configure:20280: result: no
-configure:20309: checking for error_at_line
-configure:20335: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:182: warning: implicit declaration of function `error_at_line'
-/var/tmp//ccL6nBOc.o(.text+0x1d): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:182: undefined reference to `error_at_line'
-configure:20341: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| error_at_line (0, 0, "", 0, "");
-| ;
-| return 0;
-| }
-configure:20374: result: no
-configure:20453: checking for working fcntl.h
-configure:20519: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:20522: $? = 0
-configure:20528: ./conftest
-configure:20531: $? = 64
-configure: program exited with status 64
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| /* end confdefs.h. */
-| #include <sys/types.h>
-| #include <sys/stat.h>
-| #include <unistd.h>
-| #include <fcntl.h>
-| #ifndef O_NOATIME
-| #define O_NOATIME 0
-| #endif
-| #ifndef O_NOFOLLOW
-| #define O_NOFOLLOW 0
-| #endif
-| static int const constants[] =
-| {
-| O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
-| O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
-| };
-|
-| int
-| main ()
-| {
-|
-| int status = !constants;
-| {
-| static char const sym[] = "conftest.sym";
-| if (symlink (".", sym) != 0
-| || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
-| status |= 32;
-| }
-| {
-| static char const file[] = "confdefs.h";
-| int fd = open (file, O_RDONLY | O_NOATIME);
-| char c;
-| struct stat st0, st1;
-| if (fd < 0
-| || fstat (fd, &st0) != 0
-| || sleep (1) != 0
-| || read (fd, &c, 1) != 1
-| || close (fd) != 0
-| || stat (file, &st1) != 0
-| || st0.st_atime != st1.st_atime)
-| status |= 64;
-| }
-| return status;
-| ;
-| return 0;
-| }
-configure:20552: result: no (bad O_NOATIME)
-configure:20575: checking absolute name of <fcntl.h>
-configure:20600: result: ///usr/include/fcntl.h
-configure:20624: checking for struct stat.st_blocks
-configure:20652: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:20658: $? = 0
-configure:20665: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:20668: $? = 0
-configure:20675: test -s conftest.o
-configure:20678: $? = 0
-configure:20749: result: yes
-configure:20830: checking for working GNU fnmatch
-configure:20901: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:194: error: `FNM_EXTMATCH' undeclared (first use in this function)
-conftest.c:194: error: (Each undeclared identifier is reported only once
-conftest.c:194: error: for each function it appears in.)
-configure:20904: $? = 1
-configure: program exited with status 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| /* end confdefs.h. */
-| #include <fnmatch.h>
-| static int
-| y (char const *pattern, char const *string, int flags)
-| {
-| return fnmatch (pattern, string, flags) == 0;
-| }
-| static int
-| n (char const *pattern, char const *string, int flags)
-| {
-| return fnmatch (pattern, string, flags) == FNM_NOMATCH;
-| }
-|
-| int
-| main ()
-| {
-| char const *Apat = 'A' < '\\' ? "[A-\\\\]" : "[\\\\-A]";
-| char const *apat = 'a' < '\\' ? "[a-\\\\]" : "[\\\\-a]";
-| static char const A_1[] = { 'A' - 1, 0 };
-| static char const A01[] = { 'A' + 1, 0 };
-| static char const a_1[] = { 'a' - 1, 0 };
-| static char const a01[] = { 'a' + 1, 0 };
-| static char const bs_1[] = { '\\' - 1, 0 };
-| static char const bs01[] = { '\\' + 1, 0 };
-| return
-| !(n ("a*", "", 0)
-| && y ("a*", "abc", 0)
-| && n ("d*/*1", "d/s/1", FNM_PATHNAME)
-| && y ("a\\bc", "abc", 0)
-| && n ("a\\bc", "abc", FNM_NOESCAPE)
-| && y ("*x", ".x", 0)
-| && n ("*x", ".x", FNM_PERIOD)
-| && y (Apat, "\\", 0) && y (Apat, "A", 0)
-| && y (apat, "\\", 0) && y (apat, "a", 0)
-| && n (Apat, A_1, 0) == ('A' < '\\')
-| && n (apat, a_1, 0) == ('a' < '\\')
-| && y (Apat, A01, 0) == ('A' < '\\')
-| && y (apat, a01, 0) == ('a' < '\\')
-| && y (Apat, bs_1, 0) == ('A' < '\\')
-| && y (apat, bs_1, 0) == ('a' < '\\')
-| && n (Apat, bs01, 0) == ('A' < '\\')
-| && n (apat, bs01, 0) == ('a' < '\\')
-| && y ("xxXX", "xXxX", FNM_CASEFOLD)
-| && y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)
-| && n ("d*/*1", "d/s/1", FNM_FILE_NAME)
-| && y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)
-| && y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)
-| && y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR));
-| ;
-| return 0;
-| }
-configure:20929: result: no
-configure:20934: checking whether isblank is declared
-configure:20965: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:20971: $? = 0
-configure:20978: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:20981: $? = 0
-configure:20988: test -s conftest.o
-configure:20991: $? = 0
-configure:21003: result: yes
-configure:21080: checking for __fpending
-configure:21136: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//ccK1wTwW.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:188: undefined reference to `__fpending'
-configure:21142: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| /* end confdefs.h. */
-| /* Define __fpending to an innocuous variant, in case <limits.h> declares __fpending.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define __fpending innocuous___fpending
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char __fpending (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef __fpending
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char __fpending ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub___fpending || defined __stub_____fpending
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return __fpending ();
-| ;
-| return 0;
-| }
-configure:21176: result: no
-configure:21194: checking whether __fpending is declared
-configure:21225: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:165: error: `__fpending' undeclared (first use in this function)
-conftest.c:165: error: (Each undeclared identifier is reported only once
-conftest.c:165: error: for each function it appears in.)
-configure:21231: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| /* end confdefs.h. */
-|
-| # include <stdio.h>
-| # if HAVE_STDIO_EXT_H
-| # include <stdio_ext.h>
-| # endif
-|
-|
-| int
-| main ()
-| {
-| #ifndef __fpending
-| char *p = (char *) __fpending;
-| return !p;
-| #endif
-|
-| ;
-| return 0;
-| }
-configure:21263: result: no
-configure:21282: checking how to determine the number of pending output bytes on a stream
-configure:21340: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:160: error: structure has no member named `_IO_write_ptr'
-conftest.c:160: error: structure has no member named `_IO_write_base'
-configure:21346: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| /* end confdefs.h. */
-| #include <stdio.h>
-|
-| int
-| main ()
-| {
-| FILE *fp = stdin; (void) (fp->_IO_write_ptr - fp->_IO_write_base);
-| ;
-| return 0;
-| }
-configure:21340: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:160: error: structure has no member named `_ptr'
-conftest.c:160: error: structure has no member named `_base'
-configure:21346: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| /* end confdefs.h. */
-| #include <stdio.h>
-|
-| int
-| main ()
-| {
-| FILE *fp = stdin; (void) (fp->_ptr - fp->_base);
-| ;
-| return 0;
-| }
-configure:21340: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:21346: $? = 0
-configure:21353: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:21356: $? = 0
-configure:21363: test -s conftest.o
-configure:21366: $? = 0
-configure:21385: result: fp->_p - fp->_bf._base
-configure:21410: checking whether getcwd handles long file names properly
-configure:21582: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:21585: $? = 0
-configure:21591: ./conftest
-configure:21594: $? = 1
-configure: program exited with status 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| /* end confdefs.h. */
-|
-| #include <errno.h>
-| #include <stdlib.h>
-| #include <unistd.h>
-| #include <string.h>
-| #include <limits.h>
-| #include <sys/stat.h>
-| #include <sys/types.h>
-| #include <fcntl.h>
-|
-| #ifndef AT_FDCWD
-| # define AT_FDCWD 0
-| #endif
-| #ifdef ENAMETOOLONG
-| # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
-| #else
-| # define is_ENAMETOOLONG(x) 0
-| #endif
-|
-| /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
-| #undef mkdir
-|
-| #ifndef S_IRWXU
-| # define S_IRWXU 0700
-| #endif
-|
-| /* The length of this name must be 8. */
-| #define DIR_NAME "confdir3"
-| #define DIR_NAME_LEN 8
-| #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
-|
-| /* The length of "../". */
-| #define DOTDOTSLASH_LEN 3
-|
-| /* Leftover bytes in the buffer, to work around library or OS bugs. */
-| #define BUF_SLOP 20
-|
-| int
-| main ()
-| {
-| #ifndef PATH_MAX
-| /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
-| at least not on a local file system. And if we were to start worrying
-| about remote file systems, we'd have to enable the wrapper function
-| all of the time, just to be safe. That's not worth the cost. */
-| exit (0);
-| #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) - DIR_NAME_SIZE - BUF_SLOP) <= PATH_MAX)
-| /* FIXME: Assuming there's a system for which this is true,
-| this should be done in a compile test. */
-| exit (0);
-| #else
-| char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
-| + DIR_NAME_SIZE + BUF_SLOP];
-| char *cwd = getcwd (buf, PATH_MAX);
-| size_t initial_cwd_len;
-| size_t cwd_len;
-| int fail = 0;
-| size_t n_chdirs = 0;
-|
-| if (cwd == NULL)
-| exit (1);
-|
-| cwd_len = initial_cwd_len = strlen (cwd);
-|
-| while (1)
-| {
-| size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
-| char *c = NULL;
-|
-| cwd_len += DIR_NAME_SIZE;
-| /* If mkdir or chdir fails, it could be that this system cannot create
-| any file with an absolute name longer than PATH_MAX, such as cygwin.
-| If so, leave fail as 0, because the current working directory can't
-| be too long for getcwd if it can't even be created. For other
-| errors, be pessimistic and consider that as a failure, too. */
-| if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
-| {
-| if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
-| fail = 2;
-| break;
-| }
-|
-| if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
-| {
-| c = getcwd (buf, PATH_MAX);
-| if (!c && errno == ENOENT)
-| {
-| fail = 1;
-| break;
-| }
-| if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno)))
-| {
-| fail = 2;
-| break;
-| }
-| }
-|
-| if (dotdot_max <= cwd_len - initial_cwd_len)
-| {
-| if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
-| break;
-| c = getcwd (buf, cwd_len + 1);
-| if (!c)
-| {
-| if (! (errno == ERANGE || errno == ENOENT
-| || is_ENAMETOOLONG (errno)))
-| {
-| fail = 2;
-| break;
-| }
-| if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
-| {
-| fail = 1;
-| break;
-| }
-| }
-| }
-|
-| if (c && strlen (c) != cwd_len)
-| {
-| fail = 2;
-| break;
-| }
-| ++n_chdirs;
-| }
-|
-| /* Leaving behind such a deep directory is not polite.
-| So clean up here, right away, even though the driving
-| shell script would also clean up. */
-| {
-| size_t i;
-|
-| /* Try rmdir first, in case the chdir failed. */
-| rmdir (DIR_NAME);
-| for (i = 0; i <= n_chdirs; i++)
-| {
-| if (chdir ("..") < 0)
-| break;
-| if (rmdir (DIR_NAME) != 0)
-| break;
-| }
-| }
-|
-| exit (fail);
-| #endif
-| }
-|
-configure:21614: result: no, but it is partly working
-configure:21637: checking for getpagesize
-configure:21693: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:21699: $? = 0
-configure:21706: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:21709: $? = 0
-configure:21716: test -s conftest
-configure:21719: $? = 0
-configure:21733: result: yes
-configure:21743: checking whether getcwd aborts when 4k < cwd_length < 16k
-configure:21843: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:21846: $? = 0
-configure:21852: ./conftest
-configure:21855: $? = 0
-configure:21872: result: no
-configure:21903: checking for struct tm.tm_zone
-configure:21934: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:21940: $? = 0
-configure:21947: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:21950: $? = 0
-configure:21957: test -s conftest.o
-configure:21960: $? = 0
-configure:22034: result: yes
-configure:22280: checking for gettimeofday with POSIX signature
-configure:22312: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:168: warning: initialization from incompatible pointer type
-configure:22318: $? = 0
-configure:22325: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:22328: $? = 0
-configure:22335: test -s conftest.o
-configure:22338: $? = 0
-configure:22350: result: yes
-configure:22356: checking whether gettimeofday clobbers localtime buffer
-configure:22398: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:22401: $? = 0
-configure:22407: ./conftest
-configure:22410: $? = 0
-configure:22426: result: no
-configure:23030: checking whether the compiler generally respects inline
-configure:23061: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:23067: $? = 0
-configure:23074: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:23077: $? = 0
-configure:23084: test -s conftest.o
-configure:23087: $? = 0
-configure:23101: result: yes
-configure:23158: checking whether inttypes.h conforms to C99
-configure:23290: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:168:10: #include expects "FILENAME" or <FILENAME>
-conftest.c:200: error: `PRIdLEAST8' undeclared here (not in a function)
-conftest.c:200: error: syntax error before "PRIiLEAST8"
-conftest.c:243: error: `SCNdLEAST8' undeclared here (not in a function)
-conftest.c:243: error: syntax error before "SCNiLEAST8"
-configure:23296: $? = 1
-configure: failed program was:
-|
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| /* end confdefs.h. */
-|
-| #include <stddef.h>
-| #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-| #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
-| #define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
-| #include ABSOLUTE_INTTYPES_H
-|
-| /* No need to duplicate the tests of stdint.m4; they are subsumed by
-| yes = yes. */
-|
-| /* Tests for macros supposed to be defined in inttypes.h. */
-|
-| const char *k = /* implicit string concatenation */
-| #ifdef INT8_MAX
-| PRId8 PRIi8
-| #endif
-| #ifdef UINT8_MAX
-| PRIo8 PRIu8 PRIx8 PRIX8
-| #endif
-| #ifdef INT16_MAX
-| PRId16 PRIi16
-| #endif
-| #ifdef UINT16_MAX
-| PRIo16 PRIu16 PRIx16 PRIX16
-| #endif
-| #ifdef INT32_MAX
-| PRId32 PRIi32
-| #endif
-| #ifdef UINT32_MAX
-| PRIo32 PRIu32 PRIx32 PRIX32
-| #endif
-| #ifdef INT64_MAX
-| PRId64 PRIi64
-| #endif
-| #ifdef UINT64_MAX
-| PRIo64 PRIu64 PRIx64 PRIX64
-| #endif
-| PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
-| PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
-| PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
-| PRIdLEAST64 PRIiLEAST64
-| PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
-| PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
-| PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
-| PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
-| PRIdFAST64 PRIiFAST64
-| PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
-| PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
-| #ifdef INTPTR_MAX
-| PRIdPTR PRIiPTR
-| #endif
-| #ifdef UINTPTR_MAX
-| PRIoPTR PRIuPTR PRIxPTR PRIXPTR
-| #endif
-| ;
-| const char *l = /* implicit string concatenation */
-| #ifdef INT8_MAX
-| SCNd8 SCNi8
-| #endif
-| #ifdef UINT8_MAX
-| SCNo8 SCNu8 SCNx8
-| #endif
-| #ifdef INT16_MAX
-| SCNd16 SCNi16
-| #endif
-| #ifdef UINT16_MAX
-| SCNo16 SCNu16 SCNx16
-| #endif
-| #ifdef INT32_MAX
-| SCNd32 SCNi32
-| #endif
-| #ifdef UINT32_MAX
-| SCNo32 SCNu32 SCNx32
-| #endif
-| #ifdef INT64_MAX
-| SCNd64 SCNi64
-| #endif
-| #ifdef UINT64_MAX
-| SCNo64 SCNu64 SCNx64
-| #endif
-| SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
-| SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
-| SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
-| SCNdLEAST64 SCNiLEAST64
-| SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
-| SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
-| SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
-| SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
-| SCNdFAST64 SCNiFAST64
-| SCNoFAST64 SCNuFAST64 SCNxFAST64
-| SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
-| #ifdef INTPTR_MAX
-| SCNdPTR SCNiPTR
-| #endif
-| #ifdef UINTPTR_MAX
-| SCNoPTR SCNuPTR SCNxPTR
-| #endif
-| ;
-|
-| int
-| main ()
-| {
-|
-| ;
-| return 0;
-| }
-configure:23329: result: no
-configure:23338: checking absolute name of <inttypes.h>
-configure:23363: result: ///usr/include/inttypes.h
-configure:23410: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:23416: $? = 0
-configure:23423: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:23426: $? = 0
-configure:23433: test -s conftest.o
-configure:23436: $? = 0
-configure:23494: checking for lchown
-configure:23550: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:23556: $? = 0
-configure:23563: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:23566: $? = 0
-configure:23573: test -s conftest
-configure:23576: $? = 0
-configure:23590: result: yes
-configure:23604: checking whether lstat dereferences a symlink specified with a trailing slash
-configure:23640: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:23643: $? = 0
-configure:23649: ./conftest
-configure:23652: $? = 1
-configure: program exited with status 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-| struct stat sbuf;
-| /* Linux will dereference the symlink and fail.
-| That is better in the sense that it means we will not
-| have to compile and use the lstat wrapper. */
-| return lstat ("conftest.sym/", &sbuf) == 0;
-| ;
-| return 0;
-| }
-configure:23675: result: no
-configure:23696: checking for stdlib.h
-configure:23702: result: yes
-configure:23860: checking for GNU libc compatible malloc
-configure:23922: result: yes
-configure:23955: checking for mempcpy
-configure:24051: result: no
-configure:24093: checking for memrchr
-configure:24149: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//ccy2ByqV.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:200: undefined reference to `memrchr'
-configure:24155: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| /* end confdefs.h. */
-| /* Define memrchr to an innocuous variant, in case <limits.h> declares memrchr.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define memrchr innocuous_memrchr
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char memrchr (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef memrchr
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char memrchr ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_memrchr || defined __stub___memrchr
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return memrchr ();
-| ;
-| return 0;
-| }
-configure:24189: result: no
-configure:24224: checking for working mktime
-configure:24429: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:24432: $? = 0
-configure:24438: ./conftest
-configure:24441: $? = 0
-configure:24457: result: yes
-configure:24474: checking for obstacks
-configure:24500: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c:166:21: obstack.h: No such file or directory
-conftest.c: In function `main':
-conftest.c:170: warning: implicit declaration of function `obstack_free'
-configure:24506: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| /* end confdefs.h. */
-| #include "obstack.h"
-| int
-| main ()
-| {
-| struct obstack *mem; obstack_free(mem,(char *) 0)
-| ;
-| return 0;
-| }
-configure:24539: result: no
-configure:24574: checking for fchmodat
-configure:24630: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//ccNs8EqG.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:200: undefined reference to `fchmodat'
-configure:24636: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| /* end confdefs.h. */
-| /* Define fchmodat to an innocuous variant, in case <limits.h> declares fchmodat.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define fchmodat innocuous_fchmodat
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char fchmodat (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef fchmodat
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char fchmodat ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_fchmodat || defined __stub___fchmodat
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return fchmodat ();
-| ;
-| return 0;
-| }
-configure:24670: result: no
-configure:24574: checking for mkdirat
-configure:24630: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//cc6DBs3d.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:200: undefined reference to `mkdirat'
-configure:24636: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| /* end confdefs.h. */
-| /* Define mkdirat to an innocuous variant, in case <limits.h> declares mkdirat.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define mkdirat innocuous_mkdirat
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char mkdirat (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef mkdirat
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char mkdirat ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_mkdirat || defined __stub___mkdirat
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return mkdirat ();
-| ;
-| return 0;
-| }
-configure:24670: result: no
-configure:24574: checking for openat
-configure:24630: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//cctDCLdL.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:200: undefined reference to `openat'
-configure:24636: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| /* end confdefs.h. */
-| /* Define openat to an innocuous variant, in case <limits.h> declares openat.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define openat innocuous_openat
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char openat (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef openat
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char openat ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_openat || defined __stub___openat
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return openat ();
-| ;
-| return 0;
-| }
-configure:24670: result: no
-configure:24700: checking for fchownat
-configure:24756: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//cc02MFHQ.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:201: undefined reference to `fchownat'
-configure:24762: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| #define __OPENAT_PREFIX rpl_
-| /* end confdefs.h. */
-| /* Define fchownat to an innocuous variant, in case <limits.h> declares fchownat.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define fchownat innocuous_fchownat
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char fchownat (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef fchownat
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char fchownat ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_fchownat || defined __stub___fchownat
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return fchownat ();
-| ;
-| return 0;
-| }
-configure:24795: result: no
-configure:24920: checking for mbstate_t
-configure:24985: result: yes
-configure:25001: checking whether mbrtowc and mbstate_t are properly declared
-configure:25031: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:25037: $? = 0
-configure:25044: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:25047: $? = 0
-configure:25054: test -s conftest
-configure:25057: $? = 0
-configure:25070: result: yes
-configure:25516: checking for unsetenv
-configure:25572: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:25578: $? = 0
-configure:25585: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:25588: $? = 0
-configure:25595: test -s conftest
-configure:25598: $? = 0
-configure:25612: result: yes
-configure:25713: checking for unsetenv() return type
-configure:25749: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:177: error: conflicting types for 'unsetenv'
-/usr/include/stdlib.h:163: error: previous declaration of 'unsetenv' was here
-conftest.c:177: error: conflicting types for 'unsetenv'
-/usr/include/stdlib.h:163: error: previous declaration of 'unsetenv' was here
-configure:25755: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| #define __OPENAT_PREFIX rpl_
-| #define fchownat rpl_fchownat
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_MBRTOWC 1
-| #define HAVE_UNSETENV 1
-| /* end confdefs.h. */
-| #include <stdlib.h>
-| extern
-| #ifdef __cplusplus
-| "C"
-| #endif
-| #if defined(__STDC__) || defined(__cplusplus)
-| int unsetenv (const char *name);
-| #else
-| int unsetenv();
-| #endif
-|
-| int
-| main ()
-| {
-|
-| ;
-| return 0;
-| }
-configure:25787: result: void
-configure:25818: checking for ssize_t
-configure:25883: result: yes
-configure:25894: checking for va_copy
-configure:25925: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:25931: $? = 0
-configure:25938: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:25941: $? = 0
-configure:25948: test -s conftest.o
-configure:25951: $? = 0
-configure:25964: result: yes
-configure:26104: checking absolute name of <stdint.h>
-configure:26129: result: ///usr/include/stdint.h
-configure:26146: checking whether stdint.h conforms to C99
-configure:26336: result: yes
-configure:27230: checking absolute name of <stdio.h>
-configure:27255: result: ///usr/include/stdio.h
-configure:27267: checking absolute name of <stdlib.h>
-configure:27292: result: ///usr/include/stdlib.h
-configure:27312: checking for stpcpy
-configure:27368: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c:198: warning: conflicting types for built-in function 'stpcpy'
-configure:27374: $? = 0
-configure:27381: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:27384: $? = 0
-configure:27391: test -s conftest
-configure:27394: $? = 0
-configure:27408: result: yes
-configure:27438: checking for strcasecmp
-configure:27494: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:27500: $? = 0
-configure:27507: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:27510: $? = 0
-configure:27517: test -s conftest
-configure:27520: $? = 0
-configure:27534: result: yes
-configure:27559: checking for strncasecmp
-configure:27615: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:27621: $? = 0
-configure:27628: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:27631: $? = 0
-configure:27638: test -s conftest
-configure:27641: $? = 0
-configure:27655: result: yes
-configure:27672: checking whether strncasecmp is declared
-configure:27702: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:27708: $? = 0
-configure:27715: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:27718: $? = 0
-configure:27725: test -s conftest.o
-configure:27728: $? = 0
-configure:27740: result: yes
-configure:27771: checking for strchrnul
-configure:27827: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-/var/tmp//ccIr55Zq.o(.text+0xd): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:213: undefined reference to `strchrnul'
-configure:27833: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| #define __OPENAT_PREFIX rpl_
-| #define fchownat rpl_fchownat
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_MBRTOWC 1
-| #define HAVE_UNSETENV 1
-| #define VOID_UNSETENV 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define ABSOLUTE_STDIO_H "///usr/include/stdio.h"
-| #define ABSOLUTE_STDLIB_H "///usr/include/stdlib.h"
-| #define HAVE_STPCPY 1
-| #define HAVE_STRCASECMP 1
-| #define HAVE_STRNCASECMP 1
-| #define HAVE_DECL_STRNCASECMP 1
-| /* end confdefs.h. */
-| /* Define strchrnul to an innocuous variant, in case <limits.h> declares strchrnul.
-| For example, HP-UX 11i <limits.h> declares gettimeofday. */
-| #define strchrnul innocuous_strchrnul
-|
-| /* System header to define __stub macros and hopefully few prototypes,
-| which can conflict with char strchrnul (); below.
-| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-| <limits.h> exists even on freestanding compilers. */
-|
-| #ifdef __STDC__
-| # include <limits.h>
-| #else
-| # include <assert.h>
-| #endif
-|
-| #undef strchrnul
-|
-| /* Override any GCC internal prototype to avoid an error.
-| Use char because int might match the return type of a GCC
-| builtin and then its argument prototype would still apply. */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char strchrnul ();
-| /* The GNU C library defines this for functions which it implements
-| to always fail with ENOSYS. Some functions are actually named
-| something starting with __ and the normal name is an alias. */
-| #if defined __stub_strchrnul || defined __stub___strchrnul
-| choke me
-| #endif
-|
-| int
-| main ()
-| {
-| return strchrnul ();
-| ;
-| return 0;
-| }
-configure:27867: result: no
-configure:27894: checking for strdup
-configure:27950: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c:202: warning: conflicting types for built-in function 'strdup'
-configure:27956: $? = 0
-configure:27963: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:27966: $? = 0
-configure:27973: test -s conftest
-configure:27976: $? = 0
-configure:27990: result: yes
-configure:28052: checking for working strndup
-configure:28212: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:28215: $? = 0
-configure:28221: ./conftest
-configure:28224: $? = 0
-configure:28240: result: yes
-configure:28273: checking for working strnlen
-configure:28317: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c: In function `main':
-conftest.c:228: warning: implicit declaration of function `strnlen'
-/var/tmp//ccXw5DkJ.o(.text+0x26): In function `main':
-/home/laffer1/cpio/cpio-2.8/conftest.c:228: undefined reference to `strnlen'
-configure:28320: $? = 1
-configure: program exited with status 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| #define __OPENAT_PREFIX rpl_
-| #define fchownat rpl_fchownat
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_MBRTOWC 1
-| #define HAVE_UNSETENV 1
-| #define VOID_UNSETENV 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define ABSOLUTE_STDIO_H "///usr/include/stdio.h"
-| #define ABSOLUTE_STDLIB_H "///usr/include/stdlib.h"
-| #define HAVE_STPCPY 1
-| #define HAVE_STRCASECMP 1
-| #define HAVE_STRNCASECMP 1
-| #define HAVE_DECL_STRNCASECMP 1
-| #define HAVE_STRDUP 1
-| #define HAVE_STRNDUP 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| int
-| main ()
-| {
-|
-| #define S "foobar"
-| #define S_LEN (sizeof S - 1)
-|
-| /* At least one implementation is buggy: that of AIX 4.3 would
-| give strnlen (S, 1) == 3. */
-|
-| int i;
-| for (i = 0; i < S_LEN + 1; ++i)
-| {
-| int expected = i <= S_LEN ? i : S_LEN;
-| if (strnlen (S, i) != expected)
-| return 1;
-| }
-| return 0;
-|
-| ;
-| return 0;
-| }
-configure:28345: result: no
-configure:28371: checking for strtol
-configure:28427: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:28433: $? = 0
-configure:28440: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:28443: $? = 0
-configure:28450: test -s conftest
-configure:28453: $? = 0
-configure:28467: result: yes
-configure:28495: checking whether mkdir is declared
-configure:28526: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:28532: $? = 0
-configure:28539: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:28542: $? = 0
-configure:28549: test -s conftest.o
-configure:28552: $? = 0
-configure:28564: result: yes
-configure:28766: checking absolute name of <sys/stat.h>
-configure:28791: result: ///usr/include/sys/stat.h
-configure:28803: checking for a thread-safe mkdir -p
-configure:28842: result: build-aux/install-sh -c -d
-configure:28848: checking for a thread-safe mkdir -p
-configure:28887: result: build-aux/install-sh -c -d
-configure:28900: checking absolute name of <sysexits.h>
-configure:28925: result: ///usr/include/sysexits.h
-configure:28974: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:28980: $? = 0
-configure:28987: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:28990: $? = 0
-configure:28997: test -s conftest.o
-configure:29000: $? = 0
-configure:29028: checking whether localtime_r is compatible with its POSIX signature
-configure:29058: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:29064: $? = 0
-configure:29071: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:29074: $? = 0
-configure:29081: test -s conftest.o
-configure:29084: $? = 0
-configure:29096: result: yes
-configure:29123: checking absolute name of <unistd.h>
-configure:29148: result: ///usr/include/unistd.h
-configure:29331: checking for ptrdiff_t
-configure:29361: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:29367: $? = 0
-configure:29374: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:29377: $? = 0
-configure:29384: test -s conftest.o
-configure:29387: $? = 0
-configure:29399: result: yes
-configure:29422: checking for snprintf
-configure:29478: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c:212: warning: conflicting types for built-in function 'snprintf'
-configure:29484: $? = 0
-configure:29491: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:29494: $? = 0
-configure:29501: test -s conftest
-configure:29504: $? = 0
-configure:29518: result: yes
-configure:29422: checking for wcslen
-configure:29478: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:29484: $? = 0
-configure:29491: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:29494: $? = 0
-configure:29501: test -s conftest
-configure:29504: $? = 0
-configure:29518: result: yes
-configure:29540: checking for vsnprintf
-configure:29596: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c:214: warning: conflicting types for built-in function 'vsnprintf'
-configure:29602: $? = 0
-configure:29609: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:29612: $? = 0
-configure:29619: test -s conftest
-configure:29622: $? = 0
-configure:29636: result: yes
-configure:29672: checking whether <wchar.h> is standalone
-configure:29687: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:29693: $? = 0
-configure:29700: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:29703: $? = 0
-configure:29710: test -s conftest.o
-configure:29713: $? = 0
-configure:29725: result: yes
-configure:29804: checking absolute name of <wctype.h>
-configure:29829: result: ///usr/include/wctype.h
-configure:29870: checking for stdint.h
-configure:29876: result: yes
-configure:30128: checking whether time.h and sys/time.h may both be included
-configure:30158: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:30164: $? = 0
-configure:30171: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:30174: $? = 0
-configure:30181: test -s conftest.o
-configure:30184: $? = 0
-configure:30196: result: yes
-configure:30206: checking for struct stat.st_blksize
-configure:30234: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:30240: $? = 0
-configure:30247: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:30250: $? = 0
-configure:30257: test -s conftest.o
-configure:30260: $? = 0
-configure:30331: result: yes
-configure:30364: checking for library containing setsockopt
-configure:30405: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-configure:30411: $? = 0
-configure:30418: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:30421: $? = 0
-configure:30428: test -s conftest
-configure:30431: $? = 0
-configure:30455: result: none required
-configure:30563: checking for library containing setsockopt
-configure:30654: result: none required
-configure:30740: checking for sys/mtio.h
-configure:30746: result: yes
-configure:30904: checking which ioctl field to test for reversed bytes
-configure:30927: result: mt_type
-configure:30943: checking whether to build rmt
-configure:30960: result: yes
-configure:30678: checking for remote tape header files
-configure:30700: gcc -E conftest.c
-configure:30706: $? = 0
-configure:30728: result: yes
-configure:31045: checking for sys/buf.h
-configure:31068: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:31074: $? = 0
-configure:31081: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:31084: $? = 0
-configure:31091: test -s conftest.o
-configure:31094: $? = 0
-configure:31107: result: yes
-configure:31121: checking for struct stat.st_blksize
-configure:31246: result: yes
-configure:31304: checking for unistd.h
-configure:31310: result: yes
-configure:31304: checking for stdlib.h
-configure:31310: result: yes
-configure:31304: checking for string.h
-configure:31310: result: yes
-configure:31304: checking for fcntl.h
-configure:31310: result: yes
-configure:31304: checking for sys/io/trioctl.h
-configure:31310: result: no
-configure:31314: checking utmp.h usability
-configure:31331: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:31337: $? = 0
-configure:31344: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:31347: $? = 0
-configure:31354: test -s conftest.o
-configure:31357: $? = 0
-configure:31368: result: yes
-configure:31372: checking utmp.h presence
-configure:31387: gcc -E conftest.c
-configure:31393: $? = 0
-configure:31414: result: yes
-configure:31447: checking for utmp.h
-configure:31455: result: yes
-configure:31304: checking for getopt.h
-configure:31310: result: yes
-configure:31304: checking for locale.h
-configure:31310: result: yes
-configure:31314: checking libintl.h usability
-configure:31331: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-conftest.c:241:21: libintl.h: No such file or directory
-configure:31337: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| #define __OPENAT_PREFIX rpl_
-| #define fchownat rpl_fchownat
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_MBRTOWC 1
-| #define HAVE_UNSETENV 1
-| #define VOID_UNSETENV 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define ABSOLUTE_STDIO_H "///usr/include/stdio.h"
-| #define ABSOLUTE_STDLIB_H "///usr/include/stdlib.h"
-| #define HAVE_STPCPY 1
-| #define HAVE_STRCASECMP 1
-| #define HAVE_STRNCASECMP 1
-| #define HAVE_DECL_STRNCASECMP 1
-| #define HAVE_STRDUP 1
-| #define HAVE_STRNDUP 1
-| #define strnlen rpl_strnlen
-| #define HAVE_STRTOL 1
-| #define HAVE_DECL_MKDIR 1
-| #define ABSOLUTE_SYS_STAT_H "///usr/include/sys/stat.h"
-| #define ABSOLUTE_SYSEXITS_H "///usr/include/sysexits.h"
-| #define ABSOLUTE_UNISTD_H "///usr/include/unistd.h"
-| #define USE_UNLOCKED_IO 1
-| #define HAVE_PTRDIFF_T 1
-| #define HAVE_SNPRINTF 1
-| #define HAVE_WCSLEN 1
-| #define HAVE_VSNPRINTF 1
-| #define ABSOLUTE_WCTYPE_H "///usr/include/wctype.h"
-| #define HAVE_STDINT_H 1
-| #define TIME_WITH_SYS_TIME 1
-| #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-| #define HAVE_ST_BLKSIZE 1
-| #define HAVE_SYS_MTIO_H 1
-| #define MTIO_CHECK_FIELD mt_type
-| #define HAVE_SYS_BUF_H 1
-| #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_UTMP_H 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_LOCALE_H 1
-| /* end confdefs.h. */
-| #include <stdio.h>
-| #if HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #if HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #if STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # if HAVE_STDLIB_H
-| # include <stdlib.h>
-| # endif
-| #endif
-| #if HAVE_STRING_H
-| # if !STDC_HEADERS && HAVE_MEMORY_H
-| # include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #if HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #if HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #if HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #if HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <libintl.h>
-configure:31368: result: no
-configure:31372: checking libintl.h presence
-configure:31387: gcc -E conftest.c
-conftest.c:208:21: libintl.h: No such file or directory
-configure:31393: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| #define __OPENAT_PREFIX rpl_
-| #define fchownat rpl_fchownat
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_MBRTOWC 1
-| #define HAVE_UNSETENV 1
-| #define VOID_UNSETENV 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define ABSOLUTE_STDIO_H "///usr/include/stdio.h"
-| #define ABSOLUTE_STDLIB_H "///usr/include/stdlib.h"
-| #define HAVE_STPCPY 1
-| #define HAVE_STRCASECMP 1
-| #define HAVE_STRNCASECMP 1
-| #define HAVE_DECL_STRNCASECMP 1
-| #define HAVE_STRDUP 1
-| #define HAVE_STRNDUP 1
-| #define strnlen rpl_strnlen
-| #define HAVE_STRTOL 1
-| #define HAVE_DECL_MKDIR 1
-| #define ABSOLUTE_SYS_STAT_H "///usr/include/sys/stat.h"
-| #define ABSOLUTE_SYSEXITS_H "///usr/include/sysexits.h"
-| #define ABSOLUTE_UNISTD_H "///usr/include/unistd.h"
-| #define USE_UNLOCKED_IO 1
-| #define HAVE_PTRDIFF_T 1
-| #define HAVE_SNPRINTF 1
-| #define HAVE_WCSLEN 1
-| #define HAVE_VSNPRINTF 1
-| #define ABSOLUTE_WCTYPE_H "///usr/include/wctype.h"
-| #define HAVE_STDINT_H 1
-| #define TIME_WITH_SYS_TIME 1
-| #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-| #define HAVE_ST_BLKSIZE 1
-| #define HAVE_SYS_MTIO_H 1
-| #define MTIO_CHECK_FIELD mt_type
-| #define HAVE_SYS_BUF_H 1
-| #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_UTMP_H 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_LOCALE_H 1
-| /* end confdefs.h. */
-| #include <libintl.h>
-configure:31414: result: no
-configure:31447: checking for libintl.h
-configure:31455: result: no
-configure:31304: checking for sys/wait.h
-configure:31310: result: yes
-configure:31304: checking for utime.h
-configure:31310: result: yes
-configure:31304: checking for locale.h
-configure:31310: result: yes
-configure:31469: checking for sys_errlist and sys_nerr
-configure:31491: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5
-conftest.c:213: warning: return type defaults to `int'
-configure:31494: $? = 0
-configure:31500: ./conftest
-configure:31503: $? = 0
-configure:31510: result: yes
-configure:31526: checking whether errno is declared
-configure:31567: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:31573: $? = 0
-configure:31580: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:31583: $? = 0
-configure:31590: test -s conftest.o
-configure:31593: $? = 0
-configure:31605: result: yes
-configure:31621: checking whether getpwnam is declared
-configure:31662: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:31668: $? = 0
-configure:31675: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:31678: $? = 0
-configure:31685: test -s conftest.o
-configure:31688: $? = 0
-configure:31700: result: yes
-configure:31716: checking whether getgrnam is declared
-configure:31757: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:31763: $? = 0
-configure:31770: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:31773: $? = 0
-configure:31780: test -s conftest.o
-configure:31783: $? = 0
-configure:31795: result: yes
-configure:31811: checking whether getgrgid is declared
-configure:31852: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:31858: $? = 0
-configure:31865: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:31868: $? = 0
-configure:31875: test -s conftest.o
-configure:31878: $? = 0
-configure:31890: result: yes
-configure:31906: checking whether strdup is declared
-configure:31985: result: yes
-configure:32001: checking whether strerror is declared
-configure:32042: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:32048: $? = 0
-configure:32055: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:32058: $? = 0
-configure:32065: test -s conftest.o
-configure:32068: $? = 0
-configure:32080: result: yes
-configure:32096: checking whether getenv is declared
-configure:32175: result: yes
-configure:32191: checking whether atoi is declared
-configure:32232: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:32238: $? = 0
-configure:32245: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:32248: $? = 0
-configure:32255: test -s conftest.o
-configure:32258: $? = 0
-configure:32270: result: yes
-configure:32286: checking whether exit is declared
-configure:32327: gcc -std=gnu99 -c -g -O2 conftest.c >&5
-configure:32333: $? = 0
-configure:32340: test -z "$ac_c_werror_flag" || test ! -s conftest.err
-configure:32343: $? = 0
-configure:32350: test -s conftest.o
-configure:32353: $? = 0
-configure:32365: result: yes
-configure:32386: checking whether NLS is requested
-configure:32395: result: no
-configure:32433: checking for msgfmt
-configure: trying /usr/local/bin/msgfmt...
-0 translated messages.
-configure:32465: result: /usr/local/bin/msgfmt
-configure:32474: checking for gmsgfmt
-configure:32505: result: /usr/local/bin/msgfmt
-configure:32556: checking for xgettext
-configure: trying /usr/local/bin/xgettext...
-/usr/local/bin/xgettext: warning: file `/dev/null' extension `' is unknown; will try C
-configure:32588: result: /usr/local/bin/xgettext
-configure:32634: checking for msgmerge
-configure: trying /usr/local/bin/msgmerge...
-configure:32665: result: /usr/local/bin/msgmerge
-configure:32719: checking for ld used by GCC
-configure:32783: result: /usr/bin/ld
-configure:32792: checking if the linker (/usr/bin/ld) is GNU ld
-configure:32805: result: yes
-configure:32812: checking for shared library run path origin
-configure:32825: result: done
-configure:33326: checking for CFPreferencesCopyAppValue
-configure:33354: gcc -std=gnu99 -o conftest -g -O2 conftest.c -Wl,-framework -Wl,CoreFoundation >&5
-conftest.c:221:42: CoreFoundation/CFPreferences.h: No such file or directory
-conftest.c: In function `main':
-conftest.c:225: warning: implicit declaration of function `CFPreferencesCopyAppValue'
-conftest.c:225: error: `NULL' undeclared (first use in this function)
-conftest.c:225: error: (Each undeclared identifier is reported only once
-conftest.c:225: error: for each function it appears in.)
-configure:33360: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| #define __OPENAT_PREFIX rpl_
-| #define fchownat rpl_fchownat
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_MBRTOWC 1
-| #define HAVE_UNSETENV 1
-| #define VOID_UNSETENV 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define ABSOLUTE_STDIO_H "///usr/include/stdio.h"
-| #define ABSOLUTE_STDLIB_H "///usr/include/stdlib.h"
-| #define HAVE_STPCPY 1
-| #define HAVE_STRCASECMP 1
-| #define HAVE_STRNCASECMP 1
-| #define HAVE_DECL_STRNCASECMP 1
-| #define HAVE_STRDUP 1
-| #define HAVE_STRNDUP 1
-| #define strnlen rpl_strnlen
-| #define HAVE_STRTOL 1
-| #define HAVE_DECL_MKDIR 1
-| #define ABSOLUTE_SYS_STAT_H "///usr/include/sys/stat.h"
-| #define ABSOLUTE_SYSEXITS_H "///usr/include/sysexits.h"
-| #define ABSOLUTE_UNISTD_H "///usr/include/unistd.h"
-| #define USE_UNLOCKED_IO 1
-| #define HAVE_PTRDIFF_T 1
-| #define HAVE_SNPRINTF 1
-| #define HAVE_WCSLEN 1
-| #define HAVE_VSNPRINTF 1
-| #define ABSOLUTE_WCTYPE_H "///usr/include/wctype.h"
-| #define HAVE_STDINT_H 1
-| #define TIME_WITH_SYS_TIME 1
-| #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-| #define HAVE_ST_BLKSIZE 1
-| #define HAVE_SYS_MTIO_H 1
-| #define MTIO_CHECK_FIELD mt_type
-| #define HAVE_SYS_BUF_H 1
-| #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_UTMP_H 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_SYS_ERRLIST 1
-| #define HAVE_DECL_ERRNO 1
-| #define HAVE_DECL_GETPWNAM 1
-| #define HAVE_DECL_GETGRNAM 1
-| #define HAVE_DECL_GETGRGID 1
-| #define HAVE_DECL_STRDUP 1
-| #define HAVE_DECL_STRERROR 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_ATOI 1
-| #define HAVE_DECL_EXIT 1
-| /* end confdefs.h. */
-| #include <CoreFoundation/CFPreferences.h>
-| int
-| main ()
-| {
-| CFPreferencesCopyAppValue(NULL, NULL)
-| ;
-| return 0;
-| }
-configure:33394: result: no
-configure:33403: checking for CFLocaleCopyCurrent
-configure:33431: gcc -std=gnu99 -o conftest -g -O2 conftest.c -Wl,-framework -Wl,CoreFoundation >&5
-conftest.c:221:37: CoreFoundation/CFLocale.h: No such file or directory
-conftest.c: In function `main':
-conftest.c:225: warning: implicit declaration of function `CFLocaleCopyCurrent'
-configure:33437: $? = 1
-configure: failed program was:
-| /* confdefs.h. */
-| #define PACKAGE_NAME "GNU cpio"
-| #define PACKAGE_TARNAME "cpio"
-| #define PACKAGE_VERSION "2.8"
-| #define PACKAGE_STRING "GNU cpio 2.8"
-| #define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-| #define PACKAGE "cpio"
-| #define VERSION "2.8"
-| #define _GNU_SOURCE 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define _TANDEM_SOURCE 1
-| #define PROTOTYPES 1
-| #define __PROTOTYPES 1
-| #define RETSIGTYPE void
-| #define STDC_HEADERS 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCHMOD 1
-| #define HAVE_FCHOWN 1
-| #define HAVE_ALLOCA 1
-| #define HAVE_STDLIB_H 1
-| #define MALLOC_0_IS_NONNULL 1
-| #define HAVE_LONG_LONG_INT 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_CLEARERR_UNLOCKED 1
-| #define HAVE_DECL_FEOF_UNLOCKED 1
-| #define HAVE_DECL_FERROR_UNLOCKED 1
-| #define HAVE_DECL_FFLUSH_UNLOCKED 0
-| #define HAVE_DECL_FGETS_UNLOCKED 0
-| #define HAVE_DECL_FPUTC_UNLOCKED 0
-| #define HAVE_DECL_FPUTS_UNLOCKED 0
-| #define HAVE_DECL_FREAD_UNLOCKED 0
-| #define HAVE_DECL_FWRITE_UNLOCKED 0
-| #define HAVE_DECL_GETC_UNLOCKED 1
-| #define HAVE_DECL_GETCHAR_UNLOCKED 1
-| #define HAVE_DECL_PUTC_UNLOCKED 1
-| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
-| #define HAVE_FLOCKFILE 1
-| #define HAVE_FUNLOCKFILE 1
-| #define HAVE_GETCWD 1
-| #define HAVE_READLINK 1
-| #define HAVE_DUP2 1
-| #define HAVE_FCHDIR 1
-| #define HAVE_BTOWC 1
-| #define HAVE_ISWCTYPE 1
-| #define HAVE_MBSRTOWCS 1
-| #define HAVE_WMEMCHR 1
-| #define HAVE_WMEMCPY 1
-| #define HAVE_GETTIMEOFDAY 1
-| #define HAVE_ALARM 1
-| #define HAVE_LCHMOD 1
-| #define HAVE_MBSINIT 1
-| #define HAVE_SETENV 1
-| #define HAVE_SLEEP 1
-| #define HAVE_STRERROR 1
-| #define HAVE_LSTAT 1
-| #define HAVE_PIPE 1
-| #define HAVE_FUTIMES 1
-| #define HAVE_ISWCNTRL 1
-| #define HAVE_MKFIFO 1
-| #define HAVE_SETLOCALE 1
-| #define HAVE_SYS_PARAM_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_DIRENT_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_WCTYPE_H 1
-| #define HAVE_SYS_TIME_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDIO_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_SYSEXITS_H 1
-| #define HAVE_TIME_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_WCHAR_H 1
-| #define HAVE_NETDB_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_SYS_MTIO_H 1
-| #define HAVE_SGTTY_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-| #define HAVE_UNISTD_H 1
-| #define HAVE_CHOWN 1
-| #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-| #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-| #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-| #define HAVE_DECL_STRERROR_R 1
-| #define HAVE_STRERROR_R 1
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_DECL_GETCWD 1
-| #define HAVE__BOOL 1
-| #define HAVE_STDBOOL_H 1
-| #define HAVE_TM_GMTOFF 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_GETOPT_LONG_ONLY 1
-| #define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-| #define HAVE_UNSIGNED_LONG_LONG_INT 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_DECL_IMAXABS 1
-| #define HAVE_DECL_IMAXDIV 1
-| #define HAVE_DECL_STRTOIMAX 1
-| #define HAVE_DECL_STRTOUMAX 1
-| #define HAVE_DECL_LCHOWN 1
-| #define HAVE_DECL_MEMRCHR 0
-| #define HAVE_DECL_STRDUP 1
-| #define ABSOLUTE_STRING_H "///usr/include/string.h"
-| #define HAVE_DECL_STRNDUP 1
-| #define HAVE_DECL_STRNLEN 0
-| #define ABSOLUTE_TIME_H "///usr/include/time.h"
-| #define HAVE_WORKING_UTIMES 1
-| #define HAVE_STRUCT_UTIMBUF 1
-| #define HAVE_WCHAR_T 1
-| #define HAVE_WINT_T 1
-| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
-| #define HAVE_STDINT_H_WITH_UINTMAX 1
-| #define HAVE_LONG_LONG 1
-| #define HAVE_INTMAX_T 1
-| #define HAVE_DECL_VSNPRINTF 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_ALLOCA_H 1
-| #define __GETOPT_PREFIX rpl_
-| #define GNULIB_PROGRAM_INVOCATION_NAME 1
-| #define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-| #define realpath rpl_realpath
-| #define HAVE_CLOCK_GETTIME 1
-| #define HAVE_CLOCK_SETTIME 1
-| #define GNULIB_CLOSE_STREAM 1
-| #define D_INO_IN_DIRENT 1
-| #define HAVE_DECL_DIRFD 1
-| #define HAVE_WORKING_O_NOATIME 0
-| #define HAVE_WORKING_O_NOFOLLOW 1
-| #define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-| #define GNULIB_FCNTL_SAFER 1
-| #define HAVE_STRUCT_STAT_ST_BLOCKS 1
-| #define HAVE_ST_BLOCKS 1
-| #define HAVE_DECL_ISBLANK 1
-| #define fnmatch gnu_fnmatch
-| #define HAVE_DECL___FPENDING 0
-| #define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-| #define HAVE_PARTLY_WORKING_GETCWD 1
-| #define HAVE_GETPAGESIZE 1
-| #define HAVE_STRUCT_TM_TM_ZONE 1
-| #define HAVE_TM_ZONE 1
-| #define __GETOPT_PREFIX rpl_
-| #define HAVE_INLINE 1
-| #define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-| #define HAVE_LCHOWN 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_MALLOC 1
-| #define __OPENAT_PREFIX rpl_
-| #define fchownat rpl_fchownat
-| #define HAVE_MBSTATE_T 1
-| #define HAVE_MBRTOWC 1
-| #define HAVE_UNSETENV 1
-| #define VOID_UNSETENV 1
-| #define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-| #define ABSOLUTE_STDIO_H "///usr/include/stdio.h"
-| #define ABSOLUTE_STDLIB_H "///usr/include/stdlib.h"
-| #define HAVE_STPCPY 1
-| #define HAVE_STRCASECMP 1
-| #define HAVE_STRNCASECMP 1
-| #define HAVE_DECL_STRNCASECMP 1
-| #define HAVE_STRDUP 1
-| #define HAVE_STRNDUP 1
-| #define strnlen rpl_strnlen
-| #define HAVE_STRTOL 1
-| #define HAVE_DECL_MKDIR 1
-| #define ABSOLUTE_SYS_STAT_H "///usr/include/sys/stat.h"
-| #define ABSOLUTE_SYSEXITS_H "///usr/include/sysexits.h"
-| #define ABSOLUTE_UNISTD_H "///usr/include/unistd.h"
-| #define USE_UNLOCKED_IO 1
-| #define HAVE_PTRDIFF_T 1
-| #define HAVE_SNPRINTF 1
-| #define HAVE_WCSLEN 1
-| #define HAVE_VSNPRINTF 1
-| #define ABSOLUTE_WCTYPE_H "///usr/include/wctype.h"
-| #define HAVE_STDINT_H 1
-| #define TIME_WITH_SYS_TIME 1
-| #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-| #define HAVE_ST_BLKSIZE 1
-| #define HAVE_SYS_MTIO_H 1
-| #define MTIO_CHECK_FIELD mt_type
-| #define HAVE_SYS_BUF_H 1
-| #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_FCNTL_H 1
-| #define HAVE_UTMP_H 1
-| #define HAVE_GETOPT_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_SYS_WAIT_H 1
-| #define HAVE_UTIME_H 1
-| #define HAVE_LOCALE_H 1
-| #define HAVE_SYS_ERRLIST 1
-| #define HAVE_DECL_ERRNO 1
-| #define HAVE_DECL_GETPWNAM 1
-| #define HAVE_DECL_GETGRNAM 1
-| #define HAVE_DECL_GETGRGID 1
-| #define HAVE_DECL_STRDUP 1
-| #define HAVE_DECL_STRERROR 1
-| #define HAVE_DECL_GETENV 1
-| #define HAVE_DECL_ATOI 1
-| #define HAVE_DECL_EXIT 1
-| /* end confdefs.h. */
-| #include <CoreFoundation/CFLocale.h>
-| int
-| main ()
-| {
-| CFLocaleCopyCurrent();
-| ;
-| return 0;
-| }
-configure:33471: result: no
-configure:34540: checking whether to use NLS
-configure:34542: result: no
-configure:34775: creating ./config.status
-
-## ---------------------- ##
-## Running config.status. ##
-## ---------------------- ##
-
-This file was extended by GNU cpio config.status 2.8, which was
-generated by GNU Autoconf 2.60. Invocation command line was
-
- CONFIG_FILES =
- CONFIG_HEADERS =
- CONFIG_LINKS =
- CONFIG_COMMANDS =
- $ ./config.status
-
-on m5.midnightbsd.org
-
-config.status:865: creating tests/Makefile
-config.status:865: creating tests/atlocal
-config.status:865: creating Makefile
-config.status:865: creating doc/Makefile
-config.status:865: creating headers/Makefile
-config.status:865: creating lib/Makefile
-config.status:865: creating rmt/Makefile
-config.status:865: creating src/Makefile
-config.status:865: creating po/Makefile.in
-config.status:865: creating config.h
-config.status:1370: executing depfiles commands
-config.status:1370: executing po-directories commands
-config.status:1370: executing tests/atconfig commands
-
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-
-ac_cv_build=x86_64-mbsd-freebsd6.0
-ac_cv_c_compiler_gnu=yes
-ac_cv_c_const=yes
-ac_cv_c_inline=inline
-ac_cv_c_restrict=restrict
-ac_cv_decl_EOVERFLOW=yes
-ac_cv_env_CC_set=
-ac_cv_env_CC_value=
-ac_cv_env_CFLAGS_set=
-ac_cv_env_CFLAGS_value=
-ac_cv_env_CPPFLAGS_set=
-ac_cv_env_CPPFLAGS_value=
-ac_cv_env_CPP_set=
-ac_cv_env_CPP_value=
-ac_cv_env_DEFAULT_RMT_DIR_set=
-ac_cv_env_DEFAULT_RMT_DIR_value=
-ac_cv_env_LDFLAGS_set=
-ac_cv_env_LDFLAGS_value=
-ac_cv_env_YACC_set=
-ac_cv_env_YACC_value=
-ac_cv_env_YFLAGS_set=
-ac_cv_env_YFLAGS_value=
-ac_cv_env_build_alias_set=set
-ac_cv_env_build_alias_value=amd64-mbsd-freebsd6.0
-ac_cv_env_host_alias_set=
-ac_cv_env_host_alias_value=
-ac_cv_env_target_alias_set=set
-ac_cv_env_target_alias_value=amd64-mbsd-freebsd6.0
-ac_cv_func___fpending=no
-ac_cv_func_alarm=yes
-ac_cv_func_alloca_works=yes
-ac_cv_func_btowc=yes
-ac_cv_func_canonicalize_file_name=no
-ac_cv_func_chown_works=yes
-ac_cv_func_clock_gettime=yes
-ac_cv_func_clock_settime=yes
-ac_cv_func_dirfd=no
-ac_cv_func_dup2=yes
-ac_cv_func_fchdir=yes
-ac_cv_func_fchmod=yes
-ac_cv_func_fchmodat=no
-ac_cv_func_fchown=yes
-ac_cv_func_fchownat=no
-ac_cv_func_fdopendir=no
-ac_cv_func_flockfile=yes
-ac_cv_func_fnmatch_gnu=no
-ac_cv_func_funlockfile=yes
-ac_cv_func_futimes=yes
-ac_cv_func_futimesat=no
-ac_cv_func_getcwd=yes
-ac_cv_func_getopt_long_only=yes
-ac_cv_func_getpagesize=yes
-ac_cv_func_gettimeofday=yes
-ac_cv_func_iswcntrl=yes
-ac_cv_func_iswctype=yes
-ac_cv_func_lchmod=yes
-ac_cv_func_lchown=yes
-ac_cv_func_lstat=yes
-ac_cv_func_lstat_dereferences_slashed_symlink=no
-ac_cv_func_malloc_0_nonnull=yes
-ac_cv_func_mbsinit=yes
-ac_cv_func_mbsrtowcs=yes
-ac_cv_func_mempcpy=no
-ac_cv_func_memrchr=no
-ac_cv_func_mkdirat=no
-ac_cv_func_mkfifo=yes
-ac_cv_func_nanotime=no
-ac_cv_func_obstack=no
-ac_cv_func_openat=no
-ac_cv_func_pipe=yes
-ac_cv_func_readlink=yes
-ac_cv_func_setenv=yes
-ac_cv_func_setlocale=yes
-ac_cv_func_sleep=yes
-ac_cv_func_snprintf=yes
-ac_cv_func_stpcpy=yes
-ac_cv_func_strcasecmp=yes
-ac_cv_func_strchrnul=no
-ac_cv_func_strdup=yes
-ac_cv_func_strerror=yes
-ac_cv_func_strerror_r=yes
-ac_cv_func_strerror_r_char_p=no
-ac_cv_func_strncasecmp=yes
-ac_cv_func_strnlen_working=no
-ac_cv_func_strtol=yes
-ac_cv_func_unsetenv=yes
-ac_cv_func_vasnprintf=no
-ac_cv_func_vsnprintf=yes
-ac_cv_func_wcslen=yes
-ac_cv_func_wmemchr=yes
-ac_cv_func_wmemcpy=yes
-ac_cv_func_wmempcpy=no
-ac_cv_func_working_mktime=yes
-ac_cv_have_decl___fpending=no
-ac_cv_have_decl_atoi=yes
-ac_cv_have_decl_canonicalize_file_name=no
-ac_cv_have_decl_clearerr_unlocked=yes
-ac_cv_have_decl_dirfd=yes
-ac_cv_have_decl_errno=yes
-ac_cv_have_decl_exit=yes
-ac_cv_have_decl_feof_unlocked=yes
-ac_cv_have_decl_ferror_unlocked=yes
-ac_cv_have_decl_fflush_unlocked=no
-ac_cv_have_decl_fgets_unlocked=no
-ac_cv_have_decl_fputc_unlocked=no
-ac_cv_have_decl_fputs_unlocked=no
-ac_cv_have_decl_fread_unlocked=no
-ac_cv_have_decl_fwrite_unlocked=no
-ac_cv_have_decl_getc_unlocked=yes
-ac_cv_have_decl_getchar_unlocked=yes
-ac_cv_have_decl_getcwd=yes
-ac_cv_have_decl_getenv=yes
-ac_cv_have_decl_getgrgid=yes
-ac_cv_have_decl_getgrnam=yes
-ac_cv_have_decl_getpwnam=yes
-ac_cv_have_decl_imaxabs=yes
-ac_cv_have_decl_imaxdiv=yes
-ac_cv_have_decl_isblank=yes
-ac_cv_have_decl_lchown=yes
-ac_cv_have_decl_memrchr=no
-ac_cv_have_decl_mkdir=yes
-ac_cv_have_decl_optreset=yes
-ac_cv_have_decl_program_invocation_name=no
-ac_cv_have_decl_program_invocation_short_name=no
-ac_cv_have_decl_putc_unlocked=yes
-ac_cv_have_decl_putchar_unlocked=yes
-ac_cv_have_decl_strdup=yes
-ac_cv_have_decl_strerror=yes
-ac_cv_have_decl_strerror_r=yes
-ac_cv_have_decl_strncasecmp=yes
-ac_cv_have_decl_strndup=yes
-ac_cv_have_decl_strnlen=no
-ac_cv_have_decl_strtoimax=yes
-ac_cv_have_decl_strtoumax=yes
-ac_cv_have_decl_vsnprintf=yes
-ac_cv_header_dirent_dirent_h=yes
-ac_cv_header_dirent_h=yes
-ac_cv_header_fcntl_h=yes
-ac_cv_header_features_h=no
-ac_cv_header_float_h=yes
-ac_cv_header_getopt_h=yes
-ac_cv_header_inttypes_h=yes
-ac_cv_header_libintl_h=no
-ac_cv_header_linewrap_h=no
-ac_cv_header_locale_h=yes
-ac_cv_header_memory_h=yes
-ac_cv_header_minix_config_h=no
-ac_cv_header_net_errno_h=no
-ac_cv_header_netdb_h=yes
-ac_cv_header_sgtty_h=yes
-ac_cv_header_stat_broken=no
-ac_cv_header_stdbool_h=yes
-ac_cv_header_stdc=yes
-ac_cv_header_stdint_h=yes
-ac_cv_header_stdio_ext_h=no
-ac_cv_header_stdio_h=yes
-ac_cv_header_stdlib_h=yes
-ac_cv_header_string_h=yes
-ac_cv_header_strings_h=yes
-ac_cv_header_sys_buf_h=yes
-ac_cv_header_sys_device_h=no
-ac_cv_header_sys_gentape_h=no
-ac_cv_header_sys_inet_h=no
-ac_cv_header_sys_io_trioctl_h=no
-ac_cv_header_sys_mtio_h=yes
-ac_cv_header_sys_param_h=yes
-ac_cv_header_sys_stat_h=yes
-ac_cv_header_sys_tape_h=no
-ac_cv_header_sys_time_h=yes
-ac_cv_header_sys_tprintf_h=no
-ac_cv_header_sys_types_h=yes
-ac_cv_header_sys_types_h_makedev=yes
-ac_cv_header_sys_wait_h=yes
-ac_cv_header_sysexits_h=yes
-ac_cv_header_time=yes
-ac_cv_header_time_h=yes
-ac_cv_header_unistd_h=yes
-ac_cv_header_utime_h=yes
-ac_cv_header_utmp_h=yes
-ac_cv_header_wchar_h=yes
-ac_cv_header_wctype_h=yes
-ac_cv_host=x86_64-mbsd-freebsd6.0
-ac_cv_lib_error_at_line=no
-ac_cv_member_struct_stat_st_blksize=yes
-ac_cv_member_struct_stat_st_blocks=yes
-ac_cv_member_struct_tm_tm_gmtoff=yes
-ac_cv_member_struct_tm_tm_zone=yes
-ac_cv_objext=o
-ac_cv_path_EGREP='/usr/bin/grep -E'
-ac_cv_path_GMSGFMT=/usr/local/bin/msgfmt
-ac_cv_path_GREP=/usr/bin/grep
-ac_cv_path_MSGFMT=/usr/local/bin/msgfmt
-ac_cv_path_MSGMERGE=/usr/local/bin/msgmerge
-ac_cv_path_XGETTEXT=/usr/local/bin/xgettext
-ac_cv_path_install='/usr/bin/install -c'
-ac_cv_prog_AWK=nawk
-ac_cv_prog_CPP='gcc -E'
-ac_cv_prog_YACC=byacc
-ac_cv_prog_ac_ct_CC=gcc
-ac_cv_prog_ac_ct_RANLIB=ranlib
-ac_cv_prog_cc_c89=
-ac_cv_prog_cc_c99=-std=gnu99
-ac_cv_prog_cc_g=yes
-ac_cv_prog_cc_stdc=-std=gnu99
-ac_cv_prog_gcc_traditional=no
-ac_cv_prog_make_make_set=yes
-ac_cv_safe_to_define___extensions__=yes
-ac_cv_search_clock_gettime='none required'
-ac_cv_search_opendir='none required'
-ac_cv_search_setsockopt='none required'
-ac_cv_struct_tm=time.h
-ac_cv_sys_file_offset_bits=no
-ac_cv_sys_large_files=no
-ac_cv_sys_largefile_CC=no
-ac_cv_sys_pending_output_n_bytes='fp->_p - fp->_bf._base'
-ac_cv_type__Bool=yes
-ac_cv_type_gid_t=yes
-ac_cv_type_long_long=yes
-ac_cv_type_long_long_int=yes
-ac_cv_type_mbstate_t=yes
-ac_cv_type_off_t=yes
-ac_cv_type_ptrdiff_t=yes
-ac_cv_type_signal=void
-ac_cv_type_size_t=yes
-ac_cv_type_uid_t=yes
-ac_cv_type_unsigned_long_long_int=yes
-ac_cv_win_or_dos=no
-ac_cv_working_alloca_h=no
-acl_cv_hardcode_direct=no
-acl_cv_hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-acl_cv_hardcode_libdir_separator=
-acl_cv_hardcode_minus_L=no
-acl_cv_libext=a
-acl_cv_path_LD=/usr/bin/ld
-acl_cv_prog_gnu_ld=yes
-acl_cv_rpath=done
-acl_cv_shlibext=so
-acl_cv_wl=-Wl,
-am_cv_CC_dependencies_compiler_type=gcc3
-gl_cv_absolute_fcntl_h=///usr/include/fcntl.h
-gl_cv_absolute_inttypes_h=///usr/include/inttypes.h
-gl_cv_absolute_stdint_h=///usr/include/stdint.h
-gl_cv_absolute_stdio_h=///usr/include/stdio.h
-gl_cv_absolute_stdlib_h=///usr/include/stdlib.h
-gl_cv_absolute_string_h=///usr/include/string.h
-gl_cv_absolute_sys_stat_h=///usr/include/sys/stat.h
-gl_cv_absolute_sys_time_h=///usr/include/sys/time.h
-gl_cv_absolute_sysexits_h=///usr/include/sysexits.h
-gl_cv_absolute_time_h=///usr/include/time.h
-gl_cv_absolute_unistd_h=///usr/include/unistd.h
-gl_cv_absolute_wctype_h=///usr/include/wctype.h
-gl_cv_c_inline_effective=yes
-gl_cv_compound_literals=no
-gl_cv_double_slash_root=no
-gl_cv_func_chown_follows_symlink=yes
-gl_cv_func_dirfd_macro=yes
-gl_cv_func_getcwd_abort_bug=no
-gl_cv_func_getcwd_null=yes
-gl_cv_func_getcwd_path_max='no, but it is partly working'
-gl_cv_func_gettimeofday_clobber=no
-gl_cv_func_gettimeofday_posix_signature=yes
-gl_cv_func_malloc_0_nonnull=1
-gl_cv_func_mbrtowc=yes
-gl_cv_func_strndup=yes
-gl_cv_func_va_copy=yes
-gl_cv_func_working_utimes=yes
-gl_cv_have_arbitrary_file_name_length_limit=yes
-gl_cv_header_inttypes_h=yes
-gl_cv_header_stdint_h=yes
-gl_cv_header_wchar_h_standalone=yes
-gl_cv_header_working_fcntl_h='no (bad O_NOATIME)'
-gl_cv_header_working_inttypes_h=no
-gl_cv_header_working_stdint_h=yes
-gl_cv_size_max=yes
-gl_cv_struct_dirent_d_ino=yes
-gl_cv_sys_struct_timespec_in_time_h=yes
-gl_cv_sys_struct_timeval=yes
-gl_cv_sys_struct_utimbuf=yes
-gl_cv_time_r_posix=yes
-gt_cv_c_intmax_t=yes
-gt_cv_c_wchar_t=yes
-gt_cv_c_wint_t=yes
-gt_cv_func_CFLocaleCopyCurrent=no
-gt_cv_func_CFPreferencesCopyAppValue=no
-gt_cv_func_unsetenv_ret=void
-gt_cv_inttypes_pri_broken=no
-gt_cv_ssize_t=yes
-pu_cv_header_mtio_check_field=mt_type
-pu_cv_header_rmt=yes
-
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-
-ABSOLUTE_DIRENT_H=''
-ABSOLUTE_FCNTL_H='"///usr/include/fcntl.h"'
-ABSOLUTE_FLOAT_H=''
-ABSOLUTE_INTTYPES_H='"///usr/include/inttypes.h"'
-ABSOLUTE_STDINT_H='"///usr/include/stdint.h"'
-ABSOLUTE_STDIO_H='"///usr/include/stdio.h"'
-ABSOLUTE_STDLIB_H='"///usr/include/stdlib.h"'
-ABSOLUTE_STRING_H='"///usr/include/string.h"'
-ABSOLUTE_SYSEXITS_H='"///usr/include/sysexits.h"'
-ABSOLUTE_SYS_STAT_H='"///usr/include/sys/stat.h"'
-ABSOLUTE_SYS_TIME_H='"///usr/include/sys/time.h"'
-ABSOLUTE_TIME_H='"///usr/include/time.h"'
-ABSOLUTE_UNISTD_H='"///usr/include/unistd.h"'
-ABSOLUTE_WCHAR_H=''
-ABSOLUTE_WCTYPE_H='"///usr/include/wctype.h"'
-ACLOCAL='${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run aclocal-1.10a'
-ALLOCA=''
-ALLOCA_H='alloca.h'
-AMDEPBACKSLASH='\'
-AMDEP_FALSE='#'
-AMDEP_TRUE=''
-AMTAR='${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run tar'
-AUTOCONF='${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoconf'
-AUTOHEADER='${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoheader'
-AUTOM4TE='${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autom4te'
-AUTOMAKE='${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run automake-1.10a'
-AWK='nawk'
-BITSIZEOF_PTRDIFF_T=''
-BITSIZEOF_SIG_ATOMIC_T=''
-BITSIZEOF_SIZE_T=''
-BITSIZEOF_WCHAR_T=''
-BITSIZEOF_WINT_T=''
-CC='gcc -std=gnu99'
-CCDEPMODE='depmode=gcc3'
-CFLAGS='-g -O2'
-CPIO_MT_PROG=''
-CPP='gcc -E'
-CPPFLAGS=''
-CYGPATH_W='echo'
-DEFAULT_RMT_COMMAND=''
-DEFAULT_RMT_DIR='$(libexecdir)'
-DEFS='-DHAVE_CONFIG_H'
-DEPDIR='.deps'
-DIRENT_H=''
-ECHO_C=''
-ECHO_N='-n'
-ECHO_T=''
-EGREP='/usr/bin/grep -E'
-EOVERFLOW=''
-EXEEXT=''
-FCNTL_H='fcntl.h'
-FLOAT_H=''
-FNMATCH_H='fnmatch.h'
-GETOPT_H='getopt.h'
-GL_COND_LIBTOOL_FALSE=''
-GL_COND_LIBTOOL_TRUE='#'
-GMSGFMT='/usr/local/bin/msgfmt'
-GMSGFMT_015=':'
-GNULIB_CHOWN='1'
-GNULIB_DUP2='1'
-GNULIB_FCHDIR='1'
-GNULIB_FFLUSH='0'
-GNULIB_FPRINTF_POSIX='0'
-GNULIB_FSEEK='0'
-GNULIB_FSEEKO='0'
-GNULIB_FTELL='0'
-GNULIB_FTELLO='0'
-GNULIB_FTRUNCATE='0'
-GNULIB_GETCWD='1'
-GNULIB_GETLOGIN_R='0'
-GNULIB_GETSUBOPT='0'
-GNULIB_IMAXABS='0'
-GNULIB_IMAXDIV='0'
-GNULIB_LSEEK='0'
-GNULIB_MBSCASECMP='0'
-GNULIB_MBSCASESTR='0'
-GNULIB_MBSCHR='0'
-GNULIB_MBSCSPN='0'
-GNULIB_MBSLEN='0'
-GNULIB_MBSNCASECMP='0'
-GNULIB_MBSPBRK='0'
-GNULIB_MBSPCASECMP='0'
-GNULIB_MBSRCHR='0'
-GNULIB_MBSSEP='0'
-GNULIB_MBSSPN='0'
-GNULIB_MBSSTR='0'
-GNULIB_MBSTOK_R='0'
-GNULIB_MEMMEM='0'
-GNULIB_MEMPCPY='1'
-GNULIB_MEMRCHR='1'
-GNULIB_MKDTEMP='0'
-GNULIB_MKSTEMP='0'
-GNULIB_PRINTF_POSIX='0'
-GNULIB_READLINK='1'
-GNULIB_SLEEP='1'
-GNULIB_SNPRINTF='0'
-GNULIB_SPRINTF_POSIX='0'
-GNULIB_STPCPY='1'
-GNULIB_STPNCPY='0'
-GNULIB_STRCASESTR='0'
-GNULIB_STRCHRNUL='1'
-GNULIB_STRDUP='1'
-GNULIB_STRNDUP='1'
-GNULIB_STRNLEN='1'
-GNULIB_STRPBRK='0'
-GNULIB_STRSEP='0'
-GNULIB_STRTOIMAX='0'
-GNULIB_STRTOK_R='0'
-GNULIB_STRTOUMAX='0'
-GNULIB_VASPRINTF='0'
-GNULIB_VFPRINTF_POSIX='0'
-GNULIB_VPRINTF_POSIX='0'
-GNULIB_VSNPRINTF='1'
-GNULIB_VSPRINTF_POSIX='0'
-GREP='/usr/bin/grep'
-HAVE_DECL_GETLOGIN_R='1'
-HAVE_DECL_IMAXABS='1'
-HAVE_DECL_IMAXDIV='1'
-HAVE_DECL_MEMMEM='1'
-HAVE_DECL_MEMRCHR='0'
-HAVE_DECL_MKDIR='1'
-HAVE_DECL_SNPRINTF='1'
-HAVE_DECL_STRDUP='1'
-HAVE_DECL_STRNCASECMP='1'
-HAVE_DECL_STRNDUP='1'
-HAVE_DECL_STRNLEN='0'
-HAVE_DECL_STRTOIMAX='1'
-HAVE_DECL_STRTOK_R='1'
-HAVE_DECL_STRTOUMAX='1'
-HAVE_DECL_VSNPRINTF='1'
-HAVE_DUP2='1'
-HAVE_FSEEKO='1'
-HAVE_FTELLO='1'
-HAVE_FTRUNCATE='1'
-HAVE_GETSUBOPT='1'
-HAVE_INTTYPES_H='1'
-HAVE_IO_H='0'
-HAVE_ISWCNTRL='1'
-HAVE_LONG_LONG_INT='1'
-HAVE_LSTAT='1'
-HAVE_MEMPCPY='0'
-HAVE_MKDTEMP='1'
-HAVE_READLINK='1'
-HAVE_SIGNED_SIG_ATOMIC_T=''
-HAVE_SIGNED_WCHAR_T=''
-HAVE_SIGNED_WINT_T=''
-HAVE_SLEEP='1'
-HAVE_STDINT_H='1'
-HAVE_STPCPY='1'
-HAVE_STPNCPY='1'
-HAVE_STRCASECMP='1'
-HAVE_STRCASESTR='1'
-HAVE_STRCHRNUL='0'
-HAVE_STRNDUP='1'
-HAVE_STRPBRK='1'
-HAVE_STRSEP='1'
-HAVE_STRUCT_TIMEVAL='1'
-HAVE_SYSEXITS_H='1'
-HAVE_SYS_BITYPES_H=''
-HAVE_SYS_INTTYPES_H=''
-HAVE_SYS_TIME_H='1'
-HAVE_SYS_TYPES_H='1'
-HAVE_UNISTD_H='1'
-HAVE_UNSIGNED_LONG_LONG_INT='1'
-HAVE_VASPRINTF='1'
-HAVE_WCTYPE_H='1'
-HAVE_WINT_T='1'
-HAVE__BOOL='1'
-INSTALL_DATA='${INSTALL} -m 644'
-INSTALL_PROGRAM='${INSTALL}'
-INSTALL_SCRIPT='${INSTALL}'
-INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
-INTLLIBS=''
-INTL_MACOSX_LIBS=''
-INTTYPES_H='inttypes.h'
-LDFLAGS=''
-LIBCPIO_LIBDEPS=''
-LIBCPIO_LTLIBDEPS=''
-LIBICONV='-liconv'
-LIBINTL=''
-LIBOBJS=''
-LIBS=''
-LIB_CLOCK_GETTIME=''
-LIB_SETSOCKOPT=''
-LTLIBICONV='-liconv'
-LTLIBINTL=''
-LTLIBOBJS=''
-MAKEINFO='${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run makeinfo'
-MSGFMT='/usr/local/bin/msgfmt'
-MSGFMT_015=':'
-MSGMERGE='/usr/local/bin/msgmerge'
-OBJEXT='o'
-PACKAGE='cpio'
-PACKAGE_BUGREPORT='bug-cpio at gnu.org'
-PACKAGE_NAME='GNU cpio'
-PACKAGE_STRING='GNU cpio 2.8'
-PACKAGE_TARNAME='cpio'
-PACKAGE_VERSION='2.8'
-PATH_SEPARATOR=':'
-POSUB=''
-PRIPTR_PREFIX='""'
-PRI_MACROS_BROKEN='0'
-PTRDIFF_T_SUFFIX=''
-PU_RMT_PROG='rmt$(EXEEXT)'
-RANLIB='ranlib'
-REPLACE_CHOWN='0'
-REPLACE_FCHDIR='0'
-REPLACE_FFLUSH='0'
-REPLACE_FPRINTF='0'
-REPLACE_FSEEK='0'
-REPLACE_FSEEKO='0'
-REPLACE_FTELL='0'
-REPLACE_FTELLO='0'
-REPLACE_GETCWD='1'
-REPLACE_GETTIMEOFDAY='0'
-REPLACE_LOCALTIME_R='0'
-REPLACE_LSEEK='0'
-REPLACE_MKSTEMP='0'
-REPLACE_NANOSLEEP='GNULIB_PORTCHECK'
-REPLACE_PRINTF='0'
-REPLACE_SNPRINTF='0'
-REPLACE_SPRINTF='0'
-REPLACE_STRPTIME='GNULIB_PORTCHECK'
-REPLACE_TIMEGM='GNULIB_PORTCHECK'
-REPLACE_VASPRINTF='0'
-REPLACE_VFPRINTF='0'
-REPLACE_VPRINTF='0'
-REPLACE_VSNPRINTF='0'
-REPLACE_VSPRINTF='0'
-SET_MAKE=''
-SHELL='/bin/ksh'
-SIG_ATOMIC_T_SUFFIX=''
-SIZE_T_SUFFIX=''
-STDBOOL_H=''
-STDINT_H=''
-STRIP=''
-SYSEXITS_H=''
-SYS_STAT_H='sys/stat.h'
-SYS_TIME_H=''
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC='0'
-TIME_H_DEFINES_STRUCT_TIMESPEC='1'
-USE_NLS='no'
-VERSION='2.8'
-WCHAR_H=''
-WCHAR_T_SUFFIX=''
-WCTYPE_H=''
-WINT_T_SUFFIX=''
-XGETTEXT='/usr/local/bin/xgettext'
-XGETTEXT_015=':'
-YACC='byacc'
-YFLAGS=''
-ac_ct_CC='gcc'
-am__fastdepCC_FALSE='#'
-am__fastdepCC_TRUE=''
-am__include='include'
-am__isrc=''
-am__leading_dot='.'
-am__quote=''
-am__tar='${AMTAR} chof - "$$tardir"'
-am__untar='${AMTAR} xf -'
-bindir='${exec_prefix}/bin'
-build='x86_64-mbsd-freebsd6.0'
-build_alias='amd64-mbsd-freebsd6.0'
-build_cpu='x86_64'
-build_os='freebsd6.0'
-build_vendor='mbsd'
-datadir='${datarootdir}'
-datarootdir='${prefix}/share'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-dvidir='${docdir}'
-exec_prefix='${prefix}'
-gl_LIBOBJS=' __fpending.o argmatch.o asnprintf.o basename.o canonicalize-lgpl.o chdir-long.o close-stream.o closeout.o creat-safer.o dirname.o dup-safer.o error.o exitfail.o fchmodat.o fchownat.o fd-safer.o fnmatch.o getcwd.o getopt.o getopt1.o gettime.o hash.o imaxtostr.o lstat.o mempcpy.o memrchr.o mkdirat.o obstack.o offtostr.o open-safer.o openat.o openat-proc.o pipe-safer.o printf-args.o printf-parse.o quote.o quotearg.o safe-read.o safe-write.o save-cwd.o savedir.o strchrnul.o stripslash.o strnlen.o uinttostr.o umaxtostr.o utimens.o vasnprintf.o xgetcwd.o xmalloc.o'
-gl_LTLIBOBJS=' __fpending.lo argmatch.lo asnprintf.lo basename.lo canonicalize-lgpl.lo chdir-long.lo close-stream.lo closeout.lo creat-safer.lo dirname.lo dup-safer.lo error.lo exitfail.lo fchmodat.lo fchownat.lo fd-safer.lo fnmatch.lo getcwd.lo getopt.lo getopt1.lo gettime.lo hash.lo imaxtostr.lo lstat.lo mempcpy.lo memrchr.lo mkdirat.lo obstack.lo offtostr.lo open-safer.lo openat.lo openat-proc.lo pipe-safer.lo printf-args.lo printf-parse.lo quote.lo quotearg.lo safe-read.lo safe-write.lo save-cwd.lo savedir.lo strchrnul.lo stripslash.lo strnlen.lo uinttostr.lo umaxtostr.lo utimens.lo vasnprintf.lo xgetcwd.lo xmalloc.lo'
-host='x86_64-mbsd-freebsd6.0'
-host_alias=''
-host_cpu='x86_64'
-host_os='freebsd6.0'
-host_vendor='mbsd'
-htmldir='${docdir}'
-includedir='${prefix}/include'
-infodir='${datarootdir}/info'
-install_sh='$(SHELL) /home/laffer1/cpio/cpio-2.8/build-aux/install-sh'
-libdir='${exec_prefix}/lib'
-libexecdir='${exec_prefix}/libexec'
-localedir='${datarootdir}/locale'
-localstatedir='${prefix}/var'
-mandir='${datarootdir}/man'
-mkdir_p='$(top_builddir)/build-aux/install-sh -c -d'
-oldincludedir='/usr/include'
-pdfdir='${docdir}'
-prefix='/usr/local'
-program_transform_name='s,x,x,'
-psdir='${docdir}'
-sbindir='${exec_prefix}/sbin'
-sharedstatedir='${prefix}/com'
-sysconfdir='${prefix}/etc'
-target_alias='amd64-mbsd-freebsd6.0'
-
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-
-#define PACKAGE_NAME "GNU cpio"
-#define PACKAGE_TARNAME "cpio"
-#define PACKAGE_VERSION "2.8"
-#define PACKAGE_STRING "GNU cpio 2.8"
-#define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-#define PACKAGE "cpio"
-#define VERSION "2.8"
-#define _GNU_SOURCE 1
-#define STDC_HEADERS 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_UNISTD_H 1
-#define __EXTENSIONS__ 1
-#define _POSIX_PTHREAD_SEMANTICS 1
-#define _TANDEM_SOURCE 1
-#define PROTOTYPES 1
-#define __PROTOTYPES 1
-#define RETSIGTYPE void
-#define STDC_HEADERS 1
-#define HAVE_DIRENT_H 1
-#define HAVE_FCHMOD 1
-#define HAVE_FCHOWN 1
-#define HAVE_ALLOCA 1
-#define HAVE_STDLIB_H 1
-#define MALLOC_0_IS_NONNULL 1
-#define HAVE_LONG_LONG_INT 1
-#define HAVE_DECL_GETENV 1
-#define HAVE_DECL_CLEARERR_UNLOCKED 1
-#define HAVE_DECL_FEOF_UNLOCKED 1
-#define HAVE_DECL_FERROR_UNLOCKED 1
-#define HAVE_DECL_FFLUSH_UNLOCKED 0
-#define HAVE_DECL_FGETS_UNLOCKED 0
-#define HAVE_DECL_FPUTC_UNLOCKED 0
-#define HAVE_DECL_FPUTS_UNLOCKED 0
-#define HAVE_DECL_FREAD_UNLOCKED 0
-#define HAVE_DECL_FWRITE_UNLOCKED 0
-#define HAVE_DECL_GETC_UNLOCKED 1
-#define HAVE_DECL_GETCHAR_UNLOCKED 1
-#define HAVE_DECL_PUTC_UNLOCKED 1
-#define HAVE_DECL_PUTCHAR_UNLOCKED 1
-#define HAVE_FLOCKFILE 1
-#define HAVE_FUNLOCKFILE 1
-#define HAVE_GETCWD 1
-#define HAVE_READLINK 1
-#define HAVE_DUP2 1
-#define HAVE_FCHDIR 1
-#define HAVE_BTOWC 1
-#define HAVE_ISWCTYPE 1
-#define HAVE_MBSRTOWCS 1
-#define HAVE_WMEMCHR 1
-#define HAVE_WMEMCPY 1
-#define HAVE_GETTIMEOFDAY 1
-#define HAVE_ALARM 1
-#define HAVE_LCHMOD 1
-#define HAVE_MBSINIT 1
-#define HAVE_SETENV 1
-#define HAVE_SLEEP 1
-#define HAVE_STRERROR 1
-#define HAVE_LSTAT 1
-#define HAVE_PIPE 1
-#define HAVE_FUTIMES 1
-#define HAVE_ISWCNTRL 1
-#define HAVE_MKFIFO 1
-#define HAVE_SETLOCALE 1
-#define HAVE_SYS_PARAM_H 1
-#define HAVE_UNISTD_H 1
-#define HAVE_DIRENT_H 1
-#define HAVE_FCNTL_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_WCTYPE_H 1
-#define HAVE_SYS_TIME_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_SYSEXITS_H 1
-#define HAVE_TIME_H 1
-#define HAVE_UTIME_H 1
-#define HAVE_WCHAR_H 1
-#define HAVE_NETDB_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_SYS_WAIT_H 1
-#define HAVE_SYS_MTIO_H 1
-#define HAVE_SGTTY_H 1
-#define HAVE_LOCALE_H 1
-#define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-#define HAVE_UNISTD_H 1
-#define HAVE_CHOWN 1
-#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-#define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-#define HAVE_DECL_STRERROR_R 1
-#define HAVE_STRERROR_R 1
-#define HAVE_MBSTATE_T 1
-#define HAVE_DECL_GETCWD 1
-#define HAVE__BOOL 1
-#define HAVE_STDBOOL_H 1
-#define HAVE_TM_GMTOFF 1
-#define HAVE_GETOPT_H 1
-#define HAVE_GETOPT_LONG_ONLY 1
-#define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-#define HAVE_UNSIGNED_LONG_LONG_INT 1
-#define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-#define HAVE_INTTYPES_H 1
-#define HAVE_DECL_IMAXABS 1
-#define HAVE_DECL_IMAXDIV 1
-#define HAVE_DECL_STRTOIMAX 1
-#define HAVE_DECL_STRTOUMAX 1
-#define HAVE_DECL_LCHOWN 1
-#define HAVE_DECL_MEMRCHR 0
-#define HAVE_DECL_STRDUP 1
-#define ABSOLUTE_STRING_H "///usr/include/string.h"
-#define HAVE_DECL_STRNDUP 1
-#define HAVE_DECL_STRNLEN 0
-#define ABSOLUTE_TIME_H "///usr/include/time.h"
-#define HAVE_WORKING_UTIMES 1
-#define HAVE_STRUCT_UTIMBUF 1
-#define HAVE_WCHAR_T 1
-#define HAVE_WINT_T 1
-#define HAVE_INTTYPES_H_WITH_UINTMAX 1
-#define HAVE_STDINT_H_WITH_UINTMAX 1
-#define HAVE_LONG_LONG 1
-#define HAVE_INTMAX_T 1
-#define HAVE_DECL_VSNPRINTF 1
-#define HAVE_STDINT_H 1
-#define HAVE_ALLOCA_H 1
-#define __GETOPT_PREFIX rpl_
-#define GNULIB_PROGRAM_INVOCATION_NAME 1
-#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-#define realpath rpl_realpath
-#define HAVE_CLOCK_GETTIME 1
-#define HAVE_CLOCK_SETTIME 1
-#define GNULIB_CLOSE_STREAM 1
-#define D_INO_IN_DIRENT 1
-#define HAVE_DECL_DIRFD 1
-#define HAVE_WORKING_O_NOATIME 0
-#define HAVE_WORKING_O_NOFOLLOW 1
-#define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-#define GNULIB_FCNTL_SAFER 1
-#define HAVE_STRUCT_STAT_ST_BLOCKS 1
-#define HAVE_ST_BLOCKS 1
-#define HAVE_DECL_ISBLANK 1
-#define fnmatch gnu_fnmatch
-#define HAVE_DECL___FPENDING 0
-#define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-#define HAVE_PARTLY_WORKING_GETCWD 1
-#define HAVE_GETPAGESIZE 1
-#define HAVE_STRUCT_TM_TM_ZONE 1
-#define HAVE_TM_ZONE 1
-#define __GETOPT_PREFIX rpl_
-#define HAVE_INLINE 1
-#define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-#define HAVE_LCHOWN 1
-#define HAVE_STDLIB_H 1
-#define HAVE_MALLOC 1
-#define __OPENAT_PREFIX rpl_
-#define fchownat rpl_fchownat
-#define HAVE_MBSTATE_T 1
-#define HAVE_MBRTOWC 1
-#define HAVE_UNSETENV 1
-#define VOID_UNSETENV 1
-#define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-#define ABSOLUTE_STDIO_H "///usr/include/stdio.h"
-#define ABSOLUTE_STDLIB_H "///usr/include/stdlib.h"
-#define HAVE_STPCPY 1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_DECL_STRNCASECMP 1
-#define HAVE_STRDUP 1
-#define HAVE_STRNDUP 1
-#define strnlen rpl_strnlen
-#define HAVE_STRTOL 1
-#define HAVE_DECL_MKDIR 1
-#define ABSOLUTE_SYS_STAT_H "///usr/include/sys/stat.h"
-#define ABSOLUTE_SYSEXITS_H "///usr/include/sysexits.h"
-#define ABSOLUTE_UNISTD_H "///usr/include/unistd.h"
-#define USE_UNLOCKED_IO 1
-#define HAVE_PTRDIFF_T 1
-#define HAVE_SNPRINTF 1
-#define HAVE_WCSLEN 1
-#define HAVE_VSNPRINTF 1
-#define ABSOLUTE_WCTYPE_H "///usr/include/wctype.h"
-#define HAVE_STDINT_H 1
-#define TIME_WITH_SYS_TIME 1
-#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-#define HAVE_ST_BLKSIZE 1
-#define HAVE_SYS_MTIO_H 1
-#define MTIO_CHECK_FIELD mt_type
-#define HAVE_SYS_BUF_H 1
-#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-#define HAVE_UNISTD_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_FCNTL_H 1
-#define HAVE_UTMP_H 1
-#define HAVE_GETOPT_H 1
-#define HAVE_LOCALE_H 1
-#define HAVE_SYS_WAIT_H 1
-#define HAVE_UTIME_H 1
-#define HAVE_LOCALE_H 1
-#define HAVE_SYS_ERRLIST 1
-#define HAVE_DECL_ERRNO 1
-#define HAVE_DECL_GETPWNAM 1
-#define HAVE_DECL_GETGRNAM 1
-#define HAVE_DECL_GETGRGID 1
-#define HAVE_DECL_STRDUP 1
-#define HAVE_DECL_STRERROR 1
-#define HAVE_DECL_GETENV 1
-#define HAVE_DECL_ATOI 1
-#define HAVE_DECL_EXIT 1
-
-configure: exit 0
--- contrib/cpio/ABOUT-NLS
+++ /dev/null
@@ -1,1101 +0,0 @@
-1 Notes on the Free Translation Project
-***************************************
-
-Free software is going international! The Free Translation Project is
-a way to get maintainers of free software, translators, and users all
-together, so that free software will gradually become able to speak many
-languages. A few packages already provide translations for their
-messages.
-
- If you found this `ABOUT-NLS' file inside a distribution, you may
-assume that the distributed package does use GNU `gettext' internally,
-itself available at your nearest GNU archive site. But you do _not_
-need to install GNU `gettext' prior to configuring, installing or using
-this package with messages translated.
-
- Installers will find here some useful hints. These notes also
-explain how users should proceed for getting the programs to use the
-available translations. They tell how people wanting to contribute and
-work on translations can contact the appropriate team.
-
- When reporting bugs in the `intl/' directory or bugs which may be
-related to internationalization, you should tell about the version of
-`gettext' which is used. The information can be found in the
-`intl/VERSION' file, in internationalized packages.
-
-1.1 Quick configuration advice
-==============================
-
-If you want to exploit the full power of internationalization, you
-should configure it using
-
- ./configure --with-included-gettext
-
-to force usage of internationalizing routines provided within this
-package, despite the existence of internationalizing capabilities in the
-operating system where this package is being installed. So far, only
-the `gettext' implementation in the GNU C library version 2 provides as
-many features (such as locale alias, message inheritance, automatic
-charset conversion or plural form handling) as the implementation here.
-It is also not possible to offer this additional functionality on top
-of a `catgets' implementation. Future versions of GNU `gettext' will
-very likely convey even more functionality. So it might be a good idea
-to change to GNU `gettext' as soon as possible.
-
- So you need _not_ provide this option if you are using GNU libc 2 or
-you have installed a recent copy of the GNU gettext package with the
-included `libintl'.
-
-1.2 INSTALL Matters
-===================
-
-Some packages are "localizable" when properly installed; the programs
-they contain can be made to speak your own native language. Most such
-packages use GNU `gettext'. Other packages have their own ways to
-internationalization, predating GNU `gettext'.
-
- By default, this package will be installed to allow translation of
-messages. It will automatically detect whether the system already
-provides the GNU `gettext' functions. If not, the included GNU
-`gettext' library will be used. This library is wholly contained
-within this package, usually in the `intl/' subdirectory, so prior
-installation of the GNU `gettext' package is _not_ required.
-Installers may use special options at configuration time for changing
-the default behaviour. The commands:
-
- ./configure --with-included-gettext
- ./configure --disable-nls
-
-will, respectively, bypass any pre-existing `gettext' to use the
-internationalizing routines provided within this package, or else,
-_totally_ disable translation of messages.
-
- When you already have GNU `gettext' installed on your system and run
-configure without an option for your new package, `configure' will
-probably detect the previously built and installed `libintl.a' file and
-will decide to use this. This might not be desirable. You should use
-the more recent version of the GNU `gettext' library. I.e. if the file
-`intl/VERSION' shows that the library which comes with this package is
-more recent, you should use
-
- ./configure --with-included-gettext
-
-to prevent auto-detection.
-
- The configuration process will not test for the `catgets' function
-and therefore it will not be used. The reason is that even an
-emulation of `gettext' on top of `catgets' could not provide all the
-extensions of the GNU `gettext' library.
-
- Internationalized packages usually have many `po/LL.po' files, where
-LL gives an ISO 639 two-letter code identifying the language. Unless
-translations have been forbidden at `configure' time by using the
-`--disable-nls' switch, all available translations are installed
-together with the package. However, the environment variable `LINGUAS'
-may be set, prior to configuration, to limit the installed set.
-`LINGUAS' should then contain a space separated list of two-letter
-codes, stating which languages are allowed.
-
-1.3 Using This Package
-======================
-
-As a user, if your language has been installed for this package, you
-only have to set the `LANG' environment variable to the appropriate
-`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
-and `CC' is an ISO 3166 two-letter country code. For example, let's
-suppose that you speak German and live in Germany. At the shell
-prompt, merely execute `setenv LANG de_DE' (in `csh'),
-`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
-This can be done from your `.login' or `.profile' file, once and for
-all.
-
- You might think that the country code specification is redundant.
-But in fact, some languages have dialects in different countries. For
-example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
-country code serves to distinguish the dialects.
-
- The locale naming convention of `LL_CC', with `LL' denoting the
-language and `CC' denoting the country, is the one use on systems based
-on GNU libc. On other systems, some variations of this scheme are
-used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
-locales supported by your system for your language by running the
-command `locale -a | grep '^LL''.
-
- Not all programs have translations for all languages. By default, an
-English message is shown in place of a nonexistent translation. If you
-understand other languages, you can set up a priority list of languages.
-This is done through a different environment variable, called
-`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
-for the purpose of message handling, but you still need to have `LANG'
-set to the primary language; this is required by other parts of the
-system libraries. For example, some Swedish users who would rather
-read translations in German than English for when Swedish is not
-available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
-
- Special advice for Norwegian users: The language code for Norwegian
-bokma*l changed from `no' to `nb' recently (in 2003). During the
-transition period, while some message catalogs for this language are
-installed under `nb' and some older ones under `no', it's recommended
-for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
-older translations are used.
-
- In the `LANGUAGE' environment variable, but not in the `LANG'
-environment variable, `LL_CC' combinations can be abbreviated as `LL'
-to denote the language's main dialect. For example, `de' is equivalent
-to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
-(Portuguese as spoken in Portugal) in this context.
-
-1.4 Translating Teams
-=====================
-
-For the Free Translation Project to be a success, we need interested
-people who like their own language and write it well, and who are also
-able to synergize with other translators speaking the same language.
-Each translation team has its own mailing list. The up-to-date list of
-teams can be found at the Free Translation Project's homepage,
-`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
-area.
-
- If you'd like to volunteer to _work_ at translating messages, you
-should become a member of the translating team for your own language.
-The subscribing address is _not_ the same as the list itself, it has
-`-request' appended. For example, speakers of Swedish can send a
-message to `sv-request at li.org', having this message body:
-
- subscribe
-
- Keep in mind that team members are expected to participate
-_actively_ in translations, or at solving translational difficulties,
-rather than merely lurking around. If your team does not exist yet and
-you want to start one, or if you are unsure about what to do or how to
-get started, please write to `translation at iro.umontreal.ca' to reach the
-coordinator for all translator teams.
-
- The English team is special. It works at improving and uniformizing
-the terminology in use. Proven linguistic skills are praised more than
-programming skills, here.
-
-1.5 Available Packages
-======================
-
-Languages are not equally supported in all packages. The following
-matrix shows the current state of internationalization, as of October
-2006. The matrix shows, in regard of each package, for which languages
-PO files have been submitted to translation coordination, with a
-translation percentage of at least 50%.
-
- Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo
- +----------------------------------------------------+
- GNUnet | [] |
- a2ps | [] [] [] [] [] |
- aegis | () |
- ant-phone | () |
- anubis | [] |
- ap-utils | |
- aspell | [] [] [] [] [] |
- bash | [] [] [] |
- batchelor | [] |
- bfd | |
- bibshelf | [] |
- binutils | [] |
- bison | [] [] |
- bison-runtime | |
- bluez-pin | [] [] [] [] [] |
- cflow | [] |
- clisp | [] [] |
- console-tools | [] [] |
- coreutils | [] [] [] |
- cpio | |
- cpplib | [] [] [] |
- cryptonit | [] |
- darkstat | [] () [] |
- dialog | [] [] [] [] [] [] |
- diffutils | [] [] [] [] [] [] |
- doodle | [] |
- e2fsprogs | [] [] |
- enscript | [] [] [] [] |
- error | [] [] [] [] |
- fetchmail | [] [] () [] |
- fileutils | [] [] |
- findutils | [] [] [] |
- flex | [] [] [] |
- fslint | [] |
- gas | |
- gawk | [] [] [] |
- gbiff | [] |
- gcal | [] |
- gcc | [] |
- gettext-examples | [] [] [] [] [] |
- gettext-runtime | [] [] [] [] [] |
- gettext-tools | [] [] |
- gimp-print | [] [] [] [] |
- gip | [] |
- gliv | [] |
- glunarclock | [] |
- gmult | [] [] |
- gnubiff | () |
- gnucash | () () [] |
- gnucash-glossary | [] () |
- gnuedu | |
- gnulib | [] [] [] [] [] [] |
- gnunet-gtk | |
- gnutls | |
- gpe-aerial | [] [] |
- gpe-beam | [] [] |
- gpe-calendar | |
- gpe-clock | [] [] |
- gpe-conf | [] [] |
- gpe-contacts | |
- gpe-edit | [] |
- gpe-filemanager | |
- gpe-go | [] |
- gpe-login | [] [] |
- gpe-ownerinfo | [] [] |
- gpe-package | |
- gpe-sketchbook | [] [] |
- gpe-su | [] [] |
- gpe-taskmanager | [] [] |
- gpe-timesheet | [] |
- gpe-today | [] [] |
- gpe-todo | |
- gphoto2 | [] [] [] [] |
- gprof | [] [] |
- gpsdrive | () () |
- gramadoir | [] [] |
- grep | [] [] [] [] [] [] |
- gretl | |
- gsasl | |
- gss | |
- gst-plugins | [] [] [] [] |
- gst-plugins-base | [] [] [] |
- gst-plugins-good | [] [] [] [] [] [] [] |
- gstreamer | [] [] [] [] [] [] [] |
- gtick | () |
- gtkam | [] [] [] |
- gtkorphan | [] [] |
- gtkspell | [] [] [] [] |
- gutenprint | [] |
- hello | [] [] [] [] [] |
- id-utils | [] [] |
- impost | |
- indent | [] [] [] |
- iso_3166 | [] [] |
- iso_3166_2 | |
- iso_4217 | [] |
- iso_639 | [] [] |
- jpilot | [] |
- jtag | |
- jwhois | |
- kbd | [] [] [] [] |
- keytouch | |
- keytouch-editor | |
- keytouch-keyboa... | |
- latrine | () |
- ld | [] |
- leafpad | [] [] [] [] [] |
- libc | [] [] [] [] [] |
- libexif | [] |
- libextractor | [] |
- libgpewidget | [] [] [] |
- libgpg-error | [] |
- libgphoto2 | [] [] |
- libgphoto2_port | [] [] |
- libgsasl | |
- libiconv | [] [] |
- libidn | [] [] |
- lifelines | [] () |
- lilypond | [] |
- lingoteach | |
- lynx | [] [] [] [] |
- m4 | [] [] [] [] |
- mailutils | [] |
- make | [] [] |
- man-db | [] () [] [] |
- minicom | [] [] [] |
- mysecretdiary | [] [] |
- nano | [] [] [] |
- nano_1_0 | [] () [] [] |
- opcodes | [] |
- parted | |
- pilot-qof | [] |
- psmisc | [] |
- pwdutils | |
- python | |
- qof | |
- radius | [] |
- recode | [] [] [] [] [] [] |
- rpm | [] [] |
- screem | |
- scrollkeeper | [] [] [] [] [] [] [] [] |
- sed | [] [] [] |
- sh-utils | [] [] |
- shared-mime-info | [] [] [] [] |
- sharutils | [] [] [] [] [] [] |
- shishi | |
- silky | |
- skencil | [] () |
- sketch | [] () |
- solfege | |
- soundtracker | [] [] |
- sp | [] |
- stardict | [] |
- system-tools-ba... | [] [] [] [] [] [] [] [] [] |
- tar | [] |
- texinfo | [] [] [] |
- textutils | [] [] [] |
- tin | () () |
- tp-robot | [] |
- tuxpaint | [] [] [] [] [] |
- unicode-han-tra... | |
- unicode-transla... | |
- util-linux | [] [] [] [] |
- vorbis-tools | [] [] [] [] |
- wastesedge | () |
- wdiff | [] [] [] [] |
- wget | [] [] |
- xchat | [] [] [] [] [] [] |
- xkeyboard-config | |
- xpad | [] [] |
- +----------------------------------------------------+
- af am ar az be bg bs ca cs cy da de el en en_GB eo
- 10 0 1 2 9 22 1 42 41 2 60 95 16 1 17 16
-
- es et eu fa fi fr ga gl gu he hi hr hu id is it
- +--------------------------------------------------+
- GNUnet | |
- a2ps | [] [] [] () |
- aegis | |
- ant-phone | [] |
- anubis | [] |
- ap-utils | [] [] |
- aspell | [] [] [] |
- bash | [] [] [] |
- batchelor | [] [] |
- bfd | [] |
- bibshelf | [] [] [] |
- binutils | [] [] [] |
- bison | [] [] [] [] [] [] |
- bison-runtime | [] [] [] [] [] |
- bluez-pin | [] [] [] [] [] |
- cflow | [] |
- clisp | [] [] |
- console-tools | |
- coreutils | [] [] [] [] [] [] |
- cpio | [] [] [] |
- cpplib | [] [] |
- cryptonit | [] |
- darkstat | [] () [] [] [] |
- dialog | [] [] [] [] [] [] [] [] |
- diffutils | [] [] [] [] [] [] [] [] [] |
- doodle | [] [] |
- e2fsprogs | [] [] [] |
- enscript | [] [] [] |
- error | [] [] [] [] [] |
- fetchmail | [] |
- fileutils | [] [] [] [] [] [] |
- findutils | [] [] [] [] |
- flex | [] [] [] |
- fslint | [] |
- gas | [] [] |
- gawk | [] [] [] [] |
- gbiff | [] |
- gcal | [] [] |
- gcc | [] |
- gettext-examples | [] [] [] [] [] [] |
- gettext-runtime | [] [] [] [] [] [] |
- gettext-tools | [] [] [] |
- gimp-print | [] [] |
- gip | [] [] [] |
- gliv | () |
- glunarclock | [] [] [] |
- gmult | [] [] [] |
- gnubiff | () () |
- gnucash | () () () |
- gnucash-glossary | [] [] |
- gnuedu | [] |
- gnulib | [] [] [] [] [] [] [] [] |
- gnunet-gtk | |
- gnutls | |
- gpe-aerial | [] [] |
- gpe-beam | [] [] |
- gpe-calendar | |
- gpe-clock | [] [] [] [] |
- gpe-conf | [] |
- gpe-contacts | [] [] |
- gpe-edit | [] [] [] [] |
- gpe-filemanager | [] |
- gpe-go | [] [] [] |
- gpe-login | [] [] [] |
- gpe-ownerinfo | [] [] [] [] [] |
- gpe-package | [] |
- gpe-sketchbook | [] [] |
- gpe-su | [] [] [] [] |
- gpe-taskmanager | [] [] [] |
- gpe-timesheet | [] [] [] [] |
- gpe-today | [] [] [] [] |
- gpe-todo | [] |
- gphoto2 | [] [] [] [] [] |
- gprof | [] [] [] [] |
- gpsdrive | () () [] () |
- gramadoir | [] [] |
- grep | [] [] [] [] [] [] [] [] [] [] [] [] |
- gretl | [] [] [] |
- gsasl | [] [] |
- gss | [] |
- gst-plugins | [] [] [] |
- gst-plugins-base | [] [] |
- gst-plugins-good | [] [] [] |
- gstreamer | [] [] [] |
- gtick | [] |
- gtkam | [] [] [] [] |
- gtkorphan | [] [] |
- gtkspell | [] [] [] [] [] [] |
- gutenprint | [] |
- hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
- id-utils | [] [] [] [] [] |
- impost | [] [] |
- indent | [] [] [] [] [] [] [] [] [] [] |
- iso_3166 | [] [] [] |
- iso_3166_2 | [] |
- iso_4217 | [] [] [] [] |
- iso_639 | [] [] [] [] [] |
- jpilot | [] [] |
- jtag | [] |
- jwhois | [] [] [] [] [] |
- kbd | [] [] |
- keytouch | [] |
- keytouch-editor | [] |
- keytouch-keyboa... | [] |
- latrine | [] [] [] |
- ld | [] [] |
- leafpad | [] [] [] [] [] [] |
- libc | [] [] [] [] [] |
- libexif | [] |
- libextractor | [] |
- libgpewidget | [] [] [] [] [] |
- libgpg-error | |
- libgphoto2 | [] [] [] |
- libgphoto2_port | [] [] |
- libgsasl | [] [] |
- libiconv | [] [] |
- libidn | [] [] |
- lifelines | () |
- lilypond | [] |
- lingoteach | [] [] [] |
- lynx | [] [] [] |
- m4 | [] [] [] [] |
- mailutils | [] [] |
- make | [] [] [] [] [] [] [] [] |
- man-db | () |
- minicom | [] [] [] [] |
- mysecretdiary | [] [] [] |
- nano | [] [] [] [] [] [] |
- nano_1_0 | [] [] [] [] [] |
- opcodes | [] [] [] [] |
- parted | [] [] [] [] |
- pilot-qof | |
- psmisc | [] [] [] |
- pwdutils | |
- python | |
- qof | [] |
- radius | [] [] |
- recode | [] [] [] [] [] [] [] [] |
- rpm | [] [] |
- screem | |
- scrollkeeper | [] [] [] |
- sed | [] [] [] [] [] |
- sh-utils | [] [] [] [] [] [] [] |
- shared-mime-info | [] [] [] [] [] [] |
- sharutils | [] [] [] [] [] [] [] [] |
- shishi | |
- silky | [] |
- skencil | [] [] |
- sketch | [] [] |
- solfege | [] |
- soundtracker | [] [] [] |
- sp | [] |
- stardict | [] |
- system-tools-ba... | [] [] [] [] [] [] [] [] |
- tar | [] [] [] [] [] [] [] |
- texinfo | [] [] |
- textutils | [] [] [] [] [] |
- tin | [] () |
- tp-robot | [] [] [] [] |
- tuxpaint | [] [] |
- unicode-han-tra... | |
- unicode-transla... | [] [] |
- util-linux | [] [] [] [] [] [] [] |
- vorbis-tools | [] [] |
- wastesedge | () |
- wdiff | [] [] [] [] [] [] [] [] |
- wget | [] [] [] [] [] [] [] [] |
- xchat | [] [] [] [] [] [] [] [] |
- xkeyboard-config | [] [] [] [] |
- xpad | [] [] [] |
- +--------------------------------------------------+
- es et eu fa fi fr ga gl gu he hi hr hu id is it
- 88 22 14 2 40 115 61 14 1 8 1 6 59 31 0 52
-
- ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
- +-------------------------------------------------+
- GNUnet | |
- a2ps | () [] [] () |
- aegis | () |
- ant-phone | [] |
- anubis | [] [] [] |
- ap-utils | [] |
- aspell | [] [] |
- bash | [] |
- batchelor | [] [] |
- bfd | |
- bibshelf | [] |
- binutils | |
- bison | [] [] [] |
- bison-runtime | [] [] [] |
- bluez-pin | [] [] [] |
- cflow | |
- clisp | [] |
- console-tools | |
- coreutils | [] |
- cpio | |
- cpplib | [] |
- cryptonit | [] |
- darkstat | [] [] |
- dialog | [] [] |
- diffutils | [] [] [] |
- doodle | |
- e2fsprogs | [] |
- enscript | [] |
- error | [] |
- fetchmail | [] [] |
- fileutils | [] [] |
- findutils | [] |
- flex | [] [] |
- fslint | [] [] |
- gas | |
- gawk | [] [] |
- gbiff | [] |
- gcal | |
- gcc | |
- gettext-examples | [] [] |
- gettext-runtime | [] [] [] |
- gettext-tools | [] [] |
- gimp-print | [] [] |
- gip | [] [] |
- gliv | [] |
- glunarclock | [] [] |
- gmult | [] [] |
- gnubiff | |
- gnucash | () () |
- gnucash-glossary | [] |
- gnuedu | |
- gnulib | [] [] [] [] |
- gnunet-gtk | |
- gnutls | |
- gpe-aerial | [] |
- gpe-beam | [] |
- gpe-calendar | [] |
- gpe-clock | [] [] [] |
- gpe-conf | [] [] |
- gpe-contacts | [] |
- gpe-edit | [] [] [] |
- gpe-filemanager | [] [] |
- gpe-go | [] [] [] |
- gpe-login | [] [] [] |
- gpe-ownerinfo | [] [] |
- gpe-package | [] [] |
- gpe-sketchbook | [] [] |
- gpe-su | [] [] [] |
- gpe-taskmanager | [] [] [] [] |
- gpe-timesheet | [] |
- gpe-today | [] [] |
- gpe-todo | [] |
- gphoto2 | [] [] |
- gprof | |
- gpsdrive | () () () |
- gramadoir | () |
- grep | [] [] [] [] |
- gretl | |
- gsasl | [] |
- gss | |
- gst-plugins | [] |
- gst-plugins-base | |
- gst-plugins-good | [] |
- gstreamer | [] |
- gtick | |
- gtkam | [] |
- gtkorphan | [] |
- gtkspell | [] [] |
- gutenprint | |
- hello | [] [] [] [] [] [] |
- id-utils | [] |
- impost | |
- indent | [] [] |
- iso_3166 | [] |
- iso_3166_2 | [] |
- iso_4217 | [] [] [] |
- iso_639 | [] [] |
- jpilot | () () () |
- jtag | |
- jwhois | [] |
- kbd | [] |
- keytouch | [] |
- keytouch-editor | |
- keytouch-keyboa... | |
- latrine | [] |
- ld | |
- leafpad | [] [] |
- libc | [] [] [] [] [] |
- libexif | |
- libextractor | |
- libgpewidget | [] |
- libgpg-error | |
- libgphoto2 | [] |
- libgphoto2_port | [] |
- libgsasl | [] |
- libiconv | |
- libidn | [] [] |
- lifelines | [] |
- lilypond | |
- lingoteach | [] |
- lynx | [] [] |
- m4 | [] [] |
- mailutils | |
- make | [] [] [] |
- man-db | () |
- minicom | [] |
- mysecretdiary | [] |
- nano | [] [] [] |
- nano_1_0 | [] [] [] |
- opcodes | [] |
- parted | [] [] |
- pilot-qof | |
- psmisc | [] [] [] |
- pwdutils | |
- python | |
- qof | |
- radius | |
- recode | [] |
- rpm | [] [] |
- screem | [] |
- scrollkeeper | [] [] [] [] |
- sed | [] [] |
- sh-utils | [] [] |
- shared-mime-info | [] [] [] [] [] |
- sharutils | [] [] |
- shishi | |
- silky | [] |
- skencil | |
- sketch | |
- solfege | |
- soundtracker | |
- sp | () |
- stardict | [] [] |
- system-tools-ba... | [] [] [] [] |
- tar | [] [] [] |
- texinfo | [] [] [] |
- textutils | [] [] [] |
- tin | |
- tp-robot | [] |
- tuxpaint | [] |
- unicode-han-tra... | |
- unicode-transla... | |
- util-linux | [] [] |
- vorbis-tools | [] |
- wastesedge | [] |
- wdiff | [] [] |
- wget | [] [] |
- xchat | [] [] [] [] |
- xkeyboard-config | [] |
- xpad | [] [] [] |
- +-------------------------------------------------+
- ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
- 52 24 2 2 1 3 0 2 3 21 0 15 1 97 5 1
-
- nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
- +------------------------------------------------------+
- GNUnet | |
- a2ps | () [] [] [] [] [] [] |
- aegis | () () |
- ant-phone | [] [] |
- anubis | [] [] [] |
- ap-utils | () |
- aspell | [] [] |
- bash | [] [] [] |
- batchelor | [] [] |
- bfd | |
- bibshelf | [] |
- binutils | [] [] |
- bison | [] [] [] [] [] |
- bison-runtime | [] [] [] [] |
- bluez-pin | [] [] [] [] [] [] [] [] [] |
- cflow | [] |
- clisp | [] |
- console-tools | [] |
- coreutils | [] [] [] [] |
- cpio | [] [] [] |
- cpplib | [] |
- cryptonit | [] [] |
- darkstat | [] [] [] [] [] [] |
- dialog | [] [] [] [] [] [] [] [] [] |
- diffutils | [] [] [] [] [] [] |
- doodle | [] [] |
- e2fsprogs | [] [] |
- enscript | [] [] [] [] [] |
- error | [] [] [] [] |
- fetchmail | [] [] [] |
- fileutils | [] [] [] [] [] |
- findutils | [] [] [] [] [] [] |
- flex | [] [] [] [] [] |
- fslint | [] [] [] [] |
- gas | |
- gawk | [] [] [] [] |
- gbiff | [] |
- gcal | [] |
- gcc | [] |
- gettext-examples | [] [] [] [] [] [] [] [] |
- gettext-runtime | [] [] [] [] [] [] [] [] |
- gettext-tools | [] [] [] [] [] [] [] |
- gimp-print | [] [] |
- gip | [] [] [] [] |
- gliv | [] [] [] [] |
- glunarclock | [] [] [] [] [] [] |
- gmult | [] [] [] [] |
- gnubiff | () |
- gnucash | () [] |
- gnucash-glossary | [] [] [] |
- gnuedu | |
- gnulib | [] [] [] [] [] |
- gnunet-gtk | [] |
- gnutls | [] [] |
- gpe-aerial | [] [] [] [] [] [] [] |
- gpe-beam | [] [] [] [] [] [] [] |
- gpe-calendar | [] |
- gpe-clock | [] [] [] [] [] [] [] [] |
- gpe-conf | [] [] [] [] [] [] [] |
- gpe-contacts | [] [] [] [] [] |
- gpe-edit | [] [] [] [] [] [] [] [] |
- gpe-filemanager | [] [] |
- gpe-go | [] [] [] [] [] [] |
- gpe-login | [] [] [] [] [] [] [] [] |
- gpe-ownerinfo | [] [] [] [] [] [] [] [] |
- gpe-package | [] [] |
- gpe-sketchbook | [] [] [] [] [] [] [] [] |
- gpe-su | [] [] [] [] [] [] [] [] |
- gpe-taskmanager | [] [] [] [] [] [] [] [] |
- gpe-timesheet | [] [] [] [] [] [] [] [] |
- gpe-today | [] [] [] [] [] [] [] [] |
- gpe-todo | [] [] [] [] |
- gphoto2 | [] [] [] [] [] |
- gprof | [] [] [] |
- gpsdrive | [] [] [] |
- gramadoir | [] [] |
- grep | [] [] [] [] [] [] [] [] |
- gretl | [] |
- gsasl | [] [] [] |
- gss | [] [] [] |
- gst-plugins | [] [] [] [] |
- gst-plugins-base | [] |
- gst-plugins-good | [] [] [] [] |
- gstreamer | [] [] [] |
- gtick | [] |
- gtkam | [] [] [] [] |
- gtkorphan | [] |
- gtkspell | [] [] [] [] [] [] [] [] |
- gutenprint | [] |
- hello | [] [] [] [] [] [] [] [] |
- id-utils | [] [] [] [] |
- impost | [] |
- indent | [] [] [] [] [] [] |
- iso_3166 | [] [] [] [] [] [] |
- iso_3166_2 | |
- iso_4217 | [] [] [] [] |
- iso_639 | [] [] [] [] |
- jpilot | |
- jtag | [] |
- jwhois | [] [] [] [] |
- kbd | [] [] [] |
- keytouch | [] |
- keytouch-editor | [] |
- keytouch-keyboa... | [] |
- latrine | [] [] |
- ld | [] |
- leafpad | [] [] [] [] [] [] |
- libc | [] [] [] [] [] |
- libexif | [] |
- libextractor | [] [] |
- libgpewidget | [] [] [] [] [] [] [] |
- libgpg-error | [] [] |
- libgphoto2 | [] |
- libgphoto2_port | [] [] [] |
- libgsasl | [] [] [] [] |
- libiconv | [] [] |
- libidn | [] [] () |
- lifelines | [] [] |
- lilypond | |
- lingoteach | [] |
- lynx | [] [] [] |
- m4 | [] [] [] [] [] |
- mailutils | [] [] [] [] |
- make | [] [] [] [] |
- man-db | [] [] |
- minicom | [] [] [] [] [] |
- mysecretdiary | [] [] [] [] |
- nano | [] [] [] |
- nano_1_0 | [] [] [] [] |
- opcodes | [] [] |
- parted | [] |
- pilot-qof | [] |
- psmisc | [] [] |
- pwdutils | [] [] |
- python | |
- qof | [] [] |
- radius | [] [] |
- recode | [] [] [] [] [] [] [] |
- rpm | [] [] [] [] |
- screem | |
- scrollkeeper | [] [] [] [] [] [] [] |
- sed | [] [] [] [] [] [] [] [] [] |
- sh-utils | [] [] [] |
- shared-mime-info | [] [] [] [] [] |
- sharutils | [] [] [] [] |
- shishi | [] |
- silky | [] |
- skencil | [] [] [] |
- sketch | [] [] [] |
- solfege | [] |
- soundtracker | [] [] |
- sp | |
- stardict | [] [] [] |
- system-tools-ba... | [] [] [] [] [] [] [] [] [] |
- tar | [] [] [] [] [] |
- texinfo | [] [] [] [] |
- textutils | [] [] [] |
- tin | () |
- tp-robot | [] |
- tuxpaint | [] [] [] [] [] |
- unicode-han-tra... | |
- unicode-transla... | |
- util-linux | [] [] [] [] |
- vorbis-tools | [] [] |
- wastesedge | |
- wdiff | [] [] [] [] [] [] |
- wget | [] [] [] [] |
- xchat | [] [] [] [] [] [] [] |
- xkeyboard-config | [] [] |
- xpad | [] [] [] |
- +------------------------------------------------------+
- nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
- 0 2 3 58 30 54 5 73 72 4 40 46 11 50 128 2
-
- tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
- +---------------------------------------------------+
- GNUnet | [] | 2
- a2ps | [] [] [] | 19
- aegis | | 0
- ant-phone | [] [] | 6
- anubis | [] [] [] | 11
- ap-utils | () [] | 4
- aspell | [] [] [] | 15
- bash | [] | 11
- batchelor | [] [] | 9
- bfd | | 1
- bibshelf | [] | 7
- binutils | [] [] [] | 9
- bison | [] [] [] | 19
- bison-runtime | [] [] [] | 15
- bluez-pin | [] [] [] [] [] [] | 28
- cflow | [] [] | 5
- clisp | | 6
- console-tools | [] [] | 5
- coreutils | [] [] | 16
- cpio | [] [] [] | 9
- cpplib | [] [] [] [] | 11
- cryptonit | | 5
- darkstat | [] () () | 15
- dialog | [] [] [] [] [] | 30
- diffutils | [] [] [] [] | 28
- doodle | [] | 6
- e2fsprogs | [] [] | 10
- enscript | [] [] [] | 16
- error | [] [] [] [] | 18
- fetchmail | [] [] | 12
- fileutils | [] [] [] | 18
- findutils | [] [] [] | 17
- flex | [] [] | 15
- fslint | [] | 9
- gas | [] | 3
- gawk | [] [] | 15
- gbiff | [] | 5
- gcal | [] | 5
- gcc | [] [] [] | 6
- gettext-examples | [] [] [] [] [] [] | 27
- gettext-runtime | [] [] [] [] [] [] | 28
- gettext-tools | [] [] [] [] [] | 19
- gimp-print | [] [] | 12
- gip | [] [] | 12
- gliv | [] [] | 8
- glunarclock | [] [] [] | 15
- gmult | [] [] [] [] | 15
- gnubiff | [] | 1
- gnucash | () | 2
- gnucash-glossary | [] [] | 9
- gnuedu | [] | 2
- gnulib | [] [] [] [] [] | 28
- gnunet-gtk | | 1
- gnutls | | 2
- gpe-aerial | [] [] | 14
- gpe-beam | [] [] | 14
- gpe-calendar | [] | 3
- gpe-clock | [] [] [] [] | 21
- gpe-conf | [] [] | 14
- gpe-contacts | [] [] | 10
- gpe-edit | [] [] [] [] | 20
- gpe-filemanager | [] | 6
- gpe-go | [] [] | 15
- gpe-login | [] [] [] [] [] | 21
- gpe-ownerinfo | [] [] [] [] | 21
- gpe-package | [] | 6
- gpe-sketchbook | [] [] | 16
- gpe-su | [] [] [] | 20
- gpe-taskmanager | [] [] [] | 20
- gpe-timesheet | [] [] [] [] | 18
- gpe-today | [] [] [] [] [] | 21
- gpe-todo | [] | 7
- gphoto2 | [] [] [] [] | 20
- gprof | [] [] | 11
- gpsdrive | | 4
- gramadoir | [] | 7
- grep | [] [] [] [] | 34
- gretl | | 4
- gsasl | [] [] | 8
- gss | [] | 5
- gst-plugins | [] [] [] | 15
- gst-plugins-base | [] [] [] | 9
- gst-plugins-good | [] [] [] [] [] | 20
- gstreamer | [] [] [] | 17
- gtick | [] | 3
- gtkam | [] | 13
- gtkorphan | [] | 7
- gtkspell | [] [] [] [] [] [] | 26
- gutenprint | | 3
- hello | [] [] [] [] [] | 37
- id-utils | [] [] | 14
- impost | [] | 4
- indent | [] [] [] [] | 25
- iso_3166 | [] [] [] [] | 16
- iso_3166_2 | | 2
- iso_4217 | [] [] | 14
- iso_639 | [] | 14
- jpilot | [] [] [] [] | 7
- jtag | [] | 3
- jwhois | [] [] [] | 13
- kbd | [] [] | 12
- keytouch | [] | 4
- keytouch-editor | | 2
- keytouch-keyboa... | [] | 3
- latrine | [] [] | 8
- ld | [] [] [] [] | 8
- leafpad | [] [] [] [] | 23
- libc | [] [] [] | 23
- libexif | [] | 4
- libextractor | [] | 5
- libgpewidget | [] [] [] | 19
- libgpg-error | [] | 4
- libgphoto2 | [] | 8
- libgphoto2_port | [] [] [] | 11
- libgsasl | [] | 8
- libiconv | [] | 7
- libidn | [] [] | 10
- lifelines | | 4
- lilypond | | 2
- lingoteach | [] | 6
- lynx | [] [] [] | 15
- m4 | [] [] [] | 18
- mailutils | [] | 8
- make | [] [] [] | 20
- man-db | [] | 6
- minicom | [] | 14
- mysecretdiary | [] [] | 12
- nano | [] [] | 17
- nano_1_0 | [] [] [] | 18
- opcodes | [] [] | 10
- parted | [] [] [] | 10
- pilot-qof | [] | 3
- psmisc | [] | 10
- pwdutils | [] | 3
- python | | 0
- qof | [] | 4
- radius | [] | 6
- recode | [] [] [] | 25
- rpm | [] [] [] [] | 14
- screem | [] | 2
- scrollkeeper | [] [] [] [] | 26
- sed | [] [] [] | 22
- sh-utils | [] | 15
- shared-mime-info | [] [] [] [] | 24
- sharutils | [] [] [] | 23
- shishi | | 1
- silky | [] | 4
- skencil | [] | 7
- sketch | | 6
- solfege | | 2
- soundtracker | [] [] | 9
- sp | [] | 3
- stardict | [] [] [] [] | 11
- system-tools-ba... | [] [] [] [] [] [] [] | 37
- tar | [] [] [] [] | 20
- texinfo | [] [] [] | 15
- textutils | [] [] [] | 17
- tin | | 1
- tp-robot | [] [] [] | 10
- tuxpaint | [] [] [] | 16
- unicode-han-tra... | | 0
- unicode-transla... | | 2
- util-linux | [] [] [] | 20
- vorbis-tools | [] [] | 11
- wastesedge | | 1
- wdiff | [] [] | 22
- wget | [] [] [] | 19
- xchat | [] [] [] [] | 29
- xkeyboard-config | [] [] [] [] | 11
- xpad | [] [] [] | 14
- +---------------------------------------------------+
- 77 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
- 170 domains 0 1 1 77 39 0 136 10 1 48 5 54 0 2028
-
- Some counters in the preceding matrix are higher than the number of
-visible blocks let us expect. This is because a few extra PO files are
-used for implementing regional variants of languages, or language
-dialects.
-
- For a PO file in the matrix above to be effective, the package to
-which it applies should also have been internationalized and
-distributed as such by its maintainer. There might be an observable
-lag between the mere existence a PO file and its wide availability in a
-distribution.
-
- If October 2006 seems to be old, you may fetch a more recent copy of
-this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
-matrix with full percentage details can be found at
-`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
-
-1.6 Using `gettext' in new packages
-===================================
-
-If you are writing a freely available program and want to
-internationalize it you are welcome to use GNU `gettext' in your
-package. Of course you have to respect the GNU Library General Public
-License which covers the use of the GNU `gettext' library. This means
-in particular that even non-free programs can use `libintl' as a shared
-library, whereas only free software can use `libintl' as a static
-library or use modified versions of `libintl'.
-
- Once the sources are changed appropriately and the setup can handle
-the use of `gettext' the only thing missing are the translations. The
-Free Translation Project is also available for packages which are not
-developed inside the GNU project. Therefore the information given above
-applies also for every other Free Software Project. Contact
-`translation at iro.umontreal.ca' to make the `.pot' files available to
-the translation teams.
-
--- contrib/cpio/config.h
+++ /dev/null
@@ -1,999 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define this to an absolute name of <dirent.h>. */
-/* #undef ABSOLUTE_DIRENT_H */
-
-/* Define this to an absolute name of <fcntl.h>. */
-#define ABSOLUTE_FCNTL_H "///usr/include/fcntl.h"
-
-/* Define this to an absolute name of <float.h>. */
-/* #undef ABSOLUTE_FLOAT_H */
-
-/* Define this to an absolute name of <inttypes.h>. */
-#define ABSOLUTE_INTTYPES_H "///usr/include/inttypes.h"
-
-/* Define this to an absolute name of <stdint.h>. */
-#define ABSOLUTE_STDINT_H "///usr/include/stdint.h"
-
-/* Define this to an absolute name of <stdio.h>. */
-#define ABSOLUTE_STDIO_H "///usr/include/stdio.h"
-
-/* Define this to an absolute name of <stdlib.h>. */
-#define ABSOLUTE_STDLIB_H "///usr/include/stdlib.h"
-
-/* Define this to an absolute name of <string.h>. */
-#define ABSOLUTE_STRING_H "///usr/include/string.h"
-
-/* Define this to an absolute name of <sysexits.h>. */
-#define ABSOLUTE_SYSEXITS_H "///usr/include/sysexits.h"
-
-/* Define this to an absolute name of <sys/stat.h>. */
-#define ABSOLUTE_SYS_STAT_H "///usr/include/sys/stat.h"
-
-/* Define this to an absolute name of <sys/time.h>. */
-#define ABSOLUTE_SYS_TIME_H "///usr/include/sys/time.h"
-
-/* Define this to an absolute name of <time.h>. */
-#define ABSOLUTE_TIME_H "///usr/include/time.h"
-
-/* Define this to an absolute name of <unistd.h>. */
-#define ABSOLUTE_UNISTD_H "///usr/include/unistd.h"
-
-/* Define this to an absolute name of <wchar.h>. */
-/* #undef ABSOLUTE_WCHAR_H */
-
-/* Define this to an absolute name of <wctype.h>. */
-#define ABSOLUTE_WCTYPE_H "///usr/include/wctype.h"
-
-/* Define to the number of bits in type 'ptrdiff_t'. */
-/* #undef BITSIZEOF_PTRDIFF_T */
-
-/* Define to the number of bits in type 'sig_atomic_t'. */
-/* #undef BITSIZEOF_SIG_ATOMIC_T */
-
-/* Define to the number of bits in type 'size_t'. */
-/* #undef BITSIZEOF_SIZE_T */
-
-/* Define to the number of bits in type 'wchar_t'. */
-/* #undef BITSIZEOF_WCHAR_T */
-
-/* Define to the number of bits in type 'wint_t'. */
-/* #undef BITSIZEOF_WINT_T */
-
-/* Define if chown is not POSIX compliant regarding IDs of -1. */
-/* #undef CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE */
-
-/* Define if chown modifies symlinks. */
-/* #undef CHOWN_MODIFIES_SYMLINK */
-
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define to 1 if using `alloca.c'. */
-/* #undef C_ALLOCA */
-
-/* Define full file name of rmt program. */
-/* #undef DEFAULT_RMT_COMMAND */
-
-/* the name of the file descriptor member of DIR */
-/* #undef DIR_FD_MEMBER_NAME */
-
-#ifdef DIR_FD_MEMBER_NAME
-# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
-#else
-# define DIR_TO_FD(Dir_p) -1
-#endif
-
-
-/* Define to 1 if // is a file system root distinct from /. */
-/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */
-
-/* Define if struct dirent has a member d_ino that actually works. */
-#define D_INO_IN_DIRENT 1
-
-/* Define to 1 if translation of program messages to the user's native
- language is requested. */
-/* #undef ENABLE_NLS */
-
-/* Define as good substitute value for EOVERFLOW. */
-/* #undef EOVERFLOW */
-
-/* Define if gnulib's fchdir() replacement is used. */
-/* #undef FCHDIR_REPLACEMENT */
-
-/* Define on systems for which file names may have a so-called `drive letter'
- prefix, define this to compute the length of that prefix, including the
- colon. */
-#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 0
-
-/* Define if the backslash character may also serve as a file name component
- separator. */
-#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 0
-
-/* Define if a drive letter prefix denotes a relative path if it is not
- followed by a file name component separator. */
-#define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-
-/* Define if gettimeofday clobbers the localtime buffer. */
-/* #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME */
-
-/* Define to 1 when using the gnulib module close-stream. */
-#define GNULIB_CLOSE_STREAM 1
-
-/* Define to 1 when using the gnulib module fcntl-safer. */
-#define GNULIB_FCNTL_SAFER 1
-
-/* Define to 1 to add extern declaration of program_invocation_name to argp.h
- */
-#define GNULIB_PROGRAM_INVOCATION_NAME 1
-
-/* Define to 1 to add extern declaration of program_invocation_short_name to
- argp.h */
-#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1
-
-/* Define to 1 if you have the `alarm' function. */
-#define HAVE_ALARM 1
-
-/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
- may be supplied by this distribution. */
-#define HAVE_ALLOCA 1
-
-/* Define HAVE_ALLOCA_H for backward compatibility with older code that
- includes <alloca.h> only if HAVE_ALLOCA_H is defined. */
-#define HAVE_ALLOCA_H 1
-
-/* Define to 1 if you have the `btowc' function. */
-#define HAVE_BTOWC 1
-
-/* Define to 1 if you have the `canonicalize_file_name' function. */
-/* #undef HAVE_CANONICALIZE_FILE_NAME */
-
-/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
- CoreFoundation framework. */
-/* #undef HAVE_CFLOCALECOPYCURRENT */
-
-/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
- the CoreFoundation framework. */
-/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
-
-/* Define to 1 if your system has a working `chown' function. */
-#define HAVE_CHOWN 1
-
-/* Define to 1 if you have the `clock_gettime' function. */
-#define HAVE_CLOCK_GETTIME 1
-
-/* Define to 1 if you have the `clock_settime' function. */
-#define HAVE_CLOCK_SETTIME 1
-
-/* Define if you have compound literals. */
-/* #undef HAVE_COMPOUND_LITERALS */
-
-/* Define if the GNU dcgettext() function is already present or preinstalled.
- */
-/* #undef HAVE_DCGETTEXT */
-
-/* Define to 1 if you have the declaration of `atoi', and to 0 if you don't.
- */
-#define HAVE_DECL_ATOI 1
-
-/* Define to 1 if you have the declaration of `canonicalize_file_name', and to
- 0 if you don't. */
-#define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-
-/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_CLEARERR_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't.
- */
-#define HAVE_DECL_DIRFD 1
-
-/* Define to 1 if you have the declaration of `errno', and to 0 if you don't.
- */
-#define HAVE_DECL_ERRNO 1
-
-/* Define to 1 if you have the declaration of `exit', and to 0 if you don't.
- */
-#define HAVE_DECL_EXIT 1
-
-/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
- don't. */
-#define HAVE_DECL_FEOF_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_FERROR_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_FFLUSH_UNLOCKED 0
-
-/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_FGETS_UNLOCKED 0
-
-/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_FPUTC_UNLOCKED 0
-
-/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_FPUTS_UNLOCKED 0
-
-/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_FREAD_UNLOCKED 0
-
-/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_FWRITE_UNLOCKED 0
-
-/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_GETCHAR_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't.
- */
-#define HAVE_DECL_GETCWD 1
-
-/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
- don't. */
-#define HAVE_DECL_GETC_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
- */
-#define HAVE_DECL_GETENV 1
-
-/* Define to 1 if you have the declaration of `getgrgid', and to 0 if you
- don't. */
-#define HAVE_DECL_GETGRGID 1
-
-/* Define to 1 if you have the declaration of `getgrnam', and to 0 if you
- don't. */
-#define HAVE_DECL_GETGRNAM 1
-
-/* Define to 1 if you have the declaration of `getpwnam', and to 0 if you
- don't. */
-#define HAVE_DECL_GETPWNAM 1
-
-/* Define to 1 if you have the declaration of `imaxabs', and to 0 if you
- don't. */
-#define HAVE_DECL_IMAXABS 1
-
-/* Define to 1 if you have the declaration of `imaxdiv', and to 0 if you
- don't. */
-#define HAVE_DECL_IMAXDIV 1
-
-/* Define to 1 if you have the declaration of `isblank', and to 0 if you
- don't. */
-#define HAVE_DECL_ISBLANK 1
-
-/* Define to 1 if you have the declaration of `lchown', and to 0 if you don't.
- */
-#define HAVE_DECL_LCHOWN 1
-
-/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
- don't. */
-#define HAVE_DECL_MEMRCHR 0
-
-/* Define to 1 if you have the declaration of `mkdir', and to 0 if you don't.
- */
-#define HAVE_DECL_MKDIR 1
-
-/* Define if program_invocation_name is declared */
-/* #undef HAVE_DECL_PROGRAM_INVOCATION_NAME */
-
-/* Define if program_invocation_short_name is declared */
-/* #undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME */
-
-/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_PUTCHAR_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
- don't. */
-#define HAVE_DECL_PUTC_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
- */
-#define HAVE_DECL_STRDUP 1
-
-/* Define to 1 if you have the declaration of `strerror', and to 0 if you
- don't. */
-#define HAVE_DECL_STRERROR 1
-
-/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
- don't. */
-#define HAVE_DECL_STRERROR_R 1
-
-/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you
- don't. */
-#define HAVE_DECL_STRNCASECMP 1
-
-/* Define to 1 if you have the declaration of `strndup', and to 0 if you
- don't. */
-#define HAVE_DECL_STRNDUP 1
-
-/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
- don't. */
-#define HAVE_DECL_STRNLEN 0
-
-/* Define to 1 if you have the declaration of `strtoimax', and to 0 if you
- don't. */
-#define HAVE_DECL_STRTOIMAX 1
-
-/* Define to 1 if you have the declaration of `strtoumax', and to 0 if you
- don't. */
-#define HAVE_DECL_STRTOUMAX 1
-
-/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
- */
-/* #undef HAVE_DECL_TZNAME */
-
-/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
- don't. */
-#define HAVE_DECL_VSNPRINTF 1
-
-/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
- don't. */
-#define HAVE_DECL___FPENDING 0
-
-/* Define to 1 if you have the <dirent.h> header file. */
-#define HAVE_DIRENT_H 1
-
-/* Define to 1 if you have the `dirfd' function. */
-/* #undef HAVE_DIRFD */
-
-/* Define to 1 if you have the `dup2' function. */
-#define HAVE_DUP2 1
-
-/* Define if you have the declaration of environ. */
-/* #undef HAVE_ENVIRON_DECL */
-
-/* Define to 1 if you have the `fchdir' function. */
-#define HAVE_FCHDIR 1
-
-/* Define to 1 if you have the `fchmod' function. */
-#define HAVE_FCHMOD 1
-
-/* Define to 1 if you have the `fchmodat' function. */
-/* #undef HAVE_FCHMODAT */
-
-/* Define to 1 if you have the `fchown' function. */
-#define HAVE_FCHOWN 1
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define to 1 if you have the `fdopendir' function. */
-/* #undef HAVE_FDOPENDIR */
-
-/* Define to 1 if you have the <features.h> header file. */
-/* #undef HAVE_FEATURES_H */
-
-/* Define to 1 if you have the <float.h> header file. */
-#define HAVE_FLOAT_H 1
-
-/* Define to 1 if you have the `flockfile' function. */
-#define HAVE_FLOCKFILE 1
-
-/* Define to 1 if you have the `funlockfile' function. */
-#define HAVE_FUNLOCKFILE 1
-
-/* Define to 1 if you have the `futimes' function. */
-#define HAVE_FUTIMES 1
-
-/* Define to 1 if you have the `futimesat' function. */
-/* #undef HAVE_FUTIMESAT */
-
-/* Define to 1 if you have the `getcwd' function. */
-#define HAVE_GETCWD 1
-
-/* Define to 1 if you have the <getopt.h> header file. */
-#define HAVE_GETOPT_H 1
-
-/* Define to 1 if you have the `getopt_long_only' function. */
-#define HAVE_GETOPT_LONG_ONLY 1
-
-/* Define to 1 if you have the `getpagesize' function. */
-#define HAVE_GETPAGESIZE 1
-
-/* Define if the GNU gettext() function is already present or preinstalled. */
-/* #undef HAVE_GETTEXT */
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#define HAVE_GETTIMEOFDAY 1
-
-/* Define if you have the iconv() function and it works. */
-/* #undef HAVE_ICONV */
-
-/* Define to 1 if the compiler supports one of the keywords 'inline',
- '__inline__', '__inline' and effectively inlines functions marked as such.
- */
-#define HAVE_INLINE 1
-
-/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
-#define HAVE_INTMAX_T 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
- declares uintmax_t. */
-#define HAVE_INTTYPES_H_WITH_UINTMAX 1
-
-/* Define to 1 if you have the <io.h> header file. */
-/* #undef HAVE_IO_H */
-
-/* Define to 1 if you have the `iswcntrl' function. */
-#define HAVE_ISWCNTRL 1
-
-/* Define to 1 if you have the `iswctype' function. */
-#define HAVE_ISWCTYPE 1
-
-/* Define to 1 if you have the `lchmod' function. */
-#define HAVE_LCHMOD 1
-
-/* Define to 1 if you have the `lchown' function. */
-#define HAVE_LCHOWN 1
-
-/* Define to 1 if you have the <libintl.h> header file. */
-/* #undef HAVE_LIBINTL_H */
-
-/* Define to 1 if you have the <linewrap.h> header file. */
-/* #undef HAVE_LINEWRAP_H */
-
-/* Define to 1 if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define if you have the 'long long' type. */
-#define HAVE_LONG_LONG 1
-
-/* Define to 1 if the system has the type `long long int'. */
-#define HAVE_LONG_LONG_INT 1
-
-/* Define to 1 if you have the `lstat' function. */
-#define HAVE_LSTAT 1
-
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#define HAVE_MALLOC 1
-
-/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
-#define HAVE_MBRTOWC 1
-
-/* Define to 1 if you have the `mbsinit' function. */
-#define HAVE_MBSINIT 1
-
-/* Define to 1 if you have the `mbsrtowcs' function. */
-#define HAVE_MBSRTOWCS 1
-
-/* Define to 1 if <wchar.h> declares mbstate_t. */
-#define HAVE_MBSTATE_T 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `mempcpy' function. */
-/* #undef HAVE_MEMPCPY */
-
-/* Define to 1 if you have the `memrchr' function. */
-/* #undef HAVE_MEMRCHR */
-
-/* Define to 1 if you have the `mkdirat' function. */
-/* #undef HAVE_MKDIRAT */
-
-/* Define to 1 if you have the `mkfifo' function. */
-#define HAVE_MKFIFO 1
-
-/* Define to 1 if you have the `nanotime' function. */
-/* #undef HAVE_NANOTIME */
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-/* #undef HAVE_NDIR_H */
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#define HAVE_NETDB_H 1
-
-/* Define to 1 if you have the <net/errno.h> header file. */
-/* #undef HAVE_NET_ERRNO_H */
-
-/* Define to 1 if libc includes obstacks. */
-/* #undef HAVE_OBSTACK */
-
-/* Define to 1 if you have the `openat' function. */
-/* #undef HAVE_OPENAT */
-
-/* Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
- setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX is not
- defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD is defined.
- */
-#define HAVE_PARTLY_WORKING_GETCWD 1
-
-/* Define to 1 if you have the `pipe' function. */
-#define HAVE_PIPE 1
-
-/* Define if program_invocation_name is defined */
-/* #undef HAVE_PROGRAM_INVOCATION_NAME */
-
-/* Define if program_invocation_short_name is defined */
-/* #undef HAVE_PROGRAM_INVOCATION_SHORT_NAME */
-
-/* Define to 1 if the system has the type `ptrdiff_t'. */
-#define HAVE_PTRDIFF_T 1
-
-/* Define to 1 if you have the `readlink' function. */
-#define HAVE_READLINK 1
-
-/* Define to 1 if you have the <search.h> header file. */
-/* #undef HAVE_SEARCH_H */
-
-/* Define to 1 if you have the `setenv' function. */
-#define HAVE_SETENV 1
-
-/* Define to 1 if you have the `setlocale' function. */
-#define HAVE_SETLOCALE 1
-
-/* Define to 1 if you have the <sgtty.h> header file. */
-#define HAVE_SGTTY_H 1
-
-/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
-/* #undef HAVE_SIGNED_SIG_ATOMIC_T */
-
-/* Define to 1 if 'wchar_t' is a signed integer type. */
-/* #undef HAVE_SIGNED_WCHAR_T */
-
-/* Define to 1 if 'wint_t' is a signed integer type. */
-/* #undef HAVE_SIGNED_WINT_T */
-
-/* Define to 1 if you have the `sleep' function. */
-#define HAVE_SLEEP 1
-
-/* Define to 1 if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-
-/* Define to 1 if stdbool.h conforms to C99. */
-#define HAVE_STDBOOL_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
- uintmax_t. */
-#define HAVE_STDINT_H_WITH_UINTMAX 1
-
-/* Define to 1 if you have the <stdio_ext.h> header file. */
-/* #undef HAVE_STDIO_EXT_H */
-
-/* Define to 1 if you have the <stdio.h> header file. */
-#define HAVE_STDIO_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `stpcpy' function. */
-#define HAVE_STPCPY 1
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#define HAVE_STRCASECMP 1
-
-/* Define to 1 if you have the `strchrnul' function. */
-/* #undef HAVE_STRCHRNUL */
-
-/* Define to 1 if you have the `strdup' function. */
-#define HAVE_STRDUP 1
-
-/* Define to 1 if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
-/* Define to 1 if you have the `strerror_r' function. */
-#define HAVE_STRERROR_R 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strncasecmp' function. */
-#define HAVE_STRNCASECMP 1
-
-/* Define if you have the strndup() function and it works. */
-#define HAVE_STRNDUP 1
-
-/* Define to 1 if you have the `strtol' function. */
-#define HAVE_STRTOL 1
-
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
-#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-
-/* Define to 1 if `st_blocks' is member of `struct stat'. */
-#define HAVE_STRUCT_STAT_ST_BLOCKS 1
-
-/* Define to 1 if `tm_zone' is member of `struct tm'. */
-#define HAVE_STRUCT_TM_TM_ZONE 1
-
-/* Define if struct utimbuf is declared -- usually in <utime.h>. Some systems
- have utime.h but don't declare the struct anywhere. */
-#define HAVE_STRUCT_UTIMBUF 1
-
-/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use
- `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */
-#define HAVE_ST_BLKSIZE 1
-
-/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
- `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
-#define HAVE_ST_BLOCKS 1
-
-/* Define to 1 if you have the <sysexits.h> header file. */
-#define HAVE_SYSEXITS_H 1
-
-/* Define to 1 if you have the <sys/bitypes.h> header file. */
-/* #undef HAVE_SYS_BITYPES_H */
-
-/* Define to 1 if you have the <sys/buf.h> header file. */
-#define HAVE_SYS_BUF_H 1
-
-/* Define to 1 if you have the <sys/device.h> header file. */
-/* #undef HAVE_SYS_DEVICE_H */
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_DIR_H */
-
-/* Define if your system has sys_errlist global variable */
-#define HAVE_SYS_ERRLIST 1
-
-/* Define to 1 if you have the <sys/gentape.h> header file. */
-/* #undef HAVE_SYS_GENTAPE_H */
-
-/* Define to 1 if you have the <sys/inet.h> header file. */
-/* #undef HAVE_SYS_INET_H */
-
-/* Define to 1 if you have the <sys/inttypes.h> header file. */
-/* #undef HAVE_SYS_INTTYPES_H */
-
-/* Define to 1 if you have the <sys/io/trioctl.h> header file. */
-/* #undef HAVE_SYS_IO_TRIOCTL_H */
-
-/* Define to 1 if you have the <sys/mtio.h> header file. */
-#define HAVE_SYS_MTIO_H 1
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_NDIR_H */
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/tape.h> header file. */
-/* #undef HAVE_SYS_TAPE_H */
-
-/* Define to 1 if you have the <sys/timeb.h> header file. */
-/* #undef HAVE_SYS_TIMEB_H */
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the <sys/tprintf.h> header file. */
-/* #undef HAVE_SYS_TPRINTF_H */
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <sys/wait.h> header file. */
-#define HAVE_SYS_WAIT_H 1
-
-/* Define to 1 if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
-/* Define if struct tm has the tm_gmtoff member. */
-#define HAVE_TM_GMTOFF 1
-
-/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
- `HAVE_STRUCT_TM_TM_ZONE' instead. */
-#define HAVE_TM_ZONE 1
-
-/* Define to 1 if you have the `tsearch' function. */
-/* #undef HAVE_TSEARCH */
-
-/* Define to 1 if you don't have `tm_zone' but do have the external array
- `tzname'. */
-/* #undef HAVE_TZNAME */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the `unsetenv' function. */
-#define HAVE_UNSETENV 1
-
-/* Define to 1 if the system has the type `unsigned long long int'. */
-#define HAVE_UNSIGNED_LONG_LONG_INT 1
-
-/* Define to 1 if you have the <utime.h> header file. */
-#define HAVE_UTIME_H 1
-
-/* Define to 1 if you have the <utmp.h> header file. */
-#define HAVE_UTMP_H 1
-
-/* Define to 1 if you have the `vasnprintf' function. */
-/* #undef HAVE_VASNPRINTF */
-
-/* Define to 1 if you have the `vsnprintf' function. */
-#define HAVE_VSNPRINTF 1
-
-/* Define to 1 if you have the <wchar.h> header file. */
-#define HAVE_WCHAR_H 1
-
-/* Define if you have the 'wchar_t' type. */
-#define HAVE_WCHAR_T 1
-
-/* Define to 1 if you have the `wcslen' function. */
-#define HAVE_WCSLEN 1
-
-/* Define to 1 if you have the <wctype.h> header file. */
-#define HAVE_WCTYPE_H 1
-
-/* Define if you have the 'wint_t' type. */
-#define HAVE_WINT_T 1
-
-/* Define to 1 if you have the `wmemchr' function. */
-#define HAVE_WMEMCHR 1
-
-/* Define to 1 if you have the `wmemcpy' function. */
-#define HAVE_WMEMCPY 1
-
-/* Define to 1 if you have the `wmempcpy' function. */
-/* #undef HAVE_WMEMPCPY */
-
-/* Define to 1 if O_NOATIME works. */
-#define HAVE_WORKING_O_NOATIME 0
-
-/* Define to 1 if O_NOFOLLOW works. */
-#define HAVE_WORKING_O_NOFOLLOW 1
-
-/* Define if utimes works properly. */
-#define HAVE_WORKING_UTIMES 1
-
-/* Define to 1 if the system has the type `_Bool'. */
-#define HAVE__BOOL 1
-
-/* Define to 1 if you have the `_ftime' function. */
-/* #undef HAVE__FTIME */
-
-/* Define to 1 if you have the `__fpending' function. */
-/* #undef HAVE___FPENDING */
-
-#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
-# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-#else
-# define ISSLASH(C) ((C) == '/')
-#endif
-
-/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
- slash. */
-/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
-
-/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
- */
-/* #undef MAJOR_IN_MKDEV */
-
-/* Define to 1 if `major', `minor', and `makedev' are declared in
- <sysmacros.h>. */
-/* #undef MAJOR_IN_SYSMACROS */
-
-/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
-#define MALLOC_0_IS_NONNULL 1
-
-/* Define to mt_model (v.g., for DG/UX), else to mt_type. */
-#define MTIO_CHECK_FIELD mt_type
-
-/* Name of package */
-#define PACKAGE "cpio"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "bug-cpio at gnu.org"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "GNU cpio"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "GNU cpio 2.8"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "cpio"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "2.8"
-
-/* the number of pending output bytes on stream `fp' */
-#define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
-
-/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
-/* #undef PRI_MACROS_BROKEN */
-
-/* Define to 1 if the C compiler supports function prototypes. */
-#define PROTOTYPES 1
-
-/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
- 'ptrdiff_t'. */
-/* #undef PTRDIFF_T_SUFFIX */
-
-/* Define if vasnprintf exists but is overridden by gnulib. */
-/* #undef REPLACE_VASNPRINTF */
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
-/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
- 'sig_atomic_t'. */
-/* #undef SIG_ATOMIC_T_SUFFIX */
-
-/* Define as the maximum value of type 'size_t', if the system doesn't define
- it. */
-/* #undef SIZE_MAX */
-
-/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
- 'size_t'. */
-/* #undef SIZE_T_SUFFIX */
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at runtime.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
-/* #undef STACK_DIRECTION */
-
-/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
-/* #undef STAT_MACROS_BROKEN */
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to 1 if strerror_r returns char *. */
-/* #undef STRERROR_R_CHAR_P */
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
-
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-/* #undef TM_IN_SYS_TIME */
-
-/* Define to 1 if you want getc etc. to use unlocked I/O if available.
- Unlocked I/O can improve performance in unithreaded apps, but it is not
- safe for multithreaded apps. */
-#define USE_UNLOCKED_IO 1
-
-/* Version number of package */
-#define VERSION "2.8"
-
-/* Define if unsetenv() returns void, not int. */
-#define VOID_UNSETENV 1
-
-/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
- 'wchar_t'. */
-/* #undef WCHAR_T_SUFFIX */
-
-/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
- 'wint_t'. */
-/* #undef WINT_T_SUFFIX */
-
-/* Define to 1 if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
-#ifndef _ALL_SOURCE
-/* # undef _ALL_SOURCE */
-#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-/* #undef _FILE_OFFSET_BITS */
-
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-/* Define for large files, on AIX-style hosts. */
-/* #undef _LARGE_FILES */
-
-/* Define to 1 if on MINIX. */
-/* #undef _MINIX */
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-/* #undef _POSIX_1_SOURCE */
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-/* #undef _POSIX_SOURCE */
-
-/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# define __EXTENSIONS__ 1
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# define _POSIX_PTHREAD_SEMANTICS 1
-#endif
-#ifndef _TANDEM_SOURCE
-# define _TANDEM_SOURCE 1
-#endif
-
-/* Define to rpl_ if the getopt replacement functions and variables should be
- used. */
-#define __GETOPT_PREFIX rpl_
-
-/* Define to rpl_ if the openat replacement function should be used. */
-#define __OPENAT_PREFIX rpl_
-
-/* Define like PROTOTYPES; this can be used by system headers. */
-#define __PROTOTYPES 1
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to rpl_fchownat if the replacement function should be used. */
-#define fchownat rpl_fchownat
-
-/* Define to a replacement function name for fnmatch(). */
-#define fnmatch gnu_fnmatch
-
-/* Define to `int' if <sys/types.h> does not define. */
-/* #undef gid_t */
-
-/* A replacement for va_copy, if needed. */
-#define gl_va_copy(a,b) ((a) = (b))
-
-/* Define to rpl_gmtime if the replacement function should be used. */
-/* #undef gmtime */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
-
-/* Define to long or long long if <stdint.h> and <inttypes.h> don't define. */
-/* #undef intmax_t */
-
-/* Define to rpl_localtime if the replacement function should be used. */
-/* #undef localtime */
-
-/* Define to rpl_malloc if the replacement function should be used. */
-/* #undef malloc */
-
-/* Define to a type if <wchar.h> does not define. */
-/* #undef mbstate_t */
-
-/* Define to rpl_mktime if the replacement function should be used. */
-/* #undef mktime */
-
-/* Define to `long int' if <sys/types.h> does not define. */
-/* #undef off_t */
-
-/* Define to a replacement function name for realpath(). */
-#define realpath rpl_realpath
-
-/* Define to equivalent of C99 restrict keyword, or to nothing if this is not
- supported. Do not define if restrict is supported directly. */
-/* #undef restrict */
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
-
-/* Define as a signed type of the same size as size_t. */
-/* #undef ssize_t */
-
-/* Define to rpl_strnlen if the replacement function should be used. */
-#define strnlen rpl_strnlen
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef uid_t */
-
-/* Define as a macro for copying va_list variables. */
-/* #undef va_copy */
--- contrib/cpio/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- 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.
--- contrib/cpio/MIDNIGHTBSD-upgrade
+++ /dev/null
@@ -1,32 +0,0 @@
-$MidnightBSD: src/contrib/cpio/MIDNIGHTBSD-upgrade,v 1.1 2007/04/12 03:48:17 laffer1 Exp $
-
-GNU cpio 2.7
- originals can be found at: http://ftp.gnu.org/gnu/cpio/
-
-Configure by:
-
- ./configure --disable-nls --without-libiconv-prefix \
- --without-libintl-prefix --build=amd64-mbsd-freebsd6.0 \
- --target=amd64-mbsd-freebsd6.0
-
-(works fine.. just configure issue.)
-
-Trim by:
-
- rm Makefile.am Makefile.in aclocal.m4 config.h.in configure \
- configure.ac
- rm -r headers m4 rmt tests scripts po
- rm doc/Makefile.am doc/Makefile.in doc/mt.1 doc/cpio.info
- rm src/Makefile.am src/Makefile.in
- rm src/mt.c
- rm lib/Makefile.am lib/Makefile.in lib/Makefile.tmpl lib/alloca.c \
- lib/argmatch.[ch] lib/bcopy.c lib/fnmatch.c lib/fnmatch_.h \
- lib/fnmatch_loop.c lib/mkdir.c lib/quote.[ch] \
- lib/quotearg.[ch] lib/stdbool_.h lib/strcasecmp.c \
- lib/strdup.c lib/strerror.c lib/strncasecmp.c lib/sysexit_.h
-
-Import by:
-
- cvs import -m "Import GNU cpio 2.7 (trimmed)" src/contrib/cpio \
- GNU v2_7
-
--- contrib/cpio/config.status
+++ /dev/null
@@ -1,1642 +0,0 @@
-#! /bin/ksh
-# Generated by configure.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=${CONFIG_SHELL-/bin/ksh}
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-# Find out whether ``test -x'' works. Don't use a zero-byte file, as
-# systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
- as_executable_p="test -x"
-else
- as_executable_p=:
-fi
-rm -f conf$$.file
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by GNU cpio $as_me 2.8, which was
-generated by GNU Autoconf 2.60. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-# Files that config.status was made for.
-config_files=" tests/Makefile tests/atlocal Makefile doc/Makefile headers/Makefile lib/Makefile rmt/Makefile src/Makefile po/Makefile.in"
-config_headers=" config.h"
-config_commands=" depfiles po-directories tests/atconfig"
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf at gnu.org>."
-
-ac_cs_version="\
-GNU cpio config.status 2.8
-configured by ./configure, generated by GNU Autoconf 2.60,
- with options \"'--disable-nls' '--without-libiconv-prefix' '--without-libintl-prefix' '--build=amd64-mbsd-freebsd6.0' '--target=amd64-mbsd-freebsd6.0' 'build_alias=amd64-mbsd-freebsd6.0' 'target_alias=amd64-mbsd-freebsd6.0'\"
-
-Copyright (C) 2006 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='/home/laffer1/cpio/cpio-2.8'
-srcdir='.'
-INSTALL='/usr/bin/install -c'
-MKDIR_P='build-aux/install-sh -c -d'
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- echo "$ac_cs_version"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- { echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-if $ac_cs_recheck; then
- echo "running CONFIG_SHELL=/bin/ksh /bin/ksh ./configure " '--disable-nls' '--without-libiconv-prefix' '--without-libintl-prefix' '--build=amd64-mbsd-freebsd6.0' '--target=amd64-mbsd-freebsd6.0' 'build_alias=amd64-mbsd-freebsd6.0' 'target_alias=amd64-mbsd-freebsd6.0' $ac_configure_extra_args " --no-create --no-recursion" >&6
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec /bin/ksh "./configure" '--disable-nls' '--without-libiconv-prefix' '--without-libintl-prefix' '--build=amd64-mbsd-freebsd6.0' '--target=amd64-mbsd-freebsd6.0' 'build_alias=amd64-mbsd-freebsd6.0' 'target_alias=amd64-mbsd-freebsd6.0' $ac_configure_extra_args --no-create --no-recursion
-fi
-
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- echo "$ac_log"
-} >&5
-
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="" ac_aux_dir="build-aux"
-# Capture the value of obsolete ALL_LINGUAS because we need it to compute
- # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
- # from automake < 1.5.
- eval 'OBSOLETE_ALL_LINGUAS''=""'
- # Capture the value of LINGUAS because we need it to compute CATALOGS.
- LINGUAS="%UNSET%"
-
-
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
- "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
- "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
- "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
- "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
- "headers/Makefile") CONFIG_FILES="$CONFIG_FILES headers/Makefile" ;;
- "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
- "rmt/Makefile") CONFIG_FILES="$CONFIG_FILES rmt/Makefile" ;;
- "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
- "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
-
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
-
-cat >"$tmp/subs-1.sed" <<\CEOF
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s, at SHELL@,|#_!!_#|/bin/ksh,g
-s, at PATH_SEPARATOR@,|#_!!_#|:,g
-s, at PACKAGE_NAME@,|#_!!_#|GNU cpio,g
-s, at PACKAGE_TARNAME@,|#_!!_#|cpio,g
-s, at PACKAGE_VERSION@,|#_!!_#|2.8,g
-s, at PACKAGE_STRING@,|#_!!_#|GNU cpio 2.8,g
-s, at PACKAGE_BUGREPORT@,|#_!!_#|bug-cpio@|#_!!_#|gnu.org,g
-s, at exec_prefix@,|#_!!_#|${prefix},g
-s, at prefix@,|#_!!_#|/usr/local,g
-s, at program_transform_name@,|#_!!_#|s\,x\,x\,,g
-s, at bindir@,|#_!!_#|${exec_prefix}/bin,g
-s, at sbindir@,|#_!!_#|${exec_prefix}/sbin,g
-s, at libexecdir@,|#_!!_#|${exec_prefix}/libexec,g
-s, at datarootdir@,|#_!!_#|${prefix}/share,g
-s, at datadir@,|#_!!_#|${datarootdir},g
-s, at sysconfdir@,|#_!!_#|${prefix}/etc,g
-s, at sharedstatedir@,|#_!!_#|${prefix}/com,g
-s, at localstatedir@,|#_!!_#|${prefix}/var,g
-s, at includedir@,|#_!!_#|${prefix}/include,g
-s, at oldincludedir@,|#_!!_#|/usr/include,g
-s, at docdir@,|#_!!_#|${datarootdir}/doc/${PACKAGE_TARNAME},g
-s, at infodir@,|#_!!_#|${datarootdir}/info,g
-s, at htmldir@,|#_!!_#|${docdir},g
-s, at dvidir@,|#_!!_#|${docdir},g
-s, at pdfdir@,|#_!!_#|${docdir},g
-s, at psdir@,|#_!!_#|${docdir},g
-s, at libdir@,|#_!!_#|${exec_prefix}/lib,g
-s, at localedir@,|#_!!_#|${datarootdir}/locale,g
-s, at mandir@,|#_!!_#|${datarootdir}/man,g
-s, at DEFS@,|#_!!_#|-DHAVE_CONFIG_H,g
-s, at ECHO_C@,|#_!!_#|,g
-s, at ECHO_N@,|#_!!_#|-n,g
-s, at ECHO_T@,|#_!!_#|,g
-s, at LIBS@,|#_!!_#|,g
-s, at build_alias@,|#_!!_#|amd64-mbsd-freebsd6.0,g
-s, at host_alias@,|#_!!_#|,g
-s, at target_alias@,|#_!!_#|amd64-mbsd-freebsd6.0,g
-s, at INSTALL_PROGRAM@,|#_!!_#|${INSTALL},g
-s, at INSTALL_SCRIPT@,|#_!!_#|${INSTALL},g
-s, at INSTALL_DATA@,|#_!!_#|${INSTALL} -m 644,g
-s, at am__isrc@,|#_!!_#|,g
-s, at CYGPATH_W@,|#_!!_#|echo,g
-s, at PACKAGE@,|#_!!_#|cpio,g
-s, at VERSION@,|#_!!_#|2.8,g
-s, at ACLOCAL@,|#_!!_#|${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run aclocal-1.10a,g
-s, at AUTOCONF@,|#_!!_#|${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoconf,g
-s, at AUTOMAKE@,|#_!!_#|${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run automake-1.10a,g
-s, at AUTOHEADER@,|#_!!_#|${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoheader,g
-s, at MAKEINFO@,|#_!!_#|${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run makeinfo,g
-s, at install_sh@,|#_!!_#|$(SHELL) /home/laffer1/cpio/cpio-2.8/build-aux/install-sh,g
-s, at STRIP@,|#_!!_#|,g
-s, at INSTALL_STRIP_PROGRAM@,|#_!!_#|$(install_sh) -c -s,g
-s, at mkdir_p@,|#_!!_#|$(top_builddir)/build-aux/install-sh -c -d,g
-s, at AWK@,|#_!!_#|nawk,g
-s, at SET_MAKE@,|#_!!_#|,g
-s, at am__leading_dot@,|#_!!_#|.,g
-s, at AMTAR@,|#_!!_#|${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run tar,g
-s, at am__tar@,|#_!!_#|${AMTAR} chof - "$$tardir",g
-s, at am__untar@,|#_!!_#|${AMTAR} xf -,g
-s, at CC@,|#_!!_#|gcc -std=gnu99,g
-s, at CFLAGS@,|#_!!_#|-g -O2,g
-s, at LDFLAGS@,|#_!!_#|,g
-s, at CPPFLAGS@,|#_!!_#|,g
-s, at ac_ct_CC@,|#_!!_#|gcc,g
-s, at EXEEXT@,|#_!!_#|,g
-s, at OBJEXT@,|#_!!_#|o,g
-s, at DEPDIR@,|#_!!_#|.deps,g
-s, at am__include@,|#_!!_#|include,g
-s, at am__quote@,|#_!!_#|,g
-s, at AMDEP_TRUE@,|#_!!_#|,g
-s, at AMDEP_FALSE@,|#_!!_#|#,g
-s, at AMDEPBACKSLASH@,|#_!!_#|\\,g
-s, at CCDEPMODE@,|#_!!_#|depmode=gcc3,g
-s, at am__fastdepCC_TRUE@,|#_!!_#|,g
-s, at am__fastdepCC_FALSE@,|#_!!_#|#,g
-s, at CPP@,|#_!!_#|gcc -E,g
-s, at GREP@,|#_!!_#|/usr/bin/grep,g
-s, at EGREP@,|#_!!_#|/usr/bin/grep -E,g
-s, at RANLIB@,|#_!!_#|ranlib,g
-s, at YACC@,|#_!!_#|byacc,g
-s, at YFLAGS@,|#_!!_#|,g
-s, at GL_COND_LIBTOOL_TRUE@,|#_!!_#|#,g
-s, at GL_COND_LIBTOOL_FALSE@,|#_!!_#|,g
-s, at ALLOCA@,|#_!!_#|,g
-s, at ALLOCA_H@,|#_!!_#|alloca.h,g
-s, at GETOPT_H@,|#_!!_#|getopt.h,g
-s, at GNULIB_CHOWN@,|#_!!_#|1,g
-s, at GNULIB_DUP2@,|#_!!_#|1,g
-s, at GNULIB_FCHDIR@,|#_!!_#|1,g
-s, at GNULIB_FTRUNCATE@,|#_!!_#|0,g
-s, at GNULIB_GETCWD@,|#_!!_#|1,g
-s, at GNULIB_GETLOGIN_R@,|#_!!_#|0,g
-s, at GNULIB_LSEEK@,|#_!!_#|0,g
-s, at GNULIB_READLINK@,|#_!!_#|1,g
-s, at GNULIB_SLEEP@,|#_!!_#|1,g
-s, at HAVE_DUP2@,|#_!!_#|1,g
-s, at HAVE_FTRUNCATE@,|#_!!_#|1,g
-CEOF
-cat >"$tmp/subs-2.sed" <<\CEOF
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s, at HAVE_READLINK@,|#_!!_#|1,g
-s, at HAVE_SLEEP@,|#_!!_#|1,g
-s, at HAVE_DECL_GETLOGIN_R@,|#_!!_#|1,g
-s, at REPLACE_CHOWN@,|#_!!_#|0,g
-s, at REPLACE_FCHDIR@,|#_!!_#|0,g
-s, at REPLACE_GETCWD@,|#_!!_#|1,g
-s, at REPLACE_LSEEK@,|#_!!_#|0,g
-s, at LIB_CLOCK_GETTIME@,|#_!!_#|,g
-s, at build@,|#_!!_#|x86_64-mbsd-freebsd6.0,g
-s, at build_cpu@,|#_!!_#|x86_64,g
-s, at build_vendor@,|#_!!_#|mbsd,g
-s, at build_os@,|#_!!_#|freebsd6.0,g
-s, at host@,|#_!!_#|x86_64-mbsd-freebsd6.0,g
-s, at host_cpu@,|#_!!_#|x86_64,g
-s, at host_vendor@,|#_!!_#|mbsd,g
-s, at host_os@,|#_!!_#|freebsd6.0,g
-s, at ABSOLUTE_DIRENT_H@,|#_!!_#|,g
-s, at DIRENT_H@,|#_!!_#|,g
-s, at ABSOLUTE_FCNTL_H@,|#_!!_#|"///usr/include/fcntl.h",g
-s, at FCNTL_H@,|#_!!_#|fcntl.h,g
-s, at ABSOLUTE_FLOAT_H@,|#_!!_#|,g
-s, at FLOAT_H@,|#_!!_#|,g
-s, at FNMATCH_H@,|#_!!_#|fnmatch.h,g
-s, at STDBOOL_H@,|#_!!_#|,g
-s, at HAVE__BOOL@,|#_!!_#|1,g
-s, at LIBINTL@,|#_!!_#|,g
-s, at LTLIBINTL@,|#_!!_#|,g
-s, at ABSOLUTE_SYS_TIME_H@,|#_!!_#|"///usr/include/sys/time.h",g
-s, at HAVE_SYS_TIME_H@,|#_!!_#|1,g
-s, at HAVE_STRUCT_TIMEVAL@,|#_!!_#|1,g
-s, at REPLACE_GETTIMEOFDAY@,|#_!!_#|0,g
-s, at SYS_TIME_H@,|#_!!_#|,g
-s, at HAVE_LONG_LONG_INT@,|#_!!_#|1,g
-s, at HAVE_UNSIGNED_LONG_LONG_INT@,|#_!!_#|1,g
-s, at HAVE_INTTYPES_H@,|#_!!_#|1,g
-s, at HAVE_SYS_TYPES_H@,|#_!!_#|1,g
-s, at ABSOLUTE_STDINT_H@,|#_!!_#|"///usr/include/stdint.h",g
-s, at HAVE_STDINT_H@,|#_!!_#|1,g
-s, at HAVE_SYS_INTTYPES_H@,|#_!!_#|,g
-s, at HAVE_SYS_BITYPES_H@,|#_!!_#|,g
-s, at BITSIZEOF_PTRDIFF_T@,|#_!!_#|,g
-s, at BITSIZEOF_SIG_ATOMIC_T@,|#_!!_#|,g
-s, at BITSIZEOF_SIZE_T@,|#_!!_#|,g
-s, at BITSIZEOF_WCHAR_T@,|#_!!_#|,g
-s, at BITSIZEOF_WINT_T@,|#_!!_#|,g
-s, at HAVE_SIGNED_SIG_ATOMIC_T@,|#_!!_#|,g
-s, at HAVE_SIGNED_WCHAR_T@,|#_!!_#|,g
-s, at HAVE_SIGNED_WINT_T@,|#_!!_#|,g
-s, at PTRDIFF_T_SUFFIX@,|#_!!_#|,g
-s, at SIG_ATOMIC_T_SUFFIX@,|#_!!_#|,g
-s, at SIZE_T_SUFFIX@,|#_!!_#|,g
-s, at WCHAR_T_SUFFIX@,|#_!!_#|,g
-s, at WINT_T_SUFFIX@,|#_!!_#|,g
-s, at STDINT_H@,|#_!!_#|,g
-s, at PRI_MACROS_BROKEN@,|#_!!_#|0,g
-s, at GNULIB_IMAXABS@,|#_!!_#|0,g
-s, at GNULIB_IMAXDIV@,|#_!!_#|0,g
-s, at GNULIB_STRTOIMAX@,|#_!!_#|0,g
-s, at GNULIB_STRTOUMAX@,|#_!!_#|0,g
-s, at HAVE_DECL_IMAXABS@,|#_!!_#|1,g
-s, at HAVE_DECL_IMAXDIV@,|#_!!_#|1,g
-s, at HAVE_DECL_STRTOIMAX@,|#_!!_#|1,g
-s, at HAVE_DECL_STRTOUMAX@,|#_!!_#|1,g
-s, at ABSOLUTE_INTTYPES_H@,|#_!!_#|"///usr/include/inttypes.h",g
-s, at PRIPTR_PREFIX@,|#_!!_#|"",g
-s, at INTTYPES_H@,|#_!!_#|inttypes.h,g
-s, at GNULIB_MEMMEM@,|#_!!_#|0,g
-s, at GNULIB_MEMPCPY@,|#_!!_#|1,g
-s, at GNULIB_MEMRCHR@,|#_!!_#|1,g
-s, at GNULIB_STPCPY@,|#_!!_#|1,g
-s, at GNULIB_STPNCPY@,|#_!!_#|0,g
-s, at GNULIB_STRCHRNUL@,|#_!!_#|1,g
-s, at GNULIB_STRDUP@,|#_!!_#|1,g
-s, at GNULIB_STRNDUP@,|#_!!_#|1,g
-s, at GNULIB_STRNLEN@,|#_!!_#|1,g
-s, at GNULIB_STRPBRK@,|#_!!_#|0,g
-s, at GNULIB_STRSEP@,|#_!!_#|0,g
-s, at GNULIB_STRCASESTR@,|#_!!_#|0,g
-s, at GNULIB_STRTOK_R@,|#_!!_#|0,g
-s, at GNULIB_MBSLEN@,|#_!!_#|0,g
-s, at GNULIB_MBSCHR@,|#_!!_#|0,g
-s, at GNULIB_MBSRCHR@,|#_!!_#|0,g
-s, at GNULIB_MBSSTR@,|#_!!_#|0,g
-s, at GNULIB_MBSCASECMP@,|#_!!_#|0,g
-s, at GNULIB_MBSNCASECMP@,|#_!!_#|0,g
-s, at GNULIB_MBSPCASECMP@,|#_!!_#|0,g
-s, at GNULIB_MBSCASESTR@,|#_!!_#|0,g
-s, at GNULIB_MBSCSPN@,|#_!!_#|0,g
-s, at GNULIB_MBSPBRK@,|#_!!_#|0,g
-s, at GNULIB_MBSSPN@,|#_!!_#|0,g
-s, at GNULIB_MBSSEP@,|#_!!_#|0,g
-s, at GNULIB_MBSTOK_R@,|#_!!_#|0,g
-s, at HAVE_DECL_MEMMEM@,|#_!!_#|1,g
-s, at HAVE_MEMPCPY@,|#_!!_#|0,g
-s, at HAVE_DECL_MEMRCHR@,|#_!!_#|0,g
-s, at HAVE_STPCPY@,|#_!!_#|1,g
-s, at HAVE_STPNCPY@,|#_!!_#|1,g
-CEOF
-cat >"$tmp/subs-3.sed" <<\CEOF
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s, at HAVE_STRCASECMP@,|#_!!_#|1,g
-s, at HAVE_DECL_STRNCASECMP@,|#_!!_#|1,g
-s, at HAVE_STRCHRNUL@,|#_!!_#|0,g
-s, at HAVE_DECL_STRDUP@,|#_!!_#|1,g
-s, at HAVE_STRNDUP@,|#_!!_#|1,g
-s, at HAVE_DECL_STRNDUP@,|#_!!_#|1,g
-s, at HAVE_DECL_STRNLEN@,|#_!!_#|0,g
-s, at HAVE_STRPBRK@,|#_!!_#|1,g
-s, at HAVE_STRSEP@,|#_!!_#|1,g
-s, at HAVE_STRCASESTR@,|#_!!_#|1,g
-s, at HAVE_DECL_STRTOK_R@,|#_!!_#|1,g
-s, at GNULIB_FPRINTF_POSIX@,|#_!!_#|0,g
-s, at GNULIB_PRINTF_POSIX@,|#_!!_#|0,g
-s, at GNULIB_SNPRINTF@,|#_!!_#|0,g
-s, at GNULIB_SPRINTF_POSIX@,|#_!!_#|0,g
-s, at GNULIB_VFPRINTF_POSIX@,|#_!!_#|0,g
-s, at GNULIB_VPRINTF_POSIX@,|#_!!_#|0,g
-s, at GNULIB_VSNPRINTF@,|#_!!_#|1,g
-s, at GNULIB_VSPRINTF_POSIX@,|#_!!_#|0,g
-s, at GNULIB_VASPRINTF@,|#_!!_#|0,g
-s, at GNULIB_FSEEK@,|#_!!_#|0,g
-s, at GNULIB_FSEEKO@,|#_!!_#|0,g
-s, at GNULIB_FTELL@,|#_!!_#|0,g
-s, at GNULIB_FTELLO@,|#_!!_#|0,g
-s, at GNULIB_FFLUSH@,|#_!!_#|0,g
-s, at REPLACE_FPRINTF@,|#_!!_#|0,g
-s, at REPLACE_VFPRINTF@,|#_!!_#|0,g
-s, at REPLACE_PRINTF@,|#_!!_#|0,g
-s, at REPLACE_VPRINTF@,|#_!!_#|0,g
-s, at REPLACE_SNPRINTF@,|#_!!_#|0,g
-s, at HAVE_DECL_SNPRINTF@,|#_!!_#|1,g
-s, at REPLACE_VSNPRINTF@,|#_!!_#|0,g
-s, at HAVE_DECL_VSNPRINTF@,|#_!!_#|1,g
-s, at REPLACE_SPRINTF@,|#_!!_#|0,g
-s, at REPLACE_VSPRINTF@,|#_!!_#|0,g
-s, at HAVE_VASPRINTF@,|#_!!_#|1,g
-s, at REPLACE_VASPRINTF@,|#_!!_#|0,g
-s, at HAVE_FSEEKO@,|#_!!_#|1,g
-s, at REPLACE_FSEEKO@,|#_!!_#|0,g
-s, at REPLACE_FSEEK@,|#_!!_#|0,g
-s, at HAVE_FTELLO@,|#_!!_#|1,g
-s, at REPLACE_FTELLO@,|#_!!_#|0,g
-s, at REPLACE_FTELL@,|#_!!_#|0,g
-s, at REPLACE_FFLUSH@,|#_!!_#|0,g
-s, at ABSOLUTE_STDIO_H@,|#_!!_#|"///usr/include/stdio.h",g
-s, at GNULIB_GETSUBOPT@,|#_!!_#|0,g
-s, at GNULIB_MKDTEMP@,|#_!!_#|0,g
-s, at GNULIB_MKSTEMP@,|#_!!_#|0,g
-s, at HAVE_GETSUBOPT@,|#_!!_#|1,g
-s, at HAVE_MKDTEMP@,|#_!!_#|1,g
-s, at REPLACE_MKSTEMP@,|#_!!_#|0,g
-s, at ABSOLUTE_STDLIB_H@,|#_!!_#|"///usr/include/stdlib.h",g
-s, at ABSOLUTE_STRING_H@,|#_!!_#|"///usr/include/string.h",g
-s, at HAVE_LSTAT@,|#_!!_#|1,g
-s, at HAVE_DECL_MKDIR@,|#_!!_#|1,g
-s, at HAVE_IO_H@,|#_!!_#|0,g
-s, at ABSOLUTE_SYS_STAT_H@,|#_!!_#|"///usr/include/sys/stat.h",g
-s, at SYS_STAT_H@,|#_!!_#|sys/stat.h,g
-s, at HAVE_SYSEXITS_H@,|#_!!_#|1,g
-s, at ABSOLUTE_SYSEXITS_H@,|#_!!_#|"///usr/include/sysexits.h",g
-s, at SYSEXITS_H@,|#_!!_#|,g
-s, at REPLACE_LOCALTIME_R@,|#_!!_#|0,g
-s, at REPLACE_NANOSLEEP@,|#_!!_#|GNULIB_PORTCHECK,g
-s, at REPLACE_STRPTIME@,|#_!!_#|GNULIB_PORTCHECK,g
-s, at REPLACE_TIMEGM@,|#_!!_#|GNULIB_PORTCHECK,g
-s, at ABSOLUTE_TIME_H@,|#_!!_#|"///usr/include/time.h",g
-s, at TIME_H_DEFINES_STRUCT_TIMESPEC@,|#_!!_#|1,g
-s, at SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@,|#_!!_#|0,g
-s, at HAVE_UNISTD_H@,|#_!!_#|1,g
-s, at ABSOLUTE_UNISTD_H@,|#_!!_#|"///usr/include/unistd.h",g
-s, at EOVERFLOW@,|#_!!_#|,g
-s, at ABSOLUTE_WCHAR_H@,|#_!!_#|,g
-s, at WCHAR_H@,|#_!!_#|,g
-s, at HAVE_ISWCNTRL@,|#_!!_#|1,g
-s, at HAVE_WINT_T@,|#_!!_#|1,g
-s, at ABSOLUTE_WCTYPE_H@,|#_!!_#|"///usr/include/wctype.h",g
-s, at HAVE_WCTYPE_H@,|#_!!_#|1,g
-s, at WCTYPE_H@,|#_!!_#|,g
-s, at LIBCPIO_LIBDEPS@,|#_!!_#|,g
-s, at LIBCPIO_LTLIBDEPS@,|#_!!_#|,g
-s, at LIB_SETSOCKOPT@,|#_!!_#|,g
-s, at PU_RMT_PROG@,|#_!!_#|rmt$(EXEEXT),g
-s, at DEFAULT_RMT_DIR@,|#_!!_#|$(libexecdir),g
-s, at DEFAULT_RMT_COMMAND@,|#_!!_#|,g
-s, at CPIO_MT_PROG@,|#_!!_#|,g
-s, at USE_NLS@,|#_!!_#|no,g
-s, at MSGFMT@,|#_!!_#|/usr/local/bin/msgfmt,g
-s, at GMSGFMT@,|#_!!_#|/usr/local/bin/msgfmt,g
-s, at MSGFMT_015@,|#_!!_#|:,g
-s, at GMSGFMT_015@,|#_!!_#|:,g
-s, at XGETTEXT@,|#_!!_#|/usr/local/bin/xgettext,g
-s, at XGETTEXT_015@,|#_!!_#|:,g
-s, at MSGMERGE@,|#_!!_#|/usr/local/bin/msgmerge,g
-s, at INTL_MACOSX_LIBS@,|#_!!_#|,g
-s, at LIBICONV@,|#_!!_#|-liconv,g
-s, at LTLIBICONV@,|#_!!_#|-liconv,g
-s, at INTLLIBS@,|#_!!_#|,g
-CEOF
-cat >"$tmp/subs-4.sed" <<\CEOF
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
-s, at POSUB@,|#_!!_#|,g
-s, at AUTOM4TE@,|#_!!_#|${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autom4te,g
-s, at LIBOBJS@,|#_!!_#|,g
-s, at LTLIBOBJS@,|#_!!_#|,g
-s, at gl_LIBOBJS@,|#_!!_#| __fpending.o argmatch.o asnprintf.o basename.o canonicalize-lgpl.o chdir-long.o close-stream.o closeout.o creat-safer.o dirname.o dup-safer.o error.o exitfail.o fchmodat.o fchownat.o fd-safer.o fnmatch.o getcwd.o getopt.o getopt1.o gettime.o hash.o imaxtostr.o lstat.o mempcpy.o memrchr.o mkdirat.o obstack.o offtostr.o open-safer.o openat.o openat-proc.o pipe-safer.o printf-args.o printf-parse.o quote.o quotearg.o safe-read.o safe-write.o save-cwd.o savedir.o strchrnul.o stripslash.o strnlen.o uinttostr.o umaxtostr.o utimens.o vasnprintf.o xgetcwd.o xmalloc.o,g
-s, at gl_LTLIBOBJS@,|#_!!_#| __fpending.lo argmatch.lo asnprintf.lo basename.lo canonicalize-lgpl.lo chdir-long.lo close-stream.lo closeout.lo creat-safer.lo dirname.lo dup-safer.lo error.lo exitfail.lo fchmodat.lo fchownat.lo fd-safer.lo fnmatch.lo getcwd.lo getopt.lo getopt1.lo gettime.lo hash.lo imaxtostr.lo lstat.lo mempcpy.lo memrchr.lo mkdirat.lo obstack.lo offtostr.lo open-safer.lo openat.lo openat-proc.lo pipe-safer.lo printf-args.lo printf-parse.lo quote.lo quotearg.lo safe-read.lo safe-write.lo save-cwd.lo savedir.lo strchrnul.lo stripslash.lo strnlen.lo uinttostr.lo umaxtostr.lo utimens.lo vasnprintf.lo xgetcwd.lo xmalloc.lo,g
-:end
-s/|#_!!_#|//g
-CEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
- { (exit 1); exit 1; }; };;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
- esac
- ac_file_inputs="$ac_file_inputs $ac_f"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input="Generated from "`IFS=:
- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- fi
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin";;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
- ac_MKDIR_P=$MKDIR_P
- case $MKDIR_P in
- [\\/$]* | ?:[\\/]* ) ;;
- */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
- esac
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-case `sed -n '/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
- ac_datarootdir_hack='
- s&@datadir@&${datarootdir}&g
- s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g
- s&@infodir@&${datarootdir}/info&g
- s&@localedir@&${datarootdir}/locale&g
- s&@mandir@&${datarootdir}/man&g
- s&\${datarootdir}&${prefix}/share&g' ;;
-esac
- sed "/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
-}
-
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" | sed -f "$tmp/subs-4.sed" >$tmp/out
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out"; rm -f "$tmp/out";;
- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
- esac
- ;;
- :H)
- #
- # CONFIG_HEADER
- #
- # First, check the format of the line:
- cat >"$tmp/defines.sed" <<\CEOF
-/^[ ]*#[ ]*undef[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[ ]*$/b def
-/^[ ]*#[ ]*define[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[( ]/b def
-b
-:def
-s/$/ /
-s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_NAME\)[ (].*,\1define\2 "GNU cpio" ,
-s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_TARNAME\)[ (].*,\1define\2 "cpio" ,
-s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_VERSION\)[ (].*,\1define\2 "2.8" ,
-s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_STRING\)[ (].*,\1define\2 "GNU cpio 2.8" ,
-s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_BUGREPORT\)[ (].*,\1define\2 "bug-cpio at gnu.org" ,
-s,^\([ #]*\)[^ ]*\([ ]*PACKAGE\)[ (].*,\1define\2 "cpio" ,
-s,^\([ #]*\)[^ ]*\([ ]*VERSION\)[ (].*,\1define\2 "2.8" ,
-s,^\([ #]*\)[^ ]*\([ ]*_GNU_SOURCE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*STDC_HEADERS\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_TYPES_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_STAT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDLIB_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRING_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_MEMORY_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRINGS_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_INTTYPES_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDINT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_UNISTD_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*__EXTENSIONS__\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*_POSIX_PTHREAD_SEMANTICS\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*_TANDEM_SOURCE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*PROTOTYPES\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*__PROTOTYPES\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*RETSIGTYPE\)[ (].*,\1define\2 void ,
-s,^\([ #]*\)[^ ]*\([ ]*STDC_HEADERS\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DIRENT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_FCHMOD\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_FCHOWN\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_ALLOCA\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDLIB_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*MALLOC_0_IS_NONNULL\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_LONG_LONG_INT\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_GETENV\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_CLEARERR_UNLOCKED\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_FEOF_UNLOCKED\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_FERROR_UNLOCKED\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_FFLUSH_UNLOCKED\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_FGETS_UNLOCKED\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_FPUTC_UNLOCKED\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_FPUTS_UNLOCKED\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_FREAD_UNLOCKED\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_FWRITE_UNLOCKED\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_GETC_UNLOCKED\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_GETCHAR_UNLOCKED\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_PUTC_UNLOCKED\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_PUTCHAR_UNLOCKED\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_FLOCKFILE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_FUNLOCKFILE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETCWD\)[ (].*,\1define\2 1 ,
-CEOF
- sed -f "$tmp/defines.sed" $ac_file_inputs >"$tmp/out1"
- # First, check the format of the line:
- cat >"$tmp/defines.sed" <<\CEOF
-/^[ ]*#[ ]*undef[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[ ]*$/b def
-/^[ ]*#[ ]*define[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[( ]/b def
-b
-:def
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_READLINK\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DUP2\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_FCHDIR\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_BTOWC\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_ISWCTYPE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_MBSRTOWCS\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_WMEMCHR\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_WMEMCPY\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETTIMEOFDAY\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_ALARM\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_LCHMOD\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_MBSINIT\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SETENV\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SLEEP\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRERROR\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_LSTAT\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_PIPE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_FUTIMES\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_ISWCNTRL\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_MKFIFO\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SETLOCALE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_PARAM_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_UNISTD_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DIRENT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_FCNTL_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_FLOAT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_WCTYPE_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_TIME_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDINT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_INTTYPES_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDIO_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDLIB_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRING_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_STAT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYSEXITS_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_TIME_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_UTIME_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_WCHAR_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_NETDB_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_MEMORY_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_WAIT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_MTIO_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SGTTY_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_LOCALE_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_CANONICALIZE_FILE_NAME\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_UNISTD_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_CHOWN\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE\)[ (].*,\1define\2 0 ,
-CEOF
- sed -f "$tmp/defines.sed" "$tmp/out1" >"$tmp/out2"
- # First, check the format of the line:
- cat >"$tmp/defines.sed" <<\CEOF
-/^[ ]*#[ ]*undef[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[ ]*$/b def
-/^[ ]*#[ ]*define[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[( ]/b def
-b
-:def
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_STRERROR_R\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRERROR_R\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_MBSTATE_T\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_GETCWD\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE__BOOL\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDBOOL_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_TM_GMTOFF\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETOPT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETOPT_LONG_ONLY\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_SYS_TIME_H\)[ (].*,\1define\2 "///usr/include/sys/time.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_UNSIGNED_LONG_LONG_INT\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_STDINT_H\)[ (].*,\1define\2 "///usr/include/stdint.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_INTTYPES_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_IMAXABS\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_IMAXDIV\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_STRTOIMAX\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_STRTOUMAX\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_LCHOWN\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_MEMRCHR\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_STRDUP\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_STRING_H\)[ (].*,\1define\2 "///usr/include/string.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_STRNDUP\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_STRNLEN\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_TIME_H\)[ (].*,\1define\2 "///usr/include/time.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_WORKING_UTIMES\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRUCT_UTIMBUF\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_WCHAR_T\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_WINT_T\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_INTTYPES_H_WITH_UINTMAX\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDINT_H_WITH_UINTMAX\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_LONG_LONG\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_INTMAX_T\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_VSNPRINTF\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDINT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_ALLOCA_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*__GETOPT_PREFIX\)[ (].*,\1define\2 rpl_ ,
-s,^\([ #]*\)[^ ]*\([ ]*GNULIB_PROGRAM_INVOCATION_NAME\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*GNULIB_PROGRAM_INVOCATION_SHORT_NAME\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*realpath\)[ (].*,\1define\2 rpl_realpath ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_CLOCK_GETTIME\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_CLOCK_SETTIME\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*GNULIB_CLOSE_STREAM\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*D_INO_IN_DIRENT\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_DIRFD\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_WORKING_O_NOATIME\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_WORKING_O_NOFOLLOW\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_FCNTL_H\)[ (].*,\1define\2 "///usr/include/fcntl.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*GNULIB_FCNTL_SAFER\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRUCT_STAT_ST_BLOCKS\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_ST_BLOCKS\)[ (].*,\1define\2 1 ,
-CEOF
- sed -f "$tmp/defines.sed" "$tmp/out2" >"$tmp/out1"
- # First, check the format of the line:
- cat >"$tmp/defines.sed" <<\CEOF
-/^[ ]*#[ ]*undef[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[ ]*$/b def
-/^[ ]*#[ ]*define[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[( ]/b def
-b
-:def
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_ISBLANK\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*fnmatch\)[ (].*,\1define\2 gnu_fnmatch ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL___FPENDING\)[ (].*,\1define\2 0 ,
-s,^\([ #]*\)[^ ]*\([ ]*PENDING_OUTPUT_N_BYTES\)[ (].*,\1define\2 fp->_p - fp->_bf._base ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_PARTLY_WORKING_GETCWD\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETPAGESIZE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRUCT_TM_TM_ZONE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_TM_ZONE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*__GETOPT_PREFIX\)[ (].*,\1define\2 rpl_ ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_INLINE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_INTTYPES_H\)[ (].*,\1define\2 "///usr/include/inttypes.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_LCHOWN\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDLIB_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_MALLOC\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*__OPENAT_PREFIX\)[ (].*,\1define\2 rpl_ ,
-s,^\([ #]*\)[^ ]*\([ ]*fchownat\)[ (].*,\1define\2 rpl_fchownat ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_MBSTATE_T\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_MBRTOWC\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_UNSETENV\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*VOID_UNSETENV\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_STDINT_H\)[ (].*,\1define\2 "///usr/include/stdint.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_STDIO_H\)[ (].*,\1define\2 "///usr/include/stdio.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_STDLIB_H\)[ (].*,\1define\2 "///usr/include/stdlib.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STPCPY\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRCASECMP\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRNCASECMP\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_STRNCASECMP\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRDUP\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRNDUP\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*strnlen\)[ (].*,\1define\2 rpl_strnlen ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRTOL\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_MKDIR\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_SYS_STAT_H\)[ (].*,\1define\2 "///usr/include/sys/stat.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_SYSEXITS_H\)[ (].*,\1define\2 "///usr/include/sysexits.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_UNISTD_H\)[ (].*,\1define\2 "///usr/include/unistd.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*USE_UNLOCKED_IO\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_PTRDIFF_T\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SNPRINTF\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_WCSLEN\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_VSNPRINTF\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*ABSOLUTE_WCTYPE_H\)[ (].*,\1define\2 "///usr/include/wctype.h" ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDINT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*TIME_WITH_SYS_TIME\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRUCT_STAT_ST_BLKSIZE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_ST_BLKSIZE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_MTIO_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*MTIO_CHECK_FIELD\)[ (].*,\1define\2 mt_type ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_BUF_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRUCT_STAT_ST_BLKSIZE\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_UNISTD_H\)[ (].*,\1define\2 1 ,
-CEOF
- sed -f "$tmp/defines.sed" "$tmp/out1" >"$tmp/out2"
- # First, check the format of the line:
- cat >"$tmp/defines.sed" <<\CEOF
-/^[ ]*#[ ]*undef[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[ ]*$/b def
-/^[ ]*#[ ]*define[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[( ]/b def
-b
-:def
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDLIB_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRING_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_FCNTL_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_UTMP_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_GETOPT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_LOCALE_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_WAIT_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_UTIME_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_LOCALE_H\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_ERRLIST\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_ERRNO\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_GETPWNAM\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_GETGRNAM\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_GETGRGID\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_STRDUP\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_STRERROR\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_GETENV\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_ATOI\)[ (].*,\1define\2 1 ,
-s,^\([ #]*\)[^ ]*\([ ]*HAVE_DECL_EXIT\)[ (].*,\1define\2 1 ,
-s/ $//
-s,^[ #]*u.*,/* & */,
-CEOF
- sed -f "$tmp/defines.sed" "$tmp/out2" >"$tmp/out1"
-ac_result="$tmp/out1"
- if test x"$ac_file" != x-; then
- echo "/* $configure_input */" >"$tmp/config.h"
- cat "$ac_result" >>"$tmp/config.h"
- if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- rm -f $ac_file
- mv "$tmp/config.h" $ac_file
- fi
- else
- echo "/* $configure_input */"
- cat "$ac_result"
- fi
- rm -f "$tmp/out12"
-# Compute $ac_file's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $ac_file | $ac_file:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
-echo X$ac_file |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
- :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
- ;;
- esac
-
-
- case $ac_file$ac_mode in
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir=$dirpart/$fdir
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
- ;;
- "po-directories":C)
- for ac_file in $CONFIG_FILES; do
- # Support "outfile[:infile[:infile...]]"
- case "$ac_file" in
- *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- esac
- # PO directories have a Makefile.in generated from Makefile.in.in.
- case "$ac_file" in */Makefile.in)
- # Adjust a relative srcdir.
- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
- # Treat a directory as a PO directory if and only if it has a
- # POTFILES.in file. This allows packages to have multiple PO
- # directories under different names or in different locations.
- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
- rm -f "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
- POMAKEFILEDEPS="POTFILES.in"
- # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
- # on $ac_dir but don't depend on user-specified configuration
- # parameters.
- if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
- # The LINGUAS file contains the set of available languages.
- if test -n "$OBSOLETE_ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
- fi
- ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
- eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
- POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
- else
- # The set of available languages was given in configure.in.
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
- eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
- fi
- # Compute POFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
- # Compute UPDATEPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
- # Compute DUMMYPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
- # Compute GMOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
- case "$ac_given_srcdir" in
- .) srcdirpre= ;;
- *) srcdirpre='$(srcdir)/' ;;
- esac
- POFILES=
- UPDATEPOFILES=
- DUMMYPOFILES=
- GMOFILES=
- for lang in $ALL_LINGUAS; do
- POFILES="$POFILES $srcdirpre$lang.po"
- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
- DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
- done
- # CATALOGS depends on both $ac_dir and the user's LINGUAS
- # environment variable.
- INST_LINGUAS=
- if test -n "$ALL_LINGUAS"; then
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "$LINGUAS"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang"*) useit=yes;;
- esac
- done
- if test $useit = yes; then
- INST_LINGUAS="$INST_LINGUAS $presentlang"
- fi
- done
- fi
- CATALOGS=
- if test -n "$INST_LINGUAS"; then
- for lang in $INST_LINGUAS; do
- CATALOGS="$CATALOGS $lang.gmo"
- done
- fi
- test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
- sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
- for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
- if test -f "$f"; then
- case "$f" in
- *.orig | *.bak | *~) ;;
- *) cat "$f" >> "$ac_dir/Makefile" ;;
- esac
- fi
- done
- fi
- ;;
- esac
- done ;;
- "tests/atconfig":C) cat >tests/atconfig <<ATEOF
-# Configurable variable values for building test suites.
-# Generated by $0.
-# Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
-
-# The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
-at_testdir='tests'
-abs_builddir='$ac_abs_builddir'
-at_srcdir='$ac_srcdir'
-abs_srcdir='$ac_abs_srcdir'
-at_top_srcdir='$ac_top_srcdir'
-abs_top_srcdir='$ac_abs_top_srcdir'
-at_top_build_prefix='$ac_top_build_prefix'
-abs_top_builddir='$ac_abs_top_builddir'
-
-# Backward compatibility with Autotest <= 2.59b:
-at_top_builddir=\$at_top_build_prefix
-
-AUTOTEST_PATH='tests'
-
-SHELL=\${CONFIG_SHELL-'$SHELL'}
-ATEOF
- ;;
-
- esac
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
--- contrib/cpio/TODO
+++ /dev/null
@@ -1,159 +0,0 @@
-Following is the list of cpio-related reports to bug-gnu-utils.
-Many of them appear to be fixed, but quite a number of them is
-probably still waiting for being handled. The list is divided
-into two parts, the messages are in somehow arbitrary order.
-
-* Bug reports
---------------
-
-** cpio -d bug (fwd) (score: 47)
- Author: Christian Smith <csmith at micromuse.com>
- Date: Wed, 14 Nov 2001 02:06:46 +0000 (GMT)
- This was bounced from bug-cpio at bogus.example.com I guess that
- isn't set up yet. -- /"\ \ / ASCII RIBBON CAMPAIGN - AGAINST
- HTML MAIL X - AGAINST MS ATTACHMENTS / \ $ cpio --version GNU
- cpio version 2
- /archive/html/bug-gnu-utils/2001-11/msg00170.html (4,548 bytes)
-
-** bug in cpio with tapechange in copy-in-mode (score: 34)
- Author: Bernd =?ISO-8859-1?Q?Sch=FCler?=
- <b.schueler at eckert-buerotechnik.de>
- Date: 05 Aug 2002 18:37:56 +0200
- Hello, last i made a restore from tape, and no request for next
- tape happend, only an read-error occured. Here is an quick
- patch, please verify the problem and the patch-code. I'm not
- sure, if the pr
- /archive/html/bug-gnu-utils/2002-08/msg00122.html (4,518 bytes)
-
-** Re: bug in cpio? (score: 40)
- Author: kasal at matsrv.math.cas.cz (Stepan Kasal)
- Date: Thu, 13 Jun 2002 07:44:14 +0000 (UTC)
- Hallo, the following option should help: -d, --make-directories
- Create leading directories where needed. Details: cpio won't
- create the directory for the file. Observe: kasal$ echo
- /home/kasal/tmp/db
- /archive/html/bug-gnu-utils/2002-06/msg00306.html (4,862 bytes)
-
-** cpio 2.4.2 bug? (score: 40)
- Author: "H.J. Thomassen" <H.J.Thomassen at ATComputing.nl>
- Date: Thu, 10 Jan 2002 18:09:10 +0100 (CET)
- Hello, We use GNU-cpio 2.4.2 and have the following problem:
- Short: Assume I have a directory with two filenames, which are
- hardlinks to the same i-node. I make a crc-cpio archive with
- both files; th
- /archive/html/bug-gnu-utils/2002-01/msg00161.html (5,624 bytes)
-
-** These two seem to be related:
-*** cpio copy-in and multiply-linked files (score: 35)
- Author: Chris Jaeger <cjaeger at ensim.com>
- Date: Tue, 07 Aug 2001 23:46:04 -0700
- Hi, I was wondering whether it was a bug or a feature that GNU
- cpio, while in copy-in mode, will create a multiply-linked set
- of files all of size 0 if the last linked file is not copied in
- due to th
- /archive/html/bug-gnu-utils/2001-08/msg00074.html (4,142 bytes)
-
-*** (no subject) (score: 2)
- Author: brian at debian.org (Brian Mays)
- Date: Sat, 07 Jul 2001 16:35:13 -0400
- When hard-linked files (along with many other files) are
- archived to a cpio ustar format archive, the files are _not_
- all archived as hard links to each other in the archive. When
- the same set of fil
- /archive/html/bug-gnu-utils/2001-07/msg00080.html (5,666 bytes)
-
-** These too:
-
-*** Re: minor problems with slackware-current (score: 7)
- Author: Cezary Sliwa <sliwa at cft.edu.pl>
- Date: Wed, 1 Aug 2001 10:43:37 +0200
- "cpio --sparse" corrupts data. A fix attached. C.S. Attachment:
- cpio-2.4.2-sparse.diff Description: Text document
- /archive/html/bug-gnu-utils/2001-08/msg00000.html (3,989 bytes)
-
-*** cpio --sparse (score: 34)
- Author: Cezary Sliwa <sliwa at cft.edu.pl>
- Date: Mon, 26 Mar 2001 10:43:34 +0200 (CEST)
- the '--sparse' option of gnu cpio causes data corruption
- (blocks of zeros are lost or appended to other files). C.S.
- /archive/html/bug-gnu-utils/2001-03/msg00235.html (3,671 bytes)
-
-** And these too
-*** cpio-2.4.2: data corruption bug (score: 35)
- Author: Todd Kelley <toddk at oeone.com>
- Date: Fri, 09 Feb 2001 17:00:06 -0500
- Hello, Recently at OEone we fixed a bug in GNU cpio-2.4.2: When
- a file over about 0.5 megabyes grows while it is being
- archived, it and all files following it in the archive are
- corrupted. The crc do
- /archive/html/bug-gnu-utils/2001-02/msg00062.html (4,297 bytes)
-
-*** cpio pass-through can corrupt files (score: 36)
- Author: "Parrott, Jeff" <Jeff.Parrott at sea.siemens.com>
- Date: Mon, 16 Oct 2000 13:32:57 -0400
- I have seen corrupted files as a result of using the
- pass-through option in cpio. The corruption occurs when
- active/in-use (and growing) files are being copied. The problem
- is that the file size has
- /archive/html/bug-gnu-utils/2000-10/msg00087.html (4,974 bytes)
-
-** cpio 2.4.2 unconditionally takes the tape drive offline (score:
- 39)
- Author: Scott Larson <scowl at plaza.ds.adp.com>
- Date: Thu, 11 Jan 2001 13:15:52 -0800
- We have been copying multiple volumes to a single tape with the
- System 5 version of cpio. The gnu version of cpio doesn't
- support this since it takes the tape offline (i.e. ejects the
- tape) after rea
- /archive/html/bug-gnu-utils/2001-01/msg00087.html (4,264 bytes)
-
-** cpio -t can see international filenames, find -ls also suffers
- (score: 35)
- Author: "Dan Jacobson" <jidanni at kimo.FiXcomTHiS.tw>
- Date: Tue, 26 Dec 2000 07:38:53 +0800
- GNU cpio version 2.4.2 with cpio -t I can see Chinese [big5]
- filenames. with -tv, they become \267\247 etc Just like what
- happens with find . -print vs. find . -ls --
- http://www.geocities.com/jidanni
- /archive/html/bug-gnu-utils/2000-12/msg00143.html (4,084 bytes)
-
-* Suggestions
--------------
-
-** GNU cpio suggestion (score: 42)
- Author: "H.J.Thomassen" <hjt at ATComputing.nl>
- Date: Mon, 17 Dec 2001 11:27:11 +0100
- Re: suggestion for GNU-cpio extension (plus reference
- implementation) We use cpio for our backup purposes. The backup
- is started automatically in the middle of the night. To chase
- away all users we d
- /archive/html/bug-gnu-utils/2001-12/msg00244.html (7,474 bytes)
-
-** cpio suggestion + patch (score: 38)
- Author: Taylor Gautier <tgautier at s8.com>
- Date: Fri, 20 Apr 2001 09:40:05 -0700
- I have a suggestion for cpio. The suggestion is to make it copy
- files into a temporary name and then rename the file as the
- last operation. Since UNIX filesystems are supposed to
- gaurantee atomicity
- /archive/html/bug-gnu-utils/2001-04/msg00169.html (10,674
- bytes)
-
-** [cpio] man page enhancement: a Example section ? (score: 5)
- Author: Yannick Patois <patois at calvix.org>
- Date: Wed, 24 Oct 2001 12:48:33 +0200 (CEST)
- Hello, I seldom use cpio (as I think many people) and only had
- to use it once or twice. IMHA, would be good to have a small
- section with an example of most often performed actions
- (creating an archiv
- /archive/html/bug-gnu-utils/2001-10/msg00270.html (4,336 bytes)
-
-** Patch to cpio to enable verbose *skipping* of files (score: 40)
- Author: Tomas Pospisek <tpo at sourcepole.ch>
- Date: Mon, 8 Oct 2001 13:54:14 +0200 (CEST)
- This patch enables cpio to be verbose about the files that it
- does not copy, which is very handy for seeing cpio's progress
- through a tape or simply for debuging. The patch along with a
- Debian packag
- /archive/html/bug-gnu-utils/2001-10/msg00083.html (4,548 bytes)
-
--- contrib/cpio/ChangeLog
+++ /dev/null
@@ -1,1781 +0,0 @@
-2007-06-08 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * configure.ac, NEWS: Version number 2.8
- * bootstrap.conf: Update
-
-2007-06-07 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * NEWS: Update
- * configure.ac: Raise version to 2.7.90
- * doc/cpio.texi: Update
- * src/extern.h (set_perms, set_file_times): Take file descriptor
- as the first argument.
- * src/util.c (set_perms): Take file descriptor
- as the first argument and use fchmod/fchown if available. Fixes
- CAN-2005-1111.
- * src/copyin.c, src/copyout.c, src/copypass.c: Update calls to
- set_perms.
- * src/makepath.c: Remove useless includes.
-
- * src/util.c (set_perms, stat_to_cpio): Use CPIO_UID and CPIO_GID
- macros to set uid and gid
- * src/main.c (process_args): Allow to use --owner in copy-out mode.
- * THANKS: Add Mike Frysinger
-
-2007-05-18 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * bootstrap: Update from tar repository
- * doc/cpio.texi: Fix typo
- * src/copyin.c (from_ascii): Bugfix: allow for empty fields
- * src/copyout.c (process_copy_out): Fix memory leaks on
- orig_file_name.
- * src/copypass.c (process_copy_pass): symlink_error takes two
- arguments.
- * src/extern.h: Add missing includes.
-
-2006-12-18 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * README-cvs: New file
- * lib/Makefile.tmpl, lib/bcopy.c, lib/mkdir.c, lib/strdup.c,
- lib/strerror.c, lib/.cvsignore, po/.cvsignore,
- po/Makevars: Removed
- * lib/Makefile.am: New file
- * po/POTFILES.in: Update
- * bootstrap: Synch with tar.
- * configure.ac: Update
- * gnulib.modules: Add lchown, strerror
- * src/Makefile.am: Update
- * src/main.c, src/mt.c: Include rmt-command.h instead of localedir.h
- * .cvsignore, doc/.cvsignore: Sort
-
- * src/util.c (sparse_write): Static. Provide a forward
- declaration. Define enum sparse_write_states inside the function.
-
- * src/copyin.c (long_format): Use PRIuMAX for printing file size
- * src/copyout.c (write_out_binary_header): Fix size conversion
- * src/extern.h (tape_toss_input, warn_if_file_changed): Last
- argument is off_t
- * src/util.c (tape_toss_input, warn_if_file_changed): Last
- argument is off_t
- (warn_if_file_changed): Use ngettext
-
-2006-11-15 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * src/copypass.c: Fix setting output file permissions
-
-2006-11-13 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * doc/cpio.texi: Consistently use @option{} for displaying command
- line options.
- Fix formatting in "Invoking `cpio'" section
- * src/main.c (process_args): Fix usage error diagnostics in
- copy-pass mode.
-
-2006-10-24 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * src/copyout.c (process_copy_out): Add terminating zero to the
- link_name.
-
- * tests/symlink.at: New testcase
- * tests/Makefile.am: New test symlink.at
- * tests/inout.at: Add keywords
- * tests/testsuite.at (AT_SKIP_TEST): New macro
- New test symlink.at
-
-2006-10-21 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * configure.ac, NEWS: Version 2.7
- * gnulib.modules: Add stdint
- * src/util.c: Use STRINGIFY_BIGINT to display num_bytes
-
-2006-09-27 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * TODO: Update
- * README-alpha: Update
- * bootstrap: Imported from tar
- * configure.ac: Require autoconf 2.59 and gettext 1.15
- * gnulib.modules: add inttypes
- * doc/cpio.texi: Minor fixes
- * po/Makevars: Remove automatically generated file
- * po/.cvsignore: Add Makevars
- * lib/.cvsignore: Update
- * src/copyin.c, src/copyout.c, src/copypass.c, src/cpio.h,
- src/cpiohdr.h, src/defer.c, src/defer.h, src/extern.h,
- src/global.c, src/main.c, src/makepath.c, src/tar.c,
- src/util.c: Update copyright year.
-
-2006-07-04 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * bootstrap (update_po): Fix single translation update
- * lib/Makefile.tmpl: Initialize AM_CPPFLAGS
- (noinst_HEADERS): Add system-ioctl.h
-
- Start rewriting using a better suited internal representation for
- the file meta-data.
-
- * src/cpiohdr.h (struct old_cpio_header): Remove unused fields
- c_mtime, c_filesize and c_name.
- (struct old_ascii_header): New data type
- (struct new_ascii_header): New data type. Describes the header
- structure, not its internal representation.
- (struct cpio_file_stat): New data type. Describes internal
- representation of a file metadata
-
- * src/copyin.c (from_ascii): New function
- Use cpio_file_stat for internal header representation.
- * src/copyout.c: Use cpio_file_stat for internal header
- representation. Among other things this fixes bug reported by
- Peter Vrabec on Mar 2, 2006
- (http://lists.gnu.org/archive/html/bug-cpio/2006-03/msg00000.html)
- * src/copypass.c: Use cpio_file_stat for internal header
- representation.
- * src/tar.c: Likewise
- * src/util.c: Likewise
- * src/defer.c: Likewise
- * src/defer.h: Likewise
- * src/extern.h: Likewise
- (from_ascii): New prototype
- (LG_8,LG_16,FROM_OCTAL,FROM_HEX): New defines
- * src/main.c: New command line option --HANG (hidden)
-
-2006-03-12 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * tests/Makefile.am (AM_CPPFLAGS): Define LOCALEDIR
-
-2006-02-18 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * gnulib.modules: Add stpcpy. Thanks Benigno B. Junior for
- reporting.
- * THANKS: Add Benigno B. Junior
- * src/makepath.c: Fix indentation.
-
-2005-11-16 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * src/copyout.c (process_copy_out): Fix typo.
-
-2005-11-12 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * bootstrap: Minor fix
- * src/copyout.c (write_out_header): Rewritten using separate
- functions for each file format. Use to_ascii to convert numbers to
- ascii representation. Check for overflows and report them if
- appropriate. Return 0 if it is OK to proceed with archiving this
- file, 1 otherwise. All callers updated.
- * src/extern.h (write_out_header): Return int.
-
-2005-10-28 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * src/util.c: Include paxlib.
- * bootstrap: If file `.bootstrap' exists in the cwd and is
- readable, prepend its contents to the command line.
-
- Fix Debian bug 335580:
-
- * src/copyout.c (read_for_checksum,write_out_header): CRC is a
- 32-bit unsigned value. Patch proposed by Jim Castleberry and
- Peter Vrabec.
- * src/extern.h (crc): Change declaration
- * src/global.c: Likewise
- * src/tar.c (tar_checksum): Return unsigned int
-
- * THANKS: Add Jim Castleberry
- * NEWS: Updated
-
-2005-09-30 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * src/copyout.c (process_copy_out): Discern between original and
- (eventually fixed) file name (in tar terminology, `file name'
- vs. `member name'.
-
-2005-09-08 Sergey Poznyakoff <gray at gnu.org.ua>
-
- * gnulib.modules: Add utimens
- * src/util.c (cpio_safer_name_suffix): Preserve ./ no matter what
- the value of strip_leading_dots is.
- (set_file_times): New function
- * src/extern.h (set_file_times): New function
- * src/copyin.c: Use set_file_times() to update file atime/mtime
- * src/copyout.c: Likewise.
- * src/copypass.c: Likewise.
-
-2005-05-25 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * src/copyin.c: Use cpio_safer_name_suffix() and CPIO_TRAILER_NAME
- define instead of hardcoding the trailer file name.
- * src/copyout.c: Likewise.
- * src/cpio.h (CPIO_TRAILER_NAME): New define
- * src/extern.h (cpio_safer_name_suffix): New proto
- * src/tar.c: Use CPIO_TRAILER_NAME define instead of hardcoding
- the trailer file name.
- * src/util.c (cpio_safer_name_suffix): New function
- (add_cdf_double_slashes): Add FIXME warning.
-
- * lib/fatal.c: New file
- * lib/Makefile.tmpl (libcpio_a_SOURCES): Add fatal.c
- * src/copyout.c: Use error reporting functions from paxlib
- * src/makepath.c: Likewise
- * src/mt.c: Likewise
- * src/main.c (fatal_exit): Moved to lib/fatal.c
-
-2005-05-24 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * src/copyin.c (process_copy_in): Use safer_name_suffix no matter
- what the value of no_abs_paths_flag. The function knows better
- what to do in any case.
- * src/copyout.c (process_copy_out): Honor no_abs_paths_flag.
- * src/main.c (options): Minor fixes.
-
-2005-05-23 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * bootstrap (copy_files): Create destination directory if it does
- not exist.
- Preserve longlong.m4 as longlong_gl.m4
- * src/main.c: Include paxlib.h
-
-2005-05-22 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * lib/.cvsignore: Updated
- * gnulib.modules: Add hash
- * doc/cpio.texi (Reports): New chapter
- * lib/Makefile.tmpl: Add new paxutils files.
- * po/POTFILES.in: Likewise
- * src/copyin.c [!HAVE_LCHOWN] (lchown): Define to 0 to avoid
- changing ownership of the target file.
- (process_copy_in): Use safer_name_suffix()
- * src/main.c (parse_opt): Handle new --absolute-filenames option.
- (process_args): Updated
- * src/util.c: Rewrite inode lookup/insertion functions using hash
- module.
-
-u2005-05-20 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * configure.ac: Raised version number to 2.6.90
- * NEWS: Updated
- * src/copyin.c: Use set_perms.
- * src/copypass.c: Likewise.
- * src/copyout.c (process_copy_out): Use stat_to_cpio() to convert
- struct stat to struct new_cpio_header.
- * src/defer.h: Remove legacy P_() stuff.
- * src/dstring.c: Likewise
- * src/extern.h: Likewise
- * src/util.c (stat_to_cpio,set_perms): New functions
- * doc/.cvsignore: Updated
- * lib/.cvsignore: Updated
- * tests/.cvsignore: Updated
- * .cvsignore: Updated
- * COPYING: Added to the repository
-
-2005-05-19 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * po/POTFILES.in: Add paxerror.c paxexit.c paxconvert.c
-
- * bootstrap (copy_files): Accept optional third argument: a prefix
- to be appended to destination file names.
- Import paxutils/paxlib files.
- * lib/Makefile.tmpl (libcpio_a_SOURCES): Add paxerror.c paxexit.c
- paxconvert.c
- * src/copyin.c: Use paxutils error reporting functions
- * src/copyout.c: Likewise
- * src/copypass.c: Likewise
- * src/util.c: Likewise. Add missing includes
- * src/main.c (USAGE_ERROR): Removed
- (CHECK_USAGE,parse_opt,process_args): Use error() instead of USAGE_ERROR
- (fatal_exit): New function
- * src/tar.c (is_tar_filename_too_long): Removed unused variable
-
- * Makefile.am, configure.ac, doc/Makefile.am,
- doc/cpio.texi, doc/gendocs_template, headers/Makefile.am,
- headers/fnmatch.h, lib/Makefile.tmpl, lib/mkdir.c,
- lib/strdup.c, lib/strerror.c, src/Makefile.am,
- src/copyin.c, src/copyout.c, src/copypass.c, src/cpio.h,
- src/cpiohdr.h, src/defer.c, src/defer.h, src/dstring.c,
- src/dstring.h, src/extern.h, src/filemode.c,
- src/filetypes.h, src/global.c, src/idcache.c,
- src/main.c, src/makepath.c, src/mt.c, src/tar.c,
- src/tar.h, src/tarhdr.h, src/userspec.c, src/util.c,
- tests/Makefile.am, tests/inout.at, tests/testsuite.at,
- tests/version.at: Updated FSF postal mail address.
-
- * bootstrap: Port recent changes from tar bootstrap.
- * gnulib.modules: New file
- * tests/Makefile.am (genfile_SOURCES,LDADD): Updated
-
- * THANKS: Updated
- * configure.ac: Remove check for gethostname, it is never used.
- Remove check for setsockopt, it is provided by paxutils.
-
- Fix LFS support issues. Proposed by Peter Vrabec and Dmitry V. Levin
-
- * src/extern.h (copy_files_tape_to_disk, copy_files_disk_to_tape,
- copy_files_disk_to_disk): Change num_bytes argument type from
- long to off_t.
- * src/util.c (copy_files_tape_to_disk, copy_files_disk_to_tape,
- copy_files_disk_to_disk, disk_fill_input_buffer,
- write_nuls_to_file): Likewise.
- (write_nuls_to_file, copy_files_disk_to_tape,
- copy_files_disk_to_disk): Handle `off_t num_bytes' properly.
-
- * src/util.c (find_inode_file): Fix typos causing function to
- occasionally miss inodes and, therefore, to copy out the same
- (hard-linked) file several times to archive. Proposed by Brian
- Mays.
-
-2005-03-24 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * src/main.c (process_args): Fixed discrepancy I have been
- overlooking so far: cpio still does not handle --sparse option
- the same way tar is handling it. --sparse is allowed in copy-in
- and copy-pass modes, just as docs say it. Thanks Dmitry Levin.
- * THANKS: Updated
-
-2005-03-21 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * src/util.c (disk_buffered_write): Fix typo introduced
- 2005-01-11.
- * src/main.c (process_args): Fixed error message
-
-2005-01-31 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * src/main.c (main): Remove umask(0). Fixes CAN-1999-1572.
- [__TURBOC__,__EMX__]: Removed
- * src/copypass.c (process_copy_pass): Set umask 0
- * src/copyin.c (process_copy_in): Likewise
- * src/util.c (open_archive): Use MODE_RW.
-
-2005-01-11 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * doc/gendocs_template: Template file for gendocs.sh.
- * doc/Makefile.am: Use gendocs.sh to generate webdocs.
- * doc/cpio.texi: Updated.
-
- * src/copyin.c: Use memset instead of bzero, memmove
- (or memcpy, if appropriate), instead of bcopy, and
- strchr/strrchr instead of index/rindex.
- * src/copypass.c: Likewise.
- * src/main.c: Likewise.
- * src/makepath.c: Likewise.
- * src/tar.c: Likewise.
- * src/util.c: Likewise.
- (write_nuls_to_file): Made extern. All callers updated
-
- * src/copyout.c: Likewise. Use write_nuls_to_file instead
- of explicitely accessing zeros_512
- * src/userspec.c: Likewise.
- Rename isnumber to isnumber_p. Proposed by
- Albert Chin
- * src/extern.h (zeros_512): Removed
- (write_nuls_to_file): New function
- * src/global.c (zeros_512): Removed
-
-2005-01-06 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * bootstrap: Add 'fileblocks' gnulib module
- Create paxutils.m4
- * configure.ac: Call cpio_PAXUTILS
- * src/main.c: Remove ifdef around setlocale
- * src/mt.c: Likewise
-
-2004-12-21 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * configure.ac: New option --enable-mt
- Check for locale.h
- * doc/cpio.info: Removed
- * src/mt.c (main): Use argmatch_invalid()
-
-2004-12-20 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- Released version 2.6. Sources up to this point are tagged
- release_2_6.
-
- * configure.ac: Raised version number to 2.6
- * NEWS: Likewise
- * bootstrap (update_po): Give -r to wget. Always remove index.html
- Ignore alloca-opt module (it duplicates alloca)
-
-2004-11-23 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * src/main.c (enum cpio_options): Bugfix: Initialize first enum
- value to 256.
- * bootstrap: Add unlocked-io
- * headers/argp.h: Removed
- * headers/getopt.h: Removed
- * headers/Makefile.am: Updated
-
-2004-10-14 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * src/copyout.c: Add trailing slash to directory names in
- ustar format.
- * src/makepath.c: Removed redeclaration of error().
- * src/tar.c: Fixed deviations from POSIX.1-1988:
- Properly split long file names. Fill in octal fields with zeros,
- not spaces. Save only protection modes, not the whole mode.
-
- * NEWS: Updated
-
-2004-09-08 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * NEWS: Updated
- * TODO: Updated
- * bootstrap: Install po files by default
- * po/LINGUAS: Removed. File is generated automatically
- * po/.cvsignore: Updated
- * src/copyin.c: Implemented --to-stdout option
- * src/copyout.c: Display the annoying 'truncating inode number'
- message only if the user wishes it.
- * src/extern.h: Added new globals.
- * src/global.c: Likewise.
-
- * src/main.c: Added support for --to-stdout and --warning options
- * src/tar.c (read_in_tar_header): Use warn_junk_bytes()
- * src/util.c (create_all_directories): Use dir_name.
-
- * configure.ac: Added support for the test suite
- * Makefile.am: Likewise
-
- * tests: New directory
- * tests/.cvsignore: New file
- * tests/Makefile.am: New file
- * tests/testsuite.at: New file
- * tests/inout.at: New file
- * tests/version.at: New file
- * tests/atlocal.in: New file
-
-2004-09-07 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * src/main.c (process_args): Bugfix. Allow extra arguments
- in copy_in mode.
- * src/util.c (write_nuls_to_file): Use buffered I/O. All
- callers changed. Thanks Matthew Braithwaite <mab at cnet.com>
- for noticing.
- Bugfix: extra_bytes was mistakenly used instead of blocks.
- * THANKS: Added Matthew Braithwaite.
-
-2004-09-06 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- Started merging with tar into paxutils. Sources before
- this point are tagged alpha-2_50_90.
-
- * bootstrap: New file
- * autogen.sh: Removed
- * Makefile.am: Updated
- * NEWS: Updated
- * README-alpha: Updated
- * configure.ac: Updated
- * doc/cpio.1: Updated
- * po/POTFILES.in: Updated
-
- * src/Makefile.am: Updated
- * src/error.c: Removed
- * src/dirname.c: Likewise
- * src/xmalloc.c: Likewise
- * src/stripslash.c: Likewise
- * src/xstrdup.c
- * src/gettext.h: Likewise
- * src/system.h: Likewise
- * src/rmt.h: Likewise
- * src/getopt.c: Likewise
- * src/getopt1.c: Likewise
- * src/bcopy.c: Likewise
- * src/fnmatch.c: Likewise
- * src/mkdir.c: Likewise
- * src/strdup.c: Likewise
- * src/argp-ba.c: Likewise
- * src/argp-eexst.c: Likewise
- * src/argp-fmtstream.c: Likewise
- * src/argp-fs-xinl.c: Likewise
- * src/argp-help.c: Likewise
- * src/argp-parse.c: Likewise
- * src/argp-pv.c: Likewise
- * src/argp-pvh.c: Likewise
- * src/argp-xinl.c: Likewise
- * src/pin.c: Likewise
- * src/alloca.c: Likewise
- * src/argmatch.c: Likewise
- * src/rmt.c: Likewise
- * src/rtapelib.c: Likewise
- * src/strerror.c: Likewise
-
- * src/copyin.c: Switched to ANSI C (sigh)
- * src/copyout.c: Likewise
- * src/copypass.c: Likewise
- * src/defer.c: Likewise
- * src/defer.h: Likewise
- * src/dstring.c: Likewise
- * src/dstring.h: Likewise
- * src/extern.h: Likewise
- * src/filemode.c: Likewise
- * src/global.c: Likewise
- * src/idcache.c: Likewise
- * src/main.c: Likewise
- * src/makepath.c: Likewise
- * src/mt.c: Likewise
- * src/tar.c: Likewise
- * src/userspec.c: Likewise
- * src/util.c: Likewise
-
- * lib: New directory
- * lib/Makefile.tmpl: New file
- * lib/bcopy.c: Moved from ../src
- * lib/mkdir.c: Likewise.
- * lib/strdup.c: Likewise.
- * lib/strerror.c: Likewise.
-
-2004-08-30 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * Makefile.am: Added headers to SUBDIRS.
- * configure.ac: Check for AC_SYS_LARGEFILE.
- Use AC_CONFIG_LINKS to provide for fnmatch.h and getopt.h on
- the systems where these are missing
- Check for argp and replace it if necessary.
- * src/Makefile.am: Updated
- * src/fnmatch.h: Moved to headers/
- * src/getopt.h: Likewise.
- * src/main.c: Option parsing rewritten using argp. Improved
- option consistency checking.
- * src/rmt.c: Include getopt.h
-
- * src/argp-ba.c: New file
- * src/argp-eexst.c: New file
- * src/argp-fmtstream.c: New file
- * src/argp-fs-xinl.c: New file
- * src/argp-help.c: New file
- * src/argp-parse.c: New file
- * src/argp-pv.c: New file
- * src/argp-pvh.c: New file
- * src/argp-xinl.c: New file
- * src/pin.c: New file
-
- * headers: New directory
- * headers/Makefile.am: New file
- * headers/getopt.h: New file
- * headers/argp.h: New file
- * headers/fnmatch.h: New file
- * headers/.cvsignore: New file
-
-2004-03-02 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * src/util.c (copy_files_disk_to_disk): Bugfix. If a file
- grew n bytes in copy-pass mode, these n bytes got prepended
- to the contents of all subsequent files. Fix provided by
- Holger Fleischmann <holger_fleischmann at mra.man.de>
- * THANKS: Added Holger Fleischmann.
-
-2004-02-27 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * src/makepath.c: Remove unneded typedefs
-
- * src/copyin.c: Remove __MSDOS__ conditionals
- * src/copyout.c: Likewise
- * src/copypass.c: Likewise
- * src/main.c: Likewise
- * src/tar.c: Likewise
- * src/util.c: Likewise
-
-2004-02-27 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- Changed from flat to deep package layout. Added the framework
- for NLS support.
-
- * .cvsignore: Updated
- * Makefile.am: Updated
- * configure.ac: Updated
- * NEWS: Updated
- * README-alpha: Updated
- * THANKS: Updated
-
- * autogen.sh: New file
-
- * alloca.c: Moved to src
- * argmatch.c: Likewise
- * bcopy.c: Likewise
- * dstring.h: Likewise
- * copyin.c: Likewise
- * copyout.c: Likewise
- * copypass.c: Likewise
- * cpio.h: Likewise
- * cpiohdr.h: Likewise
- * defer.c: Likewise
- * defer.h: Likewise
- * dirname.c: Likewise
- * dstring.c: Likewise
- * dstring.h: Likewise
- * error.c: Likewise
- * extern.h: Likewise
- * filemode.c: Likewise
- * filetypes.h: Likewise
- * fnmatch.c: Likewise
- * fnmatch.h: Likewise
- * getopt.c: Likewise
- * getopt.h: Likewise
- * getopt1.c: Likewise
- * global.c: Likewise
- * idcache.c: Likewise
- * main.c: Likewise
- * makepath.c: Likewise
- * mkdir.c: Likewise
- * mt.c: Likewise
- * rmt.c: Likewise
- * rmt.h: Likewise
- * rtapelib.c: Likewise
- * safe-stat.h: Likewise
- * strdup.c: Likewise
- * strerror.c: Likewise
- * stripslash.c: Likewise
- * system.h: Likewise
- * tar.c: Likewise
- * tar.h: Likewise
- * tarhdr.h: Likewise
- * userspec.c: Likewise
- * util.c: Likewise
- * xmalloc.c: Likewise
- * xstrdup.c: Likewise
-
- * cpio.1: Moved to doc
- * cpio.texi: Likewise
- * mt.1: Likewise
-
- * src: New directory
- * src/.cvsignore: New file
- * src/Makefile.am: Likewise
- * src/alloca.c: Likewise
- * src/argmatch.c: Likewise
- * src/bcopy.c: Likewise
- * src/copyin.c: Likewise
- * src/copyout.c: Likewise
- * src/copypass.c: Likewise
- * src/cpio.h: Likewise
- * src/cpiohdr.h: Likewise
- * src/defer.c: Likewise
- * src/defer.h: Likewise
- * src/dirname.c: Likewise
- * src/dstring.c: Likewise
- * src/dstring.h: Likewise
- * src/error.c: Likewise
- * src/extern.h: Likewise
- * src/filemode.c: Likewise
- * src/filetypes.h: Likewise
- * src/fnmatch.c: Likewise
- * src/fnmatch.h: Likewise
- * src/getopt.c: Likewise
- * src/getopt.h: Likewise
- * src/getopt1.c: Likewise
- * src/gettext.h: Likewise
- * src/global.c: Likewise
- * src/idcache.c: Likewise
- * src/main.c: Likewise
- * src/makepath.c: Likewise
- * src/mkdir.c: Likewise
- * src/mt.c: Likewise
- * src/rmt.c: Likewise
- * src/rmt.h: Likewise
- * src/rtapelib.c: Likewise
- * src/safe-stat.h: Likewise
- * src/strdup.c: Likewise
- * src/strerror.c: Likewise
- * src/stripslash.c: Likewise
- * src/system.h: Likewise
- * src/tar.c: Likewise
- * src/tar.h: Likewise
- * src/tarhdr.h: Likewise
- * src/userspec.c: Likewise
- * src/util.c: Likewise
- * src/xmalloc.c: Likewise
- * src/xstrdup.c: Likewise
-
- * doc: New directory
- * doc/.cvsignore: New file
- * doc/Makefile.am: New file
- * doc/cpio.1: New file
- * doc/cpio.info: New file
- * doc/cpio.texi: New file
- * doc/mt.1: New file
-
- * po: New directory
- * po/.cvsignore: New file
- * po/LINGUAS: New file
- * po/Makevars: New file
- * po/POTFILES.in: New file
-
-2003-11-28 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * configure.ac: Added various checks
- * Makefile.am (rmt_LDADD): Added.
- * error.c: Updated
- * rmt.c: Removed useless private_errstring
- * system.h: Updated
- * userspec.c: Changed the way of handling declared vs. undeclared
- system calls.
- * strerror.c: New file. Borrowed from GNU Radius.
-
- * copyin.c: Removed kludgy declaration of delayed_seek_count.
- * copypass.c: Likewise
- * extern.h: Declare delayed_seek_count.
- * mkdir.c: Fixed handling of undeclared errno
- * mt.c: Likewise
- * util.c: Likewise
- * rtapelib.c: Likewise
-
-2003-11-28 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * TODO: New file
-
- * README-alpha: New file
- * Makefile.am: Require at least version 1.7.1
- * configure.ac: Check for locale.h
- * main.c (main): Call setlocale. Thanks
- Mitsuru Chinen <mchinen at yamato.ibm.com> for the patch.
- * THANKS: Updated
-
-2003-11-21 Sergey Poznyakoff <gray at Mirddin.farlep.net>
-
- * configure.ac: Added to the repository
- * Makefile.am: Likewise
- * NEWS: Likewise
- * README: Likewise
- * AUTHORS: Likewise
- * .cvsignore: Likewise
-
- * configure.in: Removed
- * Makefile.in: Removed
- * makefile.pc: Removed
- * configure: Removed
-
- * alloca.c: Added to the repository
- * argmatch.c: Likewise
- * bcopy.c: Likewise
- * cpio.h: Likewise
- * cpiohdr.h: Likewise
- * defer.c: Likewise
- * defer.h: Likewise
- * dirname.c: Likewise
- * dstring.c: Likewise
- * dstring.h: Likewise
- * error.c: Likewise
- * filemode.c: Likewise
- * filetypes.h: Likewise
- * fnmatch.c: Likewise
- * fnmatch.h: Likewise
- * getopt.c: Likewise
- * getopt.h: Likewise
- * getopt1.c: Likewise
- * idcache.c: Likewise
- * mkdir.c: Likewise
- * rmt.h: Likewise
- * rtapelib.c: Likewise
- * safe-stat.h: Likewise
- * strdup.c: Likewise
- * stripslash.c: Likewise
- * tar.c: Likewise
- * tar.h: Likewise
- * tarhdr.h: Likewise
- * xmalloc.c: Likewise
- * xstrdup.c: Likewise
-
- * makepath.c: Updated
- * mt.c: Likewise.
- * rmt.c: Likewise.
- * util.c: Likewise.
- * copyin.c: Likewise.
- * copyout.c: Likewise.
- * copypass.c: Likewise.
- * global.c: Likewise.
- * main.c: Likewise.
-
-Thu Jun 13 20:14:48 2002 John Oleynick (juo at gnu.org)
- * copyin.c: Strip leading / on absolute filenames after
- comparing to the list of files specified on the command line
- (instead of before). Problem reported by Jeff Holt.
- * Version 2.5 released.
-
-Thu Jun 13 00:20:30 2002 John Oleynick (juo at gnu.org)
- * Makefile.in: Fixed problem of looking in srcdir for info files.
- Bug reported by Mike Castle.
- * cpio.texi: Fixed typo. Problem reported by Fabrice Bauzac.
-
-Sun Jan 13 18:45:02 2002 John Oleynick (juo at gnu.org)
- * copyin.c: Fixed a problem skipping files with multiple links
- in a newc or CRC format archive. If the file with the shared copy
- of the data was skipped, but other links were not skipped, the
- other links were created as empty files. Bug reported by
- Hendrik-Jan Thomassen.
-
-Thu Dec 6 20:05:10 2001 John Oleynick (juo at gnu.org)
- * mt.c, mt.1: Merged Debian --rsh-command option and -V fix.
- * copyout.c, copypass.c, util.c, extern.h: Modified to warn
- if a file grows or its mtime is changed while it is being
- copied.
-
-Wed Dec 6 00:02:04 2001 John Oleynick (juo at gnu.org)
- * Many files: Updated FSF's address in copyright notices.
-
-Wed Aug 29 23:57:05 2001 John Oleynick (juo at gnu.org)
- * Many files: Numerous fixes from Debian, Red Hat and SuSE
- GNU/Linux distributions.
-
-Tue Jan 16 19:03:05 1996 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * util.c: An I/O error reading a file would cause the last byte
- of the next file to be corrupted in the archive. Thanks to a
- buggy NT NFS server for pointing out this problem.
- * Version 2.4.2 released.
-
-Tue Jan 9 23:19:37 1996 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * copyout.c: missed 1 part of last bug fix.
-
-Mon Jan 8 16:49:01 1996 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * copyout.c, copypass.c: Use result of readlink() as length
- of link name instead of size from lstat(). On some OS's lstat()
- doesn't return the true length in size. Bug reported by
- Robert Joop (rj at rainbow.IN-berlin.DE).
-
-Wed Dec 20 10:52:56 1995 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * rmt.c: Added temporary kludge so make rmt will work on Linux.
- * configure.in: Only define HAVE_UTIME_H if utime.h declares
- struct utimbuf.
- * Makefile.in: Change prefix, exec_prefix and bindir to get their
- values from configure. Added cpio.info to DISTFILES.
- * cpio.texi: Added INFO-DIR-ENTRY.
- * Version 2.4.1 released.
-
-Wed Nov 22 19:37:05 1995 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * cpio.texi: Updated release date and FSF's address.
- * NEWS: Listed major new features for 2.4.
- * mt.c, mt.1: Added seek and fsfm commands.
- * Version 2.4 released.
-
-Tue Jun 27 19:14:27 1995 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * configure.in: fixed for new autoconf. Added check to make
- sure fnmatch() works.
- * Makefile.in: changed realclean to maintainer-clean. Added
- support to handle fnmatch separate from other LIBOBJS.
- * cpio.texi: More changes for 2.4.
-
-Wed Dec 14 16:14:27 1994 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * copypass.h: When given the -a option, set the access time of
- the copy to be the access time of the original (instead of the
- modification time of the original). Reported by
- karney at pppl.gov (Charles Karney).
- * cpio.texi: Updated with changes for 2.4.
-
-Wed Nov 3 18:18:07 1994 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * safe-stat.h, Makefile.in: New file used by mkdir.c. This will go
- away when we get the real safe-xstat.[ch]in for mkdir.c.
- * main.c: Don't mention [--null] twice in -p's usage message.
- Changed --no-absolute-paths to --no-absolute-filenames.
- * cpio.1: Updated man page with new features.
- * cpio.texi, texinfo.tex, Makefile.in: Added texi documentation
- from Robert Carleton (rbc at gnu.ai.mit.edu).
-
-Mon Oct 3 00:46:30 1994 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * makefile.pc, system.h: Changes to compile with Borland C++ 4.0.
-
-Thu Sep 29 22:15:50 1994 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * makepath.c: Don't #define index if it is already #defined.
-
- * mt.c: Check for __hpux defined instead of __hpux__. Reported
- by ericb at lsid.hp.com (Eric Backus).
-
-Thu Sep 29 11:21:31 1994 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * extern.h, util.c, copyout.c, copypass.c, main.c, global.c:
- Never mind --ignore-disk-input-errors flag, we'll just always
- do that, like tar.
-
- * global.c, extern.h, main.c, copyin.c, copyout.c, copypass.c:
- Added --quiet flag to supress printing number of blocks copied.
-
- * global.c, extern.h: If compiled with gcc, make input_bytes
- and output_bytes `long long' instead of `long'. We need more
- than 32 bits to keep track of the number of bytes copied to
- and from tape drives that hold more than 4Gbytes.
-
- * util.c, copyin.c, main.c, global.c, extern.h: Added
- --only-verify-crc flag to read a CRC format archive and verify
- its contents' CRCs.
-
- * copyout.c: Fixed problem with creating oldc format archives
- on machines with 16 bit ints. Reported by mpoole at cix.compulink.co.uk
- (Martin Poole).
-
- * mt.c: Need to open tape WR_ONLY for erase command (and probably
- others?). Reported by robert at hst.e.technik.uni-kl.de (Robert
- Vogelgesan). Accept `eject' as a synonym for `offline'. Accept
- `-t' as a synonym for `-f' (to be compatible with HPUX mt, which
- only accepts `-t').
-
-Wed Sep 28 12:01:55 1994 John Oleynick (juo at wombat.gnu.ai.mit.edu)
- * extern.h, global.c, main.c, util.c: only write sparse files
- when given --sparse flag.
- * extern.h, util.c, copyout.c, copypass.c, main.c, global.c:
- Added support for --ignore-disk-input-errors flag.
-
-Wed Aug 24 12:55:38 1994 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
-
- * configure.in: Replace calls to AC_REMOTE_TAPE and AC_RSH
- with equivalent code, since those macros are going away.
-
-Sun Feb 13 00:56:48 1994 John Oleynick (juo at goldman.gnu.ai.mit.edu)
- * extern.h, global.c, main.c, util.c: Added code to
- tape_buffered_peek() to properly handle large, corrutped
- archives, without overrunning the allocated buffer and
- dumping core. Also changed the way the input and output
- buffers are allocated in initialize_buffers().
-
-Tue Jan 25 01:04:32 1994 John Oleynick (juo at goldman.gnu.ai.mit.edu)
- * copyin.c, copyout.c, copypass.c, extern.h, main.c, tar.c, util.c:
- Redid i/o buffer code. Previously, the same routines buffered input and
- output for accessing the archive and the filesystem. Now there are
- separate routines for buffering input and output and for buffering the
- archive and the filesystem. This simplifies much of the buffer code
- (e.g., only input from the archive has to check for end of tape and
- allow the tape to be changed, only output to the filesystem has to
- handle byte and word swapping, etc.; previously one routine had to
- handle all of these special cases) This is how the routines got split
- and renamed (old name -> new name):
-
- clear_rest_of_block -> tape_clear_rest_of_block
- copy_files -> copy_files_tape_to_disk
- " -> copy_files_disk_to_disk
- " -> copy_files_disk_to_tape
- copy_buf_out -> disk_buffered_write
- " -> tape_buffered_write
- copy_in_buf -> tape_buffered_read
- empty_output_buffer -> tape_empty_output_buffer
- " -> disk_empty_output_buffer
- fill_input_buffer -> tape_fill_input_buffer
- " -> disk_fill_input_buffer
- pad_output -> tape_pad_output
- peek_in_buf -> tape_buffered_peek
- skip_padding -> tape_skip_padding
- toss_input -> tape_toss_input
-
- * extern.h, global.c, main.c, util.c: Added support for
- writing sparse files.
-
-Tue Dec 28 23:01:36 1993 John Oleynick (juo at goldman.gnu.ai.mit.edu)
- * util.c, system.h, makepath.c, extern.h: don't define chown()
- and don't typedef uid_t and gid_t if we are being compiled
- by DJGPP.
-
- * copyin.c, extern.h, global.c, main.c: Added support for
- --rename-batch-file.
-
- * copyin.c, copyout.c, extern.h: Cleaned up to pass gcc -Wall.
-
-Wed Dec 22 02:17:44 1993 John Oleynick (juo at goldman.gnu.ai.mit.edu)
-
- * makepath.c, copypass.c, copyin.c: If cpio was creating a
- directory that contained `.' in the pathname (e.g. `foo/./bar'),
- it would complain that it could not create `.', since it already
- exists. From schwab at issan.informatik.uni-dortmund.de (Andreas
- Schwab).
-
- * mt.c: Added "eject" as a synonym for "offline".
-
- * util.c: Slight modification to when we lseek with
- BROKEN_LONG_TAPE_DRIVER (do it every 1Gb, instead
- of every 2Gb).
-
- * copyin.c, global.c, extern.h: Added --no-absolute-paths option,
- to ignore absolute paths in archives.
-
-Tue Dec 21 01:30:59 1993 John Oleynick (juo at goldman.gnu.ai.mit.edu)
-
- * util.c: Fix for copying new_media_message_after_number. From
- Christian.Kuehnke at arbi.informatik.uni-oldenburg.de (Christian
- Kuehnke).
-
-Thu Jul 29 20:35:57 1993 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * Makefile.in (config.status): Run config.status --recheck, not
- configure, to get the right args passed.
-
-Mon Jul 19 23:01:00 1993 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
-
- * Makefile.in (libdir): Use standard GNU value --
- $(exec_prefix)/lib, not /etc.
- (.c.o): Put CFLAGS last.
-
-Thu Jul 8 19:43:39 1993 David J. MacKenzie (djm at goldman.gnu.ai.mit.edu)
-
- * Makefile.in: Add rules for remaking Makefile, configure,
- config.status.
-
-Mon Jul 5 14:54:08 1993 John Oleynick (juo at spiff.gnu.ai.mit.edu)
-
- * cpio.1: Updated man page for 2.3.
- * Makefile.in: Create distribution with .gz extension, instead of .z.
-
-Tue Jun 29 18:54:37 1993 John Oleynick (juo at goldman.gnu.ai.mit.edu)
-
- * Makefile.in: Added installdirs target (using mkinstalldirs).
- * Added mkinstalldirs script.
- * main.c, mt.c: Added --help option. Changed usage() to
- take a stream and exit value (so --help can print on stdout
- and return a 0 exit status).
- * extern.h: Removed usage()'s prototype (it was out of date,
- and only used in main.c).
-
-Thu May 6 00:22:22 1993 John Oleynick (juo at hal.gnu.ai.mit.edu)
-
- * cpio.1: Added hpbin and hpodc.
-
-Tue May 4 00:32:29 1993 John Oleynick (juo at hal.gnu.ai.mit.edu)
-
- * copyin.c (process_copy_in), copypass.c (process_copy_pass): When
- deleting an existing file, if the file is a directory, use rmdir()
- instead of unlink().
-
-Thu Apr 29 14:43:56 1993 John Oleynick (juo at goldman.gnu.ai.mit.edu)
-
- * tar.c (read_in_tar_header): Clear non-protection bits from
- mode, in case tar has left some device bits in there.
-
-Wed Apr 28 10:36:53 1993 John Oleynick (juo at goldman.gnu.ai.mit.edu)
-
- * util.c: Added code to try and work around broken tape drivers
- that have problems with tapes > 2Gb.
-
- * copyout.c (process_copy_out): Pass file_hdr to
- writeout_other_defers() and add_link_defer() by reference,
- not by value.
-
- * copyin.c (process_copy_in): Pass file_hdr to defer_copyin()
- and create_defered_links() by reference, not by value.
-
- * defer.c: include <sys/types.h> (to build on BSD 4.3 on HP300)
-
-Fri Apr 16 18:01:17 1993 John Oleynick (juo at goldman.gnu.ai.mit.edu)
-
- * mt.c, util.c: Include <sys/mtio.h> if HAVE_SYS_MTIO_H is
- defined, not HAVE_MTIO_H.
-
-Wed Apr 14 17:37:46 1993 John Oleynick (juo at goldman.gnu.ai.mit.edu)
-
- * util.c: Include <sys/io/trioctl.h> if HAVE_SYS_IO_TRIOCTL_H
- is defined.
-
- * mt.c: Only include <sys/mtio.h> if HAVE_SYS_MTIO_H is defined.
-
-Fri Apr 2 13:09:11 1993 John Oleynick (juo at goldman.gnu.ai.mit.edu)
-
- * configure.in: Added fnmatch to AC_REPLACE_FUNCS. Added
- sys/io/trioctl.h to AC_HAVE_HEADERS.
-
- * Makefile.in: Removed fnmatch.o from OBJS.
-
- * copyin.c: Only include "fnmatch.h" if FNM_PATHNAME isn't
- defined yet.
-
- * mt.c: Include <sys/io/trioctl.h> if HAVE_SYS_IO_TRIOCTL_H is
- defined.
-
-Mon Mar 29 17:04:06 1993 John Oleynick (juo at hal.gnu.ai.mit.edu)
-
- * Many changes for supporting HPUX Context Dependent Files;
- also some bug fixes to fix problems with multiply (hard) linked
- device files; minor changes to support HPUX format archives
- (slightly broken?) System V.4 posix tar archives and HPUX
- posix tar archives.
-
- * Makefile.in: New files defer.o, defer,c and defer.h; added
- -DSYMLINK_USES_UMASK and -DHPUX_CDF comments; changed dist rule
- to use gzip with tar, instead of compress.
-
- * copyin.c: changes for new arf_hpbinary and arf_hpascii formats;
- HPUX CDF's; DEBUG_CPIO; fixes to properly handle multiple
- links in newc and crc format archives (new routines defer_copyin(),
- create_defered_links(), create_final_defers()); move most
- multiple (hard) link code to new routines link_name() and
- link_to_maj_min_ino(); use new macro UMASKED_SYMLINK instead of
- symlink().
-
- * copyout.c: fixes to properly handle multiple links in newc
- and crc format archives (new routines last_link(),
- count_defered_links_to_dev_ino(), add_link_defer(),
- writeout_other_defers(), writeout_final_defers(),
- writeout_defered_file()); support for new arf_hpbinary and
- arf_hpascii formats; support for HPUX CDF's.
-
- * copypass.c: move most multiple link code to new routines
- link_name() and link_to_maj_min_ino(); use new macro UMASKED_SYMLINK
- instead of symlink(); support for HPUX CDF's.
-
- * extern.h: added arf_hpascii and arf_hpbinary archive enum types;
- added debug_flag.
-
- * global.c: added debug_flag.
-
- * main.c: added debug_flag; support for hpodc and hpbin formats.
-
- * makepath.c: split from standard makpath.c to add support
- for HPUX CDF's.
-
- * mt.c: added !defined(__osf__) (from Andrew Marquis
- <amarquis at genome.wi.mit.edu>).
-
- * system.h: new macro UMASKED_SYMLINK
-
- * tar.c: minor changes to read (slightly broken?) System V.4 posix
- tar archives and HPUX posix tar archives.
-
- * util.c: HPUX CDF support (including new routines
- add_cdf_double_slashes() and islasparentcdf()); new routine
- umasked_symlink().
-
-Sun Mar 14 23:00:14 1993 Jim Meyering (meyering at comco.com)
-
- * copypass.c (process_copy_pass): Use <=, not just <, when comparing
- mtimes. From Pieter Bowman <bowman at math.utah.edu>.
-
-Fri Jan 15 14:35:37 1993 David J. MacKenzie (djm at kropotkin.gnu.ai.mit.edu)
-
- * copyin.c: Move include of fnmatch.h to get right FNM* macros.
-
-Tue Nov 24 08:45:32 1992 David J. MacKenzie (djm at goldman.gnu.ai.mit.edu)
-
- * Version 2.2.
-
- * copyout.c (process_copy_out): Add parens for gcc -Wall.
- From Jim Meyering.
-
- * system.h: Use HAVE_FCNTL_H, not USG.
-
- * dstring.c, mt.c, system.h: Use HAVE_STRING_H, not USG.
-
-Fri Nov 20 22:47:18 1992 David J. MacKenzie (djm at goldman.gnu.ai.mit.edu)
-
- * copyin.c (read_in_binary): Copy the dev and ino that are
- already in `file_hdr' into `short_hdr'.
- From dao at abars.att.com (David A Oshinsky).
-
- * system.h [!_POSIX_VERSION]: Declare lseek as off_t, not long.
- From Karl Berry.
-
-Wed Oct 14 13:53:41 1992 David J. MacKenzie (djm at goldman.gnu.ai.mit.edu)
-
- * Version 2.1.
-
-Tue Oct 13 22:51:34 1992 David J. MacKenzie (djm at goldman.gnu.ai.mit.edu)
-
- * main.c: Add --swap equivalent to -b.
-
- * mt.c: Add f_force_local variable and -V --version option.
-
-Fri Oct 2 18:42:27 1992 David J. MacKenzie (djm at kropotkin.gnu.ai.mit.edu)
-
- * main.c (long_opts, usage): Add --force-local option.
-
-Thu Oct 1 23:23:43 1992 David J. MacKenzie (djm at goldman.gnu.ai.mit.edu)
-
- * main.c (process_args) [__MSDOS__]: Don't call geteuid.
-
- * copyin.c (read_in_{old,new}_ascii): Use `l' for sscanf into longs.
- * copyout.c (write_out_header): Ditto for sprintf.
- * global.c, extern.h: Make input_size and output_size long.
-
-Thu Sep 10 23:39:30 1992 David J. MacKenzie (djm at nutrimat.gnu.ai.mit.edu)
-
- * global.c, extern.h: Add new var f_force_local to work with
- rmt.h change from tar.
-
-Sun Aug 23 00:18:20 1992 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
-
- * Version 2.0.
-
- * tar.c (otoa): Compute value in an unsigned long, not an int.
- * copyout.c (write_out_header) [__MSDOS__]: Don't use dev_t.
-
- * main.c (process_args): By default, don't chown for non-root users.
-
-Sat Aug 22 14:17:54 1992 David J. MacKenzie (djm at nutrimat.gnu.ai.mit.edu)
-
- * global.c, extern.h: Use uid_t and gid_t.
-
- * main.c (main) [__EMX__]: Expand wildcards.
- * system.h [__EMX__]: Alias some error names. From Kai Uwe Rommel.
-
- * extern.h [__STDC__]: Use prototypes.
-
- * copyin.c (process_copy_in), copyout.c (process_copy_out),
- copypass.c (process_copy_pass): Open all files with O_BINARY.
- Add cast to chmod call.
- * util.c: Add cast to bcopy calls. Make hash_insert static.
- From Kai Uwe Rommel.
-
-Thu Aug 20 22:03:49 1992 David J. MacKenzie (djm at nutrimat.gnu.ai.mit.edu)
-
- * util.c (peek_in_buf): Don't print "end of file" before
- getting the next reel of medium.
-
- * copyin.c (read_in_old_ascii): Allocate space for NUL terminator.
- Print newline for dot line when done, even if appending.
-
-Thu Jul 23 16:34:53 1992 David J. MacKenzie (djm at nutrimat.gnu.ai.mit.edu)
-
- * tar.c (write_out_tar_header, read_in_tar_header)
- [__MSDOS__]: Don't try to get user and group names.
- * extern.h: Don't declare the functions to do it (need uid_t).
-
- * main.c [__MSDOS__]: Ignore the -R option.
-
- * system.h: Define makedev if defining major and minor.
-
- * copyin.c, copyout.c [__MSDOS__]: setmode on archive_des, not
- 0 and 1.
-
-Sat Jul 18 14:30:55 1992 David J. MacKenzie (djm at nutrimat.gnu.ai.mit.edu)
-
- * tar.c, stripslash.c, userspec.c, cpiohdr.h, tar.h, tarhdr.h,
- system.h: New files.
- * Move portability stuff from various files to system.h.
- * cpio.h: Rename header structure and members, and add
- new structure for SVR4 format.
- * copyin.c, copyout.c: Use the new structure internally, the
- old one only for I/O in the old formats.
- * copyin.c (read_in_header): Recognize the new archive formats.
- (read_in_new_ascii, read_pattern_file, skip_padding): New functions.
- (swab_array): Do the swapping using char pointers instead of
- bitwise arithmetic.
- (process_copy_in): Handle byte and halfword swapping and new formats.
- Ok if a directory we want to make already exists, but set its perms.
- Do chmod after chown to fix any set[ug]id bits.
- Use `struct utimbuf' instead of a long array.
- * copyout.c (write_out_header): Handle new formats.
- (process_copy_out): Use `struct utimbuf'.
- Handle appending and new formats.
- Remove any leading `./' from filenames.
- (read_for_checksum, clear_rest_of_block, pad_output): New functions.
- * copypass.c (process_copy_pass): Use `struct utimbuf'.
- Ok if a directory we want to make already exists, but set its perms.
- Do chmod after chown to fix any set[ug]id bits.
- Don't change perms of `.'.
- * extern.h, global.c: Replace the separate format flags with
- one variable. Add new variables for the new options.
- * main.c: Add new options -A --append, -H --format, -C --io-size,
- -M --message, --no-preserve-owner, -R --owner, -E --pattern-file,
- -V --dot, -s --swap-bytes, -S --swap-halfwords, -b, -I, -k, -O.
- (usage): Document them.
- (process_args): Recognize them. Use open_archive.
- (initialize_buffers): Allow room for tar archives and double buffers.
- * util.c (empty_output_buffer_swap): New function.
- (empty_output_buffer): Call it if swapping current file.
- Check additional end of media indicators.
- (swahw_array, peek_in_buf, prepare_append, open_archive,
- set_new_media_message): New functions.
- (fill_input_buffer): Don't print error message if end of media.
- (toss_input): Don't seek, always read.
- (copy_files): Update crc if needed.
- (find_inode_file, add_inode): Check major and minor numbers as
- well as dev.
- (get_next_reel): Prompt user if archive name is unknown.
- Print fancy messages.
- Close the archive and reopen it.
-
- Above primarily from John Oleynick <juo at klinzhai.rutgers.edu>.
-
- * util.c (find_inode_file): Use modulus when computing initial
- loop index.
- (add_inode): Zero out new entry.
- From scott at sctc.com (Scott Hammond).
-
- * cpio.h, copyin.c, copyout.c: Rename `struct cpio_header'
- members from h_foo to c_foo.
-
-Wed May 20 00:09:26 1992 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
-
- * copyin.c: If we include a header file specifically to get
- major et al., assume we have them.
-
-Mon Mar 9 19:29:20 1992 David J. MacKenzie (djm at nutrimat.gnu.ai.mit.edu)
-
- * mt.c (main): rmtclose the tape file descriptor.
-
- * main.c (main): rmtclose the archive, if not in copy-pass mode.
-
- * util.c (create_all_directories): Don't print a message when
- creating a directory, for UNIX compat.
-
- * copyin.c (process_copy_in), copypass.c (process_copy_pass):
- Skip file if it has the same timestamp as existing file, not just
- if it is older than existing file, for UNIX compat.
-
-Tue Mar 3 12:06:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * main.c, mt.c (usage): Document long options as starting with
- -- instead of +.
-
- * extern.h: Only declare lseek if not _POSIX_VERSION.
-
-Tue Dec 24 00:19:45 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * copyin.c: Use MAJOR_IN_MKDEV and MAJOR_IN_SYSMACROS instead
- of USG and _POSIX_VERSION to find major and minor macros.
-
- * mt.c: Use unistd.h and stdlib.h if available.
-
- * copyin.c, copyout.c, copypass.c, util.c, extern.h: Change
- POSIX ifdefs to HAVE_UNISTD_H and _POSIX_VERSION.
-
-Sun Aug 25 06:31:08 1991 David J. MacKenzie (djm at apple-gunkies)
-
- * Version 1.5.
-
- * bcopy.c: New file (moved from util.c).
-
- * mt.c (print_status): Not all hpux machines have mt_fileno
- and mt_blkno; rather than trying to track HP's product line,
- just assume none of them have them.
-
- * util.c (copy_buf_out, copy_in_buf): Use more efficient
- copying technique for a big speedup.
-
-Fri Aug 2 04:06:45 1991 David J. MacKenzie (djm at apple-gunkies)
-
- * configure: Support +srcdir. Create config.status.
- Remove it and Makefile if interrupted while creating them.
-
-Thu Jul 18 09:43:40 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * Many files: use __MSDOS__ instead of MSDOS.
-
- * util.c, configure: Use NO_MTIO instead of HAVE_MTIO, to keep
- up with tar and rtapelib.c.
-
-Mon Jul 15 13:45:30 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * configure: Also look in sys/signal.h for signal decl.
-
-Thu Jul 11 01:50:32 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * Version 1.4.
-
- * configure: Remove /etc and /usr/etc from PATH to avoid
- finding /etc/install.
-
-Wed Jul 10 01:40:07 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * makefile.pc: Rewrite for Turbo C 2.0.
- * util.c [__TURBOC__] (utime): New function.
- * alloca.c, tcexparg.c: New files.
-
- * extern.h [STDC_HEADERS]: Don't declare malloc and realloc.
-
- * main.c [MSDOS]: Make binary mode the default.
- * copyin.c, copyout.c: Make stdin or stdout binary mode as
- appropriate (so cpio archives don't get corrupted).
-
- * Many files: Use <string.h> if STDC_HEADERS as well as if USG.
-
- * configure, Makefile.in: $(INSTALLPROG) -> $(INSTALL),
- $(INSTALLTEXT) -> $(INSTALLDATA).
-
-Mon Jul 8 23:18:28 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * configure: For some library functions that might be missing,
- conditionally add the .o files to Makefile instead of
- defining func_MISSING.
- * mkdir.c: Renamed from mkrmdir.c.
-
-Sat Jul 6 02:27:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
-
- * configure: echo messages to stdout, not stderr.
- Use a test program to see if alloca needs -lPW.
-
-Thu Jun 27 16:15:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
-
- * copyin.c (process_copy_in), copyout.c (process_copy_out),
- copypass.c (process_copy_pass): Check close return value for
- delayed error notification because of NFS.
-
-Thu Jun 20 02:43:33 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
-
- * configure: Include $DEFS when compiling test programs.
-
- * util.c: Only declare getpwuid and getgrgid if not POSIX.
-
- * Version 1.3.
-
- * copyin.c: Use time_t, not long, for time values.
-
- * mt.c (print_status): Special cases for HP-UX and Ultrix.
-
- * util.c: Compile bcopy if USG or STDC_HEADERS, not BCOPY_MISSING.
-
-Tue Jun 11 16:40:02 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
-
- * copyin.c: Don't include sys/sysmacros.h if _POSIX_SOURCE.
-
- * copyin.c, copyout.c, copypass.c: Don't include sys/file.h if POSIX.
-
- * util.c: Include sys/types.h before, not after, pwd.h and grp.h.
-
- * configure: New shell script to aid configuration and create
- Makefile from Makefile.in.
-
- * copyin.c (process_copy_in): Use POSIX.2 fnmatch instead of
- glob_match.
-
-Mon Jun 10 22:11:19 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
-
- * global.c, extern.h: New variable, name_end.
- * main.c (process_args, usage): Add -0 +null option to set it.
- * copypass.c (process_copy_pass), copyout.c (process_copy_out):
- Use it.
-
- * dstring.c (ds_fgetstr): New function made from ds_fgets.
- (ds_fgets, ds_fgetname): Implement as front ends to ds_fgetstr.
-
-Sun Jun 2 15:45:24 1991 David J. MacKenzie (djm at wheat-chex)
-
- * most files: use GPL version 2.
-
-Sat May 18 11:39:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
-
- * copyin.c, copypass.c: Take out #ifdef MSDOS around chown.
- * util.c [MSDOS]: Provide dummy chown.
-
-Fri May 17 21:29:05 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu)
-
- * Version 1.2.
-
- * makefile.pc, cpio.cs: Update for new source and object files.
-
-Fri Mar 15 05:48:36 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
-
- * global.c, extern.h: New variable `archive_desc'.
- * main.c (process_args): Set it.
- * copyout.c (process_copy_out), copyin.c (process_copy_in):
- Use it.
-
- * copyout.c (process_copy_out), copyin.c (process_copy_in):
- Remote tapes are special and not seekable; don't fstat them.
-
- * main.c (main, usage): Add -F, +file option. Use rmtopen.
- (main): Exit after printing version number.
- * util.c (empty_output_buffer): Use rmtwrite instead of write.
- (fill_input_buffer): Use rmtread instead of read.
- (tape_offline): Use rmtioctl instead of ioctl.
- Test HAVE_MTIO instead of MTIO_MISSING, for tar compatibility.
-
-Thu Mar 14 17:49:57 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
-
- * util.c (create_all_directories): Use make_path to do the work.
-
-Sat Jan 12 15:32:15 1991 David J. MacKenzie (djm at geech.ai.mit.edu)
-
- * copyin.c, copyout.c, copypass.c, util.c: Only declare
- `errno' if not MSDOS. Some Unix errno.h do, some don't . . . .
-
- * global.c, extern.h: Make `input_size' and `output_size'
- unsigned, for 16 bit machines.
-
- * copyin.c (print_name_with_quoting): All non-ctrl chars are
- printable on MS-DOS.
-
- * util.c (empty_output_buffer): Never make sparse files;
- can create unrunnable executables.
- * copyin.c, copyout.c, copypass.c: Callers changed.
- * util.c (finish_output_file): Function removed.
-
-Tue Nov 6 15:47:16 1990 David J. MacKenzie (djm at apple-gunkies)
-
- * copyin.c, util.c, extern.h: Rename copystring to xstrdup.
-
-Mon Oct 29 02:24:41 1990 David J. MacKenzie (djm at apple-gunkies)
-
- * util.c (empty_output_buffer): Only make sparse files if
- NO_SPARSE_FILES is undefined, to accomodate dumb kernels.
-
-Wed Jul 25 18:48:35 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
-
- * util.c (getuser, getgroup): Make uid and gid unsigned short,
- not int.
-
-Sat Jul 21 00:44:44 1990 David J. MacKenzie (djm at apple-gunkies)
-
- * copyin.c, copyout.c, copypass.c, util.c, cpio.h: Add ifdefs
- for MSDOS.
-
-Sun Jul 15 23:51:48 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
-
- * copyin.c, copyout.c, copypass.c, global.c, extern.h, util.c:
- Use longs where appropriate, for 16 bit machines.
-
-Sun Jul 8 22:58:06 1990 David J. MacKenzie (djm at apple-gunkies)
-
- * main.c (process_args, usage): Change -b option to -O (old), to
- allow adding byte swapping later.
-
-Sat Jul 7 14:48:35 1990 David J. MacKenzie (dave at edfmd)
-
- * Version 1.1.
-
- * cpio.h: Make `mtime' and `filesize' unsigned long.
- * copyin.c (read_in_binary), copyout.c (write_out_header):
- High short-word of `mtime' and `filesize' always comes first.
-
- * (read_in_ascii, read_in_binary): New functions, from code in
- read_in_header.
- (read_in_header): Search for valid magic number, then fill in
- rest of header using read_in_ascii and read_in_binary.
- * global.c, extern.h: New variable, `binary_flag'.
- * main.c (process_args): Recognize new -b +binary option.
- * util.c [BCOPY_MISSING] (bcopy): New function.
-
-Wed Jul 4 00:40:58 1990 David J. MacKenzie (djm at apple-gunkies)
-
- * main.c (process_args): Add local pointers to functions to
- work around a pcc bug found on a Convex.
-
- * copyin.c (process_copy_in), util.c (toss_input,
- create_all_directories, add_inode): Don't use `index' as a
- variable name.
-
-Tue Jul 3 02:33:36 1990 David J. MacKenzie (djm at apple-gunkies)
-
- * version 1.0.
-
-Mon Jul 2 23:18:56 1990 David J. MacKenzie (djm at twiddle)
-
- * copyin.c (process_copy_in), copyout.c (process_copy_out),
- copypass.c (process_copy_pass): Print "1 block", not "1 blocks".
-
- * copyin.c (process_copy_in), copypass.c (process_copy_pass):
- Unlink existing dest. file unless either it is newer and
- not unconditional, or it is a directory.
-
-Mon Jul 2 03:57:41 1990 David J. MacKenzie (dave at edfmd)
-
- * util.c (xrealloc): New function.
- * dstring.c (ds_resize): Use xrealloc instead of free and
- xmalloc. Never shrink the string.
-
- * copypass.c (process_copy_pass): More efficient
- string handling while constructing output filename.
-
- * global.c, extern.h, main.c, cpio.h: Change from an enum,
- `copy_command', to a pointer to a void function, `copy_function'.
-
- * cpio.h (struct cpio_header): Make most fields unsigned.
- Rename h_filesize to h_filesizes and h_mtime to h_mtimes, and
- add new `long' fields with the old names at the end of the
- structure.
- * copyin.c (read_in_header): Set the long fields from the
- short arrays, making sure longs are aligned properly.
- (process_copy_in, long_format): Use the long fields.
- * copyout.c (write_out_header): Set the short arrays from the
- long fields, making sure longs are aligned properly.
- (process_copy_out): Use the long fields.
-
- * global.c, extern.h: New variable `output_is_seekable'.
- * util.c (empty_output_buffer): If output_is_seekable, use
- lseek to write blocks of zeros.
- (finish_output_file): New function.
- * copyin.c (process_copy_in), copyout.c (process_copy_out),
- copypass.c (process_copy_pass): Set `output_is_seekable'
- correctly and call finish_output_file.
- * main.c (initialize_buffers): Allocate space for sentinel in
- `output_buffer'.
-
- * global.c, extern.h: New variable `numeric_uid'.
- * main.c (process_args): Accept -n +numeric-uid-gid option, like ls.
- * copyin.c (long_format): Use numeric_uid.
-
- * copyin.c (process_copy_in), copyout.c (process_copy_out),
- copypass.c (process_copy_pass): Don't (for verbose) print the
- names of files that are not copied because of errors. Try to
- create missing directories for all file types. Free temporary
- buffers on error.
-
-Sat Jun 30 14:28:45 1990 David J. MacKenzie (djm at apple-gunkies)
-
- * version.c: New file.
- * main.c: Add -V, +version option.
- * Makefile [dist]: Extract version number from version.c.
-
-Sat Jun 30 12:44:47 1990 David J. MacKenzie (dave at edfmd)
-
- * global.c, extern.h, copyin.c, copyout.c, util.c: Rename
- `{input,output}_is_regular' to `{input,output}_is_special' and
- reverse the truth value.
-
- * global.c, extern.h: New variable `input_is_seekable' to
- control whether to skip data with lseek or read.
- * copyin.c (process_copy_in): Set it.
- * util.c (toss_input): Use it.
-
- * global.c, extern.h: New variable `xstat' that selects stat
- or lstat for input files.
- * main.c (process_args): New option -L, +dereference to set
- xstat to stat instead of lstat.
- (usage): Document it.
- * copyout.c (process_copy_out), copypass.c
- (process_copy_pass): Use *xstat on input file.
-
-Sat Jun 30 01:53:12 1990 David J. MacKenzie (dave at edfmd)
-
- * dstring.c (ds_init): Return void because return value was
- never used.
- (ds_resize): Ditto, and free old value instead of new one.
-
- * util.c (empty_output_buffer, fill_input_buffer,
- copy_out_buf, copy_in_buf, toss_input, copy_files): Return
- void instead of an error value and make errors fatal
- immediately instead of several levels up, to prevent printing
- of multiple error messages by different levels of functions.
-
- * copyin.c (read_in_header): Return void, because the error
- handling all happens at lower levels.
- (print_name_with_quoting): New function.
- (long_format): Call print_name_with_quoting. Take additional
- arg for name of linked-to file, and print it if nonzero.
- (process_copy_in): For verbose listing of symlinks, read in
- the linkname and pass it to long_format.
-
- * extern.h: Declare some more functions.
-
-Thu Jun 28 16:07:15 1990 David J. MacKenzie (dave at edfmd)
-
- * copypass.c (process_copy_pass): Warn about unknown file types.
-
- * copyout.c (process_copy_out): Check fstat return for error.
- Record filesize of 0 for special files. Warn about unknown
- file types.
-
- * copyin.c (process_copy_in): Warn about unknown file types.
- (read_in_header): Warn about byte-reversed binary headers.
-
-Sat Jun 23 22:50:45 1990 David J. MacKenzie (dave at edfmd)
-
- * main.c (main): Set umask to 0 so permissions of created
- files are preserved.
-
- * copyin.c, copyout.c, copypass.c, util.c: Pass file
- descriptors as ints, not pointers to ints.
- Cast file timestamps and sizes to long *, not int *, for 16
- bit machines.
- Use lstat instead of stat, if available.
- Handle FIFO's, sockets, and symlinks, if supported by O.S.
-
- * copyin.c (process_copy_in), copyout.c (process_copy_out):
- Don't consider FIFO'S, sockets, etc. to be possible tape drives.
-
- * util.c (create_all_directories): Fix incorrect loop
- termination check. Only copy string if it contains slashes.
- Don't check whether directory "" exists.
- (tape_offline): Code moved from get_next_reel.
- (get_next_reel): Print message before taking tape offline.
- Read a line of arbitrary length.
-
- * copyout.c, copyin.c, copypass.c: Always use utime, not utimes.
-
- * copyin.c (swab_short): New macro.
- (swab_array): New function.
- (read_in_header): In binary mode, if a byte-swapped header is
- read, swap the bytes back.
- (process_copy_in, process_copy_pass): Don't stat each file to
- create unless !unconditional_flag. Create device files correctly.
- Don't temporarily allow files being created to be read by
- other users. Don't unnecessarily chmod special files.
-
-Thu May 31 20:51:43 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
-
- * copyin.c (long_format): Use mode_string to format
- file protections instead of doing it ourselves.
- (protections): Function removed.
-
-Sat Apr 14 02:31:01 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
-
- * cpio.h (struct cpio_header): Make inode, mode, uid, gid
- fields unsigned.
-
- * util.c (getgroup): New function.
- * copyin.c (long_format): Print group name of files.
- Print file size, etc. as unsigned integers, not signed.
-
- * main.c (process_args): If -t is given and neither -i, -o, or
- -p is given, assume -i.
-
- * Add -f, +nonmatching option.
- * main.c: Rename +out to +create, +in to +extract,
- +modification-time to +preserve-modification-time,
- +pass to +pass-through.
-
- * copyin.c (process_copy_in), copypass.c (process_copy_pass):
- Don't complain in chown fails because the user doesn't have
- permission.
-
-Fri Apr 13 13:53:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
-
- * Add ifdefs for USG/Xenix.
- * util.c (cpio_error): Function removed.
- * Use error instead of cpio_error, so system error messages
- will be included.
- * cpio.h: Rename 'hdr_struct' to 'struct cpio_header'.
- * Move definition of xmalloc from dstring.c to util.c.
- * global.c, extern.c: Add global `program_name'.
- * main.c (main): Set program_name.
- (process_args): Rename +reset-atime to +reset-access-time,
- +table to +list.
- Have +block-size take an argument.
-
-Thu Apr 12 13:33:32 1990 David J. MacKenzie (djm at rice-chex)
-
- * util.c (find_inode_file): Make inode an int, not a short.
-
- * Make functions that don't return a value have type void.
- Add some casts to function calls.
-
-Wed Apr 11 14:55:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
-
- * main.c (process_args): -i, -o, and -p don't take arguments.
-
- * main.c (process_args): Get the non-option args from the
- correct elements of argv.
-
-Tue Apr 10 00:20:26 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
-
- * Indent source code and update copyrights.
-
- * cpio.c (usage): Change `collection' to `archive' in message.
-
-Thu Dec 28 03:03:55 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
-
- * dstring.c (xmalloc): Don't return a null pointer if size is 0,
- on the assumption that trying to allocate 0 bytes is a bug that
- should be trapped.
-
-Wed Dec 20 03:24:48 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
-
- * All files: Change from GNU CPIO General Public License to
- GNU General Public License.
-
-Mon Dec 18 13:18:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
-
- * Makefile: Add clean target and defines for CC and LDFLAGS.
- Add dist target and SRCS, DISTFILES macros. Add tags and TAGS targets.
- * dstring.c (ds_fgets): Read characters into an int, not char.
- (xmalloc): New function.
- (out_of_memory): Function removed.
- Global: use xmalloc instead of malloc and out_of_memory.
- * extern.h, global.c: Make flag variables ints instead of chars for
- compatibility with getopt_long.
- * extern.h: Declare more functions.
- * main.c (usage): Put the whole usage message into a single string
- and fix errors.
- * util.c (create_all_directories): Remove unused variable.
- (get_next_reel): Ditto.
- * dstring.h: Declare function.
-
-Sat Dec 2 13:22:37 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
-
- * main.c: Change +copy-pass option to +pass, +copy-in to +in,
- +copy-out to +out, and +mkdir to +make-directories, and add null
- option to terminate table.
- (process_args): Use the same code to handle long and short named
- options.
- (usage): Mention long options in message.
-
-Local Variables:
-mode: change-log
-version-control: never
-End:
--- contrib/cpio/NEWS
+++ /dev/null
@@ -1,155 +0,0 @@
-GNU cpio NEWS -- history of user-visible changes. 2007-06-08
-Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-See the end of file for copying conditions.
-
-Please send cpio bug reports to <bug-cpio at gnu.org>.
-
-Version 2.8 - Sergey Poznyakoff, 2007-06-08
-
-* Option --owner can be used in copy-out mode, allowing to uniformly override
-ownership of the files being added to the archive.
-
-* Bugfixes:
-
-** Symlinks were handled incorrectly in copy-out mode.
-** Fix handling of large files.
-** Fix setting the file permissions in copy-out mode.
-** Fix CAN-2005-1111
-
-
-Version 2.7 - Sergey Poznyakoff, 2006-10-21
-
-* Improved error checking and diagnostics
-
-* Bugfixes
-** Fixed CAN-1999-1572
-** Allow to use --sparse in both copy-in and copy-pass.
-** Fix bug that eventually caused copying out the same hard-linked
-file several times to archive.
-** Fix several LFS-related issues.
-** Fix Debian bug 335580.
-
-
-Version 2.6 - Sergey Poznyakoff, 2004-12-20
-
-* Added NLS support
-
-* Improved configure script
-
-* Improved invocation consistency checking and help output
-
-* Printing warning about truncation of inode numbers is suppressed by
-default. See below.
-
-* New option --warning (-W) controls the level of output warnings:
-
- -Wnone Disables all warnings
- -Wtruncate Enable warning about truncation of the inode number
- -Wall Enables all warnings
-
- To disable a particular warning, prefix its name with 'no-', just
- like in gcc.
-
-* New option --to-stdout extracts files to standard output.
-
-* The output of `cpio --help' is largely improved.
-
-* Bugfixes:
-** If a file grew n bytes in copy-pass mode, these n bytes got prepended
-to the contents of all subsequent files.
-** Padding the archive with zero bytes upon truncation of the file being
-archived was broken.
-
-
-Major changes in version 2.5:
-
-* bug fixes from Debian, Red Hat, and SuSE GNU/Linux Distribution patches
-* --rsh-command option
-
-Major changes in version 2.4:
-
-* new texinfo documentation
-* --sparse option to write sparse files
-* --only-verify-crc option to verify a CRC format archive
-* --no-absolute-paths option to ignore absolute paths
-* --quiet option to supress printing number of blocks copied
-* handle disk input errors more gracefully
-
-Major changes in version 2.3:
-
-* in newc and crc format archives, only store 1 copy of multiply linked files
-* handle multiply linked devices properly
-* handle multiply linked files with cpio -pl even when the source and
- destination are on different file systems
-* support HPUX Context Dependent Files
-* read and write HPUX cpio archives
-* read System V.4 POSIX tar archives and HPUX POSIX tar archives
-* use rmdir, instead of unlink, to delete existing directories
-
-Major changes in version 2.2:
-
-* handle link counts correctly when reading binary cpio archives
-* configure checks for some libraries that SVR4 needs
-
-Major changes in version 2.1:
-
-* cpio can access remote non-device files as well as remote devices
-* fix bugs in the MS-DOS port
-* add --swap equivalent to -b option
-
-Version 2.0 adds the following features:
-
-Support for the SVR4 cpio formats, which can store inodes >65535, and
-for traditional and POSIX tar archives. Also adds these options:
-
--A --append append to instead of replacing the archive
--V --dot print a dot for each file processed
--H --format select archive format
--C --io-size select I/O block size in bytes
--M --message print a message at end of media volumes
---no-preserve-owner don't change files' owners when extracting
--R --owner set files' owners when extracting
--E --pattern-file list of shell filename patterns to process
--s --swap-bytes handle byte-order differences when extracting files
--S --swap-halfwords ditto
--b like -sS
--I input archive filename
--k recognize corrupted archives (we alawys do it, though)
--O output archive filename
-
-Some options of previous versions have been renamed in 2.0:
-
---binary was replaced by --format=bin
---portability was replaced by --format=odc
-
-Some options have changed meaning in 2.0, for SVR4 compatibility:
-
--O used to select the binary archive format, now selects the output file
--V used to print the version number, now prints a dot for each file
-
-Version 2.0 also fixes several bugs in the handling of files with
-multiple links and of multi-volume archives on floppy disks.
-
-----------------------------------------------------------------------
-Copyright information:
-
-Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-
- Permission is granted to anyone to make or distribute verbatim copies
- of this document as received, in any medium, provided that the
- copyright notice and this permission notice are preserved,
- thus giving the recipient permission to redistribute in turn.
-
- Permission is granted to distribute modified versions
- of this document, or of portions of it,
- under the above conditions, provided also that they
- carry prominent notices stating who last changed them.
-
-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:
--- contrib/cpio/stamp-h1
+++ /dev/null
@@ -1 +0,0 @@
-timestamp for config.h
--- contrib/cpio/AUTHORS
+++ /dev/null
@@ -1,6 +0,0 @@
-Authors of GNU cpio
-
-Phil Nelson <phil at cs.wwu.edu>
-David MacKenzie <djm at gnu.ai.mit.edu>
-John Oleynick <juo at klinzhai.rutgers.edu>
-Sergey Poznyakoff <gray at mirddin.farlep.net>
\ No newline at end of file
--- contrib/cpio/INSTALL
+++ /dev/null
@@ -1,234 +0,0 @@
-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.
-
--- contrib/cpio/Makefile
+++ /dev/null
@@ -1,900 +0,0 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
-# Makefile. Generated from Makefile.in by configure.
-
-# 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.
-
-
-
-# This file is part of GNU cpio
-# Copyright (C) 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; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-
-pkgdatadir = $(datadir)/cpio
-pkgincludedir = $(includedir)/cpio
-pkglibdir = $(libdir)/cpio
-pkglibexecdir = $(libexecdir)/cpio
-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 = x86_64-mbsd-freebsd6.0
-host_triplet = x86_64-mbsd-freebsd6.0
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(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/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/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/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/getcwd-abort-bug.m4 \
- $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
- $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 \
- $(top_srcdir)/m4/gnulib-common.m4 \
- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.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/longlong.m4 \
- $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbrtowc.m4 \
- $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mempcpy.m4 \
- $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mktime.m4 \
- $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.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/rmt.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/size_max.m4 \
- $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/ssize_t.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/strtol.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/time_h.m4 \
- $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/timespec.m4 \
- $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/ulonglong.m4 \
- $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/utimbuf.m4 \
- $(top_srcdir)/m4/utimens.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/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \
- $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.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
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ABSOLUTE_DIRENT_H =
-ABSOLUTE_FCNTL_H = "///usr/include/fcntl.h"
-ABSOLUTE_FLOAT_H =
-ABSOLUTE_INTTYPES_H = "///usr/include/inttypes.h"
-ABSOLUTE_STDINT_H = "///usr/include/stdint.h"
-ABSOLUTE_STDIO_H = "///usr/include/stdio.h"
-ABSOLUTE_STDLIB_H = "///usr/include/stdlib.h"
-ABSOLUTE_STRING_H = "///usr/include/string.h"
-ABSOLUTE_SYSEXITS_H = "///usr/include/sysexits.h"
-ABSOLUTE_SYS_STAT_H = "///usr/include/sys/stat.h"
-ABSOLUTE_SYS_TIME_H = "///usr/include/sys/time.h"
-ABSOLUTE_TIME_H = "///usr/include/time.h"
-ABSOLUTE_UNISTD_H = "///usr/include/unistd.h"
-ABSOLUTE_WCHAR_H =
-ABSOLUTE_WCTYPE_H = "///usr/include/wctype.h"
-ACLOCAL = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run aclocal-1.10a
-ALLOCA =
-ALLOCA_H = alloca.h
-AMTAR = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run tar
-AUTOCONF = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoheader
-AUTOM4TE = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autom4te
-AUTOMAKE = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run automake-1.10a
-AWK = nawk
-BITSIZEOF_PTRDIFF_T =
-BITSIZEOF_SIG_ATOMIC_T =
-BITSIZEOF_SIZE_T =
-BITSIZEOF_WCHAR_T =
-BITSIZEOF_WINT_T =
-CC = gcc -std=gnu99
-CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2
-CPIO_MT_PROG =
-CPP = gcc -E
-CPPFLAGS =
-CYGPATH_W = echo
-DEFAULT_RMT_COMMAND =
-DEFAULT_RMT_DIR = $(libexecdir)
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-DIRENT_H =
-ECHO_C =
-ECHO_N = -n
-ECHO_T =
-EGREP = /usr/bin/grep -E
-EOVERFLOW =
-EXEEXT =
-FCNTL_H = fcntl.h
-FLOAT_H =
-FNMATCH_H = fnmatch.h
-GETOPT_H = getopt.h
-GMSGFMT = /usr/local/bin/msgfmt
-GMSGFMT_015 = :
-GNULIB_CHOWN = 1
-GNULIB_DUP2 = 1
-GNULIB_FCHDIR = 1
-GNULIB_FFLUSH = 0
-GNULIB_FPRINTF_POSIX = 0
-GNULIB_FSEEK = 0
-GNULIB_FSEEKO = 0
-GNULIB_FTELL = 0
-GNULIB_FTELLO = 0
-GNULIB_FTRUNCATE = 0
-GNULIB_GETCWD = 1
-GNULIB_GETLOGIN_R = 0
-GNULIB_GETSUBOPT = 0
-GNULIB_IMAXABS = 0
-GNULIB_IMAXDIV = 0
-GNULIB_LSEEK = 0
-GNULIB_MBSCASECMP = 0
-GNULIB_MBSCASESTR = 0
-GNULIB_MBSCHR = 0
-GNULIB_MBSCSPN = 0
-GNULIB_MBSLEN = 0
-GNULIB_MBSNCASECMP = 0
-GNULIB_MBSPBRK = 0
-GNULIB_MBSPCASECMP = 0
-GNULIB_MBSRCHR = 0
-GNULIB_MBSSEP = 0
-GNULIB_MBSSPN = 0
-GNULIB_MBSSTR = 0
-GNULIB_MBSTOK_R = 0
-GNULIB_MEMMEM = 0
-GNULIB_MEMPCPY = 1
-GNULIB_MEMRCHR = 1
-GNULIB_MKDTEMP = 0
-GNULIB_MKSTEMP = 0
-GNULIB_PRINTF_POSIX = 0
-GNULIB_READLINK = 1
-GNULIB_SLEEP = 1
-GNULIB_SNPRINTF = 0
-GNULIB_SPRINTF_POSIX = 0
-GNULIB_STPCPY = 1
-GNULIB_STPNCPY = 0
-GNULIB_STRCASESTR = 0
-GNULIB_STRCHRNUL = 1
-GNULIB_STRDUP = 1
-GNULIB_STRNDUP = 1
-GNULIB_STRNLEN = 1
-GNULIB_STRPBRK = 0
-GNULIB_STRSEP = 0
-GNULIB_STRTOIMAX = 0
-GNULIB_STRTOK_R = 0
-GNULIB_STRTOUMAX = 0
-GNULIB_VASPRINTF = 0
-GNULIB_VFPRINTF_POSIX = 0
-GNULIB_VPRINTF_POSIX = 0
-GNULIB_VSNPRINTF = 1
-GNULIB_VSPRINTF_POSIX = 0
-GREP = /usr/bin/grep
-HAVE_DECL_GETLOGIN_R = 1
-HAVE_DECL_IMAXABS = 1
-HAVE_DECL_IMAXDIV = 1
-HAVE_DECL_MEMMEM = 1
-HAVE_DECL_MEMRCHR = 0
-HAVE_DECL_MKDIR = 1
-HAVE_DECL_SNPRINTF = 1
-HAVE_DECL_STRDUP = 1
-HAVE_DECL_STRNCASECMP = 1
-HAVE_DECL_STRNDUP = 1
-HAVE_DECL_STRNLEN = 0
-HAVE_DECL_STRTOIMAX = 1
-HAVE_DECL_STRTOK_R = 1
-HAVE_DECL_STRTOUMAX = 1
-HAVE_DECL_VSNPRINTF = 1
-HAVE_DUP2 = 1
-HAVE_FSEEKO = 1
-HAVE_FTELLO = 1
-HAVE_FTRUNCATE = 1
-HAVE_GETSUBOPT = 1
-HAVE_INTTYPES_H = 1
-HAVE_IO_H = 0
-HAVE_ISWCNTRL = 1
-HAVE_LONG_LONG_INT = 1
-HAVE_LSTAT = 1
-HAVE_MEMPCPY = 0
-HAVE_MKDTEMP = 1
-HAVE_READLINK = 1
-HAVE_SIGNED_SIG_ATOMIC_T =
-HAVE_SIGNED_WCHAR_T =
-HAVE_SIGNED_WINT_T =
-HAVE_SLEEP = 1
-HAVE_STDINT_H = 1
-HAVE_STPCPY = 1
-HAVE_STPNCPY = 1
-HAVE_STRCASECMP = 1
-HAVE_STRCASESTR = 1
-HAVE_STRCHRNUL = 0
-HAVE_STRNDUP = 1
-HAVE_STRPBRK = 1
-HAVE_STRSEP = 1
-HAVE_STRUCT_TIMEVAL = 1
-HAVE_SYSEXITS_H = 1
-HAVE_SYS_BITYPES_H =
-HAVE_SYS_INTTYPES_H =
-HAVE_SYS_TIME_H = 1
-HAVE_SYS_TYPES_H = 1
-HAVE_UNISTD_H = 1
-HAVE_UNSIGNED_LONG_LONG_INT = 1
-HAVE_VASPRINTF = 1
-HAVE_WCTYPE_H = 1
-HAVE_WINT_T = 1
-HAVE__BOOL = 1
-INSTALL = /usr/bin/install -c
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-INTLLIBS =
-INTL_MACOSX_LIBS =
-INTTYPES_H = inttypes.h
-LDFLAGS =
-LIBCPIO_LIBDEPS =
-LIBCPIO_LTLIBDEPS =
-LIBICONV = -liconv
-LIBINTL =
-LIBOBJS =
-LIBS =
-LIB_CLOCK_GETTIME =
-LIB_SETSOCKOPT =
-LTLIBICONV = -liconv
-LTLIBINTL =
-LTLIBOBJS =
-MAKEINFO = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run makeinfo
-MKDIR_P = build-aux/install-sh -c -d
-MSGFMT = /usr/local/bin/msgfmt
-MSGFMT_015 = :
-MSGMERGE = /usr/local/bin/msgmerge
-OBJEXT = o
-PACKAGE = cpio
-PACKAGE_BUGREPORT = bug-cpio at gnu.org
-PACKAGE_NAME = GNU cpio
-PACKAGE_STRING = GNU cpio 2.8
-PACKAGE_TARNAME = cpio
-PACKAGE_VERSION = 2.8
-PATH_SEPARATOR = :
-POSUB =
-PRIPTR_PREFIX = ""
-PRI_MACROS_BROKEN = 0
-PTRDIFF_T_SUFFIX =
-PU_RMT_PROG = rmt$(EXEEXT)
-RANLIB = ranlib
-REPLACE_CHOWN = 0
-REPLACE_FCHDIR = 0
-REPLACE_FFLUSH = 0
-REPLACE_FPRINTF = 0
-REPLACE_FSEEK = 0
-REPLACE_FSEEKO = 0
-REPLACE_FTELL = 0
-REPLACE_FTELLO = 0
-REPLACE_GETCWD = 1
-REPLACE_GETTIMEOFDAY = 0
-REPLACE_LOCALTIME_R = 0
-REPLACE_LSEEK = 0
-REPLACE_MKSTEMP = 0
-REPLACE_NANOSLEEP = GNULIB_PORTCHECK
-REPLACE_PRINTF = 0
-REPLACE_SNPRINTF = 0
-REPLACE_SPRINTF = 0
-REPLACE_STRPTIME = GNULIB_PORTCHECK
-REPLACE_TIMEGM = GNULIB_PORTCHECK
-REPLACE_VASPRINTF = 0
-REPLACE_VFPRINTF = 0
-REPLACE_VPRINTF = 0
-REPLACE_VSNPRINTF = 0
-REPLACE_VSPRINTF = 0
-SET_MAKE =
-SHELL = /bin/ksh
-SIG_ATOMIC_T_SUFFIX =
-SIZE_T_SUFFIX =
-STDBOOL_H =
-STDINT_H =
-STRIP =
-SYSEXITS_H =
-SYS_STAT_H = sys/stat.h
-SYS_TIME_H =
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = 0
-TIME_H_DEFINES_STRUCT_TIMESPEC = 1
-USE_NLS = no
-VERSION = 2.8
-WCHAR_H =
-WCHAR_T_SUFFIX =
-WCTYPE_H =
-WINT_T_SUFFIX =
-XGETTEXT = /usr/local/bin/xgettext
-XGETTEXT_015 = :
-YACC = byacc
-YFLAGS =
-abs_builddir = /home/laffer1/cpio/cpio-2.8
-abs_srcdir = /home/laffer1/cpio/cpio-2.8
-abs_top_builddir = /home/laffer1/cpio/cpio-2.8
-abs_top_srcdir = /home/laffer1/cpio/cpio-2.8
-ac_ct_CC = gcc
-am__include = include
-am__leading_dot = .
-am__quote =
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build = x86_64-mbsd-freebsd6.0
-build_alias = amd64-mbsd-freebsd6.0
-build_cpu = x86_64
-build_os = freebsd6.0
-build_vendor = mbsd
-builddir = .
-datadir = ${datarootdir}
-datarootdir = ${prefix}/share
-docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
-dvidir = ${docdir}
-exec_prefix = ${prefix}
-gl_LIBOBJS = __fpending.o argmatch.o asnprintf.o basename.o canonicalize-lgpl.o chdir-long.o close-stream.o closeout.o creat-safer.o dirname.o dup-safer.o error.o exitfail.o fchmodat.o fchownat.o fd-safer.o fnmatch.o getcwd.o getopt.o getopt1.o gettime.o hash.o imaxtostr.o lstat.o mempcpy.o memrchr.o mkdirat.o obstack.o offtostr.o open-safer.o openat.o openat-proc.o pipe-safer.o printf-args.o printf-parse.o quote.o quotearg.o safe-read.o safe-write.o save-cwd.o savedir.o strchrnul.o stripslash.o strnlen.o uinttostr.o umaxtostr.o utimens.o vasnprintf.o xgetcwd.o xmalloc.o
-gl_LTLIBOBJS = __fpending.lo argmatch.lo asnprintf.lo basename.lo canonicalize-lgpl.lo chdir-long.lo close-stream.lo closeout.lo creat-safer.lo dirname.lo dup-safer.lo error.lo exitfail.lo fchmodat.lo fchownat.lo fd-safer.lo fnmatch.lo getcwd.lo getopt.lo getopt1.lo gettime.lo hash.lo imaxtostr.lo lstat.lo mempcpy.lo memrchr.lo mkdirat.lo obstack.lo offtostr.lo open-safer.lo openat.lo openat-proc.lo pipe-safer.lo printf-args.lo printf-parse.lo quote.lo quotearg.lo safe-read.lo safe-write.lo save-cwd.lo savedir.lo strchrnul.lo stripslash.lo strnlen.lo uinttostr.lo umaxtostr.lo utimens.lo vasnprintf.lo xgetcwd.lo xmalloc.lo
-host = x86_64-mbsd-freebsd6.0
-host_alias =
-host_cpu = x86_64
-host_os = freebsd6.0
-host_vendor = mbsd
-htmldir = ${docdir}
-includedir = ${prefix}/include
-infodir = ${datarootdir}/info
-install_sh = $(SHELL) /home/laffer1/cpio/cpio-2.8/build-aux/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localedir = ${datarootdir}/locale
-localstatedir = ${prefix}/var
-mandir = ${datarootdir}/man
-mkdir_p = $(top_builddir)/build-aux/install-sh -c -d
-oldincludedir = /usr/include
-pdfdir = ${docdir}
-prefix = /usr/local
-program_transform_name = s,x,x,
-psdir = ${docdir}
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-srcdir = .
-sysconfdir = ${prefix}/etc
-target_alias = amd64-mbsd-freebsd6.0
-top_builddir = .
-top_srcdir = .
-ACLOCAL_AMFLAGS = -I m4
-AUTOMAKE_OPTIONS = gnits 1.8 dist-bzip2 std-options
-SUBDIRS = doc headers lib rmt src 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)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
- else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in: $(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.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @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
- -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
- $(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-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-shar dist-tarZ dist-zip distcheck distclean \
- distclean-generic distclean-hdr 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
-
-# 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:
--- contrib/cpio/THANKS
+++ /dev/null
@@ -1,20 +0,0 @@
-GNU cpio THANKS file
-
-GNU cpio has originally been written by Phil Nelson <phil at cs.wwu.edu>
-and David MacKenzie <djm at gnu.ai.mit.edu>. It was further modified
-by John Oleynick <juo at gnu.org> and Sergey Poznyakoff <gray at gnu.org>
-who currently maintains it.
-
-The following is a list of people who contributed to GNU cpio by
-reporting problems, suggesting various improvements or submitting actual
-code. Help us keep it complete and exempt of errors.
-
-Benigno B. Junior <bbj at gentux.com.br>
-Brian Mays <brian at debian.org>
-Dmitry V. Levin <ldv at altlinux.org>
-Jim Castleberry <bhg9aha02 at sneakemail.com>
-Holger Fleischmann <holger_fleischmann at mra.man.de>
-Matthew Braithwaite <mab at cnet.com>
-Mike Frysinger <vapier at gentoo.org>
-Mitsuru Chinen <mchinen at yamato.ibm.com>
-Peter Vrabec <pvrabec at redhat.com>
--- contrib/cpio/README
+++ /dev/null
@@ -1,71 +0,0 @@
-This is GNU cpio, a program to manage archives of files.
-As of version 2.0, it supports the features of the System V release 4
-cpio, including support for tar archives.
-
-This package also includes rmt, the remote tape server, and mt, a tape
-drive control program; these two programs will only be compiled if
-your system supports remote command execution, and tape drive control
-operations, respectively.
-
-See the file INSTALL for compilation and installation instructions for Unix.
-
-For non-Unix systems [ Note: The non-Unix makefiles have not been tested
- for this release ]
-
-makefile.pc is a makefile for Turbo C or C++ or Borland C++ on MS-DOS.
-
-makefile.os2 is a makefile for MS C and GNU C (emx/gcc) on OS/2.
-cpio.def is a linker definition file for the MS C OS/2 version.
-
-
-The main advantages of GNU cpio over Unix versions are:
-
-* It can access tape drives on other hosts using TCP/IP.
-
-* `-o' and `-p' can copy symbolic links either as symbolic links or,
-with `-L', as the files they point to.
-
-* `-i' automatically recognizes the archive format and tries to
-recover from corrupted archives.
-
-* The output of '-itv' looks like 'ls -l'.
-
-* It accepts long-named options as well as traditional
-single-character options.
-
-A few features of other versions of cpio are missing from GNU cpio, including:
-
-* The `-6' option to support Sixth Edition Unix cpio archives with `-i'.
-
-* An option to limit volume size, like afio -s.
-
-
-GNU cpio supports the POSIX.1 "ustar" tar format. GNU tar supports a
-somewhat different, early draft of that format. That draft format has
-a slightly different magic number in the tar header and doesn't
-include the path prefix part of the header, which allows storing file
-names that are longer than 100 characters. GNU cpio knows to
-recognize the nonstandard GNU tar "ustar" archives.
-
-The following patch to GNU tar 1.11.1 makes GNU tar recognize standard
-"ustar" archives, such as GNU cpio produces, except that it won't use
-the path prefix. Without this patch, GNU tar thinks that standard
-"ustar" archives are old-format tar archives and can not use the extra
-information that "ustar" format contains. If you use this patch,
-remember that you will lose the beginnings of paths that are longer
-than 100 characters. That's why it's not an official part of GNU tar.
-(Adding support for the path prefix to GNU tar is not trivial.)
-
---- list.c.orig Mon Sep 14 17:04:03 1992
-+++ list.c Wed Oct 14 14:02:28 1992
-@@ -439,7 +439,7 @@
- st->st_ctime = from_oct(1+12, header->header.ctime);
- }
-
-- if (0==strcmp(header->header.magic, TMAGIC)) {
-+ if (0==strncmp(header->header.magic, TMAGIC, 5)) {
- /* Unix Standard tar archive */
- *stdp = 1;
- if (wantug) {
-
-Mail suggestions and bug reports for GNU cpio to bug-cpio at gnu.org.
--- contrib/cpio/lib/paxconvert.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Data conversion functions for GNU paxutils
-
- 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.
-*/
-
-#include <system.h>
-
-/* Format O as a null-terminated decimal string into BUF _backwards_;
- return pointer to start of result. */
-char *
-stringify_uintmax_t_backwards (uintmax_t o, char *buf)
-{
- *--buf = '\0';
- do
- *--buf = '0' + (int) (o % 10);
- while ((o /= 10) != 0);
- return buf;
-}
-
--- contrib/cpio/lib/xstrndup.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Duplicate a bounded initial segment of a string, with out-of-memory
- checking.
- Copyright (C) 2003, 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. */
-
-#include <config.h>
-
-/* Specification. */
-#include "xstrndup.h"
-
-#include <string.h>
-#include "xalloc.h"
-
-/* Return a newly allocated copy of at most N bytes of STRING.
- In other words, return a copy of the initial segment of length N of
- STRING. */
-char *
-xstrndup (const char *string, size_t n)
-{
- char *s = strndup (string, n);
- if (! s)
- xalloc_die ();
- return s;
-}
--- contrib/cpio/lib/fchdir.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/* fchdir replacement.
- 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. */
-
-#include <config.h>
-
-/* Specification. */
-#include <unistd.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-
-#include "canonicalize.h"
-#include "dirfd.h"
-
-/* This replacement assumes that a directory is not renamed while opened
- through a file descriptor. */
-
-/* Array of file descriptors opened. If it points to a directory, it stores
- info about this directory; otherwise it stores an errno value of ENOTDIR. */
-typedef struct
-{
- char *name; /* Absolute name of the directory, or NULL. */
- int saved_errno; /* If name == NULL: The error code describing the failure
- reason. */
-} dir_info_t;
-static dir_info_t *dirs;
-static size_t dirs_allocated;
-
-/* Try to ensure dirs has enough room for a slot at index fd. */
-static void
-ensure_dirs_slot (size_t fd)
-{
- if (fd >= dirs_allocated)
- {
- size_t new_allocated;
- dir_info_t *new_dirs;
- size_t i;
-
- new_allocated = 2 * dirs_allocated + 1;
- if (new_allocated <= fd)
- new_allocated = fd + 1;
- new_dirs =
- (dirs != NULL
- ? (dir_info_t *) realloc (dirs, new_allocated * sizeof (dir_info_t))
- : (dir_info_t *) malloc (new_allocated * sizeof (dir_info_t)));
- if (new_dirs != NULL)
- {
- for (i = dirs_allocated; i < new_allocated; i++)
- {
- new_dirs[i].name = NULL;
- new_dirs[i].saved_errno = ENOTDIR;
- }
- dirs = new_dirs;
- dirs_allocated = new_allocated;
- }
- }
-}
-
-/* Override open() and close(), to keep track of the open file descriptors. */
-
-int
-close (int fd)
-#undef close
-{
- int retval = close (fd);
-
- if (retval >= 0 && fd >= 0 && fd < dirs_allocated)
- {
- if (dirs[fd].name != NULL)
- free (dirs[fd].name);
- dirs[fd].name = NULL;
- dirs[fd].saved_errno = ENOTDIR;
- }
- return retval;
-}
-
-int
-open (const char *filename, int flags, ...)
-#undef open
-{
- mode_t mode;
- int fd;
- struct stat statbuf;
-
- mode = 0;
- if (flags & O_CREAT)
- {
- va_list arg;
- va_start (arg, flags);
-
- /* If mode_t is narrower than int, use the promoted type (int),
- not mode_t. Use sizeof to guess whether mode_t is narrower;
- we don't know of any practical counterexamples. */
- mode = (sizeof (mode_t) < sizeof (int)
- ? va_arg (arg, int)
- : va_arg (arg, mode_t));
-
- va_end (arg);
- }
- fd = open (filename, flags, mode);
- if (fd >= 0)
- {
- ensure_dirs_slot (fd);
- if (fd < dirs_allocated
- && fstat (fd, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode))
- {
- dirs[fd].name = canonicalize_file_name (filename);
- if (dirs[fd].name == NULL)
- dirs[fd].saved_errno = errno;
- }
- }
- return fd;
-}
-
-/* Override opendir() and closedir(), to keep track of the open file
- descriptors. Needed because there is a function dirfd(). */
-
-int
-closedir (DIR *dp)
-#undef closedir
-{
- int fd = dirfd (dp);
- int retval = closedir (dp);
-
- if (retval >= 0 && fd >= 0 && fd < dirs_allocated)
- {
- if (dirs[fd].name != NULL)
- free (dirs[fd].name);
- dirs[fd].name = NULL;
- dirs[fd].saved_errno = ENOTDIR;
- }
- return retval;
-}
-
-DIR *
-opendir (const char *filename)
-#undef opendir
-{
- DIR *dp;
-
- dp = opendir (filename);
- if (dp != NULL)
- {
- int fd = dirfd (dp);
- if (fd >= 0)
- {
- ensure_dirs_slot (fd);
- if (fd < dirs_allocated)
- {
- dirs[fd].name = canonicalize_file_name (filename);
- if (dirs[fd].name == NULL)
- dirs[fd].saved_errno = errno;
- }
- }
- }
- return dp;
-}
-
-/* Override dup() and dup2(), to keep track of open file descriptors. */
-
-int
-dup (int oldfd)
-#undef dup
-{
- int newfd = dup (oldfd);
-
- if (oldfd >= 0 && newfd >= 0)
- {
- ensure_dirs_slot (newfd);
- if (newfd < dirs_allocated)
- {
- if (oldfd < dirs_allocated)
- {
- if (dirs[oldfd].name != NULL)
- {
- dirs[newfd].name = strdup (dirs[oldfd].name);
- if (dirs[newfd].name == NULL)
- dirs[newfd].saved_errno = ENOMEM;
- }
- else
- {
- dirs[newfd].name = NULL;
- dirs[newfd].saved_errno = dirs[oldfd].saved_errno;
- }
- }
- else
- {
- dirs[newfd].name = NULL;
- dirs[newfd].saved_errno = ENOMEM;
- }
- }
- }
- return newfd;
-}
-
-int
-dup2 (int oldfd, int newfd)
-#undef dup2
-{
- int retval = dup2 (oldfd, newfd);
-
- if (retval >= 0 && oldfd >= 0 && newfd >= 0 && newfd != oldfd)
- {
- ensure_dirs_slot (newfd);
- if (newfd < dirs_allocated)
- {
- if (oldfd < dirs_allocated)
- {
- if (dirs[oldfd].name != NULL)
- {
- dirs[newfd].name = strdup (dirs[oldfd].name);
- if (dirs[newfd].name == NULL)
- dirs[newfd].saved_errno = ENOMEM;
- }
- else
- {
- dirs[newfd].name = NULL;
- dirs[newfd].saved_errno = dirs[oldfd].saved_errno;
- }
- }
- else
- {
- dirs[newfd].name = NULL;
- dirs[newfd].saved_errno = ENOMEM;
- }
- }
- }
- return retval;
-}
-
-/* Implement fchdir() in terms of chdir(). */
-
-int
-fchdir (int fd)
-{
- if (fd >= 0)
- {
- if (fd < dirs_allocated)
- {
- if (dirs[fd].name != NULL)
- return chdir (dirs[fd].name);
- else
- {
- errno = dirs[fd].saved_errno;
- return -1;
- }
- }
- else
- {
- errno = ENOMEM;
- return -1;
- }
- }
- else
- {
- errno = EBADF;
- return -1;
- }
-}
--- contrib/cpio/lib/umaxtostr.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define inttostr umaxtostr
-#define inttype uintmax_t
-#include "inttostr.c"
--- contrib/cpio/lib/pathmax.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 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. */
-
-#ifndef _PATHMAX_H
-# define _PATHMAX_H
-
-# include <unistd.h>
-
-# include <limits.h>
-
-# ifndef _POSIX_PATH_MAX
-# define _POSIX_PATH_MAX 256
-# endif
-
-# if !defined PATH_MAX && defined _PC_PATH_MAX
-# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
- : pathconf ("/", _PC_PATH_MAX))
-# endif
-
-/* Don't include sys/param.h if it already has been. */
-# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
-# include <sys/param.h>
-# endif
-
-# if !defined PATH_MAX && defined MAXPATHLEN
-# define PATH_MAX MAXPATHLEN
-# endif
-
-# ifndef PATH_MAX
-# define PATH_MAX _POSIX_PATH_MAX
-# endif
-
-#endif /* _PATHMAX_H */
--- contrib/cpio/lib/getcwd.c
+++ /dev/null
@@ -1,428 +0,0 @@
-/* Copyright (C) 1991,92,93,94,95,96,97,98,99,2004,2005,2006,2007 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. */
-
-#if !_LIBC
-# include <config.h>
-# include <unistd.h>
-# include "dirfd.h"
-#endif
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdbool.h>
-#include <stddef.h>
-
-#include <fcntl.h> /* For AT_FDCWD on Solaris 9. */
-
-#ifndef __set_errno
-# define __set_errno(val) (errno = (val))
-#endif
-
-#include <dirent.h>
-#ifndef _D_EXACT_NAMLEN
-# define _D_EXACT_NAMLEN(d) strlen ((d)->d_name)
-#endif
-#ifndef _D_ALLOC_NAMLEN
-# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
-#endif
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if _LIBC
-# ifndef mempcpy
-# define mempcpy __mempcpy
-# endif
-#endif
-
-#include <limits.h>
-
-/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its
- value exceeds INT_MAX, so its use as an int doesn't conform to the
- C standard, and GCC and Sun C complain in some cases. */
-#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553
-# undef AT_FDCWD
-# define AT_FDCWD (-3041965)
-#endif
-
-#ifdef ENAMETOOLONG
-# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
-#else
-# define is_ENAMETOOLONG(x) 0
-#endif
-
-#ifndef MAX
-# define MAX(a, b) ((a) < (b) ? (b) : (a))
-#endif
-#ifndef MIN
-# define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif
-
-#ifndef PATH_MAX
-# ifdef MAXPATHLEN
-# define PATH_MAX MAXPATHLEN
-# else
-# define PATH_MAX 1024
-# endif
-#endif
-
-#if D_INO_IN_DIRENT
-# define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino))
-#else
-# define MATCHING_INO(dp, ino) true
-#endif
-
-#if !_LIBC
-# define __getcwd getcwd
-# define __lstat lstat
-# define __closedir closedir
-# define __opendir opendir
-# define __readdir readdir
-#endif
-
-/* The results of opendir() in this file are not used with dirfd and fchdir,
- therefore save some unnecessary recursion in fchdir.c. */
-#undef opendir
-#undef closedir
-
-/* Get the name of the current working directory, and put it in SIZE
- bytes of BUF. Returns NULL if the directory couldn't be determined or
- SIZE was too small. If successful, returns BUF. In GNU, if BUF is
- NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
- unless SIZE == 0, in which case it is as big as necessary. */
-
-char *
-__getcwd (char *buf, size_t size)
-{
- /* Lengths of big file name components and entire file names, and a
- deep level of file name nesting. These numbers are not upper
- bounds; they are merely large values suitable for initial
- allocations, designed to be large enough for most real-world
- uses. */
- enum
- {
- BIG_FILE_NAME_COMPONENT_LENGTH = 255,
- BIG_FILE_NAME_LENGTH = MIN (4095, PATH_MAX - 1),
- DEEP_NESTING = 100
- };
-
-#ifdef AT_FDCWD
- int fd = AT_FDCWD;
- bool fd_needs_closing = false;
-#else
- char dots[DEEP_NESTING * sizeof ".." + BIG_FILE_NAME_COMPONENT_LENGTH + 1];
- char *dotlist = dots;
- size_t dotsize = sizeof dots;
- size_t dotlen = 0;
-#endif
- DIR *dirstream = NULL;
- dev_t rootdev, thisdev;
- ino_t rootino, thisino;
- char *dir;
- register char *dirp;
- struct stat st;
- size_t allocated = size;
- size_t used;
-
-#if HAVE_PARTLY_WORKING_GETCWD
- /* The system getcwd works, except it sometimes fails when it
- shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If
- AT_FDCWD is not defined, the algorithm below is O(N**2) and this
- is much slower than the system getcwd (at least on GNU/Linux).
- So trust the system getcwd's results unless they look
- suspicious.
-
- Use the system getcwd even if we have openat support, since the
- system getcwd works even when a parent is unreadable, while the
- openat-based approach does not. */
-
-# undef getcwd
- dir = getcwd (buf, size);
- if (dir || (errno != ERANGE && !is_ENAMETOOLONG (errno) && errno != ENOENT))
- return dir;
-#endif
-
- if (size == 0)
- {
- if (buf != NULL)
- {
- __set_errno (EINVAL);
- return NULL;
- }
-
- allocated = BIG_FILE_NAME_LENGTH + 1;
- }
-
- if (buf == NULL)
- {
- dir = malloc (allocated);
- if (dir == NULL)
- return NULL;
- }
- else
- dir = buf;
-
- dirp = dir + allocated;
- *--dirp = '\0';
-
- if (__lstat (".", &st) < 0)
- goto lose;
- thisdev = st.st_dev;
- thisino = st.st_ino;
-
- if (__lstat ("/", &st) < 0)
- goto lose;
- rootdev = st.st_dev;
- rootino = st.st_ino;
-
- while (!(thisdev == rootdev && thisino == rootino))
- {
- struct dirent *d;
- dev_t dotdev;
- ino_t dotino;
- bool mount_point;
- int parent_status;
- size_t dirroom;
- size_t namlen;
- bool use_d_ino = true;
-
- /* Look at the parent directory. */
-#ifdef AT_FDCWD
- fd = openat (fd, "..", O_RDONLY);
- if (fd < 0)
- goto lose;
- fd_needs_closing = true;
- parent_status = fstat (fd, &st);
-#else
- dotlist[dotlen++] = '.';
- dotlist[dotlen++] = '.';
- dotlist[dotlen] = '\0';
- parent_status = __lstat (dotlist, &st);
-#endif
- if (parent_status != 0)
- goto lose;
-
- if (dirstream && __closedir (dirstream) != 0)
- {
- dirstream = NULL;
- goto lose;
- }
-
- /* Figure out if this directory is a mount point. */
- dotdev = st.st_dev;
- dotino = st.st_ino;
- mount_point = dotdev != thisdev;
-
- /* Search for the last directory. */
-#ifdef AT_FDCWD
- dirstream = fdopendir (fd);
- if (dirstream == NULL)
- goto lose;
- /* Reset fd. It may have been closed by fdopendir. */
- fd = dirfd (dirstream);
- fd_needs_closing = false;
-#else
- dirstream = __opendir (dotlist);
- if (dirstream == NULL)
- goto lose;
- dotlist[dotlen++] = '/';
-#endif
- for (;;)
- {
- /* Clear errno to distinguish EOF from error if readdir returns
- NULL. */
- __set_errno (0);
- d = __readdir (dirstream);
-
- /* When we've iterated through all directory entries without finding
- one with a matching d_ino, rewind the stream and consider each
- name again, but this time, using lstat. This is necessary in a
- chroot on at least one system (glibc-2.3.6 + linux 2.6.12), where
- .., ../.., ../../.., etc. all had the same device number, yet the
- d_ino values for entries in / did not match those obtained
- via lstat. */
- if (d == NULL && errno == 0 && use_d_ino)
- {
- use_d_ino = false;
- rewinddir (dirstream);
- d = __readdir (dirstream);
- }
-
- if (d == NULL)
- {
- if (errno == 0)
- /* EOF on dirstream, which can mean e.g., that the current
- directory has been removed. */
- __set_errno (ENOENT);
- goto lose;
- }
- if (d->d_name[0] == '.' &&
- (d->d_name[1] == '\0' ||
- (d->d_name[1] == '.' && d->d_name[2] == '\0')))
- continue;
-
- if (use_d_ino)
- {
- bool match = (MATCHING_INO (d, thisino) || mount_point);
- if (! match)
- continue;
- }
-
- {
- int entry_status;
-#ifdef AT_FDCWD
- entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW);
-#else
- /* Compute size needed for this file name, or for the file
- name ".." in the same directory, whichever is larger.
- Room for ".." might be needed the next time through
- the outer loop. */
- size_t name_alloc = _D_ALLOC_NAMLEN (d);
- size_t filesize = dotlen + MAX (sizeof "..", name_alloc);
-
- if (filesize < dotlen)
- goto memory_exhausted;
-
- if (dotsize < filesize)
- {
- /* My, what a deep directory tree you have, Grandma. */
- size_t newsize = MAX (filesize, dotsize * 2);
- size_t i;
- if (newsize < dotsize)
- goto memory_exhausted;
- if (dotlist != dots)
- free (dotlist);
- dotlist = malloc (newsize);
- if (dotlist == NULL)
- goto lose;
- dotsize = newsize;
-
- i = 0;
- do
- {
- dotlist[i++] = '.';
- dotlist[i++] = '.';
- dotlist[i++] = '/';
- }
- while (i < dotlen);
- }
-
- memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d));
- entry_status = __lstat (dotlist, &st);
-#endif
- /* We don't fail here if we cannot stat() a directory entry.
- This can happen when (network) file systems fail. If this
- entry is in fact the one we are looking for we will find
- out soon as we reach the end of the directory without
- having found anything. */
- if (entry_status == 0 && S_ISDIR (st.st_mode)
- && st.st_dev == thisdev && st.st_ino == thisino)
- break;
- }
- }
-
- dirroom = dirp - dir;
- namlen = _D_EXACT_NAMLEN (d);
-
- if (dirroom <= namlen)
- {
- if (size != 0)
- {
- __set_errno (ERANGE);
- goto lose;
- }
- else
- {
- char *tmp;
- size_t oldsize = allocated;
-
- allocated += MAX (allocated, namlen);
- if (allocated < oldsize
- || ! (tmp = realloc (dir, allocated)))
- goto memory_exhausted;
-
- /* Move current contents up to the end of the buffer.
- This is guaranteed to be non-overlapping. */
- dirp = memcpy (tmp + allocated - (oldsize - dirroom),
- tmp + dirroom,
- oldsize - dirroom);
- dir = tmp;
- }
- }
- dirp -= namlen;
- memcpy (dirp, d->d_name, namlen);
- *--dirp = '/';
-
- thisdev = dotdev;
- thisino = dotino;
- }
-
- if (dirstream && __closedir (dirstream) != 0)
- {
- dirstream = NULL;
- goto lose;
- }
-
- if (dirp == &dir[allocated - 1])
- *--dirp = '/';
-
-#ifndef AT_FDCWD
- if (dotlist != dots)
- free (dotlist);
-#endif
-
- used = dir + allocated - dirp;
- memmove (dir, dirp, used);
-
- if (size == 0)
- /* Ensure that the buffer is only as large as necessary. */
- buf = realloc (dir, used);
-
- if (buf == NULL)
- /* Either buf was NULL all along, or `realloc' failed but
- we still have the original string. */
- buf = dir;
-
- return buf;
-
- memory_exhausted:
- __set_errno (ENOMEM);
- lose:
- {
- int save = errno;
- if (dirstream)
- __closedir (dirstream);
-#ifdef AT_FDCWD
- if (fd_needs_closing)
- close (fd);
-#else
- if (dotlist != dots)
- free (dotlist);
-#endif
- if (buf == NULL)
- free (dir);
- __set_errno (save);
- }
- return NULL;
-}
-
-#ifdef weak_alias
-weak_alias (__getcwd, getcwd)
-#endif
--- contrib/cpio/lib/close-stream.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <stdio.h>
-int close_stream (FILE *stream);
--- contrib/cpio/lib/error.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Declaration for error-reporting function
- Copyright (C) 1995, 1996, 1997, 2003, 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. */
-
-#ifndef _ERROR_H
-#define _ERROR_H 1
-
-#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)
-# define __format__ format
-# define __printf__ printf
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Print a message with `fprintf (stderr, FORMAT, ...)';
- if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
- If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
-
-extern void error (int __status, int __errnum, const char *__format, ...)
- __attribute__ ((__format__ (__printf__, 3, 4)));
-
-extern void error_at_line (int __status, int __errnum, const char *__fname,
- unsigned int __lineno, const char *__format, ...)
- __attribute__ ((__format__ (__printf__, 5, 6)));
-
-/* If NULL, error will flush stdout, then print on stderr the program
- name, a colon and a space. Otherwise, error will call this
- function without parameters instead. */
-extern void (*error_print_progname) (void);
-
-/* This variable is incremented each time `error' is called. */
-extern unsigned int error_message_count;
-
-/* Sometimes we want to have at most one error per line. This
- variable controls whether this mode is selected or not. */
-extern int error_one_per_line;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* error.h */
--- contrib/cpio/lib/vsnprintf.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Formatted output to strings.
- Copyright (C) 2004 Free Software Foundation, Inc.
- Written by Simon Josefsson and Yoann Vandoorselaere <yoann at prelude-ids.org>.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- 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 VSNPRINTF_H
-#define VSNPRINTF_H
-
-#include <stdarg.h>
-
-/* Get vsnprintf declaration, if available. */
-#include <stdio.h>
-
-#if defined HAVE_DECL_VSNPRINTF && !HAVE_DECL_VSNPRINTF
-int vsnprintf (char *str, size_t size, const char *format, va_list args);
-#endif
-
-#endif /* VSNPRINTF_H */
--- contrib/cpio/lib/strcase.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Case-insensitive string comparison functions.
- Copyright (C) 1995-1996, 2001, 2003, 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. */
-
-#ifndef _STRCASE_H
-#define _STRCASE_H
-
-#include <stddef.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
- greater than zero if S1 is lexicographically less than, equal to or greater
- than S2.
- Note: This function may, in multibyte locales, return 0 for strings of
- different lengths! */
-extern int strcasecmp (const char *s1, const char *s2);
-
-/* Compare no more than N characters of strings S1 and S2, ignoring case,
- returning less than, equal to or greater than zero if S1 is
- lexicographically less than, equal to or greater than S2.
- Note: This function can not work correctly in multibyte locales. */
-extern int strncasecmp (const char *s1, const char *s2, size_t n);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _STRCASE_H */
--- contrib/cpio/lib/stdint_.h
+++ /dev/null
@@ -1,512 +0,0 @@
-/* Copyright (C) 2001-2002, 2004-2007 Free Software Foundation, Inc.
- Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
- This file is part of gnulib.
-
- 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. */
-
-/*
- * ISO C 99 <stdint.h> for platforms that lack it.
- * <http://www.opengroup.org/susv3xbd/stdint.h.html>
- */
-
-#ifndef _GL_STDINT_H
-
-/* Get those types that are already defined in other system include
- files, so that we can "#define int8_t signed char" below without
- worrying about a later system include file containing a "typedef
- signed char int8_t;" that will get messed up by our macro. Our
- macros should all be consistent with the system versions, except
- for the "fast" types and macros, which we recommend against using
- in public interfaces due to compiler differences. */
-
-#if @HAVE_STDINT_H@
-# if defined __sgi && ! defined __c99
- /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users
- with "This header file is to be used only for c99 mode compilations"
- diagnostics. */
-# define __STDINT_H__
-# endif
- /* Other systems may have an incomplete or buggy <stdint.h>.
- Include it before <inttypes.h>, since any "#include <stdint.h>"
- in <inttypes.h> would reinclude us, skipping our contents because
- _GL_STDINT_H is defined.
- The include_next requires a split double-inclusion guard. */
-# if @HAVE_INCLUDE_NEXT@
-# include_next <stdint.h>
-# else
-# include @ABSOLUTE_STDINT_H@
-# endif
-#endif
-
-#ifndef _GL_STDINT_H
-#define _GL_STDINT_H
-
-/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
- IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
- AIX 5.2 <sys/types.h> isn't needed and causes troubles.
- MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
- relies on the system <stdint.h> definitions, so include
- <sys/types.h> after @ABSOLUTE_STDINT_H at . */
-#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
-# include <sys/types.h>
-#endif
-
-/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */
-#include <limits.h>
-
-#if @HAVE_INTTYPES_H@
- /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
- int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
- <inttypes.h> also defines intptr_t and uintptr_t. */
-# define _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
-# include <inttypes.h>
-# undef _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
-#elif @HAVE_SYS_INTTYPES_H@
- /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
- the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
-# include <sys/inttypes.h>
-#endif
-
-#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
- /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
- int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
- included by <sys/types.h>. */
-# include <sys/bitypes.h>
-#endif
-
-#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
-/* Get WCHAR_MIN, WCHAR_MAX. */
-# if ! (defined WCHAR_MIN && defined WCHAR_MAX)
-# include <wchar.h>
-# endif
-
-#endif
-
-/* Minimum and maximum values for a integer type under the usual assumption.
- Return an unspecified value if BITS == 0, adding a check to pacify
- picky compilers. */
-
-#define _STDINT_MIN(signed, bits, zero) \
- ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
-
-#define _STDINT_MAX(signed, bits, zero) \
- ((signed) \
- ? ~ _STDINT_MIN (signed, bits, zero) \
- : ((((zero) + 1) << ((bits) ? (bits) - 1 : 0)) - 1) * 2 + 1)
-
-/* 7.18.1.1. Exact-width integer types */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. */
-
-#undef int8_t
-#undef uint8_t
-#define int8_t signed char
-#define uint8_t unsigned char
-
-#undef int16_t
-#undef uint16_t
-#define int16_t short int
-#define uint16_t unsigned short int
-
-#undef int32_t
-#undef uint32_t
-#define int32_t int
-#define uint32_t unsigned int
-
-/* Do not undefine int64_t if gnulib is not being used with 64-bit
- types, since otherwise it breaks platforms like Tandem/NSK. */
-#if LONG_MAX >> 31 >> 31 == 1
-# undef int64_t
-# define int64_t long int
-# define GL_INT64_T
-#elif defined _MSC_VER
-# undef int64_t
-# define int64_t __int64
-# define GL_INT64_T
-#elif @HAVE_LONG_LONG_INT@
-# undef int64_t
-# define int64_t long long int
-# define GL_INT64_T
-#endif
-
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# undef uint64_t
-# define uint64_t unsigned long int
-# define GL_UINT64_T
-#elif defined _MSC_VER
-# undef uint64_t
-# define uint64_t unsigned __int64
-# define GL_UINT64_T
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# undef uint64_t
-# define uint64_t unsigned long long int
-# define GL_UINT64_T
-#endif
-
-/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
-#define _UINT8_T
-#define _UINT32_T
-#define _UINT64_T
-
-
-/* 7.18.1.2. Minimum-width integer types */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
- are the same as the corresponding N_t types. */
-
-#undef int_least8_t
-#undef uint_least8_t
-#undef int_least16_t
-#undef uint_least16_t
-#undef int_least32_t
-#undef uint_least32_t
-#undef int_least64_t
-#undef uint_least64_t
-#define int_least8_t int8_t
-#define uint_least8_t uint8_t
-#define int_least16_t int16_t
-#define uint_least16_t uint16_t
-#define int_least32_t int32_t
-#define uint_least32_t uint32_t
-#ifdef GL_INT64_T
-# define int_least64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_least64_t uint64_t
-#endif
-
-/* 7.18.1.3. Fastest minimum-width integer types */
-
-/* Note: Other <stdint.h> substitutes may define these types differently.
- It is not recommended to use these types in public header files. */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
- are taken from the same list of types. Assume that 'long int'
- is fast enough for all narrower integers. */
-
-#undef int_fast8_t
-#undef uint_fast8_t
-#undef int_fast16_t
-#undef uint_fast16_t
-#undef int_fast32_t
-#undef uint_fast32_t
-#undef int_fast64_t
-#undef uint_fast64_t
-#define int_fast8_t long int
-#define uint_fast8_t unsigned int_fast8_t
-#define int_fast16_t long int
-#define uint_fast16_t unsigned int_fast16_t
-#define int_fast32_t long int
-#define uint_fast32_t unsigned int_fast32_t
-#ifdef GL_INT64_T
-# define int_fast64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_fast64_t uint64_t
-#endif
-
-/* 7.18.1.4. Integer types capable of holding object pointers */
-
-#undef intptr_t
-#undef uintptr_t
-#define intptr_t long int
-#define uintptr_t unsigned long int
-
-/* 7.18.1.5. Greatest-width integer types */
-
-/* Note: These types are compiler dependent. It may be unwise to use them in
- public header files. */
-
-#undef intmax_t
-#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define intmax_t long long int
-#elif defined GL_INT64_T
-# define intmax_t int64_t
-#else
-# define intmax_t long int
-#endif
-
-#undef uintmax_t
-#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define uintmax_t unsigned long long int
-#elif defined GL_UINT64_T
-# define uintmax_t uint64_t
-#else
-# define uintmax_t unsigned long int
-#endif
-
-/* 7.18.2. Limits of specified-width integer types */
-
-#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
-
-/* 7.18.2.1. Limits of exact-width integer types */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. */
-
-#undef INT8_MIN
-#undef INT8_MAX
-#undef UINT8_MAX
-#define INT8_MIN (~ INT8_MAX)
-#define INT8_MAX 127
-#define UINT8_MAX 255
-
-#undef INT16_MIN
-#undef INT16_MAX
-#undef UINT16_MAX
-#define INT16_MIN (~ INT16_MAX)
-#define INT16_MAX 32767
-#define UINT16_MAX 65535
-
-#undef INT32_MIN
-#undef INT32_MAX
-#undef UINT32_MAX
-#define INT32_MIN (~ INT32_MAX)
-#define INT32_MAX 2147483647
-#define UINT32_MAX 4294967295U
-
-#undef INT64_MIN
-#undef INT64_MAX
-#ifdef GL_INT64_T
-/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
- evaluates the latter incorrectly in preprocessor expressions. */
-# define INT64_MIN (- INTMAX_C (1) << 63)
-# define INT64_MAX INTMAX_C (9223372036854775807)
-#endif
-
-#undef UINT64_MAX
-#ifdef GL_UINT64_T
-# define UINT64_MAX UINTMAX_C (18446744073709551615)
-#endif
-
-/* 7.18.2.2. Limits of minimum-width integer types */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
- are the same as the corresponding N_t types. */
-
-#undef INT_LEAST8_MIN
-#undef INT_LEAST8_MAX
-#undef UINT_LEAST8_MAX
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-
-#undef INT_LEAST16_MIN
-#undef INT_LEAST16_MAX
-#undef UINT_LEAST16_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-
-#undef INT_LEAST32_MIN
-#undef INT_LEAST32_MAX
-#undef UINT_LEAST32_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-
-#undef INT_LEAST64_MIN
-#undef INT_LEAST64_MAX
-#ifdef GL_INT64_T
-# define INT_LEAST64_MIN INT64_MIN
-# define INT_LEAST64_MAX INT64_MAX
-#endif
-
-#undef UINT_LEAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_LEAST64_MAX UINT64_MAX
-#endif
-
-/* 7.18.2.3. Limits of fastest minimum-width integer types */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
- are taken from the same list of types. */
-
-#undef INT_FAST8_MIN
-#undef INT_FAST8_MAX
-#undef UINT_FAST8_MAX
-#define INT_FAST8_MIN LONG_MIN
-#define INT_FAST8_MAX LONG_MAX
-#define UINT_FAST8_MAX ULONG_MAX
-
-#undef INT_FAST16_MIN
-#undef INT_FAST16_MAX
-#undef UINT_FAST16_MAX
-#define INT_FAST16_MIN LONG_MIN
-#define INT_FAST16_MAX LONG_MAX
-#define UINT_FAST16_MAX ULONG_MAX
-
-#undef INT_FAST32_MIN
-#undef INT_FAST32_MAX
-#undef UINT_FAST32_MAX
-#define INT_FAST32_MIN LONG_MIN
-#define INT_FAST32_MAX LONG_MAX
-#define UINT_FAST32_MAX ULONG_MAX
-
-#undef INT_FAST64_MIN
-#undef INT_FAST64_MAX
-#ifdef GL_INT64_T
-# define INT_FAST64_MIN INT64_MIN
-# define INT_FAST64_MAX INT64_MAX
-#endif
-
-#undef UINT_FAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_FAST64_MAX UINT64_MAX
-#endif
-
-/* 7.18.2.4. Limits of integer types capable of holding object pointers */
-
-#undef INTPTR_MIN
-#undef INTPTR_MAX
-#undef UINTPTR_MAX
-#define INTPTR_MIN LONG_MIN
-#define INTPTR_MAX LONG_MAX
-#define UINTPTR_MAX ULONG_MAX
-
-/* 7.18.2.5. Limits of greatest-width integer types */
-
-#undef INTMAX_MIN
-#undef INTMAX_MAX
-#ifdef INT64_MAX
-# define INTMAX_MIN INT64_MIN
-# define INTMAX_MAX INT64_MAX
-#else
-# define INTMAX_MIN INT32_MIN
-# define INTMAX_MAX INT32_MAX
-#endif
-
-#undef UINTMAX_MAX
-#ifdef UINT64_MAX
-# define UINTMAX_MAX UINT64_MAX
-#else
-# define UINTMAX_MAX UINT32_MAX
-#endif
-
-/* 7.18.3. Limits of other integer types */
-
-/* ptrdiff_t limits */
-#undef PTRDIFF_MIN
-#undef PTRDIFF_MAX
-#define PTRDIFF_MIN \
- _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0 at PTRDIFF_T_SUFFIX@)
-#define PTRDIFF_MAX \
- _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0 at PTRDIFF_T_SUFFIX@)
-
-/* sig_atomic_t limits */
-#undef SIG_ATOMIC_MIN
-#undef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MIN \
- _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
- 0 at SIG_ATOMIC_T_SUFFIX@)
-#define SIG_ATOMIC_MAX \
- _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
- 0 at SIG_ATOMIC_T_SUFFIX@)
-
-
-/* size_t limit */
-#undef SIZE_MAX
-#define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0 at SIZE_T_SUFFIX@)
-
-/* wchar_t limits */
-#undef WCHAR_MIN
-#undef WCHAR_MAX
-#define WCHAR_MIN \
- _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0 at WCHAR_T_SUFFIX@)
-#define WCHAR_MAX \
- _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0 at WCHAR_T_SUFFIX@)
-
-/* wint_t limits */
-#undef WINT_MIN
-#undef WINT_MAX
-#define WINT_MIN \
- _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0 at WINT_T_SUFFIX@)
-#define WINT_MAX \
- _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0 at WINT_T_SUFFIX@)
-
-#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
-
-/* 7.18.4. Macros for integer constants */
-
-#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
-/* 7.18.4.1. Macros for minimum-width integer constants */
-/* According to ISO C 99 Technical Corrigendum 1 */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
-
-#undef INT8_C
-#undef UINT8_C
-#define INT8_C(x) x
-#define UINT8_C(x) x
-
-#undef INT16_C
-#undef UINT16_C
-#define INT16_C(x) x
-#define UINT16_C(x) x
-
-#undef INT32_C
-#undef UINT32_C
-#define INT32_C(x) x
-#define UINT32_C(x) x ## U
-
-#undef INT64_C
-#undef UINT64_C
-#if LONG_MAX >> 31 >> 31 == 1
-# define INT64_C(x) x##L
-#elif defined _MSC_VER
-# define INT64_C(x) x##i64
-#elif @HAVE_LONG_LONG_INT@
-# define INT64_C(x) x##LL
-#endif
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# define UINT64_C(x) x##UL
-#elif defined _MSC_VER
-# define UINT64_C(x) x##ui64
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# define UINT64_C(x) x##ULL
-#endif
-
-/* 7.18.4.2. Macros for greatest-width integer constants */
-
-#undef INTMAX_C
-#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define INTMAX_C(x) x##LL
-#elif defined GL_INT64_T
-# define INTMAX_C(x) INT64_C(x)
-#else
-# define INTMAX_C(x) x##L
-#endif
-
-#undef UINTMAX_C
-#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define UINTMAX_C(x) x##ULL
-#elif defined GL_UINT64_T
-# define UINTMAX_C(x) UINT64_C(x)
-#else
-# define UINTMAX_C(x) x##UL
-#endif
-
-#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
-
-#endif /* _GL_STDINT_H */
-#endif /* _GL_STDINT_H */
--- contrib/cpio/lib/xsize.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* xsize.h -- Checked size_t computations.
-
- Copyright (C) 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. */
-
-#ifndef _XSIZE_H
-#define _XSIZE_H
-
-/* Get size_t. */
-#include <stddef.h>
-
-/* Get SIZE_MAX. */
-#include <limits.h>
-#if HAVE_STDINT_H
-# include <stdint.h>
-#endif
-
-/* The size of memory objects is often computed through expressions of
- type size_t. Example:
- void* p = malloc (header_size + n * element_size).
- These computations can lead to overflow. When this happens, malloc()
- returns a piece of memory that is way too small, and the program then
- crashes while attempting to fill the memory.
- To avoid this, the functions and macros in this file check for overflow.
- The convention is that SIZE_MAX represents overflow.
- malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
- implementation that uses mmap --, it's recommended to use size_overflow_p()
- or size_in_bounds_p() before invoking malloc().
- The example thus becomes:
- size_t size = xsum (header_size, xtimes (n, element_size));
- void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
-*/
-
-/* Convert an arbitrary value >= 0 to type size_t. */
-#define xcast_size_t(N) \
- ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
-
-/* Sum of two sizes, with overflow check. */
-static inline size_t
-#if __GNUC__ >= 3
-__attribute__ ((__pure__))
-#endif
-xsum (size_t size1, size_t size2)
-{
- size_t sum = size1 + size2;
- return (sum >= size1 ? sum : SIZE_MAX);
-}
-
-/* Sum of three sizes, with overflow check. */
-static inline size_t
-#if __GNUC__ >= 3
-__attribute__ ((__pure__))
-#endif
-xsum3 (size_t size1, size_t size2, size_t size3)
-{
- return xsum (xsum (size1, size2), size3);
-}
-
-/* Sum of four sizes, with overflow check. */
-static inline size_t
-#if __GNUC__ >= 3
-__attribute__ ((__pure__))
-#endif
-xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
-{
- return xsum (xsum (xsum (size1, size2), size3), size4);
-}
-
-/* Maximum of two sizes, with overflow check. */
-static inline size_t
-#if __GNUC__ >= 3
-__attribute__ ((__pure__))
-#endif
-xmax (size_t size1, size_t size2)
-{
- /* No explicit check is needed here, because for any n:
- max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */
- return (size1 >= size2 ? size1 : size2);
-}
-
-/* Multiplication of a count with an element size, with overflow check.
- The count must be >= 0 and the element size must be > 0.
- This is a macro, not an inline function, so that it works correctly even
- when N is of a wider tupe and N > SIZE_MAX. */
-#define xtimes(N, ELSIZE) \
- ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
-
-/* Check for overflow. */
-#define size_overflow_p(SIZE) \
- ((SIZE) == SIZE_MAX)
-/* Check against overflow. */
-#define size_in_bounds_p(SIZE) \
- ((SIZE) != SIZE_MAX)
-
-#endif /* _XSIZE_H */
--- contrib/cpio/lib/strnlen.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005 Free Software Foundation, Inc.
- Written by Simon Josefsson.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef STRNLEN_H
-#define STRNLEN_H
-
-/* Get strnlen declaration, if available. */
-#include <string.h>
-
-#if defined HAVE_DECL_STRNLEN && !HAVE_DECL_STRNLEN
-/* Find the length (number of bytes) of STRING, but scan at most
- MAXLEN bytes. If no '\0' terminator is found in that many bytes,
- return MAXLEN. */
-extern size_t strnlen(const char *string, size_t maxlen);
-#endif
-
-#endif /* STRNLEN_H */
--- contrib/cpio/lib/lchown.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Declare a replacement for lchown on hosts that lack it.
-
- 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. */
-
-#include <errno.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#if HAVE_DECL_LCHOWN
-# if ! HAVE_LCHOWN
-# undef lchown
-# define lchown rpl_chown
-# endif
-#else
-int lchown (char const *, uid_t, gid_t);
-#endif
-
-/* Some systems don't have EOPNOTSUPP. */
-#ifndef EOPNOTSUPP
-# ifdef ENOTSUP
-# define EOPNOTSUPP ENOTSUP
-# else
-/* Some systems don't have ENOTSUP either. */
-# define EOPNOTSUPP EINVAL
-# endif
-#endif
--- contrib/cpio/lib/wcwidth.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Determine the number of screen columns needed for a character.
- 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. */
-
-#ifndef _gl_WCWIDTH_H
-#define _gl_WCWIDTH_H
-
-#if HAVE_WCHAR_T
-
-/* Get wcwidth if available, along with wchar_t. */
-# if HAVE_WCHAR_H
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
- <wchar.h>. */
-# include <stdio.h>
-# include <time.h>
-# include <wchar.h>
-# endif
-
-/* Get iswprint. */
-# if HAVE_WCTYPE_H
-# include <wctype.h>
-# endif
-# if !defined iswprint && !HAVE_ISWPRINT
-static inline int
-iswprint (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? wc >= ' ' && wc <= '~'
- : 1);
-}
-# define iswprint iswprint
-# endif
-
-# ifndef HAVE_DECL_WCWIDTH
-"this configure-time declaration test was not run"
-# endif
-# ifndef wcwidth
-# if !HAVE_WCWIDTH
-
-/* wcwidth doesn't exist, so assume all printable characters have
- width 1. */
-static inline int
-wcwidth (wchar_t wc)
-{
- return wc == 0 ? 0 : iswprint (wc) ? 1 : -1;
-}
-
-# elif !HAVE_DECL_WCWIDTH
-
-/* wcwidth exists but is not declared. */
-extern
-# ifdef __cplusplus
-"C"
-# endif
-int wcwidth (int /* actually wchar_t */);
-
-# endif
-# endif
-
-#endif /* HAVE_WCHAR_H */
-
-#endif /* _gl_WCWIDTH_H */
--- contrib/cpio/lib/printf-args.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2005-2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- 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 "printf-args.h"
-
-#ifdef STATIC
-STATIC
-#endif
-int
-printf_fetchargs (va_list args, arguments *a)
-{
- size_t i;
- argument *ap;
-
- for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
- switch (ap->type)
- {
- case TYPE_SCHAR:
- ap->a.a_schar = va_arg (args, /*signed char*/ int);
- break;
- case TYPE_UCHAR:
- ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
- break;
- case TYPE_SHORT:
- ap->a.a_short = va_arg (args, /*short*/ int);
- break;
- case TYPE_USHORT:
- ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
- break;
- case TYPE_INT:
- ap->a.a_int = va_arg (args, int);
- break;
- case TYPE_UINT:
- ap->a.a_uint = va_arg (args, unsigned int);
- break;
- case TYPE_LONGINT:
- ap->a.a_longint = va_arg (args, long int);
- break;
- case TYPE_ULONGINT:
- ap->a.a_ulongint = va_arg (args, unsigned long int);
- break;
-#if HAVE_LONG_LONG_INT
- case TYPE_LONGLONGINT:
- ap->a.a_longlongint = va_arg (args, long long int);
- break;
- case TYPE_ULONGLONGINT:
- ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
- break;
-#endif
- case TYPE_DOUBLE:
- ap->a.a_double = va_arg (args, double);
- break;
- case TYPE_LONGDOUBLE:
- ap->a.a_longdouble = va_arg (args, long double);
- break;
- case TYPE_CHAR:
- ap->a.a_char = va_arg (args, int);
- break;
-#if HAVE_WINT_T
- case TYPE_WIDE_CHAR:
- /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by
- default argument promotions", this is not the case in mingw32,
- where wint_t is 'unsigned short'. */
- ap->a.a_wide_char =
- (sizeof (wint_t) < sizeof (int)
- ? va_arg (args, int)
- : va_arg (args, wint_t));
- break;
-#endif
- case TYPE_STRING:
- ap->a.a_string = va_arg (args, const char *);
- /* A null pointer is an invalid argument for "%s", but in practice
- it occurs quite frequently in printf statements that produce
- debug output. Use a fallback in this case. */
- if (ap->a.a_string == NULL)
- ap->a.a_string = "(NULL)";
- break;
-#if HAVE_WCHAR_T
- case TYPE_WIDE_STRING:
- ap->a.a_wide_string = va_arg (args, const wchar_t *);
- /* A null pointer is an invalid argument for "%ls", but in practice
- it occurs quite frequently in printf statements that produce
- debug output. Use a fallback in this case. */
- if (ap->a.a_wide_string == NULL)
- {
- static const wchar_t wide_null_string[] =
- {
- (wchar_t)'(',
- (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L',
- (wchar_t)')',
- (wchar_t)0
- };
- ap->a.a_wide_string = wide_null_string;
- }
- break;
-#endif
- case TYPE_POINTER:
- ap->a.a_pointer = va_arg (args, void *);
- break;
- case TYPE_COUNT_SCHAR_POINTER:
- ap->a.a_count_schar_pointer = va_arg (args, signed char *);
- break;
- case TYPE_COUNT_SHORT_POINTER:
- ap->a.a_count_short_pointer = va_arg (args, short *);
- break;
- case TYPE_COUNT_INT_POINTER:
- ap->a.a_count_int_pointer = va_arg (args, int *);
- break;
- case TYPE_COUNT_LONGINT_POINTER:
- ap->a.a_count_longint_pointer = va_arg (args, long int *);
- break;
-#if HAVE_LONG_LONG_INT
- case TYPE_COUNT_LONGLONGINT_POINTER:
- ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
- break;
-#endif
- default:
- /* Unknown type. */
- return -1;
- }
- return 0;
-}
--- contrib/cpio/lib/strchrnul.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Searching in a string.
- Copyright (C) 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. */
-
-#if HAVE_STRCHRNUL
-
-/* Get strchrnul() declaration. */
-#include <string.h>
-
-#else
-
-/* Find the first occurrence of C in S or the final NUL byte. */
-extern char *strchrnul (const char *s, int c_in);
-
-#endif
--- contrib/cpio/lib/openat-proc.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Create /proc/self/fd-related names for subfiles of open directories.
-
- 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 Paul Eggert. */
-
-#include <config.h>
-
-#include "openat-priv.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include "dirname.h"
-#include "intprops.h"
-#include "same-inode.h"
-#include "xalloc.h"
-
-/* The results of open() in this file are not used with fchdir,
- therefore save some unnecessary work in fchdir.c. */
-#undef open
-#undef close
-
-#define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/%s"
-
-#define PROC_SELF_FD_NAME_SIZE_BOUND(len) \
- (sizeof PROC_SELF_FD_FORMAT - sizeof "%d%s" \
- + INT_STRLEN_BOUND (int) + (len) + 1)
-
-
-/* Set BUF to the expansion of PROC_SELF_FD_FORMAT, using FD and FILE
- respectively for %d and %s. If successful, return BUF if the
- result fits in BUF, dynamically allocated memory otherwise. But
- return NULL if /proc is not reliable. */
-char *
-openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file)
-{
- static int proc_status = 0;
-
- if (! proc_status)
- {
- /* Set PROC_STATUS to a positive value if /proc/self/fd is
- reliable, and a negative value otherwise. Solaris 10
- /proc/self/fd mishandles "..", and any file name might expand
- to ".." after symbolic link expansion, so avoid /proc/self/fd
- if it mishandles "..". Solaris 10 has openat, but this
- problem is exhibited on code that built on Solaris 8 and
- running on Solaris 10. */
-
- int proc_self_fd = open ("/proc/self/fd", O_RDONLY);
- if (proc_self_fd < 0)
- proc_status = -1;
- else
- {
- struct stat proc_self_fd_dotdot_st;
- struct stat proc_self_st;
- char dotdot_buf[PROC_SELF_FD_NAME_SIZE_BOUND (sizeof ".." - 1)];
- sprintf (dotdot_buf, PROC_SELF_FD_FORMAT, proc_self_fd, "..");
- proc_status =
- ((stat (dotdot_buf, &proc_self_fd_dotdot_st) == 0
- && stat ("/proc/self", &proc_self_st) == 0
- && SAME_INODE (proc_self_fd_dotdot_st, proc_self_st))
- ? 1 : -1);
- close (proc_self_fd);
- }
- }
-
- if (proc_status < 0)
- return NULL;
- else
- {
- size_t bufsize = PROC_SELF_FD_NAME_SIZE_BOUND (strlen (file));
- char *result = (bufsize < OPENAT_BUFFER_SIZE ? buf : xmalloc (bufsize));
- sprintf (result, PROC_SELF_FD_FORMAT, fd, file);
- return result;
- }
-}
--- contrib/cpio/lib/safe-write.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* An interface to write() that retries after interrupts.
- Copyright (C) 2002 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 <stddef.h>
-
-#define SAFE_WRITE_ERROR ((size_t) -1)
-
-/* Write up to COUNT bytes at BUF to descriptor FD, retrying if interrupted.
- Return the actual number of bytes written, zero for EOF, or SAFE_WRITE_ERROR
- upon error. */
-extern size_t safe_write (int fd, const void *buf, size_t count);
--- contrib/cpio/lib/alloca_.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 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 */
--- contrib/cpio/lib/strncasecmp.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* strncasecmp.c -- case insensitive string comparator
- Copyright (C) 1998-1999, 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>
-
-/* Specification. */
-#include "strcase.h"
-
-#include <ctype.h>
-#include <limits.h>
-
-#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
-
-/* Compare no more than N bytes of strings S1 and S2,
- ignoring case, returning less than, equal to or
- greater than zero if S1 is lexicographically less
- than, equal to or greater than S2. */
-
-int
-strncasecmp (const char *s1, const char *s2, size_t n)
-{
- register const unsigned char *p1 = (const unsigned char *) s1;
- register const unsigned char *p2 = (const unsigned char *) s2;
- unsigned char c1, c2;
-
- if (p1 == p2 || n == 0)
- return 0;
-
- do
- {
- c1 = TOLOWER (*p1);
- c2 = TOLOWER (*p2);
-
- if (--n == 0 || c1 == '\0')
- break;
-
- ++p1;
- ++p2;
- }
- while (c1 == c2);
-
- if (UCHAR_MAX <= INT_MAX)
- return c1 - c2;
- else
- /* On machines where 'char' and 'int' are types of the same size, the
- difference of two 'unsigned char' values - including the sign bit -
- doesn't fit in an 'int'. */
- return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
-}
--- contrib/cpio/lib/fd-safer.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Return a safer copy of a file descriptor.
-
- 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 Paul Eggert. */
-
-#include <config.h>
-
-#include "unistd-safer.h"
-
-#include <errno.h>
-
-#include <unistd.h>
-#ifndef STDIN_FILENO
-# define STDIN_FILENO 0
-#endif
-#ifndef STDERR_FILENO
-# define STDERR_FILENO 2
-#endif
-
-/* Return FD, unless FD would be a copy of standard input, output, or
- error; in that case, return a duplicate of FD, closing FD. On
- failure to duplicate, close FD, set errno, and return -1. Preserve
- errno if FD is negative, so that the caller can always inspect
- errno when the returned value is negative.
-
- This function is usefully wrapped around functions that return file
- descriptors, e.g., fd_safer (open ("file", O_RDONLY)). */
-
-int
-fd_safer (int fd)
-{
- if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
- {
- int f = dup_safer (fd);
- int e = errno;
- close (fd);
- errno = e;
- fd = f;
- }
-
- return fd;
-}
--- contrib/cpio/lib/allocsa.valgrind
+++ /dev/null
@@ -1,7 +0,0 @@
-# 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
-}
--- contrib/cpio/lib/memchr.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006 Free
- Software Foundation, Inc.
-
- Based on strlen implementation by Torbjorn Granlund (tege at sics.se),
- with help from Dan Sahlin (dan at sics.se) and
- commentary by Jim Blandy (jimb at ai.mit.edu);
- adaptation to memchr suggested by Dick Karpinski (dick at cca.ucsf.edu),
- and implemented by Roland McGrath (roland at ai.mit.edu).
-
-NOTE: The canonical source of this file is maintained with the GNU C Library.
-Bugs can be reported to bug-glibc at prep.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 _LIBC
-# include <config.h>
-#endif
-
-#include <string.h>
-
-#include <stddef.h>
-
-#if defined _LIBC
-# include <memcopy.h>
-#else
-# define reg_char char
-#endif
-
-#include <limits.h>
-
-#if HAVE_BP_SYM_H || defined _LIBC
-# include <bp-sym.h>
-#else
-# define BP_SYM(sym) sym
-#endif
-
-#undef memchr
-#undef __memchr
-
-/* Search no more than N bytes of S for C. */
-void *
-__memchr (void const *s, int c_in, size_t n)
-{
- const unsigned char *char_ptr;
- const unsigned long int *longword_ptr;
- unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
- int i;
-
- c = (unsigned char) c_in;
-
- /* Handle the first few characters by reading one character at a time.
- Do this until CHAR_PTR is aligned on a longword boundary. */
- for (char_ptr = (const unsigned char *) s;
- n > 0 && (size_t) char_ptr % sizeof longword != 0;
- --n, ++char_ptr)
- if (*char_ptr == c)
- return (void *) char_ptr;
-
- /* All these elucidatory comments refer to 4-byte longwords,
- but the theory applies equally well to any size longwords. */
-
- longword_ptr = (const unsigned long int *) char_ptr;
-
- /* Bits 31, 24, 16, and 8 of this number are zero. Call these bits
- the "holes." Note that there is a hole just to the left of
- each byte, with an extra at the end:
-
- bits: 01111110 11111110 11111110 11111111
- bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD
-
- The 1-bits make sure that carries propagate to the next 0-bit.
- The 0-bits provide holes for carries to fall into. */
-
- /* Set MAGIC_BITS to be this pattern of 1 and 0 bits.
- Set CHARMASK to be a longword, each of whose bytes is C. */
-
- magic_bits = 0xfefefefe;
- charmask = c | (c << 8);
- charmask |= charmask << 16;
-#if 0xffffffffU < ULONG_MAX
- magic_bits |= magic_bits << 32;
- charmask |= charmask << 32;
- if (8 < sizeof longword)
- for (i = 64; i < sizeof longword * 8; i *= 2)
- {
- magic_bits |= magic_bits << i;
- charmask |= charmask << i;
- }
-#endif
- magic_bits = (ULONG_MAX >> 1) & (magic_bits | 1);
-
- /* Instead of the traditional loop which tests each character,
- we will test a longword at a time. The tricky part is testing
- if *any of the four* bytes in the longword in question are zero. */
- while (n >= sizeof longword)
- {
- /* We tentatively exit the loop if adding MAGIC_BITS to
- LONGWORD fails to change any of the hole bits of LONGWORD.
-
- 1) Is this safe? Will it catch all the zero bytes?
- Suppose there is a byte with all zeros. Any carry bits
- propagating from its left will fall into the hole at its
- least significant bit and stop. Since there will be no
- carry from its most significant bit, the LSB of the
- byte to the left will be unchanged, and the zero will be
- detected.
-
- 2) Is this worthwhile? Will it ignore everything except
- zero bytes? Suppose every byte of LONGWORD has a bit set
- somewhere. There will be a carry into bit 8. If bit 8
- is set, this will carry into bit 16. If bit 8 is clear,
- one of bits 9-15 must be set, so there will be a carry
- into bit 16. Similarly, there will be a carry into bit
- 24. If one of bits 24-30 is set, there will be a carry
- into bit 31, so all of the hole bits will be changed.
-
- The one misfire occurs when bits 24-30 are clear and bit
- 31 is set; in this case, the hole at bit 31 is not
- changed. If we had access to the processor carry flag,
- we could close this loophole by putting the fourth hole
- at bit 32!
-
- So it ignores everything except 128's, when they're aligned
- properly.
-
- 3) But wait! Aren't we looking for C, not zero?
- Good point. So what we do is XOR LONGWORD with a longword,
- each of whose bytes is C. This turns each byte that is C
- into a zero. */
-
- longword = *longword_ptr++ ^ charmask;
-
- /* Add MAGIC_BITS to LONGWORD. */
- if ((((longword + magic_bits)
-
- /* Set those bits that were unchanged by the addition. */
- ^ ~longword)
-
- /* Look at only the hole bits. If any of the hole bits
- are unchanged, most likely one of the bytes was a
- zero. */
- & ~magic_bits) != 0)
- {
- /* Which of the bytes was C? If none of them were, it was
- a misfire; continue the search. */
-
- const unsigned char *cp = (const unsigned char *) (longword_ptr - 1);
-
- if (cp[0] == c)
- return (void *) cp;
- if (cp[1] == c)
- return (void *) &cp[1];
- if (cp[2] == c)
- return (void *) &cp[2];
- if (cp[3] == c)
- return (void *) &cp[3];
- if (4 < sizeof longword && cp[4] == c)
- return (void *) &cp[4];
- if (5 < sizeof longword && cp[5] == c)
- return (void *) &cp[5];
- if (6 < sizeof longword && cp[6] == c)
- return (void *) &cp[6];
- if (7 < sizeof longword && cp[7] == c)
- return (void *) &cp[7];
- if (8 < sizeof longword)
- for (i = 8; i < sizeof longword; i++)
- if (cp[i] == c)
- return (void *) &cp[i];
- }
-
- n -= sizeof longword;
- }
-
- char_ptr = (const unsigned char *) longword_ptr;
-
- while (n-- > 0)
- {
- if (*char_ptr == c)
- return (void *) char_ptr;
- else
- ++char_ptr;
- }
-
- return 0;
-}
-#ifdef weak_alias
-weak_alias (__memchr, BP_SYM (memchr))
-#endif
--- contrib/cpio/lib/fcntl--.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Like fcntl.h, but redefine some names to avoid glitches.
-
- 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. */
-
-/* Written by Paul Eggert. */
-
-#include <fcntl.h>
-#include "fcntl-safer.h"
-
-#undef open
-#define open open_safer
-
-#undef creat
-#define creat creat_safer
--- contrib/cpio/lib/argp.h
+++ /dev/null
@@ -1,622 +0,0 @@
-/* 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 at 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 */
--- contrib/cpio/lib/argp-ba.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* 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 at 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;
--- contrib/cpio/lib/vasnprintf.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* vsprintf with automatic memory allocation.
- Copyright (C) 2002-2004, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _VASNPRINTF_H
-#define _VASNPRINTF_H
-
-/* Get va_list. */
-#include <stdarg.h>
-
-/* Get size_t. */
-#include <stddef.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)
-# define __format__ format
-# define __printf__ printf
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Write formatted output to a string dynamically allocated with malloc().
- You can pass a preallocated buffer for the result in RESULTBUF and its
- size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
- If successful, return the address of the string (this may be = RESULTBUF
- if no dynamic memory allocation was necessary) and set *LENGTHP to the
- number of resulting bytes, excluding the trailing NUL. Upon error, set
- errno and return NULL.
-
- When dynamic memory allocation occurs, the preallocated buffer is left
- alone (with possibly modified contents). This makes it possible to use
- a statically allocated or stack-allocated buffer, like this:
-
- char buf[100];
- size_t len = sizeof (buf);
- char *output = vasnprintf (buf, &len, format, args);
- if (output == NULL)
- ... error handling ...;
- else
- {
- ... use the output string ...;
- if (output != buf)
- free (output);
- }
- */
-#if REPLACE_VASNPRINTF
-# define asnprintf rpl_asnprintf
-# define vasnprintf rpl_vasnprintf
-#endif
-extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 3, 4)));
-extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 3, 0)));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _VASNPRINTF_H */
--- contrib/cpio/lib/quote.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* quote.c - quote arguments for output
-
- Copyright (C) 1998, 1999, 2000, 2001, 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 Paul Eggert <eggert at twinsun.com> */
-
-#include <config.h>
-
-#include "quotearg.h"
-#include "quote.h"
-
-/* Return an unambiguous printable representation of NAME,
- allocated in slot N, suitable for diagnostics. */
-char const *
-quote_n (int n, char const *name)
-{
- return quotearg_n_style (n, locale_quoting_style, name);
-}
-
-/* Return an unambiguous printable representation of NAME,
- suitable for diagnostics. */
-char const *
-quote (char const *name)
-{
- return quote_n (0, name);
-}
--- contrib/cpio/lib/printf-parse.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Parse printf format string.
- Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- 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 _PRINTF_PARSE_H
-#define _PRINTF_PARSE_H
-
-#include "printf-args.h"
-
-
-/* Flags */
-#define FLAG_GROUP 1 /* ' flag */
-#define FLAG_LEFT 2 /* - flag */
-#define FLAG_SHOWSIGN 4 /* + flag */
-#define FLAG_SPACE 8 /* space flag */
-#define FLAG_ALT 16 /* # flag */
-#define FLAG_ZERO 32
-
-/* arg_index value indicating that no argument is consumed. */
-#define ARG_NONE (~(size_t)0)
-
-/* A parsed directive. */
-typedef struct
-{
- const char* dir_start;
- const char* dir_end;
- int flags;
- const char* width_start;
- const char* width_end;
- size_t width_arg_index;
- const char* precision_start;
- const char* precision_end;
- size_t precision_arg_index;
- char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
- size_t arg_index;
-}
-char_directive;
-
-/* A parsed format string. */
-typedef struct
-{
- size_t count;
- char_directive *dir;
- size_t max_width_length;
- size_t max_precision_length;
-}
-char_directives;
-
-
-/* Parses the format string. Fills in the number N of directives, and fills
- in directives[0], ..., directives[N-1], and sets directives[N].dir_start
- to the end of the format string. Also fills in the arg_type fields of the
- arguments and the needed count of arguments. */
-#ifdef STATIC
-STATIC
-#else
-extern
-#endif
-int printf_parse (const char *format, char_directives *d, arguments *a);
-
-#endif /* _PRINTF_PARSE_H */
--- contrib/cpio/lib/unlocked-io.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* Prefer faster, non-thread-safe stdio functions if available.
-
- Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- 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. */
-
-#ifndef UNLOCKED_IO_H
-# define UNLOCKED_IO_H 1
-
-/* These are wrappers for functions/macros from the GNU C library, and
- from other C libraries supporting POSIX's optional thread-safe functions.
-
- The standard I/O functions are thread-safe. These *_unlocked ones are
- more efficient but not thread-safe. That they're not thread-safe is
- fine since all of the applications in this package are single threaded.
-
- Also, some code that is shared with the GNU C library may invoke
- the *_unlocked functions directly. On hosts that lack those
- functions, invoke the non-thread-safe versions instead. */
-
-# include <stdio.h>
-
-# if HAVE_DECL_CLEARERR_UNLOCKED
-# undef clearerr
-# define clearerr(x) clearerr_unlocked (x)
-# else
-# define clearerr_unlocked(x) clearerr (x)
-# endif
-
-# if HAVE_DECL_FEOF_UNLOCKED
-# undef feof
-# define feof(x) feof_unlocked (x)
-# else
-# define feof_unlocked(x) feof (x)
-# endif
-
-# if HAVE_DECL_FERROR_UNLOCKED
-# undef ferror
-# define ferror(x) ferror_unlocked (x)
-# else
-# define ferror_unlocked(x) ferror (x)
-# endif
-
-# if HAVE_DECL_FFLUSH_UNLOCKED
-# undef fflush
-# define fflush(x) fflush_unlocked (x)
-# else
-# define fflush_unlocked(x) fflush (x)
-# endif
-
-# if HAVE_DECL_FGETS_UNLOCKED
-# undef fgets
-# define fgets(x,y,z) fgets_unlocked (x,y,z)
-# else
-# define fgets_unlocked(x,y,z) fgets (x,y,z)
-# endif
-
-# if HAVE_DECL_FPUTC_UNLOCKED
-# undef fputc
-# define fputc(x,y) fputc_unlocked (x,y)
-# else
-# define fputc_unlocked(x,y) fputc (x,y)
-# endif
-
-# if HAVE_DECL_FPUTS_UNLOCKED
-# undef fputs
-# define fputs(x,y) fputs_unlocked (x,y)
-# else
-# define fputs_unlocked(x,y) fputs (x,y)
-# endif
-
-# if HAVE_DECL_FREAD_UNLOCKED
-# undef fread
-# define fread(w,x,y,z) fread_unlocked (w,x,y,z)
-# else
-# define fread_unlocked(w,x,y,z) fread (w,x,y,z)
-# endif
-
-# if HAVE_DECL_FWRITE_UNLOCKED
-# undef fwrite
-# define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z)
-# else
-# define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
-# endif
-
-# if HAVE_DECL_GETC_UNLOCKED
-# undef getc
-# define getc(x) getc_unlocked (x)
-# else
-# define getc_unlocked(x) getc (x)
-# endif
-
-# if HAVE_DECL_GETCHAR_UNLOCKED
-# undef getchar
-# define getchar() getchar_unlocked ()
-# else
-# define getchar_unlocked() getchar ()
-# endif
-
-# if HAVE_DECL_PUTC_UNLOCKED
-# undef putc
-# define putc(x,y) putc_unlocked (x,y)
-# else
-# define putc_unlocked(x,y) putc (x,y)
-# endif
-
-# if HAVE_DECL_PUTCHAR_UNLOCKED
-# undef putchar
-# define putchar(x) putchar_unlocked (x)
-# else
-# define putchar_unlocked(x) putchar (x)
-# endif
-
-# undef flockfile
-# define flockfile(x) ((void) 0)
-
-# undef ftrylockfile
-# define ftrylockfile(x) 0
-
-# undef funlockfile
-# define funlockfile(x) ((void) 0)
-
-#endif /* UNLOCKED_IO_H */
--- contrib/cpio/lib/savedir.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Save the list of files in a directory in a string.
-
- Copyright (C) 1997, 1999, 2001, 2003, 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 at gnu.ai.mit.edu>. */
-
-#if !defined SAVEDIR_H_
-# define SAVEDIR_H_
-
-char *savedir (char const *dir);
-char *fdsavedir (int fd);
-
-#endif
--- contrib/cpio/lib/getopt_.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- 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 _GETOPT_H
-
-#ifndef __need_getopt
-# define _GETOPT_H 1
-#endif
-
-/* Standalone applications should #define __GETOPT_PREFIX to an
- identifier that prefixes the external functions and variables
- defined in this header. When this happens, include the
- headers that might declare getopt so that they will not cause
- confusion if included after this file. Then systematically rename
- identifiers so that they do not collide with the system functions
- and variables. Renaming avoids problems with some compilers and
- linkers. */
-#if defined __GETOPT_PREFIX && !defined __need_getopt
-# include <stdlib.h>
-# include <stdio.h>
-# include <unistd.h>
-# undef __need_getopt
-# undef getopt
-# undef getopt_long
-# undef getopt_long_only
-# undef optarg
-# undef opterr
-# undef optind
-# undef optopt
-# define __GETOPT_CONCAT(x, y) x ## y
-# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
-# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
-# define getopt __GETOPT_ID (getopt)
-# define getopt_long __GETOPT_ID (getopt_long)
-# define getopt_long_only __GETOPT_ID (getopt_long_only)
-# define optarg __GETOPT_ID (optarg)
-# define opterr __GETOPT_ID (opterr)
-# define optind __GETOPT_ID (optind)
-# define optopt __GETOPT_ID (optopt)
-#endif
-
-/* Standalone applications get correct prototypes for getopt_long and
- getopt_long_only; they declare "char **argv". libc uses prototypes
- with "char *const *argv" that are incorrect because getopt_long and
- getopt_long_only can permute argv; this is required for backward
- compatibility (e.g., for LSB 2.0.1).
-
- This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
- but it caused redefinition warnings if both unistd.h and getopt.h were
- included, since unistd.h includes getopt.h having previously defined
- __need_getopt.
-
- The only place where __getopt_argv_const is used is in definitions
- of getopt_long and getopt_long_only below, but these are visible
- only if __need_getopt is not defined, so it is quite safe to rewrite
- the conditional as follows:
-*/
-#if !defined __need_getopt
-# if defined __GETOPT_PREFIX
-# define __getopt_argv_const /* empty */
-# else
-# define __getopt_argv_const const
-# endif
-#endif
-
-/* If __GNU_LIBRARY__ is not already defined, either we are being used
- standalone, or this is the first header included in the source file.
- If we are being used with glibc, we need to include <features.h>, but
- that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
- not defined, include <ctype.h>, which will pull in <features.h> for us
- if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
- doesn't flood the namespace with stuff the way some other headers do.) */
-#if !defined __GNU_LIBRARY__
-# include <ctype.h>
-#endif
-
-#ifndef __THROW
-# ifndef __GNUC_PREREQ
-# define __GNUC_PREREQ(maj, min) (0)
-# endif
-# if defined __cplusplus && __GNUC_PREREQ (2,8)
-# define __THROW throw ()
-# else
-# define __THROW
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
-
-extern int optopt;
-
-#ifndef __need_getopt
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
- zero.
-
- The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
-
-struct option
-{
- const char *name;
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'. */
-
-# define no_argument 0
-# define required_argument 1
-# define optional_argument 2
-#endif /* need getopt */
-
-
-/* Get definitions and prototypes for functions to process the
- arguments in ARGV (ARGC of them, minus the program name) for
- options given in OPTS.
-
- Return the option character from OPTS just read. Return -1 when
- there are no more options. For unrecognized options, or options
- missing arguments, `optopt' is set to the option letter, and '?' is
- returned.
-
- The OPTS string is a list of characters which are recognized option
- letters, optionally followed by colons, specifying that that letter
- takes an argument, to be placed in `optarg'.
-
- If a letter in OPTS is followed by two colons, its argument is
- optional. This behavior is specific to the GNU `getopt'.
-
- The argument `--' causes premature termination of argument
- scanning, explicitly telling `getopt' that there are no more
- options.
-
- If OPTS begins with `-', then non-option arguments are treated as
- arguments to the option '\1'. This behavior is specific to the GNU
- `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in
- the environment, then do not permute arguments. */
-
-extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
- __THROW;
-
-#ifndef __need_getopt
-extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind)
- __THROW;
-extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind)
- __THROW;
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-/* Make sure we later can get all the definitions and declarations. */
-#undef __need_getopt
-
-#endif /* getopt.h */
--- contrib/cpio/lib/getdate.c
+++ /dev/null
@@ -1,3289 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.3. */
-
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 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; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output. */
-#define YYBISON 1
-
-/* Bison version. */
-#define YYBISON_VERSION "2.3"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 1
-
-/* Using locations. */
-#define YYLSP_NEEDED 0
-
-
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- tAGO = 258,
- tDST = 259,
- tYEAR_UNIT = 260,
- tMONTH_UNIT = 261,
- tHOUR_UNIT = 262,
- tMINUTE_UNIT = 263,
- tSEC_UNIT = 264,
- tDAY_UNIT = 265,
- tDAY = 266,
- tDAYZONE = 267,
- tLOCAL_ZONE = 268,
- tMERIDIAN = 269,
- tMONTH = 270,
- tORDINAL = 271,
- tZONE = 272,
- tSNUMBER = 273,
- tUNUMBER = 274,
- tSDECIMAL_NUMBER = 275,
- tUDECIMAL_NUMBER = 276
- };
-#endif
-/* Tokens. */
-#define tAGO 258
-#define tDST 259
-#define tYEAR_UNIT 260
-#define tMONTH_UNIT 261
-#define tHOUR_UNIT 262
-#define tMINUTE_UNIT 263
-#define tSEC_UNIT 264
-#define tDAY_UNIT 265
-#define tDAY 266
-#define tDAYZONE 267
-#define tLOCAL_ZONE 268
-#define tMERIDIAN 269
-#define tMONTH 270
-#define tORDINAL 271
-#define tZONE 272
-#define tSNUMBER 273
-#define tUNUMBER 274
-#define tSDECIMAL_NUMBER 275
-#define tUDECIMAL_NUMBER 276
-
-
-
-
-/* Copy the first part of user declarations. */
-#line 1 "getdate.y"
-
-/* Parse a string into an internal time stamp.
-
- Copyright (C) 1999, 2000, 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. */
-
-/* Originally written by Steven M. Bellovin <smb at research.att.com> while
- at the University of North Carolina at Chapel Hill. Later tweaked by
- a couple of people on Usenet. Completely overhauled by Rich $alz
- <rsalz at bbn.com> and Jim Berets <jberets at bbn.com> in August, 1990.
-
- Modified by Paul Eggert <eggert at twinsun.com> in August 1999 to do
- the right thing about local DST. Also modified by Paul Eggert
- <eggert at cs.ucla.edu> in February 2004 to support
- nanosecond-resolution time stamps, and in October 2004 to support
- TZ strings in dates. */
-
-/* FIXME: Check for arithmetic overflow in all cases, not just
- some of them. */
-
-#include <config.h>
-
-#include "getdate.h"
-#include "timespec.h"
-
-/* There's no need to extend the stack, so there's no need to involve
- alloca. */
-#define YYSTACK_USE_ALLOCA 0
-
-/* Tell Bison how much stack space is needed. 20 should be plenty for
- this grammar, which is not right recursive. Beware setting it too
- high, since that might cause problems on machines whose
- implementations have lame stack-overflow checking. */
-#define YYMAXDEPTH 20
-#define YYINITDEPTH YYMAXDEPTH
-
-/* Since the code of getdate.y is not included in the Emacs executable
- itself, there is no need to #define static in this file. Even if
- the code were included in the Emacs executable, it probably
- wouldn't do any harm to #undef it here; this will only cause
- problems if we try to write to a static variable, which I don't
- think this code needs to do. */
-#ifdef emacs
-# undef static
-#endif
-
-#include <ctype.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "setenv.h"
-#include "xalloc.h"
-
-
-/* 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)
-
-#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
-# define __attribute__(x)
-# endif
-#endif
-
-#ifndef ATTRIBUTE_UNUSED
-# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#endif
-
-/* Shift A right by B bits portably, by dividing A by 2**B and
- truncating towards minus infinity. A and B should be free of side
- effects, and B should be in the range 0 <= B <= INT_BITS - 2, where
- INT_BITS is the number of useful bits in an int. GNU code can
- assume that INT_BITS is at least 32.
-
- ISO C99 says that A >> B is implementation-defined if A < 0. Some
- implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift
- right in the usual way when A < 0, so SHR falls back on division if
- ordinary A >> B doesn't seem to be the usual signed shift. */
-#define SHR(a, b) \
- (-1 >> 1 == -1 \
- ? (a) >> (b) \
- : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
-
-#define EPOCH_YEAR 1970
-#define TM_YEAR_BASE 1900
-
-#define HOUR(x) ((x) * 60)
-
-/* An integer value, and the number of digits in its textual
- representation. */
-typedef struct
-{
- bool negative;
- long int value;
- size_t digits;
-} textint;
-
-/* An entry in the lexical lookup table. */
-typedef struct
-{
- char const *name;
- int type;
- int value;
-} table;
-
-/* Meridian: am, pm, or 24-hour style. */
-enum { MERam, MERpm, MER24 };
-
-enum { BILLION = 1000000000, LOG10_BILLION = 9 };
-
-/* Relative times. */
-typedef struct
-{
- /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */
- long int year;
- long int month;
- long int day;
- long int hour;
- long int minutes;
- long int seconds;
- long int ns;
-} relative_time;
-
-#if HAVE_COMPOUND_LITERALS
-# define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 })
-#else
-static relative_time const RELATIVE_TIME_0;
-#endif
-
-/* Information passed to and from the parser. */
-typedef struct
-{
- /* The input string remaining to be parsed. */
- const char *input;
-
- /* N, if this is the Nth Tuesday. */
- long int day_ordinal;
-
- /* Day of week; Sunday is 0. */
- int day_number;
-
- /* tm_isdst flag for the local zone. */
- int local_isdst;
-
- /* Time zone, in minutes east of UTC. */
- long int time_zone;
-
- /* Style used for time. */
- int meridian;
-
- /* Gregorian year, month, day, hour, minutes, seconds, and nanoseconds. */
- textint year;
- long int month;
- long int day;
- long int hour;
- long int minutes;
- struct timespec seconds; /* includes nanoseconds */
-
- /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */
- relative_time rel;
-
- /* Presence or counts of nonterminals of various flavors parsed so far. */
- bool timespec_seen;
- bool rels_seen;
- size_t dates_seen;
- size_t days_seen;
- size_t local_zones_seen;
- size_t dsts_seen;
- size_t times_seen;
- size_t zones_seen;
-
- /* Table of local time zone abbrevations, terminated by a null entry. */
- table local_time_zone_table[3];
-} parser_control;
-
-union YYSTYPE;
-static int yylex (union YYSTYPE *, parser_control *);
-static int yyerror (parser_control const *, char const *);
-static long int time_zone_hhmm (textint, long int);
-
-
-
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 214 "getdate.y"
-{
- long int intval;
- textint textintval;
- struct timespec timespec;
- relative_time rel;
-}
-/* Line 193 of yacc.c. */
-#line 348 "getdate.c"
- YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-/* Copy the second part of user declarations. */
-
-
-/* Line 216 of yacc.c. */
-#line 361 "getdate.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# else
-# define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int i)
-#else
-static int
-YYID (i)
- int i;
-#endif
-{
- return i;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee 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
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- };
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
-
-#endif
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 12
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 91
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 26
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 19
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 78
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 96
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 276
-
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const yytype_uint8 yytranslate[] =
-{
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 24, 2, 2, 25, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 23, 2,
- 2, 2, 2, 2, 22, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint8 yyprhs[] =
-{
- 0, 0, 3, 5, 7, 10, 11, 14, 16, 18,
- 20, 22, 24, 26, 28, 31, 36, 42, 49, 57,
- 59, 62, 64, 67, 71, 73, 76, 78, 81, 84,
- 87, 91, 97, 101, 105, 109, 112, 117, 120, 124,
- 127, 129, 132, 135, 137, 140, 143, 145, 148, 151,
- 153, 156, 159, 161, 164, 167, 169, 172, 175, 178,
- 181, 183, 185, 188, 191, 194, 197, 200, 203, 205,
- 207, 209, 211, 213, 215, 217, 218, 221, 222
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 27, 0, -1, 28, -1, 29, -1, 22, 39, -1,
- -1, 29, 30, -1, 31, -1, 32, -1, 33, -1,
- 35, -1, 34, -1, 36, -1, 42, -1, 19, 14,
- -1, 19, 23, 19, 44, -1, 19, 23, 19, 18,
- 43, -1, 19, 23, 19, 23, 41, 44, -1, 19,
- 23, 19, 23, 41, 18, 43, -1, 13, -1, 13,
- 4, -1, 17, -1, 17, 38, -1, 17, 18, 43,
- -1, 12, -1, 17, 4, -1, 11, -1, 11, 24,
- -1, 16, 11, -1, 19, 11, -1, 19, 25, 19,
- -1, 19, 25, 19, 25, 19, -1, 19, 18, 18,
- -1, 19, 15, 18, -1, 15, 18, 18, -1, 15,
- 19, -1, 15, 19, 24, 19, -1, 19, 15, -1,
- 19, 15, 19, -1, 37, 3, -1, 37, -1, 16,
- 5, -1, 19, 5, -1, 5, -1, 16, 6, -1,
- 19, 6, -1, 6, -1, 16, 10, -1, 19, 10,
- -1, 10, -1, 16, 7, -1, 19, 7, -1, 7,
- -1, 16, 8, -1, 19, 8, -1, 8, -1, 16,
- 9, -1, 19, 9, -1, 20, 9, -1, 21, 9,
- -1, 9, -1, 38, -1, 18, 5, -1, 18, 6,
- -1, 18, 10, -1, 18, 7, -1, 18, 8, -1,
- 18, 9, -1, 40, -1, 41, -1, 20, -1, 18,
- -1, 21, -1, 19, -1, 19, -1, -1, 23, 19,
- -1, -1, 14, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
-{
- 0, 240, 240, 241, 245, 252, 254, 258, 260, 262,
- 264, 266, 268, 270, 274, 282, 290, 300, 307, 319,
- 324, 332, 334, 344, 346, 348, 353, 358, 363, 368,
- 376, 381, 401, 408, 416, 424, 429, 435, 440, 449,
- 459, 472, 474, 476, 478, 480, 482, 484, 486, 488,
- 490, 492, 494, 496, 498, 500, 502, 504, 506, 508,
- 510, 512, 516, 518, 520, 522, 524, 526, 530, 530,
- 533, 534, 539, 540, 545, 583, 584, 590, 591
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "$end", "error", "$undefined", "tAGO", "tDST", "tYEAR_UNIT",
- "tMONTH_UNIT", "tHOUR_UNIT", "tMINUTE_UNIT", "tSEC_UNIT", "tDAY_UNIT",
- "tDAY", "tDAYZONE", "tLOCAL_ZONE", "tMERIDIAN", "tMONTH", "tORDINAL",
- "tZONE", "tSNUMBER", "tUNUMBER", "tSDECIMAL_NUMBER", "tUDECIMAL_NUMBER",
- "'@'", "':'", "','", "'/'", "$accept", "spec", "timespec", "items",
- "item", "time", "local_zone", "zone", "day", "date", "rel", "relunit",
- "relunit_snumber", "seconds", "signed_seconds", "unsigned_seconds",
- "number", "o_colon_minutes", "o_merid", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 64, 58, 44, 47
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 26, 27, 27, 28, 29, 29, 30, 30, 30,
- 30, 30, 30, 30, 31, 31, 31, 31, 31, 32,
- 32, 33, 33, 33, 33, 33, 34, 34, 34, 34,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 36,
- 36, 37, 37, 37, 37, 37, 37, 37, 37, 37,
- 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
- 37, 37, 38, 38, 38, 38, 38, 38, 39, 39,
- 40, 40, 41, 41, 42, 43, 43, 44, 44
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 1, 1, 2, 0, 2, 1, 1, 1,
- 1, 1, 1, 1, 2, 4, 5, 6, 7, 1,
- 2, 1, 2, 3, 1, 2, 1, 2, 2, 2,
- 3, 5, 3, 3, 3, 2, 4, 2, 3, 2,
- 1, 2, 2, 1, 2, 2, 1, 2, 2, 1,
- 2, 2, 1, 2, 2, 1, 2, 2, 2, 2,
- 1, 1, 2, 2, 2, 2, 2, 2, 1, 1,
- 1, 1, 1, 1, 1, 0, 2, 0, 1
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 5, 0, 0, 2, 3, 71, 73, 70, 72, 4,
- 68, 69, 1, 43, 46, 52, 55, 60, 49, 26,
- 24, 19, 0, 0, 21, 0, 74, 0, 0, 6,
- 7, 8, 9, 11, 10, 12, 40, 61, 13, 27,
- 20, 0, 35, 41, 44, 50, 53, 56, 47, 28,
- 25, 75, 22, 62, 63, 65, 66, 67, 64, 42,
- 45, 51, 54, 57, 48, 29, 14, 37, 0, 0,
- 0, 58, 59, 39, 34, 0, 0, 23, 33, 38,
- 32, 77, 30, 36, 76, 78, 75, 0, 15, 0,
- 16, 77, 31, 75, 17, 18
-};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- -1, 2, 3, 4, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 9, 10, 11, 38, 77, 88
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -79
-static const yytype_int8 yypact[] =
-{
- -10, 47, 27, -79, 25, -79, -79, -79, -79, -79,
- -79, -79, -79, -79, -79, -79, -79, -79, -79, 5,
- -79, 59, 43, 42, 10, 49, -5, 62, 63, -79,
- -79, -79, -79, -79, -79, -79, 70, -79, -79, -79,
- -79, 56, 52, -79, -79, -79, -79, -79, -79, -79,
- -79, 16, -79, -79, -79, -79, -79, -79, -79, -79,
- -79, -79, -79, -79, -79, -79, -79, 51, 57, 58,
- 60, -79, -79, -79, -79, 61, 64, -79, -79, -79,
- -79, -7, 53, -79, -79, -79, 65, -2, -79, 66,
- -79, 46, -79, 65, -79, -79
-};
-
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int8 yypgoto[] =
-{
- -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
- -79, -79, 67, -79, -79, -6, -79, -78, -9
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
-static const yytype_uint8 yytable[] =
-{
- 59, 60, 61, 62, 63, 64, 65, 85, 90, 66,
- 67, 86, 1, 68, 50, 95, 87, 6, 69, 8,
- 70, 53, 54, 55, 56, 57, 58, 12, 51, 39,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 76,
- 22, 23, 24, 25, 26, 27, 28, 43, 44, 45,
- 46, 47, 48, 49, 53, 54, 55, 56, 57, 58,
- 85, 41, 42, 40, 93, 5, 6, 7, 8, 78,
- 79, 71, 72, 73, 74, 80, 75, 81, 89, 82,
- 83, 91, 94, 84, 0, 92, 0, 0, 76, 0,
- 0, 52
-};
-
-static const yytype_int8 yycheck[] =
-{
- 5, 6, 7, 8, 9, 10, 11, 14, 86, 14,
- 15, 18, 22, 18, 4, 93, 23, 19, 23, 21,
- 25, 5, 6, 7, 8, 9, 10, 0, 18, 24,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 23,
- 15, 16, 17, 18, 19, 20, 21, 5, 6, 7,
- 8, 9, 10, 11, 5, 6, 7, 8, 9, 10,
- 14, 18, 19, 4, 18, 18, 19, 20, 21, 18,
- 19, 9, 9, 3, 18, 18, 24, 19, 25, 19,
- 19, 87, 91, 19, -1, 19, -1, -1, 23, -1,
- -1, 24
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
-{
- 0, 22, 27, 28, 29, 18, 19, 20, 21, 39,
- 40, 41, 0, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 15, 16, 17, 18, 19, 20, 21, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 42, 24,
- 4, 18, 19, 5, 6, 7, 8, 9, 10, 11,
- 4, 18, 38, 5, 6, 7, 8, 9, 10, 5,
- 6, 7, 8, 9, 10, 11, 14, 15, 18, 23,
- 25, 9, 9, 3, 18, 24, 23, 43, 18, 19,
- 18, 19, 19, 19, 19, 14, 18, 23, 44, 25,
- 43, 41, 19, 18, 44, 43
-};
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
-
-#define YYFAIL goto yyerrlab
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK (1); \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (pc, YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
-
-#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-# define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments. */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, YYLEX_PARAM)
-#else
-# define YYLEX yylex (&yylval, pc)
-#endif
-
-/* Enable debugging if requested. */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value, pc); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- parser_control *pc;
-#endif
-{
- if (!yyvaluep)
- return;
- YYUSE (pc);
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
-# endif
- switch (yytype)
- {
- default:
- break;
- }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, pc)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- parser_control *pc;
-#endif
-{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc);
- YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
-#else
-static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
-#endif
-{
- YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_control *pc)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule, pc)
- YYSTYPE *yyvsp;
- int yyrule;
- parser_control *pc;
-#endif
-{
- int yynrhs = yyr2[yyrule];
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- fprintf (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- , pc);
- fprintf (stderr, "\n");
- }
-}
-
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule, pc); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
-
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
-{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
-{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- YYSIZE_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
-
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
- int yyn = yypact[yystate];
-
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
- {
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
-
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
-
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
-
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
- }
-}
-#endif /* YYERROR_VERBOSE */
-
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_control *pc)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, pc)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- parser_control *pc;
-#endif
-{
- YYUSE (yyvaluep);
- YYUSE (pc);
-
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
- switch (yytype)
- {
-
- default:
- break;
- }
-}
-
-
-/* Prevent warnings from -Wmissing-prototypes. */
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (parser_control *pc);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-
-
-
-/*----------.
-| yyparse. |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (parser_control *pc)
-#else
-int
-yyparse (pc)
- parser_control *pc;
-#endif
-#endif
-{
- /* The look-ahead symbol. */
-int yychar;
-
-/* The semantic value of the look-ahead symbol. */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far. */
-int yynerrs;
-
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
-
-
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- YYSIZE_T yystacksize = YYINITDEPTH;
-
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
-
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
-
- yyssp = yyss;
- yyvsp = yyvs;
-
- goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
- yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
-
- yysetstate:
- *yyssp = yystate;
-
- if (yyss + yystacksize - 1 <= yyssp)
- {
- /* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- {
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
-
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
- }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
-
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
- goto yybackup;
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
-
- /* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to look-ahead token. */
- yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
- goto yydefault;
-
- /* Not known => get a look-ahead token if don't already have one. */
-
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
- }
-
- if (yychar <= YYEOF)
- {
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- /* Shift the look-ahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- yystate = yyn;
- *++yyvsp = yylval;
-
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
-yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
-
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 4:
-#line 246 "getdate.y"
- {
- pc->seconds = (yyvsp[(2) - (2)].timespec);
- pc->timespec_seen = true;
- }
- break;
-
- case 7:
-#line 259 "getdate.y"
- { pc->times_seen++; }
- break;
-
- case 8:
-#line 261 "getdate.y"
- { pc->local_zones_seen++; }
- break;
-
- case 9:
-#line 263 "getdate.y"
- { pc->zones_seen++; }
- break;
-
- case 10:
-#line 265 "getdate.y"
- { pc->dates_seen++; }
- break;
-
- case 11:
-#line 267 "getdate.y"
- { pc->days_seen++; }
- break;
-
- case 12:
-#line 269 "getdate.y"
- { pc->rels_seen = true; }
- break;
-
- case 14:
-#line 275 "getdate.y"
- {
- pc->hour = (yyvsp[(1) - (2)].textintval).value;
- pc->minutes = 0;
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
- pc->meridian = (yyvsp[(2) - (2)].intval);
- }
- break;
-
- case 15:
-#line 283 "getdate.y"
- {
- pc->hour = (yyvsp[(1) - (4)].textintval).value;
- pc->minutes = (yyvsp[(3) - (4)].textintval).value;
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
- pc->meridian = (yyvsp[(4) - (4)].intval);
- }
- break;
-
- case 16:
-#line 291 "getdate.y"
- {
- pc->hour = (yyvsp[(1) - (5)].textintval).value;
- pc->minutes = (yyvsp[(3) - (5)].textintval).value;
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
- pc->meridian = MER24;
- pc->zones_seen++;
- pc->time_zone = time_zone_hhmm ((yyvsp[(4) - (5)].textintval), (yyvsp[(5) - (5)].intval));
- }
- break;
-
- case 17:
-#line 301 "getdate.y"
- {
- pc->hour = (yyvsp[(1) - (6)].textintval).value;
- pc->minutes = (yyvsp[(3) - (6)].textintval).value;
- pc->seconds = (yyvsp[(5) - (6)].timespec);
- pc->meridian = (yyvsp[(6) - (6)].intval);
- }
- break;
-
- case 18:
-#line 308 "getdate.y"
- {
- pc->hour = (yyvsp[(1) - (7)].textintval).value;
- pc->minutes = (yyvsp[(3) - (7)].textintval).value;
- pc->seconds = (yyvsp[(5) - (7)].timespec);
- pc->meridian = MER24;
- pc->zones_seen++;
- pc->time_zone = time_zone_hhmm ((yyvsp[(6) - (7)].textintval), (yyvsp[(7) - (7)].intval));
- }
- break;
-
- case 19:
-#line 320 "getdate.y"
- {
- pc->local_isdst = (yyvsp[(1) - (1)].intval);
- pc->dsts_seen += (0 < (yyvsp[(1) - (1)].intval));
- }
- break;
-
- case 20:
-#line 325 "getdate.y"
- {
- pc->local_isdst = 1;
- pc->dsts_seen += (0 < (yyvsp[(1) - (2)].intval)) + 1;
- }
- break;
-
- case 21:
-#line 333 "getdate.y"
- { pc->time_zone = (yyvsp[(1) - (1)].intval); }
- break;
-
- case 22:
-#line 335 "getdate.y"
- { pc->time_zone = (yyvsp[(1) - (2)].intval);
- pc->rel.ns += (yyvsp[(2) - (2)].rel).ns;
- pc->rel.seconds += (yyvsp[(2) - (2)].rel).seconds;
- pc->rel.minutes += (yyvsp[(2) - (2)].rel).minutes;
- pc->rel.hour += (yyvsp[(2) - (2)].rel).hour;
- pc->rel.day += (yyvsp[(2) - (2)].rel).day;
- pc->rel.month += (yyvsp[(2) - (2)].rel).month;
- pc->rel.year += (yyvsp[(2) - (2)].rel).year;
- pc->rels_seen = true; }
- break;
-
- case 23:
-#line 345 "getdate.y"
- { pc->time_zone = (yyvsp[(1) - (3)].intval) + time_zone_hhmm ((yyvsp[(2) - (3)].textintval), (yyvsp[(3) - (3)].intval)); }
- break;
-
- case 24:
-#line 347 "getdate.y"
- { pc->time_zone = (yyvsp[(1) - (1)].intval) + 60; }
- break;
-
- case 25:
-#line 349 "getdate.y"
- { pc->time_zone = (yyvsp[(1) - (2)].intval) + 60; }
- break;
-
- case 26:
-#line 354 "getdate.y"
- {
- pc->day_ordinal = 1;
- pc->day_number = (yyvsp[(1) - (1)].intval);
- }
- break;
-
- case 27:
-#line 359 "getdate.y"
- {
- pc->day_ordinal = 1;
- pc->day_number = (yyvsp[(1) - (2)].intval);
- }
- break;
-
- case 28:
-#line 364 "getdate.y"
- {
- pc->day_ordinal = (yyvsp[(1) - (2)].intval);
- pc->day_number = (yyvsp[(2) - (2)].intval);
- }
- break;
-
- case 29:
-#line 369 "getdate.y"
- {
- pc->day_ordinal = (yyvsp[(1) - (2)].textintval).value;
- pc->day_number = (yyvsp[(2) - (2)].intval);
- }
- break;
-
- case 30:
-#line 377 "getdate.y"
- {
- pc->month = (yyvsp[(1) - (3)].textintval).value;
- pc->day = (yyvsp[(3) - (3)].textintval).value;
- }
- break;
-
- case 31:
-#line 382 "getdate.y"
- {
- /* Interpret as YYYY/MM/DD if the first value has 4 or more digits,
- otherwise as MM/DD/YY.
- The goal in recognizing YYYY/MM/DD is solely to support legacy
- machine-generated dates like those in an RCS log listing. If
- you want portability, use the ISO 8601 format. */
- if (4 <= (yyvsp[(1) - (5)].textintval).digits)
- {
- pc->year = (yyvsp[(1) - (5)].textintval);
- pc->month = (yyvsp[(3) - (5)].textintval).value;
- pc->day = (yyvsp[(5) - (5)].textintval).value;
- }
- else
- {
- pc->month = (yyvsp[(1) - (5)].textintval).value;
- pc->day = (yyvsp[(3) - (5)].textintval).value;
- pc->year = (yyvsp[(5) - (5)].textintval);
- }
- }
- break;
-
- case 32:
-#line 402 "getdate.y"
- {
- /* ISO 8601 format. YYYY-MM-DD. */
- pc->year = (yyvsp[(1) - (3)].textintval);
- pc->month = -(yyvsp[(2) - (3)].textintval).value;
- pc->day = -(yyvsp[(3) - (3)].textintval).value;
- }
- break;
-
- case 33:
-#line 409 "getdate.y"
- {
- /* e.g. 17-JUN-1992. */
- pc->day = (yyvsp[(1) - (3)].textintval).value;
- pc->month = (yyvsp[(2) - (3)].intval);
- pc->year.value = -(yyvsp[(3) - (3)].textintval).value;
- pc->year.digits = (yyvsp[(3) - (3)].textintval).digits;
- }
- break;
-
- case 34:
-#line 417 "getdate.y"
- {
- /* e.g. JUN-17-1992. */
- pc->month = (yyvsp[(1) - (3)].intval);
- pc->day = -(yyvsp[(2) - (3)].textintval).value;
- pc->year.value = -(yyvsp[(3) - (3)].textintval).value;
- pc->year.digits = (yyvsp[(3) - (3)].textintval).digits;
- }
- break;
-
- case 35:
-#line 425 "getdate.y"
- {
- pc->month = (yyvsp[(1) - (2)].intval);
- pc->day = (yyvsp[(2) - (2)].textintval).value;
- }
- break;
-
- case 36:
-#line 430 "getdate.y"
- {
- pc->month = (yyvsp[(1) - (4)].intval);
- pc->day = (yyvsp[(2) - (4)].textintval).value;
- pc->year = (yyvsp[(4) - (4)].textintval);
- }
- break;
-
- case 37:
-#line 436 "getdate.y"
- {
- pc->day = (yyvsp[(1) - (2)].textintval).value;
- pc->month = (yyvsp[(2) - (2)].intval);
- }
- break;
-
- case 38:
-#line 441 "getdate.y"
- {
- pc->day = (yyvsp[(1) - (3)].textintval).value;
- pc->month = (yyvsp[(2) - (3)].intval);
- pc->year = (yyvsp[(3) - (3)].textintval);
- }
- break;
-
- case 39:
-#line 450 "getdate.y"
- {
- pc->rel.ns -= (yyvsp[(1) - (2)].rel).ns;
- pc->rel.seconds -= (yyvsp[(1) - (2)].rel).seconds;
- pc->rel.minutes -= (yyvsp[(1) - (2)].rel).minutes;
- pc->rel.hour -= (yyvsp[(1) - (2)].rel).hour;
- pc->rel.day -= (yyvsp[(1) - (2)].rel).day;
- pc->rel.month -= (yyvsp[(1) - (2)].rel).month;
- pc->rel.year -= (yyvsp[(1) - (2)].rel).year;
- }
- break;
-
- case 40:
-#line 460 "getdate.y"
- {
- pc->rel.ns += (yyvsp[(1) - (1)].rel).ns;
- pc->rel.seconds += (yyvsp[(1) - (1)].rel).seconds;
- pc->rel.minutes += (yyvsp[(1) - (1)].rel).minutes;
- pc->rel.hour += (yyvsp[(1) - (1)].rel).hour;
- pc->rel.day += (yyvsp[(1) - (1)].rel).day;
- pc->rel.month += (yyvsp[(1) - (1)].rel).month;
- pc->rel.year += (yyvsp[(1) - (1)].rel).year;
- }
- break;
-
- case 41:
-#line 473 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].intval); }
- break;
-
- case 42:
-#line 475 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; }
- break;
-
- case 43:
-#line 477 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = 1; }
- break;
-
- case 44:
-#line 479 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].intval); }
- break;
-
- case 45:
-#line 481 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; }
- break;
-
- case 46:
-#line 483 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = 1; }
- break;
-
- case 47:
-#line 485 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); }
- break;
-
- case 48:
-#line 487 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); }
- break;
-
- case 49:
-#line 489 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (1)].intval); }
- break;
-
- case 50:
-#line 491 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].intval); }
- break;
-
- case 51:
-#line 493 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; }
- break;
-
- case 52:
-#line 495 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = 1; }
- break;
-
- case 53:
-#line 497 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].intval); }
- break;
-
- case 54:
-#line 499 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; }
- break;
-
- case 55:
-#line 501 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = 1; }
- break;
-
- case 56:
-#line 503 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].intval); }
- break;
-
- case 57:
-#line 505 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; }
- break;
-
- case 58:
-#line 507 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; }
- break;
-
- case 59:
-#line 509 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; }
- break;
-
- case 60:
-#line 511 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = 1; }
- break;
-
- case 62:
-#line 517 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; }
- break;
-
- case 63:
-#line 519 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; }
- break;
-
- case 64:
-#line 521 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); }
- break;
-
- case 65:
-#line 523 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; }
- break;
-
- case 66:
-#line 525 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; }
- break;
-
- case 67:
-#line 527 "getdate.y"
- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; }
- break;
-
- case 71:
-#line 535 "getdate.y"
- { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; }
- break;
-
- case 73:
-#line 541 "getdate.y"
- { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; }
- break;
-
- case 74:
-#line 546 "getdate.y"
- {
- if (pc->dates_seen && ! pc->year.digits
- && ! pc->rels_seen && (pc->times_seen || 2 < (yyvsp[(1) - (1)].textintval).digits))
- pc->year = (yyvsp[(1) - (1)].textintval);
- else
- {
- if (4 < (yyvsp[(1) - (1)].textintval).digits)
- {
- pc->dates_seen++;
- pc->day = (yyvsp[(1) - (1)].textintval).value % 100;
- pc->month = ((yyvsp[(1) - (1)].textintval).value / 100) % 100;
- pc->year.value = (yyvsp[(1) - (1)].textintval).value / 10000;
- pc->year.digits = (yyvsp[(1) - (1)].textintval).digits - 4;
- }
- else
- {
- pc->times_seen++;
- if ((yyvsp[(1) - (1)].textintval).digits <= 2)
- {
- pc->hour = (yyvsp[(1) - (1)].textintval).value;
- pc->minutes = 0;
- }
- else
- {
- pc->hour = (yyvsp[(1) - (1)].textintval).value / 100;
- pc->minutes = (yyvsp[(1) - (1)].textintval).value % 100;
- }
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
- pc->meridian = MER24;
- }
- }
- }
- break;
-
- case 75:
-#line 583 "getdate.y"
- { (yyval.intval) = -1; }
- break;
-
- case 76:
-#line 585 "getdate.y"
- { (yyval.intval) = (yyvsp[(2) - (2)].textintval).value; }
- break;
-
- case 77:
-#line 590 "getdate.y"
- { (yyval.intval) = MER24; }
- break;
-
- case 78:
-#line 592 "getdate.y"
- { (yyval.intval) = (yyvsp[(1) - (1)].intval); }
- break;
-
-
-/* Line 1267 of yacc.c. */
-#line 2149 "getdate.c"
- default: break;
- }
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
-
- *++yyvsp = yyval;
-
-
- /* Now `shift' the result of the reduction. Determine what state
- that goes to, based on the state we popped back to and the rule
- number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
-
- goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
-#if ! YYERROR_VERBOSE
- yyerror (pc, YY_("syntax error"));
-#else
- {
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (pc, yymsg);
- }
- else
- {
- yyerror (pc, YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
- }
-#endif
- }
-
-
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse look-ahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval, pc);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse look-ahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
-
- /* Do not reclaim the symbols of the rule which action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
-
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp, pc);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- *++yyvsp = yylval;
-
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-#ifndef yyoverflow
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (pc, YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
-#endif
-
-yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, pc);
- /* Do not reclaim the symbols of the rule which action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp, pc);
- YYPOPSTACK (1);
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
-}
-
-
-#line 595 "getdate.y"
-
-
-static table const meridian_table[] =
-{
- { "AM", tMERIDIAN, MERam },
- { "A.M.", tMERIDIAN, MERam },
- { "PM", tMERIDIAN, MERpm },
- { "P.M.", tMERIDIAN, MERpm },
- { NULL, 0, 0 }
-};
-
-static table const dst_table[] =
-{
- { "DST", tDST, 0 }
-};
-
-static table const month_and_day_table[] =
-{
- { "JANUARY", tMONTH, 1 },
- { "FEBRUARY", tMONTH, 2 },
- { "MARCH", tMONTH, 3 },
- { "APRIL", tMONTH, 4 },
- { "MAY", tMONTH, 5 },
- { "JUNE", tMONTH, 6 },
- { "JULY", tMONTH, 7 },
- { "AUGUST", tMONTH, 8 },
- { "SEPTEMBER",tMONTH, 9 },
- { "SEPT", tMONTH, 9 },
- { "OCTOBER", tMONTH, 10 },
- { "NOVEMBER", tMONTH, 11 },
- { "DECEMBER", tMONTH, 12 },
- { "SUNDAY", tDAY, 0 },
- { "MONDAY", tDAY, 1 },
- { "TUESDAY", tDAY, 2 },
- { "TUES", tDAY, 2 },
- { "WEDNESDAY",tDAY, 3 },
- { "WEDNES", tDAY, 3 },
- { "THURSDAY", tDAY, 4 },
- { "THUR", tDAY, 4 },
- { "THURS", tDAY, 4 },
- { "FRIDAY", tDAY, 5 },
- { "SATURDAY", tDAY, 6 },
- { NULL, 0, 0 }
-};
-
-static table const time_units_table[] =
-{
- { "YEAR", tYEAR_UNIT, 1 },
- { "MONTH", tMONTH_UNIT, 1 },
- { "FORTNIGHT",tDAY_UNIT, 14 },
- { "WEEK", tDAY_UNIT, 7 },
- { "DAY", tDAY_UNIT, 1 },
- { "HOUR", tHOUR_UNIT, 1 },
- { "MINUTE", tMINUTE_UNIT, 1 },
- { "MIN", tMINUTE_UNIT, 1 },
- { "SECOND", tSEC_UNIT, 1 },
- { "SEC", tSEC_UNIT, 1 },
- { NULL, 0, 0 }
-};
-
-/* Assorted relative-time words. */
-static table const relative_time_table[] =
-{
- { "TOMORROW", tDAY_UNIT, 1 },
- { "YESTERDAY",tDAY_UNIT, -1 },
- { "TODAY", tDAY_UNIT, 0 },
- { "NOW", tDAY_UNIT, 0 },
- { "LAST", tORDINAL, -1 },
- { "THIS", tORDINAL, 0 },
- { "NEXT", tORDINAL, 1 },
- { "FIRST", tORDINAL, 1 },
-/*{ "SECOND", tORDINAL, 2 }, */
- { "THIRD", tORDINAL, 3 },
- { "FOURTH", tORDINAL, 4 },
- { "FIFTH", tORDINAL, 5 },
- { "SIXTH", tORDINAL, 6 },
- { "SEVENTH", tORDINAL, 7 },
- { "EIGHTH", tORDINAL, 8 },
- { "NINTH", tORDINAL, 9 },
- { "TENTH", tORDINAL, 10 },
- { "ELEVENTH", tORDINAL, 11 },
- { "TWELFTH", tORDINAL, 12 },
- { "AGO", tAGO, 1 },
- { NULL, 0, 0 }
-};
-
-/* The universal time zone table. These labels can be used even for
- time stamps that would not otherwise be valid, e.g., GMT time
- stamps in London during summer. */
-static table const universal_time_zone_table[] =
-{
- { "GMT", tZONE, HOUR ( 0) }, /* Greenwich Mean */
- { "UT", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */
- { "UTC", tZONE, HOUR ( 0) },
- { NULL, 0, 0 }
-};
-
-/* The time zone table. This table is necessarily incomplete, as time
- zone abbreviations are ambiguous; e.g. Australians interpret "EST"
- as Eastern time in Australia, not as US Eastern Standard Time.
- You cannot rely on getdate to handle arbitrary time zone
- abbreviations; use numeric abbreviations like `-0500' instead. */
-static table const time_zone_table[] =
-{
- { "WET", tZONE, HOUR ( 0) }, /* Western European */
- { "WEST", tDAYZONE, HOUR ( 0) }, /* Western European Summer */
- { "BST", tDAYZONE, HOUR ( 0) }, /* British Summer */
- { "ART", tZONE, -HOUR ( 3) }, /* Argentina */
- { "BRT", tZONE, -HOUR ( 3) }, /* Brazil */
- { "BRST", tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */
- { "NST", tZONE, -(HOUR ( 3) + 30) }, /* Newfoundland Standard */
- { "NDT", tDAYZONE,-(HOUR ( 3) + 30) }, /* Newfoundland Daylight */
- { "AST", tZONE, -HOUR ( 4) }, /* Atlantic Standard */
- { "ADT", tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */
- { "CLT", tZONE, -HOUR ( 4) }, /* Chile */
- { "CLST", tDAYZONE, -HOUR ( 4) }, /* Chile Summer */
- { "EST", tZONE, -HOUR ( 5) }, /* Eastern Standard */
- { "EDT", tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */
- { "CST", tZONE, -HOUR ( 6) }, /* Central Standard */
- { "CDT", tDAYZONE, -HOUR ( 6) }, /* Central Daylight */
- { "MST", tZONE, -HOUR ( 7) }, /* Mountain Standard */
- { "MDT", tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */
- { "PST", tZONE, -HOUR ( 8) }, /* Pacific Standard */
- { "PDT", tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */
- { "AKST", tZONE, -HOUR ( 9) }, /* Alaska Standard */
- { "AKDT", tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */
- { "HST", tZONE, -HOUR (10) }, /* Hawaii Standard */
- { "HAST", tZONE, -HOUR (10) }, /* Hawaii-Aleutian Standard */
- { "HADT", tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */
- { "SST", tZONE, -HOUR (12) }, /* Samoa Standard */
- { "WAT", tZONE, HOUR ( 1) }, /* West Africa */
- { "CET", tZONE, HOUR ( 1) }, /* Central European */
- { "CEST", tDAYZONE, HOUR ( 1) }, /* Central European Summer */
- { "MET", tZONE, HOUR ( 1) }, /* Middle European */
- { "MEZ", tZONE, HOUR ( 1) }, /* Middle European */
- { "MEST", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */
- { "MESZ", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */
- { "EET", tZONE, HOUR ( 2) }, /* Eastern European */
- { "EEST", tDAYZONE, HOUR ( 2) }, /* Eastern European Summer */
- { "CAT", tZONE, HOUR ( 2) }, /* Central Africa */
- { "SAST", tZONE, HOUR ( 2) }, /* South Africa Standard */
- { "EAT", tZONE, HOUR ( 3) }, /* East Africa */
- { "MSK", tZONE, HOUR ( 3) }, /* Moscow */
- { "MSD", tDAYZONE, HOUR ( 3) }, /* Moscow Daylight */
- { "IST", tZONE, (HOUR ( 5) + 30) }, /* India Standard */
- { "SGT", tZONE, HOUR ( 8) }, /* Singapore */
- { "KST", tZONE, HOUR ( 9) }, /* Korea Standard */
- { "JST", tZONE, HOUR ( 9) }, /* Japan Standard */
- { "GST", tZONE, HOUR (10) }, /* Guam Standard */
- { "NZST", tZONE, HOUR (12) }, /* New Zealand Standard */
- { "NZDT", tDAYZONE, HOUR (12) }, /* New Zealand Daylight */
- { NULL, 0, 0 }
-};
-
-/* Military time zone table. */
-static table const military_table[] =
-{
- { "A", tZONE, -HOUR ( 1) },
- { "B", tZONE, -HOUR ( 2) },
- { "C", tZONE, -HOUR ( 3) },
- { "D", tZONE, -HOUR ( 4) },
- { "E", tZONE, -HOUR ( 5) },
- { "F", tZONE, -HOUR ( 6) },
- { "G", tZONE, -HOUR ( 7) },
- { "H", tZONE, -HOUR ( 8) },
- { "I", tZONE, -HOUR ( 9) },
- { "K", tZONE, -HOUR (10) },
- { "L", tZONE, -HOUR (11) },
- { "M", tZONE, -HOUR (12) },
- { "N", tZONE, HOUR ( 1) },
- { "O", tZONE, HOUR ( 2) },
- { "P", tZONE, HOUR ( 3) },
- { "Q", tZONE, HOUR ( 4) },
- { "R", tZONE, HOUR ( 5) },
- { "S", tZONE, HOUR ( 6) },
- { "T", tZONE, HOUR ( 7) },
- { "U", tZONE, HOUR ( 8) },
- { "V", tZONE, HOUR ( 9) },
- { "W", tZONE, HOUR (10) },
- { "X", tZONE, HOUR (11) },
- { "Y", tZONE, HOUR (12) },
- { "Z", tZONE, HOUR ( 0) },
- { NULL, 0, 0 }
-};
-
-
-
-/* Convert a time zone expressed as HH:MM into an integer count of
- minutes. If MM is negative, then S is of the form HHMM and needs
- to be picked apart; otherwise, S is of the form HH. */
-
-static long int
-time_zone_hhmm (textint s, long int mm)
-{
- if (mm < 0)
- return (s.value / 100) * 60 + s.value % 100;
- else
- return s.value * 60 + (s.negative ? -mm : mm);
-}
-
-static int
-to_hour (long int hours, int meridian)
-{
- switch (meridian)
- {
- default: /* Pacify GCC. */
- case MER24:
- return 0 <= hours && hours < 24 ? hours : -1;
- case MERam:
- return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1;
- case MERpm:
- return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1;
- }
-}
-
-static long int
-to_year (textint textyear)
-{
- long int year = textyear.value;
-
- if (year < 0)
- year = -year;
-
- /* XPG4 suggests that years 00-68 map to 2000-2068, and
- years 69-99 map to 1969-1999. */
- else if (textyear.digits == 2)
- year += year < 69 ? 2000 : 1900;
-
- return year;
-}
-
-static table const *
-lookup_zone (parser_control const *pc, char const *name)
-{
- table const *tp;
-
- for (tp = universal_time_zone_table; tp->name; tp++)
- if (strcmp (name, tp->name) == 0)
- return tp;
-
- /* Try local zone abbreviations before those in time_zone_table, as
- the local ones are more likely to be right. */
- for (tp = pc->local_time_zone_table; tp->name; tp++)
- if (strcmp (name, tp->name) == 0)
- return tp;
-
- for (tp = time_zone_table; tp->name; tp++)
- if (strcmp (name, tp->name) == 0)
- return tp;
-
- return NULL;
-}
-
-#if ! HAVE_TM_GMTOFF
-/* Yield the difference between *A and *B,
- measured in seconds, ignoring leap seconds.
- The body of this function is taken directly from the GNU C Library;
- see src/strftime.c. */
-static long int
-tm_diff (struct tm const *a, struct tm const *b)
-{
- /* Compute intervening leap days correctly even if year is negative.
- Take care to avoid int overflow in leap day calculations. */
- int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3);
- int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3);
- int a100 = a4 / 25 - (a4 % 25 < 0);
- int b100 = b4 / 25 - (b4 % 25 < 0);
- int a400 = SHR (a100, 2);
- int b400 = SHR (b100, 2);
- int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
- long int ayear = a->tm_year;
- long int years = ayear - b->tm_year;
- long int days = (365 * years + intervening_leap_days
- + (a->tm_yday - b->tm_yday));
- return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour))
- + (a->tm_min - b->tm_min))
- + (a->tm_sec - b->tm_sec));
-}
-#endif /* ! HAVE_TM_GMTOFF */
-
-static table const *
-lookup_word (parser_control const *pc, char *word)
-{
- char *p;
- char *q;
- size_t wordlen;
- table const *tp;
- bool period_found;
- bool abbrev;
-
- /* Make it uppercase. */
- for (p = word; *p; p++)
- {
- unsigned char ch = *p;
- *p = toupper (ch);
- }
-
- for (tp = meridian_table; tp->name; tp++)
- if (strcmp (word, tp->name) == 0)
- return tp;
-
- /* See if we have an abbreviation for a month. */
- wordlen = strlen (word);
- abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.');
-
- for (tp = month_and_day_table; tp->name; tp++)
- if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0)
- return tp;
-
- if ((tp = lookup_zone (pc, word)))
- return tp;
-
- if (strcmp (word, dst_table[0].name) == 0)
- return dst_table;
-
- for (tp = time_units_table; tp->name; tp++)
- if (strcmp (word, tp->name) == 0)
- return tp;
-
- /* Strip off any plural and try the units table again. */
- if (word[wordlen - 1] == 'S')
- {
- word[wordlen - 1] = '\0';
- for (tp = time_units_table; tp->name; tp++)
- if (strcmp (word, tp->name) == 0)
- return tp;
- word[wordlen - 1] = 'S'; /* For "this" in relative_time_table. */
- }
-
- for (tp = relative_time_table; tp->name; tp++)
- if (strcmp (word, tp->name) == 0)
- return tp;
-
- /* Military time zones. */
- if (wordlen == 1)
- for (tp = military_table; tp->name; tp++)
- if (word[0] == tp->name[0])
- return tp;
-
- /* Drop out any periods and try the time zone table again. */
- for (period_found = false, p = q = word; (*p = *q); q++)
- if (*q == '.')
- period_found = true;
- else
- p++;
- if (period_found && (tp = lookup_zone (pc, word)))
- return tp;
-
- return NULL;
-}
-
-static int
-yylex (YYSTYPE *lvalp, parser_control *pc)
-{
- unsigned char c;
- size_t count;
-
- for (;;)
- {
- while (c = *pc->input, isspace (c))
- pc->input++;
-
- if (ISDIGIT (c) || c == '-' || c == '+')
- {
- char const *p;
- int sign;
- unsigned long int value;
- if (c == '-' || c == '+')
- {
- sign = c == '-' ? -1 : 1;
- while (c = *++pc->input, isspace (c))
- continue;
- if (! ISDIGIT (c))
- /* skip the '-' sign */
- continue;
- }
- else
- sign = 0;
- p = pc->input;
- for (value = 0; ; value *= 10)
- {
- unsigned long int value1 = value + (c - '0');
- if (value1 < value)
- return '?';
- value = value1;
- c = *++p;
- if (! ISDIGIT (c))
- break;
- if (ULONG_MAX / 10 < value)
- return '?';
- }
- if ((c == '.' || c == ',') && ISDIGIT (p[1]))
- {
- time_t s;
- int ns;
- int digits;
- unsigned long int value1;
-
- /* Check for overflow when converting value to time_t. */
- if (sign < 0)
- {
- s = - value;
- if (0 < s)
- return '?';
- value1 = -s;
- }
- else
- {
- s = value;
- if (s < 0)
- return '?';
- value1 = s;
- }
- if (value != value1)
- return '?';
-
- /* Accumulate fraction, to ns precision. */
- p++;
- ns = *p++ - '0';
- for (digits = 2; digits <= LOG10_BILLION; digits++)
- {
- ns *= 10;
- if (ISDIGIT (*p))
- ns += *p++ - '0';
- }
-
- /* Skip excess digits, truncating toward -Infinity. */
- if (sign < 0)
- for (; ISDIGIT (*p); p++)
- if (*p != '0')
- {
- ns++;
- break;
- }
- while (ISDIGIT (*p))
- p++;
-
- /* Adjust to the timespec convention, which is that
- tv_nsec is always a positive offset even if tv_sec is
- negative. */
- if (sign < 0 && ns)
- {
- s--;
- if (! (s < 0))
- return '?';
- ns = BILLION - ns;
- }
-
- lvalp->timespec.tv_sec = s;
- lvalp->timespec.tv_nsec = ns;
- pc->input = p;
- return sign ? tSDECIMAL_NUMBER : tUDECIMAL_NUMBER;
- }
- else
- {
- lvalp->textintval.negative = sign < 0;
- if (sign < 0)
- {
- lvalp->textintval.value = - value;
- if (0 < lvalp->textintval.value)
- return '?';
- }
- else
- {
- lvalp->textintval.value = value;
- if (lvalp->textintval.value < 0)
- return '?';
- }
- lvalp->textintval.digits = p - pc->input;
- pc->input = p;
- return sign ? tSNUMBER : tUNUMBER;
- }
- }
-
- if (isalpha (c))
- {
- char buff[20];
- char *p = buff;
- table const *tp;
-
- do
- {
- if (p < buff + sizeof buff - 1)
- *p++ = c;
- c = *++pc->input;
- }
- while (isalpha (c) || c == '.');
-
- *p = '\0';
- tp = lookup_word (pc, buff);
- if (! tp)
- return '?';
- lvalp->intval = tp->value;
- return tp->type;
- }
-
- if (c != '(')
- return *pc->input++;
- count = 0;
- do
- {
- c = *pc->input++;
- if (c == '\0')
- return c;
- if (c == '(')
- count++;
- else if (c == ')')
- count--;
- }
- while (count != 0);
- }
-}
-
-/* Do nothing if the parser reports an error. */
-static int
-yyerror (parser_control const *pc ATTRIBUTE_UNUSED,
- char const *s ATTRIBUTE_UNUSED)
-{
- return 0;
-}
-
-/* If *TM0 is the old and *TM1 is the new value of a struct tm after
- passing it to mktime, return true if it's OK that mktime returned T.
- It's not OK if *TM0 has out-of-range members. */
-
-static bool
-mktime_ok (struct tm const *tm0, struct tm const *tm1, time_t t)
-{
- if (t == (time_t) -1)
- {
- /* Guard against falsely reporting an error when parsing a time
- stamp that happens to equal (time_t) -1, on a host that
- supports such a time stamp. */
- tm1 = localtime (&t);
- if (!tm1)
- return false;
- }
-
- return ! ((tm0->tm_sec ^ tm1->tm_sec)
- | (tm0->tm_min ^ tm1->tm_min)
- | (tm0->tm_hour ^ tm1->tm_hour)
- | (tm0->tm_mday ^ tm1->tm_mday)
- | (tm0->tm_mon ^ tm1->tm_mon)
- | (tm0->tm_year ^ tm1->tm_year));
-}
-
-/* A reasonable upper bound for the size of ordinary TZ strings.
- Use heap allocation if TZ's length exceeds this. */
-enum { TZBUFSIZE = 100 };
-
-/* Return a copy of TZ, stored in TZBUF if it fits, and heap-allocated
- otherwise. */
-static char *
-get_tz (char tzbuf[TZBUFSIZE])
-{
- char *tz = getenv ("TZ");
- if (tz)
- {
- size_t tzsize = strlen (tz) + 1;
- tz = (tzsize <= TZBUFSIZE
- ? memcpy (tzbuf, tz, tzsize)
- : xmemdup (tz, tzsize));
- }
- return tz;
-}
-
-/* Parse a date/time string, storing the resulting time value into *RESULT.
- The string itself is pointed to by P. Return true if successful.
- P can be an incomplete or relative time specification; if so, use
- *NOW as the basis for the returned time. */
-bool
-get_date (struct timespec *result, char const *p, struct timespec const *now)
-{
- time_t Start;
- long int Start_ns;
- struct tm const *tmp;
- struct tm tm;
- struct tm tm0;
- parser_control pc;
- struct timespec gettime_buffer;
- unsigned char c;
- bool tz_was_altered = false;
- char *tz0 = NULL;
- char tz0buf[TZBUFSIZE];
- bool ok = true;
-
- if (! now)
- {
- gettime (&gettime_buffer);
- now = &gettime_buffer;
- }
-
- Start = now->tv_sec;
- Start_ns = now->tv_nsec;
-
- tmp = localtime (&now->tv_sec);
- if (! tmp)
- return false;
-
- while (c = *p, isspace (c))
- p++;
-
- if (strncmp (p, "TZ=\"", 4) == 0)
- {
- char const *tzbase = p + 4;
- size_t tzsize = 1;
- char const *s;
-
- for (s = tzbase; *s; s++, tzsize++)
- if (*s == '\\')
- {
- s++;
- if (! (*s == '\\' || *s == '"'))
- break;
- }
- else if (*s == '"')
- {
- char *z;
- char *tz1;
- char tz1buf[TZBUFSIZE];
- bool large_tz = TZBUFSIZE < tzsize;
- bool setenv_ok;
- tz0 = get_tz (tz0buf);
- z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf;
- for (s = tzbase; *s != '"'; s++)
- *z++ = *(s += *s == '\\');
- *z = '\0';
- setenv_ok = setenv ("TZ", tz1, 1) == 0;
- if (large_tz)
- free (tz1);
- if (!setenv_ok)
- goto fail;
- tz_was_altered = true;
- p = s + 1;
- }
- }
-
- pc.input = p;
- pc.year.value = tmp->tm_year;
- pc.year.value += TM_YEAR_BASE;
- pc.year.digits = 0;
- pc.month = tmp->tm_mon + 1;
- pc.day = tmp->tm_mday;
- pc.hour = tmp->tm_hour;
- pc.minutes = tmp->tm_min;
- pc.seconds.tv_sec = tmp->tm_sec;
- pc.seconds.tv_nsec = Start_ns;
- tm.tm_isdst = tmp->tm_isdst;
-
- pc.meridian = MER24;
- pc.rel = RELATIVE_TIME_0;
- pc.timespec_seen = false;
- pc.rels_seen = false;
- pc.dates_seen = 0;
- pc.days_seen = 0;
- pc.times_seen = 0;
- pc.local_zones_seen = 0;
- pc.dsts_seen = 0;
- pc.zones_seen = 0;
-
-#if HAVE_STRUCT_TM_TM_ZONE
- pc.local_time_zone_table[0].name = tmp->tm_zone;
- pc.local_time_zone_table[0].type = tLOCAL_ZONE;
- pc.local_time_zone_table[0].value = tmp->tm_isdst;
- pc.local_time_zone_table[1].name = NULL;
-
- /* Probe the names used in the next three calendar quarters, looking
- for a tm_isdst different from the one we already have. */
- {
- int quarter;
- for (quarter = 1; quarter <= 3; quarter++)
- {
- time_t probe = Start + quarter * (90 * 24 * 60 * 60);
- struct tm const *probe_tm = localtime (&probe);
- if (probe_tm && probe_tm->tm_zone
- && probe_tm->tm_isdst != pc.local_time_zone_table[0].value)
- {
- {
- pc.local_time_zone_table[1].name = probe_tm->tm_zone;
- pc.local_time_zone_table[1].type = tLOCAL_ZONE;
- pc.local_time_zone_table[1].value = probe_tm->tm_isdst;
- pc.local_time_zone_table[2].name = NULL;
- }
- break;
- }
- }
- }
-#else
-#if HAVE_TZNAME
- {
-# ifndef tzname
- extern char *tzname[];
-# endif
- int i;
- for (i = 0; i < 2; i++)
- {
- pc.local_time_zone_table[i].name = tzname[i];
- pc.local_time_zone_table[i].type = tLOCAL_ZONE;
- pc.local_time_zone_table[i].value = i;
- }
- pc.local_time_zone_table[i].name = NULL;
- }
-#else
- pc.local_time_zone_table[0].name = NULL;
-#endif
-#endif
-
- if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name
- && ! strcmp (pc.local_time_zone_table[0].name,
- pc.local_time_zone_table[1].name))
- {
- /* This locale uses the same abbrevation for standard and
- daylight times. So if we see that abbreviation, we don't
- know whether it's daylight time. */
- pc.local_time_zone_table[0].value = -1;
- pc.local_time_zone_table[1].name = NULL;
- }
-
- if (yyparse (&pc) != 0)
- goto fail;
-
- if (pc.timespec_seen)
- *result = pc.seconds;
- else
- {
- if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen
- | (pc.local_zones_seen + pc.zones_seen)))
- goto fail;
-
- tm.tm_year = to_year (pc.year) - TM_YEAR_BASE;
- tm.tm_mon = pc.month - 1;
- tm.tm_mday = pc.day;
- if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen))
- {
- tm.tm_hour = to_hour (pc.hour, pc.meridian);
- if (tm.tm_hour < 0)
- goto fail;
- tm.tm_min = pc.minutes;
- tm.tm_sec = pc.seconds.tv_sec;
- }
- else
- {
- tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
- pc.seconds.tv_nsec = 0;
- }
-
- /* Let mktime deduce tm_isdst if we have an absolute time stamp. */
- if (pc.dates_seen | pc.days_seen | pc.times_seen)
- tm.tm_isdst = -1;
-
- /* But if the input explicitly specifies local time with or without
- DST, give mktime that information. */
- if (pc.local_zones_seen)
- tm.tm_isdst = pc.local_isdst;
-
- tm0 = tm;
-
- Start = mktime (&tm);
-
- if (! mktime_ok (&tm0, &tm, Start))
- {
- if (! pc.zones_seen)
- goto fail;
- else
- {
- /* Guard against falsely reporting errors near the time_t
- boundaries when parsing times in other time zones. For
- example, suppose the input string "1969-12-31 23:00:00 -0100",
- the current time zone is 8 hours ahead of UTC, and the min
- time_t value is 1970-01-01 00:00:00 UTC. Then the min
- localtime value is 1970-01-01 08:00:00, and mktime will
- therefore fail on 1969-12-31 23:00:00. To work around the
- problem, set the time zone to 1 hour behind UTC temporarily
- by setting TZ="XXX1:00" and try mktime again. */
-
- long int time_zone = pc.time_zone;
- long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone;
- long int abs_time_zone_hour = abs_time_zone / 60;
- int abs_time_zone_min = abs_time_zone % 60;
- char tz1buf[sizeof "XXX+0:00"
- + sizeof pc.time_zone * CHAR_BIT / 3];
- if (!tz_was_altered)
- tz0 = get_tz (tz0buf);
- sprintf (tz1buf, "XXX%s%ld:%02d", "-" + (time_zone < 0),
- abs_time_zone_hour, abs_time_zone_min);
- if (setenv ("TZ", tz1buf, 1) != 0)
- goto fail;
- tz_was_altered = true;
- tm = tm0;
- Start = mktime (&tm);
- if (! mktime_ok (&tm0, &tm, Start))
- goto fail;
- }
- }
-
- if (pc.days_seen && ! pc.dates_seen)
- {
- tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7
- + 7 * (pc.day_ordinal - (0 < pc.day_ordinal)));
- tm.tm_isdst = -1;
- Start = mktime (&tm);
- if (Start == (time_t) -1)
- goto fail;
- }
-
- if (pc.zones_seen)
- {
- long int delta = pc.time_zone * 60;
- time_t t1;
-#ifdef HAVE_TM_GMTOFF
- delta -= tm.tm_gmtoff;
-#else
- time_t t = Start;
- struct tm const *gmt = gmtime (&t);
- if (! gmt)
- goto fail;
- delta -= tm_diff (&tm, gmt);
-#endif
- t1 = Start - delta;
- if ((Start < t1) != (delta < 0))
- goto fail; /* time_t overflow */
- Start = t1;
- }
-
- /* Add relative date. */
- if (pc.rel.year | pc.rel.month | pc.rel.day)
- {
- int year = tm.tm_year + pc.rel.year;
- int month = tm.tm_mon + pc.rel.month;
- int day = tm.tm_mday + pc.rel.day;
- if (((year < tm.tm_year) ^ (pc.rel.year < 0))
- | ((month < tm.tm_mon) ^ (pc.rel.month < 0))
- | ((day < tm.tm_mday) ^ (pc.rel.day < 0)))
- goto fail;
- tm.tm_year = year;
- tm.tm_mon = month;
- tm.tm_mday = day;
- tm.tm_hour = tm0.tm_hour;
- tm.tm_min = tm0.tm_min;
- tm.tm_sec = tm0.tm_sec;
- tm.tm_isdst = tm0.tm_isdst;
- Start = mktime (&tm);
- if (Start == (time_t) -1)
- goto fail;
- }
-
- /* Add relative hours, minutes, and seconds. On hosts that support
- leap seconds, ignore the possibility of leap seconds; e.g.,
- "+ 10 minutes" adds 600 seconds, even if one of them is a
- leap second. Typically this is not what the user wants, but it's
- too hard to do it the other way, because the time zone indicator
- must be applied before relative times, and if mktime is applied
- again the time zone will be lost. */
- {
- long int sum_ns = pc.seconds.tv_nsec + pc.rel.ns;
- long int normalized_ns = (sum_ns % BILLION + BILLION) % BILLION;
- time_t t0 = Start;
- long int d1 = 60 * 60 * pc.rel.hour;
- time_t t1 = t0 + d1;
- long int d2 = 60 * pc.rel.minutes;
- time_t t2 = t1 + d2;
- long int d3 = pc.rel.seconds;
- time_t t3 = t2 + d3;
- long int d4 = (sum_ns - normalized_ns) / BILLION;
- time_t t4 = t3 + d4;
-
- if ((d1 / (60 * 60) ^ pc.rel.hour)
- | (d2 / 60 ^ pc.rel.minutes)
- | ((t1 < t0) ^ (d1 < 0))
- | ((t2 < t1) ^ (d2 < 0))
- | ((t3 < t2) ^ (d3 < 0))
- | ((t4 < t3) ^ (d4 < 0)))
- goto fail;
-
- result->tv_sec = t4;
- result->tv_nsec = normalized_ns;
- }
- }
-
- goto done;
-
- fail:
- ok = false;
- done:
- if (tz_was_altered)
- ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0;
- if (tz0 != tz0buf)
- free (tz0);
- return ok;
-}
-
-#if TEST
-
-int
-main (int ac, char **av)
-{
- char buff[BUFSIZ];
-
- printf ("Enter date, or blank line to exit.\n\t> ");
- fflush (stdout);
-
- buff[BUFSIZ - 1] = '\0';
- while (fgets (buff, BUFSIZ - 1, stdin) && buff[0])
- {
- struct timespec d;
- struct tm const *tm;
- if (! get_date (&d, buff, NULL))
- printf ("Bad format - couldn't convert.\n");
- else if (! (tm = localtime (&d.tv_sec)))
- {
- long int sec = d.tv_sec;
- printf ("localtime (%ld) failed\n", sec);
- }
- else
- {
- int ns = d.tv_nsec;
- printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n",
- tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday,
- tm->tm_hour, tm->tm_min, tm->tm_sec, ns);
- }
- printf ("\t> ");
- fflush (stdout);
- }
- return 0;
-}
-#endif /* TEST */
-
--- contrib/cpio/lib/getopt1.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,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. */
-
-#ifdef _LIBC
-# include <getopt.h>
-#else
-# include <config.h>
-# include "getopt.h"
-#endif
-#include "getopt_int.h"
-
-#include <stdio.h>
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-#include <stdlib.h>
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-int
-getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
- const struct option *long_options, int *opt_index)
-{
- return _getopt_internal (argc, (char **) argv, options, long_options,
- opt_index, 0, 0);
-}
-
-int
-_getopt_long_r (int argc, char **argv, const char *options,
- const struct option *long_options, int *opt_index,
- struct _getopt_data *d)
-{
- return _getopt_internal_r (argc, argv, options, long_options, opt_index,
- 0, 0, d);
-}
-
-/* Like getopt_long, but '-' as well as '--' can indicate a long option.
- If an option that starts with '-' (not '--') doesn't match a long option,
- but does match a short option, it is parsed as a short option
- instead. */
-
-int
-getopt_long_only (int argc, char *__getopt_argv_const *argv,
- const char *options,
- const struct option *long_options, int *opt_index)
-{
- return _getopt_internal (argc, (char **) argv, options, long_options,
- opt_index, 1, 0);
-}
-
-int
-_getopt_long_only_r (int argc, char **argv, const char *options,
- const struct option *long_options, int *opt_index,
- struct _getopt_data *d)
-{
- return _getopt_internal_r (argc, argv, options, long_options, opt_index,
- 1, 0, d);
-}
-
-
-#ifdef TEST
-
-#include <stdio.h>
-
-int
-main (int argc, char **argv)
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
- int option_index = 0;
- static struct option long_options[] =
- {
- {"add", 1, 0, 0},
- {"append", 0, 0, 0},
- {"delete", 1, 0, 0},
- {"verbose", 0, 0, 0},
- {"create", 0, 0, 0},
- {"file", 1, 0, 0},
- {0, 0, 0, 0}
- };
-
- c = getopt_long (argc, argv, "abc:d:0123456789",
- long_options, &option_index);
- if (c == -1)
- break;
-
- switch (c)
- {
- case 0:
- printf ("option %s", long_options[option_index].name);
- if (optarg)
- printf (" with arg %s", optarg);
- printf ("\n");
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case 'd':
- printf ("option d with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
--- contrib/cpio/lib/argp-fmtstream.c
+++ /dev/null
@@ -1,435 +0,0 @@
-/* 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 at 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 */
--- contrib/cpio/lib/verify.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Compile-time assert-like macros.
-
- 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 Paul Eggert, Bruno Haible, and Jim Meyering. */
-
-#ifndef VERIFY_H
-# define VERIFY_H 1
-
-/* Each of these macros verifies that its argument R is nonzero. To
- be portable, R should be an integer constant expression. Unlike
- assert (R), there is no run-time overhead.
-
- There are two macros, since no single macro can be used in all
- contexts in C. verify_true (R) is for scalar contexts, including
- integer constant expression contexts. verify (R) is for declaration
- contexts, e.g., the top level.
-
- Symbols ending in "__" are private to this header.
-
- The code below uses several ideas.
-
- * The first step is ((R) ? 1 : -1). Given an expression R, of
- integral or boolean or floating-point type, this yields an
- expression of integral type, whose value is later verified to be
- constant and nonnegative.
-
- * Next this expression W is wrapped in a type
- struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
- If W is negative, this yields a compile-time error. No compiler can
- deal with a bit-field of negative size.
-
- One might think that an array size check would have the same
- effect, that is, that the type struct { unsigned int dummy[W]; }
- would work as well. However, inside a function, some compilers
- (such as C++ compilers and GNU C) allow local parameters and
- variables inside array size expressions. With these compilers,
- an array size check would not properly diagnose this misuse of
- the verify macro:
-
- void function (int n) { verify (n < 0); }
-
- * For the verify macro, the struct verify_type__ will need to
- somehow be embedded into a declaration. To be portable, this
- declaration must declare an object, a constant, a function, or a
- typedef name. If the declared entity uses the type directly,
- such as in
-
- struct dummy {...};
- typedef struct {...} dummy;
- extern struct {...} *dummy;
- extern void dummy (struct {...} *);
- extern struct {...} *dummy (void);
-
- two uses of the verify macro would yield colliding declarations
- if the entity names are not disambiguated. A workaround is to
- attach the current line number to the entity name:
-
- #define GL_CONCAT0(x, y) x##y
- #define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
- extern struct {...} * GL_CONCAT(dummy,__LINE__);
-
- But this has the problem that two invocations of verify from
- within the same macro would collide, since the __LINE__ value
- would be the same for both invocations.
-
- A solution is to use the sizeof operator. It yields a number,
- getting rid of the identity of the type. Declarations like
-
- extern int dummy [sizeof (struct {...})];
- extern void dummy (int [sizeof (struct {...})]);
- extern int (*dummy (void)) [sizeof (struct {...})];
-
- can be repeated.
-
- * Should the implementation use a named struct or an unnamed struct?
- Which of the following alternatives can be used?
-
- extern int dummy [sizeof (struct {...})];
- extern int dummy [sizeof (struct verify_type__ {...})];
- extern void dummy (int [sizeof (struct {...})]);
- extern void dummy (int [sizeof (struct verify_type__ {...})]);
- extern int (*dummy (void)) [sizeof (struct {...})];
- extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
-
- In the second and sixth case, the struct type is exported to the
- outer scope; two such declarations therefore collide. GCC warns
- about the first, third, and fourth cases. So the only remaining
- possibility is the fifth case:
-
- extern int (*dummy (void)) [sizeof (struct {...})];
-
- * This implementation exploits the fact that GCC does not warn about
- the last declaration mentioned above. If a future version of GCC
- introduces a warning for this, the problem could be worked around
- by using code specialized to GCC, e.g.,:
-
- #if 4 <= __GNUC__
- # define verify(R) \
- extern int (* verify_function__ (void)) \
- [__builtin_constant_p (R) && (R) ? 1 : -1]
- #endif
-
- * In C++, any struct definition inside sizeof is invalid.
- Use a template type to work around the problem. */
-
-
-/* Verify requirement R at compile-time, as an integer constant expression.
- Return 1. */
-
-# ifdef __cplusplus
-template <int w>
- struct verify_type__ { unsigned int verify_error_if_negative_size__: w; };
-# define verify_true(R) \
- (!!sizeof (verify_type__<(R) ? 1 : -1>))
-# else
-# define verify_true(R) \
- (!!sizeof \
- (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
-# endif
-
-/* Verify requirement R at compile-time, as a declaration without a
- trailing ';'. */
-
-# define verify(R) extern int (* verify_function__ (void)) [verify_true (R)]
-
-#endif
--- contrib/cpio/lib/wctype_.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
-
- 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. */
-
-/* Written by Bruno Haible and Paul Eggert. */
-
-/*
- * ISO C 99 <wctype.h> for platforms that lack it.
- * <http://www.opengroup.org/susv3xbd/wctype.h.html>
- *
- * iswctype, towctrans, towlower, towupper, wctrans, wctype,
- * wctrans_t, and wctype_t are not yet implemented.
- */
-
-#ifndef _GL_WCTYPE_H
-
-#if @HAVE_WINT_T@
-/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
- Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-# include <wchar.h>
-#endif
-
-/* Include the original <wctype.h> if it exists.
- BeOS 5 has the functions but no <wctype.h>. */
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_WCTYPE_H@
-# if @HAVE_INCLUDE_NEXT@
-# include_next <wctype.h>
-# else
-# include @ABSOLUTE_WCTYPE_H@
-# endif
-#endif
-
-#ifndef _GL_WCTYPE_H
-#define _GL_WCTYPE_H
-
-#if @HAVE_WINT_T@
-typedef wint_t __wctype_wint_t;
-#else
-typedef int __wctype_wint_t;
-#endif
-
-/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
- Assume all 12 functions are implemented the same way, or not at all. */
-#if ! @HAVE_ISWCNTRL@
-
-/* IRIX 5.3 has macros but no functions, its isw* macros refer to an
- undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
- refer to system functions like _iswctype that are not in the
- standard C library. Rather than try to get ancient buggy
- implementations like this to work, just disable them. */
-# undef iswalnum
-# undef iswalpha
-# undef iswblank
-# undef iswcntrl
-# undef iswdigit
-# undef iswgraph
-# undef iswlower
-# undef iswprint
-# undef iswpunct
-# undef iswspace
-# undef iswupper
-# undef iswxdigit
-
-static inline int
-iswalnum (__wctype_wint_t wc)
-{
- return ((wc >= '0' && wc <= '9')
- || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
-}
-
-static inline int
-iswalpha (__wctype_wint_t wc)
-{
- return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
-}
-
-static inline int
-iswblank (__wctype_wint_t wc)
-{
- return wc == ' ' || wc == '\t';
-}
-
-static inline int
-iswcntrl (__wctype_wint_t wc)
-{
- return (wc & ~0x1f) == 0 || wc == 0x7f;
-}
-
-static inline int
-iswdigit (__wctype_wint_t wc)
-{
- return wc >= '0' && wc <= '9';
-}
-
-static inline int
-iswgraph (__wctype_wint_t wc)
-{
- return wc >= '!' && wc <= '~';
-}
-
-static inline int
-iswlower (__wctype_wint_t wc)
-{
- return wc >= 'a' && wc <= 'z';
-}
-
-static inline int
-iswprint (__wctype_wint_t wc)
-{
- return wc >= ' ' && wc <= '~';
-}
-
-static inline int
-iswpunct (__wctype_wint_t wc)
-{
- return (wc >= '!' && wc <= '~'
- && !((wc >= '0' && wc <= '9')
- || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
-}
-
-static inline int
-iswspace (__wctype_wint_t wc)
-{
- return (wc == ' ' || wc == '\t'
- || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
-}
-
-static inline int
-iswupper (__wctype_wint_t wc)
-{
- return wc >= 'A' && wc <= 'Z';
-}
-
-static inline int
-iswxdigit (__wctype_wint_t wc)
-{
- return ((wc >= '0' && wc <= '9')
- || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
-}
-
-# endif /* ! HAVE_ISWCNTRL */
-
-#endif /* _GL_WCTYPE_H */
-#endif /* _GL_WCTYPE_H */
--- contrib/cpio/lib/same-inode.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Determine whether two stat buffers refer to the same file.
-
- 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. */
-
-#ifndef SAME_INODE_H
-# define SAME_INODE_H 1
-
-# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
- ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
- && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
-
-#endif
--- contrib/cpio/lib/printf-parse.c
+++ /dev/null
@@ -1,543 +0,0 @@
-/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002-2003, 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. */
-
-#include <config.h>
-
-/* Specification. */
-#if WIDE_CHAR_VERSION
-# include "wprintf-parse.h"
-#else
-# include "printf-parse.h"
-#endif
-
-/* Get size_t, NULL. */
-#include <stddef.h>
-
-/* Get intmax_t. */
-#ifdef IN_LIBINTL
-# if HAVE_STDINT_H_WITH_UINTMAX
-# include <stdint.h>
-# endif
-# if HAVE_INTTYPES_H_WITH_UINTMAX
-# include <inttypes.h>
-# endif
-#else
-# include <stdint.h>
-#endif
-
-/* malloc(), realloc(), free(). */
-#include <stdlib.h>
-
-/* Checked size_t computations. */
-#include "xsize.h"
-
-#if WIDE_CHAR_VERSION
-# define PRINTF_PARSE wprintf_parse
-# define CHAR_T wchar_t
-# define DIRECTIVE wchar_t_directive
-# define DIRECTIVES wchar_t_directives
-#else
-# define PRINTF_PARSE printf_parse
-# define CHAR_T char
-# define DIRECTIVE char_directive
-# define DIRECTIVES char_directives
-#endif
-
-#ifdef STATIC
-STATIC
-#endif
-int
-PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
-{
- const CHAR_T *cp = format; /* pointer into format */
- size_t arg_posn = 0; /* number of regular arguments consumed */
- size_t d_allocated; /* allocated elements of d->dir */
- size_t a_allocated; /* allocated elements of a->arg */
- size_t max_width_length = 0;
- size_t max_precision_length = 0;
-
- d->count = 0;
- d_allocated = 1;
- d->dir = (DIRECTIVE *) malloc (d_allocated * sizeof (DIRECTIVE));
- if (d->dir == NULL)
- /* Out of memory. */
- return -1;
-
- a->count = 0;
- a_allocated = 0;
- a->arg = NULL;
-
-#define REGISTER_ARG(_index_,_type_) \
- { \
- size_t n = (_index_); \
- if (n >= a_allocated) \
- { \
- size_t memory_size; \
- argument *memory; \
- \
- a_allocated = xtimes (a_allocated, 2); \
- if (a_allocated <= n) \
- a_allocated = xsum (n, 1); \
- memory_size = xtimes (a_allocated, sizeof (argument)); \
- if (size_overflow_p (memory_size)) \
- /* Overflow, would lead to out of memory. */ \
- goto error; \
- memory = (argument *) (a->arg \
- ? realloc (a->arg, memory_size) \
- : malloc (memory_size)); \
- if (memory == NULL) \
- /* Out of memory. */ \
- goto error; \
- a->arg = memory; \
- } \
- while (a->count <= n) \
- a->arg[a->count++].type = TYPE_NONE; \
- if (a->arg[n].type == TYPE_NONE) \
- a->arg[n].type = (_type_); \
- else if (a->arg[n].type != (_type_)) \
- /* Ambiguous type for positional argument. */ \
- goto error; \
- }
-
- while (*cp != '\0')
- {
- CHAR_T c = *cp++;
- if (c == '%')
- {
- size_t arg_index = ARG_NONE;
- DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */
-
- /* Initialize the next directive. */
- dp->dir_start = cp - 1;
- dp->flags = 0;
- dp->width_start = NULL;
- dp->width_end = NULL;
- dp->width_arg_index = ARG_NONE;
- dp->precision_start = NULL;
- dp->precision_end = NULL;
- dp->precision_arg_index = ARG_NONE;
- dp->arg_index = ARG_NONE;
-
- /* Test for positional argument. */
- if (*cp >= '0' && *cp <= '9')
- {
- const CHAR_T *np;
-
- for (np = cp; *np >= '0' && *np <= '9'; np++)
- ;
- if (*np == '$')
- {
- size_t n = 0;
-
- for (np = cp; *np >= '0' && *np <= '9'; np++)
- n = xsum (xtimes (n, 10), *np - '0');
- if (n == 0)
- /* Positional argument 0. */
- goto error;
- if (size_overflow_p (n))
- /* n too large, would lead to out of memory later. */
- goto error;
- arg_index = n - 1;
- cp = np + 1;
- }
- }
-
- /* Read the flags. */
- for (;;)
- {
- if (*cp == '\'')
- {
- dp->flags |= FLAG_GROUP;
- cp++;
- }
- else if (*cp == '-')
- {
- dp->flags |= FLAG_LEFT;
- cp++;
- }
- else if (*cp == '+')
- {
- dp->flags |= FLAG_SHOWSIGN;
- cp++;
- }
- else if (*cp == ' ')
- {
- dp->flags |= FLAG_SPACE;
- cp++;
- }
- else if (*cp == '#')
- {
- dp->flags |= FLAG_ALT;
- cp++;
- }
- else if (*cp == '0')
- {
- dp->flags |= FLAG_ZERO;
- cp++;
- }
- else
- break;
- }
-
- /* Parse the field width. */
- if (*cp == '*')
- {
- dp->width_start = cp;
- cp++;
- dp->width_end = cp;
- if (max_width_length < 1)
- max_width_length = 1;
-
- /* Test for positional argument. */
- if (*cp >= '0' && *cp <= '9')
- {
- const CHAR_T *np;
-
- for (np = cp; *np >= '0' && *np <= '9'; np++)
- ;
- if (*np == '$')
- {
- size_t n = 0;
-
- for (np = cp; *np >= '0' && *np <= '9'; np++)
- n = xsum (xtimes (n, 10), *np - '0');
- if (n == 0)
- /* Positional argument 0. */
- goto error;
- if (size_overflow_p (n))
- /* n too large, would lead to out of memory later. */
- goto error;
- dp->width_arg_index = n - 1;
- cp = np + 1;
- }
- }
- if (dp->width_arg_index == ARG_NONE)
- {
- dp->width_arg_index = arg_posn++;
- if (dp->width_arg_index == ARG_NONE)
- /* arg_posn wrapped around. */
- goto error;
- }
- REGISTER_ARG (dp->width_arg_index, TYPE_INT);
- }
- else if (*cp >= '0' && *cp <= '9')
- {
- size_t width_length;
-
- dp->width_start = cp;
- for (; *cp >= '0' && *cp <= '9'; cp++)
- ;
- dp->width_end = cp;
- width_length = dp->width_end - dp->width_start;
- if (max_width_length < width_length)
- max_width_length = width_length;
- }
-
- /* Parse the precision. */
- if (*cp == '.')
- {
- cp++;
- if (*cp == '*')
- {
- dp->precision_start = cp - 1;
- cp++;
- dp->precision_end = cp;
- if (max_precision_length < 2)
- max_precision_length = 2;
-
- /* Test for positional argument. */
- if (*cp >= '0' && *cp <= '9')
- {
- const CHAR_T *np;
-
- for (np = cp; *np >= '0' && *np <= '9'; np++)
- ;
- if (*np == '$')
- {
- size_t n = 0;
-
- for (np = cp; *np >= '0' && *np <= '9'; np++)
- n = xsum (xtimes (n, 10), *np - '0');
- if (n == 0)
- /* Positional argument 0. */
- goto error;
- if (size_overflow_p (n))
- /* n too large, would lead to out of memory
- later. */
- goto error;
- dp->precision_arg_index = n - 1;
- cp = np + 1;
- }
- }
- if (dp->precision_arg_index == ARG_NONE)
- {
- dp->precision_arg_index = arg_posn++;
- if (dp->precision_arg_index == ARG_NONE)
- /* arg_posn wrapped around. */
- goto error;
- }
- REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
- }
- else
- {
- size_t precision_length;
-
- dp->precision_start = cp - 1;
- for (; *cp >= '0' && *cp <= '9'; cp++)
- ;
- dp->precision_end = cp;
- precision_length = dp->precision_end - dp->precision_start;
- if (max_precision_length < precision_length)
- max_precision_length = precision_length;
- }
- }
-
- {
- arg_type type;
-
- /* Parse argument type/size specifiers. */
- {
- int flags = 0;
-
- for (;;)
- {
- if (*cp == 'h')
- {
- flags |= (1 << (flags & 1));
- cp++;
- }
- else if (*cp == 'L')
- {
- flags |= 4;
- cp++;
- }
- else if (*cp == 'l')
- {
- flags += 8;
- cp++;
- }
- else if (*cp == 'j')
- {
- if (sizeof (intmax_t) > sizeof (long))
- {
- /* intmax_t = long long */
- flags += 16;
- }
- else if (sizeof (intmax_t) > sizeof (int))
- {
- /* intmax_t = long */
- flags += 8;
- }
- cp++;
- }
- else if (*cp == 'z' || *cp == 'Z')
- {
- /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
- because the warning facility in gcc-2.95.2 understands
- only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
- if (sizeof (size_t) > sizeof (long))
- {
- /* size_t = long long */
- flags += 16;
- }
- else if (sizeof (size_t) > sizeof (int))
- {
- /* size_t = long */
- flags += 8;
- }
- cp++;
- }
- else if (*cp == 't')
- {
- if (sizeof (ptrdiff_t) > sizeof (long))
- {
- /* ptrdiff_t = long long */
- flags += 16;
- }
- else if (sizeof (ptrdiff_t) > sizeof (int))
- {
- /* ptrdiff_t = long */
- flags += 8;
- }
- cp++;
- }
- else
- break;
- }
-
- /* Read the conversion character. */
- c = *cp++;
- switch (c)
- {
- case 'd': case 'i':
-#if HAVE_LONG_LONG_INT
- /* If 'long long' exists and is larger than 'long': */
- if (flags >= 16 || (flags & 4))
- type = TYPE_LONGLONGINT;
- else
-#endif
- /* If 'long long' exists and is the same as 'long', we parse
- "lld" into TYPE_LONGINT. */
- if (flags >= 8)
- type = TYPE_LONGINT;
- else if (flags & 2)
- type = TYPE_SCHAR;
- else if (flags & 1)
- type = TYPE_SHORT;
- else
- type = TYPE_INT;
- break;
- case 'o': case 'u': case 'x': case 'X':
-#if HAVE_LONG_LONG_INT
- /* If 'long long' exists and is larger than 'long': */
- if (flags >= 16 || (flags & 4))
- type = TYPE_ULONGLONGINT;
- else
-#endif
- /* If 'unsigned long long' exists and is the same as
- 'unsigned long', we parse "llu" into TYPE_ULONGINT. */
- if (flags >= 8)
- type = TYPE_ULONGINT;
- else if (flags & 2)
- type = TYPE_UCHAR;
- else if (flags & 1)
- type = TYPE_USHORT;
- else
- type = TYPE_UINT;
- break;
- case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
- case 'a': case 'A':
- if (flags >= 16 || (flags & 4))
- type = TYPE_LONGDOUBLE;
- else
- type = TYPE_DOUBLE;
- break;
- case 'c':
- if (flags >= 8)
-#if HAVE_WINT_T
- type = TYPE_WIDE_CHAR;
-#else
- goto error;
-#endif
- else
- type = TYPE_CHAR;
- break;
-#if HAVE_WINT_T
- case 'C':
- type = TYPE_WIDE_CHAR;
- c = 'c';
- break;
-#endif
- case 's':
- if (flags >= 8)
-#if HAVE_WCHAR_T
- type = TYPE_WIDE_STRING;
-#else
- goto error;
-#endif
- else
- type = TYPE_STRING;
- break;
-#if HAVE_WCHAR_T
- case 'S':
- type = TYPE_WIDE_STRING;
- c = 's';
- break;
-#endif
- case 'p':
- type = TYPE_POINTER;
- break;
- case 'n':
-#if HAVE_LONG_LONG_INT
- /* If 'long long' exists and is larger than 'long': */
- if (flags >= 16 || (flags & 4))
- type = TYPE_COUNT_LONGLONGINT_POINTER;
- else
-#endif
- /* If 'long long' exists and is the same as 'long', we parse
- "lln" into TYPE_COUNT_LONGINT_POINTER. */
- if (flags >= 8)
- type = TYPE_COUNT_LONGINT_POINTER;
- else if (flags & 2)
- type = TYPE_COUNT_SCHAR_POINTER;
- else if (flags & 1)
- type = TYPE_COUNT_SHORT_POINTER;
- else
- type = TYPE_COUNT_INT_POINTER;
- break;
- case '%':
- type = TYPE_NONE;
- break;
- default:
- /* Unknown conversion character. */
- goto error;
- }
- }
-
- if (type != TYPE_NONE)
- {
- dp->arg_index = arg_index;
- if (dp->arg_index == ARG_NONE)
- {
- dp->arg_index = arg_posn++;
- if (dp->arg_index == ARG_NONE)
- /* arg_posn wrapped around. */
- goto error;
- }
- REGISTER_ARG (dp->arg_index, type);
- }
- dp->conversion = c;
- dp->dir_end = cp;
- }
-
- d->count++;
- if (d->count >= d_allocated)
- {
- size_t memory_size;
- DIRECTIVE *memory;
-
- d_allocated = xtimes (d_allocated, 2);
- memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
- if (size_overflow_p (memory_size))
- /* Overflow, would lead to out of memory. */
- goto error;
- memory = (DIRECTIVE *) realloc (d->dir, memory_size);
- if (memory == NULL)
- /* Out of memory. */
- goto error;
- d->dir = memory;
- }
- }
- }
- d->dir[d->count].dir_start = cp;
-
- d->max_width_length = max_width_length;
- d->max_precision_length = max_precision_length;
- return 0;
-
-error:
- if (a->arg)
- free (a->arg);
- if (d->dir)
- free (d->dir);
- return -1;
-}
-
-#undef DIRECTIVES
-#undef DIRECTIVE
-#undef CHAR_T
-#undef PRINTF_PARSE
--- contrib/cpio/lib/mbchar.h
+++ /dev/null
@@ -1,478 +0,0 @@
-/* Multibyte character data type.
- Copyright (C) 2001, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Written by Bruno Haible <bruno at clisp.org>. */
-
-/* A multibyte character is a short subsequence of a char* string,
- representing a single wide character.
-
- We use multibyte characters instead of wide characters because of
- the following goals:
- 1) correct multibyte handling, i.e. operate according to the LC_CTYPE
- locale,
- 2) ease of maintenance, i.e. the maintainer needs not know all details
- of the ISO C 99 standard,
- 3) don't fail grossly if the input is not in the encoding set by the
- locale, because often different encodings are in use in the same
- countries (ISO-8859-1/UTF-8, EUC-JP/Shift_JIS, ...),
- 4) fast in the case of ASCII characters,
- 5) portability, i.e. don't make unportable assumptions about wchar_t.
-
- Multibyte characters are only accessed through the mb* macros.
-
- mb_ptr (mbc)
- return a pointer to the beginning of the multibyte sequence.
-
- mb_len (mbc)
- returns the number of bytes occupied by the multibyte sequence.
- Always > 0.
-
- mb_iseq (mbc, sc)
- returns true if mbc is the standard ASCII character sc.
-
- mb_isnul (mbc)
- returns true if mbc is the nul character.
-
- mb_cmp (mbc1, mbc2)
- returns a positive, zero, or negative value depending on whether mbc1
- sorts after, same or before mbc2.
-
- mb_casecmp (mbc1, mbc2)
- returns a positive, zero, or negative value depending on whether mbc1
- sorts after, same or before mbc2, modulo upper/lowercase conversion.
-
- mb_equal (mbc1, mbc2)
- returns true if mbc1 and mbc2 are equal.
-
- mb_caseequal (mbc1, mbc2)
- returns true if mbc1 and mbc2 are equal modulo upper/lowercase conversion.
-
- mb_isalnum (mbc)
- returns true if mbc is alphanumeric.
-
- mb_isalpha (mbc)
- returns true if mbc is alphabetic.
-
- mb_isascii(mbc)
- returns true if mbc is plain ASCII.
-
- mb_isblank (mbc)
- returns true if mbc is a blank.
-
- mb_iscntrl (mbc)
- returns true if mbc is a control character.
-
- mb_isdigit (mbc)
- returns true if mbc is a decimal digit.
-
- mb_isgraph (mbc)
- returns true if mbc is a graphic character.
-
- mb_islower (mbc)
- returns true if mbc is lowercase.
-
- mb_isprint (mbc)
- returns true if mbc is a printable character.
-
- mb_ispunct (mbc)
- returns true if mbc is a punctuation character.
-
- mb_isspace (mbc)
- returns true if mbc is a space character.
-
- mb_isupper (mbc)
- returns true if mbc is uppercase.
-
- mb_isxdigit (mbc)
- returns true if mbc is a hexadecimal digit.
-
- mb_width (mbc)
- returns the number of columns on the output device occupied by mbc.
- Always >= 0.
-
- mb_putc (mbc, stream)
- outputs mbc on stream, a byte oriented FILE stream opened for output.
-
- mb_setascii (&mbc, sc)
- assigns the standard ASCII character sc to mbc.
-
- mb_copy (&destmbc, &srcmbc)
- copies srcmbc to destmbc.
-
- Here are the function prototypes of the macros.
-
- extern const char * mb_ptr (const mbchar_t mbc);
- extern size_t mb_len (const mbchar_t mbc);
- extern bool mb_iseq (const mbchar_t mbc, char sc);
- extern bool mb_isnul (const mbchar_t mbc);
- extern int mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2);
- extern int mb_casecmp (const mbchar_t mbc1, const mbchar_t mbc2);
- extern bool mb_equal (const mbchar_t mbc1, const mbchar_t mbc2);
- extern bool mb_caseequal (const mbchar_t mbc1, const mbchar_t mbc2);
- extern bool mb_isalnum (const mbchar_t mbc);
- extern bool mb_isalpha (const mbchar_t mbc);
- extern bool mb_isascii (const mbchar_t mbc);
- extern bool mb_isblank (const mbchar_t mbc);
- extern bool mb_iscntrl (const mbchar_t mbc);
- extern bool mb_isdigit (const mbchar_t mbc);
- extern bool mb_isgraph (const mbchar_t mbc);
- extern bool mb_islower (const mbchar_t mbc);
- extern bool mb_isprint (const mbchar_t mbc);
- extern bool mb_ispunct (const mbchar_t mbc);
- extern bool mb_isspace (const mbchar_t mbc);
- extern bool mb_isupper (const mbchar_t mbc);
- extern bool mb_isxdigit (const mbchar_t mbc);
- extern int mb_width (const mbchar_t mbc);
- extern void mb_putc (const mbchar_t mbc, FILE *stream);
- extern void mb_setascii (mbchar_t *new, char sc);
- extern void mb_copy (mbchar_t *new, const mbchar_t *old);
- */
-
-#ifndef _MBCHAR_H
-#define _MBCHAR_H 1
-
-#include <stdbool.h>
-#include <string.h>
-
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
- <wchar.h>. */
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-
-/* BeOS 5 has the functions but no <wctype.h>. */
-#if HAVE_WCTYPE_H
-# include <wctype.h>
-#endif
-/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
- Assume all 12 functions are implemented the same way, or not at all. */
-#if !defined iswalnum && !HAVE_ISWCNTRL
-static inline int
-iswalnum (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? (wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')
- : 0);
-}
-# define iswalnum iswalnum
-#endif
-#if !defined iswalpha && !HAVE_ISWCNTRL
-static inline int
-iswalpha (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'
- : 0);
-}
-# define iswalpha iswalpha
-#endif
-#if !defined iswblank && !HAVE_ISWCNTRL
-static inline int
-iswblank (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? wc == ' ' || wc == '\t'
- : 0);
-}
-# define iswblank iswblank
-#endif
-#if !defined iswcntrl && !HAVE_ISWCNTRL
-static inline int
-iswcntrl (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? (wc & ~0x1f) == 0 || wc == 0x7f
- : 0);
-}
-# define iswcntrl iswcntrl
-#endif
-#if !defined iswdigit && !HAVE_ISWCNTRL
-static inline int
-iswdigit (wint_t wc)
-{
- return (wc >= '0' && wc <= '9');
-}
-# define iswdigit iswdigit
-#endif
-#if !defined iswgraph && !HAVE_ISWCNTRL
-static inline int
-iswgraph (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? wc >= '!' && wc <= '~'
- : 1);
-}
-# define iswgraph iswgraph
-#endif
-#if !defined iswlower && !HAVE_ISWCNTRL
-static inline int
-iswlower (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? wc >= 'a' && wc <= 'z'
- : 0);
-}
-# define iswlower iswlower
-#endif
-#if !defined iswprint && !HAVE_ISWCNTRL
-static inline int
-iswprint (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? wc >= ' ' && wc <= '~'
- : 1);
-}
-# define iswprint iswprint
-#endif
-#if !defined iswpunct && !HAVE_ISWCNTRL
-static inline int
-iswpunct (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? wc >= '!' && wc <= '~'
- && !((wc >= '0' && wc <= '9')
- || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))
- : 1);
-}
-# define iswpunct iswpunct
-#endif
-#if !defined iswspace && !HAVE_ISWCNTRL
-static inline int
-iswspace (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? wc == ' ' || wc == '\t'
- || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'
- : 0);
-}
-# define iswspace iswspace
-#endif
-#if !defined iswupper && !HAVE_ISWCNTRL
-static inline int
-iswupper (wint_t wc)
-{
- return (wc >= 0 && wc < 128
- ? wc >= 'A' && wc <= 'Z'
- : 0);
-}
-# define iswupper iswupper
-#endif
-#if !defined iswxdigit && !HAVE_ISWCNTRL
-static inline int
-iswxdigit (wint_t wc)
-{
- return (wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F');
-}
-# define iswxdigit iswxdigit
-#endif
-
-#include "wcwidth.h"
-
-#define MBCHAR_BUF_SIZE 24
-
-struct mbchar
-{
- const char *ptr; /* pointer to current character */
- size_t bytes; /* number of bytes of current character, > 0 */
- bool wc_valid; /* true if wc is a valid wide character */
- wchar_t wc; /* if wc_valid: the current character */
- char buf[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */
-};
-
-/* EOF (not a real character) is represented with bytes = 0 and
- wc_valid = false. */
-
-typedef struct mbchar mbchar_t;
-
-/* Access the current character. */
-#define mb_ptr(mbc) ((mbc).ptr)
-#define mb_len(mbc) ((mbc).bytes)
-
-/* Comparison of characters. */
-#define mb_iseq(mbc, sc) ((mbc).wc_valid && (mbc).wc == (sc))
-#define mb_isnul(mbc) ((mbc).wc_valid && (mbc).wc == 0)
-#define mb_cmp(mbc1, mbc2) \
- ((mbc1).wc_valid \
- ? ((mbc2).wc_valid \
- ? (int) (mbc1).wc - (int) (mbc2).wc \
- : -1) \
- : ((mbc2).wc_valid \
- ? 1 \
- : (mbc1).bytes == (mbc2).bytes \
- ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \
- : (mbc1).bytes < (mbc2).bytes \
- ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \
- : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1)))
-#define mb_casecmp(mbc1, mbc2) \
- ((mbc1).wc_valid \
- ? ((mbc2).wc_valid \
- ? (int) towlower ((mbc1).wc) - (int) towlower ((mbc2).wc) \
- : -1) \
- : ((mbc2).wc_valid \
- ? 1 \
- : (mbc1).bytes == (mbc2).bytes \
- ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \
- : (mbc1).bytes < (mbc2).bytes \
- ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \
- : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1)))
-#define mb_equal(mbc1, mbc2) \
- ((mbc1).wc_valid && (mbc2).wc_valid \
- ? (mbc1).wc == (mbc2).wc \
- : (mbc1).bytes == (mbc2).bytes \
- && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0)
-#define mb_caseequal(mbc1, mbc2) \
- ((mbc1).wc_valid && (mbc2).wc_valid \
- ? towlower ((mbc1).wc) == towlower ((mbc2).wc) \
- : (mbc1).bytes == (mbc2).bytes \
- && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0)
-
-/* <ctype.h>, <wctype.h> classification. */
-#define mb_isascii(mbc) \
- ((mbc).wc_valid && (mbc).wc >= 0 && (mbc).wc <= 127)
-#define mb_isalnum(mbc) ((mbc).wc_valid && iswalnum ((mbc).wc))
-#define mb_isalpha(mbc) ((mbc).wc_valid && iswalpha ((mbc).wc))
-#define mb_isblank(mbc) ((mbc).wc_valid && iswblank ((mbc).wc))
-#define mb_iscntrl(mbc) ((mbc).wc_valid && iswcntrl ((mbc).wc))
-#define mb_isdigit(mbc) ((mbc).wc_valid && iswdigit ((mbc).wc))
-#define mb_isgraph(mbc) ((mbc).wc_valid && iswgraph ((mbc).wc))
-#define mb_islower(mbc) ((mbc).wc_valid && iswlower ((mbc).wc))
-#define mb_isprint(mbc) ((mbc).wc_valid && iswprint ((mbc).wc))
-#define mb_ispunct(mbc) ((mbc).wc_valid && iswpunct ((mbc).wc))
-#define mb_isspace(mbc) ((mbc).wc_valid && iswspace ((mbc).wc))
-#define mb_isupper(mbc) ((mbc).wc_valid && iswupper ((mbc).wc))
-#define mb_isxdigit(mbc) ((mbc).wc_valid && iswxdigit ((mbc).wc))
-
-/* Extra <wchar.h> function. */
-
-/* Unprintable characters appear as a small box of width 1. */
-#define MB_UNPRINTABLE_WIDTH 1
-
-static inline int
-mb_width_aux (wint_t wc)
-{
- int w = wcwidth (wc);
- /* For unprintable characters, arbitrarily return 0 for control characters
- and MB_UNPRINTABLE_WIDTH otherwise. */
- return (w >= 0 ? w : iswcntrl (wc) ? 0 : MB_UNPRINTABLE_WIDTH);
-}
-
-#define mb_width(mbc) \
- ((mbc).wc_valid ? mb_width_aux ((mbc).wc) : MB_UNPRINTABLE_WIDTH)
-
-/* Output. */
-#define mb_putc(mbc, stream) fwrite ((mbc).ptr, 1, (mbc).bytes, (stream))
-
-/* Assignment. */
-#define mb_setascii(mbc, sc) \
- ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \
- (mbc)->wc = (mbc)->buf[0] = (sc))
-
-/* Copying a character. */
-static inline void
-mb_copy (mbchar_t *new, const mbchar_t *old)
-{
- if (old->ptr == &old->buf[0])
- {
- memcpy (&new->buf[0], &old->buf[0], old->bytes);
- new->ptr = &new->buf[0];
- }
- else
- new->ptr = old->ptr;
- new->bytes = old->bytes;
- if ((new->wc_valid = old->wc_valid))
- new->wc = old->wc;
-}
-
-
-/* is_basic(c) tests whether the single-byte character c is in the
- ISO C "basic character set".
- This is a convenience function, and is in this file only to share code
- between mbiter_multi.h and mbfile_multi.h. */
-#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
- && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
- && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
- && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
- && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
- && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
- && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
- && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
- && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
- && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
- && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
- && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
- && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
- && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
- && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
- && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
- && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
- && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
- && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
- && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
- && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
- && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
- && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)
-/* The character set is ISO-646, not EBCDIC. */
-# define IS_BASIC_ASCII 1
-
-extern unsigned int is_basic_table[];
-
-static inline bool
-is_basic (char c)
-{
- return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31))
- & 1;
-}
-
-#else
-
-static inline bool
-is_basic (char c)
-{
- switch (c)
- {
- case '\t': case '\v': case '\f':
- case ' ': case '!': case '"': case '#': case '%':
- case '&': case '\'': case '(': case ')': case '*':
- case '+': case ',': case '-': case '.': case '/':
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- case ':': case ';': case '<': case '=': case '>':
- case '?':
- case 'A': case 'B': case 'C': case 'D': case 'E':
- case 'F': case 'G': case 'H': case 'I': case 'J':
- case 'K': case 'L': case 'M': case 'N': case 'O':
- case 'P': case 'Q': case 'R': case 'S': case 'T':
- case 'U': case 'V': case 'W': case 'X': case 'Y':
- case 'Z':
- case '[': case '\\': case ']': case '^': case '_':
- case 'a': case 'b': case 'c': case 'd': case 'e':
- case 'f': case 'g': case 'h': case 'i': case 'j':
- case 'k': case 'l': case 'm': case 'n': case 'o':
- case 'p': case 'q': case 'r': case 's': case 't':
- case 'u': case 'v': case 'w': case 'x': case 'y':
- case 'z': case '{': case '|': case '}': case '~':
- return 1;
- default:
- return 0;
- }
-}
-
-#endif
-
-#endif /* _MBCHAR_H */
--- contrib/cpio/lib/float_.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* A correct <float.h>.
-
- Copyright (C) 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _GL_FLOAT_H
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_INCLUDE_NEXT@
-# include_next <float.h>
-#else
-# include @ABSOLUTE_FLOAT_H@
-#endif
-
-#ifndef _GL_FLOAT_H
-#define _GL_FLOAT_H
-
-/* 'long double' properties. */
-#if defined __i386__ && defined __BEOS__
-/* Number of mantissa units, in base FLT_RADIX. */
-# undef LDBL_MANT_DIG
-# define LDBL_MANT_DIG 64
-/* Number of decimal digits that is sufficient for representing a number. */
-# undef LDBL_DIG
-# define LDBL_DIG 18
-/* x-1 where x is the smallest representable number > 1. */
-# undef LDBL_EPSILON
-# define LDBL_EPSILON 1.0842021724855044340E-19L
-/* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */
-# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP (-16381)
-/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */
-# undef LDBL_MAX_EXP
-# define LDBL_MAX_EXP 16384
-/* Minimum positive normalized number. */
-# undef LDBL_MIN
-# define LDBL_MIN 3.3621031431120935063E-4932L
-/* Maximum representable finite number. */
-# undef LDBL_MAX
-# define LDBL_MAX 1.1897314953572317650E+4932L
-/* Minimum e such that 10^e is in the range of normalized numbers. */
-# undef LDBL_MIN_10_EXP
-# define LDBL_MIN_10_EXP (-4931)
-/* Maximum e such that 10^e is in the range of representable finite numbers. */
-# undef LDBL_MAX_10_EXP
-# define LDBL_MAX_10_EXP 4932
-#endif
-
-#endif /* _GL_FLOAT_H */
-#endif /* _GL_FLOAT_H */
--- contrib/cpio/lib/xstrndup.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Duplicate a bounded initial segment of a string, with out-of-memory
- checking.
- Copyright (C) 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. */
-
-#include <stddef.h>
-
-/* Return a newly allocated copy of at most N bytes of STRING.
- In other words, return a copy of the initial segment of length N of
- STRING. */
-extern char *xstrndup (const char *string, size_t n);
--- contrib/cpio/lib/gettime.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* gettime -- get the system clock
-
- Copyright (C) 2002, 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 Paul Eggert. */
-
-#include <config.h>
-
-#include "timespec.h"
-
-#include <sys/time.h>
-
-/* Get the system time into *TS. */
-
-void
-gettime (struct timespec *ts)
-{
-#if HAVE_NANOTIME
- nanotime (ts);
-#else
-
-# if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME
- if (clock_gettime (CLOCK_REALTIME, ts) == 0)
- return;
-# endif
-
- {
- struct timeval tv;
- gettimeofday (&tv, NULL);
- ts->tv_sec = tv.tv_sec;
- ts->tv_nsec = tv.tv_usec * 1000;
- }
-
-#endif
-}
--- contrib/cpio/lib/argp-help.c
+++ /dev/null
@@ -1,1954 +0,0 @@
-/* Hierarchial argument parsing help output
- Copyright (C) 1995-2005, 2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles at 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 _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <alloca.h>
-#include <errno.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <limits.h>
-#ifdef USE_IN_LIBIO
-# include <wchar.h>
-#endif
-
-#ifdef _LIBC
-# include <libintl.h>
-# undef dgettext
-# define dgettext(domain, msgid) \
- INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES)
-#else
-# include "gettext.h"
-#endif
-
-#include "argp.h"
-#include "argp-fmtstream.h"
-#include "argp-namefrob.h"
-
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
-/* User-selectable (using an environment variable) formatting parameters.
-
- These may be specified in an environment variable called `ARGP_HELP_FMT',
- with a contents like: VAR1=VAL1,VAR2=VAL2,BOOLVAR2,no-BOOLVAR2
- Where VALn must be a positive integer. The list of variables is in the
- UPARAM_NAMES vector, below. */
-
-/* Default parameters. */
-#define DUP_ARGS 0 /* True if option argument can be duplicated. */
-#define DUP_ARGS_NOTE 1 /* True to print a note about duplicate args. */
-#define SHORT_OPT_COL 2 /* column in which short options start */
-#define LONG_OPT_COL 6 /* column in which long options start */
-#define DOC_OPT_COL 2 /* column in which doc options start */
-#define OPT_DOC_COL 29 /* column in which option text starts */
-#define HEADER_COL 1 /* column in which group headers are printed */
-#define USAGE_INDENT 12 /* indentation of wrapped usage lines */
-#define RMARGIN 79 /* right margin used for wrapping */
-
-/* User-selectable (using an environment variable) formatting parameters.
- They must all be of type `int' for the parsing code to work. */
-struct uparams
-{
- /* If true, arguments for an option are shown with both short and long
- options, even when a given option has both, e.g. `-x ARG, --longx=ARG'.
- If false, then if an option has both, the argument is only shown with
- the long one, e.g., `-x, --longx=ARG', and a message indicating that
- this really means both is printed below the options. */
- int dup_args;
-
- /* This is true if when DUP_ARGS is false, and some duplicate arguments have
- been suppressed, an explanatory message should be printed. */
- int dup_args_note;
-
- /* Various output columns. */
- int short_opt_col; /* column in which short options start */
- int long_opt_col; /* column in which long options start */
- int doc_opt_col; /* column in which doc options start */
- int opt_doc_col; /* column in which option text starts */
- int header_col; /* column in which group headers are printed */
- int usage_indent; /* indentation of wrapped usage lines */
- int rmargin; /* right margin used for wrapping */
-
- int valid; /* True when the values in here are valid. */
-};
-
-/* This is a global variable, as user options are only ever read once. */
-static struct uparams uparams = {
- DUP_ARGS, DUP_ARGS_NOTE,
- SHORT_OPT_COL, LONG_OPT_COL, DOC_OPT_COL, OPT_DOC_COL, HEADER_COL,
- USAGE_INDENT, RMARGIN,
- 0
-};
-
-/* A particular uparam, and what the user name is. */
-struct uparam_name
-{
- const char *name; /* User name. */
- int is_bool; /* Whether it's `boolean'. */
- size_t uparams_offs; /* Location of the (int) field in UPARAMS. */
-};
-
-/* The name-field mappings we know about. */
-static const struct uparam_name uparam_names[] =
-{
- { "dup-args", 1, offsetof (struct uparams, dup_args) },
- { "dup-args-note", 1, offsetof (struct uparams, dup_args_note) },
- { "short-opt-col", 0, offsetof (struct uparams, short_opt_col) },
- { "long-opt-col", 0, offsetof (struct uparams, long_opt_col) },
- { "doc-opt-col", 0, offsetof (struct uparams, doc_opt_col) },
- { "opt-doc-col", 0, offsetof (struct uparams, opt_doc_col) },
- { "header-col", 0, offsetof (struct uparams, header_col) },
- { "usage-indent", 0, offsetof (struct uparams, usage_indent) },
- { "rmargin", 0, offsetof (struct uparams, rmargin) },
- { 0 }
-};
-
-static void
-validate_uparams (const struct argp_state *state, struct uparams *upptr)
-{
- const struct uparam_name *up;
-
- for (up = uparam_names; up->name; up++)
- {
- if (up->is_bool
- || up->uparams_offs == offsetof (struct uparams, rmargin))
- continue;
- if (*(int *)((char *)upptr + up->uparams_offs) >= upptr->rmargin)
- {
- __argp_failure (state, 0, 0,
- dgettext (state->root_argp->argp_domain,
- "\
-ARGP_HELP_FMT: %s value is less than or equal to %s"),
- "rmargin", up->name);
- return;
- }
- }
- uparams = *upptr;
- uparams.valid = 1;
-}
-
-/* Read user options from the environment, and fill in UPARAMS appropiately. */
-static void
-fill_in_uparams (const struct argp_state *state)
-{
- const char *var = getenv ("ARGP_HELP_FMT");
- struct uparams new_params = uparams;
-
-#define SKIPWS(p) do { while (isspace ((unsigned char) *p)) p++; } while (0);
-
- if (var)
- {
- /* Parse var. */
- while (*var)
- {
- SKIPWS (var);
-
- if (isalpha ((unsigned char) *var))
- {
- size_t var_len;
- const struct uparam_name *un;
- int unspec = 0, val = 0;
- const char *arg = var;
-
- while (isalnum ((unsigned char) *arg) || *arg == '-' || *arg == '_')
- arg++;
- var_len = arg - var;
-
- SKIPWS (arg);
-
- if (*arg == '\0' || *arg == ',')
- unspec = 1;
- else if (*arg == '=')
- {
- arg++;
- SKIPWS (arg);
- }
-
- if (unspec)
- {
- if (var[0] == 'n' && var[1] == 'o' && var[2] == '-')
- {
- val = 0;
- var += 3;
- var_len -= 3;
- }
- else
- val = 1;
- }
- else if (isdigit ((unsigned char) *arg))
- {
- val = atoi (arg);
- while (isdigit ((unsigned char) *arg))
- arg++;
- SKIPWS (arg);
- }
-
- for (un = uparam_names; un->name; un++)
- if (strlen (un->name) == var_len
- && strncmp (var, un->name, var_len) == 0)
- {
- if (unspec && !un->is_bool)
- __argp_failure (state, 0, 0,
- dgettext (state->root_argp->argp_domain,
- "\
-%.*s: ARGP_HELP_FMT parameter requires a value"),
- (int) var_len, var);
- else if (val < 0)
- __argp_failure (state, 0, 0,
- dgettext (state->root_argp->argp_domain,
- "\
-%.*s: ARGP_HELP_FMT parameter must be positive"),
- (int) var_len, var);
- else
- *(int *)((char *)&new_params + un->uparams_offs) = val;
- break;
- }
- if (! un->name)
- __argp_failure (state, 0, 0,
- dgettext (state->root_argp->argp_domain, "\
-%.*s: Unknown ARGP_HELP_FMT parameter"),
- (int) var_len, var);
-
- var = arg;
- if (*var == ',')
- var++;
- }
- else if (*var)
- {
- __argp_failure (state, 0, 0,
- dgettext (state->root_argp->argp_domain,
- "Garbage in ARGP_HELP_FMT: %s"), var);
- break;
- }
- }
- validate_uparams (state, &new_params);
- }
-}
-
-/* Returns true if OPT hasn't been marked invisible. Visibility only affects
- whether OPT is displayed or used in sorting, not option shadowing. */
-#define ovisible(opt) (! ((opt)->flags & OPTION_HIDDEN))
-
-/* Returns true if OPT is an alias for an earlier option. */
-#define oalias(opt) ((opt)->flags & OPTION_ALIAS)
-
-/* Returns true if OPT is an documentation-only entry. */
-#define odoc(opt) ((opt)->flags & OPTION_DOC)
-
-/* Returns true if OPT should not be translated */
-#define onotrans(opt) ((opt)->flags & OPTION_NO_TRANS)
-
-/* Returns true if OPT is the end-of-list marker for a list of options. */
-#define oend(opt) __option_is_end (opt)
-
-/* Returns true if OPT has a short option. */
-#define oshort(opt) __option_is_short (opt)
-
-/*
- The help format for a particular option is like:
-
- -xARG, -yARG, --long1=ARG, --long2=ARG Documentation...
-
- Where ARG will be omitted if there's no argument, for this option, or
- will be surrounded by "[" and "]" appropiately if the argument is
- optional. The documentation string is word-wrapped appropiately, and if
- the list of options is long enough, it will be started on a separate line.
- If there are no short options for a given option, the first long option is
- indented slighly in a way that's supposed to make most long options appear
- to be in a separate column.
-
- For example, the following output (from ps):
-
- -p PID, --pid=PID List the process PID
- --pgrp=PGRP List processes in the process group PGRP
- -P, -x, --no-parent Include processes without parents
- -Q, --all-fields Don't elide unusable fields (normally if there's
- some reason ps can't print a field for any
- process, it's removed from the output entirely)
- -r, --reverse, --gratuitously-long-reverse-option
- Reverse the order of any sort
- --session[=SID] Add the processes from the session SID (which
- defaults to the sid of the current process)
-
- Here are some more options:
- -f ZOT, --foonly=ZOT Glork a foonly
- -z, --zaza Snit a zar
-
- -?, --help Give this help list
- --usage Give a short usage message
- -V, --version Print program version
-
- The struct argp_option array for the above could look like:
-
- {
- {"pid", 'p', "PID", 0, "List the process PID"},
- {"pgrp", OPT_PGRP, "PGRP", 0, "List processes in the process group PGRP"},
- {"no-parent", 'P', 0, 0, "Include processes without parents"},
- {0, 'x', 0, OPTION_ALIAS},
- {"all-fields",'Q', 0, 0, "Don't elide unusable fields (normally"
- " if there's some reason ps can't"
- " print a field for any process, it's"
- " removed from the output entirely)" },
- {"reverse", 'r', 0, 0, "Reverse the order of any sort"},
- {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
- {"session", OPT_SESS, "SID", OPTION_ARG_OPTIONAL,
- "Add the processes from the session"
- " SID (which defaults to the sid of"
- " the current process)" },
-
- {0,0,0,0, "Here are some more options:"},
- {"foonly", 'f', "ZOT", 0, "Glork a foonly"},
- {"zaza", 'z', 0, 0, "Snit a zar"},
-
- {0}
- }
-
- Note that the last three options are automatically supplied by argp_parse,
- unless you tell it not to with ARGP_NO_HELP.
-
-*/
-
-/* Returns true if CH occurs between BEG and END. */
-static int
-find_char (char ch, char *beg, char *end)
-{
- while (beg < end)
- if (*beg == ch)
- return 1;
- else
- beg++;
- return 0;
-}
-
-struct hol_cluster; /* fwd decl */
-
-struct hol_entry
-{
- /* First option. */
- const struct argp_option *opt;
- /* Number of options (including aliases). */
- unsigned num;
-
- /* A pointers into the HOL's short_options field, to the first short option
- letter for this entry. The order of the characters following this point
- corresponds to the order of options pointed to by OPT, and there are at
- most NUM. A short option recorded in a option following OPT is only
- valid if it occurs in the right place in SHORT_OPTIONS (otherwise it's
- probably been shadowed by some other entry). */
- char *short_options;
-
- /* Entries are sorted by their group first, in the order:
- 1, 2, ..., n, 0, -m, ..., -2, -1
- and then alphabetically within each group. The default is 0. */
- int group;
-
- /* The cluster of options this entry belongs to, or 0 if none. */
- struct hol_cluster *cluster;
-
- /* The argp from which this option came. */
- const struct argp *argp;
-
- /* Position in the array */
- unsigned ord;
-};
-
-/* A cluster of entries to reflect the argp tree structure. */
-struct hol_cluster
-{
- /* A descriptive header printed before options in this cluster. */
- const char *header;
-
- /* Used to order clusters within the same group with the same parent,
- according to the order in which they occurred in the parent argp's child
- list. */
- int index;
-
- /* How to sort this cluster with respect to options and other clusters at the
- same depth (clusters always follow options in the same group). */
- int group;
-
- /* The cluster to which this cluster belongs, or 0 if it's at the base
- level. */
- struct hol_cluster *parent;
-
- /* The argp from which this cluster is (eventually) derived. */
- const struct argp *argp;
-
- /* The distance this cluster is from the root. */
- int depth;
-
- /* Clusters in a given hol are kept in a linked list, to make freeing them
- possible. */
- struct hol_cluster *next;
-};
-
-/* A list of options for help. */
-struct hol
-{
- /* An array of hol_entry's. */
- struct hol_entry *entries;
- /* The number of entries in this hol. If this field is zero, the others
- are undefined. */
- unsigned num_entries;
-
- /* A string containing all short options in this HOL. Each entry contains
- pointers into this string, so the order can't be messed with blindly. */
- char *short_options;
-
- /* Clusters of entries in this hol. */
- struct hol_cluster *clusters;
-};
-
-/* Create a struct hol from the options in ARGP. CLUSTER is the
- hol_cluster in which these entries occur, or 0, if at the root. */
-static struct hol *
-make_hol (const struct argp *argp, struct hol_cluster *cluster)
-{
- char *so;
- const struct argp_option *o;
- const struct argp_option *opts = argp->options;
- struct hol_entry *entry;
- unsigned num_short_options = 0;
- struct hol *hol = malloc (sizeof (struct hol));
-
- assert (hol);
-
- hol->num_entries = 0;
- hol->clusters = 0;
-
- if (opts)
- {
- int cur_group = 0;
-
- /* The first option must not be an alias. */
- assert (! oalias (opts));
-
- /* Calculate the space needed. */
- for (o = opts; ! oend (o); o++)
- {
- if (! oalias (o))
- hol->num_entries++;
- if (oshort (o))
- num_short_options++; /* This is an upper bound. */
- }
-
- hol->entries = malloc (sizeof (struct hol_entry) * hol->num_entries);
- hol->short_options = malloc (num_short_options + 1);
-
- assert (hol->entries && hol->short_options);
- if (SIZE_MAX <= UINT_MAX)
- assert (hol->num_entries <= SIZE_MAX / sizeof (struct hol_entry));
-
- /* Fill in the entries. */
- so = hol->short_options;
- for (o = opts, entry = hol->entries; ! oend (o); entry++)
- {
- entry->opt = o;
- entry->num = 0;
- entry->short_options = so;
- entry->group = cur_group =
- o->group
- ? o->group
- : ((!o->name && !o->key)
- ? cur_group + 1
- : cur_group);
- entry->cluster = cluster;
- entry->argp = argp;
-
- do
- {
- entry->num++;
- if (oshort (o) && ! find_char (o->key, hol->short_options, so))
- /* O has a valid short option which hasn't already been used.*/
- *so++ = o->key;
- o++;
- }
- while (! oend (o) && oalias (o));
- }
- *so = '\0'; /* null terminated so we can find the length */
- }
-
- return hol;
-}
-
-/* Add a new cluster to HOL, with the given GROUP and HEADER (taken from the
- associated argp child list entry), INDEX, and PARENT, and return a pointer
- to it. ARGP is the argp that this cluster results from. */
-static struct hol_cluster *
-hol_add_cluster (struct hol *hol, int group, const char *header, int index,
- struct hol_cluster *parent, const struct argp *argp)
-{
- struct hol_cluster *cl = malloc (sizeof (struct hol_cluster));
- if (cl)
- {
- cl->group = group;
- cl->header = header;
-
- cl->index = index;
- cl->parent = parent;
- cl->argp = argp;
- cl->depth = parent ? parent->depth + 1 : 0;
-
- cl->next = hol->clusters;
- hol->clusters = cl;
- }
- return cl;
-}
-
-/* Free HOL and any resources it uses. */
-static void
-hol_free (struct hol *hol)
-{
- struct hol_cluster *cl = hol->clusters;
-
- while (cl)
- {
- struct hol_cluster *next = cl->next;
- free (cl);
- cl = next;
- }
-
- if (hol->num_entries > 0)
- {
- free (hol->entries);
- free (hol->short_options);
- }
-
- free (hol);
-}
-
-static int
-hol_entry_short_iterate (const struct hol_entry *entry,
- int (*func)(const struct argp_option *opt,
- const struct argp_option *real,
- const char *domain, void *cookie),
- const char *domain, void *cookie)
-{
- unsigned nopts;
- int val = 0;
- const struct argp_option *opt, *real = entry->opt;
- char *so = entry->short_options;
-
- for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
- if (oshort (opt) && *so == opt->key)
- {
- if (!oalias (opt))
- real = opt;
- if (ovisible (opt))
- val = (*func)(opt, real, domain, cookie);
- so++;
- }
-
- return val;
-}
-
-static inline int
-__attribute__ ((always_inline))
-hol_entry_long_iterate (const struct hol_entry *entry,
- int (*func)(const struct argp_option *opt,
- const struct argp_option *real,
- const char *domain, void *cookie),
- const char *domain, void *cookie)
-{
- unsigned nopts;
- int val = 0;
- const struct argp_option *opt, *real = entry->opt;
-
- for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
- if (opt->name)
- {
- if (!oalias (opt))
- real = opt;
- if (ovisible (opt))
- val = (*func)(opt, real, domain, cookie);
- }
-
- return val;
-}
-
-/* Iterator that returns true for the first short option. */
-static inline int
-until_short (const struct argp_option *opt, const struct argp_option *real,
- const char *domain, void *cookie)
-{
- return oshort (opt) ? opt->key : 0;
-}
-
-/* Returns the first valid short option in ENTRY, or 0 if there is none. */
-static char
-hol_entry_first_short (const struct hol_entry *entry)
-{
- return hol_entry_short_iterate (entry, until_short,
- entry->argp->argp_domain, 0);
-}
-
-/* Returns the first valid long option in ENTRY, or 0 if there is none. */
-static const char *
-hol_entry_first_long (const struct hol_entry *entry)
-{
- const struct argp_option *opt;
- unsigned num;
- for (opt = entry->opt, num = entry->num; num > 0; opt++, num--)
- if (opt->name && ovisible (opt))
- return opt->name;
- return 0;
-}
-
-/* Returns the entry in HOL with the long option name NAME, or 0 if there is
- none. */
-static struct hol_entry *
-hol_find_entry (struct hol *hol, const char *name)
-{
- struct hol_entry *entry = hol->entries;
- unsigned num_entries = hol->num_entries;
-
- while (num_entries-- > 0)
- {
- const struct argp_option *opt = entry->opt;
- unsigned num_opts = entry->num;
-
- while (num_opts-- > 0)
- if (opt->name && ovisible (opt) && strcmp (opt->name, name) == 0)
- return entry;
- else
- opt++;
-
- entry++;
- }
-
- return 0;
-}
-
-/* If an entry with the long option NAME occurs in HOL, set it's special
- sort position to GROUP. */
-static void
-hol_set_group (struct hol *hol, const char *name, int group)
-{
- struct hol_entry *entry = hol_find_entry (hol, name);
- if (entry)
- entry->group = group;
-}
-
-/* Order by group: 0, 1, 2, ..., n, -m, ..., -2, -1.
- EQ is what to return if GROUP1 and GROUP2 are the same. */
-static int
-group_cmp (int group1, int group2, int eq)
-{
- if (group1 == group2)
- return eq;
- else if ((group1 < 0 && group2 < 0) || (group1 >= 0 && group2 >= 0))
- return group1 - group2;
- else
- return group2 - group1;
-}
-
-/* Compare clusters CL1 & CL2 by the order that they should appear in
- output. */
-static int
-hol_cluster_cmp (const struct hol_cluster *cl1, const struct hol_cluster *cl2)
-{
- /* If one cluster is deeper than the other, use its ancestor at the same
- level, so that finding the common ancestor is straightforward.
-
- clN->depth > 0 means that clN->parent != NULL (see hol_add_cluster) */
- while (cl1->depth > cl2->depth)
- cl1 = cl1->parent;
- while (cl2->depth > cl1->depth)
- cl2 = cl2->parent;
-
- /* Now reduce both clusters to their ancestors at the point where both have
- a common parent; these can be directly compared. */
- while (cl1->parent != cl2->parent)
- cl1 = cl1->parent, cl2 = cl2->parent;
-
- return group_cmp (cl1->group, cl2->group, cl2->index - cl1->index);
-}
-
-/* Return the ancestor of CL that's just below the root (i.e., has a parent
- of 0). */
-static struct hol_cluster *
-hol_cluster_base (struct hol_cluster *cl)
-{
- while (cl->parent)
- cl = cl->parent;
- return cl;
-}
-
-/* Return true if CL1 is a child of CL2. */
-static int
-hol_cluster_is_child (const struct hol_cluster *cl1,
- const struct hol_cluster *cl2)
-{
- while (cl1 && cl1 != cl2)
- cl1 = cl1->parent;
- return cl1 == cl2;
-}
-
-/* Given the name of a OPTION_DOC option, modifies NAME to start at the tail
- that should be used for comparisons, and returns true iff it should be
- treated as a non-option. */
-static int
-canon_doc_option (const char **name)
-{
- int non_opt;
-
- if (!*name)
- non_opt = 1;
- else
- {
- /* Skip initial whitespace. */
- while (isspace ((unsigned char) **name))
- (*name)++;
- /* Decide whether this looks like an option (leading `-') or not. */
- non_opt = (**name != '-');
- /* Skip until part of name used for sorting. */
- while (**name && !isalnum ((unsigned char) **name))
- (*name)++;
- }
- return non_opt;
-}
-
-#define HOL_ENTRY_PTRCMP(a,b) ((a)->ord < (b)->ord ? -1 : 1)
-
-/* Order ENTRY1 & ENTRY2 by the order which they should appear in a help
- listing. */
-static int
-hol_entry_cmp (const struct hol_entry *entry1,
- const struct hol_entry *entry2)
-{
- /* The group numbers by which the entries should be ordered; if either is
- in a cluster, then this is just the group within the cluster. */
- int group1 = entry1->group, group2 = entry2->group;
- int rc;
-
- if (entry1->cluster != entry2->cluster)
- {
- /* The entries are not within the same cluster, so we can't compare them
- directly, we have to use the appropiate clustering level too. */
- if (! entry1->cluster)
- /* ENTRY1 is at the `base level', not in a cluster, so we have to
- compare it's group number with that of the base cluster in which
- ENTRY2 resides. Note that if they're in the same group, the
- clustered option always comes laster. */
- return group_cmp (group1, hol_cluster_base (entry2->cluster)->group, -1);
- else if (! entry2->cluster)
- /* Likewise, but ENTRY2's not in a cluster. */
- return group_cmp (hol_cluster_base (entry1->cluster)->group, group2, 1);
- else
- /* Both entries are in clusters, we can just compare the clusters. */
- return (rc = hol_cluster_cmp (entry1->cluster, entry2->cluster)) ?
- rc : HOL_ENTRY_PTRCMP(entry1, entry2);
- }
- else if (group1 == group2)
- /* The entries are both in the same cluster and group, so compare them
- alphabetically. */
- {
- int short1 = hol_entry_first_short (entry1);
- int short2 = hol_entry_first_short (entry2);
- int doc1 = odoc (entry1->opt);
- int doc2 = odoc (entry2->opt);
- const char *long1 = hol_entry_first_long (entry1);
- const char *long2 = hol_entry_first_long (entry2);
-
- if (doc1)
- doc1 = canon_doc_option (&long1);
- if (doc2)
- doc2 = canon_doc_option (&long2);
-
- if (doc1 != doc2)
- /* `documentation' options always follow normal options (or
- documentation options that *look* like normal options). */
- return doc1 - doc2;
- else if (!short1 && !short2 && long1 && long2)
- /* Only long options. */
- return (rc = __strcasecmp (long1, long2)) ?
- rc : HOL_ENTRY_PTRCMP(entry1, entry2);
- else
- /* Compare short/short, long/short, short/long, using the first
- character of long options. Entries without *any* valid
- options (such as options with OPTION_HIDDEN set) will be put
- first, but as they're not displayed, it doesn't matter where
- they are. */
- {
- char first1 = short1 ? short1 : long1 ? *long1 : 0;
- char first2 = short2 ? short2 : long2 ? *long2 : 0;
-#ifdef _tolower
- int lower_cmp = _tolower (first1) - _tolower (first2);
-#else
- int lower_cmp = tolower (first1) - tolower (first2);
-#endif
- /* Compare ignoring case, except when the options are both the
- same letter, in which case lower-case always comes first. */
- return lower_cmp ? lower_cmp :
- (rc = first2 - first1) ?
- rc : HOL_ENTRY_PTRCMP(entry1, entry2);
- }
- }
- else
- /* Within the same cluster, but not the same group, so just compare
- groups. */
- return group_cmp (group1, group2, HOL_ENTRY_PTRCMP(entry1, entry2));
-}
-
-/* Version of hol_entry_cmp with correct signature for qsort. */
-static int
-hol_entry_qcmp (const void *entry1_v, const void *entry2_v)
-{
- return hol_entry_cmp (entry1_v, entry2_v);
-}
-
-/* Sort HOL by group and alphabetically by option name (with short options
- taking precedence over long). Since the sorting is for display purposes
- only, the shadowing of options isn't effected. */
-static void
-hol_sort (struct hol *hol)
-{
- if (hol->num_entries > 0)
- {
- unsigned i;
- struct hol_entry *e;
- for (i = 0, e = hol->entries; i < hol->num_entries; i++, e++)
- e->ord = i;
- qsort (hol->entries, hol->num_entries, sizeof (struct hol_entry),
- hol_entry_qcmp);
- }
-}
-
-/* Append MORE to HOL, destroying MORE in the process. Options in HOL shadow
- any in MORE with the same name. */
-static void
-hol_append (struct hol *hol, struct hol *more)
-{
- struct hol_cluster **cl_end = &hol->clusters;
-
- /* Steal MORE's cluster list, and add it to the end of HOL's. */
- while (*cl_end)
- cl_end = &(*cl_end)->next;
- *cl_end = more->clusters;
- more->clusters = 0;
-
- /* Merge entries. */
- if (more->num_entries > 0)
- {
- if (hol->num_entries == 0)
- {
- hol->num_entries = more->num_entries;
- hol->entries = more->entries;
- hol->short_options = more->short_options;
- more->num_entries = 0; /* Mark MORE's fields as invalid. */
- }
- else
- /* Append the entries in MORE to those in HOL, taking care to only add
- non-shadowed SHORT_OPTIONS values. */
- {
- unsigned left;
- char *so, *more_so;
- struct hol_entry *e;
- unsigned num_entries = hol->num_entries + more->num_entries;
- struct hol_entry *entries =
- malloc (num_entries * sizeof (struct hol_entry));
- unsigned hol_so_len = strlen (hol->short_options);
- char *short_options =
- malloc (hol_so_len + strlen (more->short_options) + 1);
-
- assert (entries && short_options);
- if (SIZE_MAX <= UINT_MAX)
- assert (num_entries <= SIZE_MAX / sizeof (struct hol_entry));
-
- __mempcpy (__mempcpy (entries, hol->entries,
- hol->num_entries * sizeof (struct hol_entry)),
- more->entries,
- more->num_entries * sizeof (struct hol_entry));
-
- __mempcpy (short_options, hol->short_options, hol_so_len);
-
- /* Fix up the short options pointers from HOL. */
- for (e = entries, left = hol->num_entries; left > 0; e++, left--)
- e->short_options += (short_options - hol->short_options);
-
- /* Now add the short options from MORE, fixing up its entries
- too. */
- so = short_options + hol_so_len;
- more_so = more->short_options;
- for (left = more->num_entries; left > 0; e++, left--)
- {
- int opts_left;
- const struct argp_option *opt;
-
- e->short_options = so;
-
- for (opts_left = e->num, opt = e->opt; opts_left; opt++, opts_left--)
- {
- int ch = *more_so;
- if (oshort (opt) && ch == opt->key)
- /* The next short option in MORE_SO, CH, is from OPT. */
- {
- if (! find_char (ch, short_options,
- short_options + hol_so_len))
- /* The short option CH isn't shadowed by HOL's options,
- so add it to the sum. */
- *so++ = ch;
- more_so++;
- }
- }
- }
-
- *so = '\0';
-
- free (hol->entries);
- free (hol->short_options);
-
- hol->entries = entries;
- hol->num_entries = num_entries;
- hol->short_options = short_options;
- }
- }
-
- hol_free (more);
-}
-
-/* Inserts enough spaces to make sure STREAM is at column COL. */
-static void
-indent_to (argp_fmtstream_t stream, unsigned col)
-{
- int needed = col - __argp_fmtstream_point (stream);
- while (needed-- > 0)
- __argp_fmtstream_putc (stream, ' ');
-}
-
-/* Output to STREAM either a space, or a newline if there isn't room for at
- least ENSURE characters before the right margin. */
-static void
-space (argp_fmtstream_t stream, size_t ensure)
-{
- if (__argp_fmtstream_point (stream) + ensure
- >= __argp_fmtstream_rmargin (stream))
- __argp_fmtstream_putc (stream, '\n');
- else
- __argp_fmtstream_putc (stream, ' ');
-}
-
-/* If the option REAL has an argument, we print it in using the printf
- format REQ_FMT or OPT_FMT depending on whether it's a required or
- optional argument. */
-static void
-arg (const struct argp_option *real, const char *req_fmt, const char *opt_fmt,
- const char *domain, argp_fmtstream_t stream)
-{
- if (real->arg)
- {
- if (real->flags & OPTION_ARG_OPTIONAL)
- __argp_fmtstream_printf (stream, opt_fmt,
- dgettext (domain, real->arg));
- else
- __argp_fmtstream_printf (stream, req_fmt,
- dgettext (domain, real->arg));
- }
-}
-
-/* Helper functions for hol_entry_help. */
-
-/* State used during the execution of hol_help. */
-struct hol_help_state
-{
- /* PREV_ENTRY should contain the previous entry printed, or 0. */
- struct hol_entry *prev_entry;
-
- /* If an entry is in a different group from the previous one, and SEP_GROUPS
- is true, then a blank line will be printed before any output. */
- int sep_groups;
-
- /* True if a duplicate option argument was suppressed (only ever set if
- UPARAMS.dup_args is false). */
- int suppressed_dup_arg;
-};
-
-/* Some state used while printing a help entry (used to communicate with
- helper functions). See the doc for hol_entry_help for more info, as most
- of the fields are copied from its arguments. */
-struct pentry_state
-{
- const struct hol_entry *entry;
- argp_fmtstream_t stream;
- struct hol_help_state *hhstate;
-
- /* True if nothing's been printed so far. */
- int first;
-
- /* If non-zero, the state that was used to print this help. */
- const struct argp_state *state;
-};
-
-/* If a user doc filter should be applied to DOC, do so. */
-static const char *
-filter_doc (const char *doc, int key, const struct argp *argp,
- const struct argp_state *state)
-{
- if (argp->help_filter)
- /* We must apply a user filter to this output. */
- {
- void *input = __argp_input (argp, state);
- return (*argp->help_filter) (key, doc, input);
- }
- else
- /* No filter. */
- return doc;
-}
-
-/* Prints STR as a header line, with the margin lines set appropiately, and
- notes the fact that groups should be separated with a blank line. ARGP is
- the argp that should dictate any user doc filtering to take place. Note
- that the previous wrap margin isn't restored, but the left margin is reset
- to 0. */
-static void
-print_header (const char *str, const struct argp *argp,
- struct pentry_state *pest)
-{
- const char *tstr = dgettext (argp->argp_domain, str);
- const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_HEADER, argp, pest->state);
-
- if (fstr)
- {
- if (*fstr)
- {
- if (pest->hhstate->prev_entry)
- /* Precede with a blank line. */
- __argp_fmtstream_putc (pest->stream, '\n');
- indent_to (pest->stream, uparams.header_col);
- __argp_fmtstream_set_lmargin (pest->stream, uparams.header_col);
- __argp_fmtstream_set_wmargin (pest->stream, uparams.header_col);
- __argp_fmtstream_puts (pest->stream, fstr);
- __argp_fmtstream_set_lmargin (pest->stream, 0);
- __argp_fmtstream_putc (pest->stream, '\n');
- }
-
- pest->hhstate->sep_groups = 1; /* Separate subsequent groups. */
- }
-
- if (fstr != tstr)
- free ((char *) fstr);
-}
-
-/* Inserts a comma if this isn't the first item on the line, and then makes
- sure we're at least to column COL. If this *is* the first item on a line,
- prints any pending whitespace/headers that should precede this line. Also
- clears FIRST. */
-static void
-comma (unsigned col, struct pentry_state *pest)
-{
- if (pest->first)
- {
- const struct hol_entry *pe = pest->hhstate->prev_entry;
- const struct hol_cluster *cl = pest->entry->cluster;
-
- if (pest->hhstate->sep_groups && pe && pest->entry->group != pe->group)
- __argp_fmtstream_putc (pest->stream, '\n');
-
- if (cl && cl->header && *cl->header
- && (!pe
- || (pe->cluster != cl
- && !hol_cluster_is_child (pe->cluster, cl))))
- /* If we're changing clusters, then this must be the start of the
- ENTRY's cluster unless that is an ancestor of the previous one
- (in which case we had just popped into a sub-cluster for a bit).
- If so, then print the cluster's header line. */
- {
- int old_wm = __argp_fmtstream_wmargin (pest->stream);
- print_header (cl->header, cl->argp, pest);
- __argp_fmtstream_set_wmargin (pest->stream, old_wm);
- }
-
- pest->first = 0;
- }
- else
- __argp_fmtstream_puts (pest->stream, ", ");
-
- indent_to (pest->stream, col);
-}
-
-/* Print help for ENTRY to STREAM. */
-static void
-hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
- argp_fmtstream_t stream, struct hol_help_state *hhstate)
-{
- unsigned num;
- const struct argp_option *real = entry->opt, *opt;
- char *so = entry->short_options;
- int have_long_opt = 0; /* We have any long options. */
- /* Saved margins. */
- int old_lm = __argp_fmtstream_set_lmargin (stream, 0);
- int old_wm = __argp_fmtstream_wmargin (stream);
- /* PEST is a state block holding some of our variables that we'd like to
- share with helper functions. */
- struct pentry_state pest;
-
- pest.entry = entry;
- pest.stream = stream;
- pest.hhstate = hhstate;
- pest.first = 1;
- pest.state = state;
-
- if (! odoc (real))
- for (opt = real, num = entry->num; num > 0; opt++, num--)
- if (opt->name && ovisible (opt))
- {
- have_long_opt = 1;
- break;
- }
-
- /* First emit short options. */
- __argp_fmtstream_set_wmargin (stream, uparams.short_opt_col); /* For truly bizarre cases. */
- for (opt = real, num = entry->num; num > 0; opt++, num--)
- if (oshort (opt) && opt->key == *so)
- /* OPT has a valid (non shadowed) short option. */
- {
- if (ovisible (opt))
- {
- comma (uparams.short_opt_col, &pest);
- __argp_fmtstream_putc (stream, '-');
- __argp_fmtstream_putc (stream, *so);
- if (!have_long_opt || uparams.dup_args)
- arg (real, " %s", "[%s]", state->root_argp->argp_domain, stream);
- else if (real->arg)
- hhstate->suppressed_dup_arg = 1;
- }
- so++;
- }
-
- /* Now, long options. */
- if (odoc (real))
- /* A `documentation' option. */
- {
- __argp_fmtstream_set_wmargin (stream, uparams.doc_opt_col);
- for (opt = real, num = entry->num; num > 0; opt++, num--)
- if (opt->name && *opt->name && ovisible (opt))
- {
- comma (uparams.doc_opt_col, &pest);
- /* Calling dgettext here isn't quite right, since sorting will
- have been done on the original; but documentation options
- should be pretty rare anyway... */
- __argp_fmtstream_puts (stream,
- onotrans (opt) ?
- opt->name :
- dgettext (state->root_argp->argp_domain,
- opt->name));
- }
- }
- else
- /* A real long option. */
- {
- int first_long_opt = 1;
-
- __argp_fmtstream_set_wmargin (stream, uparams.long_opt_col);
- for (opt = real, num = entry->num; num > 0; opt++, num--)
- if (opt->name && ovisible (opt))
- {
- comma (uparams.long_opt_col, &pest);
- __argp_fmtstream_printf (stream, "--%s", opt->name);
- if (first_long_opt || uparams.dup_args)
- arg (real, "=%s", "[=%s]", state->root_argp->argp_domain,
- stream);
- else if (real->arg)
- hhstate->suppressed_dup_arg = 1;
- }
- }
-
- /* Next, documentation strings. */
- __argp_fmtstream_set_lmargin (stream, 0);
-
- if (pest.first)
- {
- /* Didn't print any switches, what's up? */
- if (!oshort (real) && !real->name)
- /* This is a group header, print it nicely. */
- print_header (real->doc, entry->argp, &pest);
- else
- /* Just a totally shadowed option or null header; print nothing. */
- goto cleanup; /* Just return, after cleaning up. */
- }
- else
- {
- const char *tstr = real->doc ? dgettext (state->root_argp->argp_domain,
- real->doc) : 0;
- const char *fstr = filter_doc (tstr, real->key, entry->argp, state);
- if (fstr && *fstr)
- {
- unsigned int col = __argp_fmtstream_point (stream);
-
- __argp_fmtstream_set_lmargin (stream, uparams.opt_doc_col);
- __argp_fmtstream_set_wmargin (stream, uparams.opt_doc_col);
-
- if (col > (unsigned int) (uparams.opt_doc_col + 3))
- __argp_fmtstream_putc (stream, '\n');
- else if (col >= (unsigned int) uparams.opt_doc_col)
- __argp_fmtstream_puts (stream, " ");
- else
- indent_to (stream, uparams.opt_doc_col);
-
- __argp_fmtstream_puts (stream, fstr);
- }
- if (fstr && fstr != tstr)
- free ((char *) fstr);
-
- /* Reset the left margin. */
- __argp_fmtstream_set_lmargin (stream, 0);
- __argp_fmtstream_putc (stream, '\n');
- }
-
- hhstate->prev_entry = entry;
-
-cleanup:
- __argp_fmtstream_set_lmargin (stream, old_lm);
- __argp_fmtstream_set_wmargin (stream, old_wm);
-}
-
-/* Output a long help message about the options in HOL to STREAM. */
-static void
-hol_help (struct hol *hol, const struct argp_state *state,
- argp_fmtstream_t stream)
-{
- unsigned num;
- struct hol_entry *entry;
- struct hol_help_state hhstate = { 0, 0, 0 };
-
- for (entry = hol->entries, num = hol->num_entries; num > 0; entry++, num--)
- hol_entry_help (entry, state, stream, &hhstate);
-
- if (hhstate.suppressed_dup_arg && uparams.dup_args_note)
- {
- const char *tstr = dgettext (state->root_argp->argp_domain, "\
-Mandatory or optional arguments to long options are also mandatory or \
-optional for any corresponding short options.");
- const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE,
- state ? state->root_argp : 0, state);
- if (fstr && *fstr)
- {
- __argp_fmtstream_putc (stream, '\n');
- __argp_fmtstream_puts (stream, fstr);
- __argp_fmtstream_putc (stream, '\n');
- }
- if (fstr && fstr != tstr)
- free ((char *) fstr);
- }
-}
-
-/* Helper functions for hol_usage. */
-
-/* If OPT is a short option without an arg, append its key to the string
- pointer pointer to by COOKIE, and advance the pointer. */
-static int
-add_argless_short_opt (const struct argp_option *opt,
- const struct argp_option *real,
- const char *domain, void *cookie)
-{
- char **snao_end = cookie;
- if (!(opt->arg || real->arg)
- && !((opt->flags | real->flags) & OPTION_NO_USAGE))
- *(*snao_end)++ = opt->key;
- return 0;
-}
-
-/* If OPT is a short option with an arg, output a usage entry for it to the
- stream pointed at by COOKIE. */
-static int
-usage_argful_short_opt (const struct argp_option *opt,
- const struct argp_option *real,
- const char *domain, void *cookie)
-{
- argp_fmtstream_t stream = cookie;
- const char *arg = opt->arg;
- int flags = opt->flags | real->flags;
-
- if (! arg)
- arg = real->arg;
-
- if (arg && !(flags & OPTION_NO_USAGE))
- {
- arg = dgettext (domain, arg);
-
- if (flags & OPTION_ARG_OPTIONAL)
- __argp_fmtstream_printf (stream, " [-%c[%s]]", opt->key, arg);
- else
- {
- /* Manually do line wrapping so that it (probably) won't
- get wrapped at the embedded space. */
- space (stream, 6 + strlen (arg));
- __argp_fmtstream_printf (stream, "[-%c %s]", opt->key, arg);
- }
- }
-
- return 0;
-}
-
-/* Output a usage entry for the long option opt to the stream pointed at by
- COOKIE. */
-static int
-usage_long_opt (const struct argp_option *opt,
- const struct argp_option *real,
- const char *domain, void *cookie)
-{
- argp_fmtstream_t stream = cookie;
- const char *arg = opt->arg;
- int flags = opt->flags | real->flags;
-
- if (! arg)
- arg = real->arg;
-
- if (! (flags & OPTION_NO_USAGE) && !odoc (opt))
- {
- if (arg)
- {
- arg = dgettext (domain, arg);
- if (flags & OPTION_ARG_OPTIONAL)
- __argp_fmtstream_printf (stream, " [--%s[=%s]]", opt->name, arg);
- else
- __argp_fmtstream_printf (stream, " [--%s=%s]", opt->name, arg);
- }
- else
- __argp_fmtstream_printf (stream, " [--%s]", opt->name);
- }
-
- return 0;
-}
-
-/* Print a short usage description for the arguments in HOL to STREAM. */
-static void
-hol_usage (struct hol *hol, argp_fmtstream_t stream)
-{
- if (hol->num_entries > 0)
- {
- unsigned nentries;
- struct hol_entry *entry;
- char *short_no_arg_opts = alloca (strlen (hol->short_options) + 1);
- char *snao_end = short_no_arg_opts;
-
- /* First we put a list of short options without arguments. */
- for (entry = hol->entries, nentries = hol->num_entries
- ; nentries > 0
- ; entry++, nentries--)
- hol_entry_short_iterate (entry, add_argless_short_opt,
- entry->argp->argp_domain, &snao_end);
- if (snao_end > short_no_arg_opts)
- {
- *snao_end++ = 0;
- __argp_fmtstream_printf (stream, " [-%s]", short_no_arg_opts);
- }
-
- /* Now a list of short options *with* arguments. */
- for (entry = hol->entries, nentries = hol->num_entries
- ; nentries > 0
- ; entry++, nentries--)
- hol_entry_short_iterate (entry, usage_argful_short_opt,
- entry->argp->argp_domain, stream);
-
- /* Finally, a list of long options (whew!). */
- for (entry = hol->entries, nentries = hol->num_entries
- ; nentries > 0
- ; entry++, nentries--)
- hol_entry_long_iterate (entry, usage_long_opt,
- entry->argp->argp_domain, stream);
- }
-}
-
-/* Make a HOL containing all levels of options in ARGP. CLUSTER is the
- cluster in which ARGP's entries should be clustered, or 0. */
-static struct hol *
-argp_hol (const struct argp *argp, struct hol_cluster *cluster)
-{
- const struct argp_child *child = argp->children;
- struct hol *hol = make_hol (argp, cluster);
- if (child)
- while (child->argp)
- {
- struct hol_cluster *child_cluster =
- ((child->group || child->header)
- /* Put CHILD->argp within its own cluster. */
- ? hol_add_cluster (hol, child->group, child->header,
- child - argp->children, cluster, argp)
- /* Just merge it into the parent's cluster. */
- : cluster);
- hol_append (hol, argp_hol (child->argp, child_cluster)) ;
- child++;
- }
- return hol;
-}
-
-/* Calculate how many different levels with alternative args strings exist in
- ARGP. */
-static size_t
-argp_args_levels (const struct argp *argp)
-{
- size_t levels = 0;
- const struct argp_child *child = argp->children;
-
- if (argp->args_doc && strchr (argp->args_doc, '\n'))
- levels++;
-
- if (child)
- while (child->argp)
- levels += argp_args_levels ((child++)->argp);
-
- return levels;
-}
-
-/* Print all the non-option args documented in ARGP to STREAM. Any output is
- preceded by a space. LEVELS is a pointer to a byte vector the length
- returned by argp_args_levels; it should be initialized to zero, and
- updated by this routine for the next call if ADVANCE is true. True is
- returned as long as there are more patterns to output. */
-static int
-argp_args_usage (const struct argp *argp, const struct argp_state *state,
- char **levels, int advance, argp_fmtstream_t stream)
-{
- char *our_level = *levels;
- int multiple = 0;
- const struct argp_child *child = argp->children;
- const char *tdoc = dgettext (argp->argp_domain, argp->args_doc), *nl = 0;
- const char *fdoc = filter_doc (tdoc, ARGP_KEY_HELP_ARGS_DOC, argp, state);
-
- if (fdoc)
- {
- const char *cp = fdoc;
- nl = __strchrnul (cp, '\n');
- if (*nl != '\0')
- /* This is a `multi-level' args doc; advance to the correct position
- as determined by our state in LEVELS, and update LEVELS. */
- {
- int i;
- multiple = 1;
- for (i = 0; i < *our_level; i++)
- cp = nl + 1, nl = __strchrnul (cp, '\n');
- (*levels)++;
- }
-
- /* Manually do line wrapping so that it (probably) won't get wrapped at
- any embedded spaces. */
- space (stream, 1 + nl - cp);
-
- __argp_fmtstream_write (stream, cp, nl - cp);
- }
- if (fdoc && fdoc != tdoc)
- free ((char *)fdoc); /* Free user's modified doc string. */
-
- if (child)
- while (child->argp)
- advance = !argp_args_usage ((child++)->argp, state, levels, advance, stream);
-
- if (advance && multiple)
- {
- /* Need to increment our level. */
- if (*nl)
- /* There's more we can do here. */
- {
- (*our_level)++;
- advance = 0; /* Our parent shouldn't advance also. */
- }
- else if (*our_level > 0)
- /* We had multiple levels, but used them up; reset to zero. */
- *our_level = 0;
- }
-
- return !advance;
-}
-
-/* Print the documentation for ARGP to STREAM; if POST is false, then
- everything preceeding a `\v' character in the documentation strings (or
- the whole string, for those with none) is printed, otherwise, everything
- following the `\v' character (nothing for strings without). Each separate
- bit of documentation is separated a blank line, and if PRE_BLANK is true,
- then the first is as well. If FIRST_ONLY is true, only the first
- occurrence is output. Returns true if anything was output. */
-static int
-argp_doc (const struct argp *argp, const struct argp_state *state,
- int post, int pre_blank, int first_only,
- argp_fmtstream_t stream)
-{
- const char *text;
- const char *inp_text;
- size_t inp_text_len = 0;
- const char *trans_text;
- void *input = 0;
- int anything = 0;
- const struct argp_child *child = argp->children;
-
- if (argp->doc)
- {
- char *vt = strchr (argp->doc, '\v');
- if (vt)
- {
- if (post)
- inp_text = vt + 1;
- else
- {
- inp_text_len = vt - argp->doc;
- inp_text = __strndup (argp->doc, inp_text_len);
- }
- }
- else
- inp_text = post ? 0 : argp->doc;
- trans_text = inp_text ? dgettext (argp->argp_domain, inp_text) : NULL;
- }
- else
- trans_text = inp_text = 0;
-
- if (argp->help_filter)
- /* We have to filter the doc strings. */
- {
- input = __argp_input (argp, state);
- text =
- (*argp->help_filter) (post
- ? ARGP_KEY_HELP_POST_DOC
- : ARGP_KEY_HELP_PRE_DOC,
- trans_text, input);
- }
- else
- text = (const char *) trans_text;
-
- if (text)
- {
- if (pre_blank)
- __argp_fmtstream_putc (stream, '\n');
-
- __argp_fmtstream_puts (stream, text);
-
- if (__argp_fmtstream_point (stream) > __argp_fmtstream_lmargin (stream))
- __argp_fmtstream_putc (stream, '\n');
-
- anything = 1;
- }
-
- if (text && text != trans_text)
- free ((char *) text); /* Free TEXT returned from the help filter. */
-
- if (inp_text && inp_text_len)
- free ((char *) inp_text); /* We copied INP_TEXT, so free it now. */
-
- if (post && argp->help_filter)
- /* Now see if we have to output a ARGP_KEY_HELP_EXTRA text. */
- {
- text = (*argp->help_filter) (ARGP_KEY_HELP_EXTRA, 0, input);
- if (text)
- {
- if (anything || pre_blank)
- __argp_fmtstream_putc (stream, '\n');
- __argp_fmtstream_puts (stream, text);
- free ((char *) text);
- if (__argp_fmtstream_point (stream)
- > __argp_fmtstream_lmargin (stream))
- __argp_fmtstream_putc (stream, '\n');
- anything = 1;
- }
- }
-
- if (child)
- while (child->argp && !(first_only && anything))
- anything |=
- argp_doc ((child++)->argp, state,
- post, anything || pre_blank, first_only,
- stream);
-
- return anything;
-}
-
-/* Output a usage message for ARGP to STREAM. If called from
- argp_state_help, STATE is the relevent parsing state. FLAGS are from the
- set ARGP_HELP_*. NAME is what to use wherever a `program name' is
- needed. */
-static void
-_help (const struct argp *argp, const struct argp_state *state, FILE *stream,
- unsigned flags, char *name)
-{
- int anything = 0; /* Whether we've output anything. */
- struct hol *hol = 0;
- argp_fmtstream_t fs;
-
- if (! stream)
- return;
-
-#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
- __flockfile (stream);
-#endif
-
- if (! uparams.valid)
- fill_in_uparams (state);
-
- fs = __argp_make_fmtstream (stream, 0, uparams.rmargin, 0);
- if (! fs)
- {
-#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
- __funlockfile (stream);
-#endif
- return;
- }
-
- if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG))
- {
- hol = argp_hol (argp, 0);
-
- /* If present, these options always come last. */
- hol_set_group (hol, "help", -1);
- hol_set_group (hol, "version", -1);
-
- hol_sort (hol);
- }
-
- if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE))
- /* Print a short `Usage:' message. */
- {
- int first_pattern = 1, more_patterns;
- size_t num_pattern_levels = argp_args_levels (argp);
- char *pattern_levels = alloca (num_pattern_levels);
-
- memset (pattern_levels, 0, num_pattern_levels);
-
- do
- {
- int old_lm;
- int old_wm = __argp_fmtstream_set_wmargin (fs, uparams.usage_indent);
- char *levels = pattern_levels;
-
- if (first_pattern)
- __argp_fmtstream_printf (fs, "%s %s",
- dgettext (argp->argp_domain, "Usage:"),
- name);
- else
- __argp_fmtstream_printf (fs, "%s %s",
- dgettext (argp->argp_domain, " or: "),
- name);
-
- /* We set the lmargin as well as the wmargin, because hol_usage
- manually wraps options with newline to avoid annoying breaks. */
- old_lm = __argp_fmtstream_set_lmargin (fs, uparams.usage_indent);
-
- if (flags & ARGP_HELP_SHORT_USAGE)
- /* Just show where the options go. */
- {
- if (hol->num_entries > 0)
- __argp_fmtstream_puts (fs, dgettext (argp->argp_domain,
- " [OPTION...]"));
- }
- else
- /* Actually print the options. */
- {
- hol_usage (hol, fs);
- flags |= ARGP_HELP_SHORT_USAGE; /* But only do so once. */
- }
-
- more_patterns = argp_args_usage (argp, state, &levels, 1, fs);
-
- __argp_fmtstream_set_wmargin (fs, old_wm);
- __argp_fmtstream_set_lmargin (fs, old_lm);
-
- __argp_fmtstream_putc (fs, '\n');
- anything = 1;
-
- first_pattern = 0;
- }
- while (more_patterns);
- }
-
- if (flags & ARGP_HELP_PRE_DOC)
- anything |= argp_doc (argp, state, 0, 0, 1, fs);
-
- if (flags & ARGP_HELP_SEE)
- {
- __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "\
-Try `%s --help' or `%s --usage' for more information.\n"),
- name, name);
- anything = 1;
- }
-
- if (flags & ARGP_HELP_LONG)
- /* Print a long, detailed help message. */
- {
- /* Print info about all the options. */
- if (hol->num_entries > 0)
- {
- if (anything)
- __argp_fmtstream_putc (fs, '\n');
- hol_help (hol, state, fs);
- anything = 1;
- }
- }
-
- if (flags & ARGP_HELP_POST_DOC)
- /* Print any documentation strings at the end. */
- anything |= argp_doc (argp, state, 1, anything, 0, fs);
-
- if ((flags & ARGP_HELP_BUG_ADDR) && argp_program_bug_address)
- {
- if (anything)
- __argp_fmtstream_putc (fs, '\n');
- __argp_fmtstream_printf (fs, dgettext (argp->argp_domain,
- "Report bugs to %s.\n"),
- argp_program_bug_address);
- anything = 1;
- }
-
-#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
- __funlockfile (stream);
-#endif
-
- if (hol)
- hol_free (hol);
-
- __argp_fmtstream_free (fs);
-}
-
-/* Output a usage message for ARGP to STREAM. FLAGS are from the set
- ARGP_HELP_*. NAME is what to use wherever a `program name' is needed. */
-void __argp_help (const struct argp *argp, FILE *stream,
- unsigned flags, char *name)
-{
- struct argp_state state;
- memset (&state, 0, sizeof state);
- state.root_argp = argp;
- _help (argp, &state, stream, flags, name);
-}
-#ifdef weak_alias
-weak_alias (__argp_help, argp_help)
-#endif
-
-#if ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME)
-char *
-__argp_short_program_name (void)
-{
-# if HAVE_DECL_PROGRAM_INVOCATION_NAME
- return __argp_base_name (program_invocation_name);
-# else
- /* FIXME: What now? Miles suggests that it is better to use NULL,
- but currently the value is passed on directly to fputs_unlocked,
- so that requires more changes. */
-# if __GNUC__
-# warning No reasonable value to return
-# endif /* __GNUC__ */
- return "";
-# endif
-}
-#endif
-
-/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are
- from the set ARGP_HELP_*. */
-void
-__argp_state_help (const struct argp_state *state, FILE *stream, unsigned flags)
-{
- if ((!state || ! (state->flags & ARGP_NO_ERRS)) && stream)
- {
- if (state && (state->flags & ARGP_LONG_ONLY))
- flags |= ARGP_HELP_LONG_ONLY;
-
- _help (state ? state->root_argp : 0, state, stream, flags,
- state ? state->name : __argp_short_program_name ());
-
- if (!state || ! (state->flags & ARGP_NO_EXIT))
- {
- if (flags & ARGP_HELP_EXIT_ERR)
- exit (argp_err_exit_status);
- if (flags & ARGP_HELP_EXIT_OK)
- exit (0);
- }
- }
-}
-#ifdef weak_alias
-weak_alias (__argp_state_help, argp_state_help)
-#endif
-
-/* 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). */
-void
-__argp_error (const struct argp_state *state, const char *fmt, ...)
-{
- if (!state || !(state->flags & ARGP_NO_ERRS))
- {
- FILE *stream = state ? state->err_stream : stderr;
-
- if (stream)
- {
- va_list ap;
-
-#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
- __flockfile (stream);
-#endif
-
- va_start (ap, fmt);
-
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (stream, 0) > 0)
- {
- char *buf;
-
- if (__asprintf (&buf, fmt, ap) < 0)
- buf = NULL;
-
- __fwprintf (stream, L"%s: %s\n",
- state ? state->name : __argp_short_program_name (),
- buf);
-
- free (buf);
- }
- else
-#endif
- {
- fputs_unlocked (state
- ? state->name : __argp_short_program_name (),
- stream);
- putc_unlocked (':', stream);
- putc_unlocked (' ', stream);
-
- vfprintf (stream, fmt, ap);
-
- putc_unlocked ('\n', stream);
- }
-
- __argp_state_help (state, stream, ARGP_HELP_STD_ERR);
-
- va_end (ap);
-
-#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
- __funlockfile (stream);
-#endif
- }
- }
-}
-#ifdef weak_alias
-weak_alias (__argp_error, argp_error)
-#endif
-
-/* 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. */
-void
-__argp_failure (const struct argp_state *state, int status, int errnum,
- const char *fmt, ...)
-{
- if (!state || !(state->flags & ARGP_NO_ERRS))
- {
- FILE *stream = state ? state->err_stream : stderr;
-
- if (stream)
- {
-#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
- __flockfile (stream);
-#endif
-
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (stream, 0) > 0)
- __fwprintf (stream, L"%s",
- state ? state->name : __argp_short_program_name ());
- else
-#endif
- fputs_unlocked (state
- ? state->name : __argp_short_program_name (),
- stream);
-
- if (fmt)
- {
- va_list ap;
-
- va_start (ap, fmt);
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (stream, 0) > 0)
- {
- char *buf;
-
- if (__asprintf (&buf, fmt, ap) < 0)
- buf = NULL;
-
- __fwprintf (stream, L": %s", buf);
-
- free (buf);
- }
- else
-#endif
- {
- putc_unlocked (':', stream);
- putc_unlocked (' ', stream);
-
- vfprintf (stream, fmt, ap);
- }
-
- va_end (ap);
- }
-
- if (errnum)
- {
- char buf[200];
-
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (stream, 0) > 0)
- __fwprintf (stream, L": %s",
- __strerror_r (errnum, buf, sizeof (buf)));
- else
-#endif
- {
- char const *s = NULL;
- putc_unlocked (':', stream);
- putc_unlocked (' ', stream);
-#if _LIBC || (HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P)
- s = __strerror_r (errnum, buf, sizeof buf);
-#elif HAVE_DECL_STRERROR_R
- if (__strerror_r (errnum, buf, sizeof buf) == 0)
- s = buf;
-#endif
-#if !_LIBC
- if (! s && ! (s = strerror (errnum)))
- s = dgettext (state->root_argp->argp_domain,
- "Unknown system error");
-#endif
- fputs (s, stream);
- }
- }
-
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (stream, 0) > 0)
- putwc_unlocked (L'\n', stream);
- else
-#endif
- putc_unlocked ('\n', stream);
-
-#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
- __funlockfile (stream);
-#endif
-
- if (status && (!state || !(state->flags & ARGP_NO_EXIT)))
- exit (status);
- }
- }
-}
-#ifdef weak_alias
-weak_alias (__argp_failure, argp_failure)
-#endif
--- contrib/cpio/lib/strchrnul.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Searching in a string.
- Copyright (C) 2003, 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. */
-
-#include <config.h>
-
-/* Specification. */
-#include <string.h>
-
-/* Find the first occurrence of C in S or the final NUL byte. */
-char *
-strchrnul (const char *s, int c_in)
-{
- char c = c_in;
- while (*s && (*s != c))
- s++;
-
- return (char *) s;
-}
--- contrib/cpio/lib/paxlib.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* This file is part of GNU paxutils
-
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003,
- 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.
-*/
-
-#ifndef _paxlib_h_
-#define _paxlib_h_
-
-#include <hash.h>
-#include <inttostr.h>
-
-/* Error reporting functions and definitions */
-
-/* Exit status for paxutils app. Let's try to keep this list as simple as
- possible. tar -d option strongly invites a status different for unequal
- comparison and other errors. */
-#define PAXEXIT_SUCCESS 0
-#define PAXEXIT_DIFFERS 1
-#define PAXEXIT_FAILURE 2
-
-/* Both WARN and ERROR write a message on stderr and continue processing,
- however ERROR manages so tar will exit unsuccessfully. FATAL_ERROR
- writes a message on stderr and aborts immediately, with another message
- line telling so. USAGE_ERROR works like FATAL_ERROR except that the
- other message line suggests trying --help. All four macros accept a
- single argument of the form ((0, errno, _("FORMAT"), Args...)). errno
- is zero when the error is not being detected by the system. */
-
-#define WARN(Args) \
- error Args
-#define ERROR(Args) \
- (error Args, exit_status = PAXEXIT_FAILURE)
-#define FATAL_ERROR(Args) \
- (error Args, fatal_exit ())
-#define USAGE_ERROR(Args) \
- (error Args, usage (PAXEXIT_FAILURE))
-
-extern int exit_status;
-
-void pax_decode_mode (mode_t mode, char *string);
-void call_arg_error (char const *call, char const *name);
-void call_arg_fatal (char const *call, char const *name) __attribute__ ((noreturn));
-void call_arg_warn (char const *call, char const *name);
-void chmod_error_details (char const *name, mode_t mode);
-void chown_error_details (char const *name, uid_t uid, gid_t gid);
-
-void decode_mode (mode_t, char *);
-
-void chdir_fatal (char const *) __attribute__ ((noreturn));
-void chmod_error_details (char const *, mode_t);
-void chown_error_details (char const *, uid_t, gid_t);
-void close_error (char const *);
-void close_warn (char const *);
-void exec_fatal (char const *) __attribute__ ((noreturn));
-void link_error (char const *, char const *);
-void mkdir_error (char const *);
-void mkfifo_error (char const *);
-void mknod_error (char const *);
-void open_error (char const *);
-void open_fatal (char const *) __attribute__ ((noreturn));
-void open_warn (char const *);
-void read_error (char const *);
-void read_error_details (char const *, off_t, size_t);
-void read_fatal (char const *) __attribute__ ((noreturn));
-void read_fatal_details (char const *, off_t, size_t) __attribute__ ((noreturn));
-void read_warn_details (char const *, off_t, size_t);
-void readlink_error (char const *);
-void readlink_warn (char const *);
-void rmdir_error (char const *);
-void savedir_error (char const *);
-void savedir_warn (char const *);
-void seek_error (char const *);
-void seek_error_details (char const *, off_t);
-void seek_warn (char const *);
-void seek_warn_details (char const *, off_t);
-void stat_fatal (char const *);
-void stat_error (char const *);
-void stat_warn (char const *);
-void symlink_error (char const *, char const *);
-void truncate_error (char const *);
-void truncate_warn (char const *);
-void unlink_error (char const *);
-void utime_error (char const *);
-void waitpid_error (char const *);
-void write_error (char const *);
-
-void pax_exit (void);
-void fatal_exit (void) __attribute__ ((noreturn));
-
-#define STRINGIFY_BIGINT(i, b) umaxtostr (i, b)
-
-
-/* Name-related functions */
-bool hash_string_insert (Hash_table **table, char const *string);
-bool hash_string_lookup (Hash_table const *table, char const *string);
-
-bool removed_prefixes_p (void);
-char *safer_name_suffix (char const *file_name, bool link_target, bool absolute_names);
-
-#endif
--- contrib/cpio/lib/mktime.c
+++ /dev/null
@@ -1,663 +0,0 @@
-/* Convert a `struct tm' to a time_t value.
- Copyright (C) 1993-1999, 2002-2005, 2006, 2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Paul Eggert <eggert at twinsun.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. */
-
-/* Define this to have a standalone program to test this implementation of
- mktime. */
-/* #define DEBUG 1 */
-
-#ifndef _LIBC
-# include <config.h>
-#endif
-
-/* Assume that leap seconds are possible, unless told otherwise.
- If the host has a `zic' command with a `-L leapsecondfilename' option,
- then it supports leap seconds; otherwise it probably doesn't. */
-#ifndef LEAP_SECONDS_POSSIBLE
-# define LEAP_SECONDS_POSSIBLE 1
-#endif
-
-#include <time.h>
-
-#include <limits.h>
-
-#include <string.h> /* For the real memcpy prototype. */
-
-#if DEBUG
-# include <stdio.h>
-# include <stdlib.h>
-/* Make it work even if the system's libc has its own mktime routine. */
-# define mktime my_mktime
-#endif /* DEBUG */
-
-/* Shift A right by B bits portably, by dividing A by 2**B and
- truncating towards minus infinity. A and B should be free of side
- effects, and B should be in the range 0 <= B <= INT_BITS - 2, where
- INT_BITS is the number of useful bits in an int. GNU code can
- assume that INT_BITS is at least 32.
-
- ISO C99 says that A >> B is implementation-defined if A < 0. Some
- implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift
- right in the usual way when A < 0, so SHR falls back on division if
- ordinary A >> B doesn't seem to be the usual signed shift. */
-#define SHR(a, b) \
- (-1 >> 1 == -1 \
- ? (a) >> (b) \
- : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
-
-/* The extra casts in the following macros work around compiler bugs,
- e.g., in Cray C 5.0.3.0. */
-
-/* True if the arithmetic type T is an integer type. bool counts as
- an integer. */
-#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
-
-/* True if negative values of the signed integer type T use two's
- complement, ones' complement, or signed magnitude representation,
- respectively. Much GNU code assumes two's complement, but some
- people like to be portable to all possible C hosts. */
-#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
-
-/* True if the arithmetic type T is signed. */
-#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-
-/* The maximum and minimum values for the integer type T. These
- macros have undefined behavior if T is signed and has padding bits.
- If this is a problem for you, please let us know how to fix it for
- your host. */
-#define TYPE_MINIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) 0 \
- : TYPE_SIGNED_MAGNITUDE (t) \
- ? ~ (t) 0 \
- : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
-#define TYPE_MAXIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) -1 \
- : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
-
-#ifndef TIME_T_MIN
-# define TIME_T_MIN TYPE_MINIMUM (time_t)
-#endif
-#ifndef TIME_T_MAX
-# define TIME_T_MAX TYPE_MAXIMUM (time_t)
-#endif
-#define TIME_T_MIDPOINT (SHR (TIME_T_MIN + TIME_T_MAX, 1) + 1)
-
-/* Verify a requirement at compile-time (unlike assert, which is runtime). */
-#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
-
-verify (time_t_is_integer, TYPE_IS_INTEGER (time_t));
-verify (twos_complement_arithmetic, TYPE_TWOS_COMPLEMENT (int));
-/* The code also assumes that signed integer overflow silently wraps
- around, but this assumption can't be stated without causing a
- diagnostic on some hosts. */
-
-#define EPOCH_YEAR 1970
-#define TM_YEAR_BASE 1900
-verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0);
-
-/* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */
-static inline int
-leapyear (long int year)
-{
- /* Don't add YEAR to TM_YEAR_BASE, as that might overflow.
- Also, work even if YEAR is negative. */
- return
- ((year & 3) == 0
- && (year % 100 != 0
- || ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3)));
-}
-
-/* How many days come before each month (0-12). */
-#ifndef _LIBC
-static
-#endif
-const unsigned short int __mon_yday[2][13] =
- {
- /* Normal years. */
- { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
- /* Leap years. */
- { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
- };
-
-
-#ifndef _LIBC
-/* Portable standalone applications should supply a <time.h> that
- declares a POSIX-compliant localtime_r, for the benefit of older
- implementations that lack localtime_r or have a nonstandard one.
- See the gnulib time_r module for one way to implement this. */
-# undef __localtime_r
-# define __localtime_r localtime_r
-# define __mktime_internal mktime_internal
-#endif
-
-/* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) -
- (YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks
- were not adjusted between the time stamps.
-
- The YEAR values uses the same numbering as TP->tm_year. Values
- need not be in the usual range. However, YEAR1 must not be less
- than 2 * INT_MIN or greater than 2 * INT_MAX.
-
- The result may overflow. It is the caller's responsibility to
- detect overflow. */
-
-static inline time_t
-ydhms_diff (long int year1, long int yday1, int hour1, int min1, int sec1,
- int year0, int yday0, int hour0, int min0, int sec0)
-{
- verify (C99_integer_division, -1 / 2 == 0);
- verify (long_int_year_and_yday_are_wide_enough,
- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
-
- /* Compute intervening leap days correctly even if year is negative.
- Take care to avoid integer overflow here. */
- int a4 = SHR (year1, 2) + SHR (TM_YEAR_BASE, 2) - ! (year1 & 3);
- int b4 = SHR (year0, 2) + SHR (TM_YEAR_BASE, 2) - ! (year0 & 3);
- int a100 = a4 / 25 - (a4 % 25 < 0);
- int b100 = b4 / 25 - (b4 % 25 < 0);
- int a400 = SHR (a100, 2);
- int b400 = SHR (b100, 2);
- int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
-
- /* Compute the desired time in time_t precision. Overflow might
- occur here. */
- time_t tyear1 = year1;
- time_t years = tyear1 - year0;
- time_t days = 365 * years + yday1 - yday0 + intervening_leap_days;
- time_t hours = 24 * days + hour1 - hour0;
- time_t minutes = 60 * hours + min1 - min0;
- time_t seconds = 60 * minutes + sec1 - sec0;
- return seconds;
-}
-
-
-/* Return a time_t value corresponding to (YEAR-YDAY HOUR:MIN:SEC),
- assuming that *T corresponds to *TP and that no clock adjustments
- occurred between *TP and the desired time.
- If TP is null, return a value not equal to *T; this avoids false matches.
- If overflow occurs, yield the minimal or maximal value, except do not
- yield a value equal to *T. */
-static time_t
-guess_time_tm (long int year, long int yday, int hour, int min, int sec,
- const time_t *t, const struct tm *tp)
-{
- if (tp)
- {
- time_t d = ydhms_diff (year, yday, hour, min, sec,
- tp->tm_year, tp->tm_yday,
- tp->tm_hour, tp->tm_min, tp->tm_sec);
- time_t t1 = *t + d;
- if ((t1 < *t) == (TYPE_SIGNED (time_t) ? d < 0 : TIME_T_MAX / 2 < d))
- return t1;
- }
-
- /* Overflow occurred one way or another. Return the nearest result
- that is actually in range, except don't report a zero difference
- if the actual difference is nonzero, as that would cause a false
- match; and don't oscillate between two values, as that would
- confuse the spring-forward gap detector. */
- return (*t < TIME_T_MIDPOINT
- ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN)
- : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX));
-}
-
-/* Use CONVERT to convert *T to a broken down time in *TP.
- If *T is out of range for conversion, adjust it so that
- it is the nearest in-range value and then convert that. */
-static struct tm *
-ranged_convert (struct tm *(*convert) (const time_t *, struct tm *),
- time_t *t, struct tm *tp)
-{
- struct tm *r = convert (t, tp);
-
- if (!r && *t)
- {
- time_t bad = *t;
- time_t ok = 0;
-
- /* BAD is a known unconvertible time_t, and OK is a known good one.
- Use binary search to narrow the range between BAD and OK until
- they differ by 1. */
- while (bad != ok + (bad < 0 ? -1 : 1))
- {
- time_t mid = *t = (bad < 0
- ? bad + ((ok - bad) >> 1)
- : ok + ((bad - ok) >> 1));
- r = convert (t, tp);
- if (r)
- ok = mid;
- else
- bad = mid;
- }
-
- if (!r && ok)
- {
- /* The last conversion attempt failed;
- revert to the most recent successful attempt. */
- *t = ok;
- r = convert (t, tp);
- }
- }
-
- return r;
-}
-
-
-/* Convert *TP to a time_t value, inverting
- the monotonic and mostly-unit-linear conversion function CONVERT.
- Use *OFFSET to keep track of a guess at the offset of the result,
- compared to what the result would be for UTC without leap seconds.
- If *OFFSET's guess is correct, only one CONVERT call is needed.
- This function is external because it is used also by timegm.c. */
-time_t
-__mktime_internal (struct tm *tp,
- struct tm *(*convert) (const time_t *, struct tm *),
- time_t *offset)
-{
- time_t t, gt, t0, t1, t2;
- struct tm tm;
-
- /* The maximum number of probes (calls to CONVERT) should be enough
- to handle any combinations of time zone rule changes, solar time,
- leap seconds, and oscillations around a spring-forward gap.
- POSIX.1 prohibits leap seconds, but some hosts have them anyway. */
- int remaining_probes = 6;
-
- /* Time requested. Copy it in case CONVERT modifies *TP; this can
- occur if TP is localtime's returned value and CONVERT is localtime. */
- int sec = tp->tm_sec;
- int min = tp->tm_min;
- int hour = tp->tm_hour;
- int mday = tp->tm_mday;
- int mon = tp->tm_mon;
- int year_requested = tp->tm_year;
- int isdst = tp->tm_isdst;
-
- /* 1 if the previous probe was DST. */
- int dst2;
-
- /* Ensure that mon is in range, and set year accordingly. */
- int mon_remainder = mon % 12;
- int negative_mon_remainder = mon_remainder < 0;
- int mon_years = mon / 12 - negative_mon_remainder;
- long int lyear_requested = year_requested;
- long int year = lyear_requested + mon_years;
-
- /* The other values need not be in range:
- the remaining code handles minor overflows correctly,
- assuming int and time_t arithmetic wraps around.
- Major overflows are caught at the end. */
-
- /* Calculate day of year from year, month, and day of month.
- The result need not be in range. */
- int mon_yday = ((__mon_yday[leapyear (year)]
- [mon_remainder + 12 * negative_mon_remainder])
- - 1);
- long int lmday = mday;
- long int yday = mon_yday + lmday;
-
- time_t guessed_offset = *offset;
-
- int sec_requested = sec;
-
- if (LEAP_SECONDS_POSSIBLE)
- {
- /* Handle out-of-range seconds specially,
- since ydhms_tm_diff assumes every minute has 60 seconds. */
- if (sec < 0)
- sec = 0;
- if (59 < sec)
- sec = 59;
- }
-
- /* Invert CONVERT by probing. First assume the same offset as last
- time. */
-
- t0 = ydhms_diff (year, yday, hour, min, sec,
- EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset);
-
- if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3)
- {
- /* time_t isn't large enough to rule out overflows, so check
- for major overflows. A gross check suffices, since if t0
- has overflowed, it is off by a multiple of TIME_T_MAX -
- TIME_T_MIN + 1. So ignore any component of the difference
- that is bounded by a small value. */
-
- /* Approximate log base 2 of the number of time units per
- biennium. A biennium is 2 years; use this unit instead of
- years to avoid integer overflow. For example, 2 average
- Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds,
- which is 63113904 seconds, and rint (log2 (63113904)) is
- 26. */
- int ALOG2_SECONDS_PER_BIENNIUM = 26;
- int ALOG2_MINUTES_PER_BIENNIUM = 20;
- int ALOG2_HOURS_PER_BIENNIUM = 14;
- int ALOG2_DAYS_PER_BIENNIUM = 10;
- int LOG2_YEARS_PER_BIENNIUM = 1;
-
- int approx_requested_biennia =
- (SHR (year_requested, LOG2_YEARS_PER_BIENNIUM)
- - SHR (EPOCH_YEAR - TM_YEAR_BASE, LOG2_YEARS_PER_BIENNIUM)
- + SHR (mday, ALOG2_DAYS_PER_BIENNIUM)
- + SHR (hour, ALOG2_HOURS_PER_BIENNIUM)
- + SHR (min, ALOG2_MINUTES_PER_BIENNIUM)
- + (LEAP_SECONDS_POSSIBLE
- ? 0
- : SHR (sec, ALOG2_SECONDS_PER_BIENNIUM)));
-
- int approx_biennia = SHR (t0, ALOG2_SECONDS_PER_BIENNIUM);
- int diff = approx_biennia - approx_requested_biennia;
- int abs_diff = diff < 0 ? - diff : diff;
-
- /* IRIX 4.0.5 cc miscaculates TIME_T_MIN / 3: it erroneously
- gives a positive value of 715827882. Setting a variable
- first then doing math on it seems to work.
- (ghazi at caip.rutgers.edu) */
- time_t time_t_max = TIME_T_MAX;
- time_t time_t_min = TIME_T_MIN;
- time_t overflow_threshold =
- (time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM;
-
- if (overflow_threshold < abs_diff)
- {
- /* Overflow occurred. Try repairing it; this might work if
- the time zone offset is enough to undo the overflow. */
- time_t repaired_t0 = -1 - t0;
- approx_biennia = SHR (repaired_t0, ALOG2_SECONDS_PER_BIENNIUM);
- diff = approx_biennia - approx_requested_biennia;
- abs_diff = diff < 0 ? - diff : diff;
- if (overflow_threshold < abs_diff)
- return -1;
- guessed_offset += repaired_t0 - t0;
- t0 = repaired_t0;
- }
- }
-
- /* Repeatedly use the error to improve the guess. */
-
- for (t = t1 = t2 = t0, dst2 = 0;
- (gt = guess_time_tm (year, yday, hour, min, sec, &t,
- ranged_convert (convert, &t, &tm)),
- t != gt);
- t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0)
- if (t == t1 && t != t2
- && (tm.tm_isdst < 0
- || (isdst < 0
- ? dst2 <= (tm.tm_isdst != 0)
- : (isdst != 0) != (tm.tm_isdst != 0))))
- /* We can't possibly find a match, as we are oscillating
- between two values. The requested time probably falls
- within a spring-forward gap of size GT - T. Follow the common
- practice in this case, which is to return a time that is GT - T
- away from the requested time, preferring a time whose
- tm_isdst differs from the requested value. (If no tm_isdst
- was requested and only one of the two values has a nonzero
- tm_isdst, prefer that value.) In practice, this is more
- useful than returning -1. */
- goto offset_found;
- else if (--remaining_probes == 0)
- return -1;
-
- /* We have a match. Check whether tm.tm_isdst has the requested
- value, if any. */
- if (isdst != tm.tm_isdst && 0 <= isdst && 0 <= tm.tm_isdst)
- {
- /* tm.tm_isdst has the wrong value. Look for a neighboring
- time with the right value, and use its UTC offset.
-
- Heuristic: probe the adjacent timestamps in both directions,
- looking for the desired isdst. This should work for all real
- time zone histories in the tz database. */
-
- /* Distance between probes when looking for a DST boundary. In
- tzdata2003a, the shortest period of DST is 601200 seconds
- (e.g., America/Recife starting 2000-10-08 01:00), and the
- shortest period of non-DST surrounded by DST is 694800
- seconds (Africa/Tunis starting 1943-04-17 01:00). Use the
- minimum of these two values, so we don't miss these short
- periods when probing. */
- int stride = 601200;
-
- /* The longest period of DST in tzdata2003a is 536454000 seconds
- (e.g., America/Jujuy starting 1946-10-01 01:00). The longest
- period of non-DST is much longer, but it makes no real sense
- to search for more than a year of non-DST, so use the DST
- max. */
- int duration_max = 536454000;
-
- /* Search in both directions, so the maximum distance is half
- the duration; add the stride to avoid off-by-1 problems. */
- int delta_bound = duration_max / 2 + stride;
-
- int delta, direction;
-
- for (delta = stride; delta < delta_bound; delta += stride)
- for (direction = -1; direction <= 1; direction += 2)
- {
- time_t ot = t + delta * direction;
- if ((ot < t) == (direction < 0))
- {
- struct tm otm;
- ranged_convert (convert, &ot, &otm);
- if (otm.tm_isdst == isdst)
- {
- /* We found the desired tm_isdst.
- Extrapolate back to the desired time. */
- t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm);
- ranged_convert (convert, &t, &tm);
- goto offset_found;
- }
- }
- }
- }
-
- offset_found:
- *offset = guessed_offset + t - t0;
-
- if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec)
- {
- /* Adjust time to reflect the tm_sec requested, not the normalized value.
- Also, repair any damage from a false match due to a leap second. */
- int sec_adjustment = (sec == 0 && tm.tm_sec == 60) - sec;
- t1 = t + sec_requested;
- t2 = t1 + sec_adjustment;
- if (((t1 < t) != (sec_requested < 0))
- | ((t2 < t1) != (sec_adjustment < 0))
- | ! convert (&t2, &tm))
- return -1;
- t = t2;
- }
-
- *tp = tm;
- return t;
-}
-
-
-/* FIXME: This should use a signed type wide enough to hold any UTC
- offset in seconds. 'int' should be good enough for GNU code. We
- can't fix this unilaterally though, as other modules invoke
- __mktime_internal. */
-static time_t localtime_offset;
-
-/* Convert *TP to a time_t value. */
-time_t
-mktime (struct tm *tp)
-{
-#ifdef _LIBC
- /* POSIX.1 8.1.1 requires that whenever mktime() is called, the
- time zone names contained in the external variable `tzname' shall
- be set as if the tzset() function had been called. */
- __tzset ();
-#endif
-
- return __mktime_internal (tp, __localtime_r, &localtime_offset);
-}
-
-#ifdef weak_alias
-weak_alias (mktime, timelocal)
-#endif
-
-#ifdef _LIBC
-libc_hidden_def (mktime)
-libc_hidden_weak (timelocal)
-#endif
-
-#if DEBUG
-
-static int
-not_equal_tm (const struct tm *a, const struct tm *b)
-{
- return ((a->tm_sec ^ b->tm_sec)
- | (a->tm_min ^ b->tm_min)
- | (a->tm_hour ^ b->tm_hour)
- | (a->tm_mday ^ b->tm_mday)
- | (a->tm_mon ^ b->tm_mon)
- | (a->tm_year ^ b->tm_year)
- | (a->tm_yday ^ b->tm_yday)
- | (a->tm_isdst ^ b->tm_isdst));
-}
-
-static void
-print_tm (const struct tm *tp)
-{
- if (tp)
- printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d",
- tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday,
- tp->tm_hour, tp->tm_min, tp->tm_sec,
- tp->tm_yday, tp->tm_wday, tp->tm_isdst);
- else
- printf ("0");
-}
-
-static int
-check_result (time_t tk, struct tm tmk, time_t tl, const struct tm *lt)
-{
- if (tk != tl || !lt || not_equal_tm (&tmk, lt))
- {
- printf ("mktime (");
- print_tm (lt);
- printf (")\nyields (");
- print_tm (&tmk);
- printf (") == %ld, should be %ld\n", (long int) tk, (long int) tl);
- return 1;
- }
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- int status = 0;
- struct tm tm, tmk, tml;
- struct tm *lt;
- time_t tk, tl, tl1;
- char trailer;
-
- if ((argc == 3 || argc == 4)
- && (sscanf (argv[1], "%d-%d-%d%c",
- &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer)
- == 3)
- && (sscanf (argv[2], "%d:%d:%d%c",
- &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer)
- == 3))
- {
- tm.tm_year -= TM_YEAR_BASE;
- tm.tm_mon--;
- tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]);
- tmk = tm;
- tl = mktime (&tmk);
- lt = localtime (&tl);
- if (lt)
- {
- tml = *lt;
- lt = &tml;
- }
- printf ("mktime returns %ld == ", (long int) tl);
- print_tm (&tmk);
- printf ("\n");
- status = check_result (tl, tmk, tl, lt);
- }
- else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0))
- {
- time_t from = atol (argv[1]);
- time_t by = atol (argv[2]);
- time_t to = atol (argv[3]);
-
- if (argc == 4)
- for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
- {
- lt = localtime (&tl);
- if (lt)
- {
- tmk = tml = *lt;
- tk = mktime (&tmk);
- status |= check_result (tk, tmk, tl, &tml);
- }
- else
- {
- printf ("localtime (%ld) yields 0\n", (long int) tl);
- status = 1;
- }
- tl1 = tl + by;
- if ((tl1 < tl) != (by < 0))
- break;
- }
- else
- for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
- {
- /* Null benchmark. */
- lt = localtime (&tl);
- if (lt)
- {
- tmk = tml = *lt;
- tk = tl;
- status |= check_result (tk, tmk, tl, &tml);
- }
- else
- {
- printf ("localtime (%ld) yields 0\n", (long int) tl);
- status = 1;
- }
- tl1 = tl + by;
- if ((tl1 < tl) != (by < 0))
- break;
- }
- }
- else
- printf ("Usage:\
-\t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\
-\t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\
-\t%s FROM BY TO - # Do not test those values (for benchmark).\n",
- argv[0], argv[0], argv[0]);
-
- return status;
-}
-
-#endif /* DEBUG */
-
-/*
-Local Variables:
-compile-command: "gcc -DDEBUG -Wall -W -O -g mktime.c -o mktime"
-End:
-*/
--- contrib/cpio/lib/argp-namefrob.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* 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 at 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
--- contrib/cpio/lib/time_.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* A more-standard <time.h>.
-
- Copyright (C) 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Don't get in the way of glibc when it includes time.h merely to
- declare a few standard symbols, rather than to declare all the
- symbols. */
-#if defined __need_time_t || defined __need_clock_t || defined __need_timespec
-
-# if @HAVE_INCLUDE_NEXT@
-# include_next <time.h>
-# else
-# include @ABSOLUTE_TIME_H@
-# endif
-
-#else
-/* Normal invocation convention. */
-
-# if ! defined _GL_TIME_H
-
-/* The include_next requires a split double-inclusion guard. */
-# if @HAVE_INCLUDE_NEXT@
-# include_next <time.h>
-# else
-# include @ABSOLUTE_TIME_H@
-# endif
-
-# if ! defined _GL_TIME_H
-# define _GL_TIME_H
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
- Or they define it with the wrong member names or define it in <sys/time.h>
- (e.g., FreeBSD circa 1997). */
-# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
-# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
-# include <sys/time.h>
-# else
-# undef timespec
-# define timespec rpl_timespec
-struct timespec
-{
- time_t tv_sec;
- long int tv_nsec;
-};
-# endif
-# endif
-
-/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
- return -1 and store the remaining time into RMTP. See
- <http://www.opengroup.org/susv3xsh/nanosleep.html>. */
-# if @REPLACE_NANOSLEEP@
-# define nanosleep rpl_nanosleep
-int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp);
-# endif
-
-/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
- <http://www.opengroup.org/susv3xsh/localtime_r.html> and
- <http://www.opengroup.org/susv3xsh/gmtime_r.html>. */
-# if @REPLACE_LOCALTIME_R@
-# undef localtime_r
-# define localtime_r rpl_localtime_r
-# undef gmtime_r
-# define gmtime_r rpl_gmtime_r
-struct tm *localtime_r (time_t const *restrict __timer,
- struct tm *restrict __result);
-struct tm *gmtime_r (time_t const *restrict __timer,
- struct tm *restrict __result);
-# endif
-
-/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
- the resulting broken-down time into TM. See
- <http://www.opengroup.org/susv3xsh/strptime.html>. */
-# if @REPLACE_STRPTIME@
-# undef strptime
-# define strptime rpl_strptime
-char *strptime (char const *restrict __buf, char const *restrict __format,
- struct tm *restrict __tm);
-# endif
-
-/* Convert TM to a time_t value, assuming UTC. */
-# if @REPLACE_TIMEGM@
-# undef timegm
-# define timegm rpl_timegm
-time_t timegm (struct tm *__tm);
-# endif
-
-/* Encourage applications to avoid unsafe functions that can overrun
- buffers when given outlandish struct tm values. Portable
- applications should use strftime (or even sprintf) instead. */
-# if GNULIB_PORTCHECK
-# undef asctime
-# define asctime eschew_asctime
-# undef asctime_r
-# define asctime_r eschew_asctime_r
-# undef ctime
-# define ctime eschew_ctime
-# undef ctime_r
-# define ctime_r eschew_ctime_r
-# endif
-
-# ifdef __cplusplus
-}
-# endif
-
-# endif /* _GL_TIME_H */
-# endif /* _GL_TIME_H */
-#endif
--- contrib/cpio/lib/argp-pin.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 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
-
--- contrib/cpio/lib/stdlib_.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/* A GNU-like <stdlib.h>.
-
- Copyright (C) 1995, 2001-2002, 2006-2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#if defined __need_malloc_and_calloc
-/* Special invocation convention inside glibc header files. */
-
-#if @HAVE_INCLUDE_NEXT@
-# include_next <stdlib.h>
-#else
-# include @ABSOLUTE_STDLIB_H@
-#endif
-
-#else
-/* Normal invocation convention. */
-
-#ifndef _GL_STDLIB_H
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_INCLUDE_NEXT@
-# include_next <stdlib.h>
-#else
-# include @ABSOLUTE_STDLIB_H@
-#endif
-
-#ifndef _GL_STDLIB_H
-#define _GL_STDLIB_H
-
-
-/* The definition of GL_LINK_WARNING is copied here. */
-
-
-/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
- with proper operation of xargs. */
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#elif EXIT_FAILURE != 1
-# undef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#if @GNULIB_GETSUBOPT@
-/* Assuming *OPTIONP is a comma separated list of elements of the form
- "token" or "token=value", getsubopt parses the first of these elements.
- If the first element refers to a "token" that is member of the given
- NULL-terminated array of tokens:
- - It replaces the comma with a NUL byte, updates *OPTIONP to point past
- the first option and the comma, sets *VALUEP to the value of the
- element (or NULL if it doesn't contain an "=" sign),
- - It returns the index of the "token" in the given array of tokens.
- Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
- For more details see the POSIX:2001 specification.
- http://www.opengroup.org/susv3xsh/getsubopt.html */
-# if !@HAVE_GETSUBOPT@
-extern int getsubopt (char **optionp, char *const *tokens, char **valuep);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef getsubopt
-# define getsubopt(o,t,v) \
- (GL_LINK_WARNING ("getsubopt is unportable - " \
- "use gnulib module getsubopt for portability"), \
- getsubopt (o, t, v))
-#endif
-
-
-#if @GNULIB_MKDTEMP@
-# if !@HAVE_MKDTEMP@
-/* Create a unique temporary directory from TEMPLATE.
- The last six characters of TEMPLATE must be "XXXXXX";
- they are replaced with a string that makes the directory name unique.
- Returns TEMPLATE, or a null pointer if it cannot get a unique name.
- The directory is created mode 700. */
-extern char * mkdtemp (char * /*template*/);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef mkdtemp
-# define mkdtemp(t) \
- (GL_LINK_WARNING ("mkdtemp is unportable - " \
- "use gnulib module mkdtemp for portability"), \
- mkdtemp (t))
-#endif
-
-
-#if @GNULIB_MKSTEMP@
-# if @REPLACE_MKSTEMP@
-/* Create a unique temporary file from TEMPLATE.
- The last six characters of TEMPLATE must be "XXXXXX";
- they are replaced with a string that makes the file name unique.
- The file is then created, ensuring it didn't exist before.
- The file is created read-write (mask at least 0600 & ~umask), but it may be
- world-readable and world-writable (mask 0666 & ~umask), depending on the
- implementation.
- Returns the open file descriptor if successful, otherwise -1 and errno
- set. */
-# define mkstemp rpl_mkstemp
-extern int mkstemp (char * /*template*/);
-# else
-/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
-# include <unistd.h>
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef mkstemp
-# define mkstemp(t) \
- (GL_LINK_WARNING ("mkstemp is unportable - " \
- "use gnulib module mkstemp for portability"), \
- mkstemp (t))
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GL_STDLIB_H */
-#endif /* _GL_STDLIB_H */
-#endif
--- contrib/cpio/lib/sys_time_.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Provide a more complete sys/time.h.
-
- Copyright (C) 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Written by Paul Eggert. */
-
-#ifndef _GL_SYS_TIME_H
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_SYS_TIME_H@
-# if @HAVE_INCLUDE_NEXT@
-# include_next <sys/time.h>
-# else
-# include @ABSOLUTE_SYS_TIME_H@
-# endif
-#else
-# include <time.h>
-#endif
-
-#ifndef _GL_SYS_TIME_H
-#define _GL_SYS_TIME_H
-
-#if ! @HAVE_STRUCT_TIMEVAL@
-struct timeval
-{
- time_t tv_sec;
- long int tv_usec;
-};
-#endif
-
-#if @REPLACE_GETTIMEOFDAY@
-# undef gettimeofday
-# define gettimeofday rpl_gettimeofday
-int gettimeofday (struct timeval *restrict, void *restrict);
-#endif
-
-#endif /* _GL_SYS_TIME_H */
-#endif /* _GL_SYS_TIME_H */
--- contrib/cpio/lib/fatal.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* This file is part of GNU cpio.
- 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. */
-
-#include <system.h>
-#include <paxlib.h>
-
-void
-fatal_exit ()
-{
- exit (PAXEXIT_FAILURE);
-}
-
--- contrib/cpio/lib/stpcpy.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* stpcpy.c -- copy a string and return pointer to end of new string
- Copyright (C) 1992, 1995, 1997-1998, 2006 Free Software Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc at prep.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. */
-
-#include <config.h>
-
-#include <string.h>
-
-#undef __stpcpy
-#ifdef _LIBC
-# undef stpcpy
-#endif
-
-#ifndef weak_alias
-# define __stpcpy stpcpy
-#endif
-
-/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
-char *
-__stpcpy (char *dest, const char *src)
-{
- register char *d = dest;
- register const char *s = src;
-
- do
- *d++ = *s;
- while (*s++ != '\0');
-
- return d - 1;
-}
-#ifdef weak_alias
-weak_alias (__stpcpy, stpcpy)
-#endif
--- contrib/cpio/lib/paxnames.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/* This file is part of GNU paxutils
- 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. */
-
-#include <system.h>
-#include <hash.h>
-#include <paxlib.h>
-
-
-/* Hash tables of strings. */
-
-/* Calculate the hash of a string. */
-static size_t
-hash_string_hasher (void const *name, size_t n_buckets)
-{
- return hash_string (name, n_buckets);
-}
-
-/* Compare two strings for equality. */
-static bool
-hash_string_compare (void const *name1, void const *name2)
-{
- return strcmp (name1, name2) == 0;
-}
-
-/* Return zero if TABLE contains a copy of STRING; otherwise, insert a
- copy of STRING to TABLE and return 1. */
-bool
-hash_string_insert (Hash_table **table, char const *string)
-{
- Hash_table *t = *table;
- char *s = xstrdup (string);
- char *e;
-
- if (! ((t
- || (*table = t = hash_initialize (0, 0, hash_string_hasher,
- hash_string_compare, 0)))
- && (e = hash_insert (t, s))))
- xalloc_die ();
-
- if (e == s)
- return 1;
- else
- {
- free (s);
- return 0;
- }
-}
-
-/* Return 1 if TABLE contains STRING. */
-bool
-hash_string_lookup (Hash_table const *table, char const *string)
-{
- return table && hash_lookup (table, string);
-}
-
-
-static Hash_table *prefix_table[2];
-
-/* Return true if file names of some members in the archive were stripped off
- their leading components. We could have used
- return prefix_table[0] || prefix_table[1]
- but the following seems to be safer: */
-bool
-removed_prefixes_p (void)
-{
- return (prefix_table[0] && hash_get_n_entries (prefix_table[0]) != 0)
- || (prefix_table[1] && hash_get_n_entries (prefix_table[1]) != 0);
-}
-
-/* Return a safer suffix of FILE_NAME, or "." if it has no safer
- suffix. Check for fully specified file names and other atrocities.
- Warn the user if we do not return NAME. If LINK_TARGET is 1,
- FILE_NAME is the target of a hard link, not a member name.
- If ABSOLUTE_NAMES is 0, strip filesystem prefix from the file name. */
-
-char *
-safer_name_suffix (char const *file_name, bool link_target, bool absolute_names)
-{
- char const *p;
-
- if (absolute_names)
- p = file_name;
- else
- {
- /* Skip file system prefixes, leading file name components that contain
- "..", and leading slashes. */
-
- size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (file_name);
-
- for (p = file_name + prefix_len; *p; )
- {
- if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
- prefix_len = p + 2 - file_name;
-
- do
- {
- char c = *p++;
- if (ISSLASH (c))
- break;
- }
- while (*p);
- }
-
- for (p = file_name + prefix_len; ISSLASH (*p); p++)
- continue;
- prefix_len = p - file_name;
-
- if (prefix_len)
- {
- char *prefix = alloca (prefix_len + 1);
- memcpy (prefix, file_name, prefix_len);
- prefix[prefix_len] = '\0';
-
- if (hash_string_insert (&prefix_table[link_target], prefix))
- {
- static char const *const diagnostic[] =
- {
- N_("Removing leading `%s' from member names"),
- N_("Removing leading `%s' from hard link targets")
- };
- WARN ((0, 0, _(diagnostic[link_target]), prefix));
- }
- }
- }
-
- if (! *p)
- {
- if (p == file_name)
- {
- static char const *const diagnostic[] =
- {
- N_("Substituting `.' for empty member name"),
- N_("Substituting `.' for empty hard link target")
- };
- WARN ((0, 0, "%s", _(diagnostic[link_target])));
- }
-
- p = ".";
- }
-
- return (char *) p;
-}
--- contrib/cpio/lib/allocsa.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno at 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
--- contrib/cpio/lib/openat.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* provide a replacement openat function
- Copyright (C) 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 Jim Meyering */
-
-#include <fcntl.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <unistd.h>
-#include <stdbool.h>
-
-#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
-# define __attribute__(x) /* empty */
-# endif
-#endif
-
-#ifndef ATTRIBUTE_NORETURN
-# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-#endif
-
-/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its
- value exceeds INT_MAX, so its use as an int doesn't conform to the
- C standard, and GCC and Sun C complain in some cases. If the bug
- is present, undef AT_FDCWD here, so it can be redefined below. */
-#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553
-# undef AT_FDCWD
-#endif
-
-/* Use the same bit pattern as Solaris 9, but with the proper
- signedness. The bit pattern is important, in case this actually is
- Solaris with the above workaround. */
-#ifndef AT_FDCWD
-# define AT_FDCWD (-3041965)
-#endif
-
-/* Use the same values as Solaris 9. This shouldn't matter, but
- there's no real reason to differ. */
-#ifndef AT_SYMLINK_NOFOLLOW
-# define AT_SYMLINK_NOFOLLOW 4096
-# define AT_REMOVEDIR 1
-#endif
-
-#ifdef __OPENAT_PREFIX
-
-# undef openat
-# define __OPENAT_CONCAT(x, y) x ## y
-# define __OPENAT_XCONCAT(x, y) __OPENAT_CONCAT (x, y)
-# define __OPENAT_ID(y) __OPENAT_XCONCAT (__OPENAT_PREFIX, y)
-# define openat __OPENAT_ID (openat)
-int openat (int fd, char const *file, int flags, /* mode_t mode */ ...);
-int openat_permissive (int fd, char const *file, int flags, mode_t mode,
- int *cwd_errno);
-# if ! HAVE_FDOPENDIR
-# define fdopendir __OPENAT_ID (fdopendir)
-# endif
-DIR *fdopendir (int fd);
-# define fstatat __OPENAT_ID (fstatat)
-int fstatat (int fd, char const *file, struct stat *st, int flag);
-# define unlinkat __OPENAT_ID (unlinkat)
-int unlinkat (int fd, char const *file, int flag);
-bool openat_needs_fchdir (void);
-
-#else
-
-# define openat_permissive(Fd, File, Flags, Mode, Cwd_errno) \
- openat (Fd, File, Flags, Mode)
-# define openat_needs_fchdir() false
-
-#endif
-
-#if HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK
-int rpl_fstatat (int fd, char const *file, struct stat *st, int flag);
-# if !COMPILING_FSTATAT
-# undef fstatat
-# define fstatat rpl_fstatat
-# endif
-#endif
-
-int mkdirat (int fd, char const *file, mode_t mode);
-void openat_restore_fail (int) ATTRIBUTE_NORETURN;
-void openat_save_fail (int) ATTRIBUTE_NORETURN;
-int fchmodat (int fd, char const *file, mode_t mode, int flag);
-int fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag);
-
-/* Using these function names makes application code
- slightly more readable than it would be with
- fchownat (..., 0) or fchownat (..., AT_SYMLINK_NOFOLLOW). */
-static inline int
-chownat (int fd, char const *file, uid_t owner, gid_t group)
-{
- return fchownat (fd, file, owner, group, 0);
-}
-
-static inline int
-lchownat (int fd, char const *file, uid_t owner, gid_t group)
-{
- return fchownat (fd, file, owner, group, AT_SYMLINK_NOFOLLOW);
-}
-
-static inline int
-chmodat (int fd, char const *file, mode_t mode)
-{
- return fchmodat (fd, file, mode, 0);
-}
-
-static inline int
-lchmodat (int fd, char const *file, mode_t mode)
-{
- return fchmodat (fd, file, mode, AT_SYMLINK_NOFOLLOW);
-}
--- contrib/cpio/lib/imaxtostr.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define inttostr imaxtostr
-#define inttype intmax_t
-#include "inttostr.c"
--- contrib/cpio/lib/Makefile
+++ /dev/null
@@ -1,1322 +0,0 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
-# lib/Makefile. Generated from Makefile.in by configure.
-
-# 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.
-
-
-
-# Makefile for GNU cpio library.
-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
-#
-# This file is free software, distributed under the terms of the GNU
-# General Public License. As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
-# the same distribution terms as the rest of that program.
-#
-# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libcpio --source-base=.#bootmp/lib --m4-base=.#bootmp/m4 --doc-base=.#bootmp/doc --aux-dir=.#bootmp/build-aux --avoid=lock --avoid=size_max --no-libtool --macro-prefix=gl alloca argmatch argp closeout configmake dirname error fileblocks fnmatch-gnu full-write getdate getopt gettext hash inttostr inttypes lchown obstack quote quotearg safe-read savedir stdbool stdint stpcpy strerror strtol unlocked-io utimens version-etc-fsf xalloc xalloc-die
-
-
-
-
-pkgdatadir = $(datadir)/cpio
-pkgincludedir = $(includedir)/cpio
-pkglibdir = $(libdir)/cpio
-pkglibexecdir = $(libexecdir)/cpio
-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 = x86_64-mbsd-freebsd6.0
-host_triplet = x86_64-mbsd-freebsd6.0
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/gnulib.mk alloca.c getdate.c
-subdir = lib
-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/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/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/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/getcwd-abort-bug.m4 \
- $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
- $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 \
- $(top_srcdir)/m4/gnulib-common.m4 \
- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.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/longlong.m4 \
- $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbrtowc.m4 \
- $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mempcpy.m4 \
- $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mktime.m4 \
- $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.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/rmt.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/size_max.m4 \
- $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/ssize_t.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/strtol.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/time_h.m4 \
- $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/timespec.m4 \
- $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/ulonglong.m4 \
- $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/utimbuf.m4 \
- $(top_srcdir)/m4/utimens.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/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \
- $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.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 =
-LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
-ARFLAGS = cru
-libcpio_a_AR = $(AR) $(ARFLAGS)
-am__DEPENDENCIES_1 =
-am_libcpio_a_OBJECTS = allocsa.$(OBJEXT) argp-ba.$(OBJEXT) \
- argp-eexst.$(OBJEXT) argp-fmtstream.$(OBJEXT) \
- argp-fs-xinl.$(OBJEXT) argp-help.$(OBJEXT) \
- argp-parse.$(OBJEXT) argp-pin.$(OBJEXT) argp-pv.$(OBJEXT) \
- argp-pvh.$(OBJEXT) argp-xinl.$(OBJEXT) full-write.$(OBJEXT) \
- getdate.$(OBJEXT) openat-die.$(OBJEXT) version-etc.$(OBJEXT) \
- version-etc-fsf.$(OBJEXT) xalloc-die.$(OBJEXT) \
- xstrndup.$(OBJEXT) fatal.$(OBJEXT) paxerror.$(OBJEXT) \
- paxexit.$(OBJEXT) paxnames.$(OBJEXT) rtapelib.$(OBJEXT)
-libcpio_a_OBJECTS = $(am_libcpio_a_OBJECTS)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
-YLWRAP = $(top_srcdir)/build-aux/ylwrap
-SOURCES = $(libcpio_a_SOURCES) $(EXTRA_libcpio_a_SOURCES)
-DIST_SOURCES = $(libcpio_a_SOURCES) $(EXTRA_libcpio_a_SOURCES)
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ABSOLUTE_DIRENT_H =
-ABSOLUTE_FCNTL_H = "///usr/include/fcntl.h"
-ABSOLUTE_FLOAT_H =
-ABSOLUTE_INTTYPES_H = "///usr/include/inttypes.h"
-ABSOLUTE_STDINT_H = "///usr/include/stdint.h"
-ABSOLUTE_STDIO_H = "///usr/include/stdio.h"
-ABSOLUTE_STDLIB_H = "///usr/include/stdlib.h"
-ABSOLUTE_STRING_H = "///usr/include/string.h"
-ABSOLUTE_SYSEXITS_H = "///usr/include/sysexits.h"
-ABSOLUTE_SYS_STAT_H = "///usr/include/sys/stat.h"
-ABSOLUTE_SYS_TIME_H = "///usr/include/sys/time.h"
-ABSOLUTE_TIME_H = "///usr/include/time.h"
-ABSOLUTE_UNISTD_H = "///usr/include/unistd.h"
-ABSOLUTE_WCHAR_H =
-ABSOLUTE_WCTYPE_H = "///usr/include/wctype.h"
-ACLOCAL = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run aclocal-1.10a
-ALLOCA =
-ALLOCA_H = alloca.h
-AMTAR = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run tar
-AUTOCONF = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autoheader
-AUTOM4TE = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run autom4te
-AUTOMAKE = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run automake-1.10a
-AWK = nawk
-BITSIZEOF_PTRDIFF_T =
-BITSIZEOF_SIG_ATOMIC_T =
-BITSIZEOF_SIZE_T =
-BITSIZEOF_WCHAR_T =
-BITSIZEOF_WINT_T =
-CC = gcc -std=gnu99
-CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2
-CPIO_MT_PROG =
-CPP = gcc -E
-CPPFLAGS =
-CYGPATH_W = echo
-DEFAULT_RMT_COMMAND =
-DEFAULT_RMT_DIR = $(libexecdir)
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-DIRENT_H =
-ECHO_C =
-ECHO_N = -n
-ECHO_T =
-EGREP = /usr/bin/grep -E
-EOVERFLOW =
-EXEEXT =
-FCNTL_H = fcntl.h
-FLOAT_H =
-FNMATCH_H = fnmatch.h
-GETOPT_H = getopt.h
-GMSGFMT = /usr/local/bin/msgfmt
-GMSGFMT_015 = :
-GNULIB_CHOWN = 1
-GNULIB_DUP2 = 1
-GNULIB_FCHDIR = 1
-GNULIB_FFLUSH = 0
-GNULIB_FPRINTF_POSIX = 0
-GNULIB_FSEEK = 0
-GNULIB_FSEEKO = 0
-GNULIB_FTELL = 0
-GNULIB_FTELLO = 0
-GNULIB_FTRUNCATE = 0
-GNULIB_GETCWD = 1
-GNULIB_GETLOGIN_R = 0
-GNULIB_GETSUBOPT = 0
-GNULIB_IMAXABS = 0
-GNULIB_IMAXDIV = 0
-GNULIB_LSEEK = 0
-GNULIB_MBSCASECMP = 0
-GNULIB_MBSCASESTR = 0
-GNULIB_MBSCHR = 0
-GNULIB_MBSCSPN = 0
-GNULIB_MBSLEN = 0
-GNULIB_MBSNCASECMP = 0
-GNULIB_MBSPBRK = 0
-GNULIB_MBSPCASECMP = 0
-GNULIB_MBSRCHR = 0
-GNULIB_MBSSEP = 0
-GNULIB_MBSSPN = 0
-GNULIB_MBSSTR = 0
-GNULIB_MBSTOK_R = 0
-GNULIB_MEMMEM = 0
-GNULIB_MEMPCPY = 1
-GNULIB_MEMRCHR = 1
-GNULIB_MKDTEMP = 0
-GNULIB_MKSTEMP = 0
-GNULIB_PRINTF_POSIX = 0
-GNULIB_READLINK = 1
-GNULIB_SLEEP = 1
-GNULIB_SNPRINTF = 0
-GNULIB_SPRINTF_POSIX = 0
-GNULIB_STPCPY = 1
-GNULIB_STPNCPY = 0
-GNULIB_STRCASESTR = 0
-GNULIB_STRCHRNUL = 1
-GNULIB_STRDUP = 1
-GNULIB_STRNDUP = 1
-GNULIB_STRNLEN = 1
-GNULIB_STRPBRK = 0
-GNULIB_STRSEP = 0
-GNULIB_STRTOIMAX = 0
-GNULIB_STRTOK_R = 0
-GNULIB_STRTOUMAX = 0
-GNULIB_VASPRINTF = 0
-GNULIB_VFPRINTF_POSIX = 0
-GNULIB_VPRINTF_POSIX = 0
-GNULIB_VSNPRINTF = 1
-GNULIB_VSPRINTF_POSIX = 0
-GREP = /usr/bin/grep
-HAVE_DECL_GETLOGIN_R = 1
-HAVE_DECL_IMAXABS = 1
-HAVE_DECL_IMAXDIV = 1
-HAVE_DECL_MEMMEM = 1
-HAVE_DECL_MEMRCHR = 0
-HAVE_DECL_MKDIR = 1
-HAVE_DECL_SNPRINTF = 1
-HAVE_DECL_STRDUP = 1
-HAVE_DECL_STRNCASECMP = 1
-HAVE_DECL_STRNDUP = 1
-HAVE_DECL_STRNLEN = 0
-HAVE_DECL_STRTOIMAX = 1
-HAVE_DECL_STRTOK_R = 1
-HAVE_DECL_STRTOUMAX = 1
-HAVE_DECL_VSNPRINTF = 1
-HAVE_DUP2 = 1
-HAVE_FSEEKO = 1
-HAVE_FTELLO = 1
-HAVE_FTRUNCATE = 1
-HAVE_GETSUBOPT = 1
-HAVE_INTTYPES_H = 1
-HAVE_IO_H = 0
-HAVE_ISWCNTRL = 1
-HAVE_LONG_LONG_INT = 1
-HAVE_LSTAT = 1
-HAVE_MEMPCPY = 0
-HAVE_MKDTEMP = 1
-HAVE_READLINK = 1
-HAVE_SIGNED_SIG_ATOMIC_T =
-HAVE_SIGNED_WCHAR_T =
-HAVE_SIGNED_WINT_T =
-HAVE_SLEEP = 1
-HAVE_STDINT_H = 1
-HAVE_STPCPY = 1
-HAVE_STPNCPY = 1
-HAVE_STRCASECMP = 1
-HAVE_STRCASESTR = 1
-HAVE_STRCHRNUL = 0
-HAVE_STRNDUP = 1
-HAVE_STRPBRK = 1
-HAVE_STRSEP = 1
-HAVE_STRUCT_TIMEVAL = 1
-HAVE_SYSEXITS_H = 1
-HAVE_SYS_BITYPES_H =
-HAVE_SYS_INTTYPES_H =
-HAVE_SYS_TIME_H = 1
-HAVE_SYS_TYPES_H = 1
-HAVE_UNISTD_H = 1
-HAVE_UNSIGNED_LONG_LONG_INT = 1
-HAVE_VASPRINTF = 1
-HAVE_WCTYPE_H = 1
-HAVE_WINT_T = 1
-HAVE__BOOL = 1
-INSTALL = /usr/bin/install -c
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-INTLLIBS =
-INTL_MACOSX_LIBS =
-INTTYPES_H = inttypes.h
-LDFLAGS =
-LIBCPIO_LIBDEPS =
-LIBCPIO_LTLIBDEPS =
-LIBICONV = -liconv
-LIBINTL =
-LIBOBJS =
-LIBS =
-LIB_CLOCK_GETTIME =
-LIB_SETSOCKOPT =
-LTLIBICONV = -liconv
-LTLIBINTL =
-LTLIBOBJS =
-MAKEINFO = ${SHELL} /home/laffer1/cpio/cpio-2.8/build-aux/missing --run makeinfo
-MKDIR_P = ../build-aux/install-sh -c -d
-MSGFMT = /usr/local/bin/msgfmt
-MSGFMT_015 = :
-MSGMERGE = /usr/local/bin/msgmerge
-OBJEXT = o
-PACKAGE = cpio
-PACKAGE_BUGREPORT = bug-cpio at gnu.org
-PACKAGE_NAME = GNU cpio
-PACKAGE_STRING = GNU cpio 2.8
-PACKAGE_TARNAME = cpio
-PACKAGE_VERSION = 2.8
-PATH_SEPARATOR = :
-POSUB =
-PRIPTR_PREFIX = ""
-PRI_MACROS_BROKEN = 0
-PTRDIFF_T_SUFFIX =
-PU_RMT_PROG = rmt$(EXEEXT)
-RANLIB = ranlib
-REPLACE_CHOWN = 0
-REPLACE_FCHDIR = 0
-REPLACE_FFLUSH = 0
-REPLACE_FPRINTF = 0
-REPLACE_FSEEK = 0
-REPLACE_FSEEKO = 0
-REPLACE_FTELL = 0
-REPLACE_FTELLO = 0
-REPLACE_GETCWD = 1
-REPLACE_GETTIMEOFDAY = 0
-REPLACE_LOCALTIME_R = 0
-REPLACE_LSEEK = 0
-REPLACE_MKSTEMP = 0
-REPLACE_NANOSLEEP = GNULIB_PORTCHECK
-REPLACE_PRINTF = 0
-REPLACE_SNPRINTF = 0
-REPLACE_SPRINTF = 0
-REPLACE_STRPTIME = GNULIB_PORTCHECK
-REPLACE_TIMEGM = GNULIB_PORTCHECK
-REPLACE_VASPRINTF = 0
-REPLACE_VFPRINTF = 0
-REPLACE_VPRINTF = 0
-REPLACE_VSNPRINTF = 0
-REPLACE_VSPRINTF = 0
-SET_MAKE =
-SHELL = /bin/ksh
-SIG_ATOMIC_T_SUFFIX =
-SIZE_T_SUFFIX =
-STDBOOL_H =
-STDINT_H =
-STRIP =
-SYSEXITS_H =
-SYS_STAT_H = sys/stat.h
-SYS_TIME_H =
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = 0
-TIME_H_DEFINES_STRUCT_TIMESPEC = 1
-USE_NLS = no
-VERSION = 2.8
-WCHAR_H =
-WCHAR_T_SUFFIX =
-WCTYPE_H =
-WINT_T_SUFFIX =
-XGETTEXT = /usr/local/bin/xgettext
-XGETTEXT_015 = :
-YACC = byacc
-YFLAGS =
-abs_builddir = /home/laffer1/cpio/cpio-2.8/lib
-abs_srcdir = /home/laffer1/cpio/cpio-2.8/lib
-abs_top_builddir = /home/laffer1/cpio/cpio-2.8
-abs_top_srcdir = /home/laffer1/cpio/cpio-2.8
-ac_ct_CC = gcc
-am__include = include
-am__leading_dot = .
-am__quote =
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build = x86_64-mbsd-freebsd6.0
-build_alias = amd64-mbsd-freebsd6.0
-build_cpu = x86_64
-build_os = freebsd6.0
-build_vendor = mbsd
-builddir = .
-datadir = ${datarootdir}
-datarootdir = ${prefix}/share
-docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
-dvidir = ${docdir}
-exec_prefix = ${prefix}
-gl_LIBOBJS = __fpending.o argmatch.o asnprintf.o basename.o canonicalize-lgpl.o chdir-long.o close-stream.o closeout.o creat-safer.o dirname.o dup-safer.o error.o exitfail.o fchmodat.o fchownat.o fd-safer.o fnmatch.o getcwd.o getopt.o getopt1.o gettime.o hash.o imaxtostr.o lstat.o mempcpy.o memrchr.o mkdirat.o obstack.o offtostr.o open-safer.o openat.o openat-proc.o pipe-safer.o printf-args.o printf-parse.o quote.o quotearg.o safe-read.o safe-write.o save-cwd.o savedir.o strchrnul.o stripslash.o strnlen.o uinttostr.o umaxtostr.o utimens.o vasnprintf.o xgetcwd.o xmalloc.o
-gl_LTLIBOBJS = __fpending.lo argmatch.lo asnprintf.lo basename.lo canonicalize-lgpl.lo chdir-long.lo close-stream.lo closeout.lo creat-safer.lo dirname.lo dup-safer.lo error.lo exitfail.lo fchmodat.lo fchownat.lo fd-safer.lo fnmatch.lo getcwd.lo getopt.lo getopt1.lo gettime.lo hash.lo imaxtostr.lo lstat.lo mempcpy.lo memrchr.lo mkdirat.lo obstack.lo offtostr.lo open-safer.lo openat.lo openat-proc.lo pipe-safer.lo printf-args.lo printf-parse.lo quote.lo quotearg.lo safe-read.lo safe-write.lo save-cwd.lo savedir.lo strchrnul.lo stripslash.lo strnlen.lo uinttostr.lo umaxtostr.lo utimens.lo vasnprintf.lo xgetcwd.lo xmalloc.lo
-host = x86_64-mbsd-freebsd6.0
-host_alias =
-host_cpu = x86_64
-host_os = freebsd6.0
-host_vendor = mbsd
-htmldir = ${docdir}
-includedir = ${prefix}/include
-infodir = ${datarootdir}/info
-install_sh = $(SHELL) /home/laffer1/cpio/cpio-2.8/build-aux/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localedir = ${datarootdir}/locale
-localstatedir = ${prefix}/var
-mandir = ${datarootdir}/man
-mkdir_p = $(top_builddir)/build-aux/install-sh -c -d
-oldincludedir = /usr/include
-pdfdir = ${docdir}
-prefix = /usr/local
-program_transform_name = s,x,x,
-psdir = ${docdir}
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-srcdir = .
-sysconfdir = ${prefix}/etc
-target_alias = amd64-mbsd-freebsd6.0
-top_builddir = ..
-top_srcdir = ..
-AUTOMAKE_OPTIONS = 1.5 gnits
-noinst_HEADERS = paxlib.h rmt.h rmt-command.h system-ioctl.h system.h
-noinst_LIBRARIES = libcpio.a
-noinst_LTLIBRARIES =
-EXTRA_DIST = alloca.c alloca_.h allocsa.valgrind argmatch.c argmatch.h \
- canonicalize-lgpl.c canonicalize.h chdir-long.c chdir-long.h \
- chown.c fchown-stub.c close-stream.c close-stream.h closeout.c \
- closeout.h dirfd.c dirfd.h basename.c dirname.c dirname.h \
- stripslash.c dup2.c error.c error.h exitfail.c exitfail.h \
- dirent_.h fchdir.c fcntl_.h creat-safer.c fcntl--.h \
- fcntl-safer.h open-safer.c fileblocks.c float_.h fnmatch.c \
- fnmatch_.h fnmatch_loop.c __fpending.c __fpending.h getcwd.c \
- getdate.c getdate.h getopt.c getopt1.c getopt_.h getopt_int.h \
- gettime.c gettimeofday.c hash.c hash.h intprops.h imaxtostr.c \
- inttostr.c inttostr.h offtostr.c uinttostr.c umaxtostr.c \
- inttypes_.h lchown.c lchown.h lstat.c lstat.h malloc.c \
- mempcpy.c memrchr.c mktime.c obstack.c obstack.h at-func.c \
- fchmodat.c fchownat.c fstatat.c mkdirat.c openat-priv.h \
- openat-proc.c openat.c openat.h pathmax.h quote.c quote.h \
- quotearg.c quotearg.h readlink.c safe-read.c safe-read.h \
- safe-write.c safe-write.h same-inode.h save-cwd.c save-cwd.h \
- savedir.c savedir.h setenv.c setenv.h unsetenv.c sleep.c \
- stdbool_.h stdint_.h stdio_.h stdlib_.h stpcpy.c strcasecmp.c \
- strncasecmp.c strchrnul.c strdup.c strerror.c string_.h \
- strndup.c strnlen.c strtol.c sys_stat_.h sys_time_.h \
- sysexits_.h time_.h time_r.c timespec.h unistd_.h dup-safer.c \
- fd-safer.c pipe-safer.c unistd--.h unistd-safer.h \
- unlocked-io.h utimens.c utimens.h asnprintf.c float+.h \
- printf-args.c printf-args.h printf-parse.c printf-parse.h \
- vasnprintf.c vasnprintf.h vsnprintf.c wchar_.h wctype_.h \
- xalloc.h xmalloc.c xgetcwd.c xgetcwd.h
-BUILT_SOURCES = $(ALLOCA_H) configmake.h $(DIRENT_H) $(FCNTL_H) \
- $(FLOAT_H) $(FNMATCH_H) getdate.c $(GETOPT_H) $(INTTYPES_H) \
- $(STDBOOL_H) $(STDINT_H) stdio.h stdlib.h string.h \
- $(SYS_STAT_H) $(SYS_TIME_H) $(SYSEXITS_H) time.h unistd.h \
- $(WCHAR_H) $(WCTYPE_H) rmt-command.h
-SUFFIXES =
-MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t dirent.h \
- dirent.h-t fcntl.h fcntl.h-t float.h float.h-t fnmatch.h \
- fnmatch.h-t getopt.h getopt.h-t inttypes.h inttypes.h-t \
- stdbool.h stdbool.h-t stdint.h stdint.h-t stdio.h stdio.h-t \
- stdlib.h stdlib.h-t string.h string.h-t sys/stat.h \
- sys/stat.h-t sys/time.h sys/time.h-t sysexits.h sysexits.h-t \
- time.h time.h-t unistd.h unistd.h-t wchar.h wchar.h-t wctype.h \
- wctype.h-t
-MOSTLYCLEANDIRS = sys
-CLEANFILES = configmake.h configmake.h-t rmt-command.h
-DISTCLEANFILES = rmt-command.h
-MAINTAINERCLEANFILES = getdate.c
-AM_CPPFLAGS =
-
-# This is for those projects which use "gettextize --intl" to put a source-code
-# copy of libintl into their package. In such projects, every Makefile.am needs
-# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
-# For the Makefile.ams in other directories it is the maintainer's
-# responsibility; for the one from gnulib we do it here.
-# This option has no effect when the user disables NLS (because then the intl
-# directory contains no libintl.h file) or when the project does not use
-# "gettextize --intl".
-#AM_CPPFLAGS += -I$(top_builddir)/intl
-libcpio_a_SOURCES = allocsa.h allocsa.c argp.h argp-ba.c argp-eexst.c \
- argp-fmtstream.c argp-fmtstream.h argp-fs-xinl.c argp-help.c \
- argp-namefrob.h argp-parse.c argp-pin.c argp-pv.c argp-pvh.c \
- argp-xinl.c full-write.h full-write.c getdate.y gettext.h \
- openat-die.c verify.h version-etc.h version-etc.c \
- version-etc-fsf.c xalloc-die.c xsize.h xstrndup.h xstrndup.c \
- fatal.c paxerror.c paxexit.c paxlib.h paxnames.c rtapelib.c
-libcpio_a_LIBADD = $(gl_LIBOBJS) $(LIBOBJS)
-libcpio_a_DEPENDENCIES = $(gl_LIBOBJS) $(LIBOBJS)
-EXTRA_libcpio_a_SOURCES = alloca.c argmatch.c canonicalize-lgpl.c \
- chdir-long.c chown.c fchown-stub.c close-stream.c closeout.c \
- dirfd.c basename.c dirname.c stripslash.c dup2.c error.c \
- exitfail.c fchdir.c creat-safer.c open-safer.c fileblocks.c \
- fnmatch.c fnmatch_loop.c __fpending.c getcwd.c getopt.c \
- getopt1.c gettime.c gettimeofday.c hash.c imaxtostr.c \
- inttostr.c offtostr.c uinttostr.c umaxtostr.c lchown.c lstat.c \
- malloc.c mempcpy.c memrchr.c mktime.c obstack.c at-func.c \
- fchmodat.c fchownat.c fstatat.c mkdirat.c openat-proc.c \
- openat.c quote.c quotearg.c readlink.c safe-read.c \
- safe-write.c save-cwd.c savedir.c setenv.c unsetenv.c sleep.c \
- stpcpy.c strcasecmp.c strncasecmp.c strchrnul.c strdup.c \
- strerror.c strndup.c strnlen.c strtol.c time_r.c dup-safer.c \
- fd-safer.c pipe-safer.c utimens.c asnprintf.c printf-args.c \
- printf-parse.c vasnprintf.c vsnprintf.c xmalloc.c xgetcwd.c
-
-# Use this preprocessor expression to decide whether #include_next works.
-# Do not rely on a 'configure'-time test for this, since the expression
-# might appear in an installed header, which is used by some other compiler.
-HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
-LINK_WARNING_H = $(top_srcdir)/build-aux/link-warning.h
-all: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj .y
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(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 lib/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnits lib/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(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
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libcpio.a: $(libcpio_a_OBJECTS) $(libcpio_a_DEPENDENCIES)
- -rm -f libcpio.a
- $(libcpio_a_AR) libcpio.a $(libcpio_a_OBJECTS) $(libcpio_a_LIBADD)
- $(RANLIB) libcpio.a
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-include $(DEPDIR)/alloca.Po
-include ./$(DEPDIR)/__fpending.Po
-include ./$(DEPDIR)/alloca.Po
-include ./$(DEPDIR)/allocsa.Po
-include ./$(DEPDIR)/argmatch.Po
-include ./$(DEPDIR)/argp-ba.Po
-include ./$(DEPDIR)/argp-eexst.Po
-include ./$(DEPDIR)/argp-fmtstream.Po
-include ./$(DEPDIR)/argp-fs-xinl.Po
-include ./$(DEPDIR)/argp-help.Po
-include ./$(DEPDIR)/argp-parse.Po
-include ./$(DEPDIR)/argp-pin.Po
-include ./$(DEPDIR)/argp-pv.Po
-include ./$(DEPDIR)/argp-pvh.Po
-include ./$(DEPDIR)/argp-xinl.Po
-include ./$(DEPDIR)/asnprintf.Po
-include ./$(DEPDIR)/at-func.Po
-include ./$(DEPDIR)/basename.Po
-include ./$(DEPDIR)/canonicalize-lgpl.Po
-include ./$(DEPDIR)/chdir-long.Po
-include ./$(DEPDIR)/chown.Po
-include ./$(DEPDIR)/close-stream.Po
-include ./$(DEPDIR)/closeout.Po
-include ./$(DEPDIR)/creat-safer.Po
-include ./$(DEPDIR)/dirfd.Po
-include ./$(DEPDIR)/dirname.Po
-include ./$(DEPDIR)/dup-safer.Po
-include ./$(DEPDIR)/dup2.Po
-include ./$(DEPDIR)/error.Po
-include ./$(DEPDIR)/exitfail.Po
-include ./$(DEPDIR)/fatal.Po
-include ./$(DEPDIR)/fchdir.Po
-include ./$(DEPDIR)/fchmodat.Po
-include ./$(DEPDIR)/fchown-stub.Po
-include ./$(DEPDIR)/fchownat.Po
-include ./$(DEPDIR)/fd-safer.Po
-include ./$(DEPDIR)/fileblocks.Po
-include ./$(DEPDIR)/fnmatch.Po
-include ./$(DEPDIR)/fnmatch_loop.Po
-include ./$(DEPDIR)/fstatat.Po
-include ./$(DEPDIR)/full-write.Po
-include ./$(DEPDIR)/getcwd.Po
-include ./$(DEPDIR)/getdate.Po
-include ./$(DEPDIR)/getopt.Po
-include ./$(DEPDIR)/getopt1.Po
-include ./$(DEPDIR)/gettime.Po
-include ./$(DEPDIR)/gettimeofday.Po
-include ./$(DEPDIR)/hash.Po
-include ./$(DEPDIR)/imaxtostr.Po
-include ./$(DEPDIR)/inttostr.Po
-include ./$(DEPDIR)/lchown.Po
-include ./$(DEPDIR)/lstat.Po
-include ./$(DEPDIR)/malloc.Po
-include ./$(DEPDIR)/mempcpy.Po
-include ./$(DEPDIR)/memrchr.Po
-include ./$(DEPDIR)/mkdirat.Po
-include ./$(DEPDIR)/mktime.Po
-include ./$(DEPDIR)/obstack.Po
-include ./$(DEPDIR)/offtostr.Po
-include ./$(DEPDIR)/open-safer.Po
-include ./$(DEPDIR)/openat-die.Po
-include ./$(DEPDIR)/openat-proc.Po
-include ./$(DEPDIR)/openat.Po
-include ./$(DEPDIR)/paxerror.Po
-include ./$(DEPDIR)/paxexit.Po
-include ./$(DEPDIR)/paxnames.Po
-include ./$(DEPDIR)/pipe-safer.Po
-include ./$(DEPDIR)/printf-args.Po
-include ./$(DEPDIR)/printf-parse.Po
-include ./$(DEPDIR)/quote.Po
-include ./$(DEPDIR)/quotearg.Po
-include ./$(DEPDIR)/readlink.Po
-include ./$(DEPDIR)/rtapelib.Po
-include ./$(DEPDIR)/safe-read.Po
-include ./$(DEPDIR)/safe-write.Po
-include ./$(DEPDIR)/save-cwd.Po
-include ./$(DEPDIR)/savedir.Po
-include ./$(DEPDIR)/setenv.Po
-include ./$(DEPDIR)/sleep.Po
-include ./$(DEPDIR)/stpcpy.Po
-include ./$(DEPDIR)/strcasecmp.Po
-include ./$(DEPDIR)/strchrnul.Po
-include ./$(DEPDIR)/strdup.Po
-include ./$(DEPDIR)/strerror.Po
-include ./$(DEPDIR)/stripslash.Po
-include ./$(DEPDIR)/strncasecmp.Po
-include ./$(DEPDIR)/strndup.Po
-include ./$(DEPDIR)/strnlen.Po
-include ./$(DEPDIR)/strtol.Po
-include ./$(DEPDIR)/time_r.Po
-include ./$(DEPDIR)/uinttostr.Po
-include ./$(DEPDIR)/umaxtostr.Po
-include ./$(DEPDIR)/unsetenv.Po
-include ./$(DEPDIR)/utimens.Po
-include ./$(DEPDIR)/vasnprintf.Po
-include ./$(DEPDIR)/version-etc-fsf.Po
-include ./$(DEPDIR)/version-etc.Po
-include ./$(DEPDIR)/vsnprintf.Po
-include ./$(DEPDIR)/xalloc-die.Po
-include ./$(DEPDIR)/xgetcwd.Po
-include ./$(DEPDIR)/xmalloc.Po
-include ./$(DEPDIR)/xstrndup.Po
-
-.c.o:
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-# source='$<' object='$@' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(COMPILE) -c $<
-
-.c.obj:
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-# source='$<' object='$@' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.y.c:
- $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- 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
-check-am: all-am
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS)
-installdirs:
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
- -rm -f getdate.c
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-am
-
-clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -rf $(DEPDIR) ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-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
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf $(DEPDIR) ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-local
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags distclean \
- distclean-compile distclean-generic distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-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-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \
- uninstall uninstall-am
-
-
-# We need the following in order to create <alloca.h> when the system
-# doesn't have one that works with the given compiler.
-alloca.h: alloca_.h
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/alloca_.h; \
- } > $@-t
- mv -f $@-t $@
-
-# Retrieve values of the variables through 'configure' followed by
-# 'make', not directly through 'configure', so that a user who
-# sets some of these variables consistently on the 'make' command
-# line gets correct results.
-#
-# One advantage of this approach, compared to the classical
-# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
-# is that it protects against the use of undefined variables.
-# If, say, $(libdir) is not set in the Makefile, LIBDIR is not
-# defined by this module, and code using LIBDIR gives a
-# compilation error.
-#
-# Another advantage is that 'make' output is shorter.
-#
-# Listed in the same order as the GNU makefile conventions.
-# The Automake-defined pkg* macros are appended, in the order
-# listed in the Automake 1.10a+ documentation.
-configmake.h: Makefile
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- echo '#define PREFIX "$(prefix)"'; \
- echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
- echo '#define BINDIR "$(bindir)"'; \
- echo '#define SBINDIR "$(sbindir)"'; \
- echo '#define LIBEXECDIR "$(libexecdir)"'; \
- echo '#define DATAROOTDIR "$(datarootdir)"'; \
- echo '#define DATADIR "$(datadir)"'; \
- echo '#define SYSCONFDIR "$(sysconfdir)"'; \
- echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
- echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
- echo '#define INCLUDEDIR "$(includedir)"'; \
- echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
- echo '#define DOCDIR "$(docdir)"'; \
- echo '#define INFODIR "$(infodir)"'; \
- echo '#define HTMLDIR "$(htmldir)"'; \
- echo '#define DVIDIR "$(dvidir)"'; \
- echo '#define PDFDIR "$(pdfdir)"'; \
- echo '#define PSDIR "$(psdir)"'; \
- echo '#define LIBDIR "$(libdir)"'; \
- echo '#define LISPDIR "$(lispdir)"'; \
- echo '#define LOCALEDIR "$(localedir)"'; \
- echo '#define MANDIR "$(mandir)"'; \
- echo '#define MANEXT "$(manext)"'; \
- echo '#define PKGDATADIR "$(pkgdatadir)"'; \
- echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
- echo '#define PKGLIBDIR "$(pkglibdir)"'; \
- echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
- } | sed '/""/d' > $@-t
- mv $@-t $@
-
-# We need the following in order to create <dirent.h> when the system
-# doesn't have one that works with the given compiler.
-dirent.h: dirent_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''ABSOLUTE_DIRENT_H''@|$(ABSOLUTE_DIRENT_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
- < $(srcdir)/dirent_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <fcntl.h> when the system
-# doesn't have one that works with the given compiler.
-fcntl.h: fcntl_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''ABSOLUTE_FCNTL_H''@|$(ABSOLUTE_FCNTL_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- < $(srcdir)/fcntl_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <float.h> when the system
-# doesn't have one that works with the given compiler.
-float.h: float_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''ABSOLUTE_FLOAT_H''@|$(ABSOLUTE_FLOAT_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- < $(srcdir)/float_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <fnmatch.h> when the system
-# doesn't have one that supports the required API.
-fnmatch.h: fnmatch_.h
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/fnmatch_.h; \
- } > $@-t
- mv -f $@-t $@
-
-# We need the following in order to create <getopt.h> when the system
-# doesn't have one that works with the given compiler.
-getopt.h: getopt_.h
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/getopt_.h; \
- } > $@-t
- mv -f $@-t $@
-
-# We need the following in order to create <inttypes.h> when the system
-# doesn't have one that works with the given compiler.
-inttypes.h: inttypes_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
- -e 's|@''ABSOLUTE_INTTYPES_H''@|$(ABSOLUTE_INTTYPES_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
- -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
- -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
- -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
- -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
- -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
- -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
- -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
- -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
- -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
- -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
- -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
- < $(srcdir)/inttypes_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-stdbool.h: stdbool_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <stdint.h> when the system
-# doesn't have one that works with the given compiler.
-stdint.h: stdint_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
- -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
- -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
- -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
- -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
- -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
- -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
- -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
- -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
- -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
- -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
- -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
- -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
- -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
- -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
- -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
- < $(srcdir)/stdint_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <stdio.h> when the system
-# doesn't have one that works with the given compiler.
-stdio.h: stdio_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''ABSOLUTE_STDIO_H''@|$(ABSOLUTE_STDIO_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
- -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
- -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
- -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
- -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
- -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
- -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
- -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
- -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
- -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
- -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
- -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
- -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
- -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
- -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
- -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
- -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
- -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
- -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
- -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
- -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
- -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
- -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
- -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
- -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
- -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
- < $(srcdir)/stdio_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <stdlib.h> when the system
-# doesn't have one that works with the given compiler.
-stdlib.h: stdlib_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''ABSOLUTE_STDLIB_H''@|$(ABSOLUTE_STDLIB_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
- -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
- -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
- -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
- -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
- -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
- < $(srcdir)/stdlib_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <string.h> when the system
-# doesn't have one that works with the given compiler.
-string.h: string_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
- -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
- -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
- -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
- -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
- -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
- -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
- -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
- -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
- -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
- -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
- -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
- -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
- -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
- -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
- -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
- -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
- -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
- -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
- -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
- -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
- -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
- -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
- -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
- -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
- -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
- -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
- -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
- -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
- -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
- -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
- -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
- -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
- -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
- -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
- -e 's|@''HAVE_STRNDUP''@|$(HAVE_STRNDUP)|g' \
- -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
- -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
- -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
- -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
- -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
- -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
- < $(srcdir)/string_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <sys/stat.h> when the system
-# has one that is incomplete.
-sys/stat.h: sys_stat_.h
- ../build-aux/install-sh -c -d sys
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''HAVE_IO_H''@|$(HAVE_IO_H)|g' \
- -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
- -e 's|@''HAVE_DECL_MKDIR''@|$(HAVE_DECL_MKDIR)|g' \
- < $(srcdir)/sys_stat_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <sys/time.h> when the system
-# doesn't have one that works with the given compiler.
-sys/time.h: sys_time_.h
- ../build-aux/install-sh -c -d sys
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
- -e 's|@''ABSOLUTE_SYS_TIME_H''@|$(ABSOLUTE_SYS_TIME_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
- -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
- < $(srcdir)/sys_time_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <sysexits.h> when the system
-# doesn't have one that works with the given compiler.
-sysexits.h: sysexits_.h
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_SYSEXITS_H''@|$(HAVE_SYSEXITS_H)|g' \
- -e 's|@''ABSOLUTE_SYSEXITS_H''@|$(ABSOLUTE_SYSEXITS_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- < $(srcdir)/sysexits_.h; \
- } > $@-t
- mv -f $@-t $@
-
-# We need the following in order to create <time.h> when the system
-# doesn't have one that works with the given compiler.
-time.h: time_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@ABSOLUTE_TIME_H''@|$(ABSOLUTE_TIME_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
- -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
- -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
- -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
- -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
- -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
- < $(srcdir)/time_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create an empty placeholder for
-# <unistd.h> when the system doesn't have one.
-unistd.h: unistd_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
- -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
- -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
- -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
- -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
- -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
- -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
- -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
- -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
- -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
- -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
- -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
- -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
- -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
- -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
- -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
- -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
- -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
- -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
- < $(srcdir)/unistd_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <wchar.h> when the system
-# version does not work standalone.
-wchar.h: wchar_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''ABSOLUTE_WCHAR_H''@|$(ABSOLUTE_WCHAR_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- < $(srcdir)/wchar_.h; \
- } > $@-t
- mv $@-t $@
-
-# We need the following in order to create <wctype.h> when the system
-# doesn't have one that works with the given compiler.
-wctype.h: wctype_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
- -e 's|@''ABSOLUTE_WCTYPE_H''@|$(ABSOLUTE_WCTYPE_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
- -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
- < $(srcdir)/wctype_.h; \
- } > $@-t
- mv $@-t $@
-
-mostlyclean-local: mostlyclean-generic
- @for dir in '' $(MOSTLYCLEANDIRS); do \
- if test -n "$$dir" && test -d $$dir; then \
- echo "rmdir $$dir"; rmdir $$dir; \
- fi; \
- done
-rmt-command.h: Makefile
- echo '#define LOCALEDIR "$(localedir)"' >$@
- echo "#ifndef DEFAULT_RMT_COMMAND" >> $@
- echo "# define DEFAULT_RMT_COMMAND \"$(DEFAULT_RMT_DIR)/`echo \"rmt\" | sed 's,^.*/,,;$(transform)'`$(EXEEXT)\"" >> $@
- echo "#endif" >> $@
-# 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:
--- contrib/cpio/lib/lstat.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Work around a bug of lstat on some systems
-
- Copyright (C) 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; 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>
-
-/* The specification of these functions is in sys_stat.h. But we cannot
- include this include file here, because on some systems, a
- "#define lstat lstat64" is being used, and sys_stat.h deletes this
- definition. */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <errno.h>
-
-/* lstat works differently on Linux and Solaris systems. POSIX (see
- `pathname resolution' in the glossary) requires that programs like
- `ls' take into consideration the fact that FILE has a trailing slash
- when FILE is a symbolic link. On Linux and Solaris 10 systems, the
- lstat function already has the desired semantics (in treating
- `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)',
- but on Solaris 9 and earlier it does not.
-
- If FILE has a trailing slash and specifies a symbolic link,
- then use stat() to get more info on the referent of FILE.
- If the referent is a non-directory, then set errno to ENOTDIR
- and return -1. Otherwise, return stat's result. */
-
-int
-rpl_lstat (const char *file, struct stat *sbuf)
-{
- size_t len;
- int lstat_result = lstat (file, sbuf);
-
- if (lstat_result != 0 || !S_ISLNK (sbuf->st_mode))
- return lstat_result;
-
- len = strlen (file);
- if (len == 0 || file[len - 1] != '/')
- return 0;
-
- /* FILE refers to a symbolic link and the name ends with a slash.
- Call stat() to get info about the link's referent. */
-
- /* If stat fails, then we do the same. */
- if (stat (file, sbuf) != 0)
- return -1;
-
- /* If FILE references a directory, return 0. */
- if (S_ISDIR (sbuf->st_mode))
- return 0;
-
- /* Here, we know stat succeeded and FILE references a non-directory.
- But it was specified via a name including a trailing slash.
- Fail with errno set to ENOTDIR to indicate the contradiction. */
- errno = ENOTDIR;
- return -1;
-}
--- contrib/cpio/lib/printf-args.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 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 _PRINTF_ARGS_H
-#define _PRINTF_ARGS_H
-
-/* Get size_t. */
-#include <stddef.h>
-
-/* Get wchar_t. */
-#if HAVE_WCHAR_T
-# include <stddef.h>
-#endif
-
-/* Get wint_t. */
-#if HAVE_WINT_T
-# include <wchar.h>
-#endif
-
-/* Get va_list. */
-#include <stdarg.h>
-
-
-/* Argument types */
-typedef enum
-{
- TYPE_NONE,
- TYPE_SCHAR,
- TYPE_UCHAR,
- TYPE_SHORT,
- TYPE_USHORT,
- TYPE_INT,
- TYPE_UINT,
- TYPE_LONGINT,
- TYPE_ULONGINT,
-#if HAVE_LONG_LONG_INT
- TYPE_LONGLONGINT,
- TYPE_ULONGLONGINT,
-#endif
- TYPE_DOUBLE,
- TYPE_LONGDOUBLE,
- TYPE_CHAR,
-#if HAVE_WINT_T
- TYPE_WIDE_CHAR,
-#endif
- TYPE_STRING,
-#if HAVE_WCHAR_T
- TYPE_WIDE_STRING,
-#endif
- TYPE_POINTER,
- TYPE_COUNT_SCHAR_POINTER,
- TYPE_COUNT_SHORT_POINTER,
- TYPE_COUNT_INT_POINTER,
- TYPE_COUNT_LONGINT_POINTER
-#if HAVE_LONG_LONG_INT
-, TYPE_COUNT_LONGLONGINT_POINTER
-#endif
-} arg_type;
-
-/* Polymorphic argument */
-typedef struct
-{
- arg_type type;
- union
- {
- signed char a_schar;
- unsigned char a_uchar;
- short a_short;
- unsigned short a_ushort;
- int a_int;
- unsigned int a_uint;
- long int a_longint;
- unsigned long int a_ulongint;
-#if HAVE_LONG_LONG_INT
- long long int a_longlongint;
- unsigned long long int a_ulonglongint;
-#endif
- float a_float;
- double a_double;
- long double a_longdouble;
- int a_char;
-#if HAVE_WINT_T
- wint_t a_wide_char;
-#endif
- const char* a_string;
-#if HAVE_WCHAR_T
- const wchar_t* a_wide_string;
-#endif
- void* a_pointer;
- signed char * a_count_schar_pointer;
- short * a_count_short_pointer;
- int * a_count_int_pointer;
- long int * a_count_longint_pointer;
-#if HAVE_LONG_LONG_INT
- long long int * a_count_longlongint_pointer;
-#endif
- }
- a;
-}
-argument;
-
-typedef struct
-{
- size_t count;
- argument *arg;
-}
-arguments;
-
-
-/* Fetch the arguments, putting them into a. */
-#ifdef STATIC
-STATIC
-#else
-extern
-#endif
-int printf_fetchargs (va_list args, arguments *a);
-
-#endif /* _PRINTF_ARGS_H */
--- contrib/cpio/lib/strndup.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* A replacement function, for systems that lack strndup.
-
- Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006, 2007
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by 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 <string.h>
-
-#include <stdlib.h>
-
-char *
-strndup (char const *s, size_t n)
-{
- size_t len = strnlen (s, n);
- char *new = malloc (len + 1);
-
- if (new == NULL)
- return NULL;
-
- new[len] = '\0';
- return memcpy (new, s, len);
-}
--- contrib/cpio/lib/setenv.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/* Copyright (C) 1992,1995-1999,2000-2003,2005-2007 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. */
-
-#if !_LIBC
-# include <config.h>
-#endif
-#include <alloca.h>
-
-#include <errno.h>
-#ifndef __set_errno
-# define __set_errno(ev) ((errno) = (ev))
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#if _LIBC || HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if _LIBC || !HAVE_SETENV
-
-#if !_LIBC
-# include "allocsa.h"
-#endif
-
-#if !_LIBC
-# define __environ environ
-# ifndef HAVE_ENVIRON_DECL
-extern char **environ;
-# endif
-#endif
-
-#if _LIBC
-/* This lock protects against simultaneous modifications of `environ'. */
-# include <bits/libc-lock.h>
-__libc_lock_define_initialized (static, envlock)
-# define LOCK __libc_lock_lock (envlock)
-# define UNLOCK __libc_lock_unlock (envlock)
-#else
-# define LOCK
-# define UNLOCK
-#endif
-
-/* In the GNU C library we must keep the namespace clean. */
-#ifdef _LIBC
-# define setenv __setenv
-# define clearenv __clearenv
-# define tfind __tfind
-# define tsearch __tsearch
-#endif
-
-/* In the GNU C library implementation we try to be more clever and
- allow arbitrarily many changes of the environment given that the used
- values are from a small set. Outside glibc this will eat up all
- memory after a while. */
-#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \
- && defined __GNUC__)
-# define USE_TSEARCH 1
-# include <search.h>
-typedef int (*compar_fn_t) (const void *, const void *);
-
-/* This is a pointer to the root of the search tree with the known
- values. */
-static void *known_values;
-
-# define KNOWN_VALUE(Str) \
- ({ \
- void *value = tfind (Str, &known_values, (compar_fn_t) strcmp); \
- value != NULL ? *(char **) value : NULL; \
- })
-# define STORE_VALUE(Str) \
- tsearch (Str, &known_values, (compar_fn_t) strcmp)
-
-#else
-# undef USE_TSEARCH
-
-# define KNOWN_VALUE(Str) NULL
-# define STORE_VALUE(Str) do { } while (0)
-
-#endif
-
-
-/* If this variable is not a null pointer we allocated the current
- environment. */
-static char **last_environ;
-
-
-/* This function is used by `setenv' and `putenv'. The difference between
- the two functions is that for the former must create a new string which
- is then placed in the environment, while the argument of `putenv'
- must be used directly. This is all complicated by the fact that we try
- to reuse values once generated for a `setenv' call since we can never
- free the strings. */
-int
-__add_to_environ (const char *name, const char *value, const char *combined,
- int replace)
-{
- register char **ep;
- register size_t size;
- const size_t namelen = strlen (name);
- const size_t vallen = value != NULL ? strlen (value) + 1 : 0;
-
- LOCK;
-
- /* We have to get the pointer now that we have the lock and not earlier
- since another thread might have created a new environment. */
- ep = __environ;
-
- size = 0;
- if (ep != NULL)
- {
- for (; *ep != NULL; ++ep)
- if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
- break;
- else
- ++size;
- }
-
- if (ep == NULL || *ep == NULL)
- {
- char **new_environ;
-#ifdef USE_TSEARCH
- char *new_value;
-#endif
-
- /* We allocated this space; we can extend it. */
- new_environ =
- (char **) (last_environ == NULL
- ? malloc ((size + 2) * sizeof (char *))
- : realloc (last_environ, (size + 2) * sizeof (char *)));
- if (new_environ == NULL)
- {
- UNLOCK;
- return -1;
- }
-
- /* If the whole entry is given add it. */
- if (combined != NULL)
- /* We must not add the string to the search tree since it belongs
- to the user. */
- new_environ[size] = (char *) combined;
- else
- {
- /* See whether the value is already known. */
-#ifdef USE_TSEARCH
-# ifdef _LIBC
- new_value = (char *) alloca (namelen + 1 + vallen);
- __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1),
- value, vallen);
-# else
- new_value = (char *) allocsa (namelen + 1 + vallen);
- if (new_value == NULL)
- {
- __set_errno (ENOMEM);
- UNLOCK;
- return -1;
- }
- memcpy (new_value, name, namelen);
- new_value[namelen] = '=';
- memcpy (&new_value[namelen + 1], value, vallen);
-# endif
-
- new_environ[size] = KNOWN_VALUE (new_value);
- if (new_environ[size] == NULL)
-#endif
- {
- new_environ[size] = (char *) malloc (namelen + 1 + vallen);
- if (new_environ[size] == NULL)
- {
-#if defined USE_TSEARCH && !defined _LIBC
- freesa (new_value);
-#endif
- __set_errno (ENOMEM);
- UNLOCK;
- return -1;
- }
-
-#ifdef USE_TSEARCH
- memcpy (new_environ[size], new_value, namelen + 1 + vallen);
-#else
- memcpy (new_environ[size], name, namelen);
- new_environ[size][namelen] = '=';
- memcpy (&new_environ[size][namelen + 1], value, vallen);
-#endif
- /* And save the value now. We cannot do this when we remove
- the string since then we cannot decide whether it is a
- user string or not. */
- STORE_VALUE (new_environ[size]);
- }
-#if defined USE_TSEARCH && !defined _LIBC
- freesa (new_value);
-#endif
- }
-
- if (__environ != last_environ)
- memcpy ((char *) new_environ, (char *) __environ,
- size * sizeof (char *));
-
- new_environ[size + 1] = NULL;
-
- last_environ = __environ = new_environ;
- }
- else if (replace)
- {
- char *np;
-
- /* Use the user string if given. */
- if (combined != NULL)
- np = (char *) combined;
- else
- {
-#ifdef USE_TSEARCH
- char *new_value;
-# ifdef _LIBC
- new_value = alloca (namelen + 1 + vallen);
- __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1),
- value, vallen);
-# else
- new_value = allocsa (namelen + 1 + vallen);
- if (new_value == NULL)
- {
- __set_errno (ENOMEM);
- UNLOCK;
- return -1;
- }
- memcpy (new_value, name, namelen);
- new_value[namelen] = '=';
- memcpy (&new_value[namelen + 1], value, vallen);
-# endif
-
- np = KNOWN_VALUE (new_value);
- if (np == NULL)
-#endif
- {
- np = malloc (namelen + 1 + vallen);
- if (np == NULL)
- {
-#if defined USE_TSEARCH && !defined _LIBC
- freesa (new_value);
-#endif
- __set_errno (ENOMEM);
- UNLOCK;
- return -1;
- }
-
-#ifdef USE_TSEARCH
- memcpy (np, new_value, namelen + 1 + vallen);
-#else
- memcpy (np, name, namelen);
- np[namelen] = '=';
- memcpy (&np[namelen + 1], value, vallen);
-#endif
- /* And remember the value. */
- STORE_VALUE (np);
- }
-#if defined USE_TSEARCH && !defined _LIBC
- freesa (new_value);
-#endif
- }
-
- *ep = np;
- }
-
- UNLOCK;
-
- return 0;
-}
-
-int
-setenv (const char *name, const char *value, int replace)
-{
- return __add_to_environ (name, value, NULL, replace);
-}
-
-/* The `clearenv' was planned to be added to POSIX.1 but probably
- never made it. Nevertheless the POSIX.9 standard (POSIX bindings
- for Fortran 77) requires this function. */
-int
-clearenv (void)
-{
- LOCK;
-
- if (__environ == last_environ && __environ != NULL)
- {
- /* We allocated this environment so we can free it. */
- free (__environ);
- last_environ = NULL;
- }
-
- /* Clear the environment pointer removes the whole environment. */
- __environ = NULL;
-
- UNLOCK;
-
- return 0;
-}
-
-#ifdef _LIBC
-static void
-free_mem (void)
-{
- /* Remove all traces. */
- clearenv ();
-
- /* Now remove the search tree. */
- __tdestroy (known_values, free);
- known_values = NULL;
-}
-text_set_element (__libc_subfreeres, free_mem);
-
-
-# undef setenv
-# undef clearenv
-weak_alias (__setenv, setenv)
-weak_alias (__clearenv, clearenv)
-#endif
-
-#endif /* _LIBC || !HAVE_SETENV */
--- contrib/cpio/lib/basename.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* 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;
-}
--- contrib/cpio/lib/unsetenv.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright (C) 1992,1995-1999,2000-2002,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>
-
-#include <errno.h>
-#if !_LIBC
-# define __set_errno(ev) ((errno) = (ev))
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#if !_LIBC
-# define __environ environ
-# ifndef HAVE_ENVIRON_DECL
-extern char **environ;
-# endif
-#endif
-
-#if _LIBC
-/* This lock protects against simultaneous modifications of `environ'. */
-# include <bits/libc-lock.h>
-__libc_lock_define_initialized (static, envlock)
-# define LOCK __libc_lock_lock (envlock)
-# define UNLOCK __libc_lock_unlock (envlock)
-#else
-# define LOCK
-# define UNLOCK
-#endif
-
-/* In the GNU C library we must keep the namespace clean. */
-#ifdef _LIBC
-# define unsetenv __unsetenv
-#endif
-
-
-int
-unsetenv (const char *name)
-{
- size_t len;
- char **ep;
-
- if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- len = strlen (name);
-
- LOCK;
-
- ep = __environ;
- while (*ep != NULL)
- if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
- {
- /* Found it. Remove this pointer by moving later ones back. */
- char **dp = ep;
-
- do
- dp[0] = dp[1];
- while (*dp++);
- /* Continue the loop in case NAME appears again. */
- }
- else
- ++ep;
-
- UNLOCK;
-
- return 0;
-}
-
-#ifdef _LIBC
-# undef unsetenv
-weak_alias (__unsetenv, unsetenv)
-#endif
--- contrib/cpio/lib/strnlen1.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- 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. */
-
-#ifndef _STRNLEN1_H
-#define _STRNLEN1_H
-
-#include <stddef.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- If no '\0' terminator is found in that many characters, return MAXLEN. */
-/* This is the same as strnlen (string, maxlen - 1) + 1. */
-extern size_t strnlen1 (const char *string, size_t maxlen);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _STRNLEN1_H */
--- contrib/cpio/lib/paxexit.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Miscellaneous error functions
-
- 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. */
-
-#include <system.h>
-#include <paxlib.h>
-
-int exit_status = PAXEXIT_SUCCESS;
-
-void
-pax_exit ()
-{
- exit (exit_status);
-}
--- contrib/cpio/lib/time_r.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Reentrant time functions like localtime_r.
-
- Copyright (C) 2003, 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 Paul Eggert. */
-
-#include <config.h>
-
-#include <time.h>
-
-#include <string.h>
-
-static struct tm *
-copy_tm_result (struct tm *dest, struct tm const *src)
-{
- if (! src)
- return 0;
- *dest = *src;
- return dest;
-}
-
-
-struct tm *
-gmtime_r (time_t const * restrict t, struct tm * restrict tp)
-{
- return copy_tm_result (tp, gmtime (t));
-}
-
-struct tm *
-localtime_r (time_t const * restrict t, struct tm * restrict tp)
-{
- return copy_tm_result (tp, localtime (t));
-}
--- contrib/cpio/lib/strndup.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Duplicate a size-bounded string.
- Copyright (C) 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. */
-
-#if HAVE_STRNDUP
-
-/* Get strndup() declaration. */
-#include <string.h>
-
-#else
-
-#include <stddef.h>
-
-/* Return a newly allocated copy of at most N bytes of STRING. */
-extern char *strndup (const char *string, size_t n);
-
-#endif
--- contrib/cpio/lib/inttostr.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* inttostr.h -- convert integers to printable strings
-
- Copyright (C) 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; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Written by Paul Eggert */
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include "intprops.h"
-
-char *offtostr (off_t, char *);
-char *imaxtostr (intmax_t, char *);
-char *umaxtostr (uintmax_t, char *);
-char *uinttostr (unsigned int, char *);
--- contrib/cpio/lib/unistd_.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2004-2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _GL_UNISTD_H
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_UNISTD_H@
-# if @HAVE_INCLUDE_NEXT@
-# include_next <unistd.h>
-# else
-# include @ABSOLUTE_UNISTD_H@
-# endif
-#endif
-
-#ifndef _GL_UNISTD_H
-#define _GL_UNISTD_H
-
-/* mingw doesn't define the SEEK_* macros in <unistd.h>. */
-#if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET)
-# include <stdio.h>
-#endif
-
-/* mingw fails to declare _exit in <unistd.h>. */
-#include <stdlib.h>
-
-/* The definition of GL_LINK_WARNING is copied here. */
-
-
-/* Declare overridden functions. */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#if @GNULIB_CHOWN@
-# if @REPLACE_CHOWN@
-/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
- to GID (if GID is not -1).
- Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/chown.html>. */
-# define chown rpl_chown
-extern int chown (const char *file, uid_t uid, gid_t gid);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef chown
-# define chown(f,u,g) \
- (GL_LINK_WARNING ("chown fails to follow symlinks on some systems and " \
- "doesn't treat a uid or gid of -1 on some systems - " \
- "use gnulib module chown for portability"), \
- chown (f, u, g))
-#endif
-
-
-#if @GNULIB_DUP2@
-# if !@HAVE_DUP2@
-/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if
- NEWFD = OLDFD, otherwise close NEWFD first if it is open.
- Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/dup2.html>. */
-extern int dup2 (int oldfd, int newfd);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef dup2
-# define dup2(o,n) \
- (GL_LINK_WARNING ("dup2 is unportable - " \
- "use gnulib module dup2 for portability"), \
- dup2 (o, n))
-#endif
-
-
-#if @GNULIB_FCHDIR@
-# if @REPLACE_FCHDIR@
-
-/* Change the process' current working directory to the directory on which
- the given file descriptor is open.
- Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/fchdir.html>. */
-extern int fchdir (int /*fd*/);
-
-# define close rpl_close
-extern int close (int);
-# define dup rpl_dup
-extern int dup (int);
-# define dup2 rpl_dup2
-extern int dup2 (int, int);
-
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fchdir
-# define fchdir(f) \
- (GL_LINK_WARNING ("fchdir is unportable - " \
- "use gnulib module fchdir for portability"), \
- fchdir (f))
-#endif
-
-
-#if @GNULIB_FTRUNCATE@
-# if !@HAVE_FTRUNCATE@
-/* Change the size of the file to which FD is opened to become equal to LENGTH.
- Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/ftruncate.html>. */
-extern int ftruncate (int fd, off_t length);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef ftruncate
-# define ftruncate(f,l) \
- (GL_LINK_WARNING ("ftruncate is unportable - " \
- "use gnulib module ftruncate for portability"), \
- ftruncate (f, l))
-#endif
-
-
-#if @GNULIB_GETCWD@
-/* Include the headers that might declare getcwd so that they will not
- cause confusion if included after this file. */
-# include <stdlib.h>
-# if @REPLACE_GETCWD@
-/* Get the name of the current working directory, and put it in SIZE bytes
- of BUF.
- Return BUF if successful, or NULL if the directory couldn't be determined
- or SIZE was too small.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/getcwd.html>.
- Additionally, the gnulib module 'getcwd' guarantees the following GNU
- extension: If BUF is NULL, an array is allocated with 'malloc'; the array
- is SIZE bytes long, unless SIZE == 0, in which case it is as big as
- necessary. */
-# define getcwd rpl_getcwd
-extern char * getcwd (char *buf, size_t size);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef getcwd
-# define getcwd(b,s) \
- (GL_LINK_WARNING ("getcwd is unportable - " \
- "use gnulib module getcwd for portability"), \
- getcwd (b, s))
-#endif
-
-
-#if @GNULIB_GETLOGIN_R@
-/* Copies the user's login name to NAME.
- The array pointed to by NAME has room for SIZE bytes.
-
- Returns 0 if successful. Upon error, an error number is returned, or -1 in
- the case that the login name cannot be found but no specific error is
- provided (this case is hopefully rare but is left open by the POSIX spec).
-
- See <http://www.opengroup.org/susv3xsh/getlogin.html>.
- */
-# if !@HAVE_DECL_GETLOGIN_R@
-# include <stddef.h>
-extern int getlogin_r (char *name, size_t size);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef getlogin_r
-# define getlogin_r(n,s) \
- (GL_LINK_WARNING ("getlogin_r is unportable - " \
- "use gnulib module getlogin_r for portability"), \
- getlogin_r (n, s))
-#endif
-
-
-#if @GNULIB_LSEEK@
-# if @REPLACE_LSEEK@
-/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
- Return the new offset if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/lseek.html>. */
-# define lseek rpl_lseek
- extern off_t lseek (int fd, off_t offset, int whence);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef lseek
-# define lseek(f,o,w) \
- (GL_LINK_WARNING ("lseek does not fail with ESPIPE on pipes on some " \
- "systems - use gnulib module lseek for portability"), \
- lseek (f, o, w))
-#endif
-
-
-#if @GNULIB_READLINK@
-/* Read the contents of the symbolic link FILE and place the first BUFSIZE
- bytes of it into BUF. Return the number of bytes placed into BUF if
- successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/readlink.html>. */
-# if !@HAVE_READLINK@
-# include <stddef.h>
-extern int readlink (const char *file, char *buf, size_t bufsize);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef readlink
-# define readlink(f,b,s) \
- (GL_LINK_WARNING ("readlink is unportable - " \
- "use gnulib module readlink for portability"), \
- readlink (f, b, s))
-#endif
-
-
-#if @GNULIB_SLEEP@
-/* Pause the execution of the current thread for N seconds.
- Returns the number of seconds left to sleep.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/sleep.html>. */
-# if !@HAVE_SLEEP@
-extern unsigned int sleep (unsigned int n);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef sleep
-# define sleep(n) \
- (GL_LINK_WARNING ("sleep is unportable - " \
- "use gnulib module sleep for portability"), \
- sleep (n))
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _GL_UNISTD_H */
-#endif /* _GL_UNISTD_H */
--- contrib/cpio/lib/fileblocks.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Convert file size to number of blocks on System V-like machines.
-
- Copyright (C) 1990, 1997, 1998, 1999, 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 Brian L. Matthews, blm at 6sceng.UUCP. */
-
-#include <config.h>
-
-#include <sys/types.h>
-
-#if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-
-#if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
-
-# include <unistd.h>
-
-# ifndef NINDIR
-
-# if defined __DJGPP__
-typedef long daddr_t; /* for disk address */
-# endif
-
-/* Some SysV's, like Irix, seem to lack this. Hope it's correct. */
-/* Number of inode pointers per indirect block. */
-# define NINDIR (BSIZE / sizeof (daddr_t))
-# endif /* !NINDIR */
-
-/* Number of direct block addresses in an inode. */
-# define NDIR 10
-
-/* Return the number of 512-byte blocks in a file of SIZE bytes. */
-
-off_t
-st_blocks (off_t size)
-{
- off_t datablks = size / 512 + (size % 512 != 0);
- off_t indrblks = 0;
-
- if (datablks > NDIR)
- {
- indrblks = (datablks - NDIR - 1) / NINDIR + 1;
-
- if (datablks > NDIR + NINDIR)
- {
- indrblks += (datablks - NDIR - NINDIR - 1) / (NINDIR * NINDIR) + 1;
-
- if (datablks > NDIR + NINDIR + NINDIR * NINDIR)
- indrblks++;
- }
- }
-
- return datablks + indrblks;
-}
-#else
-/* This declaration is solely to ensure that after preprocessing
- this file is never empty. */
-typedef int textutils_fileblocks_unused;
-#endif
--- contrib/cpio/lib/vasnprintf.c
+++ /dev/null
@@ -1,3193 +0,0 @@
-/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-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. */
-
-/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
- This must come before <config.h> because <config.h> may include
- <features.h>, and once <features.h> has been included, it's too late. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#include <config.h>
-#ifndef IN_LIBINTL
-# include <alloca.h>
-#endif
-
-/* Specification. */
-#if WIDE_CHAR_VERSION
-# include "vasnwprintf.h"
-#else
-# include "vasnprintf.h"
-#endif
-
-#include <locale.h> /* localeconv() */
-#include <stdio.h> /* snprintf(), sprintf() */
-#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
-#include <string.h> /* memcpy(), strlen() */
-#include <errno.h> /* errno */
-#include <limits.h> /* CHAR_BIT */
-#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
-#if HAVE_NL_LANGINFO
-# include <langinfo.h>
-#endif
-#if WIDE_CHAR_VERSION
-# include "wprintf-parse.h"
-#else
-# include "printf-parse.h"
-#endif
-
-/* Checked size_t computations. */
-#include "xsize.h"
-
-#if NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL
-# include <math.h>
-# include "float+.h"
-#endif
-
-#if NEED_PRINTF_INFINITE_DOUBLE && !defined IN_LIBINTL
-# include <math.h>
-# include "isnan.h"
-#endif
-
-#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !defined IN_LIBINTL
-# include <math.h>
-# include "isnanl-nolibm.h"
-#endif
-
-#if NEED_PRINTF_DIRECTIVE_A && !defined IN_LIBINTL
-# include <math.h>
-# include "isnan.h"
-# include "printf-frexp.h"
-# include "isnanl-nolibm.h"
-# include "printf-frexpl.h"
-# include "fpucw.h"
-#endif
-
-/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */
-#ifndef EOVERFLOW
-# define EOVERFLOW E2BIG
-#endif
-
-#if HAVE_WCHAR_T
-# if HAVE_WCSLEN
-# define local_wcslen wcslen
-# else
- /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
- a dependency towards this library, here is a local substitute.
- Define this substitute only once, even if this file is included
- twice in the same compilation unit. */
-# ifndef local_wcslen_defined
-# define local_wcslen_defined 1
-static size_t
-local_wcslen (const wchar_t *s)
-{
- const wchar_t *ptr;
-
- for (ptr = s; *ptr != (wchar_t) 0; ptr++)
- ;
- return ptr - s;
-}
-# endif
-# endif
-#endif
-
-#if WIDE_CHAR_VERSION
-# define VASNPRINTF vasnwprintf
-# define CHAR_T wchar_t
-# define DIRECTIVE wchar_t_directive
-# define DIRECTIVES wchar_t_directives
-# define PRINTF_PARSE wprintf_parse
-# define USE_SNPRINTF 1
-# if HAVE_DECL__SNWPRINTF
- /* On Windows, the function swprintf() has a different signature than
- on Unix; we use the _snwprintf() function instead. */
-# define SNPRINTF _snwprintf
-# else
- /* Unix. */
-# define SNPRINTF swprintf
-# endif
-#else
-# define VASNPRINTF vasnprintf
-# define CHAR_T char
-# define DIRECTIVE char_directive
-# define DIRECTIVES char_directives
-# define PRINTF_PARSE printf_parse
-# /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'.
- But don't use it on BeOS, since BeOS snprintf produces no output if the
- size argument is >= 0x3000000. */
-# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__
-# define USE_SNPRINTF 1
-# else
-# define USE_SNPRINTF 0
-# endif
-# if HAVE_DECL__SNPRINTF
- /* Windows. */
-# define SNPRINTF _snprintf
-# else
- /* Unix. */
-# define SNPRINTF snprintf
- /* Here we need to call the native snprintf, not rpl_snprintf. */
-# undef snprintf
-# endif
-#endif
-/* Here we need to call the native sprintf, not rpl_sprintf. */
-#undef sprintf
-
-#if NEED_PRINTF_DIRECTIVE_A && !defined IN_LIBINTL
-/* Determine the decimal-point character according to the current locale. */
-# ifndef decimal_point_char_defined
-# define decimal_point_char_defined 1
-static char
-decimal_point_char ()
-{
- const char *point;
- /* Determine it in a multithread-safe way. We know nl_langinfo is
- multithread-safe on glibc systems, but is not required to be multithread-
- safe by POSIX. sprintf(), however, is multithread-safe. localeconv()
- is rarely multithread-safe. */
-# if HAVE_NL_LANGINFO && __GLIBC__
- point = nl_langinfo (RADIXCHAR);
-# elif 1
- char pointbuf[5];
- sprintf (pointbuf, "%#.0f", 1.0);
- point = &pointbuf[1];
-# else
- point = localeconv () -> decimal_point;
-# endif
- /* The decimal point is always a single byte: either '.' or ','. */
- return (point[0] != '\0' ? point[0] : '.');
-}
-# endif
-#endif
-
-#if NEED_PRINTF_INFINITE_DOUBLE && !defined IN_LIBINTL
-
-/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */
-static int
-is_infinite_or_zero (double x)
-{
- return isnan (x) || x + x == x;
-}
-
-#endif
-
-#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !defined IN_LIBINTL
-
-/* Equivalent to !isfinite(x), but does not require libm. */
-static int
-is_infinitel (long double x)
-{
- return isnanl (x) || (x + x == x && x != 0.0L);
-}
-
-#endif
-
-#if NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL
-
-/* Converting 'long double' to decimal without rare rounding bugs requires
- real bignums. We use the naming conventions of GNU gmp, but vastly simpler
- (and slower) algorithms. */
-
-typedef unsigned int mp_limb_t;
-# define GMP_LIMB_BITS 32
-typedef int mp_limb_verify[2 * (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS) - 1];
-
-typedef unsigned long long mp_twolimb_t;
-# define GMP_TWOLIMB_BITS 64
-typedef int mp_twolimb_verify[2 * (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS) - 1];
-
-/* Representation of a bignum >= 0. */
-typedef struct
-{
- size_t nlimbs;
- mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */
-} mpn_t;
-
-/* Compute the product of two bignums >= 0.
- Return the allocated memory in case of success, NULL in case of memory
- allocation failure. */
-static void *
-multiply (mpn_t src1, mpn_t src2, mpn_t *dest)
-{
- const mp_limb_t *p1;
- const mp_limb_t *p2;
- size_t len1;
- size_t len2;
-
- if (src1.nlimbs <= src2.nlimbs)
- {
- len1 = src1.nlimbs;
- p1 = src1.limbs;
- len2 = src2.nlimbs;
- p2 = src2.limbs;
- }
- else
- {
- len1 = src2.nlimbs;
- p1 = src2.limbs;
- len2 = src1.nlimbs;
- p2 = src1.limbs;
- }
- /* Now 0 <= len1 <= len2. */
- if (len1 == 0)
- {
- /* src1 or src2 is zero. */
- dest->nlimbs = 0;
- dest->limbs = (mp_limb_t *) malloc (1);
- }
- else
- {
- /* Here 1 <= len1 <= len2. */
- size_t dlen;
- mp_limb_t *dp;
- size_t k, i, j;
-
- dlen = len1 + len2;
- dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t));
- if (dp == NULL)
- return NULL;
- for (k = len2; k > 0; )
- dp[--k] = 0;
- for (i = 0; i < len1; i++)
- {
- mp_limb_t digit1 = p1[i];
- mp_twolimb_t carry = 0;
- for (j = 0; j < len2; j++)
- {
- mp_limb_t digit2 = p2[j];
- carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2;
- carry += dp[i + j];
- dp[i + j] = (mp_limb_t) carry;
- carry = carry >> GMP_LIMB_BITS;
- }
- dp[i + len2] = (mp_limb_t) carry;
- }
- /* Normalise. */
- while (dlen > 0 && dp[dlen - 1] == 0)
- dlen--;
- dest->nlimbs = dlen;
- dest->limbs = dp;
- }
- return dest->limbs;
-}
-
-/* Compute the quotient of a bignum a >= 0 and a bignum b > 0.
- a is written as a = q * b + r with 0 <= r < b. q is the quotient, r
- the remainder.
- Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd,
- q is incremented.
- Return the allocated memory in case of success, NULL in case of memory
- allocation failure. */
-static void *
-divide (mpn_t a, mpn_t b, mpn_t *q)
-{
- /* Algorithm:
- First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]]
- with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS).
- If m<n, then q:=0 and r:=a.
- If m>=n=1, perform a single-precision division:
- r:=0, j:=m,
- while j>0 do
- {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j =
- = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r<b[0]<beta}
- j:=j-1, r:=r*beta+a[j], q[j]:=floor(r/b[0]), r:=r-b[0]*q[j].
- Normalise [q[m-1],...,q[0]], yields q.
- If m>=n>1, perform a multiple-precision division:
- We have a/b < beta^(m-n+1).
- s:=intDsize-1-(hightest bit in b[n-1]), 0<=s<intDsize.
- Shift a and b left by s bits, copying them. r:=a.
- r=[r[m],...,r[0]], b=[b[n-1],...,b[0]] with b[n-1]>=beta/2.
- For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).}
- Compute q* :
- q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]).
- In case of overflow (q* >= beta) set q* := beta-1.
- Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2]
- and c3 := b[n-2] * q*.
- {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow
- occurred. Furthermore 0 <= c3 < beta^2.
- If there was overflow and
- r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2,
- the next test can be skipped.}
- While c3 > c2, {Here 0 <= c2 < c3 < beta^2}
- Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2].
- If q* > 0:
- Put r := r - b * q* * beta^j. In detail:
- [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]].
- hence: u:=0, for i:=0 to n-1 do
- u := u + q* * b[i],
- r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry),
- u:=u div beta (+ 1, if carry in subtraction)
- r[n+j]:=r[n+j]-u.
- {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1
- < q* + 1 <= beta,
- the carry u does not overflow.}
- If a negative carry occurs, put q* := q* - 1
- and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]].
- Set q[j] := q*.
- Normalise [q[m-n],..,q[0]]; this yields the quotient q.
- Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the
- rest r.
- The room for q[j] can be allocated at the memory location of r[n+j].
- Finally, round-to-even:
- Shift r left by 1 bit.
- If r > b or if r = b and q[0] is odd, q := q+1.
- */
- const mp_limb_t *a_ptr = a.limbs;
- size_t a_len = a.nlimbs;
- const mp_limb_t *b_ptr = b.limbs;
- size_t b_len = b.nlimbs;
- mp_limb_t *roomptr;
- mp_limb_t *tmp_roomptr = NULL;
- mp_limb_t *q_ptr;
- size_t q_len;
- mp_limb_t *r_ptr;
- size_t r_len;
-
- /* Allocate room for a_len+2 digits.
- (Need a_len+1 digits for the real division and 1 more digit for the
- final rounding of q.) */
- roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t));
- if (roomptr == NULL)
- return NULL;
-
- /* Normalise a. */
- while (a_len > 0 && a_ptr[a_len - 1] == 0)
- a_len--;
-
- /* Normalise b. */
- for (;;)
- {
- if (b_len == 0)
- /* Division by zero. */
- abort ();
- if (b_ptr[b_len - 1] == 0)
- b_len--;
- else
- break;
- }
-
- /* Here m = a_len >= 0 and n = b_len > 0. */
-
- if (a_len < b_len)
- {
- /* m<n: trivial case. q=0, r := copy of a. */
- r_ptr = roomptr;
- r_len = a_len;
- memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t));
- q_ptr = roomptr + a_len;
- q_len = 0;
- }
- else if (b_len == 1)
- {
- /* n=1: single precision division.
- beta^(m-1) <= a < beta^m ==> beta^(m-2) <= a/b < beta^m */
- r_ptr = roomptr;
- q_ptr = roomptr + 1;
- {
- mp_limb_t den = b_ptr[0];
- mp_limb_t remainder = 0;
- const mp_limb_t *sourceptr = a_ptr + a_len;
- mp_limb_t *destptr = q_ptr + a_len;
- size_t count;
- for (count = a_len; count > 0; count--)
- {
- mp_twolimb_t num =
- ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr;
- *--destptr = num / den;
- remainder = num % den;
- }
- /* Normalise and store r. */
- if (remainder > 0)
- {
- r_ptr[0] = remainder;
- r_len = 1;
- }
- else
- r_len = 0;
- /* Normalise q. */
- q_len = a_len;
- if (q_ptr[q_len - 1] == 0)
- q_len--;
- }
- }
- else
- {
- /* n>1: multiple precision division.
- beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==>
- beta^(m-n-1) <= a/b < beta^(m-n+1). */
- /* Determine s. */
- size_t s;
- {
- mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */
- s = 31;
- if (msd >= 0x10000)
- {
- msd = msd >> 16;
- s -= 16;
- }
- if (msd >= 0x100)
- {
- msd = msd >> 8;
- s -= 8;
- }
- if (msd >= 0x10)
- {
- msd = msd >> 4;
- s -= 4;
- }
- if (msd >= 0x4)
- {
- msd = msd >> 2;
- s -= 2;
- }
- if (msd >= 0x2)
- {
- msd = msd >> 1;
- s -= 1;
- }
- }
- /* 0 <= s < GMP_LIMB_BITS.
- Copy b, shifting it left by s bits. */
- if (s > 0)
- {
- tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t));
- if (tmp_roomptr == NULL)
- {
- free (roomptr);
- return NULL;
- }
- {
- const mp_limb_t *sourceptr = b_ptr;
- mp_limb_t *destptr = tmp_roomptr;
- mp_twolimb_t accu = 0;
- size_t count;
- for (count = b_len; count > 0; count--)
- {
- accu += (mp_twolimb_t) *sourceptr++ << s;
- *destptr++ = (mp_limb_t) accu;
- accu = accu >> GMP_LIMB_BITS;
- }
- /* accu must be zero, since that was how s was determined. */
- if (accu != 0)
- abort ();
- }
- b_ptr = tmp_roomptr;
- }
- /* Copy a, shifting it left by s bits, yields r.
- Memory layout:
- At the beginning: r = roomptr[0..a_len],
- at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */
- r_ptr = roomptr;
- if (s == 0)
- {
- memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t));
- r_ptr[a_len] = 0;
- }
- else
- {
- const mp_limb_t *sourceptr = a_ptr;
- mp_limb_t *destptr = r_ptr;
- mp_twolimb_t accu = 0;
- size_t count;
- for (count = a_len; count > 0; count--)
- {
- accu += (mp_twolimb_t) *sourceptr++ << s;
- *destptr++ = (mp_limb_t) accu;
- accu = accu >> GMP_LIMB_BITS;
- }
- *destptr++ = (mp_limb_t) accu;
- }
- q_ptr = roomptr + b_len;
- q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */
- {
- size_t j = a_len - b_len; /* m-n */
- mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */
- mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */
- mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */
- ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd;
- /* Division loop, traversed m-n+1 times.
- j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */
- for (;;)
- {
- mp_limb_t q_star;
- mp_limb_t c1;
- if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */
- {
- /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */
- mp_twolimb_t num =
- ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS)
- | r_ptr[j + b_len - 1];
- q_star = num / b_msd;
- c1 = num % b_msd;
- }
- else
- {
- /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */
- q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */
- /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta
- <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta
- <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta)
- {<= beta !}.
- If yes, jump directly to the subtraction loop.
- (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta
- <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */
- if (r_ptr[j + b_len] > b_msd
- || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd)
- /* r[j+n] >= b[n-1]+1 or
- r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a
- carry. */
- goto subtract;
- }
- /* q_star = q*,
- c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, <beta). */
- {
- mp_twolimb_t c2 = /* c1*beta+r[j+n-2] */
- ((mp_twolimb_t) c1 << GMP_LIMB_BITS) | r_ptr[j + b_len - 2];
- mp_twolimb_t c3 = /* b[n-2] * q* */
- (mp_twolimb_t) b_2msd * (mp_twolimb_t) q_star;
- /* While c2 < c3, increase c2 and decrease c3.
- Consider c3-c2. While it is > 0, decrease it by
- b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2
- this can happen only twice. */
- if (c3 > c2)
- {
- q_star = q_star - 1; /* q* := q* - 1 */
- if (c3 - c2 > b_msdd)
- q_star = q_star - 1; /* q* := q* - 1 */
- }
- }
- if (q_star > 0)
- subtract:
- {
- /* Subtract r := r - b * q* * beta^j. */
- mp_limb_t cr;
- {
- const mp_limb_t *sourceptr = b_ptr;
- mp_limb_t *destptr = r_ptr + j;
- mp_twolimb_t carry = 0;
- size_t count;
- for (count = b_len; count > 0; count--)
- {
- /* Here 0 <= carry <= q*. */
- carry =
- carry
- + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++
- + (mp_limb_t) ~(*destptr);
- /* Here 0 <= carry <= beta*q* + beta-1. */
- *destptr++ = ~(mp_limb_t) carry;
- carry = carry >> GMP_LIMB_BITS; /* <= q* */
- }
- cr = (mp_limb_t) carry;
- }
- /* Subtract cr from r_ptr[j + b_len], then forget about
- r_ptr[j + b_len]. */
- if (cr > r_ptr[j + b_len])
- {
- /* Subtraction gave a carry. */
- q_star = q_star - 1; /* q* := q* - 1 */
- /* Add b back. */
- {
- const mp_limb_t *sourceptr = b_ptr;
- mp_limb_t *destptr = r_ptr + j;
- mp_limb_t carry = 0;
- size_t count;
- for (count = b_len; count > 0; count--)
- {
- mp_limb_t source1 = *sourceptr++;
- mp_limb_t source2 = *destptr;
- *destptr++ = source1 + source2 + carry;
- carry =
- (carry
- ? source1 >= (mp_limb_t) ~source2
- : source1 > (mp_limb_t) ~source2);
- }
- }
- /* Forget about the carry and about r[j+n]. */
- }
- }
- /* q* is determined. Store it as q[j]. */
- q_ptr[j] = q_star;
- if (j == 0)
- break;
- j--;
- }
- }
- r_len = b_len;
- /* Normalise q. */
- if (q_ptr[q_len - 1] == 0)
- q_len--;
-# if 0 /* Not needed here, since we need r only to compare it with b/2, and
- b is shifted left by s bits. */
- /* Shift r right by s bits. */
- if (s > 0)
- {
- mp_limb_t ptr = r_ptr + r_len;
- mp_twolimb_t accu = 0;
- size_t count;
- for (count = r_len; count > 0; count--)
- {
- accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS;
- accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s);
- *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS);
- }
- }
-# endif
- /* Normalise r. */
- while (r_len > 0 && r_ptr[r_len - 1] == 0)
- r_len--;
- }
- /* Compare r << 1 with b. */
- if (r_len > b_len)
- goto increment_q;
- {
- size_t i;
- for (i = b_len;;)
- {
- mp_limb_t r_i =
- (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0)
- | (i < r_len ? r_ptr[i] << 1 : 0);
- mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0);
- if (r_i > b_i)
- goto increment_q;
- if (r_i < b_i)
- goto keep_q;
- if (i == 0)
- break;
- i--;
- }
- }
- if (q_len > 0 && ((q_ptr[0] & 1) != 0))
- /* q is odd. */
- increment_q:
- {
- size_t i;
- for (i = 0; i < q_len; i++)
- if (++(q_ptr[i]) != 0)
- goto keep_q;
- q_ptr[q_len++] = 1;
- }
- keep_q:
- if (tmp_roomptr != NULL)
- free (tmp_roomptr);
- q->limbs = q_ptr;
- q->nlimbs = q_len;
- return roomptr;
-}
-
-/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal
- representation.
- Destroys the contents of a.
- Return the allocated memory - containing the decimal digits in low-to-high
- order, terminated with a NUL character - in case of success, NULL in case
- of memory allocation failure. */
-static char *
-convert_to_decimal (mpn_t a, size_t extra_zeroes)
-{
- mp_limb_t *a_ptr = a.limbs;
- size_t a_len = a.nlimbs;
- /* 0.03345 is slightly larger than log(2)/(9*log(10)). */
- size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1);
- char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes));
- if (c_ptr != NULL)
- {
- char *d_ptr = c_ptr;
- for (; extra_zeroes > 0; extra_zeroes--)
- *d_ptr++ = '0';
- while (a_len > 0)
- {
- /* Divide a by 10^9, in-place. */
- mp_limb_t remainder = 0;
- mp_limb_t *ptr = a_ptr + a_len;
- size_t count;
- for (count = a_len; count > 0; count--)
- {
- mp_twolimb_t num =
- ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr;
- *ptr = num / 1000000000;
- remainder = num % 1000000000;
- }
- /* Store the remainder as 9 decimal digits. */
- for (count = 9; count > 0; count--)
- {
- *d_ptr++ = '0' + (remainder % 10);
- remainder = remainder / 10;
- }
- /* Normalize a. */
- if (a_ptr[a_len - 1] == 0)
- a_len--;
- }
- /* Remove leading zeroes. */
- while (d_ptr > c_ptr && d_ptr[-1] == '0')
- d_ptr--;
- /* But keep at least one zero. */
- if (d_ptr == c_ptr)
- *d_ptr++ = '0';
- /* Terminate the string. */
- *d_ptr = '\0';
- }
- return c_ptr;
-}
-
-/* Assuming x is finite and >= 0:
- write x as x = 2^e * m, where m is a bignum.
- Return the allocated memory in case of success, NULL in case of memory
- allocation failure. */
-static void *
-decode_long_double (long double x, int *ep, mpn_t *mp)
-{
- mpn_t m;
- int exp;
- long double y;
- size_t i;
-
- /* Allocate memory for result. */
- m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS;
- m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t));
- if (m.limbs == NULL)
- return NULL;
- /* Split into exponential part and mantissa. */
- y = frexpl (x, &exp);
- if (!(y >= 0.0L && y < 1.0L))
- abort ();
- /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the
- latter is an integer. */
- /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs.
- I'm not sure whether it's safe to cast a 'long double' value between
- 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
- 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int',
- doesn't matter). */
-# if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0
-# if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2
- {
- mp_limb_t hi, lo;
- y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2));
- hi = (int) y;
- y -= hi;
- if (!(y >= 0.0L && y < 1.0L))
- abort ();
- y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
- lo = (int) y;
- y -= lo;
- if (!(y >= 0.0L && y < 1.0L))
- abort ();
- m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo;
- }
-# else
- {
- mp_limb_t d;
- y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS);
- d = (int) y;
- y -= d;
- if (!(y >= 0.0L && y < 1.0L))
- abort ();
- m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d;
- }
-# endif
-# endif
- for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; )
- {
- mp_limb_t hi, lo;
- y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
- hi = (int) y;
- y -= hi;
- if (!(y >= 0.0L && y < 1.0L))
- abort ();
- y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
- lo = (int) y;
- y -= lo;
- if (!(y >= 0.0L && y < 1.0L))
- abort ();
- m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo;
- }
- if (!(y == 0.0L))
- abort ();
- /* Normalise. */
- while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0)
- m.nlimbs--;
- *mp = m;
- *ep = exp - LDBL_MANT_BIT;
- return m.limbs;
-}
-
-/* Assuming x is finite and >= 0, and n is an integer:
- Returns the decimal representation of round (x * 10^n).
- Return the allocated memory - containing the decimal digits in low-to-high
- order, terminated with a NUL character - in case of success, NULL in case
- of memory allocation failure. */
-static char *
-scale10_round_decimal_long_double (long double x, int n)
-{
- int e;
- mpn_t m;
- void *memory = decode_long_double (x, &e, &m);
- int s;
- size_t extra_zeroes;
- unsigned int abs_n;
- unsigned int abs_s;
- mp_limb_t *pow5_ptr;
- size_t pow5_len;
- unsigned int s_limbs;
- unsigned int s_bits;
- mpn_t pow5;
- mpn_t z;
- void *z_memory;
- char *digits;
-
- if (memory == NULL)
- return NULL;
- /* x = 2^e * m, hence
- y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m)
- = round (2^s * 5^n * m). */
- s = e + n;
- extra_zeroes = 0;
- /* Factor out a common power of 10 if possible. */
- if (s > 0 && n > 0)
- {
- extra_zeroes = (s < n ? s : n);
- s -= extra_zeroes;
- n -= extra_zeroes;
- }
- /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes.
- Before converting to decimal, we need to compute
- z = round (2^s * 5^n * m). */
- /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same
- sign. 2.322 is slightly larger than log(5)/log(2). */
- abs_n = (n >= 0 ? n : -n);
- abs_s = (s >= 0 ? s : -s);
- pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1
- + abs_s / GMP_LIMB_BITS + 1)
- * sizeof (mp_limb_t));
- if (pow5_ptr == NULL)
- {
- free (memory);
- return NULL;
- }
- /* Initialize with 1. */
- pow5_ptr[0] = 1;
- pow5_len = 1;
- /* Multiply with 5^|n|. */
- if (abs_n > 0)
- {
- static mp_limb_t const small_pow5[13 + 1] =
- {
- 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625,
- 48828125, 244140625, 1220703125
- };
- unsigned int n13;
- for (n13 = 0; n13 <= abs_n; n13 += 13)
- {
- mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13];
- size_t j;
- mp_twolimb_t carry = 0;
- for (j = 0; j < pow5_len; j++)
- {
- mp_limb_t digit2 = pow5_ptr[j];
- carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2;
- pow5_ptr[j] = (mp_limb_t) carry;
- carry = carry >> GMP_LIMB_BITS;
- }
- if (carry > 0)
- pow5_ptr[pow5_len++] = (mp_limb_t) carry;
- }
- }
- s_limbs = abs_s / GMP_LIMB_BITS;
- s_bits = abs_s % GMP_LIMB_BITS;
- if (n >= 0 ? s >= 0 : s <= 0)
- {
- /* Multiply with 2^|s|. */
- if (s_bits > 0)
- {
- mp_limb_t *ptr = pow5_ptr;
- mp_twolimb_t accu = 0;
- size_t count;
- for (count = pow5_len; count > 0; count--)
- {
- accu += (mp_twolimb_t) *ptr << s_bits;
- *ptr++ = (mp_limb_t) accu;
- accu = accu >> GMP_LIMB_BITS;
- }
- if (accu > 0)
- {
- *ptr = (mp_limb_t) accu;
- pow5_len++;
- }
- }
- if (s_limbs > 0)
- {
- size_t count;
- for (count = pow5_len; count > 0;)
- {
- count--;
- pow5_ptr[s_limbs + count] = pow5_ptr[count];
- }
- for (count = s_limbs; count > 0;)
- {
- count--;
- pow5_ptr[count] = 0;
- }
- pow5_len += s_limbs;
- }
- pow5.limbs = pow5_ptr;
- pow5.nlimbs = pow5_len;
- if (n >= 0)
- {
- /* Multiply m with pow5. No division needed. */
- z_memory = multiply (m, pow5, &z);
- }
- else
- {
- /* Divide m by pow5 and round. */
- z_memory = divide (m, pow5, &z);
- }
- }
- else
- {
- pow5.limbs = pow5_ptr;
- pow5.nlimbs = pow5_len;
- if (n >= 0)
- {
- /* n >= 0, s < 0.
- Multiply m with pow5, then divide by 2^|s|. */
- mpn_t numerator;
- mpn_t denominator;
- void *tmp_memory;
- tmp_memory = multiply (m, pow5, &numerator);
- if (tmp_memory == NULL)
- {
- free (pow5_ptr);
- free (memory);
- return NULL;
- }
- /* Construct 2^|s|. */
- {
- mp_limb_t *ptr = pow5_ptr + pow5_len;
- size_t i;
- for (i = 0; i < s_limbs; i++)
- ptr[i] = 0;
- ptr[s_limbs] = (mp_limb_t) 1 << s_bits;
- denominator.limbs = ptr;
- denominator.nlimbs = s_limbs + 1;
- }
- z_memory = divide (numerator, denominator, &z);
- free (tmp_memory);
- }
- else
- {
- /* n < 0, s > 0.
- Multiply m with 2^s, then divide by pow5. */
- mpn_t numerator;
- mp_limb_t *num_ptr;
- num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1)
- * sizeof (mp_limb_t));
- if (num_ptr == NULL)
- {
- free (pow5_ptr);
- free (memory);
- return NULL;
- }
- {
- mp_limb_t *destptr = num_ptr;
- {
- size_t i;
- for (i = 0; i < s_limbs; i++)
- *destptr++ = 0;
- }
- if (s_bits > 0)
- {
- const mp_limb_t *sourceptr = m.limbs;
- mp_twolimb_t accu = 0;
- size_t count;
- for (count = m.nlimbs; count > 0; count--)
- {
- accu += (mp_twolimb_t) *sourceptr++ << s;
- *destptr++ = (mp_limb_t) accu;
- accu = accu >> GMP_LIMB_BITS;
- }
- if (accu > 0)
- *destptr++ = (mp_limb_t) accu;
- }
- else
- {
- const mp_limb_t *sourceptr = m.limbs;
- size_t count;
- for (count = m.nlimbs; count > 0; count--)
- *destptr++ = *sourceptr++;
- }
- numerator.limbs = num_ptr;
- numerator.nlimbs = destptr - num_ptr;
- }
- z_memory = divide (numerator, pow5, &z);
- free (num_ptr);
- }
- }
- free (pow5_ptr);
- free (memory);
-
- /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */
-
- if (z_memory == NULL)
- return NULL;
- digits = convert_to_decimal (z, extra_zeroes);
- free (z_memory);
- return digits;
-}
-
-/* Assuming x is finite and > 0:
- Return an approximation for n with 10^n <= x < 10^(n+1).
- The approximation is usually the right n, but may be off by 1 sometimes. */
-static int
-floorlog10l (long double x)
-{
- int exp;
- long double y;
- double z;
- double l;
-
- /* Split into exponential part and mantissa. */
- y = frexpl (x, &exp);
- if (!(y >= 0.0L && y < 1.0L))
- abort ();
- if (y == 0.0L)
- return INT_MIN;
- if (y < 0.5L)
- {
- while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2))))
- {
- y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2));
- exp -= GMP_LIMB_BITS;
- }
- if (y < (1.0L / (1 << 16)))
- {
- y *= 1.0L * (1 << 16);
- exp -= 16;
- }
- if (y < (1.0L / (1 << 8)))
- {
- y *= 1.0L * (1 << 8);
- exp -= 8;
- }
- if (y < (1.0L / (1 << 4)))
- {
- y *= 1.0L * (1 << 4);
- exp -= 4;
- }
- if (y < (1.0L / (1 << 2)))
- {
- y *= 1.0L * (1 << 2);
- exp -= 2;
- }
- if (y < (1.0L / (1 << 1)))
- {
- y *= 1.0L * (1 << 1);
- exp -= 1;
- }
- }
- if (!(y >= 0.5L && y < 1.0L))
- abort ();
- /* Compute an approximation for l = log2(x) = exp + log2(y). */
- l = exp;
- z = y;
- if (z < 0.70710678118654752444)
- {
- z *= 1.4142135623730950488;
- l -= 0.5;
- }
- if (z < 0.8408964152537145431)
- {
- z *= 1.1892071150027210667;
- l -= 0.25;
- }
- if (z < 0.91700404320467123175)
- {
- z *= 1.0905077326652576592;
- l -= 0.125;
- }
- if (z < 0.9576032806985736469)
- {
- z *= 1.0442737824274138403;
- l -= 0.0625;
- }
- /* Now 0.95 <= z <= 1.01. */
- z = 1 - z;
- /* log(1-z) = - z - z^2/2 - z^3/3 - z^4/4 - ...
- Four terms are enough to get an approximation with error < 10^-7. */
- l -= z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25)));
- /* Finally multiply with log(2)/log(10), yields an approximation for
- log10(x). */
- l *= 0.30102999566398119523;
- /* Round down to the next integer. */
- return (int) l + (l < 0 ? -1 : 0);
-}
-
-#endif
-
-CHAR_T *
-VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args)
-{
- DIRECTIVES d;
- arguments a;
-
- if (PRINTF_PARSE (format, &d, &a) < 0)
- {
- errno = EINVAL;
- return NULL;
- }
-
-#define CLEANUP() \
- free (d.dir); \
- if (a.arg) \
- free (a.arg);
-
- if (printf_fetchargs (args, &a) < 0)
- {
- CLEANUP ();
- errno = EINVAL;
- return NULL;
- }
-
- {
- size_t buf_neededlength;
- CHAR_T *buf;
- CHAR_T *buf_malloced;
- const CHAR_T *cp;
- size_t i;
- DIRECTIVE *dp;
- /* Output string accumulator. */
- CHAR_T *result;
- size_t allocated;
- size_t length;
-
- /* Allocate a small buffer that will hold a directive passed to
- sprintf or snprintf. */
- buf_neededlength =
- xsum4 (7, d.max_width_length, d.max_precision_length, 6);
-#if HAVE_ALLOCA
- if (buf_neededlength < 4000 / sizeof (CHAR_T))
- {
- buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T));
- buf_malloced = NULL;
- }
- else
-#endif
- {
- size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T));
- if (size_overflow_p (buf_memsize))
- goto out_of_memory_1;
- buf = (CHAR_T *) malloc (buf_memsize);
- if (buf == NULL)
- goto out_of_memory_1;
- buf_malloced = buf;
- }
-
- if (resultbuf != NULL)
- {
- result = resultbuf;
- allocated = *lengthp;
- }
- else
- {
- result = NULL;
- allocated = 0;
- }
- length = 0;
- /* Invariants:
- result is either == resultbuf or == NULL or malloc-allocated.
- If length > 0, then result != NULL. */
-
- /* Ensures that allocated >= needed. Aborts through a jump to
- out_of_memory if needed is SIZE_MAX or otherwise too big. */
-#define ENSURE_ALLOCATION(needed) \
- if ((needed) > allocated) \
- { \
- size_t memory_size; \
- CHAR_T *memory; \
- \
- allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \
- if ((needed) > allocated) \
- allocated = (needed); \
- memory_size = xtimes (allocated, sizeof (CHAR_T)); \
- if (size_overflow_p (memory_size)) \
- goto out_of_memory; \
- if (result == resultbuf || result == NULL) \
- memory = (CHAR_T *) malloc (memory_size); \
- else \
- memory = (CHAR_T *) realloc (result, memory_size); \
- if (memory == NULL) \
- goto out_of_memory; \
- if (result == resultbuf && length > 0) \
- memcpy (memory, result, length * sizeof (CHAR_T)); \
- result = memory; \
- }
-
- for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
- {
- if (cp != dp->dir_start)
- {
- size_t n = dp->dir_start - cp;
- size_t augmented_length = xsum (length, n);
-
- ENSURE_ALLOCATION (augmented_length);
- memcpy (result + length, cp, n * sizeof (CHAR_T));
- length = augmented_length;
- }
- if (i == d.count)
- break;
-
- /* Execute a single directive. */
- if (dp->conversion == '%')
- {
- size_t augmented_length;
-
- if (!(dp->arg_index == ARG_NONE))
- abort ();
- augmented_length = xsum (length, 1);
- ENSURE_ALLOCATION (augmented_length);
- result[length] = '%';
- length = augmented_length;
- }
- else
- {
- if (!(dp->arg_index != ARG_NONE))
- abort ();
-
- if (dp->conversion == 'n')
- {
- switch (a.arg[dp->arg_index].type)
- {
- case TYPE_COUNT_SCHAR_POINTER:
- *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
- break;
- case TYPE_COUNT_SHORT_POINTER:
- *a.arg[dp->arg_index].a.a_count_short_pointer = length;
- break;
- case TYPE_COUNT_INT_POINTER:
- *a.arg[dp->arg_index].a.a_count_int_pointer = length;
- break;
- case TYPE_COUNT_LONGINT_POINTER:
- *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
- break;
-#if HAVE_LONG_LONG_INT
- case TYPE_COUNT_LONGLONGINT_POINTER:
- *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
- break;
-#endif
- default:
- abort ();
- }
- }
-#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
- else if ((dp->conversion == 'f' || dp->conversion == 'F'
- || dp->conversion == 'e' || dp->conversion == 'E'
- || dp->conversion == 'g' || dp->conversion == 'G')
- && (0
-# if NEED_PRINTF_INFINITE_DOUBLE
- || (a.arg[dp->arg_index].type == TYPE_DOUBLE
- /* The systems (mingw) which produce wrong output
- for Inf, -Inf, and NaN also do so for -0.0.
- Therefore we treat this case here as well. */
- && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double))
-# endif
-# if NEED_PRINTF_LONG_DOUBLE
- || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
-# elif NEED_PRINTF_INFINITE_LONG_DOUBLE
- || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
- /* Some systems produce wrong output for Inf,
- -Inf, and NaN. */
- && is_infinitel (a.arg[dp->arg_index].a.a_longdouble))
-# endif
- ))
- {
-# if NEED_PRINTF_INFINITE_DOUBLE && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE)
- arg_type type = a.arg[dp->arg_index].type;
-# endif
- int flags = dp->flags;
- int has_width;
- size_t width;
- int has_precision;
- size_t precision;
- size_t tmp_length;
- CHAR_T tmpbuf[700];
- CHAR_T *tmp;
- CHAR_T *pad_ptr;
- CHAR_T *p;
-
- has_width = 0;
- width = 0;
- if (dp->width_start != dp->width_end)
- {
- if (dp->width_arg_index != ARG_NONE)
- {
- int arg;
-
- if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
- abort ();
- arg = a.arg[dp->width_arg_index].a.a_int;
- if (arg < 0)
- {
- /* "A negative field width is taken as a '-' flag
- followed by a positive field width." */
- flags |= FLAG_LEFT;
- width = (unsigned int) (-arg);
- }
- else
- width = arg;
- }
- else
- {
- const CHAR_T *digitp = dp->width_start;
-
- do
- width = xsum (xtimes (width, 10), *digitp++ - '0');
- while (digitp != dp->width_end);
- }
- has_width = 1;
- }
-
- has_precision = 0;
- precision = 0;
- if (dp->precision_start != dp->precision_end)
- {
- if (dp->precision_arg_index != ARG_NONE)
- {
- int arg;
-
- if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
- abort ();
- arg = a.arg[dp->precision_arg_index].a.a_int;
- /* "A negative precision is taken as if the precision
- were omitted." */
- if (arg >= 0)
- {
- precision = arg;
- has_precision = 1;
- }
- }
- else
- {
- const CHAR_T *digitp = dp->precision_start + 1;
-
- precision = 0;
- while (digitp != dp->precision_end)
- precision = xsum (xtimes (precision, 10), *digitp++ - '0');
- has_precision = 1;
- }
- }
-
- /* POSIX specifies the default precision to be 6 for %f, %F,
- %e, %E, but not for %g, %G. Implementations appear to use
- the same default precision also for %g, %G. */
- if (!has_precision)
- precision = 6;
-
- /* Allocate a temporary buffer of sufficient size. */
-# if NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE
- tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0);
-# elif NEED_PRINTF_LONG_DOUBLE
- tmp_length = LDBL_DIG + 1;
-# else
- tmp_length = 0;
-# endif
- if (tmp_length < precision)
- tmp_length = precision;
-# if NEED_PRINTF_LONG_DOUBLE
-# if NEED_PRINTF_INFINITE_DOUBLE
- if (type == TYPE_LONGDOUBLE)
-# endif
- if (dp->conversion == 'f' || dp->conversion == 'F')
- {
- long double arg = a.arg[dp->arg_index].a.a_longdouble;
- if (!(isnanl (arg) || arg + arg == arg))
- {
- /* arg is finite and nonzero. */
- int exponent = floorlog10l (arg < 0 ? -arg : arg);
- if (exponent >= 0 && tmp_length < exponent + precision)
- tmp_length = exponent + precision;
- }
- }
-# endif
- /* Account for sign, decimal point etc. */
- tmp_length = xsum (tmp_length, 12);
-
- if (tmp_length < width)
- tmp_length = width;
-
- tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
-
- if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T))
- tmp = tmpbuf;
- else
- {
- size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T));
-
- if (size_overflow_p (tmp_memsize))
- /* Overflow, would lead to out of memory. */
- goto out_of_memory;
- tmp = (CHAR_T *) malloc (tmp_memsize);
- if (tmp == NULL)
- /* Out of memory. */
- goto out_of_memory;
- }
-
- pad_ptr = NULL;
- p = tmp;
-
-# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE
-# if NEED_PRINTF_INFINITE_DOUBLE
- if (type == TYPE_LONGDOUBLE)
-# endif
- {
- long double arg = a.arg[dp->arg_index].a.a_longdouble;
-
- if (isnanl (arg))
- {
- if (dp->conversion >= 'A' && dp->conversion <= 'Z')
- {
- *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
- }
- else
- {
- *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
- }
- }
- else
- {
- int sign = 0;
- DECL_LONG_DOUBLE_ROUNDING
-
- BEGIN_LONG_DOUBLE_ROUNDING ();
-
- if (signbit (arg)) /* arg < 0.0L or negative zero */
- {
- sign = -1;
- arg = -arg;
- }
-
- if (sign < 0)
- *p++ = '-';
- else if (flags & FLAG_SHOWSIGN)
- *p++ = '+';
- else if (flags & FLAG_SPACE)
- *p++ = ' ';
-
- if (arg > 0.0L && arg + arg == arg)
- {
- if (dp->conversion >= 'A' && dp->conversion <= 'Z')
- {
- *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
- }
- else
- {
- *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
- }
- }
- else
- {
-# if NEED_PRINTF_LONG_DOUBLE
- pad_ptr = p;
-
- if (dp->conversion == 'f' || dp->conversion == 'F')
- {
- char *digits;
- size_t ndigits;
-
- digits =
- scale10_round_decimal_long_double (arg, precision);
- if (digits == NULL)
- {
- END_LONG_DOUBLE_ROUNDING ();
- goto out_of_memory;
- }
- ndigits = strlen (digits);
-
- if (ndigits > precision)
- do
- {
- --ndigits;
- *p++ = digits[ndigits];
- }
- while (ndigits > precision);
- else
- *p++ = '0';
- /* Here ndigits <= precision. */
- if ((flags & FLAG_ALT) || precision > 0)
- {
- *p++ = decimal_point_char ();
- for (; precision > ndigits; precision--)
- *p++ = '0';
- while (ndigits > 0)
- {
- --ndigits;
- *p++ = digits[ndigits];
- }
- }
-
- free (digits);
- }
- else if (dp->conversion == 'e' || dp->conversion == 'E')
- {
- int exponent;
-
- if (arg == 0.0L)
- {
- exponent = 0;
- *p++ = '0';
- if ((flags & FLAG_ALT) || precision > 0)
- {
- *p++ = decimal_point_char ();
- for (; precision > 0; precision--)
- *p++ = '0';
- }
- }
- else
- {
- /* arg > 0.0L. */
- int adjusted;
- char *digits;
- size_t ndigits;
-
- exponent = floorlog10l (arg);
- adjusted = 0;
- for (;;)
- {
- digits =
- scale10_round_decimal_long_double (arg,
- (int)precision - exponent);
- if (digits == NULL)
- {
- END_LONG_DOUBLE_ROUNDING ();
- goto out_of_memory;
- }
- ndigits = strlen (digits);
-
- if (ndigits == precision + 1)
- break;
- if (ndigits < precision
- || ndigits > precision + 2)
- /* The exponent was not guessed
- precisely enough. */
- abort ();
- if (adjusted)
- /* None of two values of exponent is
- the right one. Prevent an endless
- loop. */
- abort ();
- free (digits);
- if (ndigits == precision)
- exponent -= 1;
- else
- exponent += 1;
- adjusted = 1;
- }
-
- /* Here ndigits = precision+1. */
- *p++ = digits[--ndigits];
- if ((flags & FLAG_ALT) || precision > 0)
- {
- *p++ = decimal_point_char ();
- while (ndigits > 0)
- {
- --ndigits;
- *p++ = digits[ndigits];
- }
- }
-
- free (digits);
- }
-
- *p++ = dp->conversion; /* 'e' or 'E' */
-# if WIDE_CHAR_VERSION
- {
- static const wchar_t decimal_format[] =
- { '%', '+', '.', '2', 'd', '\0' };
- SNPRINTF (p, 6 + 1, decimal_format, exponent);
- }
-# else
- sprintf (p, "%+.2d", exponent);
-# endif
- while (*p != '\0')
- p++;
- }
- else if (dp->conversion == 'g' || dp->conversion == 'G')
- {
- if (precision == 0)
- precision = 1;
- /* precision >= 1. */
-
- if (arg == 0.0L)
- /* The exponent is 0, >= -4, < precision.
- Use fixed-point notation. */
- {
- size_t ndigits = precision;
- /* Number of trailing zeroes that have to be
- dropped. */
- size_t nzeroes =
- (flags & FLAG_ALT ? 0 : precision - 1);
-
- --ndigits;
- *p++ = '0';
- if ((flags & FLAG_ALT) || ndigits > nzeroes)
- {
- *p++ = decimal_point_char ();
- while (ndigits > nzeroes)
- {
- --ndigits;
- *p++ = '0';
- }
- }
- }
- else
- {
- /* arg > 0.0L. */
- int exponent;
- int adjusted;
- char *digits;
- size_t ndigits;
- size_t nzeroes;
-
- exponent = floorlog10l (arg);
- adjusted = 0;
- for (;;)
- {
- digits =
- scale10_round_decimal_long_double (arg,
- (int)(precision - 1) - exponent);
- if (digits == NULL)
- {
- END_LONG_DOUBLE_ROUNDING ();
- goto out_of_memory;
- }
- ndigits = strlen (digits);
-
- if (ndigits == precision)
- break;
- if (ndigits < precision - 1
- || ndigits > precision + 1)
- /* The exponent was not guessed
- precisely enough. */
- abort ();
- if (adjusted)
- /* None of two values of exponent is
- the right one. Prevent an endless
- loop. */
- abort ();
- free (digits);
- if (ndigits < precision)
- exponent -= 1;
- else
- exponent += 1;
- adjusted = 1;
- }
- /* Here ndigits = precision. */
-
- /* Determine the number of trailing zeroes
- that have to be dropped. */
- nzeroes = 0;
- if ((flags & FLAG_ALT) == 0)
- while (nzeroes < ndigits
- && digits[nzeroes] == '0')
- nzeroes++;
-
- /* The exponent is now determined. */
- if (exponent >= -4
- && exponent < (long)precision)
- {
- /* Fixed-point notation:
- max(exponent,0)+1 digits, then the
- decimal point, then the remaining
- digits without trailing zeroes. */
- if (exponent >= 0)
- {
- size_t count = exponent + 1;
- /* Note: count <= precision = ndigits. */
- for (; count > 0; count--)
- *p++ = digits[--ndigits];
- if ((flags & FLAG_ALT) || ndigits > nzeroes)
- {
- *p++ = decimal_point_char ();
- while (ndigits > nzeroes)
- {
- --ndigits;
- *p++ = digits[ndigits];
- }
- }
- }
- else
- {
- size_t count = -exponent - 1;
- *p++ = '0';
- *p++ = decimal_point_char ();
- for (; count > 0; count--)
- *p++ = '0';
- while (ndigits > nzeroes)
- {
- --ndigits;
- *p++ = digits[ndigits];
- }
- }
- }
- else
- {
- /* Exponential notation. */
- *p++ = digits[--ndigits];
- if ((flags & FLAG_ALT) || ndigits > nzeroes)
- {
- *p++ = decimal_point_char ();
- while (ndigits > nzeroes)
- {
- --ndigits;
- *p++ = digits[ndigits];
- }
- }
- *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
-# if WIDE_CHAR_VERSION
- {
- static const wchar_t decimal_format[] =
- { '%', '+', '.', '2', 'd', '\0' };
- SNPRINTF (p, 6 + 1, decimal_format, exponent);
- }
-# else
- sprintf (p, "%+.2d", exponent);
-# endif
- while (*p != '\0')
- p++;
- }
-
- free (digits);
- }
- }
- else
- abort ();
-# else
- /* arg is finite. */
- abort ();
-# endif
- }
-
- END_LONG_DOUBLE_ROUNDING ();
- }
- }
-# if NEED_PRINTF_INFINITE_DOUBLE
- else
-# endif
-# endif
-# if NEED_PRINTF_INFINITE_DOUBLE
- {
- /* Simpler than above: handle only NaN, Infinity, zero. */
- double arg = a.arg[dp->arg_index].a.a_double;
-
- if (isnan (arg))
- {
- if (dp->conversion >= 'A' && dp->conversion <= 'Z')
- {
- *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
- }
- else
- {
- *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
- }
- }
- else
- {
- int sign = 0;
-
- if (signbit (arg)) /* arg < 0.0L or negative zero */
- {
- sign = -1;
- arg = -arg;
- }
-
- if (sign < 0)
- *p++ = '-';
- else if (flags & FLAG_SHOWSIGN)
- *p++ = '+';
- else if (flags & FLAG_SPACE)
- *p++ = ' ';
-
- if (arg > 0.0 && arg + arg == arg)
- {
- if (dp->conversion >= 'A' && dp->conversion <= 'Z')
- {
- *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
- }
- else
- {
- *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
- }
- }
- else
- {
- if (!(arg == 0.0))
- abort ();
-
- pad_ptr = p;
-
- if (dp->conversion == 'f' || dp->conversion == 'F')
- {
- *p++ = '0';
- if ((flags & FLAG_ALT) || precision > 0)
- {
- *p++ = decimal_point_char ();
- for (; precision > 0; precision--)
- *p++ = '0';
- }
- }
- else if (dp->conversion == 'e' || dp->conversion == 'E')
- {
- *p++ = '0';
- if ((flags & FLAG_ALT) || precision > 0)
- {
- *p++ = decimal_point_char ();
- for (; precision > 0; precision--)
- *p++ = '0';
- }
- *p++ = dp->conversion; /* 'e' or 'E' */
- *p++ = '+';
- /* Produce the same number of exponent digits as
- the native printf implementation. */
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- *p++ = '0';
-# endif
- *p++ = '0';
- *p++ = '0';
- }
- else if (dp->conversion == 'g' || dp->conversion == 'G')
- {
- *p++ = '0';
- if (flags & FLAG_ALT)
- {
- size_t ndigits =
- (precision > 0 ? precision - 1 : 0);
- *p++ = decimal_point_char ();
- for (; ndigits > 0; --ndigits)
- *p++ = '0';
- }
- }
- else
- abort ();
- }
- }
- }
-# endif
-
- /* The generated string now extends from tmp to p, with the
- zero padding insertion point being at pad_ptr. */
- if (has_width && p - tmp < width)
- {
- size_t pad = width - (p - tmp);
- CHAR_T *end = p + pad;
-
- if (flags & FLAG_LEFT)
- {
- /* Pad with spaces on the right. */
- for (; pad > 0; pad--)
- *p++ = ' ';
- }
- else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
- {
- /* Pad with zeroes. */
- CHAR_T *q = end;
-
- while (p > pad_ptr)
- *--q = *--p;
- for (; pad > 0; pad--)
- *p++ = '0';
- }
- else
- {
- /* Pad with spaces on the left. */
- CHAR_T *q = end;
-
- while (p > tmp)
- *--q = *--p;
- for (; pad > 0; pad--)
- *p++ = ' ';
- }
-
- p = end;
- }
-
- {
- size_t count = p - tmp;
-
- if (count >= tmp_length)
- /* tmp_length was incorrectly calculated - fix the
- code above! */
- abort ();
-
- /* Make room for the result. */
- if (count >= allocated - length)
- {
- size_t n = xsum (length, count);
-
- ENSURE_ALLOCATION (n);
- }
-
- /* Append the result. */
- memcpy (result + length, tmp, count * sizeof (CHAR_T));
- if (tmp != tmpbuf)
- free (tmp);
- length += count;
- }
- }
-#endif
-#if NEED_PRINTF_DIRECTIVE_A && !defined IN_LIBINTL
- else if (dp->conversion == 'a' || dp->conversion == 'A')
- {
- arg_type type = a.arg[dp->arg_index].type;
- int flags = dp->flags;
- int has_width;
- size_t width;
- int has_precision;
- size_t precision;
- size_t tmp_length;
- CHAR_T tmpbuf[700];
- CHAR_T *tmp;
- CHAR_T *pad_ptr;
- CHAR_T *p;
-
- has_width = 0;
- width = 0;
- if (dp->width_start != dp->width_end)
- {
- if (dp->width_arg_index != ARG_NONE)
- {
- int arg;
-
- if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
- abort ();
- arg = a.arg[dp->width_arg_index].a.a_int;
- if (arg < 0)
- {
- /* "A negative field width is taken as a '-' flag
- followed by a positive field width." */
- flags |= FLAG_LEFT;
- width = (unsigned int) (-arg);
- }
- else
- width = arg;
- }
- else
- {
- const CHAR_T *digitp = dp->width_start;
-
- do
- width = xsum (xtimes (width, 10), *digitp++ - '0');
- while (digitp != dp->width_end);
- }
- has_width = 1;
- }
-
- has_precision = 0;
- precision = 0;
- if (dp->precision_start != dp->precision_end)
- {
- if (dp->precision_arg_index != ARG_NONE)
- {
- int arg;
-
- if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
- abort ();
- arg = a.arg[dp->precision_arg_index].a.a_int;
- /* "A negative precision is taken as if the precision
- were omitted." */
- if (arg >= 0)
- {
- precision = arg;
- has_precision = 1;
- }
- }
- else
- {
- const CHAR_T *digitp = dp->precision_start + 1;
-
- precision = 0;
- while (digitp != dp->precision_end)
- precision = xsum (xtimes (precision, 10), *digitp++ - '0');
- has_precision = 1;
- }
- }
-
- /* Allocate a temporary buffer of sufficient size. */
- if (type == TYPE_LONGDOUBLE)
- tmp_length =
- (unsigned int) ((LDBL_DIG + 1)
- * 0.831 /* decimal -> hexadecimal */
- )
- + 1; /* turn floor into ceil */
- else
- tmp_length =
- (unsigned int) ((DBL_DIG + 1)
- * 0.831 /* decimal -> hexadecimal */
- )
- + 1; /* turn floor into ceil */
- if (tmp_length < precision)
- tmp_length = precision;
- /* Account for sign, decimal point etc. */
- tmp_length = xsum (tmp_length, 12);
-
- if (tmp_length < width)
- tmp_length = width;
-
- tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
-
- if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T))
- tmp = tmpbuf;
- else
- {
- size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T));
-
- if (size_overflow_p (tmp_memsize))
- /* Overflow, would lead to out of memory. */
- goto out_of_memory;
- tmp = (CHAR_T *) malloc (tmp_memsize);
- if (tmp == NULL)
- /* Out of memory. */
- goto out_of_memory;
- }
-
- pad_ptr = NULL;
- p = tmp;
- if (type == TYPE_LONGDOUBLE)
- {
- long double arg = a.arg[dp->arg_index].a.a_longdouble;
-
- if (isnanl (arg))
- {
- if (dp->conversion == 'A')
- {
- *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
- }
- else
- {
- *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
- }
- }
- else
- {
- int sign = 0;
- DECL_LONG_DOUBLE_ROUNDING
-
- BEGIN_LONG_DOUBLE_ROUNDING ();
-
- if (signbit (arg)) /* arg < 0.0L or negative zero */
- {
- sign = -1;
- arg = -arg;
- }
-
- if (sign < 0)
- *p++ = '-';
- else if (flags & FLAG_SHOWSIGN)
- *p++ = '+';
- else if (flags & FLAG_SPACE)
- *p++ = ' ';
-
- if (arg > 0.0L && arg + arg == arg)
- {
- if (dp->conversion == 'A')
- {
- *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
- }
- else
- {
- *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
- }
- }
- else
- {
- int exponent;
- long double mantissa;
-
- if (arg > 0.0L)
- mantissa = printf_frexpl (arg, &exponent);
- else
- {
- exponent = 0;
- mantissa = 0.0L;
- }
-
- if (has_precision
- && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1)
- {
- /* Round the mantissa. */
- long double tail = mantissa;
- size_t q;
-
- for (q = precision; ; q--)
- {
- int digit = (int) tail;
- tail -= digit;
- if (q == 0)
- {
- if (digit & 1 ? tail >= 0.5L : tail > 0.5L)
- tail = 1 - tail;
- else
- tail = - tail;
- break;
- }
- tail *= 16.0L;
- }
- if (tail != 0.0L)
- for (q = precision; q > 0; q--)
- tail *= 0.0625L;
- mantissa += tail;
- }
-
- *p++ = '0';
- *p++ = dp->conversion - 'A' + 'X';
- pad_ptr = p;
- {
- int digit;
-
- digit = (int) mantissa;
- mantissa -= digit;
- *p++ = '0' + digit;
- if ((flags & FLAG_ALT)
- || mantissa > 0.0L || precision > 0)
- {
- *p++ = decimal_point_char ();
- /* This loop terminates because we assume
- that FLT_RADIX is a power of 2. */
- while (mantissa > 0.0L)
- {
- mantissa *= 16.0L;
- digit = (int) mantissa;
- mantissa -= digit;
- *p++ = digit
- + (digit < 10
- ? '0'
- : dp->conversion - 10);
- if (precision > 0)
- precision--;
- }
- while (precision > 0)
- {
- *p++ = '0';
- precision--;
- }
- }
- }
- *p++ = dp->conversion - 'A' + 'P';
-# if WIDE_CHAR_VERSION
- {
- static const wchar_t decimal_format[] =
- { '%', '+', 'd', '\0' };
- SNPRINTF (p, 6 + 1, decimal_format, exponent);
- }
-# else
- sprintf (p, "%+d", exponent);
-# endif
- while (*p != '\0')
- p++;
- }
-
- END_LONG_DOUBLE_ROUNDING ();
- }
- }
- else
- {
- double arg = a.arg[dp->arg_index].a.a_double;
-
- if (isnan (arg))
- {
- if (dp->conversion == 'A')
- {
- *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
- }
- else
- {
- *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
- }
- }
- else
- {
- int sign = 0;
-
- if (signbit (arg)) /* arg < 0.0 or negative zero */
- {
- sign = -1;
- arg = -arg;
- }
-
- if (sign < 0)
- *p++ = '-';
- else if (flags & FLAG_SHOWSIGN)
- *p++ = '+';
- else if (flags & FLAG_SPACE)
- *p++ = ' ';
-
- if (arg > 0.0 && arg + arg == arg)
- {
- if (dp->conversion == 'A')
- {
- *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
- }
- else
- {
- *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
- }
- }
- else
- {
- int exponent;
- double mantissa;
-
- if (arg > 0.0)
- mantissa = printf_frexp (arg, &exponent);
- else
- {
- exponent = 0;
- mantissa = 0.0;
- }
-
- if (has_precision
- && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1)
- {
- /* Round the mantissa. */
- double tail = mantissa;
- size_t q;
-
- for (q = precision; ; q--)
- {
- int digit = (int) tail;
- tail -= digit;
- if (q == 0)
- {
- if (digit & 1 ? tail >= 0.5 : tail > 0.5)
- tail = 1 - tail;
- else
- tail = - tail;
- break;
- }
- tail *= 16.0;
- }
- if (tail != 0.0)
- for (q = precision; q > 0; q--)
- tail *= 0.0625;
- mantissa += tail;
- }
-
- *p++ = '0';
- *p++ = dp->conversion - 'A' + 'X';
- pad_ptr = p;
- {
- int digit;
-
- digit = (int) mantissa;
- mantissa -= digit;
- *p++ = '0' + digit;
- if ((flags & FLAG_ALT)
- || mantissa > 0.0 || precision > 0)
- {
- *p++ = decimal_point_char ();
- /* This loop terminates because we assume
- that FLT_RADIX is a power of 2. */
- while (mantissa > 0.0)
- {
- mantissa *= 16.0;
- digit = (int) mantissa;
- mantissa -= digit;
- *p++ = digit
- + (digit < 10
- ? '0'
- : dp->conversion - 10);
- if (precision > 0)
- precision--;
- }
- while (precision > 0)
- {
- *p++ = '0';
- precision--;
- }
- }
- }
- *p++ = dp->conversion - 'A' + 'P';
-# if WIDE_CHAR_VERSION
- {
- static const wchar_t decimal_format[] =
- { '%', '+', 'd', '\0' };
- SNPRINTF (p, 6 + 1, decimal_format, exponent);
- }
-# else
- sprintf (p, "%+d", exponent);
-# endif
- while (*p != '\0')
- p++;
- }
- }
- }
- /* The generated string now extends from tmp to p, with the
- zero padding insertion point being at pad_ptr. */
- if (has_width && p - tmp < width)
- {
- size_t pad = width - (p - tmp);
- CHAR_T *end = p + pad;
-
- if (flags & FLAG_LEFT)
- {
- /* Pad with spaces on the right. */
- for (; pad > 0; pad--)
- *p++ = ' ';
- }
- else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
- {
- /* Pad with zeroes. */
- CHAR_T *q = end;
-
- while (p > pad_ptr)
- *--q = *--p;
- for (; pad > 0; pad--)
- *p++ = '0';
- }
- else
- {
- /* Pad with spaces on the left. */
- CHAR_T *q = end;
-
- while (p > tmp)
- *--q = *--p;
- for (; pad > 0; pad--)
- *p++ = ' ';
- }
-
- p = end;
- }
-
- {
- size_t count = p - tmp;
-
- if (count >= tmp_length)
- /* tmp_length was incorrectly calculated - fix the
- code above! */
- abort ();
-
- /* Make room for the result. */
- if (count >= allocated - length)
- {
- size_t n = xsum (length, count);
-
- ENSURE_ALLOCATION (n);
- }
-
- /* Append the result. */
- memcpy (result + length, tmp, count * sizeof (CHAR_T));
- if (tmp != tmpbuf)
- free (tmp);
- length += count;
- }
- }
-#endif
- else
- {
- arg_type type = a.arg[dp->arg_index].type;
- int flags = dp->flags;
-#if !USE_SNPRINTF || NEED_PRINTF_FLAG_ZERO
- int has_width;
- size_t width;
-#endif
-#if NEED_PRINTF_FLAG_ZERO
- int pad_ourselves;
-#else
-# define pad_ourselves 0
-#endif
- CHAR_T *fbp;
- unsigned int prefix_count;
- int prefixes[2];
-#if !USE_SNPRINTF
- size_t tmp_length;
- CHAR_T tmpbuf[700];
- CHAR_T *tmp;
-#endif
-
-#if !USE_SNPRINTF || NEED_PRINTF_FLAG_ZERO
- has_width = 0;
- width = 0;
- if (dp->width_start != dp->width_end)
- {
- if (dp->width_arg_index != ARG_NONE)
- {
- int arg;
-
- if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
- abort ();
- arg = a.arg[dp->width_arg_index].a.a_int;
- if (arg < 0)
- {
- /* "A negative field width is taken as a '-' flag
- followed by a positive field width." */
- flags |= FLAG_LEFT;
- width = (unsigned int) (-arg);
- }
- else
- width = arg;
- }
- else
- {
- const CHAR_T *digitp = dp->width_start;
-
- do
- width = xsum (xtimes (width, 10), *digitp++ - '0');
- while (digitp != dp->width_end);
- }
- has_width = 1;
- }
-#endif
-
-#if !USE_SNPRINTF
- /* Allocate a temporary buffer of sufficient size for calling
- sprintf. */
- {
- size_t precision;
-
- precision = 6;
- if (dp->precision_start != dp->precision_end)
- {
- if (dp->precision_arg_index != ARG_NONE)
- {
- int arg;
-
- if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
- abort ();
- arg = a.arg[dp->precision_arg_index].a.a_int;
- precision = (arg < 0 ? 0 : arg);
- }
- else
- {
- const CHAR_T *digitp = dp->precision_start + 1;
-
- precision = 0;
- while (digitp != dp->precision_end)
- precision = xsum (xtimes (precision, 10), *digitp++ - '0');
- }
- }
-
- switch (dp->conversion)
- {
-
- case 'd': case 'i': case 'u':
-# if HAVE_LONG_LONG_INT
- if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
- * 0.30103 /* binary -> decimal */
- )
- + 1; /* turn floor into ceil */
- else
-# endif
- if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long) * CHAR_BIT
- * 0.30103 /* binary -> decimal */
- )
- + 1; /* turn floor into ceil */
- else
- tmp_length =
- (unsigned int) (sizeof (unsigned int) * CHAR_BIT
- * 0.30103 /* binary -> decimal */
- )
- + 1; /* turn floor into ceil */
- if (tmp_length < precision)
- tmp_length = precision;
- /* Multiply by 2, as an estimate for FLAG_GROUP. */
- tmp_length = xsum (tmp_length, tmp_length);
- /* Add 1, to account for a leading sign. */
- tmp_length = xsum (tmp_length, 1);
- break;
-
- case 'o':
-# if HAVE_LONG_LONG_INT
- if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
- * 0.333334 /* binary -> octal */
- )
- + 1; /* turn floor into ceil */
- else
-# endif
- if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long) * CHAR_BIT
- * 0.333334 /* binary -> octal */
- )
- + 1; /* turn floor into ceil */
- else
- tmp_length =
- (unsigned int) (sizeof (unsigned int) * CHAR_BIT
- * 0.333334 /* binary -> octal */
- )
- + 1; /* turn floor into ceil */
- if (tmp_length < precision)
- tmp_length = precision;
- /* Add 1, to account for a leading sign. */
- tmp_length = xsum (tmp_length, 1);
- break;
-
- case 'x': case 'X':
-# if HAVE_LONG_LONG_INT
- if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
- * 0.25 /* binary -> hexadecimal */
- )
- + 1; /* turn floor into ceil */
- else
-# endif
- if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long) * CHAR_BIT
- * 0.25 /* binary -> hexadecimal */
- )
- + 1; /* turn floor into ceil */
- else
- tmp_length =
- (unsigned int) (sizeof (unsigned int) * CHAR_BIT
- * 0.25 /* binary -> hexadecimal */
- )
- + 1; /* turn floor into ceil */
- if (tmp_length < precision)
- tmp_length = precision;
- /* Add 2, to account for a leading sign or alternate form. */
- tmp_length = xsum (tmp_length, 2);
- break;
-
- case 'f': case 'F':
- if (type == TYPE_LONGDOUBLE)
- tmp_length =
- (unsigned int) (LDBL_MAX_EXP
- * 0.30103 /* binary -> decimal */
- * 2 /* estimate for FLAG_GROUP */
- )
- + 1 /* turn floor into ceil */
- + 10; /* sign, decimal point etc. */
- else
- tmp_length =
- (unsigned int) (DBL_MAX_EXP
- * 0.30103 /* binary -> decimal */
- * 2 /* estimate for FLAG_GROUP */
- )
- + 1 /* turn floor into ceil */
- + 10; /* sign, decimal point etc. */
- tmp_length = xsum (tmp_length, precision);
- break;
-
- case 'e': case 'E': case 'g': case 'G':
- tmp_length =
- 12; /* sign, decimal point, exponent etc. */
- tmp_length = xsum (tmp_length, precision);
- break;
-
- case 'a': case 'A':
- if (type == TYPE_LONGDOUBLE)
- tmp_length =
- (unsigned int) (LDBL_DIG
- * 0.831 /* decimal -> hexadecimal */
- )
- + 1; /* turn floor into ceil */
- else
- tmp_length =
- (unsigned int) (DBL_DIG
- * 0.831 /* decimal -> hexadecimal */
- )
- + 1; /* turn floor into ceil */
- if (tmp_length < precision)
- tmp_length = precision;
- /* Account for sign, decimal point etc. */
- tmp_length = xsum (tmp_length, 12);
- break;
-
- case 'c':
-# if HAVE_WINT_T && !WIDE_CHAR_VERSION
- if (type == TYPE_WIDE_CHAR)
- tmp_length = MB_CUR_MAX;
- else
-# endif
- tmp_length = 1;
- break;
-
- case 's':
-# if HAVE_WCHAR_T
- if (type == TYPE_WIDE_STRING)
- {
- tmp_length =
- local_wcslen (a.arg[dp->arg_index].a.a_wide_string);
-
-# if !WIDE_CHAR_VERSION
- tmp_length = xtimes (tmp_length, MB_CUR_MAX);
-# endif
- }
- else
-# endif
- tmp_length = strlen (a.arg[dp->arg_index].a.a_string);
- break;
-
- case 'p':
- tmp_length =
- (unsigned int) (sizeof (void *) * CHAR_BIT
- * 0.25 /* binary -> hexadecimal */
- )
- + 1 /* turn floor into ceil */
- + 2; /* account for leading 0x */
- break;
-
- default:
- abort ();
- }
-
- if (tmp_length < width)
- tmp_length = width;
-
- tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
- }
-
- if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T))
- tmp = tmpbuf;
- else
- {
- size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T));
-
- if (size_overflow_p (tmp_memsize))
- /* Overflow, would lead to out of memory. */
- goto out_of_memory;
- tmp = (CHAR_T *) malloc (tmp_memsize);
- if (tmp == NULL)
- /* Out of memory. */
- goto out_of_memory;
- }
-#endif
-
- /* Decide whether to perform the padding ourselves. */
-#if NEED_PRINTF_FLAG_ZERO
- switch (dp->conversion)
- {
- case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
- case 'a': case 'A':
- pad_ourselves = 1;
- break;
- default:
- pad_ourselves = 0;
- break;
- }
-#endif
-
- /* Construct the format string for calling snprintf or
- sprintf. */
- fbp = buf;
- *fbp++ = '%';
-#if NEED_PRINTF_FLAG_GROUPING
- /* The underlying implementation doesn't support the ' flag.
- Produce no grouping characters in this case; this is
- acceptable because the grouping is locale dependent. */
-#else
- if (flags & FLAG_GROUP)
- *fbp++ = '\'';
-#endif
- if (flags & FLAG_LEFT)
- *fbp++ = '-';
- if (flags & FLAG_SHOWSIGN)
- *fbp++ = '+';
- if (flags & FLAG_SPACE)
- *fbp++ = ' ';
- if (flags & FLAG_ALT)
- *fbp++ = '#';
- if (!pad_ourselves)
- {
- if (flags & FLAG_ZERO)
- *fbp++ = '0';
- if (dp->width_start != dp->width_end)
- {
- size_t n = dp->width_end - dp->width_start;
- memcpy (fbp, dp->width_start, n * sizeof (CHAR_T));
- fbp += n;
- }
- }
- if (dp->precision_start != dp->precision_end)
- {
- size_t n = dp->precision_end - dp->precision_start;
- memcpy (fbp, dp->precision_start, n * sizeof (CHAR_T));
- fbp += n;
- }
-
- switch (type)
- {
-#if HAVE_LONG_LONG_INT
- case TYPE_LONGLONGINT:
- case TYPE_ULONGLONGINT:
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- *fbp++ = 'I';
- *fbp++ = '6';
- *fbp++ = '4';
- break;
-# else
- *fbp++ = 'l';
- /*FALLTHROUGH*/
-# endif
-#endif
- case TYPE_LONGINT:
- case TYPE_ULONGINT:
-#if HAVE_WINT_T
- case TYPE_WIDE_CHAR:
-#endif
-#if HAVE_WCHAR_T
- case TYPE_WIDE_STRING:
-#endif
- *fbp++ = 'l';
- break;
- case TYPE_LONGDOUBLE:
- *fbp++ = 'L';
- break;
- default:
- break;
- }
-#if NEED_PRINTF_DIRECTIVE_F
- if (dp->conversion == 'F')
- *fbp = 'f';
- else
-#endif
- *fbp = dp->conversion;
-#if USE_SNPRINTF
- fbp[1] = '%';
- fbp[2] = 'n';
- fbp[3] = '\0';
-#else
- fbp[1] = '\0';
-#endif
-
- /* Construct the arguments for calling snprintf or sprintf. */
- prefix_count = 0;
- if (!pad_ourselves && dp->width_arg_index != ARG_NONE)
- {
- if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
- abort ();
- prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
- }
- if (dp->precision_arg_index != ARG_NONE)
- {
- if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
- abort ();
- prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
- }
-
-#if USE_SNPRINTF
- /* Prepare checking whether snprintf returns the count
- via %n. */
- ENSURE_ALLOCATION (xsum (length, 1));
- result[length] = '\0';
-#endif
-
- for (;;)
- {
- size_t maxlen;
- int count;
- int retcount;
-
- maxlen = allocated - length;
- count = -1;
- retcount = 0;
-
-#if USE_SNPRINTF
- /* SNPRINTF can fail if maxlen > INT_MAX. */
- if (maxlen > INT_MAX)
- goto overflow;
-# define SNPRINTF_BUF(arg) \
- switch (prefix_count) \
- { \
- case 0: \
- retcount = SNPRINTF (result + length, maxlen, buf, \
- arg, &count); \
- break; \
- case 1: \
- retcount = SNPRINTF (result + length, maxlen, buf, \
- prefixes[0], arg, &count); \
- break; \
- case 2: \
- retcount = SNPRINTF (result + length, maxlen, buf, \
- prefixes[0], prefixes[1], arg, \
- &count); \
- break; \
- default: \
- abort (); \
- }
-#else
-# define SNPRINTF_BUF(arg) \
- switch (prefix_count) \
- { \
- case 0: \
- count = sprintf (tmp, buf, arg); \
- break; \
- case 1: \
- count = sprintf (tmp, buf, prefixes[0], arg); \
- break; \
- case 2: \
- count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
- arg); \
- break; \
- default: \
- abort (); \
- }
-#endif
-
- switch (type)
- {
- case TYPE_SCHAR:
- {
- int arg = a.arg[dp->arg_index].a.a_schar;
- SNPRINTF_BUF (arg);
- }
- break;
- case TYPE_UCHAR:
- {
- unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
- SNPRINTF_BUF (arg);
- }
- break;
- case TYPE_SHORT:
- {
- int arg = a.arg[dp->arg_index].a.a_short;
- SNPRINTF_BUF (arg);
- }
- break;
- case TYPE_USHORT:
- {
- unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
- SNPRINTF_BUF (arg);
- }
- break;
- case TYPE_INT:
- {
- int arg = a.arg[dp->arg_index].a.a_int;
- SNPRINTF_BUF (arg);
- }
- break;
- case TYPE_UINT:
- {
- unsigned int arg = a.arg[dp->arg_index].a.a_uint;
- SNPRINTF_BUF (arg);
- }
- break;
- case TYPE_LONGINT:
- {
- long int arg = a.arg[dp->arg_index].a.a_longint;
- SNPRINTF_BUF (arg);
- }
- break;
- case TYPE_ULONGINT:
- {
- unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
- SNPRINTF_BUF (arg);
- }
- break;
-#if HAVE_LONG_LONG_INT
- case TYPE_LONGLONGINT:
- {
- long long int arg = a.arg[dp->arg_index].a.a_longlongint;
- SNPRINTF_BUF (arg);
- }
- break;
- case TYPE_ULONGLONGINT:
- {
- unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
- SNPRINTF_BUF (arg);
- }
- break;
-#endif
- case TYPE_DOUBLE:
- {
- double arg = a.arg[dp->arg_index].a.a_double;
- SNPRINTF_BUF (arg);
- }
- break;
- case TYPE_LONGDOUBLE:
- {
- long double arg = a.arg[dp->arg_index].a.a_longdouble;
- SNPRINTF_BUF (arg);
- }
- break;
- case TYPE_CHAR:
- {
- int arg = a.arg[dp->arg_index].a.a_char;
- SNPRINTF_BUF (arg);
- }
- break;
-#if HAVE_WINT_T
- case TYPE_WIDE_CHAR:
- {
- wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
- SNPRINTF_BUF (arg);
- }
- break;
-#endif
- case TYPE_STRING:
- {
- const char *arg = a.arg[dp->arg_index].a.a_string;
- SNPRINTF_BUF (arg);
- }
- break;
-#if HAVE_WCHAR_T
- case TYPE_WIDE_STRING:
- {
- const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
- SNPRINTF_BUF (arg);
- }
- break;
-#endif
- case TYPE_POINTER:
- {
- void *arg = a.arg[dp->arg_index].a.a_pointer;
- SNPRINTF_BUF (arg);
- }
- break;
- default:
- abort ();
- }
-
-#if USE_SNPRINTF
- /* Portability: Not all implementations of snprintf()
- are ISO C 99 compliant. Determine the number of
- bytes that snprintf() has produced or would have
- produced. */
- if (count >= 0)
- {
- /* Verify that snprintf() has NUL-terminated its
- result. */
- if (count < maxlen && result[length + count] != '\0')
- abort ();
- /* Portability hack. */
- if (retcount > count)
- count = retcount;
- }
- else
- {
- /* snprintf() doesn't understand the '%n'
- directive. */
- if (fbp[1] != '\0')
- {
- /* Don't use the '%n' directive; instead, look
- at the snprintf() return value. */
- fbp[1] = '\0';
- continue;
- }
- else
- {
- /* Look at the snprintf() return value. */
- if (retcount < 0)
- {
- /* HP-UX 10.20 snprintf() is doubly deficient:
- It doesn't understand the '%n' directive,
- *and* it returns -1 (rather than the length
- that would have been required) when the
- buffer is too small. */
- size_t bigger_need =
- xsum (xtimes (allocated, 2), 12);
- ENSURE_ALLOCATION (bigger_need);
- continue;
- }
- else
- count = retcount;
- }
- }
-#endif
-
- /* Attempt to handle failure. */
- if (count < 0)
- {
- if (!(result == resultbuf || result == NULL))
- free (result);
- if (buf_malloced != NULL)
- free (buf_malloced);
- CLEANUP ();
- errno = EINVAL;
- return NULL;
- }
-
- /* Make room for the result. */
- if (count >= maxlen)
- {
- /* Need at least count bytes. But allocate
- proportionally, to avoid looping eternally if
- snprintf() reports a too small count. */
- size_t n =
- xmax (xsum (length, count), xtimes (allocated, 2));
-
- ENSURE_ALLOCATION (n);
-#if USE_SNPRINTF
- continue;
-#else
- maxlen = allocated - length;
-#endif
- }
-
- /* Perform padding. */
-#if NEED_PRINTF_FLAG_ZERO
- if (pad_ourselves && has_width && count < width)
- {
-# if USE_SNPRINTF
- /* Make room for the result. */
- if (width >= maxlen)
- {
- /* Need at least width bytes. But allocate
- proportionally, to avoid looping eternally if
- snprintf() reports a too small count. */
- size_t n =
- xmax (xsum (length + 1, width),
- xtimes (allocated, 2));
-
- length += count;
- ENSURE_ALLOCATION (n);
- length -= count;
- maxlen = allocated - length; /* > width */
- }
- /* Here width < maxlen. */
-# endif
- {
-# if USE_SNPRINTF
- CHAR_T * const rp = result + length;
-# else
- CHAR_T * const rp = tmp;
-# endif
- CHAR_T *p = rp + count;
- size_t pad = width - count;
- CHAR_T *end = p + pad;
- CHAR_T *pad_ptr = (*rp == '-' ? rp + 1 : rp);
- /* No zero-padding of "inf" and "nan". */
- if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z')
- || (*pad_ptr >= 'a' && *pad_ptr <= 'z'))
- pad_ptr = NULL;
- /* The generated string now extends from rp to p,
- with the zero padding insertion point being at
- pad_ptr. */
-
- if (flags & FLAG_LEFT)
- {
- /* Pad with spaces on the right. */
- for (; pad > 0; pad--)
- *p++ = ' ';
- }
- else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
- {
- /* Pad with zeroes. */
- CHAR_T *q = end;
-
- while (p > pad_ptr)
- *--q = *--p;
- for (; pad > 0; pad--)
- *p++ = '0';
- }
- else
- {
- /* Pad with spaces on the left. */
- CHAR_T *q = end;
-
- while (p > rp)
- *--q = *--p;
- for (; pad > 0; pad--)
- *p++ = ' ';
- }
-
- count = width; /* = count + pad = end - rp */
- }
- }
-#endif
-
-#if !USE_SNPRINTF
- if (count >= tmp_length)
- /* tmp_length was incorrectly calculated - fix the
- code above! */
- abort ();
-#endif
-
- /* Here still count < maxlen. */
-
-#if USE_SNPRINTF
- /* The snprintf() result did fit. */
-#else
- /* Append the sprintf() result. */
- memcpy (result + length, tmp, count * sizeof (CHAR_T));
- if (tmp != tmpbuf)
- free (tmp);
-#endif
-
-#if NEED_PRINTF_DIRECTIVE_F
- if (dp->conversion == 'F')
- {
- /* Convert the %f result to upper case for %F. */
- CHAR_T *rp = result + length;
- size_t rc;
- for (rc = count; rc > 0; rc--, rp++)
- if (*rp >= 'a' && *rp <= 'z')
- *rp = *rp - 'a' + 'A';
- }
-#endif
-
- length += count;
- break;
- }
- }
- }
- }
-
- /* Add the final NUL. */
- ENSURE_ALLOCATION (xsum (length, 1));
- result[length] = '\0';
-
- if (result != resultbuf && length + 1 < allocated)
- {
- /* Shrink the allocated memory if possible. */
- CHAR_T *memory;
-
- memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T));
- if (memory != NULL)
- result = memory;
- }
-
- if (buf_malloced != NULL)
- free (buf_malloced);
- CLEANUP ();
- *lengthp = length;
- /* Note that we can produce a big string of a length > INT_MAX. POSIX
- says that snprintf() fails with errno = EOVERFLOW in this case, but
- that's only because snprintf() returns an 'int'. This function does
- not have this limitation. */
- return result;
-
- overflow:
- if (!(result == resultbuf || result == NULL))
- free (result);
- if (buf_malloced != NULL)
- free (buf_malloced);
- CLEANUP ();
- errno = EOVERFLOW;
- return NULL;
-
- out_of_memory:
- if (!(result == resultbuf || result == NULL))
- free (result);
- if (buf_malloced != NULL)
- free (buf_malloced);
- out_of_memory_1:
- CLEANUP ();
- errno = ENOMEM;
- return NULL;
- }
-}
-
-#undef SNPRINTF
-#undef USE_SNPRINTF
-#undef PRINTF_PARSE
-#undef DIRECTIVES
-#undef DIRECTIVE
-#undef CHAR_T
-#undef VASNPRINTF
--- contrib/cpio/lib/minmax.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* MIN, MAX macros.
- Copyright (C) 1995, 1998, 2001, 2003, 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. */
-
-#ifndef _MINMAX_H
-#define _MINMAX_H
-
-/* Note: MIN, MAX are also defined in <sys/param.h> on some systems
- (glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about
- MIN, MAX macro redefinitions on some systems; the workaround is to
- #include this file as the last one among the #include list. */
-
-/* Before we define the following symbols we get the <limits.h> file
- since otherwise we get redefinitions on some systems if <limits.h> is
- included after this file. Likewise for <sys/param.h>.
- If more than one of these system headers define MIN and MAX, pick just
- one of the headers (because the definitions most likely are the same). */
-#if HAVE_MINMAX_IN_LIMITS_H
-# include <limits.h>
-#elif HAVE_MINMAX_IN_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-
-/* Note: MIN and MAX should be used with two arguments of the
- same type. They might not return the minimum and maximum of their two
- arguments, if the arguments have different types or have unusual
- floating-point values. For example, on a typical host with 32-bit 'int',
- 64-bit 'long long', and 64-bit IEEE 754 'double' types:
-
- MAX (-1, 2147483648) returns 4294967295.
- MAX (9007199254740992.0, 9007199254740993) returns 9007199254740992.0.
- MAX (NaN, 0.0) returns 0.0.
- MAX (+0.0, -0.0) returns -0.0.
-
- and in each case the answer is in some sense bogus. */
-
-/* MAX(a,b) returns the maximum of A and B. */
-#ifndef MAX
-# define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
-/* MIN(a,b) returns the minimum of A and B. */
-#ifndef MIN
-# define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
-#endif /* _MINMAX_H */
--- contrib/cpio/lib/save-cwd.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* save-cwd.c -- Save and restore current working directory.
-
- Copyright (C) 1995, 1997, 1998, 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. */
-
-/* Written by Jim Meyering. */
-
-#include <config.h>
-
-#include "save-cwd.h"
-
-#include <errno.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "chdir-long.h"
-#include "fcntl--.h"
-#include "xgetcwd.h"
-
-/* On systems without the fchdir function (WOE), pretend that open
- always returns -1 so that save_cwd resorts to using xgetcwd.
- Since chdir_long requires fchdir, use chdir instead. */
-#if !HAVE_FCHDIR
-# undef open
-# define open(File, Flags) (-1)
-# undef fchdir
-# define fchdir(Fd) (abort (), -1)
-# undef chdir_long
-# define chdir_long(Dir) chdir (Dir)
-#endif
-
-/* Record the location of the current working directory in CWD so that
- the program may change to other directories and later use restore_cwd
- to return to the recorded location. This function may allocate
- space using malloc (via xgetcwd) or leave a file descriptor open;
- use free_cwd to perform the necessary free or close. Upon failure,
- no memory is allocated, any locally opened file descriptors are
- closed; return non-zero -- in that case, free_cwd need not be
- called, but doing so is ok. Otherwise, return zero.
-
- The `raison d'etre' for this interface is that the working directory
- is sometimes inaccessible, and getcwd is not robust or as efficient.
- So, we prefer to use the open/fchdir approach, but fall back on
- getcwd if necessary.
-
- Some systems lack fchdir altogether: e.g., OS/2, pre-2001 Cygwin,
- SCO Xenix. Also, SunOS 4 and Irix 5.3 provide the function, yet it
- doesn't work for partitions on which auditing is enabled. If
- you're still using an obsolete system with these problems, please
- send email to the maintainer of this code. */
-
-int
-save_cwd (struct saved_cwd *cwd)
-{
- cwd->name = NULL;
-
- cwd->desc = open (".", O_RDONLY);
- if (cwd->desc < 0)
- {
- cwd->name = xgetcwd ();
- return cwd->name ? 0 : -1;
- }
-
- return 0;
-}
-
-/* Change to recorded location, CWD, in directory hierarchy.
- Upon failure, return -1 (errno is set by chdir or fchdir).
- Upon success, return zero. */
-
-int
-restore_cwd (const struct saved_cwd *cwd)
-{
- if (0 <= cwd->desc)
- return fchdir (cwd->desc);
- else
- return chdir_long (cwd->name);
-}
-
-void
-free_cwd (struct saved_cwd *cwd)
-{
- if (cwd->desc >= 0)
- close (cwd->desc);
- if (cwd->name)
- free (cwd->name);
-}
--- contrib/cpio/lib/malloc.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* malloc() function that is glibc compatible.
-
- Copyright (C) 1997, 1998, 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>
-#undef malloc
-
-#include <stdlib.h>
-
-/* Allocate an N-byte block of memory from the heap.
- If N is zero, allocate a 1-byte block. */
-
-void *
-rpl_malloc (size_t n)
-{
- if (n == 0)
- n = 1;
- return malloc (n);
-}
--- contrib/cpio/lib/lchown.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Provide a stub lchown function for systems that lack it.
-
- Copyright (C) 1998, 1999, 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. */
-
-/* written by Jim Meyering */
-
-#include <config.h>
-
-#include "lchown.h"
-
-#include <sys/stat.h>
-
-/* Work just like chown, except when FILE is a symbolic link.
- In that case, set errno to EOPNOTSUPP and return -1.
- But if autoconf tests determined that chown modifies
- symlinks, then just call chown. */
-
-int
-lchown (const char *file, uid_t uid, gid_t gid)
-{
-#if ! CHOWN_MODIFIES_SYMLINK
- struct stat stats;
-
- if (lstat (file, &stats) == 0 && S_ISLNK (stats.st_mode))
- {
- errno = EOPNOTSUPP;
- return -1;
- }
-#endif
-
- return chown (file, uid, gid);
-}
--- contrib/cpio/lib/xgetcwd.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* xgetcwd.c -- return current directory with unlimited length
-
- Copyright (C) 2001, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- 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 "xgetcwd.h"
-
-#include <errno.h>
-#include <unistd.h>
-
-#include "xalloc.h"
-
-/* Return the current directory, newly allocated.
- Upon an out-of-memory error, call xalloc_die.
- Upon any other type of error, return NULL. */
-
-char *
-xgetcwd (void)
-{
- char *cwd = getcwd (NULL, 0);
- if (! cwd && errno == ENOMEM)
- xalloc_die ();
- return cwd;
-}
--- contrib/cpio/lib/system-ioctl.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* System dependent definitions for GNU tar's use of ioctl macros.
-
- Copyright (C) 1994, 1995, 1996, 1997, 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. */
-
-/* This is a real challenge to properly get MTIO* symbols :-(. ISC uses
- <sys/gentape.h>. SCO and BSDi uses <sys/tape.h>; BSDi also requires
- <sys/tprintf.h> and <sys/device.h> for defining tp_dev and tpr_t. It
- seems that the rest use <sys/mtio.h>, which itself requires other files,
- depending on systems. Pyramid defines _IOW in <sgtty.h>, for example. */
-
-#if HAVE_SYS_GENTAPE_H
-# include <sys/gentape.h>
-#else
-# if HAVE_SYS_TAPE_H
-# if HAVE_SYS_DEVICE_H
-# include <sys/device.h>
-# endif
-# if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# endif
-# if HAVE_SYS_BUF_H
-# include <sys/buf.h>
-# endif
-# if HAVE_SYS_TPRINTF_H
-# include <sys/tprintf.h>
-# endif
-# include <sys/tape.h>
-# else
-# if HAVE_SYS_MTIO_H
-# include <sys/ioctl.h>
-# if HAVE_SGTTY_H
-# include <sgtty.h>
-# endif
-# if HAVE_SYS_IO_TRIOCTL_H
-# include <sys/io/trioctl.h>
-# endif
-# include <sys/mtio.h>
-# endif
-# endif
-#endif
--- contrib/cpio/lib/chdir-long.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/* 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:
-*/
--- contrib/cpio/lib/dup-safer.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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
-}
--- contrib/cpio/lib/version-etc-fsf.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Variable with FSF copyright information, for version-etc.
- Copyright (C) 1999-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>
-
-/* Specification. */
-#include "version-etc.h"
-
-/* Default copyright goes to the FSF. */
-
-const char version_etc_copyright[] =
- /* Do *not* mark this string for translation. %s is a copyright
- symbol suitable for this locale, and %d is the copyright
- year. */
- "Copyright %s %d Free Software Foundation, Inc.";
--- contrib/cpio/lib/memrchr.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* memrchr -- Find the last occurrence of a byte in a memory block.
-
- 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. */
-
-#if HAVE_DECL_MEMRCHR
-# include <string.h>
-#else
-# include <stddef.h>
-
-/* Search backwards through a block for a byte (specified as an int). */
-void *memrchr (void const *, int, size_t);
-
-#endif
--- contrib/cpio/lib/getopt.c
+++ /dev/null
@@ -1,1191 +0,0 @@
-/* Getopt for GNU.
- NOTE: getopt is now part of the C library, so if you don't know what
- "Keep this file name-space clean" means, talk to drepper at gnu.org
- before changing it!
- Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,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. */
-
-#ifndef _LIBC
-# include <config.h>
-#endif
-
-#include "getopt.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifdef __VMS
-# include <unixlib.h>
-#endif
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "gettext.h"
-# define _(msgid) gettext (msgid)
-#endif
-
-#if defined _LIBC && defined USE_IN_LIBIO
-# include <wchar.h>
-#endif
-
-#ifndef attribute_hidden
-# define attribute_hidden
-#endif
-
-/* Unlike standard Unix `getopt', functions like `getopt_long'
- let the user intersperse the options with the other arguments.
-
- As `getopt_long' works, it permutes the elements of ARGV so that,
- when it is done, all the options precede everything else. Thus
- all application programs are extended to handle flexible argument order.
-
- Using `getopt' or setting the environment variable POSIXLY_CORRECT
- disables permutation.
- Then the application's behavior is completely standard.
-
- GNU application programs can use a third alternative mode in which
- they can distinguish the relative order of options and other arguments. */
-
-#include "getopt_int.h"
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-/* 1003.2 says this must be 1 before any call. */
-int optind = 1;
-
-/* Callers store zero here to inhibit the error message
- for unrecognized options. */
-
-int opterr = 1;
-
-/* Set to an option character which was unrecognized.
- This must be initialized on some systems to avoid linking in the
- system's own getopt implementation. */
-
-int optopt = '?';
-
-/* Keep a global copy of all internal members of getopt_data. */
-
-static struct _getopt_data getopt_data;
-
-
-#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV
-extern char *getenv ();
-#endif
-
-#ifdef _LIBC
-/* Stored original parameters.
- XXX This is no good solution. We should rather copy the args so
- that we can compare them later. But we must not use malloc(3). */
-extern int __libc_argc;
-extern char **__libc_argv;
-
-/* Bash 2.0 gives us an environment variable containing flags
- indicating ARGV elements that should not be considered arguments. */
-
-# ifdef USE_NONOPTION_FLAGS
-/* Defined in getopt_init.c */
-extern char *__getopt_nonoption_flags;
-# endif
-
-# ifdef USE_NONOPTION_FLAGS
-# define SWAP_FLAGS(ch1, ch2) \
- if (d->__nonoption_flags_len > 0) \
- { \
- char __tmp = __getopt_nonoption_flags[ch1]; \
- __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
- __getopt_nonoption_flags[ch2] = __tmp; \
- }
-# else
-# define SWAP_FLAGS(ch1, ch2)
-# endif
-#else /* !_LIBC */
-# define SWAP_FLAGS(ch1, ch2)
-#endif /* _LIBC */
-
-/* Exchange two adjacent subsequences of ARGV.
- One subsequence is elements [first_nonopt,last_nonopt)
- which contains all the non-options that have been skipped so far.
- The other is elements [last_nonopt,optind), which contains all
- the options processed since those non-options were skipped.
-
- `first_nonopt' and `last_nonopt' are relocated so that they describe
- the new indices of the non-options in ARGV after they are moved. */
-
-static void
-exchange (char **argv, struct _getopt_data *d)
-{
- int bottom = d->__first_nonopt;
- int middle = d->__last_nonopt;
- int top = d->optind;
- char *tem;
-
- /* Exchange the shorter segment with the far end of the longer segment.
- That puts the shorter segment into the right place.
- It leaves the longer segment in the right place overall,
- but it consists of two parts that need to be swapped next. */
-
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
- /* First make sure the handling of the `__getopt_nonoption_flags'
- string can work normally. Our top argument must be in the range
- of the string. */
- if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
- {
- /* We must extend the array. The user plays games with us and
- presents new arguments. */
- char *new_str = malloc (top + 1);
- if (new_str == NULL)
- d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
- else
- {
- memset (__mempcpy (new_str, __getopt_nonoption_flags,
- d->__nonoption_flags_max_len),
- '\0', top + 1 - d->__nonoption_flags_max_len);
- d->__nonoption_flags_max_len = top + 1;
- __getopt_nonoption_flags = new_str;
- }
- }
-#endif
-
- while (top > middle && middle > bottom)
- {
- if (top - middle > middle - bottom)
- {
- /* Bottom segment is the short one. */
- int len = middle - bottom;
- register int i;
-
- /* Swap it with the top part of the top segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[top - (middle - bottom) + i];
- argv[top - (middle - bottom) + i] = tem;
- SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
- }
- /* Exclude the moved bottom segment from further swapping. */
- top -= len;
- }
- else
- {
- /* Top segment is the short one. */
- int len = top - middle;
- register int i;
-
- /* Swap it with the bottom part of the bottom segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[middle + i];
- argv[middle + i] = tem;
- SWAP_FLAGS (bottom + i, middle + i);
- }
- /* Exclude the moved top segment from further swapping. */
- bottom += len;
- }
- }
-
- /* Update records for the slots the non-options now occupy. */
-
- d->__first_nonopt += (d->optind - d->__last_nonopt);
- d->__last_nonopt = d->optind;
-}
-
-/* Initialize the internal data when the first call is made. */
-
-static const char *
-_getopt_initialize (int argc, char **argv, const char *optstring,
- int posixly_correct, struct _getopt_data *d)
-{
- /* Start processing options with ARGV-element 1 (since ARGV-element 0
- is the program name); the sequence of previously skipped
- non-option ARGV-elements is empty. */
-
- d->__first_nonopt = d->__last_nonopt = d->optind;
-
- d->__nextchar = NULL;
-
- d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT");
-
- /* Determine how to handle the ordering of options and nonoptions. */
-
- if (optstring[0] == '-')
- {
- d->__ordering = RETURN_IN_ORDER;
- ++optstring;
- }
- else if (optstring[0] == '+')
- {
- d->__ordering = REQUIRE_ORDER;
- ++optstring;
- }
- else if (d->__posixly_correct)
- d->__ordering = REQUIRE_ORDER;
- else
- d->__ordering = PERMUTE;
-
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
- if (!d->__posixly_correct
- && argc == __libc_argc && argv == __libc_argv)
- {
- if (d->__nonoption_flags_max_len == 0)
- {
- if (__getopt_nonoption_flags == NULL
- || __getopt_nonoption_flags[0] == '\0')
- d->__nonoption_flags_max_len = -1;
- else
- {
- const char *orig_str = __getopt_nonoption_flags;
- int len = d->__nonoption_flags_max_len = strlen (orig_str);
- if (d->__nonoption_flags_max_len < argc)
- d->__nonoption_flags_max_len = argc;
- __getopt_nonoption_flags =
- (char *) malloc (d->__nonoption_flags_max_len);
- if (__getopt_nonoption_flags == NULL)
- d->__nonoption_flags_max_len = -1;
- else
- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
- '\0', d->__nonoption_flags_max_len - len);
- }
- }
- d->__nonoption_flags_len = d->__nonoption_flags_max_len;
- }
- else
- d->__nonoption_flags_len = 0;
-#endif
-
- return optstring;
-}
-
-/* Scan elements of ARGV (whose length is ARGC) for option characters
- given in OPTSTRING.
-
- If an element of ARGV starts with '-', and is not exactly "-" or "--",
- then it is an option element. The characters of this element
- (aside from the initial '-') are option characters. If `getopt'
- is called repeatedly, it returns successively each of the option characters
- from each of the option elements.
-
- If `getopt' finds another option character, it returns that character,
- updating `optind' and `nextchar' so that the next call to `getopt' can
- resume the scan with the following option character or ARGV-element.
-
- If there are no more option characters, `getopt' returns -1.
- Then `optind' is the index in ARGV of the first ARGV-element
- that is not an option. (The ARGV-elements have been permuted
- so that those that are not options now come last.)
-
- OPTSTRING is a string containing the legitimate option characters.
- If an option character is seen that is not listed in OPTSTRING,
- return '?' after printing an error message. If you set `opterr' to
- zero, the error message is suppressed but we still return '?'.
-
- If a char in OPTSTRING is followed by a colon, that means it wants an arg,
- so the following text in the same ARGV-element, or the text of the following
- ARGV-element, is returned in `optarg'. Two colons mean an option that
- wants an optional arg; if there is text in the current ARGV-element,
- it is returned in `optarg', otherwise `optarg' is set to zero.
-
- If OPTSTRING starts with `-' or `+', it requests different methods of
- handling the non-option ARGV-elements.
- See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
-
- Long-named options begin with `--' instead of `-'.
- Their names may be abbreviated as long as the abbreviation is unique
- or is an exact match for some defined option. If they have an
- argument, it follows the option name in the same ARGV-element, separated
- from the option name by a `=', or else the in next ARGV-element.
- When `getopt' finds a long-named option, it returns 0 if that option's
- `flag' field is nonzero, the value of the option's `val' field
- if the `flag' field is zero.
-
- LONGOPTS is a vector of `struct option' terminated by an
- element containing a name which is zero.
-
- LONGIND returns the index in LONGOPT of the long-named option found.
- It is only valid when a long-named option has been found by the most
- recent call.
-
- If LONG_ONLY is nonzero, '-' as well as '--' can introduce
- long-named options.
-
- If POSIXLY_CORRECT is nonzero, behave as if the POSIXLY_CORRECT
- environment variable were set. */
-
-int
-_getopt_internal_r (int argc, char **argv, const char *optstring,
- const struct option *longopts, int *longind,
- int long_only, int posixly_correct, struct _getopt_data *d)
-{
- int print_errors = d->opterr;
- if (optstring[0] == ':')
- print_errors = 0;
-
- if (argc < 1)
- return -1;
-
- d->optarg = NULL;
-
- if (d->optind == 0 || !d->__initialized)
- {
- if (d->optind == 0)
- d->optind = 1; /* Don't scan ARGV[0], the program name. */
- optstring = _getopt_initialize (argc, argv, optstring,
- posixly_correct, d);
- d->__initialized = 1;
- }
-
- /* Test whether ARGV[optind] points to a non-option argument.
- Either it does not have option syntax, or there is an environment flag
- from the shell indicating it is not an option. The later information
- is only used when the used in the GNU libc. */
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
-# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
- || (d->optind < d->__nonoption_flags_len \
- && __getopt_nonoption_flags[d->optind] == '1'))
-#else
-# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
-#endif
-
- if (d->__nextchar == NULL || *d->__nextchar == '\0')
- {
- /* Advance to the next ARGV-element. */
-
- /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
- moved back by the user (who may also have changed the arguments). */
- if (d->__last_nonopt > d->optind)
- d->__last_nonopt = d->optind;
- if (d->__first_nonopt > d->optind)
- d->__first_nonopt = d->optind;
-
- if (d->__ordering == PERMUTE)
- {
- /* If we have just processed some options following some non-options,
- exchange them so that the options come first. */
-
- if (d->__first_nonopt != d->__last_nonopt
- && d->__last_nonopt != d->optind)
- exchange ((char **) argv, d);
- else if (d->__last_nonopt != d->optind)
- d->__first_nonopt = d->optind;
-
- /* Skip any additional non-options
- and extend the range of non-options previously skipped. */
-
- while (d->optind < argc && NONOPTION_P)
- d->optind++;
- d->__last_nonopt = d->optind;
- }
-
- /* The special ARGV-element `--' means premature end of options.
- Skip it like a null option,
- then exchange with previous non-options as if it were an option,
- then skip everything else like a non-option. */
-
- if (d->optind != argc && !strcmp (argv[d->optind], "--"))
- {
- d->optind++;
-
- if (d->__first_nonopt != d->__last_nonopt
- && d->__last_nonopt != d->optind)
- exchange ((char **) argv, d);
- else if (d->__first_nonopt == d->__last_nonopt)
- d->__first_nonopt = d->optind;
- d->__last_nonopt = argc;
-
- d->optind = argc;
- }
-
- /* If we have done all the ARGV-elements, stop the scan
- and back over any non-options that we skipped and permuted. */
-
- if (d->optind == argc)
- {
- /* Set the next-arg-index to point at the non-options
- that we previously skipped, so the caller will digest them. */
- if (d->__first_nonopt != d->__last_nonopt)
- d->optind = d->__first_nonopt;
- return -1;
- }
-
- /* If we have come to a non-option and did not permute it,
- either stop the scan or describe it to the caller and pass it by. */
-
- if (NONOPTION_P)
- {
- if (d->__ordering == REQUIRE_ORDER)
- return -1;
- d->optarg = argv[d->optind++];
- return 1;
- }
-
- /* We have found another option-ARGV-element.
- Skip the initial punctuation. */
-
- d->__nextchar = (argv[d->optind] + 1
- + (longopts != NULL && argv[d->optind][1] == '-'));
- }
-
- /* Decode the current option-ARGV-element. */
-
- /* Check whether the ARGV-element is a long option.
-
- If long_only and the ARGV-element has the form "-f", where f is
- a valid short option, don't consider it an abbreviated form of
- a long option that starts with f. Otherwise there would be no
- way to give the -f short option.
-
- On the other hand, if there's a long option "fubar" and
- the ARGV-element is "-fu", do consider that an abbreviation of
- the long option, just like "--fu", and not "-f" with arg "u".
-
- This distinction seems to be the most useful approach. */
-
- if (longopts != NULL
- && (argv[d->optind][1] == '-'
- || (long_only && (argv[d->optind][2]
- || !strchr (optstring, argv[d->optind][1])))))
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = -1;
- int option_index;
-
- for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
- {
- if ((unsigned int) (nameend - d->__nextchar)
- == (unsigned int) strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else if (long_only
- || pfound->has_arg != p->has_arg
- || pfound->flag != p->flag
- || pfound->val != p->val)
- /* Second or later nonexact match found. */
- ambig = 1;
- }
-
- if (ambig && !exact)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
- argv[0], argv[d->optind]) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
- argv[0], argv[d->optind]);
-#endif
- }
- d->__nextchar += strlen (d->__nextchar);
- d->optind++;
- d->optopt = 0;
- return '?';
- }
-
- if (pfound != NULL)
- {
- option_index = indfound;
- d->optind++;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- d->optarg = nameend + 1;
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
- int n;
-#endif
-
- if (argv[d->optind - 1][1] == '-')
- {
- /* --option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("\
-%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#else
- fprintf (stderr, _("\
-%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#endif
- }
- else
- {
- /* +option or -option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("\
-%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[d->optind - 1][0],
- pfound->name);
-#else
- fprintf (stderr, _("\
-%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[d->optind - 1][0],
- pfound->name);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (n >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2
- |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#endif
- }
-
- d->__nextchar += strlen (d->__nextchar);
-
- d->optopt = pfound->val;
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (d->optind < argc)
- d->optarg = argv[d->optind++];
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option `%s' requires an argument\n"),
- argv[0], argv[d->optind - 1]) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2
- |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[d->optind - 1]);
-#endif
- }
- d->__nextchar += strlen (d->__nextchar);
- d->optopt = pfound->val;
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- d->__nextchar += strlen (d->__nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
-
- /* Can't find it as a long option. If this is not getopt_long_only,
- or the option starts with '--' or is not a valid short
- option, then it's an error.
- Otherwise interpret it as a short option. */
- if (!long_only || argv[d->optind][1] == '-'
- || strchr (optstring, *d->__nextchar) == NULL)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
- int n;
-#endif
-
- if (argv[d->optind][1] == '-')
- {
- /* --option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
- argv[0], d->__nextchar);
-#else
- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
- argv[0], d->__nextchar);
-#endif
- }
- else
- {
- /* +option or -option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
- argv[0], argv[d->optind][0], d->__nextchar);
-#else
- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
- argv[0], argv[d->optind][0], d->__nextchar);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (n >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#endif
- }
- d->__nextchar = (char *) "";
- d->optind++;
- d->optopt = 0;
- return '?';
- }
- }
-
- /* Look at and handle the next short option-character. */
-
- {
- char c = *d->__nextchar++;
- char *temp = strchr (optstring, c);
-
- /* Increment `optind' when we start to process its last character. */
- if (*d->__nextchar == '\0')
- ++d->optind;
-
- if (temp == NULL || c == ':')
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
- int n;
-#endif
-
- if (d->__posixly_correct)
- {
- /* 1003.2 specifies the format of this message. */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
- argv[0], c);
-#else
- fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
-#endif
- }
- else
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
- argv[0], c);
-#else
- fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (n >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#endif
- }
- d->optopt = c;
- return '?';
- }
- /* Convenience. Treat POSIX -W foo same as long option --foo */
- if (temp[0] == 'W' && temp[1] == ';')
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = 0;
- int option_index;
-
- /* This is an option that requires an argument. */
- if (*d->__nextchar != '\0')
- {
- d->optarg = d->__nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- d->optind++;
- }
- else if (d->optind == argc)
- {
- if (print_errors)
- {
- /* 1003.2 specifies the format of this message. */
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf,
- _("%s: option requires an argument -- %c\n"),
- argv[0], c) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("%s: option requires an argument -- %c\n"),
- argv[0], c);
-#endif
- }
- d->optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- return c;
- }
- else
- /* We already incremented `d->optind' once;
- increment it again when taking next ARGV-elt as argument. */
- d->optarg = argv[d->optind++];
-
- /* optarg is now the argument, see if it's in the
- table of longopts. */
-
- for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
- nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
- {
- if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else
- /* Second or later nonexact match found. */
- ambig = 1;
- }
- if (ambig && !exact)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
- argv[0], argv[d->optind]) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
- argv[0], argv[d->optind]);
-#endif
- }
- d->__nextchar += strlen (d->__nextchar);
- d->optind++;
- return '?';
- }
- if (pfound != NULL)
- {
- option_index = indfound;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- d->optarg = nameend + 1;
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2
- |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#endif
- }
-
- d->__nextchar += strlen (d->__nextchar);
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (d->optind < argc)
- d->optarg = argv[d->optind++];
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option `%s' requires an argument\n"),
- argv[0], argv[d->optind - 1]) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2
- |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[d->optind - 1]);
-#endif
- }
- d->__nextchar += strlen (d->__nextchar);
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- d->__nextchar += strlen (d->__nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
- d->__nextchar = NULL;
- return 'W'; /* Let the application handle it. */
- }
- if (temp[1] == ':')
- {
- if (temp[2] == ':')
- {
- /* This is an option that accepts an argument optionally. */
- if (*d->__nextchar != '\0')
- {
- d->optarg = d->__nextchar;
- d->optind++;
- }
- else
- d->optarg = NULL;
- d->__nextchar = NULL;
- }
- else
- {
- /* This is an option that requires an argument. */
- if (*d->__nextchar != '\0')
- {
- d->optarg = d->__nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- d->optind++;
- }
- else if (d->optind == argc)
- {
- if (print_errors)
- {
- /* 1003.2 specifies the format of this message. */
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option requires an argument -- %c\n"),
- argv[0], c) >= 0)
- {
- _IO_flockfile (stderr);
-
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-
- __fxprintf (NULL, "%s", buf);
-
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr,
- _("%s: option requires an argument -- %c\n"),
- argv[0], c);
-#endif
- }
- d->optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- d->optarg = argv[d->optind++];
- d->__nextchar = NULL;
- }
- }
- return c;
- }
-}
-
-int
-_getopt_internal (int argc, char **argv, const char *optstring,
- const struct option *longopts, int *longind,
- int long_only, int posixly_correct)
-{
- int result;
-
- getopt_data.optind = optind;
- getopt_data.opterr = opterr;
-
- result = _getopt_internal_r (argc, argv, optstring, longopts, longind,
- long_only, posixly_correct, &getopt_data);
-
- optind = getopt_data.optind;
- optarg = getopt_data.optarg;
- optopt = getopt_data.optopt;
-
- return result;
-}
-
-/* glibc gets a LSB-compliant getopt.
- Standalone applications get a POSIX-compliant getopt. */
-#if _LIBC
-enum { POSIXLY_CORRECT = 0 };
-#else
-enum { POSIXLY_CORRECT = 1 };
-#endif
-
-int
-getopt (int argc, char *const *argv, const char *optstring)
-{
- return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0,
- POSIXLY_CORRECT);
-}
-
-
-#ifdef TEST
-
-/* Compile with -DTEST to make an executable for use in testing
- the above definition of `getopt'. */
-
-int
-main (int argc, char **argv)
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
-
- c = getopt (argc, argv, "abc:d:0123456789");
- if (c == -1)
- break;
-
- switch (c)
- {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
--- contrib/cpio/lib/fstatat.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Work around an fstatat bug on Solaris 9.
-
- 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 Paul Eggert and Jim Meyering. */
-
-#include <config.h>
-
-#define COMPILING_FSTATAT 1
-#include "openat.h"
-
-#include <errno.h>
-#include <string.h>
-
-/* fstatat should always follow symbolic links that end in /, but on
- Solaris 9 it doesn't if AT_SYMLINK_NOFOLLOW is specified. This is
- the same problem that lstat.c addresses, so solve it in a similar
- way. */
-
-int
-rpl_fstatat (int fd, char const *file, struct stat *st, int flag)
-{
- int result = fstatat (fd, file, st, flag);
-
- if (result == 0 && (flag & AT_SYMLINK_NOFOLLOW) && S_ISLNK (st->st_mode)
- && file[strlen (file) - 1] == '/')
- {
- /* FILE refers to a symbolic link and the name ends with a slash.
- Get info about the link's referent. */
- result = fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW);
- if (result == 0 && ! S_ISDIR (st->st_mode))
- {
- /* fstatat succeeded and FILE references a non-directory.
- But it was specified via a name including a trailing
- slash. Fail with errno set to ENOTDIR to indicate the
- contradiction. */
- errno = ENOTDIR;
- return -1;
- }
- }
-
- return result;
-}
--- contrib/cpio/lib/strnlen1.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- 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. */
-
-#include <config.h>
-
-/* Specification. */
-#include "strnlen1.h"
-
-#include <string.h>
-
-/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- If no '\0' terminator is found in that many characters, return MAXLEN. */
-/* This is the same as strnlen (string, maxlen - 1) + 1. */
-size_t
-strnlen1 (const char *string, size_t maxlen)
-{
- const char *end = memchr (string, '\0', maxlen);
- if (end != NULL)
- return end - string + 1;
- else
- return maxlen;
-}
--- contrib/cpio/lib/dirfd.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* 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
--- contrib/cpio/lib/strtol.c
+++ /dev/null
@@ -1,436 +0,0 @@
-/* Convert string representation of a number into an integer value.
-
- Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2005,
- 2006, 2007
- Free Software Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the GNU C
- Library. Bugs can be reported to bug-glibc at gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- 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 _LIBC
-# define USE_NUMBER_GROUPING
-#else
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <errno.h>
-#ifndef __set_errno
-# define __set_errno(Val) errno = (Val)
-#endif
-
-#include <limits.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef USE_NUMBER_GROUPING
-# include "../locale/localeinfo.h"
-#endif
-
-/* Nonzero if we are defining `strtoul' or `strtoull', operating on
- unsigned integers. */
-#ifndef UNSIGNED
-# define UNSIGNED 0
-# define INT LONG int
-#else
-# define INT unsigned LONG int
-#endif
-
-/* Determine the name. */
-#ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# if UNSIGNED
-# ifdef USE_WIDE_CHAR
-# ifdef QUAD
-# define strtol __wcstoull_l
-# else
-# define strtol __wcstoul_l
-# endif
-# else
-# ifdef QUAD
-# define strtol __strtoull_l
-# else
-# define strtol __strtoul_l
-# endif
-# endif
-# else
-# ifdef USE_WIDE_CHAR
-# ifdef QUAD
-# define strtol __wcstoll_l
-# else
-# define strtol __wcstol_l
-# endif
-# else
-# ifdef QUAD
-# define strtol __strtoll_l
-# else
-# define strtol __strtol_l
-# endif
-# endif
-# endif
-#else
-# if UNSIGNED
-# ifdef USE_WIDE_CHAR
-# ifdef QUAD
-# define strtol wcstoull
-# else
-# define strtol wcstoul
-# endif
-# else
-# ifdef QUAD
-# define strtol strtoull
-# else
-# define strtol strtoul
-# endif
-# endif
-# else
-# ifdef USE_WIDE_CHAR
-# ifdef QUAD
-# define strtol wcstoll
-# else
-# define strtol wcstol
-# endif
-# else
-# ifdef QUAD
-# define strtol strtoll
-# endif
-# endif
-# endif
-#endif
-
-/* If QUAD is defined, we are defining `strtoll' or `strtoull',
- operating on `long long int's. */
-#ifdef QUAD
-# define LONG long long
-# define STRTOL_LONG_MIN LONG_LONG_MIN
-# define STRTOL_LONG_MAX LONG_LONG_MAX
-# define STRTOL_ULONG_MAX ULONG_LONG_MAX
-
-/* The extra casts in the following macros work around compiler bugs,
- e.g., in Cray C 5.0.3.0. */
-
-/* True if negative values of the signed integer type T use two's
- complement, ones' complement, or signed magnitude representation,
- respectively. Much GNU code assumes two's complement, but some
- people like to be portable to all possible C hosts. */
-# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
-
-/* True if the arithmetic type T is signed. */
-# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-
-/* The maximum and minimum values for the integer type T. These
- macros have undefined behavior if T is signed and has padding bits.
- If this is a problem for you, please let us know how to fix it for
- your host. */
-# define TYPE_MINIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) 0 \
- : TYPE_SIGNED_MAGNITUDE (t) \
- ? ~ (t) 0 \
- : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
-# define TYPE_MAXIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) -1 \
- : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
-
-# ifndef ULONG_LONG_MAX
-# define ULONG_LONG_MAX TYPE_MAXIMUM (unsigned long long)
-# endif
-# ifndef LONG_LONG_MAX
-# define LONG_LONG_MAX TYPE_MAXIMUM (long long int)
-# endif
-# ifndef LONG_LONG_MIN
-# define LONG_LONG_MIN TYPE_MINIMUM (long long int)
-# endif
-
-# if __GNUC__ == 2 && __GNUC_MINOR__ < 7
- /* Work around gcc bug with using this constant. */
- static const unsigned long long int maxquad = ULONG_LONG_MAX;
-# undef STRTOL_ULONG_MAX
-# define STRTOL_ULONG_MAX maxquad
-# endif
-#else
-# define LONG long
-# define STRTOL_LONG_MIN LONG_MIN
-# define STRTOL_LONG_MAX LONG_MAX
-# define STRTOL_ULONG_MAX ULONG_MAX
-#endif
-
-
-/* We use this code also for the extended locale handling where the
- function gets as an additional argument the locale which has to be
- used. To access the values we have to redefine the _NL_CURRENT
- macro. */
-#ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# undef _NL_CURRENT
-# define _NL_CURRENT(category, item) \
- (current->values[_NL_ITEM_INDEX (item)].string)
-# define LOCALE_PARAM , loc
-# define LOCALE_PARAM_PROTO , __locale_t loc
-#else
-# define LOCALE_PARAM
-# define LOCALE_PARAM_PROTO
-#endif
-
-#include <wchar.h>
-
-#ifdef USE_WIDE_CHAR
-# include <wctype.h>
-# define L_(Ch) L##Ch
-# define UCHAR_TYPE wint_t
-# define STRING_TYPE wchar_t
-# ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# define ISSPACE(Ch) __iswspace_l ((Ch), loc)
-# define ISALPHA(Ch) __iswalpha_l ((Ch), loc)
-# define TOUPPER(Ch) __towupper_l ((Ch), loc)
-# else
-# define ISSPACE(Ch) iswspace (Ch)
-# define ISALPHA(Ch) iswalpha (Ch)
-# define TOUPPER(Ch) towupper (Ch)
-# endif
-#else
-# define L_(Ch) Ch
-# define UCHAR_TYPE unsigned char
-# define STRING_TYPE char
-# ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# define ISSPACE(Ch) __isspace_l ((Ch), loc)
-# define ISALPHA(Ch) __isalpha_l ((Ch), loc)
-# define TOUPPER(Ch) __toupper_l ((Ch), loc)
-# else
-# define ISSPACE(Ch) isspace (Ch)
-# define ISALPHA(Ch) isalpha (Ch)
-# define TOUPPER(Ch) toupper (Ch)
-# endif
-#endif
-
-#define INTERNAL(X) INTERNAL1(X)
-#define INTERNAL1(X) __##X##_internal
-#define WEAKNAME(X) WEAKNAME1(X)
-
-#ifdef USE_NUMBER_GROUPING
-/* This file defines a function to check for correct grouping. */
-# include "grouping.h"
-#endif
-
-
-
-/* Convert NPTR to an `unsigned long int' or `long int' in base BASE.
- If BASE is 0 the base is determined by the presence of a leading
- zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal.
- If BASE is < 2 or > 36, it is reset to 10.
- If ENDPTR is not NULL, a pointer to the character after the last
- one converted is stored in *ENDPTR. */
-
-INT
-INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
- int base, int group LOCALE_PARAM_PROTO)
-{
- int negative;
- register unsigned LONG int cutoff;
- register unsigned int cutlim;
- register unsigned LONG int i;
- register const STRING_TYPE *s;
- register UCHAR_TYPE c;
- const STRING_TYPE *save, *end;
- int overflow;
-
-#ifdef USE_NUMBER_GROUPING
-# ifdef USE_IN_EXTENDED_LOCALE_MODEL
- struct locale_data *current = loc->__locales[LC_NUMERIC];
-# endif
- /* The thousands character of the current locale. */
- wchar_t thousands = L'\0';
- /* The numeric grouping specification of the current locale,
- in the format described in <locale.h>. */
- const char *grouping;
-
- if (group)
- {
- grouping = _NL_CURRENT (LC_NUMERIC, GROUPING);
- if (*grouping <= 0 || *grouping == CHAR_MAX)
- grouping = NULL;
- else
- {
- /* Figure out the thousands separator character. */
-# if defined _LIBC || defined _HAVE_BTOWC
- thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP));
- if (thousands == WEOF)
- thousands = L'\0';
-# endif
- if (thousands == L'\0')
- grouping = NULL;
- }
- }
- else
- grouping = NULL;
-#endif
-
- if (base < 0 || base == 1 || base > 36)
- {
- __set_errno (EINVAL);
- return 0;
- }
-
- save = s = nptr;
-
- /* Skip white space. */
- while (ISSPACE (*s))
- ++s;
- if (*s == L_('\0'))
- goto noconv;
-
- /* Check for a sign. */
- if (*s == L_('-'))
- {
- negative = 1;
- ++s;
- }
- else if (*s == L_('+'))
- {
- negative = 0;
- ++s;
- }
- else
- negative = 0;
-
- /* Recognize number prefix and if BASE is zero, figure it out ourselves. */
- if (*s == L_('0'))
- {
- if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X'))
- {
- s += 2;
- base = 16;
- }
- else if (base == 0)
- base = 8;
- }
- else if (base == 0)
- base = 10;
-
- /* Save the pointer so we can check later if anything happened. */
- save = s;
-
-#ifdef USE_NUMBER_GROUPING
- if (group)
- {
- /* Find the end of the digit string and check its grouping. */
- end = s;
- for (c = *end; c != L_('\0'); c = *++end)
- if ((wchar_t) c != thousands
- && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9'))
- && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base))
- break;
- if (*s == thousands)
- end = s;
- else
- end = correctly_grouped_prefix (s, end, thousands, grouping);
- }
- else
-#endif
- end = NULL;
-
- cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base;
- cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base;
-
- overflow = 0;
- i = 0;
- for (c = *s; c != L_('\0'); c = *++s)
- {
- if (s == end)
- break;
- if (c >= L_('0') && c <= L_('9'))
- c -= L_('0');
- else if (ISALPHA (c))
- c = TOUPPER (c) - L_('A') + 10;
- else
- break;
- if ((int) c >= base)
- break;
- /* Check for overflow. */
- if (i > cutoff || (i == cutoff && c > cutlim))
- overflow = 1;
- else
- {
- i *= (unsigned LONG int) base;
- i += c;
- }
- }
-
- /* Check if anything actually happened. */
- if (s == save)
- goto noconv;
-
- /* Store in ENDPTR the address of one character
- past the last character we converted. */
- if (endptr != NULL)
- *endptr = (STRING_TYPE *) s;
-
-#if !UNSIGNED
- /* Check for a value that is within the range of
- `unsigned LONG int', but outside the range of `LONG int'. */
- if (overflow == 0
- && i > (negative
- ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1
- : (unsigned LONG int) STRTOL_LONG_MAX))
- overflow = 1;
-#endif
-
- if (overflow)
- {
- __set_errno (ERANGE);
-#if UNSIGNED
- return STRTOL_ULONG_MAX;
-#else
- return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX;
-#endif
- }
-
- /* Return the result of the appropriate sign. */
- return negative ? -i : i;
-
-noconv:
- /* We must handle a special case here: the base is 0 or 16 and the
- first two characters are '0' and 'x', but the rest are no
- hexadecimal digits. This is no error case. We return 0 and
- ENDPTR points to the `x`. */
- if (endptr != NULL)
- {
- if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X')
- && save[-2] == L_('0'))
- *endptr = (STRING_TYPE *) &save[-1];
- else
- /* There was no number to convert. */
- *endptr = (STRING_TYPE *) nptr;
- }
-
- return 0L;
-}
-
-/* External user entry point. */
-
-
-INT
-#ifdef weak_function
-weak_function
-#endif
-strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr,
- int base LOCALE_PARAM_PROTO)
-{
- return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM);
-}
--- contrib/cpio/lib/safe-write.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* An interface to write that retries after interrupts.
- Copyright (C) 2002 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. */
-
-#define SAFE_WRITE
-#include "safe-read.c"
--- contrib/cpio/lib/pipe-safer.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Invoke pipe, 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 "unistd-safer.h"
-
-#include <unistd.h>
-#include <errno.h>
-
-/* Like pipe, but ensure that neither of the file descriptors is
- STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. Fail with ENOSYS on
- platforms that lack pipe. */
-
-int
-pipe_safer (int fd[2])
-{
-#if HAVE_PIPE
- if (pipe (fd) == 0)
- {
- int i;
- for (i = 0; i < 2; i++)
- {
- fd[i] = fd_safer (fd[i]);
- if (fd[i] < 0)
- {
- int e = errno;
- close (fd[1 - i]);
- errno = e;
- return -1;
- }
- }
-
- return 0;
- }
-#else
- errno = ENOSYS;
-#endif
-
- return -1;
-}
--- contrib/cpio/lib/exitfail.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Failure exit status
-
- Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- 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. */
-
-#include <config.h>
-
-#include "exitfail.h"
-
-#include <stdlib.h>
-
-int volatile exit_failure = EXIT_FAILURE;
--- contrib/cpio/lib/stat-macros.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/* stat-related macros
-
- Copyright (C) 1993, 1994, 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. */
-
-/* Written by Paul Eggert and Jim Meyering. */
-
-#ifndef STAT_MACROS_H
-# define STAT_MACROS_H 1
-
-# if ! defined S_ISREG && ! defined S_IFREG
-# error "you must include <sys/stat.h> before including this file"
-# endif
-
-# ifndef S_IFMT
-# define S_IFMT 0170000
-# endif
-
-# if STAT_MACROS_BROKEN
-# undef S_ISBLK
-# undef S_ISCHR
-# undef S_ISDIR
-# undef S_ISFIFO
-# undef S_ISLNK
-# undef S_ISNAM
-# undef S_ISMPB
-# undef S_ISMPC
-# undef S_ISNWK
-# undef S_ISREG
-# undef S_ISSOCK
-# endif
-
-
-# ifndef S_ISBLK
-# ifdef S_IFBLK
-# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
-# else
-# define S_ISBLK(m) 0
-# endif
-# endif
-
-# ifndef S_ISCHR
-# ifdef S_IFCHR
-# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-# else
-# define S_ISCHR(m) 0
-# endif
-# endif
-
-# ifndef S_ISDIR
-# ifdef S_IFDIR
-# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-# else
-# define S_ISDIR(m) 0
-# endif
-# endif
-
-# ifndef S_ISDOOR /* Solaris 2.5 and up */
-# define S_ISDOOR(m) 0
-# endif
-
-# ifndef S_ISFIFO
-# ifdef S_IFIFO
-# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-# else
-# define S_ISFIFO(m) 0
-# endif
-# endif
-
-# ifndef S_ISLNK
-# ifdef S_IFLNK
-# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-# else
-# define S_ISLNK(m) 0
-# endif
-# endif
-
-# ifndef S_ISMPB /* V7 */
-# ifdef S_IFMPB
-# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
-# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
-# else
-# define S_ISMPB(m) 0
-# define S_ISMPC(m) 0
-# endif
-# endif
-
-# ifndef S_ISNAM /* Xenix */
-# ifdef S_IFNAM
-# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
-# else
-# define S_ISNAM(m) 0
-# endif
-# endif
-
-# ifndef S_ISNWK /* HP/UX */
-# ifdef S_IFNWK
-# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
-# else
-# define S_ISNWK(m) 0
-# endif
-# endif
-
-# ifndef S_ISPORT /* Solaris 10 and up */
-# define S_ISPORT(m) 0
-# endif
-
-# ifndef S_ISREG
-# ifdef S_IFREG
-# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-# else
-# define S_ISREG(m) 0
-# endif
-# endif
-
-# ifndef S_ISSOCK
-# ifdef S_IFSOCK
-# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
-# else
-# define S_ISSOCK(m) 0
-# endif
-# endif
-
-
-# ifndef S_TYPEISMQ
-# define S_TYPEISMQ(p) 0
-# endif
-
-# ifndef S_TYPEISTMO
-# define S_TYPEISTMO(p) 0
-# endif
-
-
-# ifndef S_TYPEISSEM
-# ifdef S_INSEM
-# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
-# else
-# define S_TYPEISSEM(p) 0
-# endif
-# endif
-
-# ifndef S_TYPEISSHM
-# ifdef S_INSHD
-# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
-# else
-# define S_TYPEISSHM(p) 0
-# endif
-# endif
-
-/* high performance ("contiguous data") */
-# ifndef S_ISCTG
-# define S_ISCTG(p) 0
-# endif
-
-/* Cray DMF (data migration facility): off line, with data */
-# ifndef S_ISOFD
-# define S_ISOFD(p) 0
-# endif
-
-/* Cray DMF (data migration facility): off line, with no data */
-# ifndef S_ISOFL
-# define S_ISOFL(p) 0
-# endif
-
-/* 4.4BSD whiteout */
-# ifndef S_ISWHT
-# define S_ISWHT(m) 0
-# endif
-
-/* If any of the following are undefined,
- define them to their de facto standard values. */
-# if !S_ISUID
-# define S_ISUID 04000
-# endif
-# if !S_ISGID
-# define S_ISGID 02000
-# endif
-
-/* S_ISVTX is a common extension to POSIX. */
-# ifndef S_ISVTX
-# define S_ISVTX 01000
-# endif
-
-# if !S_IRUSR && S_IREAD
-# define S_IRUSR S_IREAD
-# endif
-# if !S_IRUSR
-# define S_IRUSR 00400
-# endif
-# if !S_IRGRP
-# define S_IRGRP (S_IRUSR >> 3)
-# endif
-# if !S_IROTH
-# define S_IROTH (S_IRUSR >> 6)
-# endif
-
-# if !S_IWUSR && S_IWRITE
-# define S_IWUSR S_IWRITE
-# endif
-# if !S_IWUSR
-# define S_IWUSR 00200
-# endif
-# if !S_IWGRP
-# define S_IWGRP (S_IWUSR >> 3)
-# endif
-# if !S_IWOTH
-# define S_IWOTH (S_IWUSR >> 6)
-# endif
-
-# if !S_IXUSR && S_IEXEC
-# define S_IXUSR S_IEXEC
-# endif
-# if !S_IXUSR
-# define S_IXUSR 00100
-# endif
-# if !S_IXGRP
-# define S_IXGRP (S_IXUSR >> 3)
-# endif
-# if !S_IXOTH
-# define S_IXOTH (S_IXUSR >> 6)
-# endif
-
-# if !S_IRWXU
-# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
-# endif
-# if !S_IRWXG
-# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
-# endif
-# if !S_IRWXO
-# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
-# endif
-
-/* S_IXUGO is a common extension to POSIX. */
-# if !S_IXUGO
-# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
-# endif
-
-# ifndef S_IRWXUGO
-# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
-# endif
-
-/* All the mode bits that can be affected by chmod. */
-# define CHMOD_MODE_BITS \
- (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
-
-#endif /* STAT_MACROS_H */
--- contrib/cpio/lib/setenv.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Setting environment variables.
- Copyright (C) 2001-2004, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#if HAVE_SETENV || HAVE_UNSETENV
-
-/* Get setenv(), unsetenv() declarations. */
-# include <stdlib.h>
-
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !HAVE_SETENV
-
-/* Set NAME to VALUE in the environment.
- If REPLACE is nonzero, overwrite an existing value. */
-extern int setenv (const char *name, const char *value, int replace);
-
-#endif
-
-#if HAVE_UNSETENV
-
-# if VOID_UNSETENV
-/* On some systems, unsetenv() returns void.
- This is the case for FreeBSD 4.8, NetBSD 1.6, OpenBSD 3.4. */
-# define unsetenv(name) ((unsetenv)(name), 0)
-# endif
-
-#else
-
-/* Remove the variable NAME from the environment. */
-extern int unsetenv (const char *name);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
--- contrib/cpio/lib/canonicalize-lgpl.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/* 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
--- contrib/cpio/lib/openat.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/* provide a replacement openat function
- Copyright (C) 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 Jim Meyering */
-
-#include <config.h>
-
-#include "openat.h"
-
-#include <stdarg.h>
-#include <stddef.h>
-
-#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
-#include "fcntl--.h"
-#include "lchown.h"
-#include "lstat.h"
-#include "openat-priv.h"
-#include "save-cwd.h"
-
-/* Replacement for Solaris' openat function.
- <http://www.google.com/search?q=openat+site:docs.sun.com>
- First, try to simulate it via open ("/proc/self/fd/FD/FILE").
- Failing that, simulate it by doing save_cwd/fchdir/open/restore_cwd.
- If either the save_cwd or the restore_cwd fails (relatively unlikely),
- then give a diagnostic and exit nonzero.
- Otherwise, upon failure, set errno and return -1, as openat does.
- Upon successful completion, return a file descriptor. */
-int
-openat (int fd, char const *file, int flags, ...)
-{
- mode_t mode = 0;
-
- if (flags & O_CREAT)
- {
- va_list arg;
- va_start (arg, flags);
-
- /* If mode_t is narrower than int, use the promoted type (int),
- not mode_t. Use sizeof to guess whether mode_t is narrower;
- we don't know of any practical counterexamples. */
- mode = (sizeof (mode_t) < sizeof (int)
- ? va_arg (arg, int)
- : va_arg (arg, mode_t));
-
- va_end (arg);
- }
-
- return openat_permissive (fd, file, flags, mode, NULL);
-}
-
-/* Like openat (FD, FILE, FLAGS, MODE), but if CWD_ERRNO is
- nonnull, set *CWD_ERRNO to an errno value if unable to save
- or restore the initial working directory. This is needed only
- the first time remove.c's remove_dir opens a command-line
- directory argument.
-
- If a previous attempt to restore the current working directory
- failed, then we must not even try to access a `.'-relative name.
- It is the caller's responsibility not to call this function
- in that case. */
-
-int
-openat_permissive (int fd, char const *file, int flags, mode_t mode,
- int *cwd_errno)
-{
- struct saved_cwd saved_cwd;
- int saved_errno;
- int err;
- bool save_ok;
-
- if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file))
- return open (file, flags, mode);
-
- {
- char buf[OPENAT_BUFFER_SIZE];
- char *proc_file = openat_proc_name (buf, fd, file);
- if (proc_file)
- {
- int open_result = open (proc_file, flags, mode);
- int open_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 <= open_result || ! EXPECTED_ERRNO (open_errno))
- {
- errno = open_errno;
- return open_result;
- }
- }
- }
-
- save_ok = (save_cwd (&saved_cwd) == 0);
- if (! save_ok)
- {
- if (! cwd_errno)
- openat_save_fail (errno);
- *cwd_errno = errno;
- }
-
- err = fchdir (fd);
- saved_errno = errno;
-
- if (! err)
- {
- err = open (file, flags, mode);
- saved_errno = errno;
- if (save_ok && restore_cwd (&saved_cwd) != 0)
- {
- if (! cwd_errno)
- openat_restore_fail (errno);
- *cwd_errno = errno;
- }
- }
-
- free_cwd (&saved_cwd);
- errno = saved_errno;
- return err;
-}
-
-/* Return true if our openat implementation must resort to
- using save_cwd and restore_cwd. */
-bool
-openat_needs_fchdir (void)
-{
- bool needs_fchdir = true;
- int fd = open ("/", O_RDONLY);
-
- if (0 <= fd)
- {
- char buf[OPENAT_BUFFER_SIZE];
- char *proc_file = openat_proc_name (buf, fd, ".");
- if (proc_file)
- {
- needs_fchdir = false;
- if (proc_file != buf)
- free (proc_file);
- }
- close (fd);
- }
-
- return needs_fchdir;
-}
-
-#if !HAVE_FDOPENDIR
-
-/* Replacement for Solaris' function by the same name.
- <http://www.google.com/search?q=fdopendir+site:docs.sun.com>
- First, try to simulate it via opendir ("/proc/self/fd/FD"). Failing
- that, simulate it by doing save_cwd/fchdir/opendir(".")/restore_cwd.
- If either the save_cwd or the restore_cwd fails (relatively unlikely),
- then give a diagnostic and exit nonzero.
- Otherwise, this function works just like Solaris' fdopendir.
-
- W A R N I N G:
- Unlike the other fd-related functions here, this one
- effectively consumes its FD parameter. The caller should not
- close or otherwise manipulate FD if this function returns successfully. */
-DIR *
-fdopendir (int fd)
-{
- struct saved_cwd saved_cwd;
- int saved_errno;
- DIR *dir;
-
- char buf[OPENAT_BUFFER_SIZE];
- char *proc_file = openat_proc_name (buf, fd, ".");
- if (proc_file)
- {
- dir = opendir (proc_file);
- saved_errno = errno;
- }
- else
- {
- dir = NULL;
- saved_errno = EOPNOTSUPP;
- }
-
- /* If the syscall fails with an expected errno value, resort to
- save_cwd/restore_cwd. */
- if (! dir && EXPECTED_ERRNO (saved_errno))
- {
- if (save_cwd (&saved_cwd) != 0)
- openat_save_fail (errno);
-
- if (fchdir (fd) != 0)
- {
- dir = NULL;
- saved_errno = errno;
- }
- else
- {
- dir = opendir (".");
- saved_errno = errno;
-
- if (restore_cwd (&saved_cwd) != 0)
- openat_restore_fail (errno);
- }
-
- free_cwd (&saved_cwd);
- }
-
- if (dir)
- close (fd);
- if (proc_file != buf)
- free (proc_file);
- errno = saved_errno;
- return dir;
-}
-
-#endif
-
-/* Replacement for Solaris' function by the same name.
- <http://www.google.com/search?q=fstatat+site:docs.sun.com>
- First, try to simulate it via l?stat ("/proc/self/fd/FD/FILE").
- Failing that, simulate it via save_cwd/fchdir/(stat|lstat)/restore_cwd.
- If either the save_cwd or the restore_cwd fails (relatively unlikely),
- then give a diagnostic and exit nonzero.
- Otherwise, this function works just like Solaris' fstatat. */
-
-#define AT_FUNC_NAME fstatat
-#define AT_FUNC_F1 lstat
-#define AT_FUNC_F2 stat
-#define AT_FUNC_USE_F1_COND flag == AT_SYMLINK_NOFOLLOW
-#define AT_FUNC_POST_FILE_PARAM_DECLS , struct stat *st, int flag
-#define AT_FUNC_POST_FILE_ARGS , st
-#include "at-func.c"
-#undef AT_FUNC_NAME
-#undef AT_FUNC_F1
-#undef AT_FUNC_F2
-#undef AT_FUNC_USE_F1_COND
-#undef AT_FUNC_POST_FILE_PARAM_DECLS
-#undef AT_FUNC_POST_FILE_ARGS
-
-/* Replacement for Solaris' function by the same name.
- <http://www.google.com/search?q=unlinkat+site:docs.sun.com>
- First, try to simulate it via (unlink|rmdir) ("/proc/self/fd/FD/FILE").
- Failing that, simulate it via save_cwd/fchdir/(unlink|rmdir)/restore_cwd.
- If either the save_cwd or the restore_cwd fails (relatively unlikely),
- then give a diagnostic and exit nonzero.
- Otherwise, this function works just like Solaris' unlinkat. */
-
-#define AT_FUNC_NAME unlinkat
-#define AT_FUNC_F1 rmdir
-#define AT_FUNC_F2 unlink
-#define AT_FUNC_USE_F1_COND flag == AT_REMOVEDIR
-#define AT_FUNC_POST_FILE_PARAM_DECLS , int flag
-#define AT_FUNC_POST_FILE_ARGS /* empty */
-#include "at-func.c"
-#undef AT_FUNC_NAME
-#undef AT_FUNC_F1
-#undef AT_FUNC_F2
-#undef AT_FUNC_USE_F1_COND
-#undef AT_FUNC_POST_FILE_PARAM_DECLS
-#undef AT_FUNC_POST_FILE_ARGS
--- contrib/cpio/lib/argp-parse.c
+++ /dev/null
@@ -1,953 +0,0 @@
-/* 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 at 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
--- contrib/cpio/lib/version-etc.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/* Utility to help print --version output in a consistent format.
- Copyright (C) 1999-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 "version-etc.h"
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#if USE_UNLOCKED_IO
-# include "unlocked-io.h"
-#endif
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-
-enum { COPYRIGHT_YEAR = 2007 };
-
-/* Like version_etc, below, but with the NULL-terminated author list
- provided via a variable of type va_list. */
-void
-version_etc_va (FILE *stream,
- const char *command_name, const char *package,
- const char *version, va_list authors)
-{
- size_t n_authors;
-
- /* Count the number of authors. */
- {
- va_list tmp_authors;
-
- va_copy (tmp_authors, authors);
-
- n_authors = 0;
- while (va_arg (tmp_authors, const char *) != NULL)
- ++n_authors;
- }
-
- if (command_name)
- fprintf (stream, "%s (%s) %s\n", command_name, package, version);
- else
- fprintf (stream, "%s %s\n", package, version);
-
- /* TRANSLATORS: Translate "(C)" to the copyright symbol
- (C-in-a-circle), if this symbol is available in the user's
- locale. Otherwise, do not translate "(C)"; leave it as-is. */
- fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR);
-
- fputs (_("\
-\n\
-License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n\
-This is free software: you are free to change and redistribute it.\n\
-There is NO WARRANTY, to the extent permitted by law.\n\
-\n\
-"),
- stream);
-
- switch (n_authors)
- {
- case 0:
- /* The caller must provide at least one author name. */
- abort ();
- case 1:
- /* TRANSLATORS: %s denotes an author name. */
- vfprintf (stream, _("Written by %s.\n"), authors);
- break;
- case 2:
- /* TRANSLATORS: Each %s denotes an author name. */
- vfprintf (stream, _("Written by %s and %s.\n"), authors);
- break;
- case 3:
- /* TRANSLATORS: Each %s denotes an author name. */
- vfprintf (stream, _("Written by %s, %s, and %s.\n"), authors);
- break;
- case 4:
- /* TRANSLATORS: Each %s denotes an author name.
- You can use line breaks, estimating that each author name occupies
- ca. 16 screen columns and that a screen line has ca. 80 columns. */
- vfprintf (stream, _("Written by %s, %s, %s,\nand %s.\n"), authors);
- break;
- case 5:
- /* TRANSLATORS: Each %s denotes an author name.
- You can use line breaks, estimating that each author name occupies
- ca. 16 screen columns and that a screen line has ca. 80 columns. */
- vfprintf (stream, _("Written by %s, %s, %s,\n%s, and %s.\n"), authors);
- break;
- case 6:
- /* TRANSLATORS: Each %s denotes an author name.
- You can use line breaks, estimating that each author name occupies
- ca. 16 screen columns and that a screen line has ca. 80 columns. */
- vfprintf (stream, _("Written by %s, %s, %s,\n%s, %s, and %s.\n"),
- authors);
- break;
- case 7:
- /* TRANSLATORS: Each %s denotes an author name.
- You can use line breaks, estimating that each author name occupies
- ca. 16 screen columns and that a screen line has ca. 80 columns. */
- vfprintf (stream, _("Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"),
- authors);
- break;
- case 8:
- /* TRANSLATORS: Each %s denotes an author name.
- You can use line breaks, estimating that each author name occupies
- ca. 16 screen columns and that a screen line has ca. 80 columns. */
- vfprintf (stream, _("\
-Written by %s, %s, %s,\n%s, %s, %s, %s,\nand %s.\n"),
- authors);
- break;
- case 9:
- /* TRANSLATORS: Each %s denotes an author name.
- You can use line breaks, estimating that each author name occupies
- ca. 16 screen columns and that a screen line has ca. 80 columns. */
- vfprintf (stream, _("\
-Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"),
- authors);
- break;
- default:
- /* 10 or more authors. Use an abbreviation, since the human reader
- will probably not want to read the entire list anyway. */
- /* TRANSLATORS: Each %s denotes an author name.
- You can use line breaks, estimating that each author name occupies
- ca. 16 screen columns and that a screen line has ca. 80 columns. */
- vfprintf (stream, _("\
-Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"),
- authors);
- break;
- }
- va_end (authors);
-}
-
-
-/* Display the --version information the standard way.
-
- If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of
- the program. The formats are therefore:
-
- PACKAGE VERSION
-
- or
-
- COMMAND_NAME (PACKAGE) VERSION.
-
- The author names are passed as separate arguments, with an additional
- NULL argument at the end. */
-void
-version_etc (FILE *stream,
- const char *command_name, const char *package,
- const char *version, /* const char *author1, ...*/ ...)
-{
- va_list authors;
-
- va_start (authors, version);
- version_etc_va (stream, command_name, package, version, authors);
-}
--- contrib/cpio/lib/save-cwd.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Save and restore current working directory.
-
- Copyright (C) 1995, 1997, 1998, 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. */
-
-/* Written by Jim Meyering. */
-
-#ifndef SAVE_CWD_H
-# define SAVE_CWD_H 1
-
-struct saved_cwd
- {
- int desc;
- char *name;
- };
-
-int save_cwd (struct saved_cwd *cwd);
-int restore_cwd (const struct saved_cwd *cwd);
-void free_cwd (struct saved_cwd *cwd);
-
-#endif /* SAVE_CWD_H */
--- contrib/cpio/lib/fchmodat.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Change the protections of file relative to an open directory.
- 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 */
-
-#include <config.h>
-
-#include "openat.h"
-#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
-#include "save-cwd.h"
-#include "openat-priv.h"
-
-#ifndef HAVE_LCHMOD
-/* Use a different name, to avoid conflicting with any
- system-supplied declaration. */
-# undef lchmod
-# define lchmod lchmod_rpl
-static int lchmod (char const *f, mode_t m) { errno = ENOSYS; return -1; }
-#endif
-
-/* Solaris 10 has no function like this.
- Invoke chmod or lchmod on file, FILE, using mode MODE, in the directory
- open on descriptor FD. If possible, do it without changing the
- working directory. Otherwise, resort to using save_cwd/fchdir,
- then mkdir/restore_cwd. If either the save_cwd or the restore_cwd
- fails, then give a diagnostic and exit nonzero.
- Note that an attempt to use a FLAG value of AT_SYMLINK_NOFOLLOW
- on a system without lchmod support causes this function to fail. */
-
-#define AT_FUNC_NAME fchmodat
-#define AT_FUNC_F1 lchmod
-#define AT_FUNC_F2 chmod
-#define AT_FUNC_USE_F1_COND flag == AT_SYMLINK_NOFOLLOW
-#define AT_FUNC_POST_FILE_PARAM_DECLS , mode_t mode, int flag
-#define AT_FUNC_POST_FILE_ARGS , mode
-#include "at-func.c"
--- contrib/cpio/lib/rmt-command.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#define LOCALEDIR "/usr/local/share/locale"
-#ifndef DEFAULT_RMT_COMMAND
-# define DEFAULT_RMT_COMMAND "/usr/local/libexec/rmt"
-#endif
--- contrib/cpio/lib/gnulib.mk
+++ /dev/null
@@ -1,1244 +0,0 @@
-## DO NOT EDIT! GENERATED AUTOMATICALLY!
-## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
-#
-# This file is free software, distributed under the terms of the GNU
-# General Public License. As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
-# the same distribution terms as the rest of that program.
-#
-# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libcpio --source-base=.#bootmp/lib --m4-base=.#bootmp/m4 --doc-base=.#bootmp/doc --aux-dir=.#bootmp/build-aux --avoid=lock --avoid=size_max --no-libtool --macro-prefix=gl alloca argmatch argp closeout configmake dirname error fileblocks fnmatch-gnu full-write getdate getopt gettext hash inttostr inttypes lchown obstack quote quotearg safe-read savedir stdbool stdint stpcpy strerror strtol unlocked-io utimens version-etc-fsf xalloc xalloc-die
-
-AUTOMAKE_OPTIONS = 1.5 gnits
-
-noinst_HEADERS =
-noinst_LIBRARIES =
-noinst_LTLIBRARIES =
-EXTRA_DIST =
-BUILT_SOURCES =
-SUFFIXES =
-MOSTLYCLEANFILES = core *.stackdump
-MOSTLYCLEANDIRS =
-CLEANFILES =
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
-
-AM_CPPFLAGS =
-
-noinst_LIBRARIES += libcpio.a
-
-libcpio_a_SOURCES =
-libcpio_a_LIBADD = $(gl_LIBOBJS)
-libcpio_a_DEPENDENCIES = $(gl_LIBOBJS)
-EXTRA_libcpio_a_SOURCES =
-
-## begin gnulib module absolute-header
-
-# Use this preprocessor expression to decide whether #include_next works.
-# Do not rely on a 'configure'-time test for this, since the expression
-# might appear in an installed header, which is used by some other compiler.
-HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
-
-## end gnulib module absolute-header
-
-## begin gnulib module alloca
-
-
-EXTRA_DIST += alloca.c
-
-EXTRA_libcpio_a_SOURCES += alloca.c
-
-libcpio_a_LIBADD += @ALLOCA@
-libcpio_a_DEPENDENCIES += @ALLOCA@
-## end gnulib module alloca
-
-## begin gnulib module alloca-opt
-
-BUILT_SOURCES += $(ALLOCA_H)
-
-# We need the following in order to create <alloca.h> when the system
-# doesn't have one that works with the given compiler.
-alloca.h: alloca_.h
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/alloca_.h; \
- } > $@-t
- mv -f $@-t $@
-MOSTLYCLEANFILES += alloca.h alloca.h-t
-
-EXTRA_DIST += alloca_.h
-
-## end gnulib module alloca-opt
-
-## begin gnulib module allocsa
-
-libcpio_a_SOURCES += allocsa.h allocsa.c
-
-EXTRA_DIST += allocsa.valgrind
-
-## end gnulib module allocsa
-
-## begin gnulib module argmatch
-
-
-EXTRA_DIST += argmatch.c argmatch.h
-
-EXTRA_libcpio_a_SOURCES += argmatch.c
-
-## end gnulib module argmatch
-
-## begin gnulib module argp
-
-libcpio_a_SOURCES += argp.h argp-ba.c argp-eexst.c \
- argp-fmtstream.c argp-fmtstream.h argp-fs-xinl.c argp-help.c \
- argp-namefrob.h argp-parse.c argp-pin.c argp-pv.c argp-pvh.c \
- argp-xinl.c
-
-## end gnulib module argp
-
-## begin gnulib module canonicalize-lgpl
-
-
-EXTRA_DIST += canonicalize-lgpl.c canonicalize.h
-
-EXTRA_libcpio_a_SOURCES += canonicalize-lgpl.c
-
-## end gnulib module canonicalize-lgpl
-
-## begin gnulib module chdir-long
-
-
-EXTRA_DIST += chdir-long.c chdir-long.h
-
-EXTRA_libcpio_a_SOURCES += chdir-long.c
-
-## end gnulib module chdir-long
-
-## begin gnulib module chown
-
-
-EXTRA_DIST += chown.c fchown-stub.c
-
-EXTRA_libcpio_a_SOURCES += chown.c fchown-stub.c
-
-## end gnulib module chown
-
-## begin gnulib module close-stream
-
-
-EXTRA_DIST += close-stream.c close-stream.h
-
-EXTRA_libcpio_a_SOURCES += close-stream.c
-
-## end gnulib module close-stream
-
-## begin gnulib module closeout
-
-
-EXTRA_DIST += closeout.c closeout.h
-
-EXTRA_libcpio_a_SOURCES += closeout.c
-
-## end gnulib module closeout
-
-## begin gnulib module configmake
-
-# Retrieve values of the variables through 'configure' followed by
-# 'make', not directly through 'configure', so that a user who
-# sets some of these variables consistently on the 'make' command
-# line gets correct results.
-#
-# One advantage of this approach, compared to the classical
-# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
-# is that it protects against the use of undefined variables.
-# If, say, $(libdir) is not set in the Makefile, LIBDIR is not
-# defined by this module, and code using LIBDIR gives a
-# compilation error.
-#
-# Another advantage is that 'make' output is shorter.
-#
-# Listed in the same order as the GNU makefile conventions.
-# The Automake-defined pkg* macros are appended, in the order
-# listed in the Automake 1.10a+ documentation.
-configmake.h: Makefile
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- echo '#define PREFIX "$(prefix)"'; \
- echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
- echo '#define BINDIR "$(bindir)"'; \
- echo '#define SBINDIR "$(sbindir)"'; \
- echo '#define LIBEXECDIR "$(libexecdir)"'; \
- echo '#define DATAROOTDIR "$(datarootdir)"'; \
- echo '#define DATADIR "$(datadir)"'; \
- echo '#define SYSCONFDIR "$(sysconfdir)"'; \
- echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
- echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
- echo '#define INCLUDEDIR "$(includedir)"'; \
- echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
- echo '#define DOCDIR "$(docdir)"'; \
- echo '#define INFODIR "$(infodir)"'; \
- echo '#define HTMLDIR "$(htmldir)"'; \
- echo '#define DVIDIR "$(dvidir)"'; \
- echo '#define PDFDIR "$(pdfdir)"'; \
- echo '#define PSDIR "$(psdir)"'; \
- echo '#define LIBDIR "$(libdir)"'; \
- echo '#define LISPDIR "$(lispdir)"'; \
- echo '#define LOCALEDIR "$(localedir)"'; \
- echo '#define MANDIR "$(mandir)"'; \
- echo '#define MANEXT "$(manext)"'; \
- echo '#define PKGDATADIR "$(pkgdatadir)"'; \
- echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
- echo '#define PKGLIBDIR "$(pkglibdir)"'; \
- echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
- } | sed '/""/d' > $@-t
- mv $@-t $@
-BUILT_SOURCES += configmake.h
-CLEANFILES += configmake.h configmake.h-t
-
-## end gnulib module configmake
-
-## begin gnulib module dirfd
-
-
-EXTRA_DIST += dirfd.c dirfd.h
-
-EXTRA_libcpio_a_SOURCES += dirfd.c
-
-## end gnulib module dirfd
-
-## begin gnulib module dirname
-
-
-EXTRA_DIST += basename.c dirname.c dirname.h stripslash.c
-
-EXTRA_libcpio_a_SOURCES += basename.c dirname.c stripslash.c
-
-## end gnulib module dirname
-
-## begin gnulib module dup2
-
-
-EXTRA_DIST += dup2.c
-
-EXTRA_libcpio_a_SOURCES += dup2.c
-
-## end gnulib module dup2
-
-## begin gnulib module error
-
-
-EXTRA_DIST += error.c error.h
-
-EXTRA_libcpio_a_SOURCES += error.c
-
-## end gnulib module error
-
-## begin gnulib module exitfail
-
-
-EXTRA_DIST += exitfail.c exitfail.h
-
-EXTRA_libcpio_a_SOURCES += exitfail.c
-
-## end gnulib module exitfail
-
-## begin gnulib module fchdir
-
-BUILT_SOURCES += $(DIRENT_H)
-
-# We need the following in order to create <dirent.h> when the system
-# doesn't have one that works with the given compiler.
-dirent.h: dirent_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''ABSOLUTE_DIRENT_H''@|$(ABSOLUTE_DIRENT_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
- < $(srcdir)/dirent_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += dirent.h dirent.h-t
-
-EXTRA_DIST += dirent_.h fchdir.c
-
-EXTRA_libcpio_a_SOURCES += fchdir.c
-
-## end gnulib module fchdir
-
-## begin gnulib module fcntl
-
-BUILT_SOURCES += $(FCNTL_H)
-
-# We need the following in order to create <fcntl.h> when the system
-# doesn't have one that works with the given compiler.
-fcntl.h: fcntl_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''ABSOLUTE_FCNTL_H''@|$(ABSOLUTE_FCNTL_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- < $(srcdir)/fcntl_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += fcntl.h fcntl.h-t
-
-EXTRA_DIST += fcntl_.h
-
-## end gnulib module fcntl
-
-## begin gnulib module fcntl-safer
-
-
-EXTRA_DIST += creat-safer.c fcntl--.h fcntl-safer.h open-safer.c
-
-EXTRA_libcpio_a_SOURCES += creat-safer.c open-safer.c
-
-## end gnulib module fcntl-safer
-
-## begin gnulib module fileblocks
-
-
-EXTRA_DIST += fileblocks.c
-
-EXTRA_libcpio_a_SOURCES += fileblocks.c
-
-## end gnulib module fileblocks
-
-## begin gnulib module float
-
-BUILT_SOURCES += $(FLOAT_H)
-
-# We need the following in order to create <float.h> when the system
-# doesn't have one that works with the given compiler.
-float.h: float_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''ABSOLUTE_FLOAT_H''@|$(ABSOLUTE_FLOAT_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- < $(srcdir)/float_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += float.h float.h-t
-
-EXTRA_DIST += float_.h
-
-## end gnulib module float
-
-## begin gnulib module fnmatch
-
-BUILT_SOURCES += $(FNMATCH_H)
-
-# We need the following in order to create <fnmatch.h> when the system
-# doesn't have one that supports the required API.
-fnmatch.h: fnmatch_.h
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/fnmatch_.h; \
- } > $@-t
- mv -f $@-t $@
-MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
-
-EXTRA_DIST += fnmatch.c fnmatch_.h fnmatch_loop.c
-
-EXTRA_libcpio_a_SOURCES += fnmatch.c fnmatch_loop.c
-
-## end gnulib module fnmatch
-
-## begin gnulib module fpending
-
-
-EXTRA_DIST += __fpending.c __fpending.h
-
-EXTRA_libcpio_a_SOURCES += __fpending.c
-
-## end gnulib module fpending
-
-## begin gnulib module full-write
-
-libcpio_a_SOURCES += full-write.h full-write.c
-
-## end gnulib module full-write
-
-## begin gnulib module getcwd
-
-
-EXTRA_DIST += getcwd.c
-
-EXTRA_libcpio_a_SOURCES += getcwd.c
-
-## end gnulib module getcwd
-
-## begin gnulib module getdate
-
-libcpio_a_SOURCES += getdate.y
-BUILT_SOURCES += getdate.c
-MAINTAINERCLEANFILES += getdate.c
-EXTRA_DIST += getdate.c
-
-EXTRA_DIST += getdate.h
-
-## end gnulib module getdate
-
-## begin gnulib module getopt
-
-BUILT_SOURCES += $(GETOPT_H)
-
-# We need the following in order to create <getopt.h> when the system
-# doesn't have one that works with the given compiler.
-getopt.h: getopt_.h
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/getopt_.h; \
- } > $@-t
- mv -f $@-t $@
-MOSTLYCLEANFILES += getopt.h getopt.h-t
-
-EXTRA_DIST += getopt.c getopt1.c getopt_.h getopt_int.h
-
-EXTRA_libcpio_a_SOURCES += getopt.c getopt1.c
-
-## end gnulib module getopt
-
-## begin gnulib module gettext
-
-# This is for those projects which use "gettextize --intl" to put a source-code
-# copy of libintl into their package. In such projects, every Makefile.am needs
-# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
-# For the Makefile.ams in other directories it is the maintainer's
-# responsibility; for the one from gnulib we do it here.
-# This option has no effect when the user disables NLS (because then the intl
-# directory contains no libintl.h file) or when the project does not use
-# "gettextize --intl".
-#AM_CPPFLAGS += -I$(top_builddir)/intl
-
-## end gnulib module gettext
-
-## begin gnulib module gettext-h
-
-libcpio_a_SOURCES += gettext.h
-
-## end gnulib module gettext-h
-
-## begin gnulib module gettime
-
-
-EXTRA_DIST += gettime.c
-
-EXTRA_libcpio_a_SOURCES += gettime.c
-
-## end gnulib module gettime
-
-## begin gnulib module gettimeofday
-
-
-EXTRA_DIST += gettimeofday.c
-
-EXTRA_libcpio_a_SOURCES += gettimeofday.c
-
-## end gnulib module gettimeofday
-
-## begin gnulib module hash
-
-
-EXTRA_DIST += hash.c hash.h
-
-EXTRA_libcpio_a_SOURCES += hash.c
-
-## end gnulib module hash
-
-## begin gnulib module intprops
-
-
-EXTRA_DIST += intprops.h
-
-## end gnulib module intprops
-
-## begin gnulib module inttostr
-
-
-EXTRA_DIST += imaxtostr.c inttostr.c inttostr.h offtostr.c uinttostr.c umaxtostr.c
-
-EXTRA_libcpio_a_SOURCES += imaxtostr.c inttostr.c offtostr.c uinttostr.c umaxtostr.c
-
-## end gnulib module inttostr
-
-## begin gnulib module inttypes
-
-BUILT_SOURCES += $(INTTYPES_H)
-
-# We need the following in order to create <inttypes.h> when the system
-# doesn't have one that works with the given compiler.
-inttypes.h: inttypes_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
- -e 's|@''ABSOLUTE_INTTYPES_H''@|$(ABSOLUTE_INTTYPES_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
- -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
- -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
- -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
- -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
- -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
- -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
- -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
- -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
- -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
- -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
- -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
- < $(srcdir)/inttypes_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += inttypes.h inttypes.h-t
-
-EXTRA_DIST += inttypes_.h
-
-## end gnulib module inttypes
-
-## begin gnulib module lchown
-
-
-EXTRA_DIST += lchown.c lchown.h
-
-EXTRA_libcpio_a_SOURCES += lchown.c
-
-## end gnulib module lchown
-
-## begin gnulib module link-warning
-
-LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h
-
-## end gnulib module link-warning
-
-## begin gnulib module lstat
-
-
-EXTRA_DIST += lstat.c lstat.h
-
-EXTRA_libcpio_a_SOURCES += lstat.c
-
-## end gnulib module lstat
-
-## begin gnulib module malloc
-
-
-EXTRA_DIST += malloc.c
-
-EXTRA_libcpio_a_SOURCES += malloc.c
-
-## end gnulib module malloc
-
-## begin gnulib module mempcpy
-
-
-EXTRA_DIST += mempcpy.c
-
-EXTRA_libcpio_a_SOURCES += mempcpy.c
-
-## end gnulib module mempcpy
-
-## begin gnulib module memrchr
-
-
-EXTRA_DIST += memrchr.c
-
-EXTRA_libcpio_a_SOURCES += memrchr.c
-
-## end gnulib module memrchr
-
-## begin gnulib module mktime
-
-
-EXTRA_DIST += mktime.c
-
-EXTRA_libcpio_a_SOURCES += mktime.c
-
-## end gnulib module mktime
-
-## begin gnulib module obstack
-
-
-EXTRA_DIST += obstack.c obstack.h
-
-EXTRA_libcpio_a_SOURCES += obstack.c
-
-## end gnulib module obstack
-
-## begin gnulib module openat
-
-
-EXTRA_DIST += at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c openat-priv.h openat-proc.c openat.c openat.h
-
-EXTRA_libcpio_a_SOURCES += at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c openat-proc.c openat.c
-
-## end gnulib module openat
-
-## begin gnulib module openat-die
-
-libcpio_a_SOURCES += openat-die.c
-
-## end gnulib module openat-die
-
-## begin gnulib module pathmax
-
-
-EXTRA_DIST += pathmax.h
-
-## end gnulib module pathmax
-
-## begin gnulib module quote
-
-
-EXTRA_DIST += quote.c quote.h
-
-EXTRA_libcpio_a_SOURCES += quote.c
-
-## end gnulib module quote
-
-## begin gnulib module quotearg
-
-
-EXTRA_DIST += quotearg.c quotearg.h
-
-EXTRA_libcpio_a_SOURCES += quotearg.c
-
-## end gnulib module quotearg
-
-## begin gnulib module readlink
-
-
-EXTRA_DIST += readlink.c
-
-EXTRA_libcpio_a_SOURCES += readlink.c
-
-## end gnulib module readlink
-
-## begin gnulib module safe-read
-
-
-EXTRA_DIST += safe-read.c safe-read.h
-
-EXTRA_libcpio_a_SOURCES += safe-read.c
-
-## end gnulib module safe-read
-
-## begin gnulib module safe-write
-
-
-EXTRA_DIST += safe-write.c safe-write.h
-
-EXTRA_libcpio_a_SOURCES += safe-write.c
-
-## end gnulib module safe-write
-
-## begin gnulib module same-inode
-
-
-EXTRA_DIST += same-inode.h
-
-## end gnulib module same-inode
-
-## begin gnulib module save-cwd
-
-
-EXTRA_DIST += save-cwd.c save-cwd.h
-
-EXTRA_libcpio_a_SOURCES += save-cwd.c
-
-## end gnulib module save-cwd
-
-## begin gnulib module savedir
-
-
-EXTRA_DIST += savedir.c savedir.h
-
-EXTRA_libcpio_a_SOURCES += savedir.c
-
-## end gnulib module savedir
-
-## begin gnulib module setenv
-
-
-EXTRA_DIST += setenv.c setenv.h unsetenv.c
-
-EXTRA_libcpio_a_SOURCES += setenv.c unsetenv.c
-
-## end gnulib module setenv
-
-## begin gnulib module sleep
-
-
-EXTRA_DIST += sleep.c
-
-EXTRA_libcpio_a_SOURCES += sleep.c
-
-## end gnulib module sleep
-
-## begin gnulib module stdbool
-
-BUILT_SOURCES += $(STDBOOL_H)
-
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-stdbool.h: stdbool_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += stdbool.h stdbool.h-t
-
-EXTRA_DIST += stdbool_.h
-
-## end gnulib module stdbool
-
-## begin gnulib module stdint
-
-BUILT_SOURCES += $(STDINT_H)
-
-# We need the following in order to create <stdint.h> when the system
-# doesn't have one that works with the given compiler.
-stdint.h: stdint_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
- -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
- -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
- -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
- -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
- -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
- -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
- -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
- -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
- -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
- -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
- -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
- -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
- -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
- -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
- -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
- < $(srcdir)/stdint_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += stdint.h stdint.h-t
-
-EXTRA_DIST += stdint_.h
-
-## end gnulib module stdint
-
-## begin gnulib module stdio
-
-BUILT_SOURCES += stdio.h
-
-# We need the following in order to create <stdio.h> when the system
-# doesn't have one that works with the given compiler.
-stdio.h: stdio_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''ABSOLUTE_STDIO_H''@|$(ABSOLUTE_STDIO_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
- -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
- -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
- -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
- -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
- -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
- -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
- -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
- -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
- -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
- -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
- -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
- -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
- -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
- -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
- -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
- -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
- -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
- -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
- -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
- -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
- -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
- -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
- -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
- -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
- -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
- < $(srcdir)/stdio_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += stdio.h stdio.h-t
-
-EXTRA_DIST += stdio_.h
-
-## end gnulib module stdio
-
-## begin gnulib module stdlib
-
-BUILT_SOURCES += stdlib.h
-
-# We need the following in order to create <stdlib.h> when the system
-# doesn't have one that works with the given compiler.
-stdlib.h: stdlib_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''ABSOLUTE_STDLIB_H''@|$(ABSOLUTE_STDLIB_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
- -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
- -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
- -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
- -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
- -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
- < $(srcdir)/stdlib_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += stdlib.h stdlib.h-t
-
-EXTRA_DIST += stdlib_.h
-
-## end gnulib module stdlib
-
-## begin gnulib module stpcpy
-
-
-EXTRA_DIST += stpcpy.c
-
-EXTRA_libcpio_a_SOURCES += stpcpy.c
-
-## end gnulib module stpcpy
-
-## begin gnulib module strcase
-
-
-EXTRA_DIST += strcasecmp.c strncasecmp.c
-
-EXTRA_libcpio_a_SOURCES += strcasecmp.c strncasecmp.c
-
-## end gnulib module strcase
-
-## begin gnulib module strchrnul
-
-
-EXTRA_DIST += strchrnul.c
-
-EXTRA_libcpio_a_SOURCES += strchrnul.c
-
-## end gnulib module strchrnul
-
-## begin gnulib module strdup
-
-
-EXTRA_DIST += strdup.c
-
-EXTRA_libcpio_a_SOURCES += strdup.c
-
-## end gnulib module strdup
-
-## begin gnulib module strerror
-
-
-EXTRA_DIST += strerror.c
-
-EXTRA_libcpio_a_SOURCES += strerror.c
-
-## end gnulib module strerror
-
-## begin gnulib module string
-
-BUILT_SOURCES += string.h
-
-# We need the following in order to create <string.h> when the system
-# doesn't have one that works with the given compiler.
-string.h: string_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
- -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
- -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
- -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
- -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
- -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
- -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
- -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
- -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
- -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
- -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
- -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
- -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
- -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
- -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
- -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
- -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
- -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
- -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
- -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
- -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
- -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
- -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
- -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
- -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
- -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
- -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
- -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
- -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
- -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
- -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
- -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
- -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
- -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
- -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
- -e 's|@''HAVE_STRNDUP''@|$(HAVE_STRNDUP)|g' \
- -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
- -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
- -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
- -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
- -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
- -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
- < $(srcdir)/string_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += string.h string.h-t
-
-EXTRA_DIST += string_.h
-
-## end gnulib module string
-
-## begin gnulib module strndup
-
-
-EXTRA_DIST += strndup.c
-
-EXTRA_libcpio_a_SOURCES += strndup.c
-
-## end gnulib module strndup
-
-## begin gnulib module strnlen
-
-
-EXTRA_DIST += strnlen.c
-
-EXTRA_libcpio_a_SOURCES += strnlen.c
-
-## end gnulib module strnlen
-
-## begin gnulib module strtol
-
-
-EXTRA_DIST += strtol.c
-
-EXTRA_libcpio_a_SOURCES += strtol.c
-
-## end gnulib module strtol
-
-## begin gnulib module sys_stat
-
-BUILT_SOURCES += $(SYS_STAT_H)
-
-# We need the following in order to create <sys/stat.h> when the system
-# has one that is incomplete.
-sys/stat.h: sys_stat_.h
- @MKDIR_P@ sys
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''HAVE_IO_H''@|$(HAVE_IO_H)|g' \
- -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
- -e 's|@''HAVE_DECL_MKDIR''@|$(HAVE_DECL_MKDIR)|g' \
- < $(srcdir)/sys_stat_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
-MOSTLYCLEANDIRS += sys
-
-EXTRA_DIST += sys_stat_.h
-
-## end gnulib module sys_stat
-
-## begin gnulib module sys_time
-
-BUILT_SOURCES += $(SYS_TIME_H)
-
-# We need the following in order to create <sys/time.h> when the system
-# doesn't have one that works with the given compiler.
-sys/time.h: sys_time_.h
- @MKDIR_P@ sys
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
- -e 's|@''ABSOLUTE_SYS_TIME_H''@|$(ABSOLUTE_SYS_TIME_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
- -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
- < $(srcdir)/sys_time_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += sys/time.h sys/time.h-t
-
-EXTRA_DIST += sys_time_.h
-
-## end gnulib module sys_time
-
-## begin gnulib module sysexits
-
-BUILT_SOURCES += $(SYSEXITS_H)
-
-# We need the following in order to create <sysexits.h> when the system
-# doesn't have one that works with the given compiler.
-sysexits.h: sysexits_.h
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_SYSEXITS_H''@|$(HAVE_SYSEXITS_H)|g' \
- -e 's|@''ABSOLUTE_SYSEXITS_H''@|$(ABSOLUTE_SYSEXITS_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- < $(srcdir)/sysexits_.h; \
- } > $@-t
- mv -f $@-t $@
-MOSTLYCLEANFILES += sysexits.h sysexits.h-t
-
-EXTRA_DIST += sysexits_.h
-
-## end gnulib module sysexits
-
-## begin gnulib module time
-
-BUILT_SOURCES += time.h
-
-# We need the following in order to create <time.h> when the system
-# doesn't have one that works with the given compiler.
-time.h: time_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@ABSOLUTE_TIME_H''@|$(ABSOLUTE_TIME_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
- -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
- -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
- -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
- -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
- -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
- < $(srcdir)/time_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += time.h time.h-t
-
-EXTRA_DIST += time_.h
-
-## end gnulib module time
-
-## begin gnulib module time_r
-
-
-EXTRA_DIST += time_r.c
-
-EXTRA_libcpio_a_SOURCES += time_r.c
-
-## end gnulib module time_r
-
-## begin gnulib module timespec
-
-
-EXTRA_DIST += timespec.h
-
-## end gnulib module timespec
-
-## begin gnulib module unistd
-
-BUILT_SOURCES += unistd.h
-
-# We need the following in order to create an empty placeholder for
-# <unistd.h> when the system doesn't have one.
-unistd.h: unistd_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
- -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
- -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
- -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
- -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
- -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
- -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
- -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
- -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
- -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
- -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
- -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
- -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
- -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
- -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
- -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
- -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
- -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
- -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
- < $(srcdir)/unistd_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += unistd.h unistd.h-t
-
-EXTRA_DIST += unistd_.h
-
-## end gnulib module unistd
-
-## begin gnulib module unistd-safer
-
-
-EXTRA_DIST += dup-safer.c fd-safer.c pipe-safer.c unistd--.h unistd-safer.h
-
-EXTRA_libcpio_a_SOURCES += dup-safer.c fd-safer.c pipe-safer.c
-
-## end gnulib module unistd-safer
-
-## begin gnulib module unlocked-io
-
-
-EXTRA_DIST += unlocked-io.h
-
-## end gnulib module unlocked-io
-
-## begin gnulib module utimens
-
-
-EXTRA_DIST += utimens.c utimens.h
-
-EXTRA_libcpio_a_SOURCES += utimens.c
-
-## end gnulib module utimens
-
-## begin gnulib module vasnprintf
-
-
-EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h
-
-EXTRA_libcpio_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c
-
-## end gnulib module vasnprintf
-
-## begin gnulib module verify
-
-libcpio_a_SOURCES += verify.h
-
-## end gnulib module verify
-
-## begin gnulib module version-etc
-
-libcpio_a_SOURCES += version-etc.h version-etc.c
-
-## end gnulib module version-etc
-
-## begin gnulib module version-etc-fsf
-
-libcpio_a_SOURCES += version-etc-fsf.c
-
-## end gnulib module version-etc-fsf
-
-## begin gnulib module vsnprintf
-
-
-EXTRA_DIST += vsnprintf.c
-
-EXTRA_libcpio_a_SOURCES += vsnprintf.c
-
-## end gnulib module vsnprintf
-
-## begin gnulib module wchar
-
-BUILT_SOURCES += $(WCHAR_H)
-
-# We need the following in order to create <wchar.h> when the system
-# version does not work standalone.
-wchar.h: wchar_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''ABSOLUTE_WCHAR_H''@|$(ABSOLUTE_WCHAR_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- < $(srcdir)/wchar_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += wchar.h wchar.h-t
-
-EXTRA_DIST += wchar_.h
-
-## end gnulib module wchar
-
-## begin gnulib module wctype
-
-BUILT_SOURCES += $(WCTYPE_H)
-
-# We need the following in order to create <wctype.h> when the system
-# doesn't have one that works with the given compiler.
-wctype.h: wctype_.h
- rm -f $@-t $@
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
- -e 's|@''ABSOLUTE_WCTYPE_H''@|$(ABSOLUTE_WCTYPE_H)|g' \
- -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
- -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
- -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
- < $(srcdir)/wctype_.h; \
- } > $@-t
- mv $@-t $@
-MOSTLYCLEANFILES += wctype.h wctype.h-t
-
-EXTRA_DIST += wctype_.h
-
-## end gnulib module wctype
-
-## begin gnulib module xalloc
-
-
-EXTRA_DIST += xalloc.h xmalloc.c
-
-EXTRA_libcpio_a_SOURCES += xmalloc.c
-
-## end gnulib module xalloc
-
-## begin gnulib module xalloc-die
-
-libcpio_a_SOURCES += xalloc-die.c
-
-## end gnulib module xalloc-die
-
-## begin gnulib module xgetcwd
-
-
-EXTRA_DIST += xgetcwd.c xgetcwd.h
-
-EXTRA_libcpio_a_SOURCES += xgetcwd.c
-
-## end gnulib module xgetcwd
-
-## begin gnulib module xsize
-
-libcpio_a_SOURCES += xsize.h
-
-## end gnulib module xsize
-
-## begin gnulib module xstrndup
-
-libcpio_a_SOURCES += xstrndup.h xstrndup.c
-
-## end gnulib module xstrndup
-
-
-mostlyclean-local: mostlyclean-generic
- @for dir in '' $(MOSTLYCLEANDIRS); do \
- if test -n "$$dir" && test -d $$dir; then \
- echo "rmdir $$dir"; rmdir $$dir; \
- fi; \
- done
--- contrib/cpio/lib/getdate.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Parse a string into an internal time stamp.
-
- Copyright (C) 1995, 1997, 1998, 2003, 2004, 2007 Free Software
- Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include <stdbool.h>
-#include <time.h>
-
-bool get_date (struct timespec *, char const *, struct timespec const *);
--- contrib/cpio/lib/mempcpy.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copy memory area and return pointer after last written byte.
- Copyright (C) 2003, 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. */
-
-#include <config.h>
-
-/* Specification. */
-#include <string.h>
-
-/* Copy N bytes of SRC to DEST, return pointer to bytes after the
- last written byte. */
-void *
-mempcpy (void *dest, const void *src, size_t n)
-{
- return (char *) memcpy (dest, src, n) + n;
-}
--- contrib/cpio/lib/at-func.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* 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
--- contrib/cpio/lib/utimens.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <time.h>
-int gl_futimens (int, char const *, struct timespec const [2]);
-int utimens (char const *, struct timespec const [2]);
--- contrib/cpio/lib/argp-eexst.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 at 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;
--- contrib/cpio/lib/readlink.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Stub for readlink().
- Copyright (C) 2003-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. */
-
-#include <config.h>
-
-/* Specification. */
-#include <unistd.h>
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stddef.h>
-
-#if !HAVE_READLINK
-
-/* readlink() substitute for systems that don't have a readlink() function,
- such as DJGPP 2.03 and mingw32. */
-
-/* The official POSIX return type of readlink() is ssize_t, but since here
- we have no declaration in a public header file, we use 'int' as return
- type. */
-
-int
-readlink (const char *path, char *buf, size_t bufsize)
-{
- struct stat statbuf;
-
- /* In general we should use lstat() here, not stat(). But on platforms
- without symbolic links lstat() - if it exists - would be equivalent to
- stat(), therefore we can use stat(). This saves us a configure check. */
- if (stat (path, &statbuf) >= 0)
- errno = EINVAL;
- return -1;
-}
-
-#endif
--- contrib/cpio/lib/fchown-stub.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <config.h>
-
-#include <sys/types.h>
-#include <errno.h>
-
-/* A trivial substitute for `fchown'.
-
- DJGPP 2.03 and earlier (and perhaps later) don't have `fchown',
- so we pretend no-one has permission for this operation. */
-
-int
-fchown (int fd, uid_t uid, gid_t gid)
-{
- errno = EPERM;
- return -1;
-}
--- contrib/cpio/lib/fcntl-safer.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Invoke fcntl-like functions, but avoid some glitches.
-
- 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. */
-
-/* Written by Paul Eggert. */
-
-#include <sys/types.h>
-
-int open_safer (char const *, int, ...);
-int creat_safer (char const *, mode_t);
--- contrib/cpio/lib/system.h
+++ /dev/null
@@ -1,475 +0,0 @@
-/* System dependent definitions for GNU tar.
-
- Copyright (C) 1994, 1995, 1996, 1997, 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. */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <alloca.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
-#endif
-
-#include <sys/types.h>
-#include <ctype.h>
-
-/* IN_CTYPE_DOMAIN (C) is nonzero if the unsigned char C can safely be given
- as an argument to <ctype.h> macros like `isspace'. */
-#if STDC_HEADERS
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) ((unsigned) (c) <= 0177)
-#endif
-
-#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
-#define ISODIGIT(c) ((unsigned) (c) - '0' <= 7)
-#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))
-#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
-
-/* Declare string and memory handling routines. Take care that an ANSI
- string.h and pre-ANSI memory.h might conflict, and that memory.h and
- strings.h conflict on some systems. */
-
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-# if !STDC_HEADERS && HAVE_MEMORY_H
-# include <memory.h>
-# endif
-#else
-# include <strings.h>
-# ifndef strchr
-# define strchr index
-# endif
-# ifndef strrchr
-# define strrchr rindex
-# endif
-# ifndef memcpy
-# define memcpy(d, s, n) bcopy ((char const *) (s), (char *) (d), n)
-# endif
-# ifndef memcmp
-# define memcmp(a, b, n) bcmp ((char const *) (a), (char const *) (b), n)
-# endif
-#endif
-
-/* Declare errno. */
-
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
-/* Declare open parameters. */
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#else
-# include <sys/file.h>
-#endif
- /* Pick only one of the next three: */
-#ifndef O_RDONLY
-# define O_RDONLY 0 /* only allow read */
-#endif
-#ifndef O_WRONLY
-# define O_WRONLY 1 /* only allow write */
-#endif
-#ifndef O_RDWR
-# define O_RDWR 2 /* both are allowed */
-#endif
-#ifndef O_ACCMODE
-# define O_ACCMODE (O_RDONLY | O_RDWR | O_WRONLY)
-#endif
- /* The rest can be OR-ed in to the above: */
-#ifndef O_CREAT
-# define O_CREAT 8 /* create file if needed */
-#endif
-#ifndef O_EXCL
-# define O_EXCL 16 /* file cannot already exist */
-#endif
-#ifndef O_TRUNC
-# define O_TRUNC 32 /* truncate file on open */
-#endif
-
-#ifndef O_BINARY
-# define O_BINARY 0
-#endif
-#ifndef O_DIRECTORY
-# define O_DIRECTORY 0
-#endif
-#ifndef O_NOATIME
-# define O_NOATIME 0
-#endif
-#ifndef O_NONBLOCK
-# define O_NONBLOCK 0
-#endif
-
-/* Declare file status routines and bits. */
-
-#include <sys/stat.h>
-
-#if !HAVE_LSTAT && !defined lstat
-# define lstat stat
-#endif
-
-#if STX_HIDDEN && !_LARGE_FILES /* AIX */
-# ifdef stat
-# undef stat
-# endif
-# define stat(file_name, buf) statx (file_name, buf, STATSIZE, STX_HIDDEN)
-# ifdef lstat
-# undef lstat
-# endif
-# define lstat(file_name, buf) statx (file_name, buf, STATSIZE, STX_HIDDEN | STX_LINK)
-#endif
-
-#if STAT_MACROS_BROKEN
-# undef S_ISBLK
-# undef S_ISCHR
-# undef S_ISCTG
-# undef S_ISDIR
-# undef S_ISFIFO
-# undef S_ISLNK
-# undef S_ISREG
-# undef S_ISSOCK
-#endif
-
-/* On MSDOS, there are missing things from <sys/stat.h>. */
-#if MSDOS
-# define S_ISUID 0
-# define S_ISGID 0
-# define S_ISVTX 0
-#endif
-
-#ifndef S_ISDIR
-# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
-#endif
-#ifndef S_ISREG
-# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
-#endif
-
-#ifndef S_ISBLK
-# ifdef S_IFBLK
-# define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK)
-# else
-# define S_ISBLK(mode) 0
-# endif
-#endif
-#ifndef S_ISCHR
-# ifdef S_IFCHR
-# define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR)
-# else
-# define S_ISCHR(mode) 0
-# endif
-#endif
-#ifndef S_ISCTG
-# ifdef S_IFCTG
-# define S_ISCTG(mode) (((mode) & S_IFMT) == S_IFCTG)
-# else
-# define S_ISCTG(mode) 0
-# endif
-#endif
-#ifndef S_ISDOOR
-# define S_ISDOOR(mode) 0
-#endif
-#ifndef S_ISFIFO
-# ifdef S_IFIFO
-# define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO)
-# else
-# define S_ISFIFO(mode) 0
-# endif
-#endif
-#ifndef S_ISLNK
-# ifdef S_IFLNK
-# define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
-# else
-# define S_ISLNK(mode) 0
-# endif
-#endif
-#ifndef S_ISSOCK
-# ifdef S_IFSOCK
-# define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK)
-# else
-# define S_ISSOCK(mode) 0
-# endif
-#endif
-
-#if !HAVE_MKFIFO && !defined mkfifo && defined S_IFIFO
-# define mkfifo(file_name, mode) (mknod (file_name, (mode) | S_IFIFO, 0))
-#endif
-
-#ifndef S_ISUID
-# define S_ISUID 0004000
-#endif
-#ifndef S_ISGID
-# define S_ISGID 0002000
-#endif
-#ifndef S_ISVTX
-# define S_ISVTX 0001000
-#endif
-#ifndef S_IRUSR
-# define S_IRUSR 0000400
-#endif
-#ifndef S_IWUSR
-# define S_IWUSR 0000200
-#endif
-#ifndef S_IXUSR
-# define S_IXUSR 0000100
-#endif
-#ifndef S_IRGRP
-# define S_IRGRP 0000040
-#endif
-#ifndef S_IWGRP
-# define S_IWGRP 0000020
-#endif
-#ifndef S_IXGRP
-# define S_IXGRP 0000010
-#endif
-#ifndef S_IROTH
-# define S_IROTH 0000004
-#endif
-#ifndef S_IWOTH
-# define S_IWOTH 0000002
-#endif
-#ifndef S_IXOTH
-# define S_IXOTH 0000001
-#endif
-
-#define MODE_WXUSR (S_IWUSR | S_IXUSR)
-#define MODE_R (S_IRUSR | S_IRGRP | S_IROTH)
-#define MODE_RW (S_IWUSR | S_IWGRP | S_IWOTH | MODE_R)
-#define MODE_RWX (S_IXUSR | S_IXGRP | S_IXOTH | MODE_RW)
-#define MODE_ALL (S_ISUID | S_ISGID | S_ISVTX | MODE_RWX)
-
-/* Include <unistd.h> before any preprocessor test of _POSIX_VERSION. */
-#include <unistd.h>
-
-#ifndef SEEK_SET
-# define SEEK_SET 0
-#endif
-#ifndef SEEK_CUR
-# define SEEK_CUR 1
-#endif
-#ifndef SEEK_END
-# define SEEK_END 2
-#endif
-
-#ifndef STDIN_FILENO
-# define STDIN_FILENO 0
-#endif
-#ifndef STDOUT_FILENO
-# define STDOUT_FILENO 1
-#endif
-#ifndef STDERR_FILENO
-# define STDERR_FILENO 2
-#endif
-
-/* Declare make device, major and minor. Since major is a function on
- SVR4, we have to resort to GOT_MAJOR instead of just testing if
- major is #define'd. */
-
-#if MAJOR_IN_MKDEV
-# include <sys/mkdev.h>
-# if !defined(makedev) && defined(mkdev)
-# define makedev(a,b) mkdev((a),(b))
-# endif
-# define GOT_MAJOR
-#endif
-
-#if MAJOR_IN_SYSMACROS
-# include <sys/sysmacros.h>
-# define GOT_MAJOR
-#endif
-
-/* Some <sys/types.h> defines the macros. */
-#ifdef major
-# define GOT_MAJOR
-#endif
-
-#ifndef GOT_MAJOR
-# if MSDOS
-# define major(device) (device)
-# define minor(device) (device)
-# define makedev(major, minor) (((major) << 8) | (minor))
-# define GOT_MAJOR
-# endif
-#endif
-
-/* For HP-UX before HP-UX 8, major/minor are not in <sys/sysmacros.h>. */
-#ifndef GOT_MAJOR
-# if defined(hpux) || defined(__hpux__) || defined(__hpux)
-# include <sys/mknod.h>
-# define GOT_MAJOR
-# endif
-#endif
-
-#ifndef GOT_MAJOR
-# define major(device) (((device) >> 8) & 0xff)
-# define minor(device) ((device) & 0xff)
-# define makedev(major, minor) (((major) << 8) | (minor))
-#endif
-
-#undef GOT_MAJOR
-
-/* Declare wait status. */
-
-#if HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(s) (((s) >> 8) & 0xff)
-#endif
-#ifndef WIFSIGNALED
-# define WIFSIGNALED(s) (((s) & 0xffff) - 1 < (unsigned) 0xff)
-#endif
-#ifndef WTERMSIG
-# define WTERMSIG(s) ((s) & 0x7f)
-#endif
-
-/* FIXME: It is wrong to use BLOCKSIZE for buffers when the logical block
- size is greater than 512 bytes; so ST_BLKSIZE code below, in preparation
- for some cleanup in this area, later. */
-
-/* Extract or fake data from a `struct stat'. ST_BLKSIZE gives the
- optimal I/O blocksize for the file, in bytes. Some systems, like
- Sequents, return st_blksize of 0 on pipes. */
-
-#define DEFAULT_ST_BLKSIZE 512
-
-#if !HAVE_ST_BLKSIZE
-# define ST_BLKSIZE(statbuf) DEFAULT_ST_BLKSIZE
-#else
-# define ST_BLKSIZE(statbuf) \
- ((statbuf).st_blksize > 0 ? (statbuf).st_blksize : DEFAULT_ST_BLKSIZE)
-#endif
-
-/* Extract or fake data from a `struct stat'. ST_NBLOCKS gives the
- number of ST_NBLOCKSIZE-byte blocks in the file (including indirect blocks).
- HP-UX counts st_blocks in 1024-byte units,
- this loses when mixing HP-UX and BSD filesystems with NFS. AIX PS/2
- counts st_blocks in 4K units. */
-
-#if !HAVE_ST_BLOCKS
-# if defined(_POSIX_SOURCE) || !defined(BSIZE)
-# define ST_NBLOCKS(statbuf) ((statbuf).st_size / ST_NBLOCKSIZE + ((statbuf).st_size % ST_NBLOCKSIZE != 0))
-# else
- off_t st_blocks ();
-# define ST_NBLOCKS(statbuf) (st_blocks ((statbuf).st_size))
-# endif
-#else
-# define ST_NBLOCKS(statbuf) ((statbuf).st_blocks)
-# if defined(hpux) || defined(__hpux__) || defined(__hpux)
-# define ST_NBLOCKSIZE 1024
-# else
-# if defined(_AIX) && defined(_I386)
-# define ST_NBLOCKSIZE (4 * 1024)
-# endif
-# endif
-#endif
-
-#ifndef ST_NBLOCKSIZE
-# define ST_NBLOCKSIZE 512
-#endif
-
-#define ST_IS_SPARSE(st) \
- (ST_NBLOCKS (st) \
- < ((st).st_size / ST_NBLOCKSIZE + ((st).st_size % ST_NBLOCKSIZE != 0)))
-
-/* Declare standard functions. */
-
-#if STDC_HEADERS
-# include <stdlib.h>
-#else
-void *malloc ();
-char *getenv ();
-#endif
-
-#include <stdbool.h>
-#include <stddef.h>
-
-#include <stdio.h>
-#if !defined _POSIX_VERSION && MSDOS
-# include <io.h>
-#endif
-
-#if WITH_DMALLOC
-# define DMALLOC_FUNC_CHECK
-# include <dmalloc.h>
-#endif
-
-#include <limits.h>
-
-#ifndef MB_LEN_MAX
-# define MB_LEN_MAX 1
-#endif
-
-#include <inttypes.h>
-
-#include <intprops.h>
-
-#define UINTMAX_STRSIZE_BOUND INT_BUFSIZE_BOUND (uintmax_t)
-
-/* Prototypes for external functions. */
-
-#if HAVE_LOCALE_H
-# include <locale.h>
-#endif
-#if !HAVE_SETLOCALE
-# define setlocale(category, locale) /* empty */
-#endif
-
-#include <time.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-#endif
-
-/* Library modules. */
-
-#include <dirname.h>
-#include <error.h>
-#include <savedir.h>
-#include <unlocked-io.h>
-#include <xalloc.h>
-
-#include <gettext.h>
-#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
-
-#if MSDOS
-# include <process.h>
-# define SET_BINARY_MODE(arc) setmode(arc, O_BINARY)
-# define ERRNO_IS_EACCES errno == EACCES
-# define mkdir(file, mode) (mkdir) (file)
-# define TTY_NAME "con"
-# define sys_reset_uid_gid()
-#else
-# include <pwd.h>
-# include <grp.h>
-# define SET_BINARY_MODE(arc)
-# define ERRNO_IS_EACCES 0
-# define TTY_NAME "/dev/tty"
-# define sys_reset_uid_gid() \
- do { setuid (getuid ()); setgid (getgid ()); } while (0)
-#endif
-
-#if XENIX
-# include <sys/inode.h>
-#endif
--- contrib/cpio/lib/argp-pv.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* 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 at 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;
--- contrib/cpio/lib/dirent_.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* 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 */
--- contrib/cpio/lib/exitfail.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Failure exit status
-
- Copyright (C) 2002 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. */
-
-extern int volatile exit_failure;
--- contrib/cpio/lib/argp-pvh.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 at 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;
--- contrib/cpio/lib/quotearg.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* quotearg.h - quote arguments for output
-
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 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; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Written by Paul Eggert <eggert at twinsun.com> */
-
-#ifndef QUOTEARG_H_
-# define QUOTEARG_H_ 1
-
-# include <stddef.h>
-
-/* Basic quoting styles. */
-enum quoting_style
- {
- /* Output names as-is (ls --quoting-style=literal). */
- literal_quoting_style,
-
- /* Quote names for the shell if they contain shell metacharacters
- or would cause ambiguous output (ls --quoting-style=shell). */
- shell_quoting_style,
-
- /* Quote names for the shell, even if they would normally not
- require quoting (ls --quoting-style=shell-always). */
- shell_always_quoting_style,
-
- /* Quote names as for a C language string (ls --quoting-style=c). */
- c_quoting_style,
-
- /* Like c_quoting_style except omit the surrounding double-quote
- characters (ls --quoting-style=escape). */
- escape_quoting_style,
-
- /* Like clocale_quoting_style, but quote `like this' instead of
- "like this" in the default C locale (ls --quoting-style=locale). */
- locale_quoting_style,
-
- /* Like c_quoting_style except use quotation marks appropriate for
- the locale (ls --quoting-style=clocale). */
- clocale_quoting_style
- };
-
-/* For now, --quoting-style=literal is the default, but this may change. */
-# ifndef DEFAULT_QUOTING_STYLE
-# define DEFAULT_QUOTING_STYLE literal_quoting_style
-# endif
-
-/* Names of quoting styles and their corresponding values. */
-extern char const *const quoting_style_args[];
-extern enum quoting_style const quoting_style_vals[];
-
-struct quoting_options;
-
-/* The functions listed below set and use a hidden variable
- that contains the default quoting style options. */
-
-/* Allocate a new set of quoting options, with contents initially identical
- to O if O is not null, or to the default if O is null.
- It is the caller's responsibility to free the result. */
-struct quoting_options *clone_quoting_options (struct quoting_options *o);
-
-/* Get the value of O's quoting style. If O is null, use the default. */
-enum quoting_style get_quoting_style (struct quoting_options *o);
-
-/* In O (or in the default if O is null),
- set the value of the quoting style to S. */
-void set_quoting_style (struct quoting_options *o, enum quoting_style s);
-
-/* In O (or in the default if O is null),
- set the value of the quoting options for character C to I.
- Return the old value. Currently, the only values defined for I are
- 0 (the default) and 1 (which means to quote the character even if
- it would not otherwise be quoted). */
-int set_char_quoting (struct quoting_options *o, char c, int i);
-
-/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
- argument ARG (of size ARGSIZE), using O to control quoting.
- If O is null, use the default.
- Terminate the output with a null character, and return the written
- size of the output, not counting the terminating null.
- If BUFFERSIZE is too small to store the output string, return the
- value that would have been returned had BUFFERSIZE been large enough.
- If ARGSIZE is -1, use the string length of the argument for ARGSIZE. */
-size_t quotearg_buffer (char *buffer, size_t buffersize,
- char const *arg, size_t argsize,
- struct quoting_options const *o);
-
-/* Like quotearg_buffer, except return the result in a newly allocated
- buffer. It is the caller's responsibility to free the result. */
-char *quotearg_alloc (char const *arg, size_t argsize,
- struct quoting_options const *o);
-
-/* Use storage slot N to return a quoted version of the string ARG.
- Use the default quoting options.
- The returned value points to static storage that can be
- reused by the next call to this function with the same value of N.
- N must be nonnegative. */
-char *quotearg_n (int n, char const *arg);
-
-/* Equivalent to quotearg_n (0, ARG). */
-char *quotearg (char const *arg);
-
-/* Use style S and storage slot N to return a quoted version of the string ARG.
- This is like quotearg_n (N, ARG), except that it uses S with no other
- options to specify the quoting method. */
-char *quotearg_n_style (int n, enum quoting_style s, char const *arg);
-
-/* Use style S and storage slot N to return a quoted version of the
- argument ARG of size ARGSIZE. This is like quotearg_n_style
- (N, S, ARG), except it can quote null bytes. */
-char *quotearg_n_style_mem (int n, enum quoting_style s,
- char const *arg, size_t argsize);
-
-/* Equivalent to quotearg_n_style (0, S, ARG). */
-char *quotearg_style (enum quoting_style s, char const *arg);
-
-/* Like quotearg (ARG), except also quote any instances of CH. */
-char *quotearg_char (char const *arg, char ch);
-
-/* Equivalent to quotearg_char (ARG, ':'). */
-char *quotearg_colon (char const *arg);
-
-#endif /* !QUOTEARG_H_ */
--- contrib/cpio/lib/fchownat.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* This function serves as replacement for a missing fchownat function,
- as well as a work around for the fchownat bug in glibc-2.4:
- <http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html>
- when the buggy fchownat-with-AT_SYMLINK_NOFOLLOW operates on a symlink, it
- mistakenly affects the symlink referent, rather than the symlink itself.
-
- 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. */
-
-/* written by Jim Meyering */
-
-#include <config.h>
-
-#include "openat.h"
-
-#include <unistd.h>
-
-#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
-#include "lchown.h"
-#include "save-cwd.h"
-#include "openat-priv.h"
-
-/* Replacement for Solaris' function by the same name.
- Invoke chown or lchown on file, FILE, using OWNER and GROUP, in the
- directory open on descriptor FD. If FLAG is AT_SYMLINK_NOFOLLOW, then
- use lchown, otherwise, use chown. If possible, do it without changing
- the working directory. Otherwise, resort to using save_cwd/fchdir,
- then mkdir/restore_cwd. If either the save_cwd or the restore_cwd
- fails, then give a diagnostic and exit nonzero. */
-
-#define AT_FUNC_NAME fchownat
-#define AT_FUNC_F1 lchown
-#define AT_FUNC_F2 chown
-#define AT_FUNC_USE_F1_COND flag == AT_SYMLINK_NOFOLLOW
-#define AT_FUNC_POST_FILE_PARAM_DECLS , uid_t owner, gid_t group, int flag
-#define AT_FUNC_POST_FILE_ARGS , owner, group
-#include "at-func.c"
--- contrib/cpio/lib/argp-fmtstream.h
+++ /dev/null
@@ -1,301 +0,0 @@
-/* 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 at 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
-#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 */
--- contrib/cpio/lib/__fpending.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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
--- contrib/cpio/lib/intprops.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* intprops.h -- properties of integer types
-
- Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- 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 <limits.h>
-
-/* The extra casts in the following macros work around compiler bugs,
- e.g., in Cray C 5.0.3.0. */
-
-/* True if the arithmetic type T is an integer type. bool counts as
- an integer. */
-#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
-
-/* True if negative values of the signed integer type T use two's
- complement, ones' complement, or signed magnitude representation,
- respectively. Much GNU code assumes two's complement, but some
- people like to be portable to all possible C hosts. */
-#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
-
-/* True if the arithmetic type T is signed. */
-#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-
-/* The maximum and minimum values for the integer type T. These
- macros have undefined behavior if T is signed and has padding bits.
- If this is a problem for you, please let us know how to fix it for
- your host. */
-#define TYPE_MINIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) 0 \
- : TYPE_SIGNED_MAGNITUDE (t) \
- ? ~ (t) 0 \
- : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
-#define TYPE_MAXIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) -1 \
- : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
-
-/* Return zero if T can be determined to be an unsigned type.
- Otherwise, return 1.
- When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a
- tighter bound. Otherwise, it overestimates the true bound by one byte
- when applied to unsigned types of size 2, 4, 16, ... bytes.
- The symbol signed_type_or_expr__ is private to this header file. */
-#if __GNUC__ >= 2
-# define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t))
-#else
-# define signed_type_or_expr__(t) 1
-#endif
-
-/* Bound on length of the string representing an integer type or expression T.
- Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485;
- add 1 for integer division truncation; add 1 more for a minus sign
- if needed. */
-#define INT_STRLEN_BOUND(t) \
- ((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \
- + signed_type_or_expr__ (t) + 1)
-
-/* Bound on buffer size needed to represent an integer type or expression T,
- including the terminating null. */
-#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
--- contrib/cpio/lib/sleep.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Pausing execution of the current thread.
- Copyright (C) 2007 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno at clisp.org>, 2007.
-
- 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 <unistd.h>
-
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-
-# define WIN32_LEAN_AND_MEAN /* avoid including junk */
-# include <windows.h>
-
-unsigned int
-sleep (unsigned int seconds)
-{
- unsigned int remaining;
-
- /* Sleep for 1 second many times, because
- 1. Sleep is not interruptiple by Ctrl-C,
- 2. we want to avoid arithmetic overflow while multiplying with 1000. */
- for (remaining = seconds; remaining > 0; remaining--)
- Sleep (1000);
-
- return remaining;
-}
-
-#else
-
- #error "Please port gnulib sleep.c to your platform, possibly using usleep() or select(), then report this to bug-gnulib."
-
-#endif
--- contrib/cpio/lib/gettimeofday.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Provide gettimeofday for systems that don't have it or for which it's broken.
-
- Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Free Software
- Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- 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 <sys/time.h>
-
-#include <time.h>
-
-#if HAVE_SYS_TIMEB_H
-# include <sys/timeb.h>
-#endif
-
-#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
-
-/* Work around the bug in some systems whereby gettimeofday clobbers
- the static buffer that localtime uses for its return value. The
- gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
- this problem. The tzset replacement is necessary for at least
- Solaris 2.5, 2.5.1, and 2.6. */
-
-static struct tm tm_zero_buffer;
-static struct tm *localtime_buffer_addr = &tm_zero_buffer;
-
-/* This is a wrapper for localtime. It is used only on systems for which
- gettimeofday clobbers the static buffer used for localtime's result.
-
- On the first call, record the address of the static buffer that
- localtime uses for its result. */
-
-struct tm *
-localtime (time_t const *timep)
-{
-#undef localtime
- extern struct tm *localtime (time_t const *);
- struct tm *tm = localtime (timep);
-
- if (localtime_buffer_addr == &tm_zero_buffer)
- localtime_buffer_addr = tm;
-
- return tm;
-}
-
-/* Same as above, since gmtime and localtime use the same buffer. */
-struct tm *
-gmtime (time_t const *timep)
-{
-#undef gmtime
- extern struct tm *gmtime (time_t const *);
- struct tm *tm = gmtime (timep);
-
- if (localtime_buffer_addr == &tm_zero_buffer)
- localtime_buffer_addr = tm;
-
- return tm;
-}
-
-#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */
-
-#if TZSET_CLOBBERS_LOCALTIME
-/* This is a wrapper for tzset, for systems on which tzset may clobber
- the static buffer used for localtime's result. */
-void
-tzset (void)
-{
-#undef tzset
- extern void tzset (void);
-
- /* Save and restore the contents of the buffer used for localtime's
- result around the call to tzset. */
- struct tm save = *localtime_buffer_addr;
- tzset ();
- *localtime_buffer_addr = save;
-}
-#endif
-
-/* This is a wrapper for gettimeofday. It is used only on systems
- that lack this function, or whose implementation of this function
- causes problems. */
-
-int
-rpl_gettimeofday (struct timeval *restrict tv, void *restrict tz)
-{
-#undef gettimeofday
-#if HAVE_GETTIMEOFDAY
-# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
- /* Save and restore the contents of the buffer used for localtime's
- result around the call to gettimeofday. */
- struct tm save = *localtime_buffer_addr;
-# endif
-
- int result = gettimeofday (tv, tz);
-
-# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
- *localtime_buffer_addr = save;
-# endif
-
- return result;
-
-#else
-
-# if HAVE__FTIME
-
- struct _timeb timebuf;
- _ftime (&timebuf);
- tv->tv_sec = timebuf.time;
- tv->tv_usec = timebuf.millitm * 1000;
-
-# else
-
-# if !defined OK_TO_USE_1S_CLOCK
-# error "Only 1-second nominal clock resolution found. Is that intended?" \
- "If so, compile with the -DOK_TO_USE_1S_CLOCK option."
-# endif
- tv->tv_sec = time (NULL);
- tv->tv_usec = 0;
-
-# endif
-
- return 0;
-
-#endif
-}
--- contrib/cpio/lib/mbuiter.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/* Iterating through multibyte strings: macros for multi-byte encodings.
- Copyright (C) 2001, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Written by Bruno Haible <bruno at clisp.org>. */
-
-/* The macros in this file implement forward iteration through a
- multi-byte string, without knowing its length a-priori.
-
- With these macros, an iteration loop that looks like
-
- char *iter;
- for (iter = buf; *iter != '\0'; iter++)
- {
- do_something (*iter);
- }
-
- becomes
-
- mbui_iterator_t iter;
- for (mbui_init (iter, buf); mbui_avail (iter); mbui_advance (iter))
- {
- do_something (mbui_cur_ptr (iter), mb_len (mbui_cur (iter)));
- }
-
- The benefit of these macros over plain use of mbrtowc is:
- - Handling of invalid multibyte sequences is possible without
- making the code more complicated, while still preserving the
- invalid multibyte sequences.
-
- Compared to mbiter.h, the macros here don't need to know the string's
- length a-priori. The downside is that at each step, the look-ahead
- that guards against overrunning the terminating '\0' is more expensive.
- The mbui_* macros are therefore suitable when there is a high probability
- that only the first few multibyte characters need to be inspected.
- Whereas the mbi_* macros are better if usually the iteration runs
- through the entire string.
-
- mbui_iterator_t
- is a type usable for variable declarations.
-
- mbui_init (iter, startptr)
- initializes the iterator, starting at startptr.
-
- mbui_avail (iter)
- returns true if there are more multibyte chracters available before
- the end of string is reached. In this case, mbui_cur (iter) is
- initialized to the next multibyte chracter.
-
- mbui_advance (iter)
- advances the iterator by one multibyte character.
-
- mbui_cur (iter)
- returns the current multibyte character, of type mbchar_t. All the
- macros defined in mbchar.h can be used on it.
-
- mbui_cur_ptr (iter)
- return a pointer to the beginning of the current multibyte character.
-
- mbui_reloc (iter, ptrdiff)
- relocates iterator when the string is moved by ptrdiff bytes.
-
- Here are the function prototypes of the macros.
-
- extern void mbui_init (mbui_iterator_t iter, const char *startptr);
- extern bool mbui_avail (mbui_iterator_t iter);
- extern void mbui_advance (mbui_iterator_t iter);
- extern mbchar_t mbui_cur (mbui_iterator_t iter);
- extern const char * mbui_cur_ptr (mbui_iterator_t iter);
- extern void mbui_reloc (mbui_iterator_t iter, ptrdiff_t ptrdiff);
- */
-
-#ifndef _MBUITER_H
-#define _MBUITER_H 1
-
-#include <assert.h>
-#include <stdbool.h>
-#include <stdlib.h>
-
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
- <wchar.h>. */
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-
-#include "mbchar.h"
-#include "strnlen1.h"
-
-struct mbuiter_multi
-{
- bool in_shift; /* true if next byte may not be interpreted as ASCII */
- mbstate_t state; /* if in_shift: current shift state */
- bool next_done; /* true if mbui_avail has already filled the following */
- struct mbchar cur; /* the current character:
- const char *cur.ptr pointer to current character
- The following are only valid after mbui_avail.
- size_t cur.bytes number of bytes of current character
- bool cur.wc_valid true if wc is a valid wide character
- wchar_t cur.wc if wc_valid: the current character
- */
-};
-
-static inline void
-mbuiter_multi_next (struct mbuiter_multi *iter)
-{
- if (iter->next_done)
- return;
- if (iter->in_shift)
- goto with_shift;
- /* Handle most ASCII characters quickly, without calling mbrtowc(). */
- if (is_basic (*iter->cur.ptr))
- {
- /* These characters are part of the basic character set. ISO C 99
- guarantees that their wide character code is identical to their
- char code. */
- iter->cur.bytes = 1;
- iter->cur.wc = *iter->cur.ptr;
- iter->cur.wc_valid = true;
- }
- else
- {
- assert (mbsinit (&iter->state));
- iter->in_shift = true;
- with_shift:
- iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr,
- strnlen1 (iter->cur.ptr, MB_CUR_MAX),
- &iter->state);
- if (iter->cur.bytes == (size_t) -1)
- {
- /* An invalid multibyte sequence was encountered. */
- iter->cur.bytes = 1;
- iter->cur.wc_valid = false;
- /* Whether to set iter->in_shift = false and reset iter->state
- or not is not very important; the string is bogus anyway. */
- }
- else if (iter->cur.bytes == (size_t) -2)
- {
- /* An incomplete multibyte character at the end. */
- iter->cur.bytes = strlen (iter->cur.ptr);
- iter->cur.wc_valid = false;
- /* Whether to set iter->in_shift = false and reset iter->state
- or not is not important; the string end is reached anyway. */
- }
- else
- {
- if (iter->cur.bytes == 0)
- {
- /* A null wide character was encountered. */
- iter->cur.bytes = 1;
- assert (*iter->cur.ptr == '\0');
- assert (iter->cur.wc == 0);
- }
- iter->cur.wc_valid = true;
-
- /* When in the initial state, we can go back treating ASCII
- characters more quickly. */
- if (mbsinit (&iter->state))
- iter->in_shift = false;
- }
- }
- iter->next_done = true;
-}
-
-static inline void
-mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff)
-{
- iter->cur.ptr += ptrdiff;
-}
-
-/* Iteration macros. */
-typedef struct mbuiter_multi mbui_iterator_t;
-#define mbui_init(iter, startptr) \
- ((iter).cur.ptr = (startptr), \
- (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \
- (iter).next_done = false)
-#define mbui_avail(iter) \
- (mbuiter_multi_next (&(iter)), !mb_isnul ((iter).cur))
-#define mbui_advance(iter) \
- ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false)
-
-/* Access to the current character. */
-#define mbui_cur(iter) (iter).cur
-#define mbui_cur_ptr(iter) (iter).cur.ptr
-
-/* Relocation. */
-#define mbui_reloc(iter, ptrdiff) mbuiter_multi_reloc (&iter, ptrdiff)
-
-#endif /* _MBUITER_H */
--- contrib/cpio/lib/allocsa.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/* Safe automatic memory allocation.
- Copyright (C) 2003-2007 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno at 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 */
--- contrib/cpio/lib/wchar_.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
-
- Copyright (C) 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Written by Eric Blake. */
-
-/*
- * ISO C 99 <wchar.h> for platforms that have issues.
- * <http://www.opengroup.org/susv3xbd/wchar.h.html>
- *
- * For now, this just ensures proper prerequisite inclusion order.
- */
-
-#ifndef _GL_WCHAR_H
-
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-
-/* Include the original <wchar.h>. */
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_INCLUDE_NEXT@
-# include_next <wchar.h>
-#else
-# include @ABSOLUTE_WCHAR_H@
-#endif
-
-#ifndef _GL_WCHAR_H
-#define _GL_WCHAR_H
-
-#endif /* _GL_WCHAR_H */
-#endif /* _GL_WCHAR_H */
--- contrib/cpio/lib/gettext.h
+++ /dev/null
@@ -1,270 +0,0 @@
-/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-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. */
-
-#ifndef _LIBGETTEXT_H
-#define _LIBGETTEXT_H 1
-
-/* NLS can be disabled through the configure --disable-nls option. */
-#if ENABLE_NLS
-
-/* Get declarations of GNU message catalog functions. */
-# include <libintl.h>
-
-/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
- the gettext() and ngettext() macros. This is an alternative to calling
- textdomain(), and is useful for libraries. */
-# ifdef DEFAULT_TEXT_DOMAIN
-# undef gettext
-# define gettext(Msgid) \
- dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
-# undef ngettext
-# define ngettext(Msgid1, Msgid2, N) \
- dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
-# endif
-
-#else
-
-/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
- chokes if dcgettext is defined as a macro. So include it now, to make
- later inclusions of <locale.h> a NOP. We don't include <libintl.h>
- as well because people using "gettext.h" will not include <libintl.h>,
- and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
- is OK. */
-#if defined(__sun)
-# include <locale.h>
-#endif
-
-/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
- <libintl.h>, which chokes if dcgettext is defined as a macro. So include
- it now, to make later inclusions of <libintl.h> a NOP. */
-#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
-# include <cstdlib>
-# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
-# include <libintl.h>
-# endif
-#endif
-
-/* Disabled NLS.
- The casts to 'const char *' serve the purpose of producing warnings
- for invalid uses of the value returned from these functions.
- On pre-ANSI systems without 'const', the config.h file is supposed to
- contain "#define const". */
-# define gettext(Msgid) ((const char *) (Msgid))
-# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
-# define dcgettext(Domainname, Msgid, Category) \
- ((void) (Category), dgettext (Domainname, Msgid))
-# define ngettext(Msgid1, Msgid2, N) \
- ((N) == 1 \
- ? ((void) (Msgid2), (const char *) (Msgid1)) \
- : ((void) (Msgid1), (const char *) (Msgid2)))
-# define dngettext(Domainname, Msgid1, Msgid2, N) \
- ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
-# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
- ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
-# define textdomain(Domainname) ((const char *) (Domainname))
-# define bindtextdomain(Domainname, Dirname) \
- ((void) (Domainname), (const char *) (Dirname))
-# define bind_textdomain_codeset(Domainname, Codeset) \
- ((void) (Domainname), (const char *) (Codeset))
-
-#endif
-
-/* A pseudo function call that serves as a marker for the automated
- extraction of messages, but does not call gettext(). The run-time
- translation is done at a different place in the code.
- The argument, String, should be a literal string. Concatenated strings
- and other string expressions won't work.
- The macro's expansion is not parenthesized, so that it is suitable as
- initializer for static 'char[]' or 'const char[]' variables. */
-#define gettext_noop(String) String
-
-/* The separator between msgctxt and msgid in a .mo file. */
-#define GETTEXT_CONTEXT_GLUE "\004"
-
-/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
- MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
- short and rarely need to change.
- The letter 'p' stands for 'particular' or 'special'. */
-#ifdef DEFAULT_TEXT_DOMAIN
-# define pgettext(Msgctxt, Msgid) \
- pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
-#else
-# define pgettext(Msgctxt, Msgid) \
- pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
-#endif
-#define dpgettext(Domainname, Msgctxt, Msgid) \
- pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
-#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
- pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
-#ifdef DEFAULT_TEXT_DOMAIN
-# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
- npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
-#else
-# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
- npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
-#endif
-#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
- npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
-#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
- npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static const char *
-pgettext_aux (const char *domain,
- const char *msg_ctxt_id, const char *msgid,
- int category)
-{
- const char *translation = dcgettext (domain, msg_ctxt_id, category);
- if (translation == msg_ctxt_id)
- return msgid;
- else
- return translation;
-}
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static const char *
-npgettext_aux (const char *domain,
- const char *msg_ctxt_id, const char *msgid,
- const char *msgid_plural, unsigned long int n,
- int category)
-{
- const char *translation =
- dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
- if (translation == msg_ctxt_id || translation == msgid_plural)
- return (n == 1 ? msgid : msgid_plural);
- else
- return translation;
-}
-
-/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
- can be arbitrary expressions. But for string literals these macros are
- less efficient than those above. */
-
-#include <string.h>
-
-#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
- (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
- /* || __STDC_VERSION__ >= 199901L */ )
-
-#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
-#include <stdlib.h>
-#endif
-
-#define pgettext_expr(Msgctxt, Msgid) \
- dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
-#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
- dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static const char *
-dcpgettext_expr (const char *domain,
- const char *msgctxt, const char *msgid,
- int category)
-{
- size_t msgctxt_len = strlen (msgctxt) + 1;
- size_t msgid_len = strlen (msgid) + 1;
- const char *translation;
-#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
- char msg_ctxt_id[msgctxt_len + msgid_len];
-#else
- char buf[1024];
- char *msg_ctxt_id =
- (msgctxt_len + msgid_len <= sizeof (buf)
- ? buf
- : (char *) malloc (msgctxt_len + msgid_len));
- if (msg_ctxt_id != NULL)
-#endif
- {
- memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
- msg_ctxt_id[msgctxt_len - 1] = '\004';
- memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
- translation = dcgettext (domain, msg_ctxt_id, category);
-#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
- if (msg_ctxt_id != buf)
- free (msg_ctxt_id);
-#endif
- if (translation != msg_ctxt_id)
- return translation;
- }
- return msgid;
-}
-
-#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
- dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
-#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
- dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static const char *
-dcnpgettext_expr (const char *domain,
- const char *msgctxt, const char *msgid,
- const char *msgid_plural, unsigned long int n,
- int category)
-{
- size_t msgctxt_len = strlen (msgctxt) + 1;
- size_t msgid_len = strlen (msgid) + 1;
- const char *translation;
-#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
- char msg_ctxt_id[msgctxt_len + msgid_len];
-#else
- char buf[1024];
- char *msg_ctxt_id =
- (msgctxt_len + msgid_len <= sizeof (buf)
- ? buf
- : (char *) malloc (msgctxt_len + msgid_len));
- if (msg_ctxt_id != NULL)
-#endif
- {
- memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
- msg_ctxt_id[msgctxt_len - 1] = '\004';
- memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
- translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
-#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
- if (msg_ctxt_id != buf)
- free (msg_ctxt_id);
-#endif
- if (!(translation == msg_ctxt_id || translation == msgid_plural))
- return translation;
- }
- return (n == 1 ? msgid : msgid_plural);
-}
-
-#endif /* _LIBGETTEXT_H */
--- contrib/cpio/lib/xmalloc.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* xmalloc.c -- malloc with out of memory checking
-
- Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 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; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include <config.h>
-
-#if ! HAVE_INLINE
-# define static_inline
-#endif
-#include "xalloc.h"
-#undef static_inline
-
-#include <stdlib.h>
-#include <string.h>
-
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
-/* 1 if calloc is known to be compatible with GNU calloc. This
- matters if we are not also using the calloc module, which defines
- HAVE_CALLOC and supports the GNU API even on non-GNU platforms. */
-#if defined HAVE_CALLOC || defined __GLIBC__
-enum { HAVE_GNU_CALLOC = 1 };
-#else
-enum { HAVE_GNU_CALLOC = 0 };
-#endif
-
-/* Allocate N bytes of memory dynamically, with error checking. */
-
-void *
-xmalloc (size_t n)
-{
- void *p = malloc (n);
- if (!p && n != 0)
- xalloc_die ();
- return p;
-}
-
-/* Change the size of an allocated block of memory P to N bytes,
- with error checking. */
-
-void *
-xrealloc (void *p, size_t n)
-{
- p = realloc (p, n);
- if (!p && n != 0)
- xalloc_die ();
- return p;
-}
-
-/* If P is null, allocate a block of at least *PN bytes; otherwise,
- reallocate P so that it contains more than *PN bytes. *PN must be
- nonzero unless P is null. Set *PN to the new block's size, and
- return the pointer to the new block. *PN is never set to zero, and
- the returned pointer is never null. */
-
-void *
-x2realloc (void *p, size_t *pn)
-{
- return x2nrealloc (p, pn, 1);
-}
-
-/* Allocate S bytes of zeroed memory dynamically, with error checking.
- There's no need for xnzalloc (N, S), since it would be equivalent
- to xcalloc (N, S). */
-
-void *
-xzalloc (size_t s)
-{
- return memset (xmalloc (s), 0, s);
-}
-
-/* Allocate zeroed memory for N elements of S bytes, with error
- checking. S must be nonzero. */
-
-void *
-xcalloc (size_t n, size_t s)
-{
- void *p;
- /* Test for overflow, since some calloc implementations don't have
- proper overflow checks. But omit overflow and size-zero tests if
- HAVE_GNU_CALLOC, since GNU calloc catches overflow and never
- returns NULL if successful. */
- if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s))
- || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0)))
- xalloc_die ();
- return p;
-}
-
-/* Clone an object P of size S, with error checking. There's no need
- for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any
- need for an arithmetic overflow check. */
-
-void *
-xmemdup (void const *p, size_t s)
-{
- return memcpy (xmalloc (s), p, s);
-}
-
-/* Clone STRING. */
-
-char *
-xstrdup (char const *string)
-{
- return xmemdup (string, strlen (string) + 1);
-}
--- contrib/cpio/lib/mbchar.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-#include <config.h>
-
-#include <limits.h>
-
-#include "mbchar.h"
-
-#if IS_BASIC_ASCII
-
-/* Bit table of characters in the ISO C "basic character set". */
-unsigned int is_basic_table [UCHAR_MAX / 32 + 1] =
-{
- 0x00001a00, /* '\t' '\v' '\f' */
- 0xffffffef, /* ' '...'#' '%'...'?' */
- 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */
- 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */
- /* The remaining bits are 0. */
-};
-
-#endif /* IS_BASIC_ASCII */
--- contrib/cpio/lib/getdate.y
+++ /dev/null
@@ -1,1520 +0,0 @@
-%{
-/* Parse a string into an internal time stamp.
-
- Copyright (C) 1999, 2000, 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. */
-
-/* Originally written by Steven M. Bellovin <smb at research.att.com> while
- at the University of North Carolina at Chapel Hill. Later tweaked by
- a couple of people on Usenet. Completely overhauled by Rich $alz
- <rsalz at bbn.com> and Jim Berets <jberets at bbn.com> in August, 1990.
-
- Modified by Paul Eggert <eggert at twinsun.com> in August 1999 to do
- the right thing about local DST. Also modified by Paul Eggert
- <eggert at cs.ucla.edu> in February 2004 to support
- nanosecond-resolution time stamps, and in October 2004 to support
- TZ strings in dates. */
-
-/* FIXME: Check for arithmetic overflow in all cases, not just
- some of them. */
-
-#include <config.h>
-
-#include "getdate.h"
-#include "timespec.h"
-
-/* There's no need to extend the stack, so there's no need to involve
- alloca. */
-#define YYSTACK_USE_ALLOCA 0
-
-/* Tell Bison how much stack space is needed. 20 should be plenty for
- this grammar, which is not right recursive. Beware setting it too
- high, since that might cause problems on machines whose
- implementations have lame stack-overflow checking. */
-#define YYMAXDEPTH 20
-#define YYINITDEPTH YYMAXDEPTH
-
-/* Since the code of getdate.y is not included in the Emacs executable
- itself, there is no need to #define static in this file. Even if
- the code were included in the Emacs executable, it probably
- wouldn't do any harm to #undef it here; this will only cause
- problems if we try to write to a static variable, which I don't
- think this code needs to do. */
-#ifdef emacs
-# undef static
-#endif
-
-#include <ctype.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "setenv.h"
-#include "xalloc.h"
-
-
-/* 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)
-
-#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
-# define __attribute__(x)
-# endif
-#endif
-
-#ifndef ATTRIBUTE_UNUSED
-# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#endif
-
-/* Shift A right by B bits portably, by dividing A by 2**B and
- truncating towards minus infinity. A and B should be free of side
- effects, and B should be in the range 0 <= B <= INT_BITS - 2, where
- INT_BITS is the number of useful bits in an int. GNU code can
- assume that INT_BITS is at least 32.
-
- ISO C99 says that A >> B is implementation-defined if A < 0. Some
- implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift
- right in the usual way when A < 0, so SHR falls back on division if
- ordinary A >> B doesn't seem to be the usual signed shift. */
-#define SHR(a, b) \
- (-1 >> 1 == -1 \
- ? (a) >> (b) \
- : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
-
-#define EPOCH_YEAR 1970
-#define TM_YEAR_BASE 1900
-
-#define HOUR(x) ((x) * 60)
-
-/* An integer value, and the number of digits in its textual
- representation. */
-typedef struct
-{
- bool negative;
- long int value;
- size_t digits;
-} textint;
-
-/* An entry in the lexical lookup table. */
-typedef struct
-{
- char const *name;
- int type;
- int value;
-} table;
-
-/* Meridian: am, pm, or 24-hour style. */
-enum { MERam, MERpm, MER24 };
-
-enum { BILLION = 1000000000, LOG10_BILLION = 9 };
-
-/* Relative times. */
-typedef struct
-{
- /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */
- long int year;
- long int month;
- long int day;
- long int hour;
- long int minutes;
- long int seconds;
- long int ns;
-} relative_time;
-
-#if HAVE_COMPOUND_LITERALS
-# define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 })
-#else
-static relative_time const RELATIVE_TIME_0;
-#endif
-
-/* Information passed to and from the parser. */
-typedef struct
-{
- /* The input string remaining to be parsed. */
- const char *input;
-
- /* N, if this is the Nth Tuesday. */
- long int day_ordinal;
-
- /* Day of week; Sunday is 0. */
- int day_number;
-
- /* tm_isdst flag for the local zone. */
- int local_isdst;
-
- /* Time zone, in minutes east of UTC. */
- long int time_zone;
-
- /* Style used for time. */
- int meridian;
-
- /* Gregorian year, month, day, hour, minutes, seconds, and nanoseconds. */
- textint year;
- long int month;
- long int day;
- long int hour;
- long int minutes;
- struct timespec seconds; /* includes nanoseconds */
-
- /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */
- relative_time rel;
-
- /* Presence or counts of nonterminals of various flavors parsed so far. */
- bool timespec_seen;
- bool rels_seen;
- size_t dates_seen;
- size_t days_seen;
- size_t local_zones_seen;
- size_t dsts_seen;
- size_t times_seen;
- size_t zones_seen;
-
- /* Table of local time zone abbrevations, terminated by a null entry. */
- table local_time_zone_table[3];
-} parser_control;
-
-union YYSTYPE;
-static int yylex (union YYSTYPE *, parser_control *);
-static int yyerror (parser_control const *, char const *);
-static long int time_zone_hhmm (textint, long int);
-
-%}
-
-/* We want a reentrant parser, even if the TZ manipulation and the calls to
- localtime and gmtime are not reentrant. */
-%pure-parser
-%parse-param { parser_control *pc }
-%lex-param { parser_control *pc }
-
-/* This grammar has 20 shift/reduce conflicts. */
-%expect 20
-
-%union
-{
- long int intval;
- textint textintval;
- struct timespec timespec;
- relative_time rel;
-}
-
-%token tAGO tDST
-
-%token tYEAR_UNIT tMONTH_UNIT tHOUR_UNIT tMINUTE_UNIT tSEC_UNIT
-%token <intval> tDAY_UNIT
-
-%token <intval> tDAY tDAYZONE tLOCAL_ZONE tMERIDIAN
-%token <intval> tMONTH tORDINAL tZONE
-
-%token <textintval> tSNUMBER tUNUMBER
-%token <timespec> tSDECIMAL_NUMBER tUDECIMAL_NUMBER
-
-%type <intval> o_colon_minutes o_merid
-%type <timespec> seconds signed_seconds unsigned_seconds
-
-%type <rel> relunit relunit_snumber
-
-%%
-
-spec:
- timespec
- | items
- ;
-
-timespec:
- '@' seconds
- {
- pc->seconds = $2;
- pc->timespec_seen = true;
- }
- ;
-
-items:
- /* empty */
- | items item
- ;
-
-item:
- time
- { pc->times_seen++; }
- | local_zone
- { pc->local_zones_seen++; }
- | zone
- { pc->zones_seen++; }
- | date
- { pc->dates_seen++; }
- | day
- { pc->days_seen++; }
- | rel
- { pc->rels_seen = true; }
- | number
- ;
-
-time:
- tUNUMBER tMERIDIAN
- {
- pc->hour = $1.value;
- pc->minutes = 0;
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
- pc->meridian = $2;
- }
- | tUNUMBER ':' tUNUMBER o_merid
- {
- pc->hour = $1.value;
- pc->minutes = $3.value;
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
- pc->meridian = $4;
- }
- | tUNUMBER ':' tUNUMBER tSNUMBER o_colon_minutes
- {
- pc->hour = $1.value;
- pc->minutes = $3.value;
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
- pc->meridian = MER24;
- pc->zones_seen++;
- pc->time_zone = time_zone_hhmm ($4, $5);
- }
- | tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_merid
- {
- pc->hour = $1.value;
- pc->minutes = $3.value;
- pc->seconds = $5;
- pc->meridian = $6;
- }
- | tUNUMBER ':' tUNUMBER ':' unsigned_seconds tSNUMBER o_colon_minutes
- {
- pc->hour = $1.value;
- pc->minutes = $3.value;
- pc->seconds = $5;
- pc->meridian = MER24;
- pc->zones_seen++;
- pc->time_zone = time_zone_hhmm ($6, $7);
- }
- ;
-
-local_zone:
- tLOCAL_ZONE
- {
- pc->local_isdst = $1;
- pc->dsts_seen += (0 < $1);
- }
- | tLOCAL_ZONE tDST
- {
- pc->local_isdst = 1;
- pc->dsts_seen += (0 < $1) + 1;
- }
- ;
-
-zone:
- tZONE
- { pc->time_zone = $1; }
- | tZONE relunit_snumber
- { pc->time_zone = $1;
- pc->rel.ns += $2.ns;
- pc->rel.seconds += $2.seconds;
- pc->rel.minutes += $2.minutes;
- pc->rel.hour += $2.hour;
- pc->rel.day += $2.day;
- pc->rel.month += $2.month;
- pc->rel.year += $2.year;
- pc->rels_seen = true; }
- | tZONE tSNUMBER o_colon_minutes
- { pc->time_zone = $1 + time_zone_hhmm ($2, $3); }
- | tDAYZONE
- { pc->time_zone = $1 + 60; }
- | tZONE tDST
- { pc->time_zone = $1 + 60; }
- ;
-
-day:
- tDAY
- {
- pc->day_ordinal = 1;
- pc->day_number = $1;
- }
- | tDAY ','
- {
- pc->day_ordinal = 1;
- pc->day_number = $1;
- }
- | tORDINAL tDAY
- {
- pc->day_ordinal = $1;
- pc->day_number = $2;
- }
- | tUNUMBER tDAY
- {
- pc->day_ordinal = $1.value;
- pc->day_number = $2;
- }
- ;
-
-date:
- tUNUMBER '/' tUNUMBER
- {
- pc->month = $1.value;
- pc->day = $3.value;
- }
- | tUNUMBER '/' tUNUMBER '/' tUNUMBER
- {
- /* Interpret as YYYY/MM/DD if the first value has 4 or more digits,
- otherwise as MM/DD/YY.
- The goal in recognizing YYYY/MM/DD is solely to support legacy
- machine-generated dates like those in an RCS log listing. If
- you want portability, use the ISO 8601 format. */
- if (4 <= $1.digits)
- {
- pc->year = $1;
- pc->month = $3.value;
- pc->day = $5.value;
- }
- else
- {
- pc->month = $1.value;
- pc->day = $3.value;
- pc->year = $5;
- }
- }
- | tUNUMBER tSNUMBER tSNUMBER
- {
- /* ISO 8601 format. YYYY-MM-DD. */
- pc->year = $1;
- pc->month = -$2.value;
- pc->day = -$3.value;
- }
- | tUNUMBER tMONTH tSNUMBER
- {
- /* e.g. 17-JUN-1992. */
- pc->day = $1.value;
- pc->month = $2;
- pc->year.value = -$3.value;
- pc->year.digits = $3.digits;
- }
- | tMONTH tSNUMBER tSNUMBER
- {
- /* e.g. JUN-17-1992. */
- pc->month = $1;
- pc->day = -$2.value;
- pc->year.value = -$3.value;
- pc->year.digits = $3.digits;
- }
- | tMONTH tUNUMBER
- {
- pc->month = $1;
- pc->day = $2.value;
- }
- | tMONTH tUNUMBER ',' tUNUMBER
- {
- pc->month = $1;
- pc->day = $2.value;
- pc->year = $4;
- }
- | tUNUMBER tMONTH
- {
- pc->day = $1.value;
- pc->month = $2;
- }
- | tUNUMBER tMONTH tUNUMBER
- {
- pc->day = $1.value;
- pc->month = $2;
- pc->year = $3;
- }
- ;
-
-rel:
- relunit tAGO
- {
- pc->rel.ns -= $1.ns;
- pc->rel.seconds -= $1.seconds;
- pc->rel.minutes -= $1.minutes;
- pc->rel.hour -= $1.hour;
- pc->rel.day -= $1.day;
- pc->rel.month -= $1.month;
- pc->rel.year -= $1.year;
- }
- | relunit
- {
- pc->rel.ns += $1.ns;
- pc->rel.seconds += $1.seconds;
- pc->rel.minutes += $1.minutes;
- pc->rel.hour += $1.hour;
- pc->rel.day += $1.day;
- pc->rel.month += $1.month;
- pc->rel.year += $1.year;
- }
- ;
-
-relunit:
- tORDINAL tYEAR_UNIT
- { $$ = RELATIVE_TIME_0; $$.year = $1; }
- | tUNUMBER tYEAR_UNIT
- { $$ = RELATIVE_TIME_0; $$.year = $1.value; }
- | tYEAR_UNIT
- { $$ = RELATIVE_TIME_0; $$.year = 1; }
- | tORDINAL tMONTH_UNIT
- { $$ = RELATIVE_TIME_0; $$.month = $1; }
- | tUNUMBER tMONTH_UNIT
- { $$ = RELATIVE_TIME_0; $$.month = $1.value; }
- | tMONTH_UNIT
- { $$ = RELATIVE_TIME_0; $$.month = 1; }
- | tORDINAL tDAY_UNIT
- { $$ = RELATIVE_TIME_0; $$.day = $1 * $2; }
- | tUNUMBER tDAY_UNIT
- { $$ = RELATIVE_TIME_0; $$.day = $1.value * $2; }
- | tDAY_UNIT
- { $$ = RELATIVE_TIME_0; $$.day = $1; }
- | tORDINAL tHOUR_UNIT
- { $$ = RELATIVE_TIME_0; $$.hour = $1; }
- | tUNUMBER tHOUR_UNIT
- { $$ = RELATIVE_TIME_0; $$.hour = $1.value; }
- | tHOUR_UNIT
- { $$ = RELATIVE_TIME_0; $$.hour = 1; }
- | tORDINAL tMINUTE_UNIT
- { $$ = RELATIVE_TIME_0; $$.minutes = $1; }
- | tUNUMBER tMINUTE_UNIT
- { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; }
- | tMINUTE_UNIT
- { $$ = RELATIVE_TIME_0; $$.minutes = 1; }
- | tORDINAL tSEC_UNIT
- { $$ = RELATIVE_TIME_0; $$.seconds = $1; }
- | tUNUMBER tSEC_UNIT
- { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; }
- | tSDECIMAL_NUMBER tSEC_UNIT
- { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; }
- | tUDECIMAL_NUMBER tSEC_UNIT
- { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; }
- | tSEC_UNIT
- { $$ = RELATIVE_TIME_0; $$.seconds = 1; }
- | relunit_snumber
- ;
-
-relunit_snumber:
- tSNUMBER tYEAR_UNIT
- { $$ = RELATIVE_TIME_0; $$.year = $1.value; }
- | tSNUMBER tMONTH_UNIT
- { $$ = RELATIVE_TIME_0; $$.month = $1.value; }
- | tSNUMBER tDAY_UNIT
- { $$ = RELATIVE_TIME_0; $$.day = $1.value * $2; }
- | tSNUMBER tHOUR_UNIT
- { $$ = RELATIVE_TIME_0; $$.hour = $1.value; }
- | tSNUMBER tMINUTE_UNIT
- { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; }
- | tSNUMBER tSEC_UNIT
- { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; }
- ;
-
-seconds: signed_seconds | unsigned_seconds;
-
-signed_seconds:
- tSDECIMAL_NUMBER
- | tSNUMBER
- { $$.tv_sec = $1.value; $$.tv_nsec = 0; }
- ;
-
-unsigned_seconds:
- tUDECIMAL_NUMBER
- | tUNUMBER
- { $$.tv_sec = $1.value; $$.tv_nsec = 0; }
- ;
-
-number:
- tUNUMBER
- {
- if (pc->dates_seen && ! pc->year.digits
- && ! pc->rels_seen && (pc->times_seen || 2 < $1.digits))
- pc->year = $1;
- else
- {
- if (4 < $1.digits)
- {
- pc->dates_seen++;
- pc->day = $1.value % 100;
- pc->month = ($1.value / 100) % 100;
- pc->year.value = $1.value / 10000;
- pc->year.digits = $1.digits - 4;
- }
- else
- {
- pc->times_seen++;
- if ($1.digits <= 2)
- {
- pc->hour = $1.value;
- pc->minutes = 0;
- }
- else
- {
- pc->hour = $1.value / 100;
- pc->minutes = $1.value % 100;
- }
- pc->seconds.tv_sec = 0;
- pc->seconds.tv_nsec = 0;
- pc->meridian = MER24;
- }
- }
- }
- ;
-
-o_colon_minutes:
- /* empty */
- { $$ = -1; }
- | ':' tUNUMBER
- { $$ = $2.value; }
- ;
-
-o_merid:
- /* empty */
- { $$ = MER24; }
- | tMERIDIAN
- { $$ = $1; }
- ;
-
-%%
-
-static table const meridian_table[] =
-{
- { "AM", tMERIDIAN, MERam },
- { "A.M.", tMERIDIAN, MERam },
- { "PM", tMERIDIAN, MERpm },
- { "P.M.", tMERIDIAN, MERpm },
- { NULL, 0, 0 }
-};
-
-static table const dst_table[] =
-{
- { "DST", tDST, 0 }
-};
-
-static table const month_and_day_table[] =
-{
- { "JANUARY", tMONTH, 1 },
- { "FEBRUARY", tMONTH, 2 },
- { "MARCH", tMONTH, 3 },
- { "APRIL", tMONTH, 4 },
- { "MAY", tMONTH, 5 },
- { "JUNE", tMONTH, 6 },
- { "JULY", tMONTH, 7 },
- { "AUGUST", tMONTH, 8 },
- { "SEPTEMBER",tMONTH, 9 },
- { "SEPT", tMONTH, 9 },
- { "OCTOBER", tMONTH, 10 },
- { "NOVEMBER", tMONTH, 11 },
- { "DECEMBER", tMONTH, 12 },
- { "SUNDAY", tDAY, 0 },
- { "MONDAY", tDAY, 1 },
- { "TUESDAY", tDAY, 2 },
- { "TUES", tDAY, 2 },
- { "WEDNESDAY",tDAY, 3 },
- { "WEDNES", tDAY, 3 },
- { "THURSDAY", tDAY, 4 },
- { "THUR", tDAY, 4 },
- { "THURS", tDAY, 4 },
- { "FRIDAY", tDAY, 5 },
- { "SATURDAY", tDAY, 6 },
- { NULL, 0, 0 }
-};
-
-static table const time_units_table[] =
-{
- { "YEAR", tYEAR_UNIT, 1 },
- { "MONTH", tMONTH_UNIT, 1 },
- { "FORTNIGHT",tDAY_UNIT, 14 },
- { "WEEK", tDAY_UNIT, 7 },
- { "DAY", tDAY_UNIT, 1 },
- { "HOUR", tHOUR_UNIT, 1 },
- { "MINUTE", tMINUTE_UNIT, 1 },
- { "MIN", tMINUTE_UNIT, 1 },
- { "SECOND", tSEC_UNIT, 1 },
- { "SEC", tSEC_UNIT, 1 },
- { NULL, 0, 0 }
-};
-
-/* Assorted relative-time words. */
-static table const relative_time_table[] =
-{
- { "TOMORROW", tDAY_UNIT, 1 },
- { "YESTERDAY",tDAY_UNIT, -1 },
- { "TODAY", tDAY_UNIT, 0 },
- { "NOW", tDAY_UNIT, 0 },
- { "LAST", tORDINAL, -1 },
- { "THIS", tORDINAL, 0 },
- { "NEXT", tORDINAL, 1 },
- { "FIRST", tORDINAL, 1 },
-/*{ "SECOND", tORDINAL, 2 }, */
- { "THIRD", tORDINAL, 3 },
- { "FOURTH", tORDINAL, 4 },
- { "FIFTH", tORDINAL, 5 },
- { "SIXTH", tORDINAL, 6 },
- { "SEVENTH", tORDINAL, 7 },
- { "EIGHTH", tORDINAL, 8 },
- { "NINTH", tORDINAL, 9 },
- { "TENTH", tORDINAL, 10 },
- { "ELEVENTH", tORDINAL, 11 },
- { "TWELFTH", tORDINAL, 12 },
- { "AGO", tAGO, 1 },
- { NULL, 0, 0 }
-};
-
-/* The universal time zone table. These labels can be used even for
- time stamps that would not otherwise be valid, e.g., GMT time
- stamps in London during summer. */
-static table const universal_time_zone_table[] =
-{
- { "GMT", tZONE, HOUR ( 0) }, /* Greenwich Mean */
- { "UT", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */
- { "UTC", tZONE, HOUR ( 0) },
- { NULL, 0, 0 }
-};
-
-/* The time zone table. This table is necessarily incomplete, as time
- zone abbreviations are ambiguous; e.g. Australians interpret "EST"
- as Eastern time in Australia, not as US Eastern Standard Time.
- You cannot rely on getdate to handle arbitrary time zone
- abbreviations; use numeric abbreviations like `-0500' instead. */
-static table const time_zone_table[] =
-{
- { "WET", tZONE, HOUR ( 0) }, /* Western European */
- { "WEST", tDAYZONE, HOUR ( 0) }, /* Western European Summer */
- { "BST", tDAYZONE, HOUR ( 0) }, /* British Summer */
- { "ART", tZONE, -HOUR ( 3) }, /* Argentina */
- { "BRT", tZONE, -HOUR ( 3) }, /* Brazil */
- { "BRST", tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */
- { "NST", tZONE, -(HOUR ( 3) + 30) }, /* Newfoundland Standard */
- { "NDT", tDAYZONE,-(HOUR ( 3) + 30) }, /* Newfoundland Daylight */
- { "AST", tZONE, -HOUR ( 4) }, /* Atlantic Standard */
- { "ADT", tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */
- { "CLT", tZONE, -HOUR ( 4) }, /* Chile */
- { "CLST", tDAYZONE, -HOUR ( 4) }, /* Chile Summer */
- { "EST", tZONE, -HOUR ( 5) }, /* Eastern Standard */
- { "EDT", tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */
- { "CST", tZONE, -HOUR ( 6) }, /* Central Standard */
- { "CDT", tDAYZONE, -HOUR ( 6) }, /* Central Daylight */
- { "MST", tZONE, -HOUR ( 7) }, /* Mountain Standard */
- { "MDT", tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */
- { "PST", tZONE, -HOUR ( 8) }, /* Pacific Standard */
- { "PDT", tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */
- { "AKST", tZONE, -HOUR ( 9) }, /* Alaska Standard */
- { "AKDT", tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */
- { "HST", tZONE, -HOUR (10) }, /* Hawaii Standard */
- { "HAST", tZONE, -HOUR (10) }, /* Hawaii-Aleutian Standard */
- { "HADT", tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */
- { "SST", tZONE, -HOUR (12) }, /* Samoa Standard */
- { "WAT", tZONE, HOUR ( 1) }, /* West Africa */
- { "CET", tZONE, HOUR ( 1) }, /* Central European */
- { "CEST", tDAYZONE, HOUR ( 1) }, /* Central European Summer */
- { "MET", tZONE, HOUR ( 1) }, /* Middle European */
- { "MEZ", tZONE, HOUR ( 1) }, /* Middle European */
- { "MEST", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */
- { "MESZ", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */
- { "EET", tZONE, HOUR ( 2) }, /* Eastern European */
- { "EEST", tDAYZONE, HOUR ( 2) }, /* Eastern European Summer */
- { "CAT", tZONE, HOUR ( 2) }, /* Central Africa */
- { "SAST", tZONE, HOUR ( 2) }, /* South Africa Standard */
- { "EAT", tZONE, HOUR ( 3) }, /* East Africa */
- { "MSK", tZONE, HOUR ( 3) }, /* Moscow */
- { "MSD", tDAYZONE, HOUR ( 3) }, /* Moscow Daylight */
- { "IST", tZONE, (HOUR ( 5) + 30) }, /* India Standard */
- { "SGT", tZONE, HOUR ( 8) }, /* Singapore */
- { "KST", tZONE, HOUR ( 9) }, /* Korea Standard */
- { "JST", tZONE, HOUR ( 9) }, /* Japan Standard */
- { "GST", tZONE, HOUR (10) }, /* Guam Standard */
- { "NZST", tZONE, HOUR (12) }, /* New Zealand Standard */
- { "NZDT", tDAYZONE, HOUR (12) }, /* New Zealand Daylight */
- { NULL, 0, 0 }
-};
-
-/* Military time zone table. */
-static table const military_table[] =
-{
- { "A", tZONE, -HOUR ( 1) },
- { "B", tZONE, -HOUR ( 2) },
- { "C", tZONE, -HOUR ( 3) },
- { "D", tZONE, -HOUR ( 4) },
- { "E", tZONE, -HOUR ( 5) },
- { "F", tZONE, -HOUR ( 6) },
- { "G", tZONE, -HOUR ( 7) },
- { "H", tZONE, -HOUR ( 8) },
- { "I", tZONE, -HOUR ( 9) },
- { "K", tZONE, -HOUR (10) },
- { "L", tZONE, -HOUR (11) },
- { "M", tZONE, -HOUR (12) },
- { "N", tZONE, HOUR ( 1) },
- { "O", tZONE, HOUR ( 2) },
- { "P", tZONE, HOUR ( 3) },
- { "Q", tZONE, HOUR ( 4) },
- { "R", tZONE, HOUR ( 5) },
- { "S", tZONE, HOUR ( 6) },
- { "T", tZONE, HOUR ( 7) },
- { "U", tZONE, HOUR ( 8) },
- { "V", tZONE, HOUR ( 9) },
- { "W", tZONE, HOUR (10) },
- { "X", tZONE, HOUR (11) },
- { "Y", tZONE, HOUR (12) },
- { "Z", tZONE, HOUR ( 0) },
- { NULL, 0, 0 }
-};
-
-
-
-/* Convert a time zone expressed as HH:MM into an integer count of
- minutes. If MM is negative, then S is of the form HHMM and needs
- to be picked apart; otherwise, S is of the form HH. */
-
-static long int
-time_zone_hhmm (textint s, long int mm)
-{
- if (mm < 0)
- return (s.value / 100) * 60 + s.value % 100;
- else
- return s.value * 60 + (s.negative ? -mm : mm);
-}
-
-static int
-to_hour (long int hours, int meridian)
-{
- switch (meridian)
- {
- default: /* Pacify GCC. */
- case MER24:
- return 0 <= hours && hours < 24 ? hours : -1;
- case MERam:
- return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1;
- case MERpm:
- return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1;
- }
-}
-
-static long int
-to_year (textint textyear)
-{
- long int year = textyear.value;
-
- if (year < 0)
- year = -year;
-
- /* XPG4 suggests that years 00-68 map to 2000-2068, and
- years 69-99 map to 1969-1999. */
- else if (textyear.digits == 2)
- year += year < 69 ? 2000 : 1900;
-
- return year;
-}
-
-static table const *
-lookup_zone (parser_control const *pc, char const *name)
-{
- table const *tp;
-
- for (tp = universal_time_zone_table; tp->name; tp++)
- if (strcmp (name, tp->name) == 0)
- return tp;
-
- /* Try local zone abbreviations before those in time_zone_table, as
- the local ones are more likely to be right. */
- for (tp = pc->local_time_zone_table; tp->name; tp++)
- if (strcmp (name, tp->name) == 0)
- return tp;
-
- for (tp = time_zone_table; tp->name; tp++)
- if (strcmp (name, tp->name) == 0)
- return tp;
-
- return NULL;
-}
-
-#if ! HAVE_TM_GMTOFF
-/* Yield the difference between *A and *B,
- measured in seconds, ignoring leap seconds.
- The body of this function is taken directly from the GNU C Library;
- see src/strftime.c. */
-static long int
-tm_diff (struct tm const *a, struct tm const *b)
-{
- /* Compute intervening leap days correctly even if year is negative.
- Take care to avoid int overflow in leap day calculations. */
- int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3);
- int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3);
- int a100 = a4 / 25 - (a4 % 25 < 0);
- int b100 = b4 / 25 - (b4 % 25 < 0);
- int a400 = SHR (a100, 2);
- int b400 = SHR (b100, 2);
- int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
- long int ayear = a->tm_year;
- long int years = ayear - b->tm_year;
- long int days = (365 * years + intervening_leap_days
- + (a->tm_yday - b->tm_yday));
- return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour))
- + (a->tm_min - b->tm_min))
- + (a->tm_sec - b->tm_sec));
-}
-#endif /* ! HAVE_TM_GMTOFF */
-
-static table const *
-lookup_word (parser_control const *pc, char *word)
-{
- char *p;
- char *q;
- size_t wordlen;
- table const *tp;
- bool period_found;
- bool abbrev;
-
- /* Make it uppercase. */
- for (p = word; *p; p++)
- {
- unsigned char ch = *p;
- *p = toupper (ch);
- }
-
- for (tp = meridian_table; tp->name; tp++)
- if (strcmp (word, tp->name) == 0)
- return tp;
-
- /* See if we have an abbreviation for a month. */
- wordlen = strlen (word);
- abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.');
-
- for (tp = month_and_day_table; tp->name; tp++)
- if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0)
- return tp;
-
- if ((tp = lookup_zone (pc, word)))
- return tp;
-
- if (strcmp (word, dst_table[0].name) == 0)
- return dst_table;
-
- for (tp = time_units_table; tp->name; tp++)
- if (strcmp (word, tp->name) == 0)
- return tp;
-
- /* Strip off any plural and try the units table again. */
- if (word[wordlen - 1] == 'S')
- {
- word[wordlen - 1] = '\0';
- for (tp = time_units_table; tp->name; tp++)
- if (strcmp (word, tp->name) == 0)
- return tp;
- word[wordlen - 1] = 'S'; /* For "this" in relative_time_table. */
- }
-
- for (tp = relative_time_table; tp->name; tp++)
- if (strcmp (word, tp->name) == 0)
- return tp;
-
- /* Military time zones. */
- if (wordlen == 1)
- for (tp = military_table; tp->name; tp++)
- if (word[0] == tp->name[0])
- return tp;
-
- /* Drop out any periods and try the time zone table again. */
- for (period_found = false, p = q = word; (*p = *q); q++)
- if (*q == '.')
- period_found = true;
- else
- p++;
- if (period_found && (tp = lookup_zone (pc, word)))
- return tp;
-
- return NULL;
-}
-
-static int
-yylex (YYSTYPE *lvalp, parser_control *pc)
-{
- unsigned char c;
- size_t count;
-
- for (;;)
- {
- while (c = *pc->input, isspace (c))
- pc->input++;
-
- if (ISDIGIT (c) || c == '-' || c == '+')
- {
- char const *p;
- int sign;
- unsigned long int value;
- if (c == '-' || c == '+')
- {
- sign = c == '-' ? -1 : 1;
- while (c = *++pc->input, isspace (c))
- continue;
- if (! ISDIGIT (c))
- /* skip the '-' sign */
- continue;
- }
- else
- sign = 0;
- p = pc->input;
- for (value = 0; ; value *= 10)
- {
- unsigned long int value1 = value + (c - '0');
- if (value1 < value)
- return '?';
- value = value1;
- c = *++p;
- if (! ISDIGIT (c))
- break;
- if (ULONG_MAX / 10 < value)
- return '?';
- }
- if ((c == '.' || c == ',') && ISDIGIT (p[1]))
- {
- time_t s;
- int ns;
- int digits;
- unsigned long int value1;
-
- /* Check for overflow when converting value to time_t. */
- if (sign < 0)
- {
- s = - value;
- if (0 < s)
- return '?';
- value1 = -s;
- }
- else
- {
- s = value;
- if (s < 0)
- return '?';
- value1 = s;
- }
- if (value != value1)
- return '?';
-
- /* Accumulate fraction, to ns precision. */
- p++;
- ns = *p++ - '0';
- for (digits = 2; digits <= LOG10_BILLION; digits++)
- {
- ns *= 10;
- if (ISDIGIT (*p))
- ns += *p++ - '0';
- }
-
- /* Skip excess digits, truncating toward -Infinity. */
- if (sign < 0)
- for (; ISDIGIT (*p); p++)
- if (*p != '0')
- {
- ns++;
- break;
- }
- while (ISDIGIT (*p))
- p++;
-
- /* Adjust to the timespec convention, which is that
- tv_nsec is always a positive offset even if tv_sec is
- negative. */
- if (sign < 0 && ns)
- {
- s--;
- if (! (s < 0))
- return '?';
- ns = BILLION - ns;
- }
-
- lvalp->timespec.tv_sec = s;
- lvalp->timespec.tv_nsec = ns;
- pc->input = p;
- return sign ? tSDECIMAL_NUMBER : tUDECIMAL_NUMBER;
- }
- else
- {
- lvalp->textintval.negative = sign < 0;
- if (sign < 0)
- {
- lvalp->textintval.value = - value;
- if (0 < lvalp->textintval.value)
- return '?';
- }
- else
- {
- lvalp->textintval.value = value;
- if (lvalp->textintval.value < 0)
- return '?';
- }
- lvalp->textintval.digits = p - pc->input;
- pc->input = p;
- return sign ? tSNUMBER : tUNUMBER;
- }
- }
-
- if (isalpha (c))
- {
- char buff[20];
- char *p = buff;
- table const *tp;
-
- do
- {
- if (p < buff + sizeof buff - 1)
- *p++ = c;
- c = *++pc->input;
- }
- while (isalpha (c) || c == '.');
-
- *p = '\0';
- tp = lookup_word (pc, buff);
- if (! tp)
- return '?';
- lvalp->intval = tp->value;
- return tp->type;
- }
-
- if (c != '(')
- return *pc->input++;
- count = 0;
- do
- {
- c = *pc->input++;
- if (c == '\0')
- return c;
- if (c == '(')
- count++;
- else if (c == ')')
- count--;
- }
- while (count != 0);
- }
-}
-
-/* Do nothing if the parser reports an error. */
-static int
-yyerror (parser_control const *pc ATTRIBUTE_UNUSED,
- char const *s ATTRIBUTE_UNUSED)
-{
- return 0;
-}
-
-/* If *TM0 is the old and *TM1 is the new value of a struct tm after
- passing it to mktime, return true if it's OK that mktime returned T.
- It's not OK if *TM0 has out-of-range members. */
-
-static bool
-mktime_ok (struct tm const *tm0, struct tm const *tm1, time_t t)
-{
- if (t == (time_t) -1)
- {
- /* Guard against falsely reporting an error when parsing a time
- stamp that happens to equal (time_t) -1, on a host that
- supports such a time stamp. */
- tm1 = localtime (&t);
- if (!tm1)
- return false;
- }
-
- return ! ((tm0->tm_sec ^ tm1->tm_sec)
- | (tm0->tm_min ^ tm1->tm_min)
- | (tm0->tm_hour ^ tm1->tm_hour)
- | (tm0->tm_mday ^ tm1->tm_mday)
- | (tm0->tm_mon ^ tm1->tm_mon)
- | (tm0->tm_year ^ tm1->tm_year));
-}
-
-/* A reasonable upper bound for the size of ordinary TZ strings.
- Use heap allocation if TZ's length exceeds this. */
-enum { TZBUFSIZE = 100 };
-
-/* Return a copy of TZ, stored in TZBUF if it fits, and heap-allocated
- otherwise. */
-static char *
-get_tz (char tzbuf[TZBUFSIZE])
-{
- char *tz = getenv ("TZ");
- if (tz)
- {
- size_t tzsize = strlen (tz) + 1;
- tz = (tzsize <= TZBUFSIZE
- ? memcpy (tzbuf, tz, tzsize)
- : xmemdup (tz, tzsize));
- }
- return tz;
-}
-
-/* Parse a date/time string, storing the resulting time value into *RESULT.
- The string itself is pointed to by P. Return true if successful.
- P can be an incomplete or relative time specification; if so, use
- *NOW as the basis for the returned time. */
-bool
-get_date (struct timespec *result, char const *p, struct timespec const *now)
-{
- time_t Start;
- long int Start_ns;
- struct tm const *tmp;
- struct tm tm;
- struct tm tm0;
- parser_control pc;
- struct timespec gettime_buffer;
- unsigned char c;
- bool tz_was_altered = false;
- char *tz0 = NULL;
- char tz0buf[TZBUFSIZE];
- bool ok = true;
-
- if (! now)
- {
- gettime (&gettime_buffer);
- now = &gettime_buffer;
- }
-
- Start = now->tv_sec;
- Start_ns = now->tv_nsec;
-
- tmp = localtime (&now->tv_sec);
- if (! tmp)
- return false;
-
- while (c = *p, isspace (c))
- p++;
-
- if (strncmp (p, "TZ=\"", 4) == 0)
- {
- char const *tzbase = p + 4;
- size_t tzsize = 1;
- char const *s;
-
- for (s = tzbase; *s; s++, tzsize++)
- if (*s == '\\')
- {
- s++;
- if (! (*s == '\\' || *s == '"'))
- break;
- }
- else if (*s == '"')
- {
- char *z;
- char *tz1;
- char tz1buf[TZBUFSIZE];
- bool large_tz = TZBUFSIZE < tzsize;
- bool setenv_ok;
- tz0 = get_tz (tz0buf);
- z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf;
- for (s = tzbase; *s != '"'; s++)
- *z++ = *(s += *s == '\\');
- *z = '\0';
- setenv_ok = setenv ("TZ", tz1, 1) == 0;
- if (large_tz)
- free (tz1);
- if (!setenv_ok)
- goto fail;
- tz_was_altered = true;
- p = s + 1;
- }
- }
-
- pc.input = p;
- pc.year.value = tmp->tm_year;
- pc.year.value += TM_YEAR_BASE;
- pc.year.digits = 0;
- pc.month = tmp->tm_mon + 1;
- pc.day = tmp->tm_mday;
- pc.hour = tmp->tm_hour;
- pc.minutes = tmp->tm_min;
- pc.seconds.tv_sec = tmp->tm_sec;
- pc.seconds.tv_nsec = Start_ns;
- tm.tm_isdst = tmp->tm_isdst;
-
- pc.meridian = MER24;
- pc.rel = RELATIVE_TIME_0;
- pc.timespec_seen = false;
- pc.rels_seen = false;
- pc.dates_seen = 0;
- pc.days_seen = 0;
- pc.times_seen = 0;
- pc.local_zones_seen = 0;
- pc.dsts_seen = 0;
- pc.zones_seen = 0;
-
-#if HAVE_STRUCT_TM_TM_ZONE
- pc.local_time_zone_table[0].name = tmp->tm_zone;
- pc.local_time_zone_table[0].type = tLOCAL_ZONE;
- pc.local_time_zone_table[0].value = tmp->tm_isdst;
- pc.local_time_zone_table[1].name = NULL;
-
- /* Probe the names used in the next three calendar quarters, looking
- for a tm_isdst different from the one we already have. */
- {
- int quarter;
- for (quarter = 1; quarter <= 3; quarter++)
- {
- time_t probe = Start + quarter * (90 * 24 * 60 * 60);
- struct tm const *probe_tm = localtime (&probe);
- if (probe_tm && probe_tm->tm_zone
- && probe_tm->tm_isdst != pc.local_time_zone_table[0].value)
- {
- {
- pc.local_time_zone_table[1].name = probe_tm->tm_zone;
- pc.local_time_zone_table[1].type = tLOCAL_ZONE;
- pc.local_time_zone_table[1].value = probe_tm->tm_isdst;
- pc.local_time_zone_table[2].name = NULL;
- }
- break;
- }
- }
- }
-#else
-#if HAVE_TZNAME
- {
-# ifndef tzname
- extern char *tzname[];
-# endif
- int i;
- for (i = 0; i < 2; i++)
- {
- pc.local_time_zone_table[i].name = tzname[i];
- pc.local_time_zone_table[i].type = tLOCAL_ZONE;
- pc.local_time_zone_table[i].value = i;
- }
- pc.local_time_zone_table[i].name = NULL;
- }
-#else
- pc.local_time_zone_table[0].name = NULL;
-#endif
-#endif
-
- if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name
- && ! strcmp (pc.local_time_zone_table[0].name,
- pc.local_time_zone_table[1].name))
- {
- /* This locale uses the same abbrevation for standard and
- daylight times. So if we see that abbreviation, we don't
- know whether it's daylight time. */
- pc.local_time_zone_table[0].value = -1;
- pc.local_time_zone_table[1].name = NULL;
- }
-
- if (yyparse (&pc) != 0)
- goto fail;
-
- if (pc.timespec_seen)
- *result = pc.seconds;
- else
- {
- if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen
- | (pc.local_zones_seen + pc.zones_seen)))
- goto fail;
-
- tm.tm_year = to_year (pc.year) - TM_YEAR_BASE;
- tm.tm_mon = pc.month - 1;
- tm.tm_mday = pc.day;
- if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen))
- {
- tm.tm_hour = to_hour (pc.hour, pc.meridian);
- if (tm.tm_hour < 0)
- goto fail;
- tm.tm_min = pc.minutes;
- tm.tm_sec = pc.seconds.tv_sec;
- }
- else
- {
- tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
- pc.seconds.tv_nsec = 0;
- }
-
- /* Let mktime deduce tm_isdst if we have an absolute time stamp. */
- if (pc.dates_seen | pc.days_seen | pc.times_seen)
- tm.tm_isdst = -1;
-
- /* But if the input explicitly specifies local time with or without
- DST, give mktime that information. */
- if (pc.local_zones_seen)
- tm.tm_isdst = pc.local_isdst;
-
- tm0 = tm;
-
- Start = mktime (&tm);
-
- if (! mktime_ok (&tm0, &tm, Start))
- {
- if (! pc.zones_seen)
- goto fail;
- else
- {
- /* Guard against falsely reporting errors near the time_t
- boundaries when parsing times in other time zones. For
- example, suppose the input string "1969-12-31 23:00:00 -0100",
- the current time zone is 8 hours ahead of UTC, and the min
- time_t value is 1970-01-01 00:00:00 UTC. Then the min
- localtime value is 1970-01-01 08:00:00, and mktime will
- therefore fail on 1969-12-31 23:00:00. To work around the
- problem, set the time zone to 1 hour behind UTC temporarily
- by setting TZ="XXX1:00" and try mktime again. */
-
- long int time_zone = pc.time_zone;
- long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone;
- long int abs_time_zone_hour = abs_time_zone / 60;
- int abs_time_zone_min = abs_time_zone % 60;
- char tz1buf[sizeof "XXX+0:00"
- + sizeof pc.time_zone * CHAR_BIT / 3];
- if (!tz_was_altered)
- tz0 = get_tz (tz0buf);
- sprintf (tz1buf, "XXX%s%ld:%02d", "-" + (time_zone < 0),
- abs_time_zone_hour, abs_time_zone_min);
- if (setenv ("TZ", tz1buf, 1) != 0)
- goto fail;
- tz_was_altered = true;
- tm = tm0;
- Start = mktime (&tm);
- if (! mktime_ok (&tm0, &tm, Start))
- goto fail;
- }
- }
-
- if (pc.days_seen && ! pc.dates_seen)
- {
- tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7
- + 7 * (pc.day_ordinal - (0 < pc.day_ordinal)));
- tm.tm_isdst = -1;
- Start = mktime (&tm);
- if (Start == (time_t) -1)
- goto fail;
- }
-
- if (pc.zones_seen)
- {
- long int delta = pc.time_zone * 60;
- time_t t1;
-#ifdef HAVE_TM_GMTOFF
- delta -= tm.tm_gmtoff;
-#else
- time_t t = Start;
- struct tm const *gmt = gmtime (&t);
- if (! gmt)
- goto fail;
- delta -= tm_diff (&tm, gmt);
-#endif
- t1 = Start - delta;
- if ((Start < t1) != (delta < 0))
- goto fail; /* time_t overflow */
- Start = t1;
- }
-
- /* Add relative date. */
- if (pc.rel.year | pc.rel.month | pc.rel.day)
- {
- int year = tm.tm_year + pc.rel.year;
- int month = tm.tm_mon + pc.rel.month;
- int day = tm.tm_mday + pc.rel.day;
- if (((year < tm.tm_year) ^ (pc.rel.year < 0))
- | ((month < tm.tm_mon) ^ (pc.rel.month < 0))
- | ((day < tm.tm_mday) ^ (pc.rel.day < 0)))
- goto fail;
- tm.tm_year = year;
- tm.tm_mon = month;
- tm.tm_mday = day;
- tm.tm_hour = tm0.tm_hour;
- tm.tm_min = tm0.tm_min;
- tm.tm_sec = tm0.tm_sec;
- tm.tm_isdst = tm0.tm_isdst;
- Start = mktime (&tm);
- if (Start == (time_t) -1)
- goto fail;
- }
-
- /* Add relative hours, minutes, and seconds. On hosts that support
- leap seconds, ignore the possibility of leap seconds; e.g.,
- "+ 10 minutes" adds 600 seconds, even if one of them is a
- leap second. Typically this is not what the user wants, but it's
- too hard to do it the other way, because the time zone indicator
- must be applied before relative times, and if mktime is applied
- again the time zone will be lost. */
- {
- long int sum_ns = pc.seconds.tv_nsec + pc.rel.ns;
- long int normalized_ns = (sum_ns % BILLION + BILLION) % BILLION;
- time_t t0 = Start;
- long int d1 = 60 * 60 * pc.rel.hour;
- time_t t1 = t0 + d1;
- long int d2 = 60 * pc.rel.minutes;
- time_t t2 = t1 + d2;
- long int d3 = pc.rel.seconds;
- time_t t3 = t2 + d3;
- long int d4 = (sum_ns - normalized_ns) / BILLION;
- time_t t4 = t3 + d4;
-
- if ((d1 / (60 * 60) ^ pc.rel.hour)
- | (d2 / 60 ^ pc.rel.minutes)
- | ((t1 < t0) ^ (d1 < 0))
- | ((t2 < t1) ^ (d2 < 0))
- | ((t3 < t2) ^ (d3 < 0))
- | ((t4 < t3) ^ (d4 < 0)))
- goto fail;
-
- result->tv_sec = t4;
- result->tv_nsec = normalized_ns;
- }
- }
-
- goto done;
-
- fail:
- ok = false;
- done:
- if (tz_was_altered)
- ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0;
- if (tz0 != tz0buf)
- free (tz0);
- return ok;
-}
-
-#if TEST
-
-int
-main (int ac, char **av)
-{
- char buff[BUFSIZ];
-
- printf ("Enter date, or blank line to exit.\n\t> ");
- fflush (stdout);
-
- buff[BUFSIZ - 1] = '\0';
- while (fgets (buff, BUFSIZ - 1, stdin) && buff[0])
- {
- struct timespec d;
- struct tm const *tm;
- if (! get_date (&d, buff, NULL))
- printf ("Bad format - couldn't convert.\n");
- else if (! (tm = localtime (&d.tv_sec)))
- {
- long int sec = d.tv_sec;
- printf ("localtime (%ld) failed\n", sec);
- }
- else
- {
- int ns = d.tv_nsec;
- printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n",
- tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday,
- tm->tm_hour, tm->tm_min, tm->tm_sec, ns);
- }
- printf ("\t> ");
- fflush (stdout);
- }
- return 0;
-}
-#endif /* TEST */
--- contrib/cpio/lib/time_r.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Reentrant time functions like localtime_r.
-
- Copyright (C) 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 Paul Eggert. */
-
-#ifndef _TIME_R_H
-#define _TIME_R_H
-
-/* Include <time.h> first, since it may declare these functions with
- signatures that disagree with POSIX, and we don't want to rename
- those declarations. */
-#include <time.h>
-
-#if !HAVE_TIME_R_POSIX
-
-/* Don't bother with asctime_r and ctime_r, since these functions are
- not safe (like asctime and ctime, they can overrun their 26-byte
- output buffers when given outlandish struct tm values), and we
- don't want to encourage applications to use unsafe functions. Use
- strftime or even sprintf instead. */
-
-# undef gmtime_r
-# undef localtime_r
-
-# define gmtime_r rpl_gmtime_r
-# define localtime_r rpl_localtime_r
-
-/* See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/gmtime.html>. */
-struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
-
-/* See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/localtime.html>. */
-struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
-#endif
-
-#endif
--- contrib/cpio/lib/inttypes_.h
+++ /dev/null
@@ -1,1100 +0,0 @@
-/* Copyright (C) 2006-2007 Free Software Foundation, Inc.
- Written by Paul Eggert, Bruno Haible, Derek Price.
- This file is part of gnulib.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1, 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 Lesser 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. */
-
-/*
- * ISO C 99 <inttypes.h> for platforms that lack it.
- * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
- */
-
-/* Include the original <inttypes.h> if it exists, and if this file
- has not been included yet or if this file includes gnulib stdint.h
- which in turn includes this file.
- The include_next requires a split double-inclusion guard. */
-#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
-# if @HAVE_INTTYPES_H@
-# if @HAVE_INCLUDE_NEXT@
-# include_next <inttypes.h>
-# else
-# include @ABSOLUTE_INTTYPES_H@
-# endif
-# endif
-#endif
-
-#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
-#define INTTYPES_H
-
-/* Include <stdint.h> or the gnulib replacement. */
-#include <stdint.h>
-/* Get CHAR_BIT. */
-#include <limits.h>
-
-#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
-# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib at gnu.org>."
-#endif
-
-/* The definition of GL_LINK_WARNING is copied here. */
-
-/* 7.8.1 Macros for format specifiers */
-
-#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
-
-# if defined _TNS_R_TARGET
- /* Tandem NonStop R series and compatible platforms released before
- July 2005 support %Ld but not %lld. */
-# define _LONG_LONG_FORMAT_PREFIX "L"
-# else
-# define _LONG_LONG_FORMAT_PREFIX "ll"
-# endif
-
-# if !defined PRId8 || @PRI_MACROS_BROKEN@
-# undef PRId8
-# ifdef INT8_MAX
-# define PRId8 "d"
-# endif
-# endif
-# if !defined PRIi8 || @PRI_MACROS_BROKEN@
-# undef PRIi8
-# ifdef INT8_MAX
-# define PRIi8 "i"
-# endif
-# endif
-# if !defined PRIo8 || @PRI_MACROS_BROKEN@
-# undef PRIo8
-# ifdef UINT8_MAX
-# define PRIo8 "o"
-# endif
-# endif
-# if !defined PRIu8 || @PRI_MACROS_BROKEN@
-# undef PRIu8
-# ifdef UINT8_MAX
-# define PRIu8 "u"
-# endif
-# endif
-# if !defined PRIx8 || @PRI_MACROS_BROKEN@
-# undef PRIx8
-# ifdef UINT8_MAX
-# define PRIx8 "x"
-# endif
-# endif
-# if !defined PRIX8 || @PRI_MACROS_BROKEN@
-# undef PRIX8
-# ifdef UINT8_MAX
-# define PRIX8 "X"
-# endif
-# endif
-# if !defined PRId16 || @PRI_MACROS_BROKEN@
-# undef PRId16
-# ifdef INT16_MAX
-# define PRId16 "d"
-# endif
-# endif
-# if !defined PRIi16 || @PRI_MACROS_BROKEN@
-# undef PRIi16
-# ifdef INT16_MAX
-# define PRIi16 "i"
-# endif
-# endif
-# if !defined PRIo16 || @PRI_MACROS_BROKEN@
-# undef PRIo16
-# ifdef UINT16_MAX
-# define PRIo16 "o"
-# endif
-# endif
-# if !defined PRIu16 || @PRI_MACROS_BROKEN@
-# undef PRIu16
-# ifdef UINT16_MAX
-# define PRIu16 "u"
-# endif
-# endif
-# if !defined PRIx16 || @PRI_MACROS_BROKEN@
-# undef PRIx16
-# ifdef UINT16_MAX
-# define PRIx16 "x"
-# endif
-# endif
-# if !defined PRIX16 || @PRI_MACROS_BROKEN@
-# undef PRIX16
-# ifdef UINT16_MAX
-# define PRIX16 "X"
-# endif
-# endif
-# if !defined PRId32 || @PRI_MACROS_BROKEN@
-# undef PRId32
-# ifdef INT32_MAX
-# define PRId32 "d"
-# endif
-# endif
-# if !defined PRIi32 || @PRI_MACROS_BROKEN@
-# undef PRIi32
-# ifdef INT32_MAX
-# define PRIi32 "i"
-# endif
-# endif
-# if !defined PRIo32 || @PRI_MACROS_BROKEN@
-# undef PRIo32
-# ifdef UINT32_MAX
-# define PRIo32 "o"
-# endif
-# endif
-# if !defined PRIu32 || @PRI_MACROS_BROKEN@
-# undef PRIu32
-# ifdef UINT32_MAX
-# define PRIu32 "u"
-# endif
-# endif
-# if !defined PRIx32 || @PRI_MACROS_BROKEN@
-# undef PRIx32
-# ifdef UINT32_MAX
-# define PRIx32 "x"
-# endif
-# endif
-# if !defined PRIX32 || @PRI_MACROS_BROKEN@
-# undef PRIX32
-# ifdef UINT32_MAX
-# define PRIX32 "X"
-# endif
-# endif
-# ifdef INT64_MAX
-# if INT64_MAX == LONG_MAX
-# define _PRI64_PREFIX "l"
-# elif defined _MSC_VER || defined __MINGW32__
-# define _PRI64_PREFIX "I64"
-# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
-# endif
-# if !defined PRId64 || @PRI_MACROS_BROKEN@
-# undef PRId64
-# define PRId64 _PRI64_PREFIX "d"
-# endif
-# if !defined PRIi64 || @PRI_MACROS_BROKEN@
-# undef PRIi64
-# define PRIi64 _PRI64_PREFIX "i"
-# endif
-# endif
-# ifdef UINT64_MAX
-# if UINT64_MAX == ULONG_MAX
-# define _PRIu64_PREFIX "l"
-# elif defined _MSC_VER || defined __MINGW32__
-# define _PRIu64_PREFIX "I64"
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
-# endif
-# if !defined PRIo64 || @PRI_MACROS_BROKEN@
-# undef PRIo64
-# define PRIo64 _PRIu64_PREFIX "o"
-# endif
-# if !defined PRIu64 || @PRI_MACROS_BROKEN@
-# undef PRIu64
-# define PRIu64 _PRIu64_PREFIX "u"
-# endif
-# if !defined PRIx64 || @PRI_MACROS_BROKEN@
-# undef PRIx64
-# define PRIx64 _PRIu64_PREFIX "x"
-# endif
-# if !defined PRIX64 || @PRI_MACROS_BROKEN@
-# undef PRIX64
-# define PRIX64 _PRIu64_PREFIX "X"
-# endif
-# endif
-
-# if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIdLEAST8
-# define PRIdLEAST8 "d"
-# endif
-# if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIiLEAST8
-# define PRIiLEAST8 "i"
-# endif
-# if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIoLEAST8
-# define PRIoLEAST8 "o"
-# endif
-# if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIuLEAST8
-# define PRIuLEAST8 "u"
-# endif
-# if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIxLEAST8
-# define PRIxLEAST8 "x"
-# endif
-# if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIXLEAST8
-# define PRIXLEAST8 "X"
-# endif
-# if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIdLEAST16
-# define PRIdLEAST16 "d"
-# endif
-# if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIiLEAST16
-# define PRIiLEAST16 "i"
-# endif
-# if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIoLEAST16
-# define PRIoLEAST16 "o"
-# endif
-# if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIuLEAST16
-# define PRIuLEAST16 "u"
-# endif
-# if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIxLEAST16
-# define PRIxLEAST16 "x"
-# endif
-# if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIXLEAST16
-# define PRIXLEAST16 "X"
-# endif
-# if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIdLEAST32
-# define PRIdLEAST32 "d"
-# endif
-# if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIiLEAST32
-# define PRIiLEAST32 "i"
-# endif
-# if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIoLEAST32
-# define PRIoLEAST32 "o"
-# endif
-# if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIuLEAST32
-# define PRIuLEAST32 "u"
-# endif
-# if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIxLEAST32
-# define PRIxLEAST32 "x"
-# endif
-# if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIXLEAST32
-# define PRIXLEAST32 "X"
-# endif
-# ifdef INT64_MAX
-# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
-# undef PRIdLEAST64
-# define PRIdLEAST64 PRId64
-# endif
-# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
-# undef PRIiLEAST64
-# define PRIiLEAST64 PRIi64
-# endif
-# endif
-# ifdef UINT64_MAX
-# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
-# undef PRIoLEAST64
-# define PRIoLEAST64 PRIo64
-# endif
-# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
-# undef PRIuLEAST64
-# define PRIuLEAST64 PRIu64
-# endif
-# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
-# undef PRIxLEAST64
-# define PRIxLEAST64 PRIx64
-# endif
-# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
-# undef PRIXLEAST64
-# define PRIXLEAST64 PRIX64
-# endif
-# endif
-
-# if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIdFAST8
-# if INT_FAST8_MAX > INT32_MAX
-# define PRIdFAST8 PRId64
-# else
-# define PRIdFAST8 "d"
-# endif
-# endif
-# if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIiFAST8
-# if INT_FAST8_MAX > INT32_MAX
-# define PRIiFAST8 PRIi64
-# else
-# define PRIiFAST8 "i"
-# endif
-# endif
-# if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIoFAST8
-# if UINT_FAST8_MAX > UINT32_MAX
-# define PRIoFAST8 PRIo64
-# else
-# define PRIoFAST8 "o"
-# endif
-# endif
-# if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIuFAST8
-# if UINT_FAST8_MAX > UINT32_MAX
-# define PRIuFAST8 PRIu64
-# else
-# define PRIuFAST8 "u"
-# endif
-# endif
-# if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIxFAST8
-# if UINT_FAST8_MAX > UINT32_MAX
-# define PRIxFAST8 PRIx64
-# else
-# define PRIxFAST8 "x"
-# endif
-# endif
-# if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIXFAST8
-# if UINT_FAST8_MAX > UINT32_MAX
-# define PRIXFAST8 PRIX64
-# else
-# define PRIXFAST8 "X"
-# endif
-# endif
-# if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIdFAST16
-# if INT_FAST16_MAX > INT32_MAX
-# define PRIdFAST16 PRId64
-# else
-# define PRIdFAST16 "d"
-# endif
-# endif
-# if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIiFAST16
-# if INT_FAST16_MAX > INT32_MAX
-# define PRIiFAST16 PRIi64
-# else
-# define PRIiFAST16 "i"
-# endif
-# endif
-# if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIoFAST16
-# if UINT_FAST16_MAX > UINT32_MAX
-# define PRIoFAST16 PRIo64
-# else
-# define PRIoFAST16 "o"
-# endif
-# endif
-# if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIuFAST16
-# if UINT_FAST16_MAX > UINT32_MAX
-# define PRIuFAST16 PRIu64
-# else
-# define PRIuFAST16 "u"
-# endif
-# endif
-# if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIxFAST16
-# if UINT_FAST16_MAX > UINT32_MAX
-# define PRIxFAST16 PRIx64
-# else
-# define PRIxFAST16 "x"
-# endif
-# endif
-# if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIXFAST16
-# if UINT_FAST16_MAX > UINT32_MAX
-# define PRIXFAST16 PRIX64
-# else
-# define PRIXFAST16 "X"
-# endif
-# endif
-# if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIdFAST32
-# if INT_FAST32_MAX > INT32_MAX
-# define PRIdFAST32 PRId64
-# else
-# define PRIdFAST32 "d"
-# endif
-# endif
-# if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIiFAST32
-# if INT_FAST32_MAX > INT32_MAX
-# define PRIiFAST32 PRIi64
-# else
-# define PRIiFAST32 "i"
-# endif
-# endif
-# if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIoFAST32
-# if UINT_FAST32_MAX > UINT32_MAX
-# define PRIoFAST32 PRIo64
-# else
-# define PRIoFAST32 "o"
-# endif
-# endif
-# if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIuFAST32
-# if UINT_FAST32_MAX > UINT32_MAX
-# define PRIuFAST32 PRIu64
-# else
-# define PRIuFAST32 "u"
-# endif
-# endif
-# if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIxFAST32
-# if UINT_FAST32_MAX > UINT32_MAX
-# define PRIxFAST32 PRIx64
-# else
-# define PRIxFAST32 "x"
-# endif
-# endif
-# if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIXFAST32
-# if UINT_FAST32_MAX > UINT32_MAX
-# define PRIXFAST32 PRIX64
-# else
-# define PRIXFAST32 "X"
-# endif
-# endif
-# ifdef INT64_MAX
-# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
-# undef PRIdFAST64
-# define PRIdFAST64 PRId64
-# endif
-# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
-# undef PRIiFAST64
-# define PRIiFAST64 PRIi64
-# endif
-# endif
-# ifdef UINT64_MAX
-# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
-# undef PRIoFAST64
-# define PRIoFAST64 PRIo64
-# endif
-# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
-# undef PRIuFAST64
-# define PRIuFAST64 PRIu64
-# endif
-# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
-# undef PRIxFAST64
-# define PRIxFAST64 PRIx64
-# endif
-# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
-# undef PRIXFAST64
-# define PRIXFAST64 PRIX64
-# endif
-# endif
-
-# if !defined PRIdMAX || @PRI_MACROS_BROKEN@
-# undef PRIdMAX
-# if INTMAX_MAX > INT32_MAX
-# define PRIdMAX PRId64
-# else
-# define PRIdMAX "ld"
-# endif
-# endif
-# if !defined PRIiMAX || @PRI_MACROS_BROKEN@
-# undef PRIiMAX
-# if INTMAX_MAX > INT32_MAX
-# define PRIiMAX PRIi64
-# else
-# define PRIiMAX "li"
-# endif
-# endif
-# if !defined PRIoMAX || @PRI_MACROS_BROKEN@
-# undef PRIoMAX
-# if UINTMAX_MAX > UINT32_MAX
-# define PRIoMAX PRIo64
-# else
-# define PRIoMAX "lo"
-# endif
-# endif
-# if !defined PRIuMAX || @PRI_MACROS_BROKEN@
-# undef PRIuMAX
-# if UINTMAX_MAX > UINT32_MAX
-# define PRIuMAX PRIu64
-# else
-# define PRIuMAX "lu"
-# endif
-# endif
-# if !defined PRIxMAX || @PRI_MACROS_BROKEN@
-# undef PRIxMAX
-# if UINTMAX_MAX > UINT32_MAX
-# define PRIxMAX PRIx64
-# else
-# define PRIxMAX "lx"
-# endif
-# endif
-# if !defined PRIXMAX || @PRI_MACROS_BROKEN@
-# undef PRIXMAX
-# if UINTMAX_MAX > UINT32_MAX
-# define PRIXMAX PRIX64
-# else
-# define PRIXMAX "lX"
-# endif
-# endif
-
-# if !defined PRIdPTR || @PRI_MACROS_BROKEN@
-# undef PRIdPTR
-# ifdef INTPTR_MAX
-# define PRIdPTR @PRIPTR_PREFIX@ "d"
-# endif
-# endif
-# if !defined PRIiPTR || @PRI_MACROS_BROKEN@
-# undef PRIiPTR
-# ifdef INTPTR_MAX
-# define PRIiPTR @PRIPTR_PREFIX@ "i"
-# endif
-# endif
-# if !defined PRIoPTR || @PRI_MACROS_BROKEN@
-# undef PRIoPTR
-# ifdef UINTPTR_MAX
-# define PRIoPTR @PRIPTR_PREFIX@ "o"
-# endif
-# endif
-# if !defined PRIuPTR || @PRI_MACROS_BROKEN@
-# undef PRIuPTR
-# ifdef UINTPTR_MAX
-# define PRIuPTR @PRIPTR_PREFIX@ "u"
-# endif
-# endif
-# if !defined PRIxPTR || @PRI_MACROS_BROKEN@
-# undef PRIxPTR
-# ifdef UINTPTR_MAX
-# define PRIxPTR @PRIPTR_PREFIX@ "x"
-# endif
-# endif
-# if !defined PRIXPTR || @PRI_MACROS_BROKEN@
-# undef PRIXPTR
-# ifdef UINTPTR_MAX
-# define PRIXPTR @PRIPTR_PREFIX@ "X"
-# endif
-# endif
-
-# if !defined SCNd8 || @PRI_MACROS_BROKEN@
-# undef SCNd8
-# ifdef INT8_MAX
-# define SCNd8 "hhd"
-# endif
-# endif
-# if !defined SCNi8 || @PRI_MACROS_BROKEN@
-# undef SCNi8
-# ifdef INT8_MAX
-# define SCNi8 "hhi"
-# endif
-# endif
-# if !defined SCNo8 || @PRI_MACROS_BROKEN@
-# undef SCNo8
-# ifdef UINT8_MAX
-# define SCNo8 "hho"
-# endif
-# endif
-# if !defined SCNu8 || @PRI_MACROS_BROKEN@
-# undef SCNu8
-# ifdef UINT8_MAX
-# define SCNu8 "hhu"
-# endif
-# endif
-# if !defined SCNx8 || @PRI_MACROS_BROKEN@
-# undef SCNx8
-# ifdef UINT8_MAX
-# define SCNx8 "hhx"
-# endif
-# endif
-# if !defined SCNd16 || @PRI_MACROS_BROKEN@
-# undef SCNd16
-# ifdef INT16_MAX
-# define SCNd16 "hd"
-# endif
-# endif
-# if !defined SCNi16 || @PRI_MACROS_BROKEN@
-# undef SCNi16
-# ifdef INT16_MAX
-# define SCNi16 "hi"
-# endif
-# endif
-# if !defined SCNo16 || @PRI_MACROS_BROKEN@
-# undef SCNo16
-# ifdef UINT16_MAX
-# define SCNo16 "ho"
-# endif
-# endif
-# if !defined SCNu16 || @PRI_MACROS_BROKEN@
-# undef SCNu16
-# ifdef UINT16_MAX
-# define SCNu16 "hu"
-# endif
-# endif
-# if !defined SCNx16 || @PRI_MACROS_BROKEN@
-# undef SCNx16
-# ifdef UINT16_MAX
-# define SCNx16 "hx"
-# endif
-# endif
-# if !defined SCNd32 || @PRI_MACROS_BROKEN@
-# undef SCNd32
-# ifdef INT32_MAX
-# define SCNd32 "d"
-# endif
-# endif
-# if !defined SCNi32 || @PRI_MACROS_BROKEN@
-# undef SCNi32
-# ifdef INT32_MAX
-# define SCNi32 "i"
-# endif
-# endif
-# if !defined SCNo32 || @PRI_MACROS_BROKEN@
-# undef SCNo32
-# ifdef UINT32_MAX
-# define SCNo32 "o"
-# endif
-# endif
-# if !defined SCNu32 || @PRI_MACROS_BROKEN@
-# undef SCNu32
-# ifdef UINT32_MAX
-# define SCNu32 "u"
-# endif
-# endif
-# if !defined SCNx32 || @PRI_MACROS_BROKEN@
-# undef SCNx32
-# ifdef UINT32_MAX
-# define SCNx32 "x"
-# endif
-# endif
-# ifdef INT64_MAX
-# if INT64_MAX == LONG_MAX
-# define _SCN64_PREFIX "l"
-# elif defined _MSC_VER || defined __MINGW32__
-# define _SCN64_PREFIX "I64"
-# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
-# endif
-# if !defined SCNd64 || @PRI_MACROS_BROKEN@
-# undef SCNd64
-# define SCNd64 _SCN64_PREFIX "d"
-# endif
-# if !defined SCNi64 || @PRI_MACROS_BROKEN@
-# undef SCNi64
-# define SCNi64 _SCN64_PREFIX "i"
-# endif
-# endif
-# ifdef UINT64_MAX
-# if UINT64_MAX == ULONG_MAX
-# define _SCNu64_PREFIX "l"
-# elif defined _MSC_VER || defined __MINGW32__
-# define _SCNu64_PREFIX "I64"
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
-# endif
-# if !defined SCNo64 || @PRI_MACROS_BROKEN@
-# undef SCNo64
-# define SCNo64 _SCNu64_PREFIX "o"
-# endif
-# if !defined SCNu64 || @PRI_MACROS_BROKEN@
-# undef SCNu64
-# define SCNu64 _SCNu64_PREFIX "u"
-# endif
-# if !defined SCNx64 || @PRI_MACROS_BROKEN@
-# undef SCNx64
-# define SCNx64 _SCNu64_PREFIX "x"
-# endif
-# endif
-
-# if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNdLEAST8
-# define SCNdLEAST8 "hhd"
-# endif
-# if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNiLEAST8
-# define SCNiLEAST8 "hhi"
-# endif
-# if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNoLEAST8
-# define SCNoLEAST8 "hho"
-# endif
-# if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNuLEAST8
-# define SCNuLEAST8 "hhu"
-# endif
-# if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNxLEAST8
-# define SCNxLEAST8 "hhx"
-# endif
-# if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNdLEAST16
-# define SCNdLEAST16 "hd"
-# endif
-# if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNiLEAST16
-# define SCNiLEAST16 "hi"
-# endif
-# if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNoLEAST16
-# define SCNoLEAST16 "ho"
-# endif
-# if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNuLEAST16
-# define SCNuLEAST16 "hu"
-# endif
-# if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNxLEAST16
-# define SCNxLEAST16 "hx"
-# endif
-# if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNdLEAST32
-# define SCNdLEAST32 "d"
-# endif
-# if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNiLEAST32
-# define SCNiLEAST32 "i"
-# endif
-# if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNoLEAST32
-# define SCNoLEAST32 "o"
-# endif
-# if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNuLEAST32
-# define SCNuLEAST32 "u"
-# endif
-# if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNxLEAST32
-# define SCNxLEAST32 "x"
-# endif
-# ifdef INT64_MAX
-# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
-# undef SCNdLEAST64
-# define SCNdLEAST64 SCNd64
-# endif
-# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
-# undef SCNiLEAST64
-# define SCNiLEAST64 SCNi64
-# endif
-# endif
-# ifdef UINT64_MAX
-# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
-# undef SCNoLEAST64
-# define SCNoLEAST64 SCNo64
-# endif
-# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
-# undef SCNuLEAST64
-# define SCNuLEAST64 SCNu64
-# endif
-# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
-# undef SCNxLEAST64
-# define SCNxLEAST64 SCNx64
-# endif
-# endif
-
-# if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNdFAST8
-# if INT_FAST8_MAX > INT32_MAX
-# define SCNdFAST8 SCNd64
-# elif INT_FAST8_MAX == 0x7fff
-# define SCNdFAST8 "hd"
-# elif INT_FAST8_MAX == 0x7f
-# define SCNdFAST8 "hhd"
-# else
-# define SCNdFAST8 "d"
-# endif
-# endif
-# if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNiFAST8
-# if INT_FAST8_MAX > INT32_MAX
-# define SCNiFAST8 SCNi64
-# elif INT_FAST8_MAX == 0x7fff
-# define SCNiFAST8 "hi"
-# elif INT_FAST8_MAX == 0x7f
-# define SCNiFAST8 "hhi"
-# else
-# define SCNiFAST8 "i"
-# endif
-# endif
-# if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNoFAST8
-# if UINT_FAST8_MAX > UINT32_MAX
-# define SCNoFAST8 SCNo64
-# elif UINT_FAST8_MAX == 0xffff
-# define SCNoFAST8 "ho"
-# elif UINT_FAST8_MAX == 0xff
-# define SCNoFAST8 "hho"
-# else
-# define SCNoFAST8 "o"
-# endif
-# endif
-# if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNuFAST8
-# if UINT_FAST8_MAX > UINT32_MAX
-# define SCNuFAST8 SCNu64
-# elif UINT_FAST8_MAX == 0xffff
-# define SCNuFAST8 "hu"
-# elif UINT_FAST8_MAX == 0xff
-# define SCNuFAST8 "hhu"
-# else
-# define SCNuFAST8 "u"
-# endif
-# endif
-# if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNxFAST8
-# if UINT_FAST8_MAX > UINT32_MAX
-# define SCNxFAST8 SCNx64
-# elif UINT_FAST8_MAX == 0xffff
-# define SCNxFAST8 "hx"
-# elif UINT_FAST8_MAX == 0xff
-# define SCNxFAST8 "hhx"
-# else
-# define SCNxFAST8 "x"
-# endif
-# endif
-# if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNdFAST16
-# if INT_FAST16_MAX > INT32_MAX
-# define SCNdFAST16 SCNd64
-# elif INT_FAST16_MAX == 0x7fff
-# define SCNdFAST16 "hd"
-# else
-# define SCNdFAST16 "d"
-# endif
-# endif
-# if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNiFAST16
-# if INT_FAST16_MAX > INT32_MAX
-# define SCNiFAST16 SCNi64
-# elif INT_FAST16_MAX == 0x7fff
-# define SCNiFAST16 "hi"
-# else
-# define SCNiFAST16 "i"
-# endif
-# endif
-# if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNoFAST16
-# if UINT_FAST16_MAX > UINT32_MAX
-# define SCNoFAST16 SCNo64
-# elif UINT_FAST16_MAX == 0xffff
-# define SCNoFAST16 "ho"
-# else
-# define SCNoFAST16 "o"
-# endif
-# endif
-# if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNuFAST16
-# if UINT_FAST16_MAX > UINT32_MAX
-# define SCNuFAST16 SCNu64
-# elif UINT_FAST16_MAX == 0xffff
-# define SCNuFAST16 "hu"
-# else
-# define SCNuFAST16 "u"
-# endif
-# endif
-# if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNxFAST16
-# if UINT_FAST16_MAX > UINT32_MAX
-# define SCNxFAST16 SCNx64
-# elif UINT_FAST16_MAX == 0xffff
-# define SCNxFAST16 "hx"
-# else
-# define SCNxFAST16 "x"
-# endif
-# endif
-# if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNdFAST32
-# if INT_FAST32_MAX > INT32_MAX
-# define SCNdFAST32 SCNd64
-# else
-# define SCNdFAST32 "d"
-# endif
-# endif
-# if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNiFAST32
-# if INT_FAST32_MAX > INT32_MAX
-# define SCNiFAST32 SCNi64
-# else
-# define SCNiFAST32 "i"
-# endif
-# endif
-# if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNoFAST32
-# if UINT_FAST32_MAX > UINT32_MAX
-# define SCNoFAST32 SCNo64
-# else
-# define SCNoFAST32 "o"
-# endif
-# endif
-# if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNuFAST32
-# if UINT_FAST32_MAX > UINT32_MAX
-# define SCNuFAST32 SCNu64
-# else
-# define SCNuFAST32 "u"
-# endif
-# endif
-# if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNxFAST32
-# if UINT_FAST32_MAX > UINT32_MAX
-# define SCNxFAST32 SCNx64
-# else
-# define SCNxFAST32 "x"
-# endif
-# endif
-# ifdef INT64_MAX
-# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
-# undef SCNdFAST64
-# define SCNdFAST64 SCNd64
-# endif
-# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
-# undef SCNiFAST64
-# define SCNiFAST64 SCNi64
-# endif
-# endif
-# ifdef UINT64_MAX
-# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
-# undef SCNoFAST64
-# define SCNoFAST64 SCNo64
-# endif
-# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
-# undef SCNuFAST64
-# define SCNuFAST64 SCNu64
-# endif
-# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
-# undef SCNxFAST64
-# define SCNxFAST64 SCNx64
-# endif
-# endif
-
-# if !defined SCNdMAX || @PRI_MACROS_BROKEN@
-# undef SCNdMAX
-# if INTMAX_MAX > INT32_MAX
-# define SCNdMAX SCNd64
-# else
-# define SCNdMAX "ld"
-# endif
-# endif
-# if !defined SCNiMAX || @PRI_MACROS_BROKEN@
-# undef SCNiMAX
-# if INTMAX_MAX > INT32_MAX
-# define SCNiMAX SCNi64
-# else
-# define SCNiMAX "li"
-# endif
-# endif
-# if !defined SCNoMAX || @PRI_MACROS_BROKEN@
-# undef SCNoMAX
-# if UINTMAX_MAX > UINT32_MAX
-# define SCNoMAX SCNo64
-# else
-# define SCNoMAX "lo"
-# endif
-# endif
-# if !defined SCNuMAX || @PRI_MACROS_BROKEN@
-# undef SCNuMAX
-# if UINTMAX_MAX > UINT32_MAX
-# define SCNuMAX SCNu64
-# else
-# define SCNuMAX "lu"
-# endif
-# endif
-# if !defined SCNxMAX || @PRI_MACROS_BROKEN@
-# undef SCNxMAX
-# if UINTMAX_MAX > UINT32_MAX
-# define SCNxMAX SCNx64
-# else
-# define SCNxMAX "lx"
-# endif
-# endif
-
-# if !defined SCNdPTR || @PRI_MACROS_BROKEN@
-# undef SCNdPTR
-# ifdef INTPTR_MAX
-# define SCNdPTR @PRIPTR_PREFIX@ "d"
-# endif
-# endif
-# if !defined SCNiPTR || @PRI_MACROS_BROKEN@
-# undef SCNiPTR
-# ifdef INTPTR_MAX
-# define SCNiPTR @PRIPTR_PREFIX@ "i"
-# endif
-# endif
-# if !defined SCNoPTR || @PRI_MACROS_BROKEN@
-# undef SCNoPTR
-# ifdef UINTPTR_MAX
-# define SCNoPTR @PRIPTR_PREFIX@ "o"
-# endif
-# endif
-# if !defined SCNuPTR || @PRI_MACROS_BROKEN@
-# undef SCNuPTR
-# ifdef UINTPTR_MAX
-# define SCNuPTR @PRIPTR_PREFIX@ "u"
-# endif
-# endif
-# if !defined SCNxPTR || @PRI_MACROS_BROKEN@
-# undef SCNxPTR
-# ifdef UINTPTR_MAX
-# define SCNxPTR @PRIPTR_PREFIX@ "x"
-# endif
-# endif
-
-#endif
-
-/* 7.8.2 Functions for greatest-width integer types */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if @GNULIB_IMAXABS@
-# if !@HAVE_DECL_IMAXABS@
-extern intmax_t imaxabs (intmax_t);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef imaxabs
-# define imaxabs(a) \
- (GL_LINK_WARNING ("imaxabs is unportable - " \
- "use gnulib module imaxabs for portability"), \
- imaxabs (a))
-#endif
-
-#if @GNULIB_IMAXDIV@
-# if !@HAVE_DECL_IMAXDIV@
-typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
-extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef imaxdiv
-# define imaxdiv(a,b) \
- (GL_LINK_WARNING ("imaxdiv is unportable - " \
- "use gnulib module imaxdiv for portability"), \
- imaxdiv (a, b))
-#endif
-
-#if @GNULIB_STRTOIMAX@
-# if !@HAVE_DECL_STRTOIMAX@
-extern intmax_t strtoimax (const char *, char **, int);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef strtoimax
-# define strtoimax(p,e,b) \
- (GL_LINK_WARNING ("strtoimax is unportable - " \
- "use gnulib module strtoimax for portability"), \
- strtoimax (p, e, b))
-#endif
-
-#if @GNULIB_STRTOUMAX@
-# if !@HAVE_DECL_STRTOUMAX@
-extern uintmax_t strtoumax (const char *, char **, int);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef strtoumax
-# define strtoumax(p,e,b) \
- (GL_LINK_WARNING ("strtoumax is unportable - " \
- "use gnulib module strtoumax for portability"), \
- strtoumax (p, e, b))
-#endif
-
-/* Don't bother defining or declaring wcstoimax and wcstoumax, since
- wide-character functions like this are hardly ever useful. */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* INTTYPES_H */
--- contrib/cpio/lib/lstat.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Retrieving information about files.
- 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. */
-
-#include <sys/stat.h>
-
-#if !LSTAT_FOLLOWS_SLASHED_SYMLINK
-extern int rpl_lstat (const char *name, struct stat *buf);
-# undef lstat
-# define lstat rpl_lstat
-#endif
--- contrib/cpio/lib/utimens.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/* Set file access and modification times.
-
- Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software
- Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- 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. */
-
-/* derived from a function in touch.c */
-
-#include <config.h>
-
-#include "utimens.h"
-
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/time.h>
-#include <unistd.h>
-
-#if HAVE_UTIME_H
-# include <utime.h>
-#endif
-
-/* Some systems (even some that do have <utime.h>) don't declare this
- structure anywhere. */
-#ifndef HAVE_STRUCT_UTIMBUF
-struct utimbuf
-{
- long actime;
- long modtime;
-};
-#endif
-
-/* Some systems don't have ENOSYS. */
-#ifndef ENOSYS
-# ifdef ENOTSUP
-# define ENOSYS ENOTSUP
-# else
-/* Some systems don't have ENOTSUP either. */
-# define ENOSYS EINVAL
-# endif
-#endif
-
-#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
-# define __attribute__(x)
-# endif
-#endif
-
-#ifndef ATTRIBUTE_UNUSED
-# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#endif
-
-/* Set the access and modification time stamps of FD (a.k.a. FILE) to be
- TIMESPEC[0] and TIMESPEC[1], respectively.
- FD must be either negative -- in which case it is ignored --
- or a file descriptor that is open on FILE.
- If FD is nonnegative, then FILE can be NULL, which means
- use just futimes (or equivalent) instead of utimes (or equivalent),
- and fail if on an old system without futimes (or equivalent).
- If TIMESPEC is null, set the time stamps to the current time.
- Return 0 on success, -1 (setting errno) on failure. */
-
-int
-gl_futimens (int fd ATTRIBUTE_UNUSED,
- char const *file, struct timespec const timespec[2])
-{
- /* Some Linux-based NFS clients are buggy, and mishandle time stamps
- of files in NFS file systems in some cases. We have no
- configure-time test for this, but please see
- <http://bugs.gentoo.org/show_bug.cgi?id=132673> for references to
- some of the problems with Linux 2.6.16. If this affects you,
- compile with -DHAVE_BUGGY_NFS_TIME_STAMPS; this is reported to
- help in some cases, albeit at a cost in performance. But you
- really should upgrade your kernel to a fixed version, since the
- problem affects many applications. */
-
-#if HAVE_BUGGY_NFS_TIME_STAMPS
- if (fd < 0)
- sync ();
- else
- fsync (fd);
-#endif
-
- /* There's currently no interface to set file timestamps with
- nanosecond resolution, so do the best we can, discarding any
- fractional part of the timestamp. */
-#if HAVE_FUTIMESAT || HAVE_WORKING_UTIMES
- struct timeval timeval[2];
- struct timeval const *t;
- if (timespec)
- {
- timeval[0].tv_sec = timespec[0].tv_sec;
- timeval[0].tv_usec = timespec[0].tv_nsec / 1000;
- timeval[1].tv_sec = timespec[1].tv_sec;
- timeval[1].tv_usec = timespec[1].tv_nsec / 1000;
- t = timeval;
- }
- else
- t = NULL;
-
-
- if (fd < 0)
- {
-# if HAVE_FUTIMESAT
- return futimesat (AT_FDCWD, file, t);
-# endif
- }
- else
- {
- /* If futimesat or futimes fails here, don't try to speed things
- up by returning right away. glibc can incorrectly fail with
- errno == ENOENT if /proc isn't mounted. Also, Mandrake 10.0
- in high security mode doesn't allow ordinary users to read
- /proc/self, so glibc incorrectly fails with errno == EACCES.
- If errno == EIO, EPERM, or EROFS, it's probably safe to fail
- right away, but these cases are rare enough that they're not
- worth optimizing, and who knows what other messed-up systems
- are out there? So play it safe and fall back on the code
- below. */
-# if HAVE_FUTIMESAT
- if (futimesat (fd, NULL, t) == 0)
- return 0;
-# elif HAVE_FUTIMES
- if (futimes (fd, t) == 0)
- return 0;
-# endif
- }
-#endif
-
- if (!file)
- {
-#if ! (HAVE_FUTIMESAT || (HAVE_WORKING_UTIMES && HAVE_FUTIMES))
- errno = ENOSYS;
-#endif
-
- /* Prefer EBADF to ENOSYS if both error numbers apply. */
- if (errno == ENOSYS)
- {
- int fd2 = dup (fd);
- int dup_errno = errno;
- if (0 <= fd2)
- close (fd2);
- errno = (fd2 < 0 && dup_errno == EBADF ? EBADF : ENOSYS);
- }
-
- return -1;
- }
-
-#if HAVE_WORKING_UTIMES
- return utimes (file, t);
-#else
- {
- struct utimbuf utimbuf;
- struct utimbuf const *ut;
- if (timespec)
- {
- utimbuf.actime = timespec[0].tv_sec;
- utimbuf.modtime = timespec[1].tv_sec;
- ut = &utimbuf;
- }
- else
- ut = NULL;
-
- return utime (file, ut);
- }
-#endif
-}
-
-/* Set the access and modification time stamps of FILE to be
- TIMESPEC[0] and TIMESPEC[1], respectively. */
-int
-utimens (char const *file, struct timespec const timespec[2])
-{
- return gl_futimens (-1, file, timespec);
-}
--- contrib/cpio/lib/size_max.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* size_max.h -- declare SIZE_MAX through system headers
- Copyright (C) 2005-2006 Free Software Foundation, Inc.
- Written by Simon Josefsson.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef GNULIB_SIZE_MAX_H
-#define GNULIB_SIZE_MAX_H
-
-/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */
-# include <limits.h>
-/* Get SIZE_MAX declaration on systems like glibc 2. */
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
-/* On systems where these include files don't define it, SIZE_MAX is defined
- in config.h. */
-
-#endif /* GNULIB_SIZE_MAX_H */
--- contrib/cpio/lib/mempcpy.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copy memory area and return pointer after last written byte.
- Copyright (C) 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; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef mempcpy
-
-# if HAVE_MEMPCPY
-
-/* Get mempcpy() declaration. */
-# include <string.h>
-
-# else
-
-/* Get size_t */
-# include <stddef.h>
-
-/* Copy N bytes of SRC to DEST, return pointer to bytes after the
- last written byte. */
-extern void *mempcpy (void *dest, const void *src, size_t n);
-
-# endif
-
-#endif
--- contrib/cpio/lib/obstack.h
+++ /dev/null
@@ -1,513 +0,0 @@
-/* obstack.h - object stack macros
- Copyright (C) 1988-1994,1996-1999,2003,2004,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. */
-
-/* Summary:
-
-All the apparent functions defined here are macros. The idea
-is that you would use these pre-tested macros to solve a
-very specific set of problems, and they would run fast.
-Caution: no side-effects in arguments please!! They may be
-evaluated MANY times!!
-
-These macros operate a stack of objects. Each object starts life
-small, and may grow to maturity. (Consider building a word syllable
-by syllable.) An object can move while it is growing. Once it has
-been "finished" it never changes address again. So the "top of the
-stack" is typically an immature growing object, while the rest of the
-stack is of mature, fixed size and fixed address objects.
-
-These routines grab large chunks of memory, using a function you
-supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
-by calling `obstack_chunk_free'. You must define them and declare
-them before using any obstack macros.
-
-Each independent stack is represented by a `struct obstack'.
-Each of the obstack macros expects a pointer to such a structure
-as the first argument.
-
-One motivation for this package is the problem of growing char strings
-in symbol tables. Unless you are "fascist pig with a read-only mind"
---Gosper's immortal quote from HAKMEM item 154, out of context--you
-would not like to put any arbitrary upper limit on the length of your
-symbols.
-
-In practice this often means you will build many short symbols and a
-few long symbols. At the time you are reading a symbol you don't know
-how long it is. One traditional method is to read a symbol into a
-buffer, realloc()ating the buffer every time you try to read a symbol
-that is longer than the buffer. This is beaut, but you still will
-want to copy the symbol from the buffer to a more permanent
-symbol-table entry say about half the time.
-
-With obstacks, you can work differently. Use one obstack for all symbol
-names. As you read a symbol, grow the name in the obstack gradually.
-When the name is complete, finalize it. Then, if the symbol exists already,
-free the newly read name.
-
-The way we do this is to take a large chunk, allocating memory from
-low addresses. When you want to build a symbol in the chunk you just
-add chars above the current "high water mark" in the chunk. When you
-have finished adding chars, because you got to the end of the symbol,
-you know how long the chars are, and you can create a new object.
-Mostly the chars will not burst over the highest address of the chunk,
-because you would typically expect a chunk to be (say) 100 times as
-long as an average object.
-
-In case that isn't clear, when we have enough chars to make up
-the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
-so we just point to it where it lies. No moving of chars is
-needed and this is the second win: potentially long strings need
-never be explicitly shuffled. Once an object is formed, it does not
-change its address during its lifetime.
-
-When the chars burst over a chunk boundary, we allocate a larger
-chunk, and then copy the partly formed object from the end of the old
-chunk to the beginning of the new larger chunk. We then carry on
-accreting characters to the end of the object as we normally would.
-
-A special macro is provided to add a single char at a time to a
-growing object. This allows the use of register variables, which
-break the ordinary 'growth' macro.
-
-Summary:
- We allocate large chunks.
- We carve out one object at a time from the current chunk.
- Once carved, an object never moves.
- We are free to append data of any size to the currently
- growing object.
- Exactly one object is growing in an obstack at any one time.
- You can run one obstack per control block.
- You may have as many control blocks as you dare.
- Because of the way we do it, you can `unwind' an obstack
- back to a previous state. (You may remove objects much
- as you would with a stack.)
-*/
-
-
-/* Don't do the contents of this file more than once. */
-
-#ifndef _OBSTACK_H
-#define _OBSTACK_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* We need the type of a pointer subtraction. If __PTRDIFF_TYPE__ is
- defined, as with GNU C, use that; that way we don't pollute the
- namespace with <stddef.h>'s symbols. Otherwise, include <stddef.h>
- and use ptrdiff_t. */
-
-#ifdef __PTRDIFF_TYPE__
-# define PTR_INT_TYPE __PTRDIFF_TYPE__
-#else
-# include <stddef.h>
-# define PTR_INT_TYPE ptrdiff_t
-#endif
-
-/* If B is the base of an object addressed by P, return the result of
- aligning P to the next multiple of A + 1. B and P must be of type
- char *. A + 1 must be a power of 2. */
-
-#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
-
-/* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case
- where pointers can be converted to integers, aligned as integers,
- and converted back again. If PTR_INT_TYPE is narrower than a
- pointer (e.g., the AS/400), play it safe and compute the alignment
- relative to B. Otherwise, use the faster strategy of computing the
- alignment relative to 0. */
-
-#define __PTR_ALIGN(B, P, A) \
- __BPTR_ALIGN (sizeof (PTR_INT_TYPE) < sizeof (void *) ? (B) : (char *) 0, \
- P, A)
-
-#include <string.h>
-
-struct _obstack_chunk /* Lives at front of each chunk. */
-{
- char *limit; /* 1 past end of this chunk */
- struct _obstack_chunk *prev; /* address of prior chunk or NULL */
- char contents[4]; /* objects begin here */
-};
-
-struct obstack /* control current object in current chunk */
-{
- long chunk_size; /* preferred size to allocate chunks in */
- struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
- char *object_base; /* address of object we are building */
- char *next_free; /* where to add next char to current object */
- char *chunk_limit; /* address of char after current chunk */
- union
- {
- PTR_INT_TYPE tempint;
- void *tempptr;
- } temp; /* Temporary for some macros. */
- int alignment_mask; /* Mask of alignment for each object. */
- /* These prototypes vary based on `use_extra_arg', and we use
- casts to the prototypeless function type in all assignments,
- but having prototypes here quiets -Wstrict-prototypes. */
- struct _obstack_chunk *(*chunkfun) (void *, long);
- void (*freefun) (void *, struct _obstack_chunk *);
- void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
- unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
- unsigned maybe_empty_object:1;/* There is a possibility that the current
- chunk contains a zero-length object. This
- prevents freeing the chunk if we allocate
- a bigger chunk to replace it. */
- unsigned alloc_failed:1; /* No longer used, as we now call the failed
- handler on error, but retained for binary
- compatibility. */
-};
-
-/* Declare the external functions we use; they are in obstack.c. */
-
-extern void _obstack_newchunk (struct obstack *, int);
-extern int _obstack_begin (struct obstack *, int, int,
- void *(*) (long), void (*) (void *));
-extern int _obstack_begin_1 (struct obstack *, int, int,
- void *(*) (void *, long),
- void (*) (void *, void *), void *);
-extern int _obstack_memory_used (struct obstack *);
-
-/* The default name of the function for freeing a chunk is 'obstack_free',
- but gnulib users can override this by defining '__obstack_free'. */
-#ifndef __obstack_free
-# define __obstack_free obstack_free
-#endif
-extern void __obstack_free (struct obstack *obstack, void *block);
-
-
-/* Error handler called when `obstack_chunk_alloc' failed to allocate
- more memory. This can be set to a user defined function which
- should either abort gracefully or use longjump - but shouldn't
- return. The default action is to print a message and abort. */
-extern void (*obstack_alloc_failed_handler) (void);
-
-/* Exit value used when `print_and_abort' is used. */
-extern int obstack_exit_failure;
-
-/* Pointer to beginning of object being allocated or to be allocated next.
- Note that this might not be the final address of the object
- because a new chunk might be needed to hold the final size. */
-
-#define obstack_base(h) ((void *) (h)->object_base)
-
-/* Size for allocating ordinary chunks. */
-
-#define obstack_chunk_size(h) ((h)->chunk_size)
-
-/* Pointer to next byte not yet allocated in current chunk. */
-
-#define obstack_next_free(h) ((h)->next_free)
-
-/* Mask specifying low bits that should be clear in address of an object. */
-
-#define obstack_alignment_mask(h) ((h)->alignment_mask)
-
-/* To prevent prototype warnings provide complete argument list. */
-#define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) (long)) obstack_chunk_alloc, \
- (void (*) (void *)) obstack_chunk_free)
-
-#define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) (long)) obstack_chunk_alloc, \
- (void (*) (void *)) obstack_chunk_free)
-
-#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) (long)) (chunkfun), \
- (void (*) (void *)) (freefun))
-
-#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) (void *, long)) (chunkfun), \
- (void (*) (void *, void *)) (freefun), (arg))
-
-#define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
-
-#define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
-
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
-
-#define obstack_blank_fast(h,n) ((h)->next_free += (n))
-
-#define obstack_memory_used(h) _obstack_memory_used (h)
-
-#if defined __GNUC__ && defined __STDC__ && __STDC__
-/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
- does not implement __extension__. But that compiler doesn't define
- __GNUC_MINOR__. */
-# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
-# define __extension__
-# endif
-
-/* For GNU C, if not -traditional,
- we can define these macros to compute all args only once
- without using a global variable.
- Also, we can avoid using the `temp' slot, to make faster code. */
-
-# define obstack_object_size(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (unsigned) (__o->next_free - __o->object_base); })
-
-# define obstack_room(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (unsigned) (__o->chunk_limit - __o->next_free); })
-
-# define obstack_make_room(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- (void) 0; })
-
-# define obstack_empty_p(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (__o->chunk->prev == 0 \
- && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
- __o->chunk->contents, \
- __o->alignment_mask)); })
-
-# define obstack_grow(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len > __o->chunk_limit) \
- _obstack_newchunk (__o, __len); \
- memcpy (__o->next_free, where, __len); \
- __o->next_free += __len; \
- (void) 0; })
-
-# define obstack_grow0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, __len + 1); \
- memcpy (__o->next_free, where, __len); \
- __o->next_free += __len; \
- *(__o->next_free)++ = 0; \
- (void) 0; })
-
-# define obstack_1grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, 1); \
- obstack_1grow_fast (__o, datum); \
- (void) 0; })
-
-/* These assume that the obstack alignment is good enough for pointers
- or ints, and that the data added so far to the current object
- shares that much alignment. */
-
-# define obstack_ptr_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (void *)); \
- obstack_ptr_grow_fast (__o, datum); }) \
-
-# define obstack_int_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (int) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (int)); \
- obstack_int_grow_fast (__o, datum); })
-
-# define obstack_ptr_grow_fast(OBSTACK,aptr) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- *(const void **) __o1->next_free = (aptr); \
- __o1->next_free += sizeof (const void *); \
- (void) 0; })
-
-# define obstack_int_grow_fast(OBSTACK,aint) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- *(int *) __o1->next_free = (aint); \
- __o1->next_free += sizeof (int); \
- (void) 0; })
-
-# define obstack_blank(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- obstack_blank_fast (__o, __len); \
- (void) 0; })
-
-# define obstack_alloc(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_blank (__h, (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow (__h, (where), (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow0 (__h, (where), (length)); \
- obstack_finish (__h); })
-
-/* The local variable is named __o1 to avoid a name conflict
- when obstack_blank is called. */
-# define obstack_finish(OBSTACK) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- void *__value = (void *) __o1->object_base; \
- if (__o1->next_free == __value) \
- __o1->maybe_empty_object = 1; \
- __o1->next_free \
- = __PTR_ALIGN (__o1->object_base, __o1->next_free, \
- __o1->alignment_mask); \
- if (__o1->next_free - (char *)__o1->chunk \
- > __o1->chunk_limit - (char *)__o1->chunk) \
- __o1->next_free = __o1->chunk_limit; \
- __o1->object_base = __o1->next_free; \
- __value; })
-
-# define obstack_free(OBSTACK, OBJ) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- void *__obj = (OBJ); \
- if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = (char *)__obj; \
- else (__obstack_free) (__o, __obj); })
-
-#else /* not __GNUC__ or not __STDC__ */
-
-# define obstack_object_size(h) \
- (unsigned) ((h)->next_free - (h)->object_base)
-
-# define obstack_room(h) \
- (unsigned) ((h)->chunk_limit - (h)->next_free)
-
-# define obstack_empty_p(h) \
- ((h)->chunk->prev == 0 \
- && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
- (h)->chunk->contents, \
- (h)->alignment_mask))
-
-/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
- so that we can avoid having void expressions
- in the arms of the conditional expression.
- Casting the third operand to void was tried before,
- but some compilers won't accept it. */
-
-# define obstack_make_room(h,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0))
-
-# define obstack_grow(h,where,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
- memcpy ((h)->next_free, where, (h)->temp.tempint), \
- (h)->next_free += (h)->temp.tempint)
-
-# define obstack_grow0(h,where,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0), \
- memcpy ((h)->next_free, where, (h)->temp.tempint), \
- (h)->next_free += (h)->temp.tempint, \
- *((h)->next_free)++ = 0)
-
-# define obstack_1grow(h,datum) \
-( (((h)->next_free + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), 1), 0) : 0), \
- obstack_1grow_fast (h, datum))
-
-# define obstack_ptr_grow(h,datum) \
-( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- obstack_ptr_grow_fast (h, datum))
-
-# define obstack_int_grow(h,datum) \
-( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- obstack_int_grow_fast (h, datum))
-
-# define obstack_ptr_grow_fast(h,aptr) \
- (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
-
-# define obstack_int_grow_fast(h,aint) \
- (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint))
-
-# define obstack_blank(h,length) \
-( (h)->temp.tempint = (length), \
- (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
- obstack_blank_fast (h, (h)->temp.tempint))
-
-# define obstack_alloc(h,length) \
- (obstack_blank ((h), (length)), obstack_finish ((h)))
-
-# define obstack_copy(h,where,length) \
- (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_copy0(h,where,length) \
- (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_finish(h) \
-( ((h)->next_free == (h)->object_base \
- ? (((h)->maybe_empty_object = 1), 0) \
- : 0), \
- (h)->temp.tempptr = (h)->object_base, \
- (h)->next_free \
- = __PTR_ALIGN ((h)->object_base, (h)->next_free, \
- (h)->alignment_mask), \
- (((h)->next_free - (char *) (h)->chunk \
- > (h)->chunk_limit - (char *) (h)->chunk) \
- ? ((h)->next_free = (h)->chunk_limit) : 0), \
- (h)->object_base = (h)->next_free, \
- (h)->temp.tempptr)
-
-# define obstack_free(h,obj) \
-( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \
- ((((h)->temp.tempint > 0 \
- && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp.tempint + (char *) (h)->chunk) \
- : (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
-
-#endif /* not __GNUC__ or not __STDC__ */
-
-#ifdef __cplusplus
-} /* C++ */
-#endif
-
-#endif /* obstack.h */
--- contrib/cpio/lib/dirfd.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* 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);
-}
--- contrib/cpio/lib/sysexits_.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* exit() exit codes for some BSD system programs.
- Copyright (C) 2003, 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 Simon Josefsson based on sysexits(3) man page */
-
-#ifndef _GL_SYSEXITS_H
-
-#if @HAVE_SYSEXITS_H@
-
-/* IRIX 6.5 has an <unistd.h> that defines a macro EX_OK with a nonzero
- value. Override it. See
- <http://lists.gnu.org/archive/html/bug-gnulib/2007-03/msg00361.html> */
-# ifdef __sgi
-# include <unistd.h>
-# undef EX_OK
-# endif
-
-/* The include_next requires a split double-inclusion guard. */
-# if @HAVE_INCLUDE_NEXT@
-# include_next <sysexits.h>
-# else
-# include @ABSOLUTE_SYSEXITS_H@
-# endif
-
-/* HP-UX 11 <sysexits.h> ends at EX_NOPERM. */
-# ifndef EX_CONFIG
-# define EX_CONFIG 78
-# endif
-
-#endif
-
-#ifndef _GL_SYSEXITS_H
-#define _GL_SYSEXITS_H
-
-#if !@HAVE_SYSEXITS_H@
-
-# define EX_OK 0 /* same value as EXIT_SUCCESS */
-
-# define EX_USAGE 64
-# define EX_DATAERR 65
-# define EX_NOINPUT 66
-# define EX_NOUSER 67
-# define EX_NOHOST 68
-# define EX_UNAVAILABLE 69
-# define EX_SOFTWARE 70
-# define EX_OSERR 71
-# define EX_OSFILE 72
-# define EX_CANTCREAT 73
-# define EX_IOERR 74
-# define EX_TEMPFAIL 75
-# define EX_PROTOCOL 76
-# define EX_NOPERM 77
-# define EX_CONFIG 78
-
-#endif
-
-#endif /* _GL_SYSEXITS_H */
-#endif /* _GL_SYSEXITS_H */
--- contrib/cpio/lib/obstack.c
+++ /dev/null
@@ -1,431 +0,0 @@
-/* obstack.c - subroutines used implicitly by object stack macros
-
- Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 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; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef _LIBC
-# include <obstack.h>
-# include <shlib-compat.h>
-#else
-# include <config.h>
-# include "obstack.h"
-#endif
-
-/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
- incremented whenever callers compiled using an old obstack.h can no
- longer properly call the functions in this obstack.c. */
-#define OBSTACK_INTERFACE_VERSION 1
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself, and the installed library
- supports the same library interface we do. This code is part of the GNU
- C Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object
- files, it is simpler to just do this in the source for each such file. */
-
-#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
-#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
-# include <gnu-versions.h>
-# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
-# define ELIDE_CODE
-# endif
-#endif
-
-#include <stddef.h>
-
-#ifndef ELIDE_CODE
-
-# include <stdint.h>
-
-/* Determine default alignment. */
-union fooround
-{
- uintmax_t i;
- long double d;
- void *p;
-};
-struct fooalign
-{
- char c;
- union fooround u;
-};
-/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
- But in fact it might be less smart and round addresses to as much as
- DEFAULT_ROUNDING. So we prepare for it to do that. */
-enum
- {
- DEFAULT_ALIGNMENT = offsetof (struct fooalign, u),
- DEFAULT_ROUNDING = sizeof (union fooround)
- };
-
-/* When we copy a long block of data, this is the unit to do it with.
- On some machines, copying successive ints does not work;
- in such a case, redefine COPYING_UNIT to `long' (if that works)
- or `char' as a last resort. */
-# ifndef COPYING_UNIT
-# define COPYING_UNIT int
-# endif
-
-
-/* The functions allocating more room by calling `obstack_chunk_alloc'
- jump to the handler pointed to by `obstack_alloc_failed_handler'.
- This can be set to a user defined function which should either
- abort gracefully or use longjump - but shouldn't return. This
- variable by default points to the internal function
- `print_and_abort'. */
-static void print_and_abort (void);
-void (*obstack_alloc_failed_handler) (void) = print_and_abort;
-
-/* Exit value used when `print_and_abort' is used. */
-# include <stdlib.h>
-# ifdef _LIBC
-int obstack_exit_failure = EXIT_FAILURE;
-# else
-# include "exitfail.h"
-# define obstack_exit_failure exit_failure
-# endif
-
-# ifdef _LIBC
-# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
-/* A looong time ago (before 1994, anyway; we're not sure) this global variable
- was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
- library still exports it because somebody might use it. */
-struct obstack *_obstack_compat;
-compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
-# endif
-# endif
-
-/* Define a macro that either calls functions with the traditional malloc/free
- calling interface, or calls functions with the mmalloc/mfree interface
- (that adds an extra first argument), based on the state of use_extra_arg.
- For free, do not use ?:, since some compilers, like the MIPS compilers,
- do not allow (expr) ? void : void. */
-
-# define CALL_CHUNKFUN(h, size) \
- (((h) -> use_extra_arg) \
- ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
- : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
-
-# define CALL_FREEFUN(h, old_chunk) \
- do { \
- if ((h) -> use_extra_arg) \
- (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
- else \
- (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
- } while (0)
-
-
-/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
- Objects start on multiples of ALIGNMENT (0 means use default).
- CHUNKFUN is the function to use to allocate chunks,
- and FREEFUN the function to free them.
-
- Return nonzero if successful, calls obstack_alloc_failed_handler if
- allocation fails. */
-
-int
-_obstack_begin (struct obstack *h,
- int size, int alignment,
- void *(*chunkfun) (long),
- void (*freefun) (void *))
-{
- register struct _obstack_chunk *chunk; /* points to new chunk */
-
- if (alignment == 0)
- alignment = DEFAULT_ALIGNMENT;
- if (size == 0)
- /* Default size is what GNU malloc can fit in a 4096-byte block. */
- {
- /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
- Use the values for range checking, because if range checking is off,
- the extra bytes won't be missed terribly, but if range checking is on
- and we used a larger request, a whole extra 4096 bytes would be
- allocated.
-
- These number are irrelevant to the new GNU malloc. I suspect it is
- less sensitive to the size of the request. */
- int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
- + 4 + DEFAULT_ROUNDING - 1)
- & ~(DEFAULT_ROUNDING - 1));
- size = 4096 - extra;
- }
-
- h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
- h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
- h->chunk_size = size;
- h->alignment_mask = alignment - 1;
- h->use_extra_arg = 0;
-
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
- if (!chunk)
- (*obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
- alignment - 1);
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
- chunk->prev = 0;
- /* The initial chunk now contains no empty object. */
- h->maybe_empty_object = 0;
- h->alloc_failed = 0;
- return 1;
-}
-
-int
-_obstack_begin_1 (struct obstack *h, int size, int alignment,
- void *(*chunkfun) (void *, long),
- void (*freefun) (void *, void *),
- void *arg)
-{
- register struct _obstack_chunk *chunk; /* points to new chunk */
-
- if (alignment == 0)
- alignment = DEFAULT_ALIGNMENT;
- if (size == 0)
- /* Default size is what GNU malloc can fit in a 4096-byte block. */
- {
- /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
- Use the values for range checking, because if range checking is off,
- the extra bytes won't be missed terribly, but if range checking is on
- and we used a larger request, a whole extra 4096 bytes would be
- allocated.
-
- These number are irrelevant to the new GNU malloc. I suspect it is
- less sensitive to the size of the request. */
- int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
- + 4 + DEFAULT_ROUNDING - 1)
- & ~(DEFAULT_ROUNDING - 1));
- size = 4096 - extra;
- }
-
- h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
- h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
- h->chunk_size = size;
- h->alignment_mask = alignment - 1;
- h->extra_arg = arg;
- h->use_extra_arg = 1;
-
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
- if (!chunk)
- (*obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
- alignment - 1);
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
- chunk->prev = 0;
- /* The initial chunk now contains no empty object. */
- h->maybe_empty_object = 0;
- h->alloc_failed = 0;
- return 1;
-}
-
-/* Allocate a new current chunk for the obstack *H
- on the assumption that LENGTH bytes need to be added
- to the current object, or a new object of length LENGTH allocated.
- Copies any partial object from the end of the old chunk
- to the beginning of the new one. */
-
-void
-_obstack_newchunk (struct obstack *h, int length)
-{
- register struct _obstack_chunk *old_chunk = h->chunk;
- register struct _obstack_chunk *new_chunk;
- register long new_size;
- register long obj_size = h->next_free - h->object_base;
- register long i;
- long already;
- char *object_base;
-
- /* Compute size for new chunk. */
- new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100;
- if (new_size < h->chunk_size)
- new_size = h->chunk_size;
-
- /* Allocate and initialize the new chunk. */
- new_chunk = CALL_CHUNKFUN (h, new_size);
- if (!new_chunk)
- (*obstack_alloc_failed_handler) ();
- h->chunk = new_chunk;
- new_chunk->prev = old_chunk;
- new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
-
- /* Compute an aligned object_base in the new chunk */
- object_base =
- __PTR_ALIGN ((char *) new_chunk, new_chunk->contents, h->alignment_mask);
-
- /* Move the existing object to the new chunk.
- Word at a time is fast and is safe if the object
- is sufficiently aligned. */
- if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT)
- {
- for (i = obj_size / sizeof (COPYING_UNIT) - 1;
- i >= 0; i--)
- ((COPYING_UNIT *)object_base)[i]
- = ((COPYING_UNIT *)h->object_base)[i];
- /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT,
- but that can cross a page boundary on a machine
- which does not do strict alignment for COPYING_UNITS. */
- already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT);
- }
- else
- already = 0;
- /* Copy remaining bytes one by one. */
- for (i = already; i < obj_size; i++)
- object_base[i] = h->object_base[i];
-
- /* If the object just copied was the only data in OLD_CHUNK,
- free that chunk and remove it from the chain.
- But not if that chunk might contain an empty object. */
- if (! h->maybe_empty_object
- && (h->object_base
- == __PTR_ALIGN ((char *) old_chunk, old_chunk->contents,
- h->alignment_mask)))
- {
- new_chunk->prev = old_chunk->prev;
- CALL_FREEFUN (h, old_chunk);
- }
-
- h->object_base = object_base;
- h->next_free = h->object_base + obj_size;
- /* The new chunk certainly contains no empty object yet. */
- h->maybe_empty_object = 0;
-}
-# ifdef _LIBC
-libc_hidden_def (_obstack_newchunk)
-# endif
-
-/* Return nonzero if object OBJ has been allocated from obstack H.
- This is here for debugging.
- If you use it in a program, you are probably losing. */
-
-/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
- obstack.h because it is just for debugging. */
-int _obstack_allocated_p (struct obstack *h, void *obj);
-
-int
-_obstack_allocated_p (struct obstack *h, void *obj)
-{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
-
- lp = (h)->chunk;
- /* We use >= rather than > since the object cannot be exactly at
- the beginning of the chunk but might be an empty object exactly
- at the end of an adjacent chunk. */
- while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj))
- {
- plp = lp->prev;
- lp = plp;
- }
- return lp != 0;
-}
-
-/* Free objects in obstack H, including OBJ and everything allocate
- more recently than OBJ. If OBJ is zero, free everything in H. */
-
-# undef obstack_free
-
-void
-__obstack_free (struct obstack *h, void *obj)
-{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
-
- lp = h->chunk;
- /* We use >= because there cannot be an object at the beginning of a chunk.
- But there can be an empty object at that address
- at the end of another chunk. */
- while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj))
- {
- plp = lp->prev;
- CALL_FREEFUN (h, lp);
- lp = plp;
- /* If we switch chunks, we can't tell whether the new current
- chunk contains an empty object, so assume that it may. */
- h->maybe_empty_object = 1;
- }
- if (lp)
- {
- h->object_base = h->next_free = (char *) (obj);
- h->chunk_limit = lp->limit;
- h->chunk = lp;
- }
- else if (obj != 0)
- /* obj is not in any of the chunks! */
- abort ();
-}
-
-# ifdef _LIBC
-/* Older versions of libc used a function _obstack_free intended to be
- called by non-GCC compilers. */
-strong_alias (obstack_free, _obstack_free)
-# endif
-
-int
-_obstack_memory_used (struct obstack *h)
-{
- register struct _obstack_chunk* lp;
- register int nbytes = 0;
-
- for (lp = h->chunk; lp != 0; lp = lp->prev)
- {
- nbytes += lp->limit - (char *) lp;
- }
- return nbytes;
-}
-
-/* Define the error handler. */
-# ifdef _LIBC
-# include <libintl.h>
-# else
-# include "gettext.h"
-# endif
-# ifndef _
-# define _(msgid) gettext (msgid)
-# endif
-
-# ifdef _LIBC
-# include <libio/iolibio.h>
-# endif
-
-# ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
-# define __attribute__(Spec) /* empty */
-# endif
-# endif
-
-static void
-__attribute__ ((noreturn))
-print_and_abort (void)
-{
- /* Don't change any of these strings. Yes, it would be possible to add
- the newline to the string and use fputs or so. But this must not
- happen because the "memory exhausted" message appears in other places
- like this and the translation should be reused instead of creating
- a very similar string which requires a separate translation. */
-# ifdef _LIBC
- (void) __fxprintf (NULL, "%s\n", _("memory exhausted"));
-# else
- fprintf (stderr, "%s\n", _("memory exhausted"));
-# endif
- exit (obstack_exit_failure);
-}
-
-#endif /* !ELIDE_CODE */
--- contrib/cpio/lib/rtapelib.c
+++ /dev/null
@@ -1,740 +0,0 @@
-/* Functions for communicating with a remote tape drive.
-
- Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999, 2000, 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. */
-
-/* The man page rmt(8) for /etc/rmt documents the remote mag tape protocol
- which rdump and rrestore use. Unfortunately, the man page is *WRONG*.
- The author of the routines I'm including originally wrote his code just
- based on the man page, and it didn't work, so he went to the rdump source
- to figure out why. The only thing he had to change was to check for the
- 'F' return code in addition to the 'E', and to separate the various
- arguments with \n instead of a space. I personally don't think that this
- is much of a problem, but I wanted to point it out. -- Arnold Robbins
-
- Originally written by Jeff Lee, modified some by Arnold Robbins. Redone
- as a library that can replace open, read, write, etc., by Fred Fish, with
- some additional work by Arnold Robbins. Modified to make all rmt* calls
- into macros for speed by Jay Fenlason. Use -DWITH_REXEC for rexec
- code, courtesy of Dan Kegel. */
-
-#include "system.h"
-#include "system-ioctl.h"
-
-#include <safe-read.h>
-#include <full-write.h>
-
-/* Try hard to get EOPNOTSUPP defined. 486/ISC has it in net/errno.h,
- 3B2/SVR3 has it in sys/inet.h. Otherwise, like on MSDOS, use EINVAL. */
-
-#ifndef EOPNOTSUPP
-# if HAVE_NET_ERRNO_H
-# include <net/errno.h>
-# endif
-# if HAVE_SYS_INET_H
-# include <sys/inet.h>
-# endif
-# ifndef EOPNOTSUPP
-# define EOPNOTSUPP EINVAL
-# endif
-#endif
-
-#include <signal.h>
-
-#if HAVE_NETDB_H
-# include <netdb.h>
-#endif
-
-#include <rmt.h>
-#include <rmt-command.h>
-
-/* Exit status if exec errors. */
-#define EXIT_ON_EXEC_ERROR 128
-
-/* FIXME: Size of buffers for reading and writing commands to rmt. */
-#define COMMAND_BUFFER_SIZE 64
-
-#ifndef RETSIGTYPE
-# define RETSIGTYPE void
-#endif
-
-/* FIXME: Maximum number of simultaneous remote tape connections. */
-#define MAXUNIT 4
-
-#define PREAD 0 /* read file descriptor from pipe() */
-#define PWRITE 1 /* write file descriptor from pipe() */
-
-/* Return the parent's read side of remote tape connection Fd. */
-#define READ_SIDE(Fd) (from_remote[Fd][PREAD])
-
-/* Return the parent's write side of remote tape connection Fd. */
-#define WRITE_SIDE(Fd) (to_remote[Fd][PWRITE])
-
-/* The pipes for receiving data from remote tape drives. */
-static int from_remote[MAXUNIT][2] = {{-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}};
-
-/* The pipes for sending data to remote tape drives. */
-static int to_remote[MAXUNIT][2] = {{-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}};
-
-char *rmt_command = DEFAULT_RMT_COMMAND;
-
-/* Temporary variable used by macros in rmt.h. */
-char *rmt_dev_name__;
-
-/* If true, always consider file names to be local, even if they contain
- colons */
-bool force_local_option;
-
-
-
-/* Close remote tape connection HANDLE, and reset errno to ERRNO_VALUE. */
-static void
-_rmt_shutdown (int handle, int errno_value)
-{
- close (READ_SIDE (handle));
- close (WRITE_SIDE (handle));
- READ_SIDE (handle) = -1;
- WRITE_SIDE (handle) = -1;
- errno = errno_value;
-}
-
-/* Attempt to perform the remote tape command specified in BUFFER on
- remote tape connection HANDLE. Return 0 if successful, -1 on
- error. */
-static int
-do_command (int handle, const char *buffer)
-{
- /* Save the current pipe handler and try to make the request. */
-
- size_t length = strlen (buffer);
- RETSIGTYPE (*pipe_handler) () = signal (SIGPIPE, SIG_IGN);
- ssize_t written = full_write (WRITE_SIDE (handle), buffer, length);
- signal (SIGPIPE, pipe_handler);
-
- if (written == length)
- return 0;
-
- /* Something went wrong. Close down and go home. */
-
- _rmt_shutdown (handle, EIO);
- return -1;
-}
-
-static char *
-get_status_string (int handle, char *command_buffer)
-{
- char *cursor;
- int counter;
-
- /* Read the reply command line. */
-
- for (counter = 0, cursor = command_buffer;
- counter < COMMAND_BUFFER_SIZE;
- counter++, cursor++)
- {
- if (safe_read (READ_SIDE (handle), cursor, 1) != 1)
- {
- _rmt_shutdown (handle, EIO);
- return 0;
- }
- if (*cursor == '\n')
- {
- *cursor = '\0';
- break;
- }
- }
-
- if (counter == COMMAND_BUFFER_SIZE)
- {
- _rmt_shutdown (handle, EIO);
- return 0;
- }
-
- /* Check the return status. */
-
- for (cursor = command_buffer; *cursor; cursor++)
- if (*cursor != ' ')
- break;
-
- if (*cursor == 'E' || *cursor == 'F')
- {
- /* Skip the error message line. */
-
- /* FIXME: there is better to do than merely ignoring error messages
- coming from the remote end. Translate them, too... */
-
- {
- char character;
-
- while (safe_read (READ_SIDE (handle), &character, 1) == 1)
- if (character == '\n')
- break;
- }
-
- errno = atoi (cursor + 1);
-
- if (*cursor == 'F')
- _rmt_shutdown (handle, errno);
-
- return 0;
- }
-
- /* Check for mis-synced pipes. */
-
- if (*cursor != 'A')
- {
- _rmt_shutdown (handle, EIO);
- return 0;
- }
-
- /* Got an `A' (success) response. */
-
- return cursor + 1;
-}
-
-/* Read and return the status from remote tape connection HANDLE. If
- an error occurred, return -1 and set errno. */
-static long int
-get_status (int handle)
-{
- char command_buffer[COMMAND_BUFFER_SIZE];
- const char *status = get_status_string (handle, command_buffer);
- if (status)
- {
- long int result = atol (status);
- if (0 <= result)
- return result;
- errno = EIO;
- }
- return -1;
-}
-
-static off_t
-get_status_off (int handle)
-{
- char command_buffer[COMMAND_BUFFER_SIZE];
- const char *status = get_status_string (handle, command_buffer);
-
- if (! status)
- return -1;
- else
- {
- /* Parse status, taking care to check for overflow.
- We can't use standard functions,
- since off_t might be longer than long. */
-
- off_t count = 0;
- int negative;
-
- for (; *status == ' ' || *status == '\t'; status++)
- continue;
-
- negative = *status == '-';
- status += negative || *status == '+';
-
- for (;;)
- {
- int digit = *status++ - '0';
- if (9 < (unsigned) digit)
- break;
- else
- {
- off_t c10 = 10 * count;
- off_t nc = negative ? c10 - digit : c10 + digit;
- if (c10 / 10 != count || (negative ? c10 < nc : nc < c10))
- return -1;
- count = nc;
- }
- }
-
- return count;
- }
-}
-
-#if WITH_REXEC
-
-/* Execute /etc/rmt as user USER on remote system HOST using rexec.
- Return a file descriptor of a bidirectional socket for stdin and
- stdout. If USER is zero, use the current username.
-
- By default, this code is not used, since it requires that the user
- have a .netrc file in his/her home directory, or that the
- application designer be willing to have rexec prompt for login and
- password info. This may be unacceptable, and .rhosts files for use
- with rsh are much more common on BSD systems. */
-static int
-_rmt_rexec (char *host, char *user)
-{
- int saved_stdin = dup (STDIN_FILENO);
- int saved_stdout = dup (STDOUT_FILENO);
- struct servent *rexecserv;
- int result;
-
- /* When using cpio -o < filename, stdin is no longer the tty. But the
- rexec subroutine reads the login and the passwd on stdin, to allow
- remote execution of the command. So, reopen stdin and stdout on
- /dev/tty before the rexec and give them back their original value
- after. */
-
- if (! freopen ("/dev/tty", "r", stdin))
- freopen ("/dev/null", "r", stdin);
- if (! freopen ("/dev/tty", "w", stdout))
- freopen ("/dev/null", "w", stdout);
-
- if (rexecserv = getservbyname ("exec", "tcp"), !rexecserv)
- error (EXIT_ON_EXEC_ERROR, 0, _("exec/tcp: Service not available"));
-
- result = rexec (&host, rexecserv->s_port, user, 0, rmt_command, 0);
- if (fclose (stdin) == EOF)
- error (0, errno, _("stdin"));
- fdopen (saved_stdin, "r");
- if (fclose (stdout) == EOF)
- error (0, errno, _("stdout"));
- fdopen (saved_stdout, "w");
-
- return result;
-}
-
-#endif /* WITH_REXEC */
-
-/* Place into BUF a string representing OFLAG, which must be suitable
- as argument 2 of `open'. BUF must be large enough to hold the
- result. This function should generate a string that decode_oflag
- can parse. */
-static void
-encode_oflag (char *buf, int oflag)
-{
- sprintf (buf, "%d ", oflag);
-
- switch (oflag & O_ACCMODE)
- {
- case O_RDONLY: strcat (buf, "O_RDONLY"); break;
- case O_RDWR: strcat (buf, "O_RDWR"); break;
- case O_WRONLY: strcat (buf, "O_WRONLY"); break;
- default: abort ();
- }
-
-#ifdef O_APPEND
- if (oflag & O_APPEND) strcat (buf, "|O_APPEND");
-#endif
- if (oflag & O_CREAT) strcat (buf, "|O_CREAT");
-#ifdef O_DSYNC
- if (oflag & O_DSYNC) strcat (buf, "|O_DSYNC");
-#endif
- if (oflag & O_EXCL) strcat (buf, "|O_EXCL");
-#ifdef O_LARGEFILE
- if (oflag & O_LARGEFILE) strcat (buf, "|O_LARGEFILE");
-#endif
-#ifdef O_NOCTTY
- if (oflag & O_NOCTTY) strcat (buf, "|O_NOCTTY");
-#endif
- if (oflag & O_NONBLOCK) strcat (buf, "|O_NONBLOCK");
-#ifdef O_RSYNC
- if (oflag & O_RSYNC) strcat (buf, "|O_RSYNC");
-#endif
-#ifdef O_SYNC
- if (oflag & O_SYNC) strcat (buf, "|O_SYNC");
-#endif
- if (oflag & O_TRUNC) strcat (buf, "|O_TRUNC");
-}
-
-/* Open a file (a magnetic tape device?) on the system specified in
- FILE_NAME, as the given user. FILE_NAME has the form `[USER@]HOST:FILE'.
- OPEN_MODE is O_RDONLY, O_WRONLY, etc. If successful, return the
- remote pipe number plus BIAS. REMOTE_SHELL may be overridden. On
- error, return -1. */
-int
-rmt_open__ (const char *file_name, int open_mode, int bias,
- const char *remote_shell)
-{
- int remote_pipe_number; /* pseudo, biased file descriptor */
- char *file_name_copy; /* copy of file_name string */
- char *remote_host; /* remote host name */
- char *remote_file; /* remote file name (often a device) */
- char *remote_user; /* remote user name */
-
- /* Find an unused pair of file descriptors. */
-
- for (remote_pipe_number = 0;
- remote_pipe_number < MAXUNIT;
- remote_pipe_number++)
- if (READ_SIDE (remote_pipe_number) == -1
- && WRITE_SIDE (remote_pipe_number) == -1)
- break;
-
- if (remote_pipe_number == MAXUNIT)
- {
- errno = EMFILE;
- return -1;
- }
-
- /* Pull apart the system and device, and optional user. */
-
- {
- char *cursor;
-
- file_name_copy = xstrdup (file_name);
- remote_host = file_name_copy;
- remote_user = 0;
- remote_file = 0;
-
- for (cursor = file_name_copy; *cursor; cursor++)
- switch (*cursor)
- {
- default:
- break;
-
- case '\n':
- /* Do not allow newlines in the file_name, since the protocol
- uses newline delimiters. */
- free (file_name_copy);
- errno = ENOENT;
- return -1;
-
- case '@':
- if (!remote_user)
- {
- remote_user = remote_host;
- *cursor = '\0';
- remote_host = cursor + 1;
- }
- break;
-
- case ':':
- if (!remote_file)
- {
- *cursor = '\0';
- remote_file = cursor + 1;
- }
- break;
- }
- }
-
- /* FIXME: Should somewhat validate the decoding, here. */
-
- if (remote_user && *remote_user == '\0')
- remote_user = 0;
-
-#if WITH_REXEC
-
- /* Execute the remote command using rexec. */
-
- READ_SIDE (remote_pipe_number) = _rmt_rexec (remote_host, remote_user);
- if (READ_SIDE (remote_pipe_number) < 0)
- {
- int e = errno;
- free (file_name_copy);
- errno = e;
- return -1;
- }
-
- WRITE_SIDE (remote_pipe_number) = READ_SIDE (remote_pipe_number);
-
-#else /* not WITH_REXEC */
- {
- const char *remote_shell_basename;
- pid_t status;
-
- /* Identify the remote command to be executed. */
-
- if (!remote_shell)
- {
-#ifdef REMOTE_SHELL
- remote_shell = REMOTE_SHELL;
-#else
- free (file_name_copy);
- errno = EIO;
- return -1;
-#endif
- }
- remote_shell_basename = base_name (remote_shell);
-
- /* Set up the pipes for the `rsh' command, and fork. */
-
- if (pipe (to_remote[remote_pipe_number]) == -1
- || pipe (from_remote[remote_pipe_number]) == -1)
- {
- int e = errno;
- free (file_name_copy);
- errno = e;
- return -1;
- }
-
- status = fork ();
- if (status == -1)
- {
- int e = errno;
- free (file_name_copy);
- errno = e;
- return -1;
- }
-
- if (status == 0)
- {
- /* Child. */
-
- close (STDIN_FILENO);
- dup (to_remote[remote_pipe_number][PREAD]);
- close (to_remote[remote_pipe_number][PREAD]);
- close (to_remote[remote_pipe_number][PWRITE]);
-
- close (STDOUT_FILENO);
- dup (from_remote[remote_pipe_number][PWRITE]);
- close (from_remote[remote_pipe_number][PREAD]);
- close (from_remote[remote_pipe_number][PWRITE]);
-
- sys_reset_uid_gid ();
-
- if (remote_user)
- execl (remote_shell, remote_shell_basename, remote_host,
- "-l", remote_user, rmt_command, (char *) 0);
- else
- execl (remote_shell, remote_shell_basename, remote_host,
- rmt_command, (char *) 0);
-
- /* Bad problems if we get here. */
-
- /* In a previous version, _exit was used here instead of exit. */
- error (EXIT_ON_EXEC_ERROR, errno, _("Cannot execute remote shell"));
- }
-
- /* Parent. */
-
- close (from_remote[remote_pipe_number][PWRITE]);
- close (to_remote[remote_pipe_number][PREAD]);
- }
-#endif /* not WITH_REXEC */
-
- /* Attempt to open the tape device. */
-
- {
- size_t remote_file_len = strlen (remote_file);
- char *command_buffer = xmalloc (remote_file_len + 1000);
- sprintf (command_buffer, "O%s\n", remote_file);
- encode_oflag (command_buffer + remote_file_len + 2, open_mode);
- strcat (command_buffer, "\n");
- if (do_command (remote_pipe_number, command_buffer) == -1
- || get_status (remote_pipe_number) == -1)
- {
- int e = errno;
- free (command_buffer);
- free (file_name_copy);
- _rmt_shutdown (remote_pipe_number, e);
- return -1;
- }
- free (command_buffer);
- }
-
- free (file_name_copy);
- return remote_pipe_number + bias;
-}
-
-/* Close remote tape connection HANDLE and shut down. Return 0 if
- successful, -1 on error. */
-int
-rmt_close__ (int handle)
-{
- long int status;
-
- if (do_command (handle, "C\n") == -1)
- return -1;
-
- status = get_status (handle);
- _rmt_shutdown (handle, errno);
- return status;
-}
-
-/* Read up to LENGTH bytes into BUFFER from remote tape connection HANDLE.
- Return the number of bytes read on success, SAFE_READ_ERROR on error. */
-size_t
-rmt_read__ (int handle, char *buffer, size_t length)
-{
- char command_buffer[COMMAND_BUFFER_SIZE];
- size_t status;
- size_t rlen;
- size_t counter;
-
- sprintf (command_buffer, "R%lu\n", (unsigned long) length);
- if (do_command (handle, command_buffer) == -1
- || (status = get_status (handle)) == SAFE_READ_ERROR)
- return SAFE_READ_ERROR;
-
- for (counter = 0; counter < status; counter += rlen, buffer += rlen)
- {
- rlen = safe_read (READ_SIDE (handle), buffer, status - counter);
- if (rlen == SAFE_READ_ERROR || rlen == 0)
- {
- _rmt_shutdown (handle, EIO);
- return SAFE_READ_ERROR;
- }
- }
-
- return status;
-}
-
-/* Write LENGTH bytes from BUFFER to remote tape connection HANDLE.
- Return the number of bytes written. */
-size_t
-rmt_write__ (int handle, char *buffer, size_t length)
-{
- char command_buffer[COMMAND_BUFFER_SIZE];
- RETSIGTYPE (*pipe_handler) ();
- size_t written;
-
- sprintf (command_buffer, "W%lu\n", (unsigned long) length);
- if (do_command (handle, command_buffer) == -1)
- return 0;
-
- pipe_handler = signal (SIGPIPE, SIG_IGN);
- written = full_write (WRITE_SIDE (handle), buffer, length);
- signal (SIGPIPE, pipe_handler);
- if (written == length)
- {
- long int r = get_status (handle);
- if (r < 0)
- return 0;
- if (r == length)
- return length;
- written = r;
- }
-
- /* Write error. */
-
- _rmt_shutdown (handle, EIO);
- return written;
-}
-
-/* Perform an imitation lseek operation on remote tape connection
- HANDLE. Return the new file offset if successful, -1 if on error. */
-off_t
-rmt_lseek__ (int handle, off_t offset, int whence)
-{
- char command_buffer[COMMAND_BUFFER_SIZE];
- char operand_buffer[UINTMAX_STRSIZE_BOUND];
- uintmax_t u = offset < 0 ? - (uintmax_t) offset : (uintmax_t) offset;
- char *p = operand_buffer + sizeof operand_buffer;
-
- *--p = 0;
- do
- *--p = '0' + (int) (u % 10);
- while ((u /= 10) != 0);
- if (offset < 0)
- *--p = '-';
-
- switch (whence)
- {
- case SEEK_SET: whence = 0; break;
- case SEEK_CUR: whence = 1; break;
- case SEEK_END: whence = 2; break;
- default: abort ();
- }
-
- sprintf (command_buffer, "L%s\n%d\n", p, whence);
-
- if (do_command (handle, command_buffer) == -1)
- return -1;
-
- return get_status_off (handle);
-}
-
-/* Perform a raw tape operation on remote tape connection HANDLE.
- Return the results of the ioctl, or -1 on error. */
-int
-rmt_ioctl__ (int handle, int operation, char *argument)
-{
- switch (operation)
- {
- default:
- errno = EOPNOTSUPP;
- return -1;
-
-#ifdef MTIOCTOP
- case MTIOCTOP:
- {
- char command_buffer[COMMAND_BUFFER_SIZE];
- char operand_buffer[UINTMAX_STRSIZE_BOUND];
- uintmax_t u = (((struct mtop *) argument)->mt_count < 0
- ? - (uintmax_t) ((struct mtop *) argument)->mt_count
- : (uintmax_t) ((struct mtop *) argument)->mt_count);
- char *p = operand_buffer + sizeof operand_buffer;
-
- *--p = 0;
- do
- *--p = '0' + (int) (u % 10);
- while ((u /= 10) != 0);
- if (((struct mtop *) argument)->mt_count < 0)
- *--p = '-';
-
- /* MTIOCTOP is the easy one. Nothing is transferred in binary. */
-
- sprintf (command_buffer, "I%d\n%s\n",
- ((struct mtop *) argument)->mt_op, p);
- if (do_command (handle, command_buffer) == -1)
- return -1;
-
- return get_status (handle);
- }
-#endif /* MTIOCTOP */
-
-#ifdef MTIOCGET
- case MTIOCGET:
- {
- ssize_t status;
- size_t counter;
-
- /* Grab the status and read it directly into the structure. This
- assumes that the status buffer is not padded and that 2 shorts
- fit in a long without any word alignment problems; i.e., the
- whole struct is contiguous. NOTE - this is probably NOT a good
- assumption. */
-
- if (do_command (handle, "S") == -1
- || (status = get_status (handle), status == -1))
- return -1;
-
- for (; status > 0; status -= counter, argument += counter)
- {
- counter = safe_read (READ_SIDE (handle), argument, status);
- if (counter == SAFE_READ_ERROR || counter == 0)
- {
- _rmt_shutdown (handle, EIO);
- return -1;
- }
- }
-
- /* Check for byte position. mt_type (or mt_model) is a small integer
- field (normally) so we will check its magnitude. If it is larger
- than 256, we will assume that the bytes are swapped and go through
- and reverse all the bytes. */
-
- if (((struct mtget *) argument)->MTIO_CHECK_FIELD < 256)
- return 0;
-
- for (counter = 0; counter < status; counter += 2)
- {
- char copy = argument[counter];
-
- argument[counter] = argument[counter + 1];
- argument[counter + 1] = copy;
- }
-
- return 0;
- }
-#endif /* MTIOCGET */
-
- }
-}
--- contrib/cpio/lib/float+.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/* Supplemental information about the floating-point formats.
- Copyright (C) 2007 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno at clisp.org>, 2007.
-
- 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 _FLOATPLUS_H
-#define _FLOATPLUS_H
-
-#include <float.h>
-#include <limits.h>
-
-/* Number of bits in the mantissa of a floating-point number, including the
- "hidden bit". */
-#if FLT_RADIX == 2
-# define FLT_MANT_BIT FLT_MANT_DIG
-# define DBL_MANT_BIT DBL_MANT_DIG
-# define LDBL_MANT_BIT LDBL_MANT_DIG
-#elif FLT_RADIX == 4
-# define FLT_MANT_BIT (FLT_MANT_DIG * 2)
-# define DBL_MANT_BIT (DBL_MANT_DIG * 2)
-# define LDBL_MANT_BIT (LDBL_MANT_DIG * 2)
-#elif FLT_RADIX == 16
-# define FLT_MANT_BIT (FLT_MANT_DIG * 4)
-# define DBL_MANT_BIT (DBL_MANT_DIG * 4)
-# define LDBL_MANT_BIT (LDBL_MANT_DIG * 4)
-#endif
-
-/* Bit mask that can be used to mask the exponent, as an unsigned number. */
-#define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7)
-#define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7)
-#define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7)
-
-/* Number of bits used for the exponent of a floating-point number, including
- the exponent's sign. */
-#define FLT_EXP_BIT \
- (FLT_EXP_MASK < 0x100 ? 8 : \
- FLT_EXP_MASK < 0x200 ? 9 : \
- FLT_EXP_MASK < 0x400 ? 10 : \
- FLT_EXP_MASK < 0x800 ? 11 : \
- FLT_EXP_MASK < 0x1000 ? 12 : \
- FLT_EXP_MASK < 0x2000 ? 13 : \
- FLT_EXP_MASK < 0x4000 ? 14 : \
- FLT_EXP_MASK < 0x8000 ? 15 : \
- FLT_EXP_MASK < 0x10000 ? 16 : \
- FLT_EXP_MASK < 0x20000 ? 17 : \
- FLT_EXP_MASK < 0x40000 ? 18 : \
- FLT_EXP_MASK < 0x80000 ? 19 : \
- FLT_EXP_MASK < 0x100000 ? 20 : \
- FLT_EXP_MASK < 0x200000 ? 21 : \
- FLT_EXP_MASK < 0x400000 ? 22 : \
- FLT_EXP_MASK < 0x800000 ? 23 : \
- FLT_EXP_MASK < 0x1000000 ? 24 : \
- FLT_EXP_MASK < 0x2000000 ? 25 : \
- FLT_EXP_MASK < 0x4000000 ? 26 : \
- FLT_EXP_MASK < 0x8000000 ? 27 : \
- FLT_EXP_MASK < 0x10000000 ? 28 : \
- FLT_EXP_MASK < 0x20000000 ? 29 : \
- FLT_EXP_MASK < 0x40000000 ? 30 : \
- FLT_EXP_MASK <= 0x7fffffff ? 31 : \
- 32)
-#define DBL_EXP_BIT \
- (DBL_EXP_MASK < 0x100 ? 8 : \
- DBL_EXP_MASK < 0x200 ? 9 : \
- DBL_EXP_MASK < 0x400 ? 10 : \
- DBL_EXP_MASK < 0x800 ? 11 : \
- DBL_EXP_MASK < 0x1000 ? 12 : \
- DBL_EXP_MASK < 0x2000 ? 13 : \
- DBL_EXP_MASK < 0x4000 ? 14 : \
- DBL_EXP_MASK < 0x8000 ? 15 : \
- DBL_EXP_MASK < 0x10000 ? 16 : \
- DBL_EXP_MASK < 0x20000 ? 17 : \
- DBL_EXP_MASK < 0x40000 ? 18 : \
- DBL_EXP_MASK < 0x80000 ? 19 : \
- DBL_EXP_MASK < 0x100000 ? 20 : \
- DBL_EXP_MASK < 0x200000 ? 21 : \
- DBL_EXP_MASK < 0x400000 ? 22 : \
- DBL_EXP_MASK < 0x800000 ? 23 : \
- DBL_EXP_MASK < 0x1000000 ? 24 : \
- DBL_EXP_MASK < 0x2000000 ? 25 : \
- DBL_EXP_MASK < 0x4000000 ? 26 : \
- DBL_EXP_MASK < 0x8000000 ? 27 : \
- DBL_EXP_MASK < 0x10000000 ? 28 : \
- DBL_EXP_MASK < 0x20000000 ? 29 : \
- DBL_EXP_MASK < 0x40000000 ? 30 : \
- DBL_EXP_MASK <= 0x7fffffff ? 31 : \
- 32)
-#define LDBL_EXP_BIT \
- (LDBL_EXP_MASK < 0x100 ? 8 : \
- LDBL_EXP_MASK < 0x200 ? 9 : \
- LDBL_EXP_MASK < 0x400 ? 10 : \
- LDBL_EXP_MASK < 0x800 ? 11 : \
- LDBL_EXP_MASK < 0x1000 ? 12 : \
- LDBL_EXP_MASK < 0x2000 ? 13 : \
- LDBL_EXP_MASK < 0x4000 ? 14 : \
- LDBL_EXP_MASK < 0x8000 ? 15 : \
- LDBL_EXP_MASK < 0x10000 ? 16 : \
- LDBL_EXP_MASK < 0x20000 ? 17 : \
- LDBL_EXP_MASK < 0x40000 ? 18 : \
- LDBL_EXP_MASK < 0x80000 ? 19 : \
- LDBL_EXP_MASK < 0x100000 ? 20 : \
- LDBL_EXP_MASK < 0x200000 ? 21 : \
- LDBL_EXP_MASK < 0x400000 ? 22 : \
- LDBL_EXP_MASK < 0x800000 ? 23 : \
- LDBL_EXP_MASK < 0x1000000 ? 24 : \
- LDBL_EXP_MASK < 0x2000000 ? 25 : \
- LDBL_EXP_MASK < 0x4000000 ? 26 : \
- LDBL_EXP_MASK < 0x8000000 ? 27 : \
- LDBL_EXP_MASK < 0x10000000 ? 28 : \
- LDBL_EXP_MASK < 0x20000000 ? 29 : \
- LDBL_EXP_MASK < 0x40000000 ? 30 : \
- LDBL_EXP_MASK <= 0x7fffffff ? 31 : \
- 32)
-
-/* Number of bits used for a floating-point number: the mantissa (not
- counting the "hidden bit", since it may or may not be explicit), the
- exponent, and the sign. */
-#define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1)
-#define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1)
-#define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1)
-
-/* Number of bytes used for a floating-point number.
- This can be smaller than the 'sizeof'. For example, on i386 systems,
- 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence
- LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but
- sizeof (long double) = 12 or = 16. */
-#define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
-#define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
-#define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
-
-/* Verify that SIZEOF_FLT <= sizeof (float) etc. */
-typedef int verify_sizeof_flt[2 * (SIZEOF_FLT <= sizeof (float)) - 1];
-typedef int verify_sizeof_dbl[2 * (SIZEOF_DBL <= sizeof (double)) - 1];
-typedef int verify_sizeof_ldbl[2 * (SIZEOF_LDBL <= sizeof (long double)) - 1];
-
-#endif /* _FLOATPLUS_H */
--- contrib/cpio/lib/savedir.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/* savedir.c -- save the list of files in a directory in a string
-
- Copyright (C) 1990, 1997, 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. */
-
-/* Written by David MacKenzie <djm at gnu.ai.mit.edu>. */
-
-#include <config.h>
-
-#include "savedir.h"
-
-#include <sys/types.h>
-
-#include <errno.h>
-
-#include <dirent.h>
-#ifndef _D_EXACT_NAMLEN
-# define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name)
-#endif
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "openat.h"
-#include "xalloc.h"
-
-#ifndef NAME_SIZE_DEFAULT
-# define NAME_SIZE_DEFAULT 512
-#endif
-
-/* 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
-
-/* Return a freshly allocated string containing the file names
- in directory DIRP, separated by '\0' characters;
- the end is marked by two '\0' characters in a row.
- Return NULL (setting errno) if DIRP cannot be read or closed.
- If DIRP is NULL, return NULL without affecting errno. */
-
-static char *
-savedirstream (DIR *dirp)
-{
- char *name_space;
- size_t allocated = NAME_SIZE_DEFAULT;
- size_t used = 0;
- int save_errno;
-
- if (dirp == NULL)
- return NULL;
-
- name_space = xmalloc (allocated);
-
- for (;;)
- {
- struct dirent const *dp;
- char const *entry;
-
- errno = 0;
- dp = readdir (dirp);
- if (! dp)
- break;
-
- /* Skip "", ".", and "..". "" is returned by at least one buggy
- implementation: Solaris 2.4 readdir on NFS file systems. */
- entry = dp->d_name;
- if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0')
- {
- size_t entry_size = _D_EXACT_NAMLEN (dp) + 1;
- if (used + entry_size < used)
- xalloc_die ();
- if (allocated <= used + entry_size)
- {
- do
- {
- if (2 * allocated < allocated)
- xalloc_die ();
- allocated *= 2;
- }
- while (allocated <= used + entry_size);
-
- name_space = xrealloc (name_space, allocated);
- }
- memcpy (name_space + used, entry, entry_size);
- used += entry_size;
- }
- }
- name_space[used] = '\0';
- save_errno = errno;
- if (closedir (dirp) != 0)
- save_errno = errno;
- if (save_errno != 0)
- {
- free (name_space);
- errno = save_errno;
- return NULL;
- }
- return name_space;
-}
-
-/* Return a freshly allocated string containing the file names
- in directory DIR, separated by '\0' characters;
- the end is marked by two '\0' characters in a row.
- Return NULL (setting errno) if DIR cannot be opened, read, or closed. */
-
-char *
-savedir (char const *dir)
-{
- return savedirstream (opendir (dir));
-}
-
-/* Return a freshly allocated string containing the file names
- in directory FD, separated by '\0' characters;
- the end is marked by two '\0' characters in a row.
- Return NULL (setting errno) if FD cannot be read or closed. */
-
-char *
-fdsavedir (int fd)
-{
- return savedirstream (fdopendir (fd));
-}
--- contrib/cpio/lib/uinttostr.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define inttostr uinttostr
-#define inttype unsigned int
-#include "inttostr.c"
--- contrib/cpio/lib/full-write.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* An interface to write() that writes all it is asked to write.
-
- Copyright (C) 2002-2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- 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 <stddef.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Write COUNT bytes at BUF to descriptor FD, retrying if interrupted
- or if partial writes occur. Return the number of bytes successfully
- written, setting errno if that is less than COUNT. */
-extern size_t full_write (int fd, const void *buf, size_t count);
-
-
-#ifdef __cplusplus
-}
-#endif
--- contrib/cpio/lib/stdio_.h
+++ /dev/null
@@ -1,320 +0,0 @@
-/* A GNU-like <stdio.h>.
-
- Copyright (C) 2004, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#if defined __need_FILE || defined __need___FILE
-/* Special invocation convention inside glibc header files. */
-
-#if @HAVE_INCLUDE_NEXT@
-# include_next <stdio.h>
-#else
-# include @ABSOLUTE_STDIO_H@
-#endif
-
-#else
-/* Normal invocation convention. */
-
-#ifndef _GL_STDIO_H
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_INCLUDE_NEXT@
-# include_next <stdio.h>
-#else
-# include @ABSOLUTE_STDIO_H@
-#endif
-
-#ifndef _GL_STDIO_H
-#define _GL_STDIO_H
-
-#include <stdarg.h>
-#include <stddef.h>
-
-#if (@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@)
-/* Get off_t. */
-# include <sys/types.h>
-#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)
-# define __format__ format
-# define __printf__ printf
-# endif
-#endif
-
-
-/* The definition of GL_LINK_WARNING is copied here. */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#if @GNULIB_FPRINTF_POSIX@
-# if @REPLACE_FPRINTF@
-# define fprintf rpl_fprintf
-extern int fprintf (FILE *fp, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fprintf
-# define fprintf \
- (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
- "use gnulib module fprintf-posix for portable " \
- "POSIX compliance"), \
- fprintf)
-#endif
-
-#if @GNULIB_VFPRINTF_POSIX@
-# if @REPLACE_VFPRINTF@
-# define vfprintf rpl_vfprintf
-extern int vfprintf (FILE *fp, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vfprintf
-# define vfprintf(s,f,a) \
- (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
- "use gnulib module vfprintf-posix for portable " \
- "POSIX compliance"), \
- vfprintf (s, f, a))
-#endif
-
-#if @GNULIB_PRINTF_POSIX@
-# if @REPLACE_PRINTF@
-/* Don't break __attribute__((format(printf,M,N))). */
-# define printf __printf__
-extern int printf (const char *format, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef printf
-# define printf \
- (GL_LINK_WARNING ("printf is not always POSIX compliant - " \
- "use gnulib module printf-posix for portable " \
- "POSIX compliance"), \
- printf)
-/* Don't break __attribute__((format(printf,M,N))). */
-# define format(kind,m,n) format (__##kind##__, m, n)
-# define __format__(kind,m,n) __format__ (__##kind##__, m, n)
-# define ____printf____ __printf__
-# define ____scanf____ __scanf__
-# define ____strftime____ __strftime__
-# define ____strfmon____ __strfmon__
-#endif
-
-#if @GNULIB_VPRINTF_POSIX@
-# if @REPLACE_VPRINTF@
-# define vprintf rpl_vprintf
-extern int vprintf (const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 1, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vprintf
-# define vprintf(f,a) \
- (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
- "use gnulib module vprintf-posix for portable " \
- "POSIX compliance"), \
- vprintf (f, a))
-#endif
-
-#if @GNULIB_SNPRINTF@
-# if @REPLACE_SNPRINTF@
-# define snprintf rpl_snprintf
-# endif
-# if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@
-extern int snprintf (char *str, size_t size, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 3, 4)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef snprintf
-# define snprintf \
- (GL_LINK_WARNING ("snprintf is unportable - " \
- "use gnulib module snprintf for portability"), \
- snprintf)
-#endif
-
-#if @GNULIB_VSNPRINTF@
-# if @REPLACE_VSNPRINTF@
-# define vsnprintf rpl_vsnprintf
-# endif
-# if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@
-extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 3, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vsnprintf
-# define vsnprintf(b,s,f,a) \
- (GL_LINK_WARNING ("vsnprintf is unportable - " \
- "use gnulib module vsnprintf for portability"), \
- vsnprintf (b, s, f, a))
-#endif
-
-#if @GNULIB_SPRINTF_POSIX@
-# if @REPLACE_SPRINTF@
-# define sprintf rpl_sprintf
-extern int sprintf (char *str, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef sprintf
-# define sprintf \
- (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
- "use gnulib module sprintf-posix for portable " \
- "POSIX compliance"), \
- sprintf)
-#endif
-
-#if @GNULIB_VSPRINTF_POSIX@
-# if @REPLACE_VSPRINTF@
-# define vsprintf rpl_vsprintf
-extern int vsprintf (char *str, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vsprintf
-# define vsprintf(b,f,a) \
- (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
- "use gnulib module vsprintf-posix for portable " \
- "POSIX compliance"), \
- vsprintf (b, f, a))
-#endif
-
-#if @GNULIB_VASPRINTF@
-# if @REPLACE_VASPRINTF@
-# define asprintf rpl_asprintf
-# define vasprintf rpl_vasprintf
-# endif
-# if @REPLACE_VASPRINTF@ || !@HAVE_VASPRINTF@
- /* Write formatted output to a string dynamically allocated with malloc().
- If the memory allocation succeeds, store the address of the string in
- *RESULT and return the number of resulting bytes, excluding the trailing
- NUL. Upon memory allocation error, or some other error, return -1. */
- extern int asprintf (char **result, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
- extern int vasprintf (char **result, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
-#endif
-
-#if @GNULIB_FSEEKO@
-# if @REPLACE_FSEEKO@
-/* Provide fseek, fseeko functions that are aware of a preceding
- fflush(), and which detect pipes. */
-# define fseeko rpl_fseeko
-extern int fseeko (FILE *fp, off_t offset, int whence);
-# define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fseeko
-# define fseeko(f,o,w) \
- (GL_LINK_WARNING ("fseeko is unportable - " \
- "use gnulib module fseeko for portability"), \
- fseeko (f, o, w))
-#endif
-
-#if @GNULIB_FSEEK@ && @REPLACE_FSEEK@
-extern int rpl_fseek (FILE *fp, long offset, int whence);
-# undef fseek
-# if defined GNULIB_POSIXCHECK
-# define fseek(f,o,w) \
- (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
- "on 32-bit platforms - " \
- "use fseeko function for handling of large files"), \
- rpl_fseek (f, o, w))
-# else
-# define fseek rpl_fseek
-# endif
-#elif defined GNULIB_POSIXCHECK
-# ifndef fseek
-# define fseek(f,o,w) \
- (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
- "on 32-bit platforms - " \
- "use fseeko function for handling of large files"), \
- fseek (f, o, w))
-# endif
-#endif
-
-#if @GNULIB_FTELLO@
-# if @REPLACE_FTELLO@
-# define ftello rpl_ftello
-extern off_t ftello (FILE *fp);
-# define ftell(fp) ftello (fp)
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef ftello
-# define ftello(f) \
- (GL_LINK_WARNING ("ftello is unportable - " \
- "use gnulib module ftello for portability"), \
- ftello (f))
-#endif
-
-#if @GNULIB_FTELL@ && @REPLACE_FTELL@
-extern long rpl_ftell (FILE *fp);
-# undef ftell
-# if GNULIB_POSIXCHECK
-# define ftell(f) \
- (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
- "on 32-bit platforms - " \
- "use ftello function for handling of large files"), \
- rpl_ftell (f))
-# else
-# define ftell rpl_ftell
-# endif
-#elif defined GNULIB_POSIXCHECK
-# ifndef ftell
-# define ftell(f) \
- (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
- "on 32-bit platforms - " \
- "use ftello function for handling of large files"), \
- ftell (f))
-# endif
-#endif
-
-#if @GNULIB_FFLUSH@
-# if @REPLACE_FFLUSH@
-# define fflush rpl_fflush
- /* Flush all pending data on STREAM according to POSIX rules. Both
- output and seekable input streams are supported.
- Note! LOSS OF DATA can occur if fflush is applied on an input stream
- that is _not_seekable_ or on an update stream that is _not_seekable_
- and in which the most recent operation was input. Seekability can
- be tested with lseek(fileno(fp),0,SEEK_CUR). */
- extern int fflush (FILE *gl_stream);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fflush
-# define fflush(f) \
- (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
- "use gnulib module fflush for portable " \
- "POSIX compliance"), \
- fflush (f))
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GL_STDIO_H */
-#endif /* _GL_STDIO_H */
-#endif
--- contrib/cpio/lib/stpcpy.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* String copying.
- Copyright (C) 1995, 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. */
-
-#ifndef _STPCPY_H
-#define _STPCPY_H
-
-#if HAVE_STPCPY
-
-/* Get stpcpy() declaration. */
-#include <string.h>
-
-#else
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
-extern char *stpcpy (char *dst, const char *src);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-#endif /* _STPCPY_H */
--- contrib/cpio/lib/chown.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* 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);
-}
--- contrib/cpio/lib/creat-safer.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* 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));
-}
--- contrib/cpio/lib/closeout.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* 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);
-}
--- contrib/cpio/lib/openat-priv.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Internals for openat-like functions.
-
- 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 <errno.h>
-#include <stdlib.h>
-
-#define OPENAT_BUFFER_SIZE 512
-char *openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file);
-
-/* Some systems don't have ENOSYS. */
-#ifndef ENOSYS
-# ifdef ENOTSUP
-# define ENOSYS ENOTSUP
-# else
-/* Some systems don't have ENOTSUP either. */
-# define ENOSYS EINVAL
-# endif
-#endif
-
-/* Some systems don't have EOPNOTSUPP. */
-#ifndef EOPNOTSUPP
-# ifdef ENOTSUP
-# define EOPNOTSUPP ENOTSUP
-# else
-/* Some systems don't have ENOTSUP either. */
-# define EOPNOTSUPP EINVAL
-# endif
-#endif
-
-/* Trying to access a BUILD_PROC_NAME file will fail on systems without
- /proc support, and even on systems *with* ProcFS support. Return
- nonzero if the failure may be legitimate, e.g., because /proc is not
- readable, or the particular .../fd/N directory is not present. */
-#define EXPECTED_ERRNO(Errno) \
- ((Errno) == ENOTDIR || (Errno) == ENOENT \
- || (Errno) == EPERM || (Errno) == EACCES \
- || (Errno) == ENOSYS /* Solaris 8 */ \
- || (Errno) == EOPNOTSUPP /* FreeBSD */)
--- contrib/cpio/lib/safe-read.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* An interface to read() that retries after interrupts.
- Copyright (C) 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 <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#define SAFE_READ_ERROR ((size_t) -1)
-
-/* Read up to COUNT bytes at BUF from descriptor FD, retrying if interrupted.
- Return the actual number of bytes read, zero for EOF, or SAFE_READ_ERROR
- upon error. */
-extern size_t safe_read (int fd, void *buf, size_t count);
-
-
-#ifdef __cplusplus
-}
-#endif
--- contrib/cpio/lib/chdir-long.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 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
--- contrib/cpio/lib/canonicalize.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 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_ */
--- contrib/cpio/lib/stripslash.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* stripslash.c -- remove redundant trailing slashes from a file name
-
- Copyright (C) 1990, 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. */
-
-#include <config.h>
-
-#include "dirname.h"
-
-/* Remove trailing slashes from FILE. Return true if a trailing slash
- was removed. This is useful when using file name completion from a
- shell that adds a "/" after directory names (such as tcsh and
- bash), because on symlinks to directories, several system calls
- have different semantics according to whether a trailing slash is
- present. */
-
-bool
-strip_trailing_slashes (char *file)
-{
- char *base = last_component (file);
- char *base_lim;
- bool had_slash;
-
- /* last_component returns "" for file system roots, but we need to turn
- `///' into `/'. */
- if (! *base)
- base = file;
- base_lim = base + base_len (base);
- had_slash = (*base_lim != '\0');
- *base_lim = '\0';
- return had_slash;
-}
--- contrib/cpio/lib/open-safer.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Invoke open, 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 Paul Eggert. */
-
-#include <config.h>
-
-#include "fcntl-safer.h"
-
-#include <fcntl.h>
-#include <stdarg.h>
-#include "unistd-safer.h"
-
-int
-open_safer (char const *file, int flags, ...)
-{
- mode_t mode = 0;
-
- if (flags & O_CREAT)
- {
- va_list ap;
- va_start (ap, flags);
-
- /* Assume mode_t promotes to int if and only if it is smaller.
- This assumption isn't guaranteed by the C standard, but we
- don't know of any real-world counterexamples. */
- mode = (sizeof (mode_t) < sizeof (int)
- ? va_arg (ap, int)
- : va_arg (ap, mode_t));
-
- va_end (ap);
- }
-
- return fd_safer (open (file, flags, mode));
-}
--- contrib/cpio/lib/xalloc-die.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Report a memory allocation failure and exit.
-
- Copyright (C) 1997, 1998, 1999, 2000, 2002, 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. */
-
-#include <config.h>
-
-#include "xalloc.h"
-
-#include <stdlib.h>
-
-#include "error.h"
-#include "exitfail.h"
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-
-void
-xalloc_die (void)
-{
- error (exit_failure, 0, "%s", _("memory exhausted"));
-
- /* The `noreturn' cannot be given to error, since it may return if
- its first argument is 0. To help compilers understand the
- xalloc_die does not return, call abort. Also, the abort is a
- safety feature if exit_failure is 0 (which shouldn't happen). */
- abort ();
-}
--- contrib/cpio/lib/exit.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* exit() function.
- Copyright (C) 1995, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _EXIT_H
-#define _EXIT_H
-
-/* Get exit() declaration. */
-#include <stdlib.h>
-
-/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
-
-#endif /* _EXIT_H */
--- contrib/cpio/lib/getcwd.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Get the working directory, compatibly with the GNU C Library.
-
- 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 Paul Eggert. */
-
-/* Include the headers that might declare getcwd so that they will not
- cause confusion if included after this file. */
-
-#include <stdlib.h>
-#include <unistd.h>
-
-/* If necessary, systematically rename identifiers so that they do not
- collide with the system function. Renaming avoids problems with
- some compilers and linkers. */
-
-#ifdef __GETCWD_PREFIX
-# undef getcwd
-# define __GETCWD_CONCAT(x, y) x ## y
-# define __GETCWD_XCONCAT(x, y) __GETCWD_CONCAT (x, y)
-# define __GETCWD_ID(y) __GETCWD_XCONCAT (__GETCWD_PREFIX, y)
-# define getcwd __GETCWD_ID (getcwd)
-/* See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/getcwd.html>. */
-char *getcwd (char *, size_t);
-#endif
--- contrib/cpio/lib/argp-xinl.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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 at 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
--- contrib/cpio/lib/__fpending.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* __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;
-}
--- contrib/cpio/lib/argp-fs-xinl.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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 at 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
--- contrib/cpio/lib/fcntl_.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Like <fcntl.h>, but with non-working flags defined to 0.
-
- 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. */
-
-/* written by Paul Eggert */
-
-#ifndef _GL_FCNTL_H
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_INCLUDE_NEXT@
-# include_next <fcntl.h>
-#else
-# include @ABSOLUTE_FCNTL_H@
-#endif
-
-#ifndef _GL_FCNTL_H
-#define _GL_FCNTL_H
-
-
-/* Declare overridden functions. */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef FCHDIR_REPLACEMENT
-# define open rpl_open
-extern int open (const char *, int, ...);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-
-/* Fix up the O_* macros. */
-
-#if !defined O_DIRECT && defined O_DIRECTIO
-/* Tru64 spells it `O_DIRECTIO'. */
-# define O_DIRECT O_DIRECTIO
-#endif
-
-#ifndef O_DIRECT
-# define O_DIRECT 0
-#endif
-
-#ifndef O_DIRECTORY
-# define O_DIRECTORY 0
-#endif
-
-#ifndef O_DSYNC
-# define O_DSYNC 0
-#endif
-
-#ifndef O_NDELAY
-# define O_NDELAY 0
-#endif
-
-#ifndef O_NOATIME
-# define O_NOATIME 0
-#endif
-
-#ifndef O_NONBLOCK
-# define O_NONBLOCK O_NDELAY
-#endif
-
-#ifndef O_NOCTTY
-# define O_NOCTTY 0
-#endif
-
-#ifndef O_NOFOLLOW
-# define O_NOFOLLOW 0
-#endif
-
-#ifndef O_NOLINKS
-# define O_NOLINKS 0
-#endif
-
-#ifndef O_RSYNC
-# define O_RSYNC 0
-#endif
-
-#ifndef O_SYNC
-# define O_SYNC 0
-#endif
-
-/* For systems that distinguish between text and binary I/O.
- O_BINARY is usually declared in fcntl.h */
-#if !defined O_BINARY && defined _O_BINARY
- /* For MSC-compatible compilers. */
-# define O_BINARY _O_BINARY
-# define O_TEXT _O_TEXT
-#endif
-
-#ifdef __BEOS__
- /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
-# undef O_BINARY
-# undef O_TEXT
-#endif
-
-#ifndef O_BINARY
-# define O_BINARY 0
-# define O_TEXT 0
-#endif
-
-
-#endif /* _GL_FCNTL_H */
-#endif /* _GL_FCNTL_H */
--- contrib/cpio/lib/memrchr.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/* memrchr -- find the last occurrence of a byte in a memory block
-
- Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2005,
- 2006, 2007 Free Software Foundation, Inc.
-
- Based on strlen implementation by Torbjorn Granlund (tege at sics.se),
- with help from Dan Sahlin (dan at sics.se) and
- commentary by Jim Blandy (jimb at ai.mit.edu);
- adaptation to memchr suggested by Dick Karpinski (dick at cca.ucsf.edu),
- and implemented by Roland McGrath (roland at 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 defined _LIBC
-# include <memcopy.h>
-#else
-# include <config.h>
-# define reg_char char
-#endif
-
-#include <string.h>
-#include <limits.h>
-
-#undef __memrchr
-#undef memrchr
-
-#ifndef weak_alias
-# define __memrchr memrchr
-#endif
-
-/* Search no more than N bytes of S for C. */
-void *
-__memrchr (void const *s, int c_in, size_t n)
-{
- const unsigned char *char_ptr;
- const unsigned long int *longword_ptr;
- unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
- int i;
-
- c = (unsigned char) c_in;
-
- /* Handle the last few characters by reading one character at a time.
- Do this until CHAR_PTR is aligned on a longword boundary. */
- for (char_ptr = (const unsigned char *) s + n;
- n > 0 && (size_t) char_ptr % sizeof longword != 0;
- --n)
- if (*--char_ptr == c)
- return (void *) char_ptr;
-
- /* All these elucidatory comments refer to 4-byte longwords,
- but the theory applies equally well to any size longwords. */
-
- longword_ptr = (const unsigned long int *) char_ptr;
-
- /* Bits 31, 24, 16, and 8 of this number are zero. Call these bits
- the "holes." Note that there is a hole just to the left of
- each byte, with an extra at the end:
-
- bits: 01111110 11111110 11111110 11111111
- bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD
-
- The 1-bits make sure that carries propagate to the next 0-bit.
- The 0-bits provide holes for carries to fall into. */
-
- /* Set MAGIC_BITS to be this pattern of 1 and 0 bits.
- Set CHARMASK to be a longword, each of whose bytes is C. */
-
- magic_bits = 0xfefefefe;
- charmask = c | (c << 8);
- charmask |= charmask << 16;
-#if 0xffffffffU < ULONG_MAX
- magic_bits |= magic_bits << 32;
- charmask |= charmask << 32;
- if (8 < sizeof longword)
- for (i = 64; i < sizeof longword * 8; i *= 2)
- {
- magic_bits |= magic_bits << i;
- charmask |= charmask << i;
- }
-#endif
- magic_bits = (ULONG_MAX >> 1) & (magic_bits | 1);
-
- /* Instead of the traditional loop which tests each character,
- we will test a longword at a time. The tricky part is testing
- if *any of the four* bytes in the longword in question are zero. */
- while (n >= sizeof longword)
- {
- /* We tentatively exit the loop if adding MAGIC_BITS to
- LONGWORD fails to change any of the hole bits of LONGWORD.
-
- 1) Is this safe? Will it catch all the zero bytes?
- Suppose there is a byte with all zeros. Any carry bits
- propagating from its left will fall into the hole at its
- least significant bit and stop. Since there will be no
- carry from its most significant bit, the LSB of the
- byte to the left will be unchanged, and the zero will be
- detected.
-
- 2) Is this worthwhile? Will it ignore everything except
- zero bytes? Suppose every byte of LONGWORD has a bit set
- somewhere. There will be a carry into bit 8. If bit 8
- is set, this will carry into bit 16. If bit 8 is clear,
- one of bits 9-15 must be set, so there will be a carry
- into bit 16. Similarly, there will be a carry into bit
- 24. If one of bits 24-30 is set, there will be a carry
- into bit 31, so all of the hole bits will be changed.
-
- The one misfire occurs when bits 24-30 are clear and bit
- 31 is set; in this case, the hole at bit 31 is not
- changed. If we had access to the processor carry flag,
- we could close this loophole by putting the fourth hole
- at bit 32!
-
- So it ignores everything except 128's, when they're aligned
- properly.
-
- 3) But wait! Aren't we looking for C, not zero?
- Good point. So what we do is XOR LONGWORD with a longword,
- each of whose bytes is C. This turns each byte that is C
- into a zero. */
-
- longword = *--longword_ptr ^ charmask;
-
- /* Add MAGIC_BITS to LONGWORD. */
- if ((((longword + magic_bits)
-
- /* Set those bits that were unchanged by the addition. */
- ^ ~longword)
-
- /* Look at only the hole bits. If any of the hole bits
- are unchanged, most likely one of the bytes was a
- zero. */
- & ~magic_bits) != 0)
- {
- /* Which of the bytes was C? If none of them were, it was
- a misfire; continue the search. */
-
- const unsigned char *cp = (const unsigned char *) longword_ptr;
-
- if (8 < sizeof longword)
- for (i = sizeof longword - 1; 8 <= i; i--)
- if (cp[i] == c)
- return (void *) &cp[i];
- if (7 < sizeof longword && cp[7] == c)
- return (void *) &cp[7];
- if (6 < sizeof longword && cp[6] == c)
- return (void *) &cp[6];
- if (5 < sizeof longword && cp[5] == c)
- return (void *) &cp[5];
- if (4 < sizeof longword && cp[4] == c)
- return (void *) &cp[4];
- if (cp[3] == c)
- return (void *) &cp[3];
- if (cp[2] == c)
- return (void *) &cp[2];
- if (cp[1] == c)
- return (void *) &cp[1];
- if (cp[0] == c)
- return (void *) cp;
- }
-
- n -= sizeof longword;
- }
-
- char_ptr = (const unsigned char *) longword_ptr;
-
- while (n-- > 0)
- {
- if (*--char_ptr == c)
- return (void *) char_ptr;
- }
-
- return 0;
-}
-#ifdef weak_alias
-weak_alias (__memrchr, memrchr)
-#endif
--- contrib/cpio/lib/strcasecmp.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno at clisp.org>, 2005,
- based on earlier glibc code.
-
- 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 "strcase.h"
-
-#include <ctype.h>
-#include <limits.h>
-
-#if HAVE_MBRTOWC
-# include "mbuiter.h"
-#endif
-
-#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
-
-/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
- greater than zero if S1 is lexicographically less than, equal to or greater
- than S2.
- Note: This function may, in multibyte locales, return 0 for strings of
- different lengths! */
-int
-strcasecmp (const char *s1, const char *s2)
-{
- if (s1 == s2)
- return 0;
-
- /* Be careful not to look at the entire extent of s1 or s2 until needed.
- This is useful because when two strings differ, the difference is
- most often already in the very few first characters. */
-#if HAVE_MBRTOWC
- if (MB_CUR_MAX > 1)
- {
- mbui_iterator_t iter1;
- mbui_iterator_t iter2;
-
- mbui_init (iter1, s1);
- mbui_init (iter2, s2);
-
- while (mbui_avail (iter1) && mbui_avail (iter2))
- {
- int cmp = mb_casecmp (mbui_cur (iter1), mbui_cur (iter2));
-
- if (cmp != 0)
- return cmp;
-
- mbui_advance (iter1);
- mbui_advance (iter2);
- }
- if (mbui_avail (iter1))
- /* s2 terminated before s1. */
- return 1;
- if (mbui_avail (iter2))
- /* s1 terminated before s2. */
- return -1;
- return 0;
- }
- else
-#endif
- {
- const unsigned char *p1 = (const unsigned char *) s1;
- const unsigned char *p2 = (const unsigned char *) s2;
- unsigned char c1, c2;
-
- do
- {
- c1 = TOLOWER (*p1);
- c2 = TOLOWER (*p2);
-
- if (c1 == '\0')
- break;
-
- ++p1;
- ++p2;
- }
- while (c1 == c2);
-
- if (UCHAR_MAX <= INT_MAX)
- return c1 - c2;
- else
- /* On machines where 'char' and 'int' are types of the same size, the
- difference of two 'unsigned char' values - including the sign bit -
- doesn't fit in an 'int'. */
- return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
- }
-}
--- contrib/cpio/lib/getopt_int.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Internal declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004
- 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. */
-
-#ifndef _GETOPT_INT_H
-#define _GETOPT_INT_H 1
-
-extern int _getopt_internal (int ___argc, char **___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind,
- int __long_only, int __posixly_correct);
-
-
-/* Reentrant versions which can handle parsing multiple argument
- vectors at the same time. */
-
-/* Data type for reentrant functions. */
-struct _getopt_data
-{
- /* These have exactly the same meaning as the corresponding global
- variables, except that they are used for the reentrant
- versions of getopt. */
- int optind;
- int opterr;
- int optopt;
- char *optarg;
-
- /* Internal members. */
-
- /* True if the internal members have been initialized. */
- int __initialized;
-
- /* The next char to be scanned in the option-element
- in which the last option character we returned was found.
- This allows us to pick up the scan where we left off.
-
- If this is zero, or a null string, it means resume the scan
- by advancing to the next ARGV-element. */
- char *__nextchar;
-
- /* Describe how to deal with options that follow non-option ARGV-elements.
-
- If the caller did not specify anything,
- the default is REQUIRE_ORDER if the environment variable
- POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
- REQUIRE_ORDER means don't recognize them as options;
- stop option processing when the first non-option is seen.
- This is what Unix does.
- This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using `+' as the first character
- of the list of option characters, or by calling getopt.
-
- PERMUTE is the default. We permute the contents of ARGV as we
- scan, so that eventually all the non-options are at the end.
- This allows options to be given in any order, even with programs
- that were not written to expect this.
-
- RETURN_IN_ORDER is an option available to programs that were
- written to expect options and other ARGV-elements in any order
- and that care about the ordering of the two. We describe each
- non-option ARGV-element as if it were the argument of an option
- with character code 1. Using `-' as the first character of the
- list of option characters selects this mode of operation.
-
- The special argument `--' forces an end of option-scanning regardless
- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return -1 with `optind' != ARGC. */
-
- enum
- {
- REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
- } __ordering;
-
- /* If the POSIXLY_CORRECT environment variable is set
- or getopt was called. */
- int __posixly_correct;
-
-
- /* Handle permutation of arguments. */
-
- /* Describe the part of ARGV that contains non-options that have
- been skipped. `first_nonopt' is the index in ARGV of the first
- of them; `last_nonopt' is the index after the last of them. */
-
- int __first_nonopt;
- int __last_nonopt;
-
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
- int __nonoption_flags_max_len;
- int __nonoption_flags_len;
-# endif
-};
-
-/* The initializer is necessary to set OPTIND and OPTERR to their
- default values and to clear the initialization flag. */
-#define _GETOPT_DATA_INITIALIZER { 1, 1 }
-
-extern int _getopt_internal_r (int ___argc, char **___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind,
- int __long_only, int __posixly_correct,
- struct _getopt_data *__data);
-
-extern int _getopt_long_r (int ___argc, char **___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind,
- struct _getopt_data *__data);
-
-extern int _getopt_long_only_r (int ___argc, char **___argv,
- const char *__shortopts,
- const struct option *__longopts,
- int *__longind,
- struct _getopt_data *__data);
-
-#endif /* getopt_int.h */
--- contrib/cpio/lib/version-etc.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Utility to help print --version output in a consistent format.
- Copyright (C) 1999, 2003, 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. */
-
-#ifndef VERSION_ETC_H
-# define VERSION_ETC_H 1
-
-# include <stdarg.h>
-# include <stdio.h>
-
-extern const char version_etc_copyright[];
-
-extern void version_etc_va (FILE *stream,
- const char *command_name, const char *package,
- const char *version, va_list authors);
-
-extern void version_etc (FILE *stream,
- const char *command_name, const char *package,
- const char *version,
- /* const char *author1, ...*/ ...);
-
-#endif /* VERSION_ETC_H */
--- contrib/cpio/lib/offtostr.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define inttostr offtostr
-#define inttype off_t
-#include "inttostr.c"
--- contrib/cpio/lib/unistd-safer.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Invoke unistd-like functions, but avoid some glitches.
-
- Copyright (C) 2001, 2003, 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 Paul Eggert. */
-
-int dup_safer (int);
-int fd_safer (int);
-int pipe_safer (int[2]);
--- contrib/cpio/lib/openat-die.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Report a save- or restore-cwd failure in our openat replacement and then exit.
-
- 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. */
-
-#include <config.h>
-
-#include <stdlib.h>
-
-#include "error.h"
-#include "exitfail.h"
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
-
-void
-openat_save_fail (int errno)
-{
- error (exit_failure, errno,
- _("unable to record current working directory"));
-
- /* The `noreturn' attribute cannot be applied to error, since it returns
- when its first argument is 0. To help compilers understand that this
- function does not return, call abort. Also, the abort is a
- safety feature if exit_failure is 0 (which shouldn't happen). */
- abort ();
-}
-
-void
-openat_restore_fail (int errno)
-{
- error (exit_failure, errno,
- _("failed to return to initial working directory"));
-
- /* As above. */
- abort ();
-}
--- contrib/cpio/lib/xgetcwd.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* prototype for xgetcwd
- Copyright (C) 1995, 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. */
-
-extern char *xgetcwd (void);
--- contrib/cpio/lib/sys_stat_.h
+++ /dev/null
@@ -1,284 +0,0 @@
-/* Provide a more complete sys/stat header file.
- 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. */
-
-/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */
-
-/* This file is supposed to be used on platforms where <sys/stat.h> is
- incomplete. It is intended to provide definitions and prototypes
- needed by an application. Start with what the system provides. */
-
-#ifndef _GL_SYS_STAT_H
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_INCLUDE_NEXT@
-# include_next <sys/stat.h>
-#else
-# include @ABSOLUTE_SYS_STAT_H@
-#endif
-
-#ifndef _GL_SYS_STAT_H
-#define _GL_SYS_STAT_H
-
-#ifndef S_IFMT
-# define S_IFMT 0170000
-#endif
-
-#if STAT_MACROS_BROKEN
-# undef S_ISBLK
-# undef S_ISCHR
-# undef S_ISDIR
-# undef S_ISFIFO
-# undef S_ISLNK
-# undef S_ISNAM
-# undef S_ISMPB
-# undef S_ISMPC
-# undef S_ISNWK
-# undef S_ISREG
-# undef S_ISSOCK
-#endif
-
-#ifndef S_ISBLK
-# ifdef S_IFBLK
-# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
-# else
-# define S_ISBLK(m) 0
-# endif
-#endif
-
-#ifndef S_ISCHR
-# ifdef S_IFCHR
-# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-# else
-# define S_ISCHR(m) 0
-# endif
-#endif
-
-#ifndef S_ISDIR
-# ifdef S_IFDIR
-# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-# else
-# define S_ISDIR(m) 0
-# endif
-#endif
-
-#ifndef S_ISDOOR /* Solaris 2.5 and up */
-# define S_ISDOOR(m) 0
-#endif
-
-#ifndef S_ISFIFO
-# ifdef S_IFIFO
-# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-# else
-# define S_ISFIFO(m) 0
-# endif
-#endif
-
-#ifndef S_ISLNK
-# ifdef S_IFLNK
-# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-# else
-# define S_ISLNK(m) 0
-# endif
-#endif
-
-#ifndef S_ISMPB /* V7 */
-# ifdef S_IFMPB
-# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
-# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
-# else
-# define S_ISMPB(m) 0
-# define S_ISMPC(m) 0
-# endif
-#endif
-
-#ifndef S_ISNAM /* Xenix */
-# ifdef S_IFNAM
-# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
-# else
-# define S_ISNAM(m) 0
-# endif
-#endif
-
-#ifndef S_ISNWK /* HP/UX */
-# ifdef S_IFNWK
-# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
-# else
-# define S_ISNWK(m) 0
-# endif
-#endif
-
-#ifndef S_ISPORT /* Solaris 10 and up */
-# define S_ISPORT(m) 0
-#endif
-
-#ifndef S_ISREG
-# ifdef S_IFREG
-# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-# else
-# define S_ISREG(m) 0
-# endif
-#endif
-
-#ifndef S_ISSOCK
-# ifdef S_IFSOCK
-# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
-# else
-# define S_ISSOCK(m) 0
-# endif
-#endif
-
-
-#ifndef S_TYPEISMQ
-# define S_TYPEISMQ(p) 0
-#endif
-
-#ifndef S_TYPEISTMO
-# define S_TYPEISTMO(p) 0
-#endif
-
-
-#ifndef S_TYPEISSEM
-# ifdef S_INSEM
-# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
-# else
-# define S_TYPEISSEM(p) 0
-# endif
-#endif
-
-#ifndef S_TYPEISSHM
-# ifdef S_INSHD
-# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
-# else
-# define S_TYPEISSHM(p) 0
-# endif
-#endif
-
-/* high performance ("contiguous data") */
-#ifndef S_ISCTG
-# define S_ISCTG(p) 0
-#endif
-
-/* Cray DMF (data migration facility): off line, with data */
-#ifndef S_ISOFD
-# define S_ISOFD(p) 0
-#endif
-
-/* Cray DMF (data migration facility): off line, with no data */
-#ifndef S_ISOFL
-# define S_ISOFL(p) 0
-#endif
-
-/* 4.4BSD whiteout */
-#ifndef S_ISWHT
-# define S_ISWHT(m) 0
-#endif
-
-/* If any of the following are undefined,
- define them to their de facto standard values. */
-#if !S_ISUID
-# define S_ISUID 04000
-#endif
-#if !S_ISGID
-# define S_ISGID 02000
-#endif
-
-/* S_ISVTX is a common extension to POSIX. */
-#ifndef S_ISVTX
-# define S_ISVTX 01000
-#endif
-
-#if !S_IRUSR && S_IREAD
-# define S_IRUSR S_IREAD
-#endif
-#if !S_IRUSR
-# define S_IRUSR 00400
-#endif
-#if !S_IRGRP
-# define S_IRGRP (S_IRUSR >> 3)
-#endif
-#if !S_IROTH
-# define S_IROTH (S_IRUSR >> 6)
-#endif
-
-#if !S_IWUSR && S_IWRITE
-# define S_IWUSR S_IWRITE
-#endif
-#if !S_IWUSR
-# define S_IWUSR 00200
-#endif
-#if !S_IWGRP
-# define S_IWGRP (S_IWUSR >> 3)
-#endif
-#if !S_IWOTH
-# define S_IWOTH (S_IWUSR >> 6)
-#endif
-
-#if !S_IXUSR && S_IEXEC
-# define S_IXUSR S_IEXEC
-#endif
-#if !S_IXUSR
-# define S_IXUSR 00100
-#endif
-#if !S_IXGRP
-# define S_IXGRP (S_IXUSR >> 3)
-#endif
-#if !S_IXOTH
-# define S_IXOTH (S_IXUSR >> 6)
-#endif
-
-#if !S_IRWXU
-# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
-#endif
-#if !S_IRWXG
-# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
-#endif
-#if !S_IRWXO
-# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
-#endif
-
-/* S_IXUGO is a common extension to POSIX. */
-#if !S_IXUGO
-# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
-#endif
-
-#ifndef S_IRWXUGO
-# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
-#endif
-
-/* mingw does not support symlinks, therefore it does not have lstat. But
- without links, stat does just fine. */
-#if ! @HAVE_LSTAT@
-# define lstat stat
-#endif
-
-/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
- Additionally, it declares _mkdir (and depending on compile flags, an
- alias mkdir), only in the nonstandard io.h. */
-#if ! @HAVE_DECL_MKDIR@ && @HAVE_IO_H@
-# include <io.h>
-
-static inline int
-rpl_mkdir (char const *name, mode_t mode)
-{
- return _mkdir (name);
-}
-
-# define mkdir rpl_mkdir
-#endif
-
-#endif /* _GL_SYS_STAT_H */
-#endif /* _GL_SYS_STAT_H */
--- contrib/cpio/lib/string_.h
+++ /dev/null
@@ -1,546 +0,0 @@
-/* A GNU-like <string.h>.
-
- Copyright (C) 1995-1996, 2001-2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _GL_STRING_H
-
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_INCLUDE_NEXT@
-# include_next <string.h>
-#else
-# include @ABSOLUTE_STRING_H@
-#endif
-
-#ifndef _GL_STRING_H
-#define _GL_STRING_H
-
-
-/* The definition of GL_LINK_WARNING is copied here. */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Return the first occurrence of NEEDLE in HAYSTACK. */
-#if @GNULIB_MEMMEM@
-# if ! @HAVE_DECL_MEMMEM@
-extern void *memmem (void const *__haystack, size_t __haystack_len,
- void const *__needle, size_t __needle_len);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef memmem
-# define memmem(a,al,b,bl) \
- (GL_LINK_WARNING ("memmem is unportable - " \
- "use gnulib module memmem for portability"), \
- memmem (a, al, b, bl))
-#endif
-
-/* Copy N bytes of SRC to DEST, return pointer to bytes after the
- last written byte. */
-#if @GNULIB_MEMPCPY@
-# if ! @HAVE_MEMPCPY@
-extern void *mempcpy (void *restrict __dest, void const *restrict __src,
- size_t __n);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef mempcpy
-# define mempcpy(a,b,n) \
- (GL_LINK_WARNING ("mempcpy is unportable - " \
- "use gnulib module mempcpy for portability"), \
- mempcpy (a, b, n))
-#endif
-
-/* Search backwards through a block for a byte (specified as an int). */
-#if @GNULIB_MEMRCHR@
-# if ! @HAVE_DECL_MEMRCHR@
-extern void *memrchr (void const *, int, size_t);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef memrchr
-# define memrchr(a,b,c) \
- (GL_LINK_WARNING ("memrchr is unportable - " \
- "use gnulib module memrchr for portability"), \
- memrchr (a, b, c))
-#endif
-
-/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
-#if @GNULIB_STPCPY@
-# if ! @HAVE_STPCPY@
-extern char *stpcpy (char *restrict __dst, char const *restrict __src);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef stpcpy
-# define stpcpy(a,b) \
- (GL_LINK_WARNING ("stpcpy is unportable - " \
- "use gnulib module stpcpy for portability"), \
- stpcpy (a, b))
-#endif
-
-/* Copy no more than N bytes of SRC to DST, returning a pointer past the
- last non-NUL byte written into DST. */
-#if @GNULIB_STPNCPY@
-# if ! @HAVE_STPNCPY@
-# define stpncpy gnu_stpncpy
-extern char *stpncpy (char *restrict __dst, char const *restrict __src,
- size_t __n);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef stpncpy
-# define stpncpy(a,b,n) \
- (GL_LINK_WARNING ("stpncpy is unportable - " \
- "use gnulib module stpncpy for portability"), \
- stpncpy (a, b, n))
-#endif
-
-/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
- greater than zero if S1 is lexicographically less than, equal to or greater
- than S2.
- Note: This function does not work in multibyte locales. */
-#if ! @HAVE_STRCASECMP@
-extern int strcasecmp (char const *s1, char const *s2);
-#endif
-#if defined GNULIB_POSIXCHECK
-/* strcasecmp() does not work with multibyte strings:
- POSIX says that it operates on "strings", and "string" in POSIX is defined
- as a sequence of bytes, not of characters. */
-# undef strcasecmp
-# define strcasecmp(a,b) \
- (GL_LINK_WARNING ("strcasecmp cannot work correctly on character strings " \
- "in multibyte locales - " \
- "use mbscasecmp if you care about " \
- "internationalization, or use c_strcasecmp (from " \
- "gnulib module c-strcase) if you want a locale " \
- "independent function"), \
- strcasecmp (a, b))
-#endif
-
-/* Compare no more than N bytes of strings S1 and S2, ignoring case,
- returning less than, equal to or greater than zero if S1 is
- lexicographically less than, equal to or greater than S2.
- Note: This function cannot work correctly in multibyte locales. */
-#if ! @HAVE_DECL_STRNCASECMP@
-extern int strncasecmp (char const *s1, char const *s2, size_t n);
-#endif
-#if defined GNULIB_POSIXCHECK
-/* strncasecmp() does not work with multibyte strings:
- POSIX says that it operates on "strings", and "string" in POSIX is defined
- as a sequence of bytes, not of characters. */
-# undef strncasecmp
-# define strncasecmp(a,b,n) \
- (GL_LINK_WARNING ("strncasecmp cannot work correctly on character " \
- "strings in multibyte locales - " \
- "use mbsncasecmp or mbspcasecmp if you care about " \
- "internationalization, or use c_strncasecmp (from " \
- "gnulib module c-strcase) if you want a locale " \
- "independent function"), \
- strncasecmp (a, b, n))
-#endif
-
-#if defined GNULIB_POSIXCHECK
-/* strchr() does not work with multibyte strings if the locale encoding is
- GB18030 and the character to be searched is a digit. */
-# undef strchr
-# define strchr(s,c) \
- (GL_LINK_WARNING ("strchr cannot work correctly on character strings " \
- "in some multibyte locales - " \
- "use mbschr if you care about internationalization"), \
- strchr (s, c))
-#endif
-
-/* Find the first occurrence of C in S or the final NUL byte. */
-#if @GNULIB_STRCHRNUL@
-# if ! @HAVE_STRCHRNUL@
-extern char *strchrnul (char const *__s, int __c_in);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef strchrnul
-# define strchrnul(a,b) \
- (GL_LINK_WARNING ("strchrnul is unportable - " \
- "use gnulib module strchrnul for portability"), \
- strchrnul (a, b))
-#endif
-
-/* Duplicate S, returning an identical malloc'd string. */
-#if @GNULIB_STRDUP@
-# if ! @HAVE_DECL_STRDUP@ && ! defined strdup
-extern char *strdup (char const *__s);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef strdup
-# define strdup(a) \
- (GL_LINK_WARNING ("strdup is unportable - " \
- "use gnulib module strdup for portability"), \
- strdup (a))
-#endif
-
-/* Return a newly allocated copy of at most N bytes of STRING. */
-#if @GNULIB_STRNDUP@
-# if ! @HAVE_STRNDUP@
-# undef strndup
-# define strndup rpl_strndup
-# endif
-# if ! @HAVE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@
-extern char *strndup (char const *__string, size_t __n);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef strndup
-# define strndup(a,n) \
- (GL_LINK_WARNING ("strndup is unportable - " \
- "use gnulib module strndup for portability"), \
- strndup (a, n))
-#endif
-
-/* Find the length (number of bytes) of STRING, but scan at most
- MAXLEN bytes. If no '\0' terminator is found in that many bytes,
- return MAXLEN. */
-#if @GNULIB_STRNLEN@
-# if ! @HAVE_DECL_STRNLEN@
-extern size_t strnlen (char const *__string, size_t __maxlen);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef strnlen
-# define strnlen(a,n) \
- (GL_LINK_WARNING ("strnlen is unportable - " \
- "use gnulib module strnlen for portability"), \
- strnlen (a, n))
-#endif
-
-#if defined GNULIB_POSIXCHECK
-/* strcspn() assumes the second argument is a list of single-byte characters.
- Even in this simple case, it does not work with multibyte strings if the
- locale encoding is GB18030 and one of the characters to be searched is a
- digit. */
-# undef strcspn
-# define strcspn(s,a) \
- (GL_LINK_WARNING ("strcspn cannot work correctly on character strings " \
- "in multibyte locales - " \
- "use mbscspn if you care about internationalization"), \
- strcspn (s, a))
-#endif
-
-/* Find the first occurrence in S of any character in ACCEPT. */
-#if @GNULIB_STRPBRK@
-# if ! @HAVE_STRPBRK@
-extern char *strpbrk (char const *__s, char const *__accept);
-# endif
-# if defined GNULIB_POSIXCHECK
-/* strpbrk() assumes the second argument is a list of single-byte characters.
- Even in this simple case, it does not work with multibyte strings if the
- locale encoding is GB18030 and one of the characters to be searched is a
- digit. */
-# undef strpbrk
-# define strpbrk(s,a) \
- (GL_LINK_WARNING ("strpbrk cannot work correctly on character strings " \
- "in multibyte locales - " \
- "use mbspbrk if you care about internationalization"), \
- strpbrk (s, a))
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef strpbrk
-# define strpbrk(s,a) \
- (GL_LINK_WARNING ("strpbrk is unportable - " \
- "use gnulib module strpbrk for portability"), \
- strpbrk (s, a))
-#endif
-
-#if defined GNULIB_POSIXCHECK
-/* strspn() assumes the second argument is a list of single-byte characters.
- Even in this simple case, it cannot work with multibyte strings. */
-# undef strspn
-# define strspn(s,a) \
- (GL_LINK_WARNING ("strspn cannot work correctly on character strings " \
- "in multibyte locales - " \
- "use mbsspn if you care about internationalization"), \
- strspn (s, a))
-#endif
-
-#if defined GNULIB_POSIXCHECK
-/* strrchr() does not work with multibyte strings if the locale encoding is
- GB18030 and the character to be searched is a digit. */
-# undef strrchr
-# define strrchr(s,c) \
- (GL_LINK_WARNING ("strrchr cannot work correctly on character strings " \
- "in some multibyte locales - " \
- "use mbsrchr if you care about internationalization"), \
- strrchr (s, c))
-#endif
-
-/* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
- If one is found, overwrite it with a NUL, and advance *STRINGP
- to point to the next char after it. Otherwise, set *STRINGP to NULL.
- If *STRINGP was already NULL, nothing happens.
- Return the old value of *STRINGP.
-
- This is a variant of strtok() that is multithread-safe and supports
- empty fields.
-
- Caveat: It modifies the original string.
- Caveat: These functions cannot be used on constant strings.
- Caveat: The identity of the delimiting character is lost.
- Caveat: It doesn't work with multibyte strings unless all of the delimiter
- characters are ASCII characters < 0x30.
-
- See also strtok_r(). */
-#if @GNULIB_STRSEP@
-# if ! @HAVE_STRSEP@
-extern char *strsep (char **restrict __stringp, char const *restrict __delim);
-# endif
-# if defined GNULIB_POSIXCHECK
-# undef strsep
-# define strsep(s,d) \
- (GL_LINK_WARNING ("strsep cannot work correctly on character strings " \
- "in multibyte locales - " \
- "use mbssep if you care about internationalization"), \
- strsep (s, d))
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef strsep
-# define strsep(s,d) \
- (GL_LINK_WARNING ("strsep is unportable - " \
- "use gnulib module strsep for portability"), \
- strsep (s, d))
-#endif
-
-#if defined GNULIB_POSIXCHECK
-/* strstr() does not work with multibyte strings if the locale encoding is
- different from UTF-8:
- POSIX says that it operates on "strings", and "string" in POSIX is defined
- as a sequence of bytes, not of characters. */
-# undef strstr
-# define strstr(a,b) \
- (GL_LINK_WARNING ("strstr cannot work correctly on character strings " \
- "in most multibyte locales - " \
- "use mbsstr if you care about internationalization"), \
- strstr (a, b))
-#endif
-
-/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
- comparison. */
-#if ! @HAVE_STRCASESTR@
-extern char *strcasestr (const char *haystack, const char *needle);
-#endif
-#if defined GNULIB_POSIXCHECK
-/* strcasestr() does not work with multibyte strings:
- It is a glibc extension, and glibc implements it only for unibyte
- locales. */
-# undef strcasestr
-# define strcasestr(a,b) \
- (GL_LINK_WARNING ("strcasestr does work correctly on character strings " \
- "in multibyte locales - " \
- "use mbscasestr if you care about " \
- "internationalization, or use c-strcasestr if you want " \
- "a locale independent function"), \
- strcasestr (a, b))
-#endif
-
-/* Parse S into tokens separated by characters in DELIM.
- If S is NULL, the saved pointer in SAVE_PTR is used as
- the next starting point. For example:
- char s[] = "-abc-=-def";
- char *sp;
- x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
- x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
- x = strtok_r(NULL, "=", &sp); // x = NULL
- // s = "abc\0-def\0"
-
- This is a variant of strtok() that is multithread-safe.
-
- For the POSIX documentation for this function, see:
- http://www.opengroup.org/susv3xsh/strtok.html
-
- Caveat: It modifies the original string.
- Caveat: These functions cannot be used on constant strings.
- Caveat: The identity of the delimiting character is lost.
- Caveat: It doesn't work with multibyte strings unless all of the delimiter
- characters are ASCII characters < 0x30.
-
- See also strsep(). */
-#if @GNULIB_STRTOK_R@
-# if ! @HAVE_DECL_STRTOK_R@
-extern char *strtok_r (char *restrict s, char const *restrict delim,
- char **restrict save_ptr);
-# endif
-# if defined GNULIB_POSIXCHECK
-# undef strtok_r
-# define strtok_r(s,d,p) \
- (GL_LINK_WARNING ("strtok_r cannot work correctly on character strings " \
- "in multibyte locales - " \
- "use mbstok_r if you care about internationalization"), \
- strtok_r (s, d, p))
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef strtok_r
-# define strtok_r(s,d,p) \
- (GL_LINK_WARNING ("strtok_r is unportable - " \
- "use gnulib module strtok_r for portability"), \
- strtok_r (s, d, p))
-#endif
-
-
-/* The following functions are not specified by POSIX. They are gnulib
- extensions. */
-
-#if @GNULIB_MBSLEN@
-/* Return the number of multibyte characters in the character string STRING.
- This considers multibyte characters, unlike strlen, which counts bytes. */
-extern size_t mbslen (const char *string);
-#endif
-
-#if @GNULIB_MBSCHR@
-/* Locate the first single-byte character C in the character string STRING,
- and return a pointer to it. Return NULL if C is not found in STRING.
- Unlike strchr(), this function works correctly in multibyte locales with
- encodings such as GB18030. */
-# define mbschr rpl_mbschr /* avoid collision with HP-UX function */
-extern char * mbschr (const char *string, int c);
-#endif
-
-#if @GNULIB_MBSRCHR@
-/* Locate the last single-byte character C in the character string STRING,
- and return a pointer to it. Return NULL if C is not found in STRING.
- Unlike strrchr(), this function works correctly in multibyte locales with
- encodings such as GB18030. */
-# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
-extern char * mbsrchr (const char *string, int c);
-#endif
-
-#if @GNULIB_MBSSTR@
-/* Find the first occurrence of the character string NEEDLE in the character
- string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK.
- Unlike strstr(), this function works correctly in multibyte locales with
- encodings different from UTF-8. */
-extern char * mbsstr (const char *haystack, const char *needle);
-#endif
-
-#if @GNULIB_MBSCASECMP@
-/* Compare the character strings S1 and S2, ignoring case, returning less than,
- equal to or greater than zero if S1 is lexicographically less than, equal to
- or greater than S2.
- Note: This function may, in multibyte locales, return 0 for strings of
- different lengths!
- Unlike strcasecmp(), this function works correctly in multibyte locales. */
-extern int mbscasecmp (const char *s1, const char *s2);
-#endif
-
-#if @GNULIB_MBSNCASECMP@
-/* Compare the initial segment of the character string S1 consisting of at most
- N characters with the initial segment of the character string S2 consisting
- of at most N characters, ignoring case, returning less than, equal to or
- greater than zero if the initial segment of S1 is lexicographically less
- than, equal to or greater than the initial segment of S2.
- Note: This function may, in multibyte locales, return 0 for initial segments
- of different lengths!
- Unlike strncasecmp(), this function works correctly in multibyte locales.
- But beware that N is not a byte count but a character count! */
-extern int mbsncasecmp (const char *s1, const char *s2, size_t n);
-#endif
-
-#if @GNULIB_MBSPCASECMP@
-/* Compare the initial segment of the character string STRING consisting of
- at most mbslen (PREFIX) characters with the character string PREFIX,
- ignoring case, returning less than, equal to or greater than zero if this
- initial segment is lexicographically less than, equal to or greater than
- PREFIX.
- Note: This function may, in multibyte locales, return 0 if STRING is of
- smaller length than PREFIX!
- Unlike strncasecmp(), this function works correctly in multibyte
- locales. */
-extern char * mbspcasecmp (const char *string, const char *prefix);
-#endif
-
-#if @GNULIB_MBSCASESTR@
-/* Find the first occurrence of the character string NEEDLE in the character
- string HAYSTACK, using case-insensitive comparison.
- Note: This function may, in multibyte locales, return success even if
- strlen (haystack) < strlen (needle) !
- Unlike strcasestr(), this function works correctly in multibyte locales. */
-extern char * mbscasestr (const char *haystack, const char *needle);
-#endif
-
-#if @GNULIB_MBSCSPN@
-/* Find the first occurrence in the character string STRING of any character
- in the character string ACCEPT. Return the number of bytes from the
- beginning of the string to this occurrence, or to the end of the string
- if none exists.
- Unlike strcspn(), this function works correctly in multibyte locales. */
-extern size_t mbscspn (const char *string, const char *accept);
-#endif
-
-#if @GNULIB_MBSPBRK@
-/* Find the first occurrence in the character string STRING of any character
- in the character string ACCEPT. Return the pointer to it, or NULL if none
- exists.
- Unlike strpbrk(), this function works correctly in multibyte locales. */
-# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
-extern char * mbspbrk (const char *string, const char *accept);
-#endif
-
-#if @GNULIB_MBSSPN@
-/* Find the first occurrence in the character string STRING of any character
- not in the character string REJECT. Return the number of bytes from the
- beginning of the string to this occurrence, or to the end of the string
- if none exists.
- Unlike strspn(), this function works correctly in multibyte locales. */
-extern size_t mbsspn (const char *string, const char *reject);
-#endif
-
-#if @GNULIB_MBSSEP@
-/* Search the next delimiter (multibyte character listed in the character
- string DELIM) starting at the character string *STRINGP.
- If one is found, overwrite it with a NUL, and advance *STRINGP to point
- to the next multibyte character after it. Otherwise, set *STRINGP to NULL.
- If *STRINGP was already NULL, nothing happens.
- Return the old value of *STRINGP.
-
- This is a variant of mbstok_r() that supports empty fields.
-
- Caveat: It modifies the original string.
- Caveat: These functions cannot be used on constant strings.
- Caveat: The identity of the delimiting character is lost.
-
- See also mbstok_r(). */
-extern char * mbssep (char **stringp, const char *delim);
-#endif
-
-#if @GNULIB_MBSTOK_R@
-/* Parse the character string STRING into tokens separated by characters in
- the character string DELIM.
- If STRING is NULL, the saved pointer in SAVE_PTR is used as
- the next starting point. For example:
- char s[] = "-abc-=-def";
- char *sp;
- x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def"
- x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL
- x = mbstok_r(NULL, "=", &sp); // x = NULL
- // s = "abc\0-def\0"
-
- Caveat: It modifies the original string.
- Caveat: These functions cannot be used on constant strings.
- Caveat: The identity of the delimiting character is lost.
-
- See also mbssep(). */
-extern char * mbstok_r (char *string, const char *delim, char **save_ptr);
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GL_STRING_H */
-#endif /* _GL_STRING_H */
--- contrib/cpio/lib/xalloc.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/* xalloc.h -- malloc with out-of-memory checking
-
- Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- 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 XALLOC_H_
-# define XALLOC_H_
-
-# include <stddef.h>
-
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-
-# ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
-# define __attribute__(x)
-# endif
-# endif
-
-# ifndef ATTRIBUTE_NORETURN
-# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-# endif
-
-/* This function is always triggered when memory is exhausted.
- It must be defined by the application, either explicitly
- or by using gnulib's xalloc-die module. This is the
- function to call when one wants the program to die because of a
- memory allocation failure. */
-extern void xalloc_die (void) ATTRIBUTE_NORETURN;
-
-void *xmalloc (size_t s);
-void *xzalloc (size_t s);
-void *xcalloc (size_t n, size_t s);
-void *xrealloc (void *p, size_t s);
-void *x2realloc (void *p, size_t *pn);
-void *xmemdup (void const *p, size_t s);
-char *xstrdup (char const *str);
-
-/* Return 1 if an array of N objects, each of size S, cannot exist due
- to size arithmetic overflow. S must be positive and N must be
- nonnegative. This is a macro, not an inline function, so that it
- works correctly even when SIZE_MAX < N.
-
- By gnulib convention, SIZE_MAX represents overflow in size
- calculations, so the conservative dividend to use here is
- SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value.
- However, malloc (SIZE_MAX) fails on all known hosts where
- sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for
- exactly-SIZE_MAX allocations on such hosts; this avoids a test and
- branch when S is known to be 1. */
-# define xalloc_oversized(n, s) \
- ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
-
-
-/* In the following macros, T must be an elementary or structure/union or
- typedef'ed type, or a pointer to such a type. To apply one of the
- following macros to a function pointer or array type, you need to typedef
- it first and use the typedef name. */
-
-/* Allocate an object of type T dynamically, with error checking. */
-/* extern t *XMALLOC (typename t); */
-# define XMALLOC(t) ((t *) xmalloc (sizeof (t)))
-
-/* Allocate memory for N elements of type T, with error checking. */
-/* extern t *XNMALLOC (size_t n, typename t); */
-# define XNMALLOC(n, t) \
- ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
-
-/* Allocate an object of type T dynamically, with error checking,
- and zero it. */
-/* extern t *XZALLOC (typename t); */
-# define XZALLOC(t) ((t *) xzalloc (sizeof (t)))
-
-/* Allocate memory for N elements of type T, with error checking,
- and zero it. */
-/* extern t *XCALLOC (size_t n, typename t); */
-# define XCALLOC(n, t) \
- ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
-
-
-# if HAVE_INLINE
-# define static_inline static inline
-# else
- void *xnmalloc (size_t n, size_t s);
- void *xnrealloc (void *p, size_t n, size_t s);
- void *x2nrealloc (void *p, size_t *pn, size_t s);
- char *xcharalloc (size_t n);
-# endif
-
-# ifdef static_inline
-
-/* Allocate an array of N objects, each with S bytes of memory,
- dynamically, with error checking. S must be nonzero. */
-
-static_inline void *
-xnmalloc (size_t n, size_t s)
-{
- if (xalloc_oversized (n, s))
- xalloc_die ();
- return xmalloc (n * s);
-}
-
-/* Change the size of an allocated block of memory P to an array of N
- objects each of S bytes, with error checking. S must be nonzero. */
-
-static_inline void *
-xnrealloc (void *p, size_t n, size_t s)
-{
- if (xalloc_oversized (n, s))
- xalloc_die ();
- return xrealloc (p, n * s);
-}
-
-/* If P is null, allocate a block of at least *PN such objects;
- otherwise, reallocate P so that it contains more than *PN objects
- each of S bytes. *PN must be nonzero unless P is null, and S must
- be nonzero. Set *PN to the new number of objects, and return the
- pointer to the new block. *PN is never set to zero, and the
- returned pointer is never null.
-
- Repeated reallocations are guaranteed to make progress, either by
- allocating an initial block with a nonzero size, or by allocating a
- larger block.
-
- In the following implementation, nonzero sizes are increased by a
- factor of approximately 1.5 so that repeated reallocations have
- O(N) overall cost rather than O(N**2) cost, but the
- specification for this function does not guarantee that rate.
-
- Here is an example of use:
-
- int *p = NULL;
- size_t used = 0;
- size_t allocated = 0;
-
- void
- append_int (int value)
- {
- if (used == allocated)
- p = x2nrealloc (p, &allocated, sizeof *p);
- p[used++] = value;
- }
-
- This causes x2nrealloc to allocate a block of some nonzero size the
- first time it is called.
-
- To have finer-grained control over the initial size, set *PN to a
- nonzero value before calling this function with P == NULL. For
- example:
-
- int *p = NULL;
- size_t used = 0;
- size_t allocated = 0;
- size_t allocated1 = 1000;
-
- void
- append_int (int value)
- {
- if (used == allocated)
- {
- p = x2nrealloc (p, &allocated1, sizeof *p);
- allocated = allocated1;
- }
- p[used++] = value;
- }
-
- */
-
-static_inline void *
-x2nrealloc (void *p, size_t *pn, size_t s)
-{
- size_t n = *pn;
-
- if (! p)
- {
- if (! n)
- {
- /* The approximate size to use for initial small allocation
- requests, when the invoking code specifies an old size of
- zero. 64 bytes is the largest "small" request for the
- GNU C library malloc. */
- enum { DEFAULT_MXFAST = 64 };
-
- n = DEFAULT_MXFAST / s;
- n += !n;
- }
- }
- else
- {
- /* Set N = ceil (1.5 * N) so that progress is made if N == 1.
- Check for overflow, so that N * S stays in size_t range.
- The check is slightly conservative, but an exact check isn't
- worth the trouble. */
- if ((size_t) -1 / 3 * 2 / s <= n)
- xalloc_die ();
- n += (n + 1) / 2;
- }
-
- *pn = n;
- return xrealloc (p, n * s);
-}
-
-/* Return a pointer to a new buffer of N bytes. This is like xmalloc,
- except it returns char *. */
-
-static_inline char *
-xcharalloc (size_t n)
-{
- return XNMALLOC (n, char);
-}
-
-# endif
-
-# ifdef __cplusplus
-}
-
-/* C++ does not allow conversions from void * to other pointer types
- without a cast. Use templates to work around the problem when
- possible. */
-
-template <typename T> inline T *
-xrealloc (T *p, size_t s)
-{
- return (T *) xrealloc ((void *) p, s);
-}
-
-template <typename T> inline T *
-xnrealloc (T *p, size_t n, size_t s)
-{
- return (T *) xnrealloc ((void *) p, n, s);
-}
-
-template <typename T> inline T *
-x2realloc (T *p, size_t *pn)
-{
- return (T *) x2realloc ((void *) p, pn);
-}
-
-template <typename T> inline T *
-x2nrealloc (T *p, size_t *pn, size_t s)
-{
- return (T *) x2nrealloc ((void *) p, pn, s);
-}
-
-template <typename T> inline T *
-xmemdup (T const *p, size_t s)
-{
- return (T *) xmemdup ((void const *) p, s);
-}
-
-# endif
-
-
-#endif /* !XALLOC_H_ */
--- contrib/cpio/lib/error.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-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. */
-
-/* Written by David MacKenzie <djm at gnu.ai.mit.edu>. */
-
-#if !_LIBC
-# include <config.h>
-#endif
-
-#include "error.h"
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if !_LIBC && ENABLE_NLS
-# include "gettext.h"
-#endif
-
-#ifdef _LIBC
-# include <libintl.h>
-# include <stdbool.h>
-# include <stdint.h>
-# include <wchar.h>
-# define mbsrtowcs __mbsrtowcs
-#endif
-
-#if USE_UNLOCKED_IO
-# include "unlocked-io.h"
-#endif
-
-#ifndef _
-# define _(String) String
-#endif
-
-/* If NULL, error will flush stdout, then print on stderr the program
- name, a colon and a space. Otherwise, error will call this
- function without parameters instead. */
-void (*error_print_progname) (void);
-
-/* This variable is incremented each time `error' is called. */
-unsigned int error_message_count;
-
-#ifdef _LIBC
-/* In the GNU C library, there is a predefined variable for this. */
-
-# define program_name program_invocation_name
-# include <errno.h>
-# include <limits.h>
-# include <libio/libioP.h>
-
-/* In GNU libc we want do not want to use the common name `error' directly.
- Instead make it a weak alias. */
-extern void __error (int status, int errnum, const char *message, ...)
- __attribute__ ((__format__ (__printf__, 3, 4)));
-extern void __error_at_line (int status, int errnum, const char *file_name,
- unsigned int line_number, const char *message,
- ...)
- __attribute__ ((__format__ (__printf__, 5, 6)));;
-# define error __error
-# define error_at_line __error_at_line
-
-# include <libio/iolibio.h>
-# define fflush(s) INTUSE(_IO_fflush) (s)
-# undef putc
-# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
-
-# include <bits/libc-lock.h>
-
-#else /* not _LIBC */
-
-# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
-# ifndef HAVE_DECL_STRERROR_R
-"this configure-time declaration test was not run"
-# endif
-char *strerror_r ();
-# endif
-
-/* The calling program should define program_name and set it to the
- name of the executing program. */
-extern char *program_name;
-
-# if HAVE_STRERROR_R || defined strerror_r
-# define __strerror_r strerror_r
-# endif /* HAVE_STRERROR_R || defined strerror_r */
-#endif /* not _LIBC */
-
-static void
-print_errno_message (int errnum)
-{
- char const *s;
-
-#if defined HAVE_STRERROR_R || _LIBC
- char errbuf[1024];
-# if STRERROR_R_CHAR_P || _LIBC
- s = __strerror_r (errnum, errbuf, sizeof errbuf);
-# else
- if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
- s = errbuf;
- else
- s = 0;
-# endif
-#else
- s = strerror (errnum);
-#endif
-
-#if !_LIBC
- if (! s)
- s = _("Unknown system error");
-#endif
-
-#if _LIBC
- __fxprintf (NULL, ": %s", s);
-#else
- fprintf (stderr, ": %s", s);
-#endif
-}
-
-static void
-error_tail (int status, int errnum, const char *message, va_list args)
-{
-#if _LIBC
- if (_IO_fwide (stderr, 0) > 0)
- {
-# define ALLOCA_LIMIT 2000
- size_t len = strlen (message) + 1;
- wchar_t *wmessage = NULL;
- mbstate_t st;
- size_t res;
- const char *tmp;
- bool use_malloc = false;
-
- while (1)
- {
- if (__libc_use_alloca (len * sizeof (wchar_t)))
- wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
- else
- {
- if (!use_malloc)
- wmessage = NULL;
-
- wchar_t *p = (wchar_t *) realloc (wmessage,
- len * sizeof (wchar_t));
- if (p == NULL)
- {
- free (wmessage);
- fputws_unlocked (L"out of memory\n", stderr);
- return;
- }
- wmessage = p;
- use_malloc = true;
- }
-
- memset (&st, '\0', sizeof (st));
- tmp = message;
-
- res = mbsrtowcs (wmessage, &tmp, len, &st);
- if (res != len)
- break;
-
- if (__builtin_expect (len >= SIZE_MAX / 2, 0))
- {
- /* This really should not happen if everything is fine. */
- res = (size_t) -1;
- break;
- }
-
- len *= 2;
- }
-
- if (res == (size_t) -1)
- {
- /* The string cannot be converted. */
- if (use_malloc)
- {
- free (wmessage);
- use_malloc = false;
- }
- wmessage = (wchar_t *) L"???";
- }
-
- __vfwprintf (stderr, wmessage, args);
-
- if (use_malloc)
- free (wmessage);
- }
- else
-#endif
- vfprintf (stderr, message, args);
- va_end (args);
-
- ++error_message_count;
- if (errnum)
- print_errno_message (errnum);
-#if _LIBC
- __fxprintf (NULL, "\n");
-#else
- putc ('\n', stderr);
-#endif
- fflush (stderr);
- if (status)
- exit (status);
-}
-
-
-/* Print the program name and error message MESSAGE, which is a printf-style
- format string with optional args.
- If ERRNUM is nonzero, print its corresponding system error message.
- Exit with status STATUS if it is nonzero. */
-void
-error (int status, int errnum, const char *message, ...)
-{
- va_list args;
-
-#if defined _LIBC && defined __libc_ptf_call
- /* We do not want this call to be cut short by a thread
- cancellation. Therefore disable cancellation for now. */
- int state = PTHREAD_CANCEL_ENABLE;
- __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
- 0);
-#endif
-
- fflush (stdout);
-#ifdef _LIBC
- _IO_flockfile (stderr);
-#endif
- if (error_print_progname)
- (*error_print_progname) ();
- else
- {
-#if _LIBC
- __fxprintf (NULL, "%s: ", program_name);
-#else
- fprintf (stderr, "%s: ", program_name);
-#endif
- }
-
- va_start (args, message);
- error_tail (status, errnum, message, args);
-
-#ifdef _LIBC
- _IO_funlockfile (stderr);
-# ifdef __libc_ptf_call
- __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
-# endif
-#endif
-}
-
-/* Sometimes we want to have at most one error per line. This
- variable controls whether this mode is selected or not. */
-int error_one_per_line;
-
-void
-error_at_line (int status, int errnum, const char *file_name,
- unsigned int line_number, const char *message, ...)
-{
- va_list args;
-
- if (error_one_per_line)
- {
- static const char *old_file_name;
- static unsigned int old_line_number;
-
- if (old_line_number == line_number
- && (file_name == old_file_name
- || strcmp (old_file_name, file_name) == 0))
- /* Simply return and print nothing. */
- return;
-
- old_file_name = file_name;
- old_line_number = line_number;
- }
-
-#if defined _LIBC && defined __libc_ptf_call
- /* We do not want this call to be cut short by a thread
- cancellation. Therefore disable cancellation for now. */
- int state = PTHREAD_CANCEL_ENABLE;
- __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
- 0);
-#endif
-
- fflush (stdout);
-#ifdef _LIBC
- _IO_flockfile (stderr);
-#endif
- if (error_print_progname)
- (*error_print_progname) ();
- else
- {
-#if _LIBC
- __fxprintf (NULL, "%s:", program_name);
-#else
- fprintf (stderr, "%s:", program_name);
-#endif
- }
-
-#if _LIBC
- __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
- file_name, line_number);
-#else
- fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
- file_name, line_number);
-#endif
-
- va_start (args, message);
- error_tail (status, errnum, message, args);
-
-#ifdef _LIBC
- _IO_funlockfile (stderr);
-# ifdef __libc_ptf_call
- __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
-# endif
-#endif
-}
-
-#ifdef _LIBC
-/* Make the weak alias. */
-# undef error
-# undef error_at_line
-weak_alias (__error, error)
-weak_alias (__error_at_line, error_at_line)
-#endif
--- contrib/cpio/lib/paxerror.c
+++ /dev/null
@@ -1,365 +0,0 @@
-/* Miscellaneous error functions
-
- 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. */
-
-#include <system.h>
-#include <paxlib.h>
-#include <quote.h>
-#include <quotearg.h>
-
-/* Decode MODE from its binary form in a stat structure, and encode it
- into a 9-byte string STRING, terminated with a NUL. */
-
-void
-pax_decode_mode (mode_t mode, char *string)
-{
- *string++ = mode & S_IRUSR ? 'r' : '-';
- *string++ = mode & S_IWUSR ? 'w' : '-';
- *string++ = (mode & S_ISUID
- ? (mode & S_IXUSR ? 's' : 'S')
- : (mode & S_IXUSR ? 'x' : '-'));
- *string++ = mode & S_IRGRP ? 'r' : '-';
- *string++ = mode & S_IWGRP ? 'w' : '-';
- *string++ = (mode & S_ISGID
- ? (mode & S_IXGRP ? 's' : 'S')
- : (mode & S_IXGRP ? 'x' : '-'));
- *string++ = mode & S_IROTH ? 'r' : '-';
- *string++ = mode & S_IWOTH ? 'w' : '-';
- *string++ = (mode & S_ISVTX
- ? (mode & S_IXOTH ? 't' : 'T')
- : (mode & S_IXOTH ? 'x' : '-'));
- *string = '\0';
-}
-
-/* Report an error associated with the system call CALL and the
- optional name NAME. */
-void
-call_arg_error (char const *call, char const *name)
-{
- int e = errno;
- /* TRANSLATORS: %s after `Cannot' is a function name, e.g. `Cannot open'.
- Directly translating this to another language will not work, first because
- %s itself is not translated.
- Translate it as `%s: Function %s failed'. */
- ERROR ((0, e, _("%s: Cannot %s"), quotearg_colon (name), call));
-}
-
-/* Report a fatal error associated with the system call CALL and
- the optional file name NAME. */
-void
-call_arg_fatal (char const *call, char const *name)
-{
- int e = errno;
- /* TRANSLATORS: %s after `Cannot' is a function name, e.g. `Cannot open'.
- Directly translating this to another language will not work, first because
- %s itself is not translated.
- Translate it as `%s: Function %s failed'. */
- FATAL_ERROR ((0, e, _("%s: Cannot %s"), quotearg_colon (name), call));
-}
-
-/* Report a warning associated with the system call CALL and
- the optional file name NAME. */
-void
-call_arg_warn (char const *call, char const *name)
-{
- int e = errno;
- /* TRANSLATORS: %s after `Cannot' is a function name, e.g. `Cannot open'.
- Directly translating this to another language will not work, first because
- %s itself is not translated.
- Translate it as `%s: Function %s failed'. */
- WARN ((0, e, _("%s: Warning: Cannot %s"), quotearg_colon (name), call));
-}
-
-void
-chmod_error_details (char const *name, mode_t mode)
-{
- int e = errno;
- char buf[10];
- pax_decode_mode (mode, buf);
- ERROR ((0, e, _("%s: Cannot change mode to %s"),
- quotearg_colon (name), buf));
-}
-
-void
-chown_error_details (char const *name, uid_t uid, gid_t gid)
-{
- int e = errno;
- ERROR ((0, e, _("%s: Cannot change ownership to uid %lu, gid %lu"),
- quotearg_colon (name), (unsigned long) uid, (unsigned long) gid));
-}
-
-void
-close_error (char const *name)
-{
- call_arg_error ("close", name);
-}
-
-void
-close_warn (char const *name)
-{
- call_arg_warn ("close", name);
-}
-
-void
-exec_fatal (char const *name)
-{
- call_arg_fatal ("exec", name);
-}
-
-void
-link_error (char const *target, char const *source)
-{
- int e = errno;
- ERROR ((0, e, _("%s: Cannot hard link to %s"),
- quotearg_colon (source), quote_n (1, target)));
-}
-
-void
-mkdir_error (char const *name)
-{
- call_arg_error ("mkdir", name);
-}
-
-void
-mkfifo_error (char const *name)
-{
- call_arg_error ("mkfifo", name);
-}
-
-void
-mknod_error (char const *name)
-{
- call_arg_error ("mknod", name);
-}
-
-void
-open_error (char const *name)
-{
- call_arg_error ("open", name);
-}
-
-void
-open_fatal (char const *name)
-{
- call_arg_fatal ("open", name);
-}
-
-void
-open_warn (char const *name)
-{
- call_arg_warn ("open", name);
-}
-
-void
-read_error (char const *name)
-{
- call_arg_error ("read", name);
-}
-
-void
-read_error_details (char const *name, off_t offset, size_t size)
-{
- char buf[UINTMAX_STRSIZE_BOUND];
- int e = errno;
- ERROR ((0, e,
- ngettext ("%s: Read error at byte %s, while reading %lu byte",
- "%s: Read error at byte %s, while reading %lu bytes",
- size),
- quotearg_colon (name), STRINGIFY_BIGINT (offset, buf),
- (unsigned long) size));
-}
-
-void
-read_warn_details (char const *name, off_t offset, size_t size)
-{
- char buf[UINTMAX_STRSIZE_BOUND];
- int e = errno;
- WARN ((0, e,
- ngettext ("%s: Warning: Read error at byte %s, while reading %lu byte",
- "%s: Warning: Read error at byte %s, while reading %lu bytes",
- size),
- quotearg_colon (name), STRINGIFY_BIGINT (offset, buf),
- (unsigned long) size));
-}
-
-void
-read_fatal (char const *name)
-{
- call_arg_fatal ("read", name);
-}
-
-void
-read_fatal_details (char const *name, off_t offset, size_t size)
-{
- char buf[UINTMAX_STRSIZE_BOUND];
- int e = errno;
- FATAL_ERROR ((0, e,
- ngettext ("%s: Read error at byte %s, while reading %lu byte",
- "%s: Read error at byte %s, while reading %lu bytes",
- size),
- quotearg_colon (name), STRINGIFY_BIGINT (offset, buf),
- (unsigned long) size));
-}
-
-void
-readlink_error (char const *name)
-{
- call_arg_error ("readlink", name);
-}
-
-void
-readlink_warn (char const *name)
-{
- call_arg_warn ("readlink", name);
-}
-
-void
-rmdir_error (char const *name)
-{
- call_arg_error ("rmdir", name);
-}
-
-void
-savedir_error (char const *name)
-{
- call_arg_error ("savedir", name);
-}
-
-void
-savedir_warn (char const *name)
-{
- call_arg_warn ("savedir", name);
-}
-
-void
-seek_error (char const *name)
-{
- call_arg_error ("seek", name);
-}
-
-void
-seek_error_details (char const *name, off_t offset)
-{
- char buf[UINTMAX_STRSIZE_BOUND];
- int e = errno;
- ERROR ((0, e, _("%s: Cannot seek to %s"),
- quotearg_colon (name),
- STRINGIFY_BIGINT (offset, buf)));
-}
-
-void
-seek_warn (char const *name)
-{
- call_arg_warn ("seek", name);
-}
-
-void
-seek_warn_details (char const *name, off_t offset)
-{
- char buf[UINTMAX_STRSIZE_BOUND];
- int e = errno;
- WARN ((0, e, _("%s: Warning: Cannot seek to %s"),
- quotearg_colon (name),
- STRINGIFY_BIGINT (offset, buf)));
-}
-
-void
-symlink_error (char const *contents, char const *name)
-{
- int e = errno;
- ERROR ((0, e, _("%s: Cannot create symlink to %s"),
- quotearg_colon (name), quote_n (1, contents)));
-}
-
-void
-stat_fatal (char const *name)
-{
- call_arg_fatal ("stat", name);
-}
-
-void
-stat_error (char const *name)
-{
- call_arg_error ("stat", name);
-}
-
-void
-stat_warn (char const *name)
-{
- call_arg_warn ("stat", name);
-}
-
-void
-truncate_error (char const *name)
-{
- call_arg_error ("truncate", name);
-}
-
-void
-truncate_warn (char const *name)
-{
- call_arg_warn ("truncate", name);
-}
-
-void
-unlink_error (char const *name)
-{
- call_arg_error ("unlink", name);
-}
-
-void
-utime_error (char const *name)
-{
- call_arg_error ("utime", name);
-}
-
-void
-waitpid_error (char const *name)
-{
- call_arg_error ("waitpid", name);
-}
-
-void
-write_error (char const *name)
-{
- call_arg_error ("write", name);
-}
-
-void
-write_error_details (char const *name, size_t status, size_t size)
-{
- if (status == 0)
- write_error (name);
- else
- ERROR ((0, 0,
- ngettext ("%s: Wrote only %lu of %lu byte",
- "%s: Wrote only %lu of %lu bytes",
- size),
- name, (unsigned long int) status, (unsigned long int) size));
-}
-
-void
-write_fatal (char const *name)
-{
- call_arg_fatal ("write", name);
-}
-
-void
-chdir_fatal (char const *name)
-{
- call_arg_fatal ("chdir", name);
-}
--- contrib/cpio/lib/localedir.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#define LOCALEDIR "/usr/share/locale"
-#ifndef DEFAULT_RMT_COMMAND
-# define DEFAULT_RMT_COMMAND "/usr/libexec/rmt"
-#endif
--- contrib/cpio/lib/strnlen.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
- Written by Simon Josefsson.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include <config.h>
-
-#include <string.h>
-
-/* Find the length of STRING, but scan at most MAXLEN characters.
- If no '\0' terminator is found in that many characters, return MAXLEN. */
-
-size_t
-strnlen (const char *string, size_t maxlen)
-{
- const char *end = memchr (string, '\0', maxlen);
- return end ? (size_t) (end - string) : maxlen;
-}
--- contrib/cpio/lib/quote.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* quote.h - prototypes for quote.c
-
- Copyright (C) 1998, 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. */
-
-
-char const *quote_n (int n, char const *name);
-char const *quote (char const *name);
--- contrib/cpio/lib/dirname.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* 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_ */
--- contrib/cpio/lib/vsnprintf.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Formatted output to strings.
- Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
- Written by Simon Josefsson and Yoann Vandoorselaere <yoann at prelude-ids.org>.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- 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
-
-/* Specification. */
-#include <stdio.h>
-
-#include <errno.h>
-#include <limits.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "vasnprintf.h"
-
-/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */
-#ifndef EOVERFLOW
-# define EOVERFLOW E2BIG
-#endif
-
-/* Print formatted output to string STR. Similar to vsprintf, but
- additional length SIZE limit how much is written into STR. Returns
- string length of formatted string (which may be larger than SIZE).
- STR may be NULL, in which case nothing will be written. On error,
- return a negative value. */
-int
-vsnprintf (char *str, size_t size, const char *format, va_list args)
-{
- char *output;
- size_t len;
- size_t lenbuf = size;
-
- output = vasnprintf (str, &lenbuf, format, args);
- len = lenbuf;
-
- if (!output)
- return -1;
-
- if (output != str)
- {
- if (size)
- {
- size_t pruned_len = (len < size ? len : size - 1);
- memcpy (str, output, pruned_len);
- str[pruned_len] = '\0';
- }
-
- free (output);
- }
-
- if (len > INT_MAX)
- {
- errno = EOVERFLOW;
- return -1;
- }
-
- return len;
-}
--- contrib/cpio/lib/rmt.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Definitions for communicating with a remote tape drive.
-
- Copyright (C) 1988, 1992, 1996, 1997, 2001, 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; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-extern char *rmt_command;
-extern char *rmt_dev_name__;
-
-int rmt_open__ (const char *, int, int, const char *);
-int rmt_close__ (int);
-size_t rmt_read__ (int, char *, size_t);
-size_t rmt_write__ (int, char *, size_t);
-off_t rmt_lseek__ (int, off_t, int);
-int rmt_ioctl__ (int, int, char *);
-
-extern bool force_local_option;
-
-/* A filename is remote if it contains a colon not preceded by a slash,
- to take care of `/:/' which is a shorthand for `/.../<CELL-NAME>/fs'
- on machines running OSF's Distributing Computing Environment (DCE) and
- Distributed File System (DFS). However, when --force-local, a
- filename is never remote. */
-
-#define _remdev(dev_name) \
- (!force_local_option && (rmt_dev_name__ = strchr (dev_name, ':')) \
- && rmt_dev_name__ > (dev_name) \
- && ! memchr (dev_name, '/', rmt_dev_name__ - (dev_name)))
-
-#define _isrmt(fd) \
- ((fd) >= __REM_BIAS)
-
-#define __REM_BIAS (1 << 30)
-
-#ifndef O_CREAT
-# define O_CREAT 01000
-#endif
-
-#define rmtopen(dev_name, oflag, mode, command) \
- (_remdev (dev_name) ? rmt_open__ (dev_name, oflag, __REM_BIAS, command) \
- : open (dev_name, oflag, mode))
-
-#define rmtaccess(dev_name, amode) \
- (_remdev (dev_name) ? 0 : access (dev_name, amode))
-
-#define rmtstat(dev_name, buffer) \
- (_remdev (dev_name) ? (errno = EOPNOTSUPP), -1 : stat (dev_name, buffer))
-
-#define rmtcreat(dev_name, mode, command) \
- (_remdev (dev_name) \
- ? rmt_open__ (dev_name, 1 | O_CREAT, __REM_BIAS, command) \
- : creat (dev_name, mode))
-
-#define rmtlstat(dev_name, muffer) \
- (_remdev (dev_name) ? (errno = EOPNOTSUPP), -1 : lstat (dev_name, buffer))
-
-#define rmtread(fd, buffer, length) \
- (_isrmt (fd) ? rmt_read__ (fd - __REM_BIAS, buffer, length) \
- : safe_read (fd, buffer, length))
-
-#define rmtwrite(fd, buffer, length) \
- (_isrmt (fd) ? rmt_write__ (fd - __REM_BIAS, buffer, length) \
- : full_write (fd, buffer, length))
-
-#define rmtlseek(fd, offset, where) \
- (_isrmt (fd) ? rmt_lseek__ (fd - __REM_BIAS, offset, where) \
- : lseek (fd, offset, where))
-
-#define rmtclose(fd) \
- (_isrmt (fd) ? rmt_close__ (fd - __REM_BIAS) : close (fd))
-
-#define rmtioctl(fd, request, argument) \
- (_isrmt (fd) ? rmt_ioctl__ (fd - __REM_BIAS, request, argument) \
- : ioctl (fd, request, argument))
-
-#define rmtdup(fd) \
- (_isrmt (fd) ? (errno = EOPNOTSUPP), -1 : dup (fd))
-
-#define rmtfstat(fd, buffer) \
- (_isrmt (fd) ? (errno = EOPNOTSUPP), -1 : fstat (fd, buffer))
-
-#define rmtfcntl(cd, command, argument) \
- (_isrmt (fd) ? (errno = EOPNOTSUPP), -1 : fcntl (fd, command, argument))
-
-#define rmtisatty(fd) \
- (_isrmt (fd) ? 0 : isatty (fd))
--- contrib/cpio/lib/dup2.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Duplicate an open file descriptor to a specified file descriptor.
-
- Copyright (C) 1999, 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 Paul Eggert */
-
-#include <config.h>
-
-/* Specification. */
-#include <unistd.h>
-
-#include <errno.h>
-#include <fcntl.h>
-
-#ifndef F_DUPFD
-static int
-dupfd (int fd, int desired_fd)
-{
- int duplicated_fd = dup (fd);
- if (duplicated_fd < 0 || duplicated_fd == desired_fd)
- return duplicated_fd;
- else
- {
- int r = dupfd (fd, desired_fd);
- int e = errno;
- close (duplicated_fd);
- errno = e;
- return r;
- }
-}
-#endif
-
-int
-dup2 (int fd, int desired_fd)
-{
- if (fd == desired_fd)
- return fd;
- close (desired_fd);
-#ifdef F_DUPFD
- return fcntl (fd, F_DUPFD, desired_fd);
-#else
- return dupfd (fd, desired_fd);
-#endif
-}
--- contrib/cpio/lib/hash.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* hash - hashing table processing.
- Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
- Written by Jim Meyering <meyering at ascend.com>, 1998.
-
- 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. */
-
-/* A generic hash table package. */
-
-/* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use
- obstacks instead of malloc, and recompile `hash.c' with same setting. */
-
-#ifndef HASH_H_
-# define HASH_H_
-
-# include <stdio.h>
-# include <stdbool.h>
-
-typedef size_t (*Hash_hasher) (const void *, size_t);
-typedef bool (*Hash_comparator) (const void *, const void *);
-typedef void (*Hash_data_freer) (void *);
-typedef bool (*Hash_processor) (void *, void *);
-
-struct hash_entry
- {
- void *data;
- struct hash_entry *next;
- };
-
-struct hash_tuning
- {
- /* This structure is mainly used for `hash_initialize', see the block
- documentation of `hash_reset_tuning' for more complete comments. */
-
- float shrink_threshold; /* ratio of used buckets to trigger a shrink */
- float shrink_factor; /* ratio of new smaller size to original size */
- float growth_threshold; /* ratio of used buckets to trigger a growth */
- float growth_factor; /* ratio of new bigger size to original size */
- bool is_n_buckets; /* if CANDIDATE really means table size */
- };
-
-typedef struct hash_tuning Hash_tuning;
-
-struct hash_table;
-
-typedef struct hash_table Hash_table;
-
-/* Information and lookup. */
-size_t hash_get_n_buckets (const Hash_table *);
-size_t hash_get_n_buckets_used (const Hash_table *);
-size_t hash_get_n_entries (const Hash_table *);
-size_t hash_get_max_bucket_length (const Hash_table *);
-bool hash_table_ok (const Hash_table *);
-void hash_print_statistics (const Hash_table *, FILE *);
-void *hash_lookup (const Hash_table *, const void *);
-
-/* Walking. */
-void *hash_get_first (const Hash_table *);
-void *hash_get_next (const Hash_table *, const void *);
-size_t hash_get_entries (const Hash_table *, void **, size_t);
-size_t hash_do_for_each (const Hash_table *, Hash_processor, void *);
-
-/* Allocation and clean-up. */
-size_t hash_string (const char *, size_t);
-void hash_reset_tuning (Hash_tuning *);
-Hash_table *hash_initialize (size_t, const Hash_tuning *,
- Hash_hasher, Hash_comparator,
- Hash_data_freer);
-void hash_clear (Hash_table *);
-void hash_free (Hash_table *);
-
-/* Insertion and deletion. */
-bool hash_rehash (Hash_table *, size_t);
-void *hash_insert (Hash_table *, const void *);
-void *hash_delete (Hash_table *, const void *);
-
-#endif
--- contrib/cpio/lib/safe-read.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/* An interface to read and write that retries after interrupts.
-
- Copyright (C) 1993, 1994, 1998, 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; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include <config.h>
-
-/* Specification. */
-#ifdef SAFE_WRITE
-# include "safe-write.h"
-#else
-# include "safe-read.h"
-#endif
-
-/* Get ssize_t. */
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <errno.h>
-
-#ifdef EINTR
-# define IS_EINTR(x) ((x) == EINTR)
-#else
-# define IS_EINTR(x) 0
-#endif
-
-#include <limits.h>
-
-#ifdef SAFE_WRITE
-# define safe_rw safe_write
-# define rw write
-#else
-# define safe_rw safe_read
-# define rw read
-# undef const
-# define const /* empty */
-#endif
-
-/* Read(write) up to COUNT bytes at BUF from(to) descriptor FD, retrying if
- interrupted. Return the actual number of bytes read(written), zero for EOF,
- or SAFE_READ_ERROR(SAFE_WRITE_ERROR) upon error. */
-size_t
-safe_rw (int fd, void const *buf, size_t count)
-{
- /* Work around a bug in Tru64 5.1. Attempting to read more than
- INT_MAX bytes fails with errno == EINVAL. See
- <http://lists.gnu.org/archive/html/bug-gnu-utils/2002-04/msg00010.html>.
- When decreasing COUNT, keep it block-aligned. */
- enum { BUGGY_READ_MAXIMUM = INT_MAX & ~8191 };
-
- for (;;)
- {
- ssize_t result = rw (fd, buf, count);
-
- if (0 <= result)
- return result;
- else if (IS_EINTR (errno))
- continue;
- else if (errno == EINVAL && BUGGY_READ_MAXIMUM < count)
- count = BUGGY_READ_MAXIMUM;
- else
- return result;
- }
-}
--- contrib/cpio/lib/dirname.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* 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;
-}
--- contrib/cpio/lib/asnprintf.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 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;
-}
--- contrib/cpio/lib/closeout.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* 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
--- contrib/cpio/lib/unistd--.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Like unistd.h, but redefine some names to avoid glitches.
-
- 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. */
-
-/* Written by Paul Eggert. */
-
-#include <unistd.h>
-#include "unistd-safer.h"
-
-#undef dup
-#define dup dup_safer
-
-#undef pipe
-#define pipe pipe_safer
--- contrib/cpio/lib/full-write.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* An interface to read and write that retries (if necessary) until complete.
-
- Copyright (C) 1993, 1994, 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; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include <config.h>
-
-/* Specification. */
-#ifdef FULL_READ
-# include "full-read.h"
-#else
-# include "full-write.h"
-#endif
-
-#include <errno.h>
-
-#ifdef FULL_READ
-# include "safe-read.h"
-# define safe_rw safe_read
-# define full_rw full_read
-# undef const
-# define const /* empty */
-#else
-# include "safe-write.h"
-# define safe_rw safe_write
-# define full_rw full_write
-#endif
-
-#ifdef FULL_READ
-/* Set errno to zero upon EOF. */
-# define ZERO_BYTE_TRANSFER_ERRNO 0
-#else
-/* Some buggy drivers return 0 when one tries to write beyond
- a device's end. (Example: Linux 1.2.13 on /dev/fd0.)
- Set errno to ENOSPC so they get a sensible diagnostic. */
-# define ZERO_BYTE_TRANSFER_ERRNO ENOSPC
-#endif
-
-/* Write(read) COUNT bytes at BUF to(from) descriptor FD, retrying if
- interrupted or if a partial write(read) occurs. Return the number
- of bytes transferred.
- When writing, set errno if fewer than COUNT bytes are written.
- When reading, if fewer than COUNT bytes are read, you must examine
- errno to distinguish failure from EOF (errno == 0). */
-size_t
-full_rw (int fd, const void *buf, size_t count)
-{
- size_t total = 0;
- const char *ptr = (const char *) buf;
-
- while (count > 0)
- {
- size_t n_rw = safe_rw (fd, ptr, count);
- if (n_rw == (size_t) -1)
- break;
- if (n_rw == 0)
- {
- errno = ZERO_BYTE_TRANSFER_ERRNO;
- break;
- }
- total += n_rw;
- ptr += n_rw;
- count -= n_rw;
- }
-
- return total;
-}
--- contrib/cpio/lib/inttostr.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* inttostr.c -- convert integers to printable strings
-
- 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 Paul Eggert */
-
-#include <config.h>
-
-#include "inttostr.h"
-
-/* Convert I to a printable string in BUF, which must be at least
- INT_BUFSIZE_BOUND (INTTYPE) bytes long. Return the address of the
- printable string, which need not start at BUF. */
-
-char *
-inttostr (inttype i, char *buf)
-{
- char *p = buf + INT_STRLEN_BOUND (inttype);
- *p = 0;
-
- if (i < 0)
- {
- do
- *--p = '0' - i % 10;
- while ((i /= 10) != 0);
-
- *--p = '-';
- }
- else
- {
- do
- *--p = '0' + i % 10;
- while ((i /= 10) != 0);
- }
-
- return p;
-}
--- contrib/cpio/lib/timespec.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* timespec -- System time interface
-
- Copyright (C) 2000, 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#if ! defined TIMESPEC_H
-# define TIMESPEC_H
-
-# include <time.h>
-
-/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
- Assume the nanosecond components are in range, or close to it. */
-static inline int
-timespec_cmp (struct timespec a, struct timespec b)
-{
- return (a.tv_sec < b.tv_sec ? -1
- : a.tv_sec > b.tv_sec ? 1
- : a.tv_nsec - b.tv_nsec);
-}
-
-void gettime (struct timespec *);
-int settime (struct timespec const *);
-
-#endif
--- contrib/cpio/lib/close-stream.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* 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;
-}
--- contrib/cpio/lib/quotearg.c
+++ /dev/null
@@ -1,688 +0,0 @@
-/* quotearg.c - quote arguments for output
-
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 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 <eggert at twinsun.com> */
-
-#include <config.h>
-
-#include "quotearg.h"
-
-#include "xalloc.h"
-
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
-
-#if HAVE_WCHAR_H
-
-/* BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared. */
-# include <stdio.h>
-# include <time.h>
-
-# include <wchar.h>
-#endif
-
-#if !HAVE_MBRTOWC
-/* Disable multibyte processing entirely. Since MB_CUR_MAX is 1, the
- other macros are defined only for documentation and to satisfy C
- syntax. */
-# undef MB_CUR_MAX
-# define MB_CUR_MAX 1
-# define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0)
-# define iswprint(wc) isprint ((unsigned char) (wc))
-# undef HAVE_MBSINIT
-#endif
-
-#if !defined mbsinit && !HAVE_MBSINIT
-# define mbsinit(ps) 1
-#endif
-
-#ifndef iswprint
-# if HAVE_WCTYPE_H
-# include <wctype.h>
-# endif
-# if !defined iswprint && !HAVE_ISWPRINT
-# define iswprint(wc) 1
-# endif
-#endif
-
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
-#define INT_BITS (sizeof (int) * CHAR_BIT)
-
-struct quoting_options
-{
- /* Basic quoting style. */
- enum quoting_style style;
-
- /* Quote the characters indicated by this bit vector even if the
- quoting style would not normally require them to be quoted. */
- unsigned int quote_these_too[(UCHAR_MAX / INT_BITS) + 1];
-};
-
-/* Names of quoting styles. */
-char const *const quoting_style_args[] =
-{
- "literal",
- "shell",
- "shell-always",
- "c",
- "escape",
- "locale",
- "clocale",
- 0
-};
-
-/* Correspondences to quoting style names. */
-enum quoting_style const quoting_style_vals[] =
-{
- literal_quoting_style,
- shell_quoting_style,
- shell_always_quoting_style,
- c_quoting_style,
- escape_quoting_style,
- locale_quoting_style,
- clocale_quoting_style
-};
-
-/* The default quoting options. */
-static struct quoting_options default_quoting_options;
-
-/* Allocate a new set of quoting options, with contents initially identical
- to O if O is not null, or to the default if O is null.
- It is the caller's responsibility to free the result. */
-struct quoting_options *
-clone_quoting_options (struct quoting_options *o)
-{
- int e = errno;
- struct quoting_options *p = xmalloc (sizeof *p);
- *p = *(o ? o : &default_quoting_options);
- errno = e;
- return p;
-}
-
-/* Get the value of O's quoting style. If O is null, use the default. */
-enum quoting_style
-get_quoting_style (struct quoting_options *o)
-{
- return (o ? o : &default_quoting_options)->style;
-}
-
-/* In O (or in the default if O is null),
- set the value of the quoting style to S. */
-void
-set_quoting_style (struct quoting_options *o, enum quoting_style s)
-{
- (o ? o : &default_quoting_options)->style = s;
-}
-
-/* In O (or in the default if O is null),
- set the value of the quoting options for character C to I.
- Return the old value. Currently, the only values defined for I are
- 0 (the default) and 1 (which means to quote the character even if
- it would not otherwise be quoted). */
-int
-set_char_quoting (struct quoting_options *o, char c, int i)
-{
- unsigned char uc = c;
- unsigned int *p =
- (o ? o : &default_quoting_options)->quote_these_too + uc / INT_BITS;
- int shift = uc % INT_BITS;
- int r = (*p >> shift) & 1;
- *p ^= ((i & 1) ^ r) << shift;
- return r;
-}
-
-/* MSGID approximates a quotation mark. Return its translation if it
- has one; otherwise, return either it or "\"", depending on S. */
-static char const *
-gettext_quote (char const *msgid, enum quoting_style s)
-{
- char const *translation = _(msgid);
- if (translation == msgid && s == clocale_quoting_style)
- translation = "\"";
- return translation;
-}
-
-/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
- argument ARG (of size ARGSIZE), using QUOTING_STYLE and the
- non-quoting-style part of O to control quoting.
- Terminate the output with a null character, and return the written
- size of the output, not counting the terminating null.
- If BUFFERSIZE is too small to store the output string, return the
- value that would have been returned had BUFFERSIZE been large enough.
- If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE.
-
- This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG,
- ARGSIZE, O), except it uses QUOTING_STYLE instead of the quoting
- style specified by O, and O may not be null. */
-
-static size_t
-quotearg_buffer_restyled (char *buffer, size_t buffersize,
- char const *arg, size_t argsize,
- enum quoting_style quoting_style,
- struct quoting_options const *o)
-{
- size_t i;
- size_t len = 0;
- char const *quote_string = 0;
- size_t quote_string_len = 0;
- bool backslash_escapes = false;
- bool unibyte_locale = MB_CUR_MAX == 1;
-
-#define STORE(c) \
- do \
- { \
- if (len < buffersize) \
- buffer[len] = (c); \
- len++; \
- } \
- while (0)
-
- switch (quoting_style)
- {
- case c_quoting_style:
- STORE ('"');
- backslash_escapes = true;
- quote_string = "\"";
- quote_string_len = 1;
- break;
-
- case escape_quoting_style:
- backslash_escapes = true;
- break;
-
- case locale_quoting_style:
- case clocale_quoting_style:
- {
- /* TRANSLATORS:
- Get translations for open and closing quotation marks.
-
- The message catalog should translate "`" to a left
- quotation mark suitable for the locale, and similarly for
- "'". If the catalog has no translation,
- locale_quoting_style quotes `like this', and
- clocale_quoting_style quotes "like this".
-
- For example, an American English Unicode locale should
- translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
- should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
- MARK). A British English Unicode locale should instead
- translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
- U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
-
- If you don't know what to put here, please see
- <http://en.wikipedia.org/wiki/Quotation_mark#Glyphs>
- and use glyphs suitable for your language. */
-
- char const *left = gettext_quote (N_("`"), quoting_style);
- char const *right = gettext_quote (N_("'"), quoting_style);
- for (quote_string = left; *quote_string; quote_string++)
- STORE (*quote_string);
- backslash_escapes = true;
- quote_string = right;
- quote_string_len = strlen (quote_string);
- }
- break;
-
- case shell_always_quoting_style:
- STORE ('\'');
- quote_string = "'";
- quote_string_len = 1;
- break;
-
- default:
- break;
- }
-
- for (i = 0; ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); i++)
- {
- unsigned char c;
- unsigned char esc;
-
- if (backslash_escapes
- && quote_string_len
- && i + quote_string_len <= argsize
- && memcmp (arg + i, quote_string, quote_string_len) == 0)
- STORE ('\\');
-
- c = arg[i];
- switch (c)
- {
- case '\0':
- if (backslash_escapes)
- {
- STORE ('\\');
- STORE ('0');
- STORE ('0');
- c = '0';
- }
- break;
-
- case '?':
- switch (quoting_style)
- {
- case shell_quoting_style:
- goto use_shell_always_quoting_style;
-
- case c_quoting_style:
- if (i + 2 < argsize && arg[i + 1] == '?')
- switch (arg[i + 2])
- {
- case '!': case '\'':
- case '(': case ')': case '-': case '/':
- case '<': case '=': case '>':
- /* Escape the second '?' in what would otherwise be
- a trigraph. */
- c = arg[i + 2];
- i += 2;
- STORE ('?');
- STORE ('\\');
- STORE ('?');
- break;
-
- default:
- break;
- }
- break;
-
- default:
- break;
- }
- break;
-
- case '\a': esc = 'a'; goto c_escape;
- case '\b': esc = 'b'; goto c_escape;
- case '\f': esc = 'f'; goto c_escape;
- case '\n': esc = 'n'; goto c_and_shell_escape;
- case '\r': esc = 'r'; goto c_and_shell_escape;
- case '\t': esc = 't'; goto c_and_shell_escape;
- case '\v': esc = 'v'; goto c_escape;
- case '\\': esc = c; goto c_and_shell_escape;
-
- c_and_shell_escape:
- if (quoting_style == shell_quoting_style)
- goto use_shell_always_quoting_style;
- c_escape:
- if (backslash_escapes)
- {
- c = esc;
- goto store_escape;
- }
- break;
-
- case '{': case '}': /* sometimes special if isolated */
- if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1))
- break;
- /* Fall through. */
- case '#': case '~':
- if (i != 0)
- break;
- /* Fall through. */
- case ' ':
- case '!': /* special in bash */
- case '"': case '$': case '&':
- case '(': case ')': case '*': case ';':
- case '<':
- case '=': /* sometimes special in 0th or (with "set -k") later args */
- case '>': case '[':
- case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
- case '`': case '|':
- /* A shell special character. In theory, '$' and '`' could
- be the first bytes of multibyte characters, which means
- we should check them with mbrtowc, but in practice this
- doesn't happen so it's not worth worrying about. */
- if (quoting_style == shell_quoting_style)
- goto use_shell_always_quoting_style;
- break;
-
- case '\'':
- switch (quoting_style)
- {
- case shell_quoting_style:
- goto use_shell_always_quoting_style;
-
- case shell_always_quoting_style:
- STORE ('\'');
- STORE ('\\');
- STORE ('\'');
- break;
-
- default:
- break;
- }
- break;
-
- case '%': case '+': case ',': case '-': case '.': case '/':
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9': case ':':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z': case ']': case '_': case 'a': case 'b':
- case 'c': case 'd': case 'e': case 'f': case 'g': case 'h':
- case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
- case 'o': case 'p': case 'q': case 'r': case 's': case 't':
- case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
- /* These characters don't cause problems, no matter what the
- quoting style is. They cannot start multibyte sequences. */
- break;
-
- default:
- /* If we have a multibyte sequence, copy it until we reach
- its end, find an error, or come back to the initial shift
- state. For C-like styles, if the sequence has
- unprintable characters, escape the whole sequence, since
- we can't easily escape single characters within it. */
- {
- /* Length of multibyte sequence found so far. */
- size_t m;
-
- bool printable;
-
- if (unibyte_locale)
- {
- m = 1;
- printable = isprint (c) != 0;
- }
- else
- {
- mbstate_t mbstate;
- memset (&mbstate, 0, sizeof mbstate);
-
- m = 0;
- printable = true;
- if (argsize == SIZE_MAX)
- argsize = strlen (arg);
-
- do
- {
- wchar_t w;
- size_t bytes = mbrtowc (&w, &arg[i + m],
- argsize - (i + m), &mbstate);
- if (bytes == 0)
- break;
- else if (bytes == (size_t) -1)
- {
- printable = false;
- break;
- }
- else if (bytes == (size_t) -2)
- {
- printable = false;
- while (i + m < argsize && arg[i + m])
- m++;
- break;
- }
- else
- {
- /* Work around a bug with older shells that "see" a '\'
- that is really the 2nd byte of a multibyte character.
- In practice the problem is limited to ASCII
- chars >= '@' that are shell special chars. */
- if ('[' == 0x5b && quoting_style == shell_quoting_style)
- {
- size_t j;
- for (j = 1; j < bytes; j++)
- switch (arg[i + m + j])
- {
- case '[': case '\\': case '^':
- case '`': case '|':
- goto use_shell_always_quoting_style;
-
- default:
- break;
- }
- }
-
- if (! iswprint (w))
- printable = false;
- m += bytes;
- }
- }
- while (! mbsinit (&mbstate));
- }
-
- if (1 < m || (backslash_escapes && ! printable))
- {
- /* Output a multibyte sequence, or an escaped
- unprintable unibyte character. */
- size_t ilim = i + m;
-
- for (;;)
- {
- if (backslash_escapes && ! printable)
- {
- STORE ('\\');
- STORE ('0' + (c >> 6));
- STORE ('0' + ((c >> 3) & 7));
- c = '0' + (c & 7);
- }
- if (ilim <= i + 1)
- break;
- STORE (c);
- c = arg[++i];
- }
-
- goto store_c;
- }
- }
- }
-
- if (! (backslash_escapes
- && o->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
- goto store_c;
-
- store_escape:
- STORE ('\\');
-
- store_c:
- STORE (c);
- }
-
- if (i == 0 && quoting_style == shell_quoting_style)
- goto use_shell_always_quoting_style;
-
- if (quote_string)
- for (; *quote_string; quote_string++)
- STORE (*quote_string);
-
- if (len < buffersize)
- buffer[len] = '\0';
- return len;
-
- use_shell_always_quoting_style:
- return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
- shell_always_quoting_style, o);
-}
-
-/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
- argument ARG (of size ARGSIZE), using O to control quoting.
- If O is null, use the default.
- Terminate the output with a null character, and return the written
- size of the output, not counting the terminating null.
- If BUFFERSIZE is too small to store the output string, return the
- value that would have been returned had BUFFERSIZE been large enough.
- If ARGSIZE is SIZE_MAX, use the string length of the argument for
- ARGSIZE. */
-size_t
-quotearg_buffer (char *buffer, size_t buffersize,
- char const *arg, size_t argsize,
- struct quoting_options const *o)
-{
- struct quoting_options const *p = o ? o : &default_quoting_options;
- int e = errno;
- size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
- p->style, p);
- errno = e;
- return r;
-}
-
-/* Like quotearg_buffer (..., ARG, ARGSIZE, O), except return newly
- allocated storage containing the quoted string. */
-char *
-quotearg_alloc (char const *arg, size_t argsize,
- struct quoting_options const *o)
-{
- int e = errno;
- size_t bufsize = quotearg_buffer (0, 0, arg, argsize, o) + 1;
- char *buf = xmalloc (bufsize);
- quotearg_buffer (buf, bufsize, arg, argsize, o);
- errno = e;
- return buf;
-}
-
-/* Use storage slot N to return a quoted version of argument ARG.
- ARG is of size ARGSIZE, but if that is SIZE_MAX, ARG is a
- null-terminated string.
- OPTIONS specifies the quoting options.
- The returned value points to static storage that can be
- reused by the next call to this function with the same value of N.
- N must be nonnegative. N is deliberately declared with type "int"
- to allow for future extensions (using negative values). */
-static char *
-quotearg_n_options (int n, char const *arg, size_t argsize,
- struct quoting_options const *options)
-{
- int e = errno;
-
- /* Preallocate a slot 0 buffer, so that the caller can always quote
- one small component of a "memory exhausted" message in slot 0. */
- static char slot0[256];
- static unsigned int nslots = 1;
- unsigned int n0 = n;
- struct slotvec
- {
- size_t size;
- char *val;
- };
- static struct slotvec slotvec0 = {sizeof slot0, slot0};
- static struct slotvec *slotvec = &slotvec0;
-
- if (n < 0)
- abort ();
-
- if (nslots <= n0)
- {
- /* FIXME: technically, the type of n1 should be `unsigned int',
- but that evokes an unsuppressible warning from gcc-4.0.1 and
- older. If gcc ever provides an option to suppress that warning,
- revert to the original type, so that the test in xalloc_oversized
- is once again performed only at compile time. */
- size_t n1 = n0 + 1;
-
- if (xalloc_oversized (n1, sizeof *slotvec))
- xalloc_die ();
-
- if (slotvec == &slotvec0)
- {
- slotvec = xmalloc (sizeof *slotvec);
- *slotvec = slotvec0;
- }
- slotvec = xrealloc (slotvec, n1 * sizeof *slotvec);
- memset (slotvec + nslots, 0, (n1 - nslots) * sizeof *slotvec);
- nslots = n1;
- }
-
- {
- size_t size = slotvec[n].size;
- char *val = slotvec[n].val;
- size_t qsize = quotearg_buffer (val, size, arg, argsize, options);
-
- if (size <= qsize)
- {
- slotvec[n].size = size = qsize + 1;
- if (val != slot0)
- free (val);
- slotvec[n].val = val = xmalloc (size);
- quotearg_buffer (val, size, arg, argsize, options);
- }
-
- errno = e;
- return val;
- }
-}
-
-char *
-quotearg_n (int n, char const *arg)
-{
- return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options);
-}
-
-char *
-quotearg (char const *arg)
-{
- return quotearg_n (0, arg);
-}
-
-/* Return quoting options for STYLE, with no extra quoting. */
-static struct quoting_options
-quoting_options_from_style (enum quoting_style style)
-{
- struct quoting_options o;
- o.style = style;
- memset (o.quote_these_too, 0, sizeof o.quote_these_too);
- return o;
-}
-
-char *
-quotearg_n_style (int n, enum quoting_style s, char const *arg)
-{
- struct quoting_options const o = quoting_options_from_style (s);
- return quotearg_n_options (n, arg, SIZE_MAX, &o);
-}
-
-char *
-quotearg_n_style_mem (int n, enum quoting_style s,
- char const *arg, size_t argsize)
-{
- struct quoting_options const o = quoting_options_from_style (s);
- return quotearg_n_options (n, arg, argsize, &o);
-}
-
-char *
-quotearg_style (enum quoting_style s, char const *arg)
-{
- return quotearg_n_style (0, s, arg);
-}
-
-char *
-quotearg_char (char const *arg, char ch)
-{
- struct quoting_options options;
- options = default_quoting_options;
- set_char_quoting (&options, ch, 1);
- return quotearg_n_options (0, arg, SIZE_MAX, &options);
-}
-
-char *
-quotearg_colon (char const *arg)
-{
- return quotearg_char (arg, ':');
-}
--- contrib/cpio/lib/mkdirat.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* fd-relative mkdir
- 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 "openat.h"
-
-#include <unistd.h>
-
-#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
-#include "save-cwd.h"
-#include "openat-priv.h"
-
-/* Solaris 10 has no function like this.
- Create a subdirectory, FILE, with mode MODE, in the directory
- open on descriptor FD. If possible, do it without changing the
- working directory. Otherwise, resort to using save_cwd/fchdir,
- then mkdir/restore_cwd. If either the save_cwd or the restore_cwd
- fails, then give a diagnostic and exit nonzero. */
-
-#define AT_FUNC_NAME mkdirat
-#define AT_FUNC_F1 mkdir
-#define AT_FUNC_F2 mkdir
-#define AT_FUNC_USE_F1_COND 1
-#define AT_FUNC_POST_FILE_PARAM_DECLS , mode_t mode
-#define AT_FUNC_POST_FILE_ARGS , mode
-#include "at-func.c"
--- contrib/cpio/lib/hash.c
+++ /dev/null
@@ -1,1048 +0,0 @@
-/* hash - hashing table processing.
-
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free
- Software Foundation, Inc.
-
- Written by Jim Meyering, 1992.
-
- 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. */
-
-/* A generic hash table package. */
-
-/* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead
- of malloc. If you change USE_OBSTACK, you have to recompile! */
-
-#include <config.h>
-
-#include "hash.h"
-#include "xalloc.h"
-
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#if USE_OBSTACK
-# include "obstack.h"
-# ifndef obstack_chunk_alloc
-# define obstack_chunk_alloc malloc
-# endif
-# ifndef obstack_chunk_free
-# define obstack_chunk_free free
-# endif
-#endif
-
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
-struct hash_table
- {
- /* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1,
- for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets
- are not empty, there are N_ENTRIES active entries in the table. */
- struct hash_entry *bucket;
- struct hash_entry const *bucket_limit;
- size_t n_buckets;
- size_t n_buckets_used;
- size_t n_entries;
-
- /* Tuning arguments, kept in a physicaly separate structure. */
- const Hash_tuning *tuning;
-
- /* Three functions are given to `hash_initialize', see the documentation
- block for this function. In a word, HASHER randomizes a user entry
- into a number up from 0 up to some maximum minus 1; COMPARATOR returns
- true if two user entries compare equally; and DATA_FREER is the cleanup
- function for a user entry. */
- Hash_hasher hasher;
- Hash_comparator comparator;
- Hash_data_freer data_freer;
-
- /* A linked list of freed struct hash_entry structs. */
- struct hash_entry *free_entry_list;
-
-#if USE_OBSTACK
- /* Whenever obstacks are used, it is possible to allocate all overflowed
- entries into a single stack, so they all can be freed in a single
- operation. It is not clear if the speedup is worth the trouble. */
- struct obstack entry_stack;
-#endif
- };
-
-/* A hash table contains many internal entries, each holding a pointer to
- some user provided data (also called a user entry). An entry indistinctly
- refers to both the internal entry and its associated user entry. A user
- entry contents may be hashed by a randomization function (the hashing
- function, or just `hasher' for short) into a number (or `slot') between 0
- and the current table size. At each slot position in the hash table,
- starts a linked chain of entries for which the user data all hash to this
- slot. A bucket is the collection of all entries hashing to the same slot.
-
- A good `hasher' function will distribute entries rather evenly in buckets.
- In the ideal case, the length of each bucket is roughly the number of
- entries divided by the table size. Finding the slot for a data is usually
- done in constant time by the `hasher', and the later finding of a precise
- entry is linear in time with the size of the bucket. Consequently, a
- larger hash table size (that is, a larger number of buckets) is prone to
- yielding shorter chains, *given* the `hasher' function behaves properly.
-
- Long buckets slow down the lookup algorithm. One might use big hash table
- sizes in hope to reduce the average length of buckets, but this might
- become inordinate, as unused slots in the hash table take some space. The
- best bet is to make sure you are using a good `hasher' function (beware
- that those are not that easy to write! :-), and to use a table size
- larger than the actual number of entries. */
-
-/* If an insertion makes the ratio of nonempty buckets to table size larger
- than the growth threshold (a number between 0.0 and 1.0), then increase
- the table size by multiplying by the growth factor (a number greater than
- 1.0). The growth threshold defaults to 0.8, and the growth factor
- defaults to 1.414, meaning that the table will have doubled its size
- every second time 80% of the buckets get used. */
-#define DEFAULT_GROWTH_THRESHOLD 0.8
-#define DEFAULT_GROWTH_FACTOR 1.414
-
-/* If a deletion empties a bucket and causes the ratio of used buckets to
- table size to become smaller than the shrink threshold (a number between
- 0.0 and 1.0), then shrink the table by multiplying by the shrink factor (a
- number greater than the shrink threshold but smaller than 1.0). The shrink
- threshold and factor default to 0.0 and 1.0, meaning that the table never
- shrinks. */
-#define DEFAULT_SHRINK_THRESHOLD 0.0
-#define DEFAULT_SHRINK_FACTOR 1.0
-
-/* Use this to initialize or reset a TUNING structure to
- some sensible values. */
-static const Hash_tuning default_tuning =
- {
- DEFAULT_SHRINK_THRESHOLD,
- DEFAULT_SHRINK_FACTOR,
- DEFAULT_GROWTH_THRESHOLD,
- DEFAULT_GROWTH_FACTOR,
- false
- };
-
-/* Information and lookup. */
-
-/* The following few functions provide information about the overall hash
- table organization: the number of entries, number of buckets and maximum
- length of buckets. */
-
-/* Return the number of buckets in the hash table. The table size, the total
- number of buckets (used plus unused), or the maximum number of slots, are
- the same quantity. */
-
-size_t
-hash_get_n_buckets (const Hash_table *table)
-{
- return table->n_buckets;
-}
-
-/* Return the number of slots in use (non-empty buckets). */
-
-size_t
-hash_get_n_buckets_used (const Hash_table *table)
-{
- return table->n_buckets_used;
-}
-
-/* Return the number of active entries. */
-
-size_t
-hash_get_n_entries (const Hash_table *table)
-{
- return table->n_entries;
-}
-
-/* Return the length of the longest chain (bucket). */
-
-size_t
-hash_get_max_bucket_length (const Hash_table *table)
-{
- struct hash_entry const *bucket;
- size_t max_bucket_length = 0;
-
- for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
- {
- if (bucket->data)
- {
- struct hash_entry const *cursor = bucket;
- size_t bucket_length = 1;
-
- while (cursor = cursor->next, cursor)
- bucket_length++;
-
- if (bucket_length > max_bucket_length)
- max_bucket_length = bucket_length;
- }
- }
-
- return max_bucket_length;
-}
-
-/* Do a mild validation of a hash table, by traversing it and checking two
- statistics. */
-
-bool
-hash_table_ok (const Hash_table *table)
-{
- struct hash_entry const *bucket;
- size_t n_buckets_used = 0;
- size_t n_entries = 0;
-
- for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
- {
- if (bucket->data)
- {
- struct hash_entry const *cursor = bucket;
-
- /* Count bucket head. */
- n_buckets_used++;
- n_entries++;
-
- /* Count bucket overflow. */
- while (cursor = cursor->next, cursor)
- n_entries++;
- }
- }
-
- if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries)
- return true;
-
- return false;
-}
-
-void
-hash_print_statistics (const Hash_table *table, FILE *stream)
-{
- size_t n_entries = hash_get_n_entries (table);
- size_t n_buckets = hash_get_n_buckets (table);
- size_t n_buckets_used = hash_get_n_buckets_used (table);
- size_t max_bucket_length = hash_get_max_bucket_length (table);
-
- fprintf (stream, "# entries: %lu\n", (unsigned long int) n_entries);
- fprintf (stream, "# buckets: %lu\n", (unsigned long int) n_buckets);
- fprintf (stream, "# buckets used: %lu (%.2f%%)\n",
- (unsigned long int) n_buckets_used,
- (100.0 * n_buckets_used) / n_buckets);
- fprintf (stream, "max bucket length: %lu\n",
- (unsigned long int) max_bucket_length);
-}
-
-/* If ENTRY matches an entry already in the hash table, return the
- entry from the table. Otherwise, return NULL. */
-
-void *
-hash_lookup (const Hash_table *table, const void *entry)
-{
- struct hash_entry const *bucket
- = table->bucket + table->hasher (entry, table->n_buckets);
- struct hash_entry const *cursor;
-
- if (! (bucket < table->bucket_limit))
- abort ();
-
- if (bucket->data == NULL)
- return NULL;
-
- for (cursor = bucket; cursor; cursor = cursor->next)
- if (table->comparator (entry, cursor->data))
- return cursor->data;
-
- return NULL;
-}
-
-/* Walking. */
-
-/* The functions in this page traverse the hash table and process the
- contained entries. For the traversal to work properly, the hash table
- should not be resized nor modified while any particular entry is being
- processed. In particular, entries should not be added or removed. */
-
-/* Return the first data in the table, or NULL if the table is empty. */
-
-void *
-hash_get_first (const Hash_table *table)
-{
- struct hash_entry const *bucket;
-
- if (table->n_entries == 0)
- return NULL;
-
- for (bucket = table->bucket; ; bucket++)
- if (! (bucket < table->bucket_limit))
- abort ();
- else if (bucket->data)
- return bucket->data;
-}
-
-/* Return the user data for the entry following ENTRY, where ENTRY has been
- returned by a previous call to either `hash_get_first' or `hash_get_next'.
- Return NULL if there are no more entries. */
-
-void *
-hash_get_next (const Hash_table *table, const void *entry)
-{
- struct hash_entry const *bucket
- = table->bucket + table->hasher (entry, table->n_buckets);
- struct hash_entry const *cursor;
-
- if (! (bucket < table->bucket_limit))
- abort ();
-
- /* Find next entry in the same bucket. */
- for (cursor = bucket; cursor; cursor = cursor->next)
- if (cursor->data == entry && cursor->next)
- return cursor->next->data;
-
- /* Find first entry in any subsequent bucket. */
- while (++bucket < table->bucket_limit)
- if (bucket->data)
- return bucket->data;
-
- /* None found. */
- return NULL;
-}
-
-/* Fill BUFFER with pointers to active user entries in the hash table, then
- return the number of pointers copied. Do not copy more than BUFFER_SIZE
- pointers. */
-
-size_t
-hash_get_entries (const Hash_table *table, void **buffer,
- size_t buffer_size)
-{
- size_t counter = 0;
- struct hash_entry const *bucket;
- struct hash_entry const *cursor;
-
- for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
- {
- if (bucket->data)
- {
- for (cursor = bucket; cursor; cursor = cursor->next)
- {
- if (counter >= buffer_size)
- return counter;
- buffer[counter++] = cursor->data;
- }
- }
- }
-
- return counter;
-}
-
-/* Call a PROCESSOR function for each entry of a hash table, and return the
- number of entries for which the processor function returned success. A
- pointer to some PROCESSOR_DATA which will be made available to each call to
- the processor function. The PROCESSOR accepts two arguments: the first is
- the user entry being walked into, the second is the value of PROCESSOR_DATA
- as received. The walking continue for as long as the PROCESSOR function
- returns nonzero. When it returns zero, the walking is interrupted. */
-
-size_t
-hash_do_for_each (const Hash_table *table, Hash_processor processor,
- void *processor_data)
-{
- size_t counter = 0;
- struct hash_entry const *bucket;
- struct hash_entry const *cursor;
-
- for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
- {
- if (bucket->data)
- {
- for (cursor = bucket; cursor; cursor = cursor->next)
- {
- if (!(*processor) (cursor->data, processor_data))
- return counter;
- counter++;
- }
- }
- }
-
- return counter;
-}
-
-/* Allocation and clean-up. */
-
-/* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1.
- This is a convenience routine for constructing other hashing functions. */
-
-#if USE_DIFF_HASH
-
-/* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see
- B. J. McKenzie, R. Harries & T. Bell, Selecting a hashing algorithm,
- Software--practice & experience 20, 2 (Feb 1990), 209-224. Good hash
- algorithms tend to be domain-specific, so what's good for [diffutils'] io.c
- may not be good for your application." */
-
-size_t
-hash_string (const char *string, size_t n_buckets)
-{
-# define ROTATE_LEFT(Value, Shift) \
- ((Value) << (Shift) | (Value) >> ((sizeof (size_t) * CHAR_BIT) - (Shift)))
-# define HASH_ONE_CHAR(Value, Byte) \
- ((Byte) + ROTATE_LEFT (Value, 7))
-
- size_t value = 0;
- unsigned char ch;
-
- for (; (ch = *string); string++)
- value = HASH_ONE_CHAR (value, ch);
- return value % n_buckets;
-
-# undef ROTATE_LEFT
-# undef HASH_ONE_CHAR
-}
-
-#else /* not USE_DIFF_HASH */
-
-/* This one comes from `recode', and performs a bit better than the above as
- per a few experiments. It is inspired from a hashing routine found in the
- very old Cyber `snoop', itself written in typical Greg Mansfield style.
- (By the way, what happened to this excellent man? Is he still alive?) */
-
-size_t
-hash_string (const char *string, size_t n_buckets)
-{
- size_t value = 0;
- unsigned char ch;
-
- for (; (ch = *string); string++)
- value = (value * 31 + ch) % n_buckets;
- return value;
-}
-
-#endif /* not USE_DIFF_HASH */
-
-/* Return true if CANDIDATE is a prime number. CANDIDATE should be an odd
- number at least equal to 11. */
-
-static bool
-is_prime (size_t candidate)
-{
- size_t divisor = 3;
- size_t square = divisor * divisor;
-
- while (square < candidate && (candidate % divisor))
- {
- divisor++;
- square += 4 * divisor;
- divisor++;
- }
-
- return (candidate % divisor ? true : false);
-}
-
-/* Round a given CANDIDATE number up to the nearest prime, and return that
- prime. Primes lower than 10 are merely skipped. */
-
-static size_t
-next_prime (size_t candidate)
-{
- /* Skip small primes. */
- if (candidate < 10)
- candidate = 10;
-
- /* Make it definitely odd. */
- candidate |= 1;
-
- while (!is_prime (candidate))
- candidate += 2;
-
- return candidate;
-}
-
-void
-hash_reset_tuning (Hash_tuning *tuning)
-{
- *tuning = default_tuning;
-}
-
-/* For the given hash TABLE, check the user supplied tuning structure for
- reasonable values, and return true if there is no gross error with it.
- Otherwise, definitively reset the TUNING field to some acceptable default
- in the hash table (that is, the user loses the right of further modifying
- tuning arguments), and return false. */
-
-static bool
-check_tuning (Hash_table *table)
-{
- const Hash_tuning *tuning = table->tuning;
-
- /* Be a bit stricter than mathematics would require, so that
- rounding errors in size calculations do not cause allocations to
- fail to grow or shrink as they should. The smallest allocation
- is 11 (due to next_prime's algorithm), so an epsilon of 0.1
- should be good enough. */
- float epsilon = 0.1f;
-
- if (epsilon < tuning->growth_threshold
- && tuning->growth_threshold < 1 - epsilon
- && 1 + epsilon < tuning->growth_factor
- && 0 <= tuning->shrink_threshold
- && tuning->shrink_threshold + epsilon < tuning->shrink_factor
- && tuning->shrink_factor <= 1
- && tuning->shrink_threshold + epsilon < tuning->growth_threshold)
- return true;
-
- table->tuning = &default_tuning;
- return false;
-}
-
-/* Allocate and return a new hash table, or NULL upon failure. The initial
- number of buckets is automatically selected so as to _guarantee_ that you
- may insert at least CANDIDATE different user entries before any growth of
- the hash table size occurs. So, if have a reasonably tight a-priori upper
- bound on the number of entries you intend to insert in the hash table, you
- may save some table memory and insertion time, by specifying it here. If
- the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
- argument has its meaning changed to the wanted number of buckets.
-
- TUNING points to a structure of user-supplied values, in case some fine
- tuning is wanted over the default behavior of the hasher. If TUNING is
- NULL, the default tuning parameters are used instead.
-
- The user-supplied HASHER function should be provided. It accepts two
- arguments ENTRY and TABLE_SIZE. It computes, by hashing ENTRY contents, a
- slot number for that entry which should be in the range 0..TABLE_SIZE-1.
- This slot number is then returned.
-
- The user-supplied COMPARATOR function should be provided. It accepts two
- arguments pointing to user data, it then returns true for a pair of entries
- that compare equal, or false otherwise. This function is internally called
- on entries which are already known to hash to the same bucket index.
-
- The user-supplied DATA_FREER function, when not NULL, may be later called
- with the user data as an argument, just before the entry containing the
- data gets freed. This happens from within `hash_free' or `hash_clear'.
- You should specify this function only if you want these functions to free
- all of your `data' data. This is typically the case when your data is
- simply an auxiliary struct that you have malloc'd to aggregate several
- values. */
-
-Hash_table *
-hash_initialize (size_t candidate, const Hash_tuning *tuning,
- Hash_hasher hasher, Hash_comparator comparator,
- Hash_data_freer data_freer)
-{
- Hash_table *table;
-
- if (hasher == NULL || comparator == NULL)
- return NULL;
-
- table = malloc (sizeof *table);
- if (table == NULL)
- return NULL;
-
- if (!tuning)
- tuning = &default_tuning;
- table->tuning = tuning;
- if (!check_tuning (table))
- {
- /* Fail if the tuning options are invalid. This is the only occasion
- when the user gets some feedback about it. Once the table is created,
- if the user provides invalid tuning options, we silently revert to
- using the defaults, and ignore further request to change the tuning
- options. */
- goto fail;
- }
-
- if (!tuning->is_n_buckets)
- {
- float new_candidate = candidate / tuning->growth_threshold;
- if (SIZE_MAX <= new_candidate)
- goto fail;
- candidate = new_candidate;
- }
-
- if (xalloc_oversized (candidate, sizeof *table->bucket))
- goto fail;
- table->n_buckets = next_prime (candidate);
- if (xalloc_oversized (table->n_buckets, sizeof *table->bucket))
- goto fail;
-
- table->bucket = calloc (table->n_buckets, sizeof *table->bucket);
- table->bucket_limit = table->bucket + table->n_buckets;
- table->n_buckets_used = 0;
- table->n_entries = 0;
-
- table->hasher = hasher;
- table->comparator = comparator;
- table->data_freer = data_freer;
-
- table->free_entry_list = NULL;
-#if USE_OBSTACK
- obstack_init (&table->entry_stack);
-#endif
- return table;
-
- fail:
- free (table);
- return NULL;
-}
-
-/* Make all buckets empty, placing any chained entries on the free list.
- Apply the user-specified function data_freer (if any) to the datas of any
- affected entries. */
-
-void
-hash_clear (Hash_table *table)
-{
- struct hash_entry *bucket;
-
- for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
- {
- if (bucket->data)
- {
- struct hash_entry *cursor;
- struct hash_entry *next;
-
- /* Free the bucket overflow. */
- for (cursor = bucket->next; cursor; cursor = next)
- {
- if (table->data_freer)
- (*table->data_freer) (cursor->data);
- cursor->data = NULL;
-
- next = cursor->next;
- /* Relinking is done one entry at a time, as it is to be expected
- that overflows are either rare or short. */
- cursor->next = table->free_entry_list;
- table->free_entry_list = cursor;
- }
-
- /* Free the bucket head. */
- if (table->data_freer)
- (*table->data_freer) (bucket->data);
- bucket->data = NULL;
- bucket->next = NULL;
- }
- }
-
- table->n_buckets_used = 0;
- table->n_entries = 0;
-}
-
-/* Reclaim all storage associated with a hash table. If a data_freer
- function has been supplied by the user when the hash table was created,
- this function applies it to the data of each entry before freeing that
- entry. */
-
-void
-hash_free (Hash_table *table)
-{
- struct hash_entry *bucket;
- struct hash_entry *cursor;
- struct hash_entry *next;
-
- /* Call the user data_freer function. */
- if (table->data_freer && table->n_entries)
- {
- for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
- {
- if (bucket->data)
- {
- for (cursor = bucket; cursor; cursor = cursor->next)
- {
- (*table->data_freer) (cursor->data);
- }
- }
- }
- }
-
-#if USE_OBSTACK
-
- obstack_free (&table->entry_stack, NULL);
-
-#else
-
- /* Free all bucket overflowed entries. */
- for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
- {
- for (cursor = bucket->next; cursor; cursor = next)
- {
- next = cursor->next;
- free (cursor);
- }
- }
-
- /* Also reclaim the internal list of previously freed entries. */
- for (cursor = table->free_entry_list; cursor; cursor = next)
- {
- next = cursor->next;
- free (cursor);
- }
-
-#endif
-
- /* Free the remainder of the hash table structure. */
- free (table->bucket);
- free (table);
-}
-
-/* Insertion and deletion. */
-
-/* Get a new hash entry for a bucket overflow, possibly by reclying a
- previously freed one. If this is not possible, allocate a new one. */
-
-static struct hash_entry *
-allocate_entry (Hash_table *table)
-{
- struct hash_entry *new;
-
- if (table->free_entry_list)
- {
- new = table->free_entry_list;
- table->free_entry_list = new->next;
- }
- else
- {
-#if USE_OBSTACK
- new = obstack_alloc (&table->entry_stack, sizeof *new);
-#else
- new = malloc (sizeof *new);
-#endif
- }
-
- return new;
-}
-
-/* Free a hash entry which was part of some bucket overflow,
- saving it for later recycling. */
-
-static void
-free_entry (Hash_table *table, struct hash_entry *entry)
-{
- entry->data = NULL;
- entry->next = table->free_entry_list;
- table->free_entry_list = entry;
-}
-
-/* This private function is used to help with insertion and deletion. When
- ENTRY matches an entry in the table, return a pointer to the corresponding
- user data and set *BUCKET_HEAD to the head of the selected bucket.
- Otherwise, return NULL. When DELETE is true and ENTRY matches an entry in
- the table, unlink the matching entry. */
-
-static void *
-hash_find_entry (Hash_table *table, const void *entry,
- struct hash_entry **bucket_head, bool delete)
-{
- struct hash_entry *bucket
- = table->bucket + table->hasher (entry, table->n_buckets);
- struct hash_entry *cursor;
-
- if (! (bucket < table->bucket_limit))
- abort ();
-
- *bucket_head = bucket;
-
- /* Test for empty bucket. */
- if (bucket->data == NULL)
- return NULL;
-
- /* See if the entry is the first in the bucket. */
- if ((*table->comparator) (entry, bucket->data))
- {
- void *data = bucket->data;
-
- if (delete)
- {
- if (bucket->next)
- {
- struct hash_entry *next = bucket->next;
-
- /* Bump the first overflow entry into the bucket head, then save
- the previous first overflow entry for later recycling. */
- *bucket = *next;
- free_entry (table, next);
- }
- else
- {
- bucket->data = NULL;
- }
- }
-
- return data;
- }
-
- /* Scan the bucket overflow. */
- for (cursor = bucket; cursor->next; cursor = cursor->next)
- {
- if ((*table->comparator) (entry, cursor->next->data))
- {
- void *data = cursor->next->data;
-
- if (delete)
- {
- struct hash_entry *next = cursor->next;
-
- /* Unlink the entry to delete, then save the freed entry for later
- recycling. */
- cursor->next = next->next;
- free_entry (table, next);
- }
-
- return data;
- }
- }
-
- /* No entry found. */
- return NULL;
-}
-
-/* For an already existing hash table, change the number of buckets through
- specifying CANDIDATE. The contents of the hash table are preserved. The
- new number of buckets is automatically selected so as to _guarantee_ that
- the table may receive at least CANDIDATE different user entries, including
- those already in the table, before any other growth of the hash table size
- occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
- exact number of buckets desired. */
-
-bool
-hash_rehash (Hash_table *table, size_t candidate)
-{
- Hash_table *new_table;
- struct hash_entry *bucket;
- struct hash_entry *cursor;
- struct hash_entry *next;
-
- new_table = hash_initialize (candidate, table->tuning, table->hasher,
- table->comparator, table->data_freer);
- if (new_table == NULL)
- return false;
-
- /* Merely reuse the extra old space into the new table. */
-#if USE_OBSTACK
- obstack_free (&new_table->entry_stack, NULL);
- new_table->entry_stack = table->entry_stack;
-#endif
- new_table->free_entry_list = table->free_entry_list;
-
- for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
- if (bucket->data)
- for (cursor = bucket; cursor; cursor = next)
- {
- void *data = cursor->data;
- struct hash_entry *new_bucket
- = (new_table->bucket
- + new_table->hasher (data, new_table->n_buckets));
-
- if (! (new_bucket < new_table->bucket_limit))
- abort ();
-
- next = cursor->next;
-
- if (new_bucket->data)
- {
- if (cursor == bucket)
- {
- /* Allocate or recycle an entry, when moving from a bucket
- header into a bucket overflow. */
- struct hash_entry *new_entry = allocate_entry (new_table);
-
- if (new_entry == NULL)
- return false;
-
- new_entry->data = data;
- new_entry->next = new_bucket->next;
- new_bucket->next = new_entry;
- }
- else
- {
- /* Merely relink an existing entry, when moving from a
- bucket overflow into a bucket overflow. */
- cursor->next = new_bucket->next;
- new_bucket->next = cursor;
- }
- }
- else
- {
- /* Free an existing entry, when moving from a bucket
- overflow into a bucket header. Also take care of the
- simple case of moving from a bucket header into a bucket
- header. */
- new_bucket->data = data;
- new_table->n_buckets_used++;
- if (cursor != bucket)
- free_entry (new_table, cursor);
- }
- }
-
- free (table->bucket);
- table->bucket = new_table->bucket;
- table->bucket_limit = new_table->bucket_limit;
- table->n_buckets = new_table->n_buckets;
- table->n_buckets_used = new_table->n_buckets_used;
- table->free_entry_list = new_table->free_entry_list;
- /* table->n_entries already holds its value. */
-#if USE_OBSTACK
- table->entry_stack = new_table->entry_stack;
-#endif
- free (new_table);
-
- return true;
-}
-
-/* If ENTRY matches an entry already in the hash table, return the pointer
- to the entry from the table. Otherwise, insert ENTRY and return ENTRY.
- Return NULL if the storage required for insertion cannot be allocated. */
-
-void *
-hash_insert (Hash_table *table, const void *entry)
-{
- void *data;
- struct hash_entry *bucket;
-
- /* The caller cannot insert a NULL entry. */
- if (! entry)
- abort ();
-
- /* If there's a matching entry already in the table, return that. */
- if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL)
- return data;
-
- /* ENTRY is not matched, it should be inserted. */
-
- if (bucket->data)
- {
- struct hash_entry *new_entry = allocate_entry (table);
-
- if (new_entry == NULL)
- return NULL;
-
- /* Add ENTRY in the overflow of the bucket. */
-
- new_entry->data = (void *) entry;
- new_entry->next = bucket->next;
- bucket->next = new_entry;
- table->n_entries++;
- return (void *) entry;
- }
-
- /* Add ENTRY right in the bucket head. */
-
- bucket->data = (void *) entry;
- table->n_entries++;
- table->n_buckets_used++;
-
- /* If the growth threshold of the buckets in use has been reached, increase
- the table size and rehash. There's no point in checking the number of
- entries: if the hashing function is ill-conditioned, rehashing is not
- likely to improve it. */
-
- if (table->n_buckets_used
- > table->tuning->growth_threshold * table->n_buckets)
- {
- /* Check more fully, before starting real work. If tuning arguments
- became invalid, the second check will rely on proper defaults. */
- check_tuning (table);
- if (table->n_buckets_used
- > table->tuning->growth_threshold * table->n_buckets)
- {
- const Hash_tuning *tuning = table->tuning;
- float candidate =
- (tuning->is_n_buckets
- ? (table->n_buckets * tuning->growth_factor)
- : (table->n_buckets * tuning->growth_factor
- * tuning->growth_threshold));
-
- if (SIZE_MAX <= candidate)
- return NULL;
-
- /* If the rehash fails, arrange to return NULL. */
- if (!hash_rehash (table, candidate))
- entry = NULL;
- }
- }
-
- return (void *) entry;
-}
-
-/* If ENTRY is already in the table, remove it and return the just-deleted
- data (the user may want to deallocate its storage). If ENTRY is not in the
- table, don't modify the table and return NULL. */
-
-void *
-hash_delete (Hash_table *table, const void *entry)
-{
- void *data;
- struct hash_entry *bucket;
-
- data = hash_find_entry (table, entry, &bucket, true);
- if (!data)
- return NULL;
-
- table->n_entries--;
- if (!bucket->data)
- {
- table->n_buckets_used--;
-
- /* If the shrink threshold of the buckets in use has been reached,
- rehash into a smaller table. */
-
- if (table->n_buckets_used
- < table->tuning->shrink_threshold * table->n_buckets)
- {
- /* Check more fully, before starting real work. If tuning arguments
- became invalid, the second check will rely on proper defaults. */
- check_tuning (table);
- if (table->n_buckets_used
- < table->tuning->shrink_threshold * table->n_buckets)
- {
- const Hash_tuning *tuning = table->tuning;
- size_t candidate =
- (tuning->is_n_buckets
- ? table->n_buckets * tuning->shrink_factor
- : (table->n_buckets * tuning->shrink_factor
- * tuning->growth_threshold));
-
- hash_rehash (table, candidate);
- }
- }
- }
-
- return data;
-}
-
-/* Testing. */
-
-#if TESTING
-
-void
-hash_print (const Hash_table *table)
-{
- struct hash_entry const *bucket;
-
- for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
- {
- struct hash_entry *cursor;
-
- if (bucket)
- printf ("%lu:\n", (unsigned long int) (bucket - table->bucket));
-
- for (cursor = bucket; cursor; cursor = cursor->next)
- {
- char const *s = cursor->data;
- /* FIXME */
- if (s)
- printf (" %s\n", s);
- }
- }
-}
-
-#endif /* TESTING */
--- contrib/cpio/src/.deps/copyin.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/copyout.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/idcache.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/dstring.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/defer.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/userspec.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/global.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/makepath.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/main.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/mt.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/tar.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/util.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/copypass.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
--- contrib/cpio/src/.deps/filemode.Po
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
More information about the Midnightbsd-cvs
mailing list