mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
177 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d10eb8b1e | ||
|
|
c0a121c9bc | ||
|
|
c9e4ea6ee2 | ||
|
|
819265b8be | ||
|
|
a9b904a282 | ||
|
|
7dc398a30f | ||
|
|
8fc12909f6 | ||
|
|
1777d0dfe3 | ||
|
|
56fce1aed7 | ||
|
|
36cc6ac787 | ||
|
|
62dd4b63c5 | ||
|
|
3a1595a3fb | ||
|
|
f8291d0ec4 | ||
|
|
05bee6f116 | ||
|
|
584e38d8b3 | ||
|
|
c420cfef77 | ||
|
|
be9a42e7ac | ||
|
|
20a5a60c61 | ||
|
|
0ba945b050 | ||
|
|
8c4b6ba09b | ||
|
|
ac6feeb9f2 | ||
|
|
ef5758c328 | ||
|
|
0a9302e7f7 | ||
|
|
9e66806e28 | ||
|
|
f6b2f46714 | ||
|
|
f267926f2d | ||
|
|
6f6f599867 | ||
|
|
2dc09bf809 | ||
|
|
98dacf492e | ||
|
|
b48a444e35 | ||
|
|
6416762b73 | ||
|
|
a8fc4edca5 | ||
|
|
3f7091359a | ||
|
|
0f5dc96354 | ||
|
|
5ef03d6c5b | ||
|
|
8915368ee3 | ||
|
|
b4f9559537 | ||
|
|
88d4b3461e | ||
|
|
4c38625ef3 | ||
|
|
946359f101 | ||
|
|
9f793def3c | ||
|
|
628a5e16dd | ||
|
|
773d15a702 | ||
|
|
c872a1d8a5 | ||
|
|
dfe0d336a0 | ||
|
|
3dcbcf98f4 | ||
|
|
dd9df4ab02 | ||
|
|
54158a45fa | ||
|
|
da2f637888 | ||
|
|
cab29edcf1 | ||
|
|
b44d4b6b0e | ||
|
|
d75820e516 | ||
|
|
46e0137277 | ||
|
|
c403c31e88 | ||
|
|
4edb86215d | ||
|
|
64bc4f20e8 | ||
|
|
141645d9c6 | ||
|
|
0c31cdc2d1 | ||
|
|
4323ed2bde | ||
|
|
c971ed9377 | ||
|
|
998fe29301 | ||
|
|
612c2c95c3 | ||
|
|
a7b4fa01dd | ||
|
|
dae35bac98 | ||
|
|
168a6b6a0f | ||
|
|
59e2e55d0f | ||
|
|
2590389aab | ||
|
|
9a6c97eb29 | ||
|
|
0b5bd805bd | ||
|
|
f5268e2749 | ||
|
|
cba49d57da | ||
|
|
a2f81776ad | ||
|
|
11d84c10ce | ||
|
|
58c98f2342 | ||
|
|
7ae60bf26f | ||
|
|
d4de2dc83a | ||
|
|
45b46f4951 | ||
|
|
9f650d0870 | ||
|
|
ed509250a2 | ||
|
|
543696a9af | ||
|
|
86573d33a7 | ||
|
|
cea6d15720 | ||
|
|
69cc8d5cb7 | ||
|
|
dd2253f49d | ||
|
|
f53a0e1062 | ||
|
|
628b1d5e7e | ||
|
|
f86bb6967d | ||
|
|
819aa9eba7 | ||
|
|
86914603b5 | ||
|
|
6e8f368e07 | ||
|
|
5d43617e8a | ||
|
|
5d4952059f | ||
|
|
c7ecdb0fcb | ||
|
|
aad0bde0b5 | ||
|
|
0caead1ea0 | ||
|
|
9c566ad04a | ||
|
|
3e8586bc54 | ||
|
|
014fead953 | ||
|
|
e489fd04d6 | ||
|
|
31423c76e8 | ||
|
|
cd349fdca2 | ||
|
|
eccf54368f | ||
|
|
7ba0e90c55 | ||
|
|
954ef23ed9 | ||
|
|
e55d882811 | ||
|
|
f28c7d959b | ||
|
|
3b498ba141 | ||
|
|
39243f0ea8 | ||
|
|
a4da48c4f5 | ||
|
|
d89755469b | ||
|
|
b81cdbf31e | ||
|
|
0a6bbb5947 | ||
|
|
6beca4248f | ||
|
|
37b8bfda56 | ||
|
|
21a6a7f64c | ||
|
|
6454dd0f2f | ||
|
|
d0f18197fc | ||
|
|
21f4da0fb9 | ||
|
|
201ba1a203 | ||
|
|
e06e7a8331 | ||
|
|
67d3e26350 | ||
|
|
72a0a8264d | ||
|
|
f52d939014 | ||
|
|
7a1f69aae0 | ||
|
|
bbdc929602 | ||
|
|
4db2f5c6bc | ||
|
|
be6c13e7e0 | ||
|
|
dc0f5eb6a0 | ||
|
|
0faf3bf874 | ||
|
|
b7f2b51c42 | ||
|
|
84db964925 | ||
|
|
49c5b690cb | ||
|
|
157c2bc55e | ||
|
|
1aa17dc89b | ||
|
|
6c8d432b1f | ||
|
|
f1ab2e0227 | ||
|
|
4668ae8f06 | ||
|
|
b0782cb9ea | ||
|
|
f428e548e5 | ||
|
|
7e0c2b9a59 | ||
|
|
7f9e164d27 | ||
|
|
d3a4bc86cd | ||
|
|
fe062d563a | ||
|
|
2ead2365e0 | ||
|
|
2024418dc4 | ||
|
|
fd93fc3ef4 | ||
|
|
bd26efaaa3 | ||
|
|
07f15147eb | ||
|
|
ed86ca7c5e | ||
|
|
4b2b2711d9 | ||
|
|
66b15949df | ||
|
|
3d09e31e07 | ||
|
|
67bfde6668 | ||
|
|
a0d5d53a30 | ||
|
|
8506d9adb6 | ||
|
|
c85ad43ef4 | ||
|
|
8d2ecd4a3e | ||
|
|
11dc0016bb | ||
|
|
53db8d6479 | ||
|
|
4b449caf2d | ||
|
|
d98b1b35a6 | ||
|
|
01e4f003a0 | ||
|
|
54dcfab190 | ||
|
|
3593cf50b2 | ||
|
|
d64c186d8e | ||
|
|
bfcfc0ce72 | ||
|
|
bf01ac3004 | ||
|
|
5519ba24b5 | ||
|
|
e4c4d77f84 | ||
|
|
c149538652 | ||
|
|
6ee02e3d83 | ||
|
|
207a978e64 | ||
|
|
0291966175 | ||
|
|
d9ba885974 | ||
|
|
96047b77ec | ||
|
|
5a514de955 | ||
|
|
a0000ba4ae |
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
*.I[12]
|
||||
*.[EIOX]
|
||||
*.bak
|
||||
*.o
|
||||
*/.deps
|
||||
*~
|
||||
@@ -39,23 +40,27 @@ coreutils-*.tar.bz2
|
||||
coreutils-*.tar.bz2.sig
|
||||
coreutils-*.tar.gz
|
||||
coreutils-*.tar.gz.sig
|
||||
coreutils-*.tar.lzma
|
||||
coreutils-*.tar.lzma.sig
|
||||
coreutils-*.tar.xz
|
||||
coreutils-*.tar.xz.sig
|
||||
gnulib-tests
|
||||
lib/.cvsignore
|
||||
lib/.gitignore
|
||||
lib/arg-nonnull.h
|
||||
lib/arpa
|
||||
lib/binary-io.h
|
||||
lib/charset.alias
|
||||
lib/configmake.h
|
||||
lib/glthread
|
||||
lib/libcoreutils.a
|
||||
lib/link-warning.h
|
||||
lib/printf.c
|
||||
lib/progname.c
|
||||
lib/progname.h
|
||||
lib/selinux
|
||||
lib/unistr
|
||||
lib/uniwidth
|
||||
lib/unused-parameter.h
|
||||
lib/warn-on-use.h
|
||||
m4/.cvsignore
|
||||
m4/.gitignore
|
||||
maint.mk
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.1
|
||||
8.4
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Suppress valgrind diagnostics we don't care about.
|
||||
|
||||
# Copyright (C) 2003, 2004, 2006-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2004, 2006-2010 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
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
gl/lib/randint.c
|
||||
lib/euidaccess-stat.c
|
||||
gl/tests/test-mbsalign.c
|
||||
|
||||
1
.x-sc_prohibit_empty_lines_at_EOF
Normal file
1
.x-sc_prohibit_empty_lines_at_EOF
Normal file
@@ -0,0 +1 @@
|
||||
^tests/pr/
|
||||
@@ -1,3 +1,2 @@
|
||||
configure.ac
|
||||
*.m4
|
||||
ChangeLog*
|
||||
|
||||
@@ -11609,7 +11609,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2005, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -4033,7 +4033,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -4015,7 +4015,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -372,7 +372,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2008-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2008-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
109
HACKING
109
HACKING
@@ -233,6 +233,107 @@ Try to make the summary line fit one of the following forms:
|
||||
maint: change-description
|
||||
|
||||
|
||||
Curly braces: use judiciously
|
||||
=============================
|
||||
Omit the curly braces around an "if", "while", "for" etc. body only when
|
||||
that body occupies a single line. In every other case we require the braces.
|
||||
This ensures that it is trivially easy to identify a single-*statement* loop:
|
||||
each has only one *line* in its body.
|
||||
|
||||
Omitting braces with a single-line body is fine:
|
||||
|
||||
while (expr)
|
||||
single_line_stmt ();
|
||||
|
||||
However, the moment your loop/if/else body extends onto a second line,
|
||||
for whatever reason (even if it's just an added comment), then you should
|
||||
add braces. Otherwise, it would be too easy to insert a statement just
|
||||
before that comment (without adding braces), thinking it is already a
|
||||
multi-statement loop:
|
||||
|
||||
while (true)
|
||||
/* comment... */ // BAD: multi-line body without braces
|
||||
single_line_stmt ();
|
||||
|
||||
Do this instead:
|
||||
|
||||
while (true)
|
||||
{ /* Always put braces around a multi-line body. */
|
||||
/* explanation... */
|
||||
single_line_stmt ();
|
||||
}
|
||||
|
||||
There is one exception: when the second body line is not at the same
|
||||
indentation level as the first body line.
|
||||
|
||||
if (expr)
|
||||
error (0, 0, _("a diagnostic that would make this line"
|
||||
" extend past the 80-column limit"));
|
||||
|
||||
It is safe to omit the braces in the code above, since the
|
||||
further-indented second body line makes it obvious that this is still
|
||||
a single-statement body.
|
||||
|
||||
To reiterate, don't do this:
|
||||
|
||||
if (expr)
|
||||
while (expr_2) // BAD: multi-line body without braces
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
Do this, instead:
|
||||
|
||||
if (expr)
|
||||
{
|
||||
while (expr_2)
|
||||
{
|
||||
...
|
||||
}
|
||||
}
|
||||
|
||||
However, there is one exception in the other direction, when even a
|
||||
one-line block should have braces. That occurs when that one-line,
|
||||
brace-less block is an "else" block, and the corresponding "then" block
|
||||
*does* use braces. In that case, either put braces around the "else"
|
||||
block, or negate the "if"-condition and swap the bodies, putting the
|
||||
one-line block first and making the longer, multi-line block be the
|
||||
"else" block.
|
||||
|
||||
if (expr)
|
||||
{
|
||||
...
|
||||
...
|
||||
}
|
||||
else
|
||||
x = y; // BAD: braceless "else" with braced "then"
|
||||
|
||||
This is preferred, especially when the multi-line body is more than a
|
||||
few lines long, because it is easier to read and grasp the semantics of
|
||||
an if-then-else block when the simpler block occurs first, rather than
|
||||
after the more involved block:
|
||||
|
||||
if (!expr)
|
||||
x = y; /* more readable */
|
||||
else
|
||||
{
|
||||
...
|
||||
...
|
||||
}
|
||||
|
||||
If you'd rather not negate the condition, then add braces:
|
||||
|
||||
if (expr)
|
||||
{
|
||||
...
|
||||
...
|
||||
}
|
||||
else
|
||||
{
|
||||
x = y;
|
||||
}
|
||||
|
||||
|
||||
Use SPACE-only indentation in all[*] files
|
||||
==========================================
|
||||
We use space-only indentation in nearly all files.
|
||||
@@ -310,9 +411,9 @@ Nearly every significant change must be accompanied by a test suite
|
||||
addition that exercises it. If you fix a bug, add at least one test that
|
||||
fails without the patch, but that succeeds once your patch is applied.
|
||||
If you add a feature, add tests to exercise as much of the new code
|
||||
as possible. Note to run tests/misc/newtest in isolation you can do:
|
||||
as possible. Note to run tests/misc/new-test in isolation you can do:
|
||||
|
||||
(cd tests && make check TESTS=misc/newtest VERBOSE=yes)
|
||||
(cd tests && make check TESTS=misc/new-test VERBOSE=yes)
|
||||
|
||||
There are hundreds of tests in the tests/ directories. You can use
|
||||
tests/sample-test as a template, or one of the various Perl-based ones
|
||||
@@ -481,10 +582,10 @@ Then just open the index.html file (in the generated lcov-html directory)
|
||||
in your favorite web browser.
|
||||
|
||||
========================================================================
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009-2010 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
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts. A copy of the license is included in the ``GNU Free
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Make coreutils. -*-Makefile-*-
|
||||
|
||||
# Copyright (C) 1990, 1993-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1990, 1993-2010 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
|
||||
@@ -47,6 +47,7 @@ syntax_check_exceptions = \
|
||||
.x-sc_po_check \
|
||||
.x-sc_program_name \
|
||||
.x-sc_prohibit_atoi_atof \
|
||||
.x-sc_prohibit_empty_lines_at_EOF \
|
||||
.x-sc_prohibit_fail_0 \
|
||||
.x-sc_prohibit_magic_number_exit \
|
||||
.x-sc_prohibit_stat_st_blocks \
|
||||
|
||||
124
NEWS
124
NEWS
@@ -1,5 +1,125 @@
|
||||
GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
* Noteworthy changes in release 8.5 (2010-04-23) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
cp and mv once again support preserving extended attributes.
|
||||
[bug introduced in coreutils-8.4]
|
||||
|
||||
cp now preserves "capabilities" when also preserving file ownership.
|
||||
|
||||
ls --color once again honors the 'NORMAL' dircolors directive.
|
||||
[bug introduced in coreutils-6.11]
|
||||
|
||||
sort -M now handles abbreviated months that are aligned using blanks
|
||||
in the locale database. Also locales with 8 bit characters are
|
||||
handled correctly, including multi byte locales with the caveat
|
||||
that multi byte characters are matched case sensitively.
|
||||
|
||||
sort again handles obsolescent key formats (+POS -POS) correctly.
|
||||
Previously if -POS was specified, 1 field too many was used in the sort.
|
||||
[bug introduced in coreutils-7.2]
|
||||
|
||||
** New features
|
||||
|
||||
join now accepts the --header option, to treat the first line of each
|
||||
file as a header line to be joined and printed unconditionally.
|
||||
|
||||
timeout now accepts the --kill-after option which sends a kill
|
||||
signal to the monitored command if it's still running the specified
|
||||
duration after the initial signal was sent.
|
||||
|
||||
who: the "+/-" --mesg (-T) indicator of whether a user/tty is accepting
|
||||
messages could be incorrectly listed as "+", when in fact, the user was
|
||||
not accepting messages (mesg no). Before, who would examine only the
|
||||
permission bits, and not consider the group of the TTY device file.
|
||||
Thus, if a login tty's group would change somehow e.g., to "root",
|
||||
that would make it unwritable (via write(1)) by normal users, in spite
|
||||
of whatever the permission bits might imply. Now, when configured
|
||||
using the --with-tty-group[=NAME] option, who also compares the group
|
||||
of the TTY device with NAME (or "tty" if no group name is specified).
|
||||
|
||||
** Changes in behavior
|
||||
|
||||
ls --color no longer emits the final 3-byte color-resetting escape
|
||||
sequence when it would be a no-op.
|
||||
|
||||
join -t '' no longer emits an error and instead operates on
|
||||
each line as a whole (even if they contain NUL characters).
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.4 (2010-01-13) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
nproc --all is now guaranteed to be as large as the count
|
||||
of available processors, which may not have been the case
|
||||
on GNU/Linux systems with neither /proc nor /sys available.
|
||||
[bug introduced in coreutils-8.1]
|
||||
|
||||
** Build-related
|
||||
|
||||
Work around a build failure when using buggy <sys/capability.h>.
|
||||
Alternatively, configure with --disable-libcap.
|
||||
|
||||
Compilation would fail on systems using glibc-2.7..2.9 due to changes in
|
||||
gnulib's wchar.h that tickled a bug in at least those versions of glibc's
|
||||
own <wchar.h> header. Now, gnulib works around the bug in those older
|
||||
glibc <wchar.h> headers.
|
||||
|
||||
Building would fail with a link error (cp/copy.o) when XATTR headers
|
||||
were installed without the corresponding library. Now, configure
|
||||
detects that and disables xattr support, as one would expect.
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.3 (2010-01-07) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
cp -p, install -p, mv, and touch -c could trigger a spurious error
|
||||
message when using new glibc coupled with an old kernel.
|
||||
[bug introduced in coreutils-6.12].
|
||||
|
||||
ls -l --color no longer prints "argetm" in front of dangling
|
||||
symlinks when the 'LINK target' directive was given to dircolors.
|
||||
[bug introduced in fileutils-4.0]
|
||||
|
||||
pr's page header was improperly formatted for long file names.
|
||||
[bug introduced in coreutils-7.2]
|
||||
|
||||
rm -r --one-file-system works once again.
|
||||
The rewrite to make rm use fts introduced a regression whereby
|
||||
a commmand of the above form would fail for all subdirectories.
|
||||
[bug introduced in coreutils-8.0]
|
||||
|
||||
stat -f recognizes more file system types: k-afs, fuseblk, gfs/gfs2, ocfs2,
|
||||
and rpc_pipefs. Also Minix V3 is displayed correctly as minix3, not minux3.
|
||||
[bug introduced in coreutils-8.1]
|
||||
|
||||
tail -f (inotify-enabled) once again works with remote files.
|
||||
The use of inotify with remote files meant that any changes to those
|
||||
files that was not done from the local system would go unnoticed.
|
||||
[bug introduced in coreutils-7.5]
|
||||
|
||||
tail -F (inotify-enabled) would abort when a tailed file is repeatedly
|
||||
renamed-aside and then recreated.
|
||||
[bug introduced in coreutils-7.5]
|
||||
|
||||
tail -F (inotify-enabled) could fail to follow renamed files.
|
||||
E.g., given a "tail -F a b" process, running "mv a b" would
|
||||
make tail stop tracking additions to "b".
|
||||
[bug introduced in coreutils-7.5]
|
||||
|
||||
touch -a and touch -m could trigger bugs in some file systems, such
|
||||
as xfs or ntfs-3g, and fail to update timestamps.
|
||||
[bug introduced in coreutils-8.1]
|
||||
|
||||
wc now prints counts atomically so that concurrent
|
||||
processes will not intersperse their output.
|
||||
[the issue dates back to the initial implementation]
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.2 (2009-12-11) [stable]
|
||||
|
||||
** Bug fixes
|
||||
@@ -2835,10 +2955,10 @@ packages, see ./old/*/NEWS.
|
||||
|
||||
========================================================================
|
||||
|
||||
Copyright (C) 2001-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2010 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
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts. A copy of the license is included in the ``GNU Free
|
||||
|
||||
4
README
4
README
@@ -229,10 +229,10 @@ the address on the last line of --help output.
|
||||
|
||||
========================================================================
|
||||
|
||||
Copyright (C) 1998, 2002-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 2002-2010 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
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts. A copy of the license is included in the ``GNU Free
|
||||
|
||||
@@ -28,6 +28,12 @@ You can get a copy of the source repository like this:
|
||||
$ git clone git://git.sv.gnu.org/coreutils
|
||||
$ cd coreutils
|
||||
|
||||
As an optional step, if you already have a copy of the gnulib git
|
||||
repository on your hard drive, then you can use it as a reference to
|
||||
reduce download time and disk space requirements:
|
||||
|
||||
$ export GNULIB_SRCDIR=/path/to/gnulib
|
||||
|
||||
The next step is to get and check other files needed to build,
|
||||
which are extracted from other source packages:
|
||||
|
||||
@@ -56,7 +62,7 @@ reporting address of this package, and not to that of gnulib, even
|
||||
if the problem seems to originate in a gnulib-provided file.
|
||||
-----
|
||||
|
||||
Copyright (C) 2002-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2010 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
|
||||
|
||||
@@ -14,18 +14,26 @@ I.E. the tools checked for by the bootstrap script and include:
|
||||
- Texinfo <http://www.gnu.org/software/texinfo/>
|
||||
|
||||
Note please try to install/build official packages for your system.
|
||||
If these are not available then one can make them available only to
|
||||
the coreutils build using the following instructions. Even if the
|
||||
official packages for your system are too old, please install them
|
||||
as they may be required to build the newer versions.
|
||||
If these programs are not available use the following instructions
|
||||
to build them and install the results into a directory that you will
|
||||
then use when building this package.
|
||||
|
||||
Even if the official version of a package for your system is too old,
|
||||
please install it, as it may be required to build the newer versions.
|
||||
The examples below install into $HOME/coreutils/deps/, so if you are
|
||||
going to follow these instructions, first ensure that your $PATH is
|
||||
set correctly by running this command:
|
||||
|
||||
prefix=$HOME/coreutils/deps
|
||||
export PATH=$prefix/bin:$PATH
|
||||
|
||||
* autoconf *
|
||||
|
||||
# Note Autoconf 2.62 or newer is needed to build automake-1.11
|
||||
# Note Autoconf 2.62 or newer is needed to build automake-1.11.1
|
||||
git clone --depth=1 git://git.sv.gnu.org/autoconf.git
|
||||
git checkout v2.62
|
||||
autoreconf -vi
|
||||
./configure --prefix=$HOME/coreutils/deps
|
||||
./configure --prefix=$prefix
|
||||
make install
|
||||
|
||||
* automake *
|
||||
@@ -33,12 +41,12 @@ as they may be required to build the newer versions.
|
||||
# Note help2man is required to build automake fully
|
||||
git clone git://git.sv.gnu.org/automake.git
|
||||
cd automake
|
||||
git checkout -b branch-1.11 --track origin/branch-1.11
|
||||
git checkout v1.11.1
|
||||
./bootstrap
|
||||
./configure --prefix=$HOME/coreutils/deps
|
||||
./configure --prefix=$prefix
|
||||
make install
|
||||
|
||||
coreutils uses XZ utils (successor to LZMA) to create
|
||||
This package uses XZ utils (successor to LZMA) to create
|
||||
a compressed distribution tarball. Using this feature of Automake
|
||||
requires version 1.10a or newer, as well as the xz program itself.
|
||||
|
||||
@@ -47,10 +55,7 @@ requires version 1.10a or newer, as well as the xz program itself.
|
||||
git clone git://ctrl.tukaani.org/xz.git
|
||||
cd xz
|
||||
./autogen.sh
|
||||
./configure --prefix=$HOME/coreutils/deps
|
||||
./configure --prefix=$prefix
|
||||
make install
|
||||
|
||||
Now we can build coreutils as described in README-hacking
|
||||
as long as $PATH starts with $HOME/coreutils/deps/bin, which
|
||||
one can set for the current shell like:
|
||||
$ export PATH=$HOME/coreutils/deps/bin:$PATH
|
||||
Now you can build this package as described in README-hacking.
|
||||
|
||||
@@ -13,26 +13,34 @@ Here are most of the steps we (maintainers) follow when making a release.
|
||||
* Ensure that you're on "master" with no uncommitted diffs.
|
||||
This should produce no output: git checkout master; git diff
|
||||
|
||||
* Run bootstrap: ./bootstrap
|
||||
* Run bootstrap one last time. This downloads any new translations:
|
||||
|
||||
./bootstrap
|
||||
|
||||
FIXME: enable excluded programs like arch? to get their manual pages?
|
||||
|
||||
* Pre-release testing:
|
||||
Ensure that make check syntax-check succeeds.
|
||||
On at least one SELinux-enabled (enforcing) and one non-SELinux system,
|
||||
run all tests, both root-only and regular.
|
||||
Run *all* non-root tests, including expensive and very expensive ones i.e.,
|
||||
run this: make -j1 check RUN_VERY_EXPENSIVE_TESTS=yes RUN_EXPENSIVE_TESTS=yes
|
||||
|
||||
Run the root-only tests:
|
||||
sudo env PATH="$PATH" NON_ROOT_USERNAME=$USER make -k check-root
|
||||
Run the following on at least one SELinux-enabled (enforcing) and
|
||||
one non-SELinux system:
|
||||
|
||||
* Run "make distcheck"
|
||||
make distcheck
|
||||
make -j1 check RUN_VERY_EXPENSIVE_TESTS=yes RUN_EXPENSIVE_TESTS=yes
|
||||
sudo env PATH="$PATH" NON_ROOT_USERNAME=$USER make -k check-root
|
||||
|
||||
Note the -j1 above. If you use -jN, for larger N, some of the expensive
|
||||
tests are likely to interfere with concurrent performance-measuring or
|
||||
timing-sensitive tests, resulting in spurious failures.
|
||||
|
||||
If "make distcheck" doesn't run "make syntax-check" for you, then run
|
||||
it manually:
|
||||
|
||||
make syntax-check
|
||||
|
||||
* Set the date, version number, and release type [stable/alpha/beta] on
|
||||
line 3 of NEWS, commit that, and tag the release by running e.g.,
|
||||
|
||||
build-aux/do-release-commit-and-tag 8.1 beta
|
||||
build-aux/do-release-commit-and-tag 8.x stable
|
||||
|
||||
* Run the following to create release tarballs. Your choice selects the
|
||||
corresponding upload-to destination in the emitted gnupload command.
|
||||
@@ -56,16 +64,18 @@ Once all the builds and tests have passed,
|
||||
download all tarball/signature pairs and use gpg --verify to ensure
|
||||
that they're all valid.
|
||||
|
||||
* Push the new tag:
|
||||
* Push the NEWS-updating changes and the new tag:
|
||||
|
||||
v=$(cat .prev-version)
|
||||
git push origin tag v$v
|
||||
git push origin master tag v$v
|
||||
|
||||
* Send the gpg-signed announcement mail, e.g.,
|
||||
|
||||
To: info-gnu@gnu.org, coreutils-announce@gnu.org
|
||||
Cc: coordinator@translationproject.org, bug-coreutils@gnu.org
|
||||
Subject: coreutils-8.0 released [beta]
|
||||
To: info-gnu@gnu.org
|
||||
Cc: coordinator@translationproject.org, coreutils@gnu.org
|
||||
Cc: coreutils-announce@gnu.org
|
||||
Subject: coreutils-8.0 released [stable]
|
||||
Mail-Followup-To: bug-coreutils@gnu.org
|
||||
|
||||
* Approve the announcement here:
|
||||
http://lists.gnu.org/mailman/admindb/coreutils-announce
|
||||
@@ -78,9 +88,11 @@ Once all the builds and tests have passed,
|
||||
the Main -> "Select Features" menu item, or via this link:
|
||||
https://savannah.gnu.org/project/admin/editgroupfeatures.php?group=coreutils)
|
||||
|
||||
Subject: coreutils-0.0 released [beta]
|
||||
The announcement is here:
|
||||
http://article.gmane.org/gmane.comp.gnu.core-utils.announce/54
|
||||
Subject: coreutils-8.0 released [stable]
|
||||
|
||||
+verbatim+
|
||||
...paste the announcement here...
|
||||
-verbatim-
|
||||
|
||||
Then go here to approve it:
|
||||
https://savannah.gnu.org/news/approve.php?group=coreutils
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
# Convert this package for use with valgrind.
|
||||
|
||||
# Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2006, 2009-2010 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
|
||||
|
||||
15
THANKS
15
THANKS
@@ -12,10 +12,12 @@ Aaron Hawley ashawley@uvm.edu
|
||||
Achim Blumensath blume@corona.oche.de
|
||||
Adam Jimerson vendion@charter.net
|
||||
Adam Klein aklein@debian.org
|
||||
Adam Sampson ats@offog.org
|
||||
Adrian Bunk bunk@stusta.de
|
||||
AIDA Shinra shinra@j10n.org
|
||||
Akim Demaille demaille@inf.enst.fr
|
||||
Alain Magloire alain@qnx.com
|
||||
Alan Curry pacman@kosh.dhis.org
|
||||
Alan Iwi iwi@atm.ox.ac.uk
|
||||
Albert Chin-A-Young china@thewrittenword.com
|
||||
Albert Hopkins ahopkins@dynacare.com
|
||||
@@ -102,8 +104,10 @@ Carlos Canau Carlos.Canau@relay.puug.pt
|
||||
Charles Karney karney@pppl.gov
|
||||
Charles Randall crandall@matchlogic.com
|
||||
Chip Salzenberg chip@valinux.com
|
||||
Chris Clayton chris2553@googlemail.com
|
||||
Chris Faylor cgf@cygnus.com
|
||||
Chris J. Bednar cjb@AdvancedDataSolutions.com
|
||||
Chris Jones cjns1989@gmail.com
|
||||
Chris Lesniewski ctl@mit.edu
|
||||
Chris Sylvain csylvain@umm.edu
|
||||
Chris Yeo cyeo@biking.org
|
||||
@@ -150,6 +154,7 @@ Dawson Engler engler@stanford.edu
|
||||
Dean Gaudet dean-savannah@arctic.org
|
||||
Deepak Goel deego@gnufans.org
|
||||
Denis Excoffier denis.excoffier@airbus.com
|
||||
Denis McKeon dmckeon@swcp.com
|
||||
Dennis Henriksen opus@flamingo.osrl.dk
|
||||
Dennis Smit ds@nerds-incorporated.org
|
||||
Derek Clegg dclegg@next.com
|
||||
@@ -174,6 +179,7 @@ Elbert Pol elbert.pol@gmail.com
|
||||
Eli Zaretskii eliz@is.elta.co.il
|
||||
Elias Pipping pipping@gentoo.org
|
||||
Emile LeBlanc leblanc@math.toronto.edu
|
||||
Emmanuel Lacour elacour@home-dn.net
|
||||
Erik Auerswald auerswal@unix-ag.uni-kl.de
|
||||
Eric Backus ericb@lsid.hp.com
|
||||
Eric Blake ebb9@byu.net
|
||||
@@ -250,6 +256,7 @@ Ilya N. Golubev gin@mo.msk.ru
|
||||
Ingo Saitz ingo@debian.org
|
||||
Ivan Labath labath3@st.fmph.uniba.sk
|
||||
Ivo Timmermans ivo@debian.org
|
||||
Jacky Fong jacky.fong@utoronto.ca
|
||||
James james@albion.glarp.com
|
||||
James Antill jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
||||
James Lemley James.Lemley@acxiom.com
|
||||
@@ -300,6 +307,7 @@ John Kodis kodis@acm.org
|
||||
John Murphy jam@philabs.research.philips.com
|
||||
John Roll john@panic.harvard.edu
|
||||
John Salmon johns@mullet.anu.edu.au
|
||||
John Stanley johnstops@verizon.net
|
||||
John Summerfield summer@OS2.ami.com.au
|
||||
Jon Peatfield J.S.Peatfield@damtp.cam.ac.uk
|
||||
Joost van Baal joostvb@xs4all.nl
|
||||
@@ -330,6 +338,7 @@ Keith Owens kaos@audio.apana.org.au
|
||||
Keith Thompson kst@cts.com
|
||||
Ken Pizzini kenp@halcyon.com
|
||||
Kevin Mudrick kmudrick@healthmarketscience.com
|
||||
Kim Hansen kim@i9.dk
|
||||
Kirk Kelsey kirk.kelsey@0x4b.net
|
||||
Kristin E Thomas kristint@us.ibm.com
|
||||
Kjetil Torgrim Homme kjetilho@ifi.uio.no
|
||||
@@ -490,6 +499,7 @@ Philippe Schnoebelen Philippe.Schnoebelen@imag.fr
|
||||
Phillip Jones mouse@datastacks.com
|
||||
Piergiorgio Sartor sartor@sony.de
|
||||
Pieter Bowman bowman@math.utah.edu
|
||||
Piotr Gackiewicz gacek@intertele.pl
|
||||
Piotr Kwapulinski kwap@univ.gda.pl
|
||||
Prashant TR tr@eth.net
|
||||
Priit Jõerüüt jemm4jemm@yahoo.com
|
||||
@@ -510,9 +520,11 @@ Richard Sharman rsharman@magmacom.com
|
||||
Rick Sladkey jrs@world.std.com
|
||||
Rik Faith faith@cs.unc.edu
|
||||
Risto Kankkunen kankkune@lingsoft.fi
|
||||
Rob Wortman wyrm@haell.com
|
||||
Robert H. de Vries robert@and.nl
|
||||
Robert Lindgren robert@orcafat.com
|
||||
Robert Millan zeratul2@wanadoo.es
|
||||
Robert Schwebel r.schwebel@pengutronix.de
|
||||
Rogier Wolff R.E.Wolff@BitWizard.nl
|
||||
Roland Huebner ro-huebner@gmx.de
|
||||
Roland Turner raz.tah.bet@raz.cx
|
||||
@@ -539,6 +551,7 @@ Solar Designer solar@owl.openwall.com
|
||||
Stanislav Ievlev inger@altlinux.ru
|
||||
Stavros Passas stabat@ics.forth.gr
|
||||
Stéphane Chazelas Stephane_CHAZELAS@yahoo.fr
|
||||
Stéphane Raimbault stephane.raimbault@makina-corpus.com
|
||||
Stephen Depooter sbdep@myrealbox.com
|
||||
Stephen Eglen eglen@pcg.wustl.edu
|
||||
Stephen Gildea gildea@stop.mail-abuse.org
|
||||
@@ -552,6 +565,7 @@ Steven Mocking ufo@quicknet.nl
|
||||
Steven Parkes smparkes@smparkes.net
|
||||
Steven Schveighoffer schveiguy@yahoo.com
|
||||
Steven P Watson steven@magelico.net
|
||||
Stuart Citrin ctrn3e8@gmail.com
|
||||
Stuart Kemp skemp@peter.bmc.com
|
||||
Stuart Shelton stuart@shelton.me
|
||||
Sven Joachim svenjoac@gmx.de
|
||||
@@ -622,6 +636,7 @@ Wolfram Kleff kleff@cs.uni-bonn.de
|
||||
Won-kyu Park wkpark@chem.skku.ac.kr
|
||||
Yanko Kaneti yaneti@declera.com
|
||||
Yann Dirson dirson@debian.org
|
||||
Yutaka Amanai yasai-itame1942@jade.plala.or.jp
|
||||
Zvi Har'El rl@math.technion.ac.il
|
||||
|
||||
;; Local Variables:
|
||||
|
||||
9
TODO
9
TODO
@@ -34,6 +34,9 @@ printf:
|
||||
platforms where the native *printf(3) is deficient.
|
||||
Suggestion from Eric Blake.
|
||||
|
||||
consider adding some implementation of the "col" utility
|
||||
Suggested by Karl Berry.
|
||||
|
||||
renice: POSIX utility, needs implementing.
|
||||
suggestion from Karl Berry (among others).
|
||||
Bob Proulx is working on this.
|
||||
@@ -59,10 +62,6 @@ Integrate use of sendfile, suggested here:
|
||||
http://mail.gnu.org/archive/html/bug-fileutils/2003-03/msg00030.html
|
||||
I don't plan to do that, since a few tests demonstrate no significant benefit.
|
||||
|
||||
Should printf '\0123' print "\n3"?
|
||||
per report from TAKAI Kousuke on Mar 27
|
||||
http://mail.gnu.org/archive/html/bug-coreutils/2003-03/index.html
|
||||
|
||||
printf: consider adapting builtins/printf.def from bash
|
||||
|
||||
tail: don't use xlseek; it *exits*.
|
||||
@@ -169,7 +168,7 @@ pr's use of nstrftime can make it malloc a very large (up to SIZE_MAX) buffer
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2010 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
|
||||
|
||||
77
bootstrap
77
bootstrap
@@ -1,8 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2010-02-24.17; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,7 +19,15 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Written by Paul Eggert.
|
||||
# Originally written by Paul Eggert. The canonical version of this
|
||||
# script is maintained as build-aux/bootstrap in gnulib, however, to
|
||||
# be useful to your project, you should place a copy of it under
|
||||
# version control in the top-level directory of your project. The
|
||||
# intent is that all customization can be done with a bootstrap.conf
|
||||
# file also maintained in your version control; gnulib comes with a
|
||||
# template build-aux/bootstrap.conf to get you started.
|
||||
|
||||
# Please report bugs or propose patches to bug-gnulib@gnu.org.
|
||||
|
||||
nl='
|
||||
'
|
||||
@@ -43,7 +53,7 @@ Options:
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
do not want to waste your bandwidth downloading
|
||||
them again.
|
||||
them again. Defaults to \$GNULIB_SRCDIR.
|
||||
--copy Copy files instead of creating symbolic links.
|
||||
--force Attempt to bootstrap even if the sources seem
|
||||
not to have been checked out.
|
||||
@@ -133,7 +143,8 @@ XGETTEXT_OPTIONS='\\\
|
||||
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
|
||||
'
|
||||
|
||||
# Package bug report address for gettext files
|
||||
# Package bug report address and copyright holder for gettext files
|
||||
COPYRIGHT_HOLDER='Free Software Foundation, Inc.'
|
||||
MSGID_BUGS_ADDRESS=bug-$package@gnu.org
|
||||
|
||||
# Files we don't want to import.
|
||||
@@ -160,7 +171,6 @@ vc_ignore=auto
|
||||
# die otherwise.
|
||||
find_tool ()
|
||||
{
|
||||
# Find sha1sum, named gsha1sum on MacPorts.
|
||||
find_tool_envvar=$1
|
||||
shift
|
||||
find_tool_names=$@
|
||||
@@ -188,8 +198,8 @@ find_tool ()
|
||||
eval "export $find_tool_envvar"
|
||||
}
|
||||
|
||||
# Find sha1sum, named gsha1sum on MacPorts.
|
||||
find_tool SHA1SUM sha1sum gsha1sum
|
||||
# Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6.
|
||||
find_tool SHA1SUM sha1sum gsha1sum shasum
|
||||
|
||||
# Override the default configuration, if necessary.
|
||||
# Make sure that bootstrap.conf is sourced from the current directory
|
||||
@@ -390,7 +400,7 @@ fi
|
||||
|
||||
cleanup_gnulib() {
|
||||
status=$?
|
||||
rm -fr gnulib
|
||||
rm -fr "$gnulib_path"
|
||||
exit $status
|
||||
}
|
||||
|
||||
@@ -398,6 +408,8 @@ git_modules_config () {
|
||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||
}
|
||||
|
||||
gnulib_path=`git_modules_config submodule.gnulib.path`
|
||||
|
||||
# Get gnulib files.
|
||||
|
||||
case ${GNULIB_SRCDIR--} in
|
||||
@@ -407,30 +419,43 @@ case ${GNULIB_SRCDIR--} in
|
||||
git submodule init || exit $?
|
||||
git submodule update || exit $?
|
||||
|
||||
elif [ ! -d gnulib ]; then
|
||||
elif [ ! -d "$gnulib_path" ]; then
|
||||
echo "$0: getting gnulib files..."
|
||||
|
||||
trap cleanup_gnulib 1 2 13 15
|
||||
|
||||
git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
|
||||
git clone $shallow git://git.sv.gnu.org/gnulib ||
|
||||
git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
|
||||
cleanup_gnulib
|
||||
|
||||
trap - 1 2 13 15
|
||||
fi
|
||||
GNULIB_SRCDIR=gnulib
|
||||
GNULIB_SRCDIR=$gnulib_path
|
||||
;;
|
||||
*)
|
||||
# Redirect the gnulib submodule to the directory on the command line
|
||||
# if possible.
|
||||
# Use GNULIB_SRCDIR as a reference.
|
||||
if test -d "$GNULIB_SRCDIR"/.git && \
|
||||
git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
git submodule init
|
||||
GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd`
|
||||
git_modules_config --replace-all submodule.gnulib.url $GNULIB_SRCDIR
|
||||
echo "$0: getting gnulib files..."
|
||||
git submodule update || exit $?
|
||||
GNULIB_SRCDIR=gnulib
|
||||
if git submodule --help|grep reference > /dev/null; then
|
||||
# Prefer the one-liner available in git 1.6.4 or newer.
|
||||
git submodule update --init --reference "$GNULIB_SRCDIR" \
|
||||
"$gnulib_path" || exit $?
|
||||
else
|
||||
# This fallback allows at least git 1.5.5.
|
||||
if test -f "$gnulib_path"/gnulib-tool; then
|
||||
# Since file already exists, assume submodule init already complete.
|
||||
git submodule update || exit $?
|
||||
else
|
||||
# Older git can't clone into an empty directory.
|
||||
rmdir "$gnulib_path" 2>/dev/null
|
||||
git clone --reference "$GNULIB_SRCDIR" \
|
||||
"$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
|
||||
&& git submodule init && git submodule update \
|
||||
|| exit $?
|
||||
fi
|
||||
fi
|
||||
GNULIB_SRCDIR=$gnulib_path
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -594,7 +619,6 @@ cp_mark_as_generated()
|
||||
(
|
||||
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
||||
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
||||
echo '#line 1' &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src"
|
||||
) > $cp_dst-t &&
|
||||
if cmp -s "$cp_dst-t" "$cp_dst"; then
|
||||
@@ -637,7 +661,7 @@ slurp() {
|
||||
for excluded_file in $excluded_files; do
|
||||
test "$dir/$file" = "$excluded_file" && continue 2
|
||||
done
|
||||
if test $file = Makefile.am; then
|
||||
if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then
|
||||
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||
sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || {
|
||||
@@ -655,7 +679,7 @@ slurp() {
|
||||
rm -f $dir/$file
|
||||
sed '
|
||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||
AC_DEFUN([AM_INTL_SUBDIR], [
|
||||
AC_DEFUN([AM_INTL_SUBDIR], [])
|
||||
/^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
|
||||
AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
|
||||
$a\
|
||||
@@ -788,7 +812,8 @@ if test $with_gettext = yes; then
|
||||
rm -f po/Makevars
|
||||
sed '
|
||||
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
|
||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/
|
||||
/^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/
|
||||
/^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'|
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
@@ -818,3 +843,11 @@ fi
|
||||
bootstrap_epilogue
|
||||
|
||||
echo "$0: done. Now you can run './configure'."
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2006-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2010 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
|
||||
@@ -97,7 +97,6 @@ gnulib_modules="
|
||||
fsusage
|
||||
fsync
|
||||
ftello
|
||||
ftruncate
|
||||
fts
|
||||
getdate
|
||||
getgroups
|
||||
@@ -210,7 +209,6 @@ gnulib_modules="
|
||||
strsignal
|
||||
strtoimax
|
||||
strtoumax
|
||||
strverscmp
|
||||
symlink
|
||||
sys_stat
|
||||
timespec
|
||||
@@ -311,8 +309,8 @@ gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests"
|
||||
|
||||
# Build prerequisites
|
||||
buildreq="\
|
||||
autoconf 2.61
|
||||
automake 1.11
|
||||
autoconf 2.62
|
||||
automake 1.11.1
|
||||
autopoint -
|
||||
bison -
|
||||
gettext -
|
||||
@@ -323,6 +321,7 @@ makeinfo -
|
||||
perl 5.5
|
||||
rsync -
|
||||
tar -
|
||||
xz -
|
||||
"
|
||||
|
||||
# Automake requires that ChangeLog exist.
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
143
cfg.mk
143
cfg.mk
@@ -1,5 +1,5 @@
|
||||
# Customize maint.mk -*- makefile -*-
|
||||
# Copyright (C) 2003-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,11 +17,9 @@
|
||||
# Used in maint.mk's web-manual rule
|
||||
manual_title = Core GNU utilities
|
||||
|
||||
# The GnuPG ID of the key used to sign the tarballs.
|
||||
gpg_key_ID = B9AB9A16
|
||||
|
||||
# Tests not to run as part of "make distcheck".
|
||||
local-checks-to-skip =
|
||||
local-checks-to-skip = \
|
||||
sc_texinfo_acronym
|
||||
|
||||
# Tools used to bootstrap this package, used for "announcement".
|
||||
bootstrap-tools = autoconf,automake,gnulib,bison
|
||||
@@ -29,7 +27,13 @@ bootstrap-tools = autoconf,automake,gnulib,bison
|
||||
# Now that we have better tests, make this the default.
|
||||
export VERBOSE = yes
|
||||
|
||||
old_NEWS_hash = 2a36ca50a949f959645d9bfac8ec83ce
|
||||
old_NEWS_hash = 9518f4930d702a9fa6ac6b9fd06cca94
|
||||
|
||||
# Add an exemption for sc_makefile_at_at_check.
|
||||
_makefile_at_at_check_exceptions = ' && !/^cu_install_program =/'
|
||||
|
||||
# Our help-version script is in a slightly different location.
|
||||
_hv_file ?= $(srcdir)/tests/misc/help-version
|
||||
|
||||
# Ensure that the list of O_ symbols used to compute O_FULLBLOCK is complete.
|
||||
dd = $(srcdir)/src/dd.c
|
||||
@@ -93,7 +97,8 @@ sc_root_tests:
|
||||
# stays in sync with corresponding files in the repository.
|
||||
sce = syntax_check_exceptions
|
||||
sc_x_sc_dist_check:
|
||||
@test "$$( ($(VC_LIST) | sed -n '/^.x-sc_/p'; \
|
||||
@test "$$( ($(VC_LIST) | sed -n '/\.x-sc_/p' \
|
||||
| sed 's|^$(_dot_escaped_srcdir)/||'; \
|
||||
sed -n '/^$(sce) =[ ]*\\$$/,/[^\]$$/p' \
|
||||
$(srcdir)/Makefile.am \
|
||||
| sed 's/^ *//;/^$(sce) =/d' \
|
||||
@@ -129,7 +134,10 @@ headers_with_interesting_macro_defs = \
|
||||
# Don't define macros that we already get from gnulib header files.
|
||||
sc_always_defined_macros: .re-defmac
|
||||
@if test -f $(srcdir)/src/system.h; then \
|
||||
trap 'rc=$$?; rm -f .re-defmac; exit $$rc' 0 1 2 3 15; \
|
||||
trap 'rc=$$?; rm -f .re-defmac; exit $$rc' 0; \
|
||||
am__exit='(exit $rc); exit $rc'; \
|
||||
trap "rc=129; $$am__exit" 1; trap "rc=130; $$am__exit" 2; \
|
||||
trap "rc=131; $$am__exit" 3; trap "rc=143; $$am__exit" 15; \
|
||||
grep -f .re-defmac $$($(VC_LIST)) \
|
||||
&& { echo '$(ME): define the above via some gnulib .h file' \
|
||||
1>&2; exit 1; } || :; \
|
||||
@@ -148,7 +156,10 @@ sc_always_defined_macros: .re-defmac
|
||||
# the headers already included via system.h.
|
||||
sc_system_h_headers: .re-list
|
||||
@if test -f $(srcdir)/src/system.h; then \
|
||||
trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \
|
||||
trap 'rc=$$?; rm -f .re-list; exit $$rc' 0; \
|
||||
am__exit='(exit $rc); exit $rc'; \
|
||||
trap "rc=129; $$am__exit" 1; trap "rc=130; $$am__exit" 2; \
|
||||
trap "rc=131; $$am__exit" 3; trap "rc=143; $$am__exit" 15; \
|
||||
grep -nE -f .re-list \
|
||||
$$($(VC_LIST_EXCEPT) | grep '^src/') \
|
||||
&& { echo '$(ME): the above are already included via system.h'\
|
||||
@@ -164,11 +175,26 @@ sc_sun_os_names:
|
||||
|
||||
ALL_RECURSIVE_TARGETS += sc_tight_scope
|
||||
sc_tight_scope:
|
||||
@$(MAKE) -C src $@
|
||||
@$(MAKE) -s -C src $@
|
||||
|
||||
ALL_RECURSIVE_TARGETS += sc_check-AUTHORS
|
||||
sc_check-AUTHORS:
|
||||
@$(MAKE) -C src $@
|
||||
@$(MAKE) -s -C src $@
|
||||
|
||||
# Option descriptions should not start with a capital letter
|
||||
# One could grep source directly as follows:
|
||||
# grep -E " {2,6}-.*[^.] [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
|
||||
# but that would miss descriptions not on the same line as the -option.
|
||||
ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
|
||||
sc_option_desc_uppercase:
|
||||
@$(MAKE) -s -C src all_programs
|
||||
@$(MAKE) -s -C man $@
|
||||
|
||||
# Ensure all man/*.[1x] files are present
|
||||
ALL_RECURSIVE_TARGETS += sc_man_file_correlation
|
||||
sc_man_file_correlation:
|
||||
@$(MAKE) -s -C src all_programs
|
||||
@$(MAKE) -s -C man $@
|
||||
|
||||
# Perl-based tests used to exec perl from a #!/bin/sh script.
|
||||
# Now they all start with #!/usr/bin/perl and the portability
|
||||
@@ -183,15 +209,15 @@ sc_no_exec_perl_coreutils:
|
||||
|
||||
# Don't use "readlink" or "readlinkat" directly
|
||||
sc_prohibit_readlink:
|
||||
@re='\<readlink(at)? \(' \
|
||||
msg='do not use readlink(at); use via xreadlink or areadlink*' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='\<readlink(at)? \(' \
|
||||
halt='do not use readlink(at); use via xreadlink or areadlink*' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Don't use address of "stat" or "lstat" functions
|
||||
sc_prohibit_stat_macro_address:
|
||||
@re='\<l?stat '':|&l?stat\>' \
|
||||
msg='stat() and lstat() may be function-like macros' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='\<l?stat '':|&l?stat\>' \
|
||||
halt='stat() and lstat() may be function-like macros' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Ensure that date's --help output stays in sync with the info
|
||||
# documentation for GNU strftime. The only exception is %N,
|
||||
@@ -202,7 +228,7 @@ sc_strftime_check:
|
||||
grep '^ %. ' $(srcdir)/src/date.c | sort \
|
||||
| $(extract_char) > $@-src; \
|
||||
{ echo N; \
|
||||
info libc date calendar format | grep '^ `%.'\' \
|
||||
info libc date calendar format 2>/dev/null|grep '^ `%.'\'\
|
||||
| $(extract_char); } | sort > $@-info; \
|
||||
diff -u $@-src $@-info || exit 1; \
|
||||
rm -f $@-src $@-info; \
|
||||
@@ -210,22 +236,22 @@ sc_strftime_check:
|
||||
|
||||
# Indent only with spaces.
|
||||
sc_prohibit_tab_based_indentation:
|
||||
@re='^ * ' \
|
||||
msg='TAB in indentation; use only spaces' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='^ * ' \
|
||||
halt='TAB in indentation; use only spaces' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Don't use "indent-tabs-mode: nil" anymore. No longer needed.
|
||||
sc_prohibit_emacs__indent_tabs_mode__setting:
|
||||
@re='^( *[*#] *)?indent-tabs-mode:' \
|
||||
msg='use of emacs indent-tabs-mode: setting' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='^( *[*#] *)?indent-tabs-mode:' \
|
||||
halt='use of emacs indent-tabs-mode: setting' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Ensure that each file that contains fail=1 also contains fail=0.
|
||||
# Otherwise, setting file=1 in the environment would make tests fail unexpectedly.
|
||||
sc_prohibit_fail_0:
|
||||
@re='\<fail=0\>' \
|
||||
msg='fail=0 initialization' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='\<fail=0\>' \
|
||||
halt='fail=0 initialization' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Ensure that "stdio--.h" is used where appropriate.
|
||||
sc_require_stdio_safer:
|
||||
@@ -241,8 +267,65 @@ sc_require_stdio_safer:
|
||||
|
||||
# Prefer xnanosleep over other less-precise sleep methods
|
||||
sc_prohibit_sleep:
|
||||
@re='\<(nano|u)?sleep \(' \
|
||||
msg='prefer xnanosleep over other sleep interfaces' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='\<(nano|u)?sleep \(' \
|
||||
halt='prefer xnanosleep over other sleep interfaces' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
###########################################################
|
||||
_p0 = \([^"'/]\|"\([^\"]\|[\].\)*"\|'\([^\']\|[\].\)*'
|
||||
_pre = $(_p0)\|[/][^"'/*]\|[/]"\([^\"]\|[\].\)*"\|[/]'\([^\']\|[\].\)*'\)*
|
||||
_pre_anchored = ^\($(_pre)\)
|
||||
_comment_and_close = [^*]\|[*][^/*]\)*[*][*]*/
|
||||
# help font-lock mode: '
|
||||
|
||||
# A sed expression that removes ANSI C and ISO C99 comments.
|
||||
# Derived from the one in GNU gettext's 'moopp' preprocessor.
|
||||
_sed_remove_comments = \
|
||||
/[/][/*]/{ \
|
||||
ta; \
|
||||
:a; \
|
||||
s,$(_pre_anchored)//.*,\1,; \
|
||||
te; \
|
||||
s,$(_pre_anchored)/[*]\($(_comment_and_close),\1 ,; \
|
||||
ta; \
|
||||
/^$(_pre)[/][*]/{ \
|
||||
s,$(_pre_anchored)/[*].*,\1 ,; \
|
||||
tu; \
|
||||
:u; \
|
||||
n; \
|
||||
s,^\($(_comment_and_close),,; \
|
||||
tv; \
|
||||
s,^.*$$,,; \
|
||||
bu; \
|
||||
:v; \
|
||||
}; \
|
||||
:e; \
|
||||
}
|
||||
# Quote all single quotes.
|
||||
_sed_rm_comments_q = $(subst ','\'',$(_sed_remove_comments))
|
||||
# help font-lock mode: '
|
||||
|
||||
_space_before_paren_exempt =? \\n\\$$
|
||||
_space_before_paren_exempt = \
|
||||
(^ *\#|\\n\\$$|%s\(to %s|(date|group|character)\(s\))
|
||||
# Ensure that there is a space before each open parenthesis in C code.
|
||||
sc_space_before_open_paren:
|
||||
@if $(VC_LIST_EXCEPT) | grep -l '\.[ch]$$' > /dev/null; then \
|
||||
fail=0; \
|
||||
for c in $$($(VC_LIST_EXCEPT) | grep '\.[ch]$$'); do \
|
||||
sed '$(_sed_rm_comments_q)' $$c 2>/dev/null \
|
||||
| grep -i '[[:alnum:]](' \
|
||||
| grep -vE '$(_space_before_paren_exempt)' \
|
||||
| grep . && { fail=1; echo "*** $$c"; }; \
|
||||
done; \
|
||||
test $$fail = 1 && \
|
||||
{ echo '$(ME): the above files lack a space-before-open-paren' \
|
||||
1>&2; exit 1; } || :; \
|
||||
else :; \
|
||||
fi
|
||||
|
||||
include $(srcdir)/dist-check.mk
|
||||
|
||||
update-copyright-env = \
|
||||
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
|
||||
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
# Copyright (C) 1991, 1993-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 1993-2010 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
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
dnl Written by Jim Meyering.
|
||||
|
||||
AC_PREREQ([2.61])
|
||||
AC_PREREQ([2.62])
|
||||
|
||||
# Make inter-release version strings look like, e.g., v6.9-219-g58ddd, which
|
||||
# indicates that it is built from the 219th delta (in _some_ repository)
|
||||
@@ -32,7 +32,7 @@ AC_CONFIG_SRCDIR([src/ls.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.11 dist-xz color-tests parallel-tests])
|
||||
AM_INIT_AUTOMAKE([1.11.1 dist-xz color-tests parallel-tests])
|
||||
AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
|
||||
|
||||
AC_PROG_CC_STDC
|
||||
|
||||
@@ -9,6 +9,11 @@ tmpdir = $(abs_top_builddir)/tests/torture
|
||||
t=$(tmpdir)/$(PACKAGE)/test
|
||||
pfx=$(t)/i
|
||||
|
||||
built_programs = \
|
||||
$$(echo 'spy:;@echo $$(bin_PROGRAMS)' \
|
||||
| MAKEFLAGS= $(MAKE) -s -C src -f Makefile -f - spy \
|
||||
| fmt -1 | sed 's,$(EXEEXT)$$,,' | sort -u)
|
||||
|
||||
# More than once, tainted build and source directory names would
|
||||
# have caused at least one "make check" test to apply "chmod 700"
|
||||
# to all directories under $HOME. Make sure it doesn't happen again.
|
||||
@@ -17,16 +22,36 @@ t_prefix = $(tp)/a
|
||||
t_taint = '$(t_prefix) b'
|
||||
fake_home = $(tp)/home
|
||||
|
||||
# When extracting from a distribution tarball, extract using the fastest
|
||||
# method possible. With dist-xz, that means using the *.xz file.
|
||||
ifneq ('', $(filter *.xz, $(DIST_ARCHIVES)))
|
||||
tar_decompress_opt_ = J
|
||||
suffix_ = xz
|
||||
else
|
||||
ifneq ('', $(filter *.gz, $(DIST_ARCHIVES)))
|
||||
tar_decompress_opt_ = z
|
||||
suffix_ = gz
|
||||
else
|
||||
tar_decompress_opt_ = j
|
||||
suffix_ = bz2
|
||||
endif
|
||||
endif
|
||||
amtar_extract_ = $(AMTAR) -$(tar_decompress_opt_)xf
|
||||
preferred_tarball_ = $(distdir).tar.$(suffix_)
|
||||
|
||||
# Ensure that tests run from tainted build and src dir names work,
|
||||
# and don't affect anything in $HOME. Create witness files in $HOME,
|
||||
# record their attributes, and build/test. Then ensure that the
|
||||
# witnesses were not affected.
|
||||
# Skip this test when using libtool, since libtool-generated scripts
|
||||
# cannot deal with a space-tainted srcdir.
|
||||
ALL_RECURSIVE_TARGETS += taint-distcheck
|
||||
taint-distcheck: $(DIST_ARCHIVES)
|
||||
grep '^[ ]*LT_INIT' configure.ac >/dev/null && exit 0 || :
|
||||
test -d $(t_taint) && chmod -R 700 $(t_taint) || :
|
||||
-rm -rf $(t_taint) $(fake_home)
|
||||
mkdir -p $(t_prefix) $(t_taint) $(fake_home)
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t_taint) -zxf $(distdir).tar.gz
|
||||
$(amtar_extract_) $(preferred_tarball_) -C $(t_taint)
|
||||
mkfifo $(fake_home)/fifo
|
||||
touch $(fake_home)/f
|
||||
mkdir -p $(fake_home)/d/e
|
||||
@@ -52,7 +77,7 @@ define install-transform-check
|
||||
endef
|
||||
|
||||
# Install, then verify that all binaries and man pages are in place.
|
||||
# Note that neither the binary, ginstall, nor the ].1 man page is installed.
|
||||
# Note that neither the binary, ginstall, nor the [.1 man page is installed.
|
||||
define my-instcheck
|
||||
echo running my-instcheck; \
|
||||
$(MAKE) prefix=$(pfx) install \
|
||||
@@ -71,6 +96,13 @@ define my-instcheck
|
||||
}
|
||||
endef
|
||||
|
||||
# The hard-linking for-loop below ensures that there is a bin/ directory
|
||||
# full of all of the programs under test (except the ones that are required
|
||||
# for basic Makefile rules), all symlinked to the just-built "false" program.
|
||||
# This is to ensure that if ever a test neglects to make PATH include
|
||||
# the build srcdir, these always-failing programs will run.
|
||||
# Otherwise, it is too easy to test the wrong programs.
|
||||
# Note that "false" itself is a symlink to true, so it too will malfunction.
|
||||
define coreutils-path-check
|
||||
{ \
|
||||
echo running coreutils-path-check; \
|
||||
@@ -101,38 +133,38 @@ define coreutils-path-check
|
||||
}
|
||||
endef
|
||||
|
||||
# Use -Wformat -Werror to detect format-string/arg-list mismatches.
|
||||
# Also, check for shadowing problems with -Wshadow, and for pointer
|
||||
# arithmetic problems with -Wpointer-arith.
|
||||
# These CFLAGS are pretty strict. If you build this target, you probably
|
||||
# have to have a recent version of gcc and glibc headers.
|
||||
# The hard-linking for-loop below ensures that there is a bin/ directory
|
||||
# full of all of the programs under test (except the ones that are required
|
||||
# for basic Makefile rules), all symlinked to the just-built "false" program.
|
||||
# This is to ensure that if ever a test neglects to make PATH include
|
||||
# the build srcdir, these always-failing programs will run.
|
||||
# Otherwise, it is too easy to test the wrong programs.
|
||||
# Note that "false" itself is a symlink to true, so it too will malfunction.
|
||||
# Use this to make sure we don't run these programs when building
|
||||
# from a virgin compressed tarball file, below.
|
||||
null_AM_MAKEFLAGS ?= \
|
||||
ACLOCAL=false \
|
||||
AUTOCONF=false \
|
||||
AUTOMAKE=false \
|
||||
AUTOHEADER=false \
|
||||
GPERF=false \
|
||||
MAKEINFO=false
|
||||
|
||||
ALL_RECURSIVE_TARGETS += my-distcheck
|
||||
my-distcheck: $(DIST_ARCHIVES) $(local-check)
|
||||
$(MAKE) syntax-check
|
||||
$(MAKE) check
|
||||
-rm -rf $(t)
|
||||
mkdir -p $(t)
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
cd $(t)/$(distdir) \
|
||||
&& ./configure --quiet --enable-gcc-warnings --disable-nls \
|
||||
&& $(MAKE) AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(install-transform-check) \
|
||||
&& $(my-instcheck) \
|
||||
&& $(coreutils-path-check) \
|
||||
&& $(MAKE) distclean
|
||||
$(amtar_extract_) $(preferred_tarball_) -C $(t)
|
||||
(set -e; cd $(t)/$(distdir); \
|
||||
./configure --quiet --enable-gcc-warnings --disable-nls; \
|
||||
$(MAKE) AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)'; \
|
||||
$(MAKE) dvi; \
|
||||
$(install-transform-check); \
|
||||
$(my-instcheck); \
|
||||
$(coreutils-path-check); \
|
||||
$(MAKE) distclean \
|
||||
)
|
||||
(cd $(t) && mv $(distdir) $(distdir).old \
|
||||
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
|
||||
&& $(amtar_extract_) - ) < $(preferred_tarball_)
|
||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||
-rm -rf $(t)
|
||||
rmdir $(tmpdir)/$(PACKAGE) $(tmpdir)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "ready for distribution:"; \
|
||||
for i in $(DIST_ARCHIVES); do echo " $$i"; done; \
|
||||
echo "========================"
|
||||
|
||||
@@ -2002,7 +2002,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2001-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Make coreutils documentation. -*-Makefile-*-
|
||||
|
||||
# Copyright (C) 1995-1998, 2001-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995-1998, 2001-2010 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
|
||||
@@ -30,13 +30,12 @@ EXTRA_DIST = perm.texi getdate.texi constants.texi fdl.texi
|
||||
AM_MAKEINFOFLAGS = --no-split
|
||||
|
||||
constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
|
||||
LC_ALL=C \
|
||||
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
|
||||
$(top_srcdir)/src/tail.c > t-$@
|
||||
LC_ALL=C \
|
||||
sed -n -e 's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
|
||||
$(top_srcdir)/src/shred.c >> t-$@
|
||||
mv t-$@ $@
|
||||
$(AM_V_GEN)LC_ALL=C; export LC_ALL; \
|
||||
{ sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
|
||||
$(top_srcdir)/src/tail.c && \
|
||||
sed -n -e 's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
|
||||
$(top_srcdir)/src/shred.c; } > t-$@ \
|
||||
&& mv t-$@ $@
|
||||
|
||||
MAINTAINERCLEANFILES = constants.texi
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
* df: (coreutils)df invocation. Report file system disk usage.
|
||||
* dir: (coreutils)dir invocation. List directories briefly.
|
||||
* dircolors: (coreutils)dircolors invocation. Color setup for ls.
|
||||
* dirname: (coreutils)dirname invocation. Strip non-directory suffix.
|
||||
* dirname: (coreutils)dirname invocation. Strip last file name component.
|
||||
* du: (coreutils)du invocation. Report on disk usage.
|
||||
* echo: (coreutils)echo invocation. Print a line of text.
|
||||
* env: (coreutils)env invocation. Modify the environment.
|
||||
@@ -139,7 +139,7 @@
|
||||
This manual documents version @value{VERSION} of the @sc{gnu} core
|
||||
utilities, including the standard programs for text and file manipulation.
|
||||
|
||||
Copyright @copyright{} 1994-1996, 2000-2009 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1994-1996, 2000-2010 Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
@@ -197,7 +197,7 @@ Free Documentation License''.
|
||||
* File name manipulation:: dirname basename pathchk mktemp
|
||||
* Working context:: pwd stty printenv tty
|
||||
* User information:: id logname whoami groups users who
|
||||
* System context:: date arch uname hostname hostid uptime
|
||||
* System context:: date arch nproc uname hostname hostid uptime
|
||||
* SELinux context:: chcon runcon
|
||||
* Modified command invocation:: chroot env nice nohup stdbuf su timeout
|
||||
* Process control:: kill
|
||||
@@ -377,7 +377,7 @@ Redirection
|
||||
File name manipulation
|
||||
|
||||
* basename invocation:: Strip directory and suffix from a file name
|
||||
* dirname invocation:: Strip non-directory suffix from a file name
|
||||
* dirname invocation:: Strip last file name component
|
||||
* pathchk invocation:: Check file name validity and portability
|
||||
* mktemp invocation:: Create temporary file or directory
|
||||
|
||||
@@ -2770,8 +2770,10 @@ If you'd like to continue to track the end of a growing file even after
|
||||
it has been unlinked, use @option{--follow=descriptor}. This is the default
|
||||
behavior, but it is not useful if you're tracking a log file that may be
|
||||
rotated (removed or renamed, then reopened). In that case, use
|
||||
@option{--follow=name} to track the named file by reopening it periodically
|
||||
to see if it has been removed and recreated by some other program.
|
||||
@option{--follow=name} to track the named file, perhaps by reopening it
|
||||
periodically to see if it has been removed and recreated by some other program.
|
||||
Note that the inotify-based implementation handles this case without
|
||||
the need for any periodic reopening.
|
||||
|
||||
No matter which method you use, if the tracked file is determined to have
|
||||
shrunk, @command{tail} prints a message saying the file has been truncated
|
||||
@@ -3862,10 +3864,9 @@ To compare such strings numerically, use the
|
||||
@opindex -V
|
||||
@opindex --version-sort
|
||||
@cindex version number sort
|
||||
@vindex LC_NUMERIC
|
||||
Sort per @code{strverscmp(3)}. This is a normal string comparison, except
|
||||
that embedded decimal numbers are sorted by numeric value
|
||||
(see @option{--numeric-sort} above).
|
||||
Sort by version name and number. It behaves like a standard sort,
|
||||
except that each sequence of decimal digits is treated numerically
|
||||
as an index/version number. (@xref{Details about version sort}.)
|
||||
|
||||
@item -r
|
||||
@itemx --reverse
|
||||
@@ -4125,6 +4126,11 @@ is counted from the first nonblank character of the field.
|
||||
@vindex POSIXLY_CORRECT
|
||||
On older systems, @command{sort} supports an obsolete origin-zero
|
||||
syntax @samp{+@var{pos1} [-@var{pos2}]} for specifying sort keys.
|
||||
The obsolete sequence @samp{sort +@var{a}.@var{x} -@var{b}.@var{y}}
|
||||
is equivalent to @samp{sort -k @var{a+1}.@var{x+1},@var{b}} if @var{y}
|
||||
is @samp{0} or absent, otherwise it is equivalent to @samp{sort -k
|
||||
@var{a+1}.@var{x+1},@var{b+1}.@var{y}}.
|
||||
|
||||
This obsolete behavior can be enabled or disabled with the
|
||||
@env{_POSIX2_VERSION} environment variable (@pxref{Standards
|
||||
conformance}); it can also be enabled when @env{POSIXLY_CORRECT} is
|
||||
@@ -5317,7 +5323,13 @@ of selected bytes.
|
||||
Select for printing only the fields listed in @var{field-list}.
|
||||
Fields are separated by a TAB character by default. Also print any
|
||||
line that contains no delimiter character, unless the
|
||||
@option{--only-delimited} (@option{-s}) option is specified
|
||||
@option{--only-delimited} (@option{-s}) option is specified.
|
||||
Note @command{cut} does not support specifying runs of whitespace as a
|
||||
delimiter, so to achieve that common functionality one can pre-process
|
||||
with @command{tr} like:
|
||||
@example
|
||||
tr -s '[:blank:]' '\t' | cut -f@dots{}
|
||||
@end example
|
||||
|
||||
@item -d @var{input_delim_byte}
|
||||
@itemx --delimiter=@var{input_delim_byte}
|
||||
@@ -5461,6 +5473,8 @@ locales and options if the output of @command{sort} is fed to
|
||||
sort a file on its default join field, but if you select a non-default
|
||||
locale, join field, separator, or comparison options, then you should
|
||||
do so consistently between @command{join} and @command{sort}.
|
||||
If @samp{join -t ''} is specified then the whole line is considered which
|
||||
matches the default operation of sort.
|
||||
|
||||
If the input has no unpairable lines, a @acronym{GNU} extension is
|
||||
available; the sort order can be any order that considers two fields
|
||||
@@ -5514,6 +5528,15 @@ Do not check that both input files are in sorted order. This is the default.
|
||||
Replace those output fields that are missing in the input with
|
||||
@var{string}.
|
||||
|
||||
@item --header
|
||||
@opindex --header
|
||||
Treat the first line of each input file as a header line. The header lines will
|
||||
be joined and printed as the first output line. If @option{-o} is used to
|
||||
specify output format, the header line will be printed according to the
|
||||
specified format. The header lines will not be checked for ordering even if
|
||||
@option{--check-order} is specified. Also if the header lines from each file
|
||||
do not match, the heading fields from the first file will be used.
|
||||
|
||||
@item -i
|
||||
@itemx --ignore-case
|
||||
@opindex -i
|
||||
@@ -5562,7 +5585,10 @@ option---are subject to the specified @var{field-list}.
|
||||
Use character @var{char} as the input and output field separator.
|
||||
Treat as significant each occurrence of @var{char} in the input file.
|
||||
Use @samp{sort -t @var{char}}, without the @option{-b} option of
|
||||
@samp{sort}, to produce this ordering.
|
||||
@samp{sort}, to produce this ordering. If @samp{join -t ''} is specified,
|
||||
the whole line is considered, matching the default operation of sort.
|
||||
If @samp{-t '\0'} is specified then the @acronym{ASCII} @sc{nul}
|
||||
character is used to delimit the fields.
|
||||
|
||||
@item -v @var{file-number}
|
||||
Print a line for each unpairable line in file @var{file-number}
|
||||
@@ -6685,23 +6711,17 @@ after the last @samp{.}); files with no extension are sorted first.
|
||||
@node Details about version sort
|
||||
@subsection Details about version sort
|
||||
|
||||
The version sort takes into account the fact that file names frequently include
|
||||
indices or version numbers. Standard sorting functions usually do not produce
|
||||
the ordering that people expect because comparisons are made on a
|
||||
character-by-character basis. The version
|
||||
sort addresses this problem, and is especially useful when browsing
|
||||
directories that contain many files with indices/version numbers in their
|
||||
names:
|
||||
Version sorting handles the fact that file names frequently include indices or
|
||||
version numbers. Standard sorting usually does not produce the order that one
|
||||
expects because comparisons are made on a character-by-character basis.
|
||||
Version sorting is especially useful when browsing directories that contain
|
||||
many files with indices/version numbers in their names:
|
||||
|
||||
@example
|
||||
$ ls -1 $ ls -1v
|
||||
foo.zml-1.gz foo.zml-1.gz
|
||||
foo.zml-100.gz foo.zml-2.gz
|
||||
foo.zml-12.gz foo.zml-6.gz
|
||||
foo.zml-13.gz foo.zml-12.gz
|
||||
foo.zml-2.gz foo.zml-13.gz
|
||||
foo.zml-25.gz foo.zml-25.gz
|
||||
foo.zml-6.gz foo.zml-100.gz
|
||||
abc.zml-1.gz abc.zml-1.gz
|
||||
abc.zml-12.gz abc.zml-2.gz
|
||||
abc.zml-2.gz abc.zml-12.gz
|
||||
@end example
|
||||
|
||||
Version-sorted strings are compared such that if @var{ver1} and @var{ver2}
|
||||
@@ -6720,11 +6740,27 @@ abc-1.012b.tgz abc-1.007.tgz
|
||||
abc-1.01a.tgz abc-1.012b.tgz
|
||||
@end example
|
||||
|
||||
This functionality is implemented using gnulib's @code{filevercmp} function.
|
||||
One result of that implementation decision is that @samp{ls -v}
|
||||
and @samp{sort -V} do not use the locale category, @env{LC_COLLATE},
|
||||
which means non-numeric prefixes are sorted as if @env{LC_COLLATE} were set
|
||||
to @samp{C}.
|
||||
This functionality is implemented using gnulib's @code{filevercmp} function,
|
||||
which has some caveats worth noting.
|
||||
|
||||
@itemize @bullet
|
||||
@item @env{LC_COLLATE} is ignored, which means @samp{ls -v} and @samp{sort -V}
|
||||
will sort non-numeric prefixes as if the @env{LC_COLLATE} locale category
|
||||
was set to @samp{C}.
|
||||
@item Some suffixes will not be matched by the regular
|
||||
expression mentioned above. Consequently these examples may
|
||||
not sort as you expect:
|
||||
|
||||
@example
|
||||
abc-1.2.3.4.7z
|
||||
abc-1.2.3.7z
|
||||
@end example
|
||||
|
||||
@example
|
||||
abc-1.2.3.4.x86_64.rpm
|
||||
abc-1.2.3.x86_64.rpm
|
||||
@end example
|
||||
@end itemize
|
||||
|
||||
@node General output formatting
|
||||
@subsection General output formatting
|
||||
@@ -7476,19 +7512,18 @@ $ mkdir b c; (cd b; : > a; ln -s a b); cp -aL b c; ls -i1 c/b
|
||||
@end smallexample
|
||||
|
||||
@itemx context
|
||||
Preserve SELinux security context of the file. @command{cp} will fail
|
||||
if the preserving of SELinux security context is not succesful.
|
||||
Preserve SELinux security context of the file, or fail with full diagnostics.
|
||||
@itemx xattr
|
||||
Preserve extended attributes if @command{cp} is built with xattr support,
|
||||
and xattrs are supported and enabled on your file system.
|
||||
If SELinux context and/or ACLs are implemented using xattrs,
|
||||
Preserve extended attributes of the file, or fail with full diagnostics.
|
||||
If @command{cp} is built without xattr support, ignore this option.
|
||||
If SELinux context, ACLs or Capabilities are implemented using xattrs,
|
||||
they are preserved by this option as well.
|
||||
@itemx all
|
||||
Preserve all file attributes.
|
||||
Equivalent to specifying all of the above, but with the difference
|
||||
that failure to preserve SELinux security context or extended attributes
|
||||
does not change @command{cp}'s exit status.
|
||||
@command{cp} does diagnose such failures.
|
||||
does not change @command{cp}'s exit status. In contrast to @option{-a},
|
||||
all but @samp{Operation not supported} warnings are output.
|
||||
@end table
|
||||
|
||||
Using @option{--preserve} with no @var{attribute_list} is equivalent
|
||||
@@ -8244,7 +8279,9 @@ the destination partition and the second and third would be left on the
|
||||
original partition.
|
||||
|
||||
@cindex extended attributes, xattr
|
||||
@command{mv} always tries to copy extended attributes (xattr).
|
||||
@command{mv} always tries to copy extended attributes (xattr), which may
|
||||
include SELinux context, ACLs or Capabilities.
|
||||
Upon failure all but @samp{Operation not supported} warnings are output.
|
||||
|
||||
@cindex prompting, and @command{mv}
|
||||
If a destination file exists but is normally unwritable, standard input
|
||||
@@ -8687,7 +8724,7 @@ The intended use of this is to shred a removed temporary file.
|
||||
For example:
|
||||
|
||||
@example
|
||||
i=`tempfile -m 0600`
|
||||
i=`mktemp`
|
||||
exec 3<>"$i"
|
||||
rm -- "$i"
|
||||
echo "Hello, world" >&3
|
||||
@@ -11877,7 +11914,7 @@ This section describes commands that manipulate file names.
|
||||
|
||||
@menu
|
||||
* basename invocation:: Strip directory and suffix from a file name.
|
||||
* dirname invocation:: Strip non-directory suffix from a file name.
|
||||
* dirname invocation:: Strip last file name component.
|
||||
* pathchk invocation:: Check file name validity and portability.
|
||||
* mktemp invocation:: Create temporary file or directory.
|
||||
@end menu
|
||||
@@ -11938,7 +11975,7 @@ basename include/stdio.h .h
|
||||
|
||||
|
||||
@node dirname invocation
|
||||
@section @command{dirname}: Strip non-directory suffix from a file name
|
||||
@section @command{dirname}: Strip last file name component
|
||||
|
||||
@pindex dirname
|
||||
@cindex directory components, printing
|
||||
@@ -11946,7 +11983,7 @@ basename include/stdio.h .h
|
||||
@cindex non-directory suffix, stripping
|
||||
|
||||
@command{dirname} prints all but the final slash-delimited component of
|
||||
a string (presumably a file name). Synopsis:
|
||||
a string (presumably a file name, but also works on directories). Synopsis:
|
||||
|
||||
@example
|
||||
dirname @var{name}
|
||||
@@ -15190,31 +15227,25 @@ might find this idea strange at first.
|
||||
still running after the specified time interval. Synopsis:
|
||||
|
||||
@example
|
||||
timeout [@var{option}] @var{number}[smhd] @var{command} [@var{arg}]@dots{}
|
||||
timeout [@var{option}] @var{duration} @var{command} [@var{arg}]@dots{}
|
||||
@end example
|
||||
|
||||
@cindex time units
|
||||
@var{number} is an integer followed by an optional unit; the default
|
||||
is seconds. The units are:
|
||||
|
||||
@table @samp
|
||||
@item s
|
||||
seconds
|
||||
@item m
|
||||
minutes
|
||||
@item h
|
||||
hours
|
||||
@item d
|
||||
days
|
||||
@end table
|
||||
|
||||
@var{command} must not be a special built-in utility (@pxref{Special
|
||||
built-in utilities}).
|
||||
|
||||
The program accepts the following option. Also see @ref{Common options}.
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
Options must precede operands.
|
||||
|
||||
@table @samp
|
||||
@item -k @var{duration}
|
||||
@itemx --kill-after=@var{duration}
|
||||
@opindex -k
|
||||
@opindex --kill-after
|
||||
Ensure the monitored @var{command} is killed by also sending a @samp{KILL}
|
||||
signal, after the specified @var{duration}. Without this option, if the
|
||||
selected signal proves not to be fatal, @command{timeout} does not kill
|
||||
the @var{command}.
|
||||
|
||||
@item -s @var{signal}
|
||||
@itemx --signal=@var{signal}
|
||||
@opindex -s
|
||||
@@ -15222,9 +15253,18 @@ Options must precede operands.
|
||||
Send this @var{signal} to @var{command} on timeout, rather than the
|
||||
default @samp{TERM} signal. @var{signal} may be a name like @samp{HUP}
|
||||
or a number. Also see @xref{Signal specifications}.
|
||||
|
||||
@end table
|
||||
|
||||
@cindex time units
|
||||
@var{duration} is an integer followed by an optional unit:
|
||||
@display
|
||||
@samp{s} for seconds (the default)
|
||||
@samp{m} for minutes
|
||||
@samp{h} for hours
|
||||
@samp{d} for days
|
||||
@end display
|
||||
A duration of 0 disables the associated timeout.
|
||||
|
||||
@cindex exit status of @command{timeout}
|
||||
Exit status:
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@c File mode bits
|
||||
|
||||
@c Copyright (C) 1994, 1996, 1999-2001, 2003-2006,
|
||||
@c 2008-2009 Free Software Foundation, Inc.
|
||||
@c Copyright (C) 1994, 1996, 1999-2001, 2003-2006, 2008-2010 Free Software
|
||||
@c Foundation, Inc.
|
||||
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Align/Truncate a string in a given screen width
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009-2010 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
|
||||
@@ -32,6 +32,7 @@
|
||||
#endif
|
||||
|
||||
/* Replace non printable chars.
|
||||
Note \t and \n etc. are non printable.
|
||||
Return 1 if replacement made, 0 otherwise. */
|
||||
|
||||
static bool
|
||||
@@ -119,17 +120,17 @@ mbs_align_pad (char *dest, const char* dest_end, size_t n_spaces)
|
||||
ALIGNMENT specifies whether to left- or right-justify or to center.
|
||||
If SRC requires more than *WIDTH columns, truncate it to fit.
|
||||
When centering, the number of trailing spaces may be one less than the
|
||||
number of leading spaces. The FLAGS parameter is unused at present.
|
||||
number of leading spaces.
|
||||
Return the length in bytes required for the final result, not counting
|
||||
the trailing NUL. A return value of DEST_SIZE or larger means there
|
||||
wasn't enough space. DEST will be NUL terminated in any case.
|
||||
Return (size_t) -1 upon error (invalid multi-byte sequence in SRC,
|
||||
or malloc failure).
|
||||
or malloc failure), unless MBA_UNIBYTE_FALLBACK is specified.
|
||||
Update *WIDTH to indicate how many columns were used before padding. */
|
||||
|
||||
size_t
|
||||
mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
size_t *width, mbs_align_t align, int flags _UNUSED_PARAMETER_)
|
||||
size_t *width, mbs_align_t align, int flags)
|
||||
{
|
||||
size_t ret = -1;
|
||||
size_t src_size = strlen (src) + 1;
|
||||
@@ -149,12 +150,22 @@ mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
{
|
||||
size_t src_chars = mbstowcs (NULL, src, 0);
|
||||
if (src_chars == (size_t) -1)
|
||||
goto mbsalign_cleanup;
|
||||
{
|
||||
if (flags & MBA_UNIBYTE_FALLBACK)
|
||||
goto mbsalign_unibyte;
|
||||
else
|
||||
goto mbsalign_cleanup;
|
||||
}
|
||||
src_chars += 1; /* make space for NUL */
|
||||
str_wc = malloc (src_chars * sizeof (wchar_t));
|
||||
if (str_wc == NULL)
|
||||
goto mbsalign_cleanup;
|
||||
if (mbstowcs (str_wc, src, src_chars) > 0)
|
||||
{
|
||||
if (flags & MBA_UNIBYTE_FALLBACK)
|
||||
goto mbsalign_unibyte;
|
||||
else
|
||||
goto mbsalign_cleanup;
|
||||
}
|
||||
if (mbstowcs (str_wc, src, src_chars) != 0)
|
||||
{
|
||||
str_wc[src_chars - 1] = L'\0';
|
||||
wc_enabled = true;
|
||||
@@ -165,27 +176,36 @@ mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
|
||||
/* If we transformed or need to truncate the source string
|
||||
then create a modified copy of it. */
|
||||
if (conversion || (n_cols > *width))
|
||||
if (wc_enabled && (conversion || (n_cols > *width)))
|
||||
{
|
||||
newstr = malloc (src_size);
|
||||
if (newstr == NULL)
|
||||
goto mbsalign_cleanup;
|
||||
str_to_print = newstr;
|
||||
if (wc_enabled)
|
||||
if (conversion)
|
||||
{
|
||||
/* May have increased the size by converting
|
||||
\t to \uFFFD for example. */
|
||||
src_size = wcstombs (NULL, str_wc, 0) + 1;
|
||||
}
|
||||
newstr = malloc (src_size);
|
||||
if (newstr == NULL)
|
||||
{
|
||||
n_cols = wc_truncate (str_wc, *width);
|
||||
n_used_bytes = wcstombs (newstr, str_wc, src_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
n_cols = *width;
|
||||
n_used_bytes = n_cols;
|
||||
memcpy (newstr, src, n_cols);
|
||||
newstr[n_cols] = '\0';
|
||||
if (flags & MBA_UNIBYTE_FALLBACK)
|
||||
goto mbsalign_unibyte;
|
||||
else
|
||||
goto mbsalign_cleanup;
|
||||
}
|
||||
str_to_print = newstr;
|
||||
n_cols = wc_truncate (str_wc, *width);
|
||||
n_used_bytes = wcstombs (newstr, str_wc, src_size);
|
||||
}
|
||||
|
||||
if (*width > n_cols)
|
||||
mbsalign_unibyte:
|
||||
|
||||
if (n_cols > *width) /* Unibyte truncation required. */
|
||||
{
|
||||
n_cols = *width;
|
||||
n_used_bytes = n_cols;
|
||||
}
|
||||
|
||||
if (*width > n_cols) /* Padding required. */
|
||||
n_spaces = *width - n_cols;
|
||||
|
||||
/* indicate to caller how many cells needed (not including padding). */
|
||||
@@ -197,16 +217,11 @@ mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
/* Write as much NUL terminated output to DEST as possible. */
|
||||
if (dest_size != 0)
|
||||
{
|
||||
size_t start_spaces, end_spaces;
|
||||
char *dest_end = dest + dest_size - 1;
|
||||
size_t start_spaces = n_spaces / 2 + n_spaces % 2;
|
||||
size_t end_spaces = n_spaces / 2;
|
||||
|
||||
switch (align)
|
||||
{
|
||||
case MBS_ALIGN_CENTER:
|
||||
start_spaces = n_spaces / 2 + n_spaces % 2;
|
||||
end_spaces = n_spaces / 2;
|
||||
break;
|
||||
case MBS_ALIGN_LEFT:
|
||||
start_spaces = 0;
|
||||
end_spaces = n_spaces;
|
||||
@@ -215,10 +230,16 @@ mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
start_spaces = n_spaces;
|
||||
end_spaces = 0;
|
||||
break;
|
||||
case MBS_ALIGN_CENTER:
|
||||
default:
|
||||
start_spaces = n_spaces / 2 + n_spaces % 2;
|
||||
end_spaces = n_spaces / 2;
|
||||
break;
|
||||
}
|
||||
|
||||
dest = mbs_align_pad (dest, dest_end, start_spaces);
|
||||
dest = mempcpy(dest, str_to_print, MIN (n_used_bytes, dest_end - dest));
|
||||
size_t space_left = dest_end - dest;
|
||||
dest = mempcpy (dest, str_to_print, MIN (n_used_bytes, space_left));
|
||||
mbs_align_pad (dest, dest_end, end_spaces);
|
||||
}
|
||||
|
||||
@@ -229,3 +250,39 @@ mbsalign_cleanup:
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* A wrapper around mbsalign() to dynamically allocate the
|
||||
minimum amount of memory to store the result.
|
||||
Return NULL on failure. */
|
||||
|
||||
char *
|
||||
ambsalign (const char *src, size_t *width, mbs_align_t align, int flags)
|
||||
{
|
||||
size_t orig_width = *width;
|
||||
size_t size = *width; /* Start with enough for unibyte mode. */
|
||||
size_t req = size;
|
||||
char *buf = NULL;
|
||||
|
||||
while (req >= size)
|
||||
{
|
||||
size = req + 1; /* Space for NUL. */
|
||||
char *nbuf = realloc (buf, size);
|
||||
if (nbuf == NULL)
|
||||
{
|
||||
free (buf);
|
||||
buf = NULL;
|
||||
break;
|
||||
}
|
||||
buf = nbuf;
|
||||
*width = orig_width;
|
||||
req = mbsalign (src, buf, size, width, align, flags);
|
||||
if (req == (size_t) -1)
|
||||
{
|
||||
free (buf);
|
||||
buf = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Align/Truncate a string in a given screen width
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009-2010 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
|
||||
@@ -18,6 +18,29 @@
|
||||
|
||||
typedef enum { MBS_ALIGN_LEFT, MBS_ALIGN_RIGHT, MBS_ALIGN_CENTER } mbs_align_t;
|
||||
|
||||
enum {
|
||||
/* Use unibyte mode for invalid multibyte strings or
|
||||
or when heap memory is exhausted. */
|
||||
MBA_UNIBYTE_FALLBACK = 0x0001,
|
||||
|
||||
#if 0 /* Other possible options. */
|
||||
/* Skip invalid multibyte chars rather than failing */
|
||||
MBA_IGNORE_INVALID = 0x0002,
|
||||
|
||||
/* Align multibyte strings using "figure space" (\u2007) */
|
||||
MBA_USE_FIGURE_SPACE = 0x0004,
|
||||
|
||||
/* Don't add any padding */
|
||||
MBA_TRUNCATE_ONLY = 0x0008,
|
||||
|
||||
/* Don't truncate */
|
||||
MBA_PAD_ONLY = 0x0010,
|
||||
#endif
|
||||
};
|
||||
|
||||
size_t
|
||||
mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
size_t *width, mbs_align_t align, int flags);
|
||||
|
||||
char *
|
||||
ambsalign (const char *src, size_t *width, mbs_align_t align, int flags);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Bob Jenkins's cryptographic random number generator, ISAAC.
|
||||
|
||||
Copyright (C) 1999-2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 1999 Colin Plumb.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Bob Jenkins's cryptographic random number generator, ISAAC.
|
||||
|
||||
Copyright (C) 1999-2005, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2005, 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 1999 Colin Plumb.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Generate random integers.
|
||||
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Generate random integers.
|
||||
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Generate random permutations.
|
||||
|
||||
Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006-2007, 2009-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Generate buffers of random data.
|
||||
|
||||
Copyright (C) 2006, 2008-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2008-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Generate buffers of random data.
|
||||
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2010 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
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
diff --git c/lib/regcomp.c i/lib/regcomp.c
|
||||
index 6472ff6..665b2ab 100644
|
||||
--- c/lib/regcomp.c
|
||||
+++ i/lib/regcomp.c
|
||||
@@ -18,6 +18,8 @@
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
+#include "intprops.h"
|
||||
+#include "verify.h"
|
||||
static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
|
||||
size_t length, reg_syntax_t syntax);
|
||||
static void re_compile_fastmap_iter (regex_t *bufp,
|
||||
@@ -541,7 +543,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
|
||||
diff --git a/lib/regcomp.c b/lib/regcomp.c
|
||||
index d5968bd..4926676 100644
|
||||
--- a/lib/regcomp.c
|
||||
+++ b/lib/regcomp.c
|
||||
@@ -541,7 +541,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
|
||||
size_t errbuf_size;
|
||||
#else /* size_t might promote */
|
||||
size_t
|
||||
@@ -20,7 +11,7 @@ index 6472ff6..665b2ab 100644
|
||||
char *_Restrict_ errbuf, size_t errbuf_size)
|
||||
#endif
|
||||
{
|
||||
@@ -1375,7 +1377,7 @@ calc_first (void *extra, bin_tree_t *node)
|
||||
@@ -1383,7 +1383,7 @@ calc_first (void *extra, bin_tree_t *node)
|
||||
|
||||
/* Pass 2: compute NEXT on the tree. Preorder visit. */
|
||||
static reg_errcode_t
|
||||
@@ -29,17 +20,7 @@ index 6472ff6..665b2ab 100644
|
||||
{
|
||||
switch (node->token.type)
|
||||
{
|
||||
@@ -2571,7 +2573,8 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
|
||||
/* This loop is actually executed only when end != REG_MISSING,
|
||||
to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?... We have
|
||||
already created the start+1-th copy. */
|
||||
- if ((Idx) -1 < 0 || end != REG_MISSING)
|
||||
+ verify (! TYPE_SIGNED (Idx));
|
||||
+ if (end != REG_MISSING)
|
||||
for (i = start + 2; i <= end; ++i)
|
||||
{
|
||||
elem = duplicate_tree (elem, dfa);
|
||||
@@ -2731,7 +2734,8 @@ static reg_errcode_t
|
||||
@@ -2744,7 +2744,8 @@ static reg_errcode_t
|
||||
internal_function
|
||||
build_collating_symbol (bitset_t sbcset,
|
||||
# ifdef RE_ENABLE_I18N
|
||||
@@ -49,7 +30,7 @@ index 6472ff6..665b2ab 100644
|
||||
# endif
|
||||
const unsigned char *name)
|
||||
{
|
||||
@@ -3309,7 +3313,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
|
||||
@@ -3323,7 +3324,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
|
||||
|
||||
static reg_errcode_t
|
||||
parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
|
||||
@@ -59,7 +40,7 @@ index 6472ff6..665b2ab 100644
|
||||
reg_syntax_t syntax, bool accept_hyphen)
|
||||
{
|
||||
#ifdef RE_ENABLE_I18N
|
||||
@@ -3396,8 +3401,9 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
|
||||
@@ -3410,8 +3412,9 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
|
||||
|
||||
static reg_errcode_t
|
||||
#ifdef RE_ENABLE_I18N
|
||||
@@ -71,7 +52,7 @@ index 6472ff6..665b2ab 100644
|
||||
#else /* not RE_ENABLE_I18N */
|
||||
build_equiv_class (bitset_t sbcset, const unsigned char *name)
|
||||
#endif /* not RE_ENABLE_I18N */
|
||||
@@ -3798,7 +3804,7 @@ free_token (re_token_t *node)
|
||||
@@ -3816,7 +3819,7 @@ free_token (re_token_t *node)
|
||||
and its children. */
|
||||
|
||||
static reg_errcode_t
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* root-dev-ino.c -- get the device and inode numbers for `/'.
|
||||
Copyright (C) 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2005-2006, 2009-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Root device and inode number checking.
|
||||
|
||||
Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2006, 2009-2010 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
|
||||
|
||||
@@ -127,48 +127,48 @@ index 2da5afe..562955a 100644
|
||||
+ XXXXXX[i] = letters[randint_genmax (rand_src, sizeof letters - 2)];
|
||||
|
||||
switch (kind)
|
||||
{
|
||||
{
|
||||
@@ -276,7 +271,7 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
|
||||
break;
|
||||
break;
|
||||
|
||||
case __GT_NOCREATE:
|
||||
- /* This case is backward from the other three. __gen_tempname
|
||||
+ /* This case is backward from the other three. This function
|
||||
succeeds if __xstat fails because the name does not exist.
|
||||
Note the continue to bypass the common logic at the bottom
|
||||
of the loop. */
|
||||
case __GT_NOCREATE:
|
||||
- /* This case is backward from the other three. __gen_tempname
|
||||
+ /* This case is backward from the other three. This function
|
||||
succeeds if __xstat fails because the name does not exist.
|
||||
Note the continue to bypass the common logic at the bottom
|
||||
of the loop. */
|
||||
@@ -285,11 +280,15 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
|
||||
if (errno == ENOENT)
|
||||
{
|
||||
__set_errno (save_errno);
|
||||
- return 0;
|
||||
+ fd = 0;
|
||||
+ goto done;
|
||||
}
|
||||
else
|
||||
- /* Give up now. */
|
||||
- return -1;
|
||||
+ {
|
||||
+ /* Give up now. */
|
||||
+ fd = -1;
|
||||
+ goto done;
|
||||
+ }
|
||||
}
|
||||
continue;
|
||||
if (errno == ENOENT)
|
||||
{
|
||||
__set_errno (save_errno);
|
||||
- return 0;
|
||||
+ fd = 0;
|
||||
+ goto done;
|
||||
}
|
||||
else
|
||||
- /* Give up now. */
|
||||
- return -1;
|
||||
+ {
|
||||
+ /* Give up now. */
|
||||
+ fd = -1;
|
||||
+ goto done;
|
||||
+ }
|
||||
}
|
||||
continue;
|
||||
|
||||
@@ -301,13 +300,32 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
|
||||
if (fd >= 0)
|
||||
{
|
||||
__set_errno (save_errno);
|
||||
- return fd;
|
||||
+ goto done;
|
||||
}
|
||||
{
|
||||
__set_errno (save_errno);
|
||||
- return fd;
|
||||
+ goto done;
|
||||
}
|
||||
else if (errno != EEXIST)
|
||||
- return -1;
|
||||
+ {
|
||||
+ fd = -1;
|
||||
+ goto done;
|
||||
+ }
|
||||
- return -1;
|
||||
+ {
|
||||
+ fd = -1;
|
||||
+ goto done;
|
||||
+ }
|
||||
}
|
||||
|
||||
+ randint_all_free (rand_src);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#serial 3
|
||||
dnl Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
11
gl/modules/mbsalign-tests
Normal file
11
gl/modules/mbsalign-tests
Normal file
@@ -0,0 +1,11 @@
|
||||
Files:
|
||||
tests/test-mbsalign.c
|
||||
tests/macros.h
|
||||
|
||||
Depends-on:
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
TESTS += test-mbsalign
|
||||
check_PROGRAMS += test-mbsalign
|
||||
100
gl/tests/test-mbsalign.c
Normal file
100
gl/tests/test-mbsalign.c
Normal file
@@ -0,0 +1,100 @@
|
||||
/* Test that mbsalign works as advertised.
|
||||
Copyright (C) 2010 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 3 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Pádraig Brady. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "mbsalign.h"
|
||||
#include "macros.h"
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
char dest[4 * 16 + 1];
|
||||
size_t width, n;
|
||||
|
||||
/* Test unibyte truncation. */
|
||||
width = 4;
|
||||
n = mbsalign ("t\tés", dest, sizeof dest, &width, MBS_ALIGN_LEFT, 0);
|
||||
ASSERT (n == 4);
|
||||
|
||||
/* Test center alignment. */
|
||||
width = 4;
|
||||
n = mbsalign ("es", dest, sizeof dest, &width, MBS_ALIGN_CENTER, 0);
|
||||
ASSERT (*dest == ' ' && *(dest + n - 1) == ' ');
|
||||
|
||||
if (setlocale (LC_ALL, "en_US.UTF8"))
|
||||
{
|
||||
/* Check invalid input is flagged. */
|
||||
width = 4;
|
||||
n = mbsalign ("t\xe1\xe2s", dest, sizeof dest, &width, MBS_ALIGN_LEFT, 0);
|
||||
ASSERT (n == (size_t) -1);
|
||||
|
||||
/* Check invalid input is treated as unibyte */
|
||||
width = 4;
|
||||
n = mbsalign ("t\xe1\xe2s", dest, sizeof dest, &width,
|
||||
MBS_ALIGN_LEFT, MBA_UNIBYTE_FALLBACK);
|
||||
ASSERT (n == 4);
|
||||
|
||||
/* Test multibyte center alignment. */
|
||||
width = 4;
|
||||
n = mbsalign ("és", dest, sizeof dest, &width, MBS_ALIGN_CENTER, 0);
|
||||
ASSERT (*dest == ' ' && *(dest + n - 1) == ' ');
|
||||
|
||||
/* Test multibyte left alignment. */
|
||||
width = 4;
|
||||
n = mbsalign ("és", dest, sizeof dest, &width, MBS_ALIGN_LEFT, 0);
|
||||
ASSERT (*(dest + n - 1) == ' ' && *(dest + n - 2) == ' ');
|
||||
|
||||
/* Test multibyte right alignment. */
|
||||
width = 4;
|
||||
n = mbsalign ("és", dest, sizeof dest, &width, MBS_ALIGN_RIGHT, 0);
|
||||
ASSERT (*(dest) == ' ' && *(dest + 1) == ' ');
|
||||
|
||||
/* multibyte multicell truncation. */
|
||||
width = 4; /* cells */
|
||||
n = mbsalign ("日月火水", dest, sizeof dest, &width,
|
||||
MBS_ALIGN_LEFT, 0);
|
||||
ASSERT (n == 6); /* 2 characters */
|
||||
|
||||
/* multibyte unicell truncation. */
|
||||
width = 3; /* cells */
|
||||
n = mbsalign ("¹²³⁴", dest, sizeof dest, &width, MBS_ALIGN_LEFT, 0);
|
||||
ASSERT (n == 6); /* 3 characters */
|
||||
|
||||
/* Check independence from dest buffer. */
|
||||
width = 4; /* cells */
|
||||
n = mbsalign ("¹²³⁴", dest, 0, &width, MBS_ALIGN_LEFT, 0);
|
||||
ASSERT (n == 9); /* 4 characters */
|
||||
|
||||
/* Check that width is updated with cells required before padding. */
|
||||
width = 4; /* cells */
|
||||
n = mbsalign ("¹²³", dest, 0, &width, MBS_ALIGN_LEFT, 0);
|
||||
ASSERT (width == 3);
|
||||
|
||||
/* Test case where output is larger than input
|
||||
(as tab converted to multi byte replacement char). */
|
||||
width = 4;
|
||||
n = mbsalign ("t\tés" /* 6 including NUL */ , dest, sizeof dest,
|
||||
&width, MBS_ALIGN_LEFT, 0);
|
||||
ASSERT (n == 7);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
2
gnulib
2
gnulib
Submodule gnulib updated: 63983c0aac...6d126a8f1b
@@ -8746,7 +8746,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2000-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## Makefile for gnulib/lib -*-Makefile-*-
|
||||
|
||||
# Copyright (C) 1995-2007, 2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995-2007, 2009-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* buffer-lcm.c - compute a good buffer size for dealing with two files
|
||||
|
||||
Copyright (C) 2002, 2005, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2005, 2009-2010 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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
This function is probably useful only for choosing whether to issue
|
||||
a prompt in an implementation of POSIX-specified rm.
|
||||
|
||||
Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2006, 2009-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Invoke open, but return either a desired file descriptor or -1.
|
||||
|
||||
Copyright (C) 2005, 2006, 2008-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2006, 2008-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Invoke open, but return either a desired file descriptor or -1.
|
||||
|
||||
Copyright (C) 2005, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2009-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Locale-specific memory transformation
|
||||
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Compare integer strings.
|
||||
|
||||
Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2006, 2009-2010 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Compare numeric strings. This is an internal include file.
|
||||
|
||||
Copyright (C) 1988, 1991, 1992, 1993, 1995, 1996, 1998, 1999, 2000,
|
||||
2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988, 1991-1993, 1995-1996, 1998-2000, 2003-2006, 2009-2010
|
||||
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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Compare numeric strings.
|
||||
|
||||
Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2006, 2009-2010 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Exercise chdir-long's sample main program.
|
||||
|
||||
# Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2006, 2009-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* xfts.c -- a wrapper for fts_open
|
||||
|
||||
Copyright (C) 2003, 2005-2007, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2005-2007, 2009-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Locale-specific memory transformation
|
||||
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2010 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
|
||||
|
||||
@@ -5004,8 +5004,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# boottime.m4 serial 4
|
||||
# Determine whether this system has infrastructure for obtaining the boot time.
|
||||
|
||||
# Copyright (C) 1996, 2000, 2002-2004, 2006, 2008-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 2000, 2002-2004, 2006, 2008-2010 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
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#serial 26
|
||||
# Check declarations for this package.
|
||||
|
||||
dnl Copyright (C) 1997-2001, 2003-2006, 2008-2009 Free Software
|
||||
dnl Foundation, Inc.
|
||||
dnl Copyright (C) 1997-2001, 2003-2006, 2008-2010 Free Software Foundation,
|
||||
dnl Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# serial 1
|
||||
dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Invoke open, but return either a desired file descriptor or -1.
|
||||
|
||||
dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Tests for GNU GMP (or any compatible replacement).
|
||||
|
||||
dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#serial 2
|
||||
dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
dnl Misc type-related macros for coreutils.
|
||||
|
||||
# Copyright (C) 1998, 2000-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1998, 2000-2010 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
|
||||
@@ -35,8 +35,8 @@ AC_DEFUN([coreutils_MACROS],
|
||||
|
||||
AC_REQUIRE([AC_FUNC_FSEEKO])
|
||||
|
||||
# By default, argmatch should fail calling usage (1).
|
||||
AC_DEFINE([ARGMATCH_DIE], [usage (1)],
|
||||
# By default, argmatch should fail calling usage (EXIT_FAILURE).
|
||||
AC_DEFINE([ARGMATCH_DIE], [usage (EXIT_FAILURE)],
|
||||
[Define to the function xargmatch calls on failures.])
|
||||
AC_DEFINE([ARGMATCH_DIE_DECL], [void usage (int _e)],
|
||||
[Define to the declaration of the xargmatch failure function.])
|
||||
@@ -64,6 +64,7 @@ AC_DEFUN([coreutils_MACROS],
|
||||
LIBS=$coreutils_saved_libs
|
||||
|
||||
# Used by sort.c.
|
||||
AC_CHECK_FUNCS_ONCE([posix_fadvise])
|
||||
AC_CHECK_FUNCS_ONCE([nl_langinfo])
|
||||
|
||||
# Used by tail.c.
|
||||
@@ -144,6 +145,25 @@ AC_DEFUN([coreutils_MACROS],
|
||||
])
|
||||
|
||||
AC_REQUIRE([AM_LANGINFO_CODESET])
|
||||
|
||||
# Accept configure options: --with-tty-group[=GROUP], --without-tty-group
|
||||
# You can determine the group of a TTY via 'stat --format %G /dev/tty'
|
||||
# Omitting this option is equivalent to using --without-tty-group.
|
||||
AC_ARG_WITH([tty-group],
|
||||
AS_HELP_STRING([--with-tty-group[[[=NAME]]]],
|
||||
[group used by system for TTYs, "tty" when not specified]
|
||||
[ (default: do not rely on any group used for TTYs)]),
|
||||
[tty_group_name=$withval],
|
||||
[tty_group_name=no])
|
||||
|
||||
if test "x$tty_group_name" != xno; then
|
||||
if test "x$tty_group_name" = xyes; then
|
||||
tty_group_name=tty
|
||||
fi
|
||||
AC_MSG_NOTICE([TTY group used by system set to "$tty_group_name"])
|
||||
AC_DEFINE_UNQUOTED([TTY_GROUP_NAME], ["$tty_group_name"],
|
||||
[group used by system for TTYs])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_CHECK_ALL_HEADERS],
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
dnl Misc lib-related macros for coreutils.
|
||||
|
||||
# Copyright (C) 1993-1997, 2000-2001, 2003-2006, 2008-2009
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1993-1997, 2000-2001, 2003-2006, 2008-2010 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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
dnl Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
@@ -7,7 +7,7 @@ m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
|
||||
# directory of the coreutils package.
|
||||
|
||||
|
||||
# Copyright (C) 1998, 2000, 2001, 2003-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1998, 2000-2001, 2003-2010 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# stat-prog.m4 serial 6
|
||||
# Record the prerequisites of src/stat.c from the coreutils package.
|
||||
|
||||
# Copyright (C) 2002-2004, 2006, 2008-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2004, 2006, 2008-2010 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Compare numeric strings.
|
||||
|
||||
dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
||||
35
m4/xattr.m4
35
m4/xattr.m4
@@ -1,6 +1,7 @@
|
||||
# xattr.m4 - check for Extended Attributes (Linux)
|
||||
# serial 3
|
||||
|
||||
# Copyright (C) 2003, 2008-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003, 2008-2010 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -15,25 +16,29 @@ AC_DEFUN([gl_FUNC_XATTR],
|
||||
[do not support extended attributes]),
|
||||
[use_xattr=$enableval], [use_xattr=yes])
|
||||
|
||||
LIB_XATTR=
|
||||
AC_SUBST([LIB_XATTR])
|
||||
|
||||
if test "$use_xattr" = "yes"; then
|
||||
AC_CHECK_HEADERS([attr/error_context.h attr/libattr.h])
|
||||
use_xattr=no
|
||||
if test $ac_cv_header_attr_libattr_h = yes \
|
||||
&& test $ac_cv_header_attr_error_context_h = yes; then
|
||||
use_xattr=1
|
||||
else
|
||||
use_xattr=0
|
||||
&& test $ac_cv_header_attr_error_context_h = yes; then
|
||||
xattr_saved_LIBS=$LIBS
|
||||
AC_SEARCH_LIBS([attr_copy_file], [attr],
|
||||
[test "$ac_cv_search_attr_copy_file" = "none required" ||
|
||||
LIB_XATTR=$ac_cv_search_attr_copy_file])
|
||||
AC_CHECK_FUNCS([attr_copy_file])
|
||||
LIBS=$xattr_saved_LIBS
|
||||
if test $ac_cv_func_attr_copy_file = yes; then
|
||||
use_xattr=yes
|
||||
fi
|
||||
fi
|
||||
if test $use_xattr = no; then
|
||||
AC_MSG_WARN([libattr development library was not found or not usable.])
|
||||
AC_MSG_WARN([AC_PACKAGE_NAME will be built without xattr support.])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([USE_XATTR], [$use_xattr],
|
||||
[Define if you want extended attribute support.])
|
||||
LIB_XATTR=
|
||||
xattr_saved_LIBS=$LIBS
|
||||
AC_SEARCH_LIBS([attr_copy_file], [attr],
|
||||
[test "$ac_cv_search_attr_copy_file" = "none required" ||
|
||||
LIB_XATTR=$ac_cv_search_attr_copy_file])
|
||||
AC_CHECK_FUNCS([attr_copy_file])
|
||||
LIBS=$xattr_saved_LIBS
|
||||
AC_SUBST([LIB_XATTR])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([USE_XATTR], [`test $use_xattr != yes; echo $?`],
|
||||
[Define if you want extended attribute support.])
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#serial 1
|
||||
dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Make coreutils man pages. -*-Makefile-*-
|
||||
|
||||
# Copyright (C) 2002-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2010 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
|
||||
@@ -173,7 +173,15 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
|
||||
;; \
|
||||
esac
|
||||
|
||||
distcheck-hook: check-x-vs-1 check-programs-vs-x
|
||||
# Option descriptions should not start with a capital letter
|
||||
.PHONY: sc_option_desc_uppercase
|
||||
sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
|
||||
@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
|
||||
{ echo 1>&2 '$(ME): found initial capitals in --help'; \
|
||||
exit 1; } || :;
|
||||
|
||||
.PHONY: sc_man_file_correlation
|
||||
sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
|
||||
|
||||
# Sort in traditional ASCII order, regardless of the current locale;
|
||||
# otherwise we may get into trouble with distinct strings that the
|
||||
@@ -186,7 +194,7 @@ ASSORT = LC_ALL=C sort
|
||||
# add them here manually.
|
||||
.PHONY: check-x-vs-1
|
||||
check-x-vs-1:
|
||||
$(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
|
||||
@PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
|
||||
t=$@-t; \
|
||||
(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
|
||||
(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
|
||||
@@ -200,7 +208,7 @@ all_programs = \
|
||||
|
||||
.PHONY: check-programs-vs-x
|
||||
check-programs-vs-x:
|
||||
$(AM_V_GEN)status=0; \
|
||||
@status=0; \
|
||||
for p in dummy `$(all_programs)`; do \
|
||||
test $$p = dummy && continue; \
|
||||
test $$p = ginstall && p=install || : ; \
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
'\" Copyright (C) 1998, 1999, 2001, 2006, 2007, 2009 Free Software Foundation, Inc.
|
||||
'\" Copyright (C) 1998-1999, 2001, 2006-2007, 2009-2010 Free Software
|
||||
'\" Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
'\" Copyright (C) 1998, 1999, 2001, 2006, 2009 Free Software Foundation, Inc.
|
||||
'\" Copyright (C) 1998-1999, 2001, 2006, 2009-2010 Free Software Foundation,
|
||||
'\" Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
2
man/df.x
2
man/df.x
@@ -1,4 +1,4 @@
|
||||
'\" Copyright (C) 1998, 1999, 2004, 2009 Free Software Foundation, Inc.
|
||||
'\" Copyright (C) 1998-1999, 2004, 2009-2010 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[NAME]
|
||||
dirname \- strip non-directory suffix from file name
|
||||
dirname \- strip last component from file name
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
[SEE ALSO]
|
||||
|
||||
2
man/du.x
2
man/du.x
@@ -1,4 +1,4 @@
|
||||
'\" Copyright (C) 1998, 1999, 2000, 2002, 2009 Free Software Foundation, Inc.
|
||||
'\" Copyright (C) 1998-2000, 2002, 2009-2010 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Generate a short man page from --help and --version output.
|
||||
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2004, 2008-2010 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
|
||||
|
||||
4
man/rm.x
4
man/rm.x
@@ -1,5 +1,5 @@
|
||||
'\" Copyright (C) 1998, 1999, 2001, 2003, 2004,
|
||||
'\" 2006, 2009 Free Software Foundation, Inc.
|
||||
'\" Copyright (C) 1998-1999, 2001, 2003-2004, 2006, 2009-2010 Free Software
|
||||
'\" Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'\" Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
'\" Copyright (C) 2009-2010 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
tac \- concatenate and print files in reverse
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
[SEE ALSO]
|
||||
\fBrev\fP(1).
|
||||
|
||||
@@ -8390,7 +8390,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1998-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -749,8 +749,7 @@ Major changes in release 3.3:
|
||||
|
||||
========================================================================
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2003, 2009-2010 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.3 or
|
||||
|
||||
@@ -4858,8 +4858,8 @@ Thu Nov 17 23:47:26 1994 Jim Meyering (meyering@comco.com)
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-1997, 1999-2002, 2006, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -1706,8 +1706,7 @@ Sat Oct 28 13:20:43 1989 David J. MacKenzie (djm at spiff)
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 1989-1994, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -273,8 +273,7 @@ Major changes in release 1.7:
|
||||
|
||||
========================================================================
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2003, 2009-2010 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.3 or
|
||||
|
||||
@@ -8745,7 +8745,7 @@ Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1998-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -461,8 +461,7 @@ Major changes in release 1.4:
|
||||
|
||||
========================================================================
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2002, 2006, 2009-2010 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.3 or
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# List of files which contain translatable strings.
|
||||
# Copyright (C) 1996-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2010 Free Software Foundation, Inc.
|
||||
|
||||
# These are nominally temporary...
|
||||
lib/argmatch.c
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
|
||||
## Copyright (C) 1990, 1991, 1993-2009 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1990-1991, 1993-2010 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
|
||||
@@ -170,6 +170,9 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib
|
||||
noinst_LIBRARIES = libver.a
|
||||
nodist_libver_a_SOURCES = version.c version.h
|
||||
|
||||
# Tell the linker to omit references to unused shared libraries.
|
||||
AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
|
||||
|
||||
# Sometimes, the expansion of $(LIBINTL) includes -lc which may
|
||||
# include modules defining variables like `optind', so libcoreutils.a
|
||||
# must precede $(LIBINTL) in order to ensure we use GNU getopt.
|
||||
@@ -325,12 +328,13 @@ ls_LDADD += $(LIB_CLOCK_GETTIME)
|
||||
pr_LDADD += $(LIB_CLOCK_GETTIME)
|
||||
touch_LDADD += $(LIB_CLOCK_GETTIME)
|
||||
|
||||
# for gethrxtime, randint, randread, gen_tempname
|
||||
# for gethrxtime, randint, randread, gen_tempname, mkstemp
|
||||
dd_LDADD += $(LIB_GETHRXTIME)
|
||||
mktemp_LDADD += $(LIB_GETHRXTIME)
|
||||
shred_LDADD += $(LIB_GETHRXTIME)
|
||||
shuf_LDADD += $(LIB_GETHRXTIME)
|
||||
sort_LDADD += $(LIB_GETHRXTIME)
|
||||
tac_LDADD += $(LIB_GETHRXTIME)
|
||||
|
||||
# for cap_get_file
|
||||
ls_LDADD += $(LIB_CAP)
|
||||
@@ -390,6 +394,9 @@ who_LDADD += $(GETADDRINFO_LIB)
|
||||
hostname_LDADD += $(GETHOSTNAME_LIB)
|
||||
uname_LDADD += $(GETHOSTNAME_LIB)
|
||||
|
||||
# for strsignal
|
||||
kill_LDADD += $(LIBTHREAD)
|
||||
|
||||
$(PROGRAMS): ../lib/libcoreutils.a
|
||||
|
||||
# Get the release year from ../lib/version-etc.c.
|
||||
@@ -634,6 +641,7 @@ built_programs.list:
|
||||
|
||||
all_programs.list:
|
||||
@echo $(all_programs) | tr ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' \
|
||||
| sed /libstdbuf/d \
|
||||
| $(ASSORT) -u
|
||||
|
||||
# This is required because we have broken inter-directory dependencies:
|
||||
@@ -641,6 +649,11 @@ all_programs.list:
|
||||
# install a binary, require that all programs be built at distribution time.
|
||||
dist-hook: $(all_programs)
|
||||
|
||||
# Ensure that all programs are built so we can for example
|
||||
# subsequently syntax check all man pages.
|
||||
.PHONY: all_programs
|
||||
all_programs: $(all_programs)
|
||||
|
||||
pm = progs-makefile
|
||||
pr = progs-readme
|
||||
# Ensure that the list of programs in README matches the list
|
||||
@@ -671,7 +684,7 @@ au_dotdot = authors-dotdot
|
||||
au_actual = authors-actual
|
||||
.PHONY: sc_check-AUTHORS
|
||||
sc_check-AUTHORS: $(all_programs)
|
||||
$(AM_V_GEN)locale=en_US.UTF-8; \
|
||||
@locale=en_US.UTF-8; \
|
||||
LC_ALL="$$locale" ./cat --version \
|
||||
| grep ' Torbjorn ' > /dev/null \
|
||||
&& { echo "$@: skipping this check"; exit 0; }; \
|
||||
@@ -707,8 +720,11 @@ sc_check-AUTHORS: $(all_programs)
|
||||
# The second nm|grep checks for file-scope variables with `extern' scope.
|
||||
.PHONY: sc_tight_scope
|
||||
sc_tight_scope: $(bin_PROGRAMS)
|
||||
$(AM_V_GEN)t=exceptions-$$$$; \
|
||||
trap "s=$$?; rm -f $$t; exit $$s" 0 1 2 13 15; \
|
||||
@t=exceptions-$$$$; \
|
||||
trap 's=$$?; rm -f $$t; exit $$s' 0; \
|
||||
am__exit='(exit $s); exit $s'; \
|
||||
trap "s=129; $$am__exit" 1; trap "s=130; $$am__exit" 2; \
|
||||
trap "s=141; $$am__exit" 13; trap "s=143; $$am__exit" 15; \
|
||||
src=`for f in $(SOURCES); do \
|
||||
test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \
|
||||
hdr=`for f in $(noinst_HEADERS); do \
|
||||
|
||||
25
src/base64.c
25
src/base64.c
@@ -1,5 +1,5 @@
|
||||
/* Base64 encode/decode strings or files.
|
||||
Copyright (C) 2004-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Base64.
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "xstrtol.h"
|
||||
#include "quote.h"
|
||||
#include "quotearg.h"
|
||||
#include "xfreopen.h"
|
||||
|
||||
#include "base64.h"
|
||||
|
||||
@@ -61,16 +62,14 @@ Usage: %s [OPTION]... [FILE]\n\
|
||||
Base64 encode or decode FILE, or standard input, to standard output.\n\
|
||||
\n"), program_name);
|
||||
fputs (_("\
|
||||
-w, --wrap=COLS Wrap encoded lines after COLS character (default 76).\n\
|
||||
Use 0 to disable line wrapping.\n\
|
||||
\n\
|
||||
-d, --decode Decode data.\n\
|
||||
-i, --ignore-garbage When decoding, ignore non-alphabet characters.\n\
|
||||
-d, --decode decode data\n\
|
||||
-i, --ignore-garbage when decoding, ignore non-alphabet characters\n\
|
||||
-w, --wrap=COLS wrap encoded lines after COLS character (default 76).\n\
|
||||
Use 0 to disable line wrapping\n\
|
||||
\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
--help Display this help and exit.\n\
|
||||
--version Output version information and exit.\n"), stdout);
|
||||
fputs (HELP_OPTION_DESCRIPTION, stdout);
|
||||
fputs (VERSION_OPTION_DESCRIPTION, stdout);
|
||||
fputs (_("\
|
||||
\n\
|
||||
With no FILE, or when FILE is -, read standard input.\n"), stdout);
|
||||
@@ -291,10 +290,14 @@ main (int argc, char **argv)
|
||||
infile = "-";
|
||||
|
||||
if (STREQ (infile, "-"))
|
||||
input_fh = stdin;
|
||||
{
|
||||
if (O_BINARY)
|
||||
xfreopen (NULL, "rb", stdin);
|
||||
input_fh = stdin;
|
||||
}
|
||||
else
|
||||
{
|
||||
input_fh = fopen (infile, "r");
|
||||
input_fh = fopen (infile, "rb");
|
||||
if (input_fh == NULL)
|
||||
error (EXIT_FAILURE, errno, "%s", infile);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* basename -- strip directory and suffix from file names
|
||||
Copyright (C) 1990-1997, 1999-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-1997, 1999-2010 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* cat -- concatenate files and print on the standard output.
|
||||
Copyright (C) 88, 90, 91, 1995-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988, 1990-1991, 1995-2010 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* chcon -- change security context of files
|
||||
Copyright (C) 2005-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2010 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* chgrp -- change group ownership of files
|
||||
Copyright (C) 89, 90, 91, 1995-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989-1991, 1995-2010 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user