mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
252 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8dc5394183 | ||
|
|
ace9ef2a94 | ||
|
|
403e8e3b89 | ||
|
|
501ce81b6a | ||
|
|
53ee267945 | ||
|
|
ce0f286cce | ||
|
|
1487204385 | ||
|
|
4db3c6b5ea | ||
|
|
b80e2c7c25 | ||
|
|
9288068ff8 | ||
|
|
e6f4c34167 | ||
|
|
b2dfc3b5e5 | ||
|
|
80be785c95 | ||
|
|
324571ea4a | ||
|
|
18f5a8537c | ||
|
|
8b2bedadb5 | ||
|
|
a71537366e | ||
|
|
4e23ca47ac | ||
|
|
aec3e1e107 | ||
|
|
40f71538b6 | ||
|
|
1bc76356d2 | ||
|
|
6227c8e8de | ||
|
|
8d0b79afa5 | ||
|
|
03583f8d64 | ||
|
|
1c3654cb1f | ||
|
|
45b332f7ab | ||
|
|
e08b3e7c08 | ||
|
|
bfdb6b585b | ||
|
|
b56b53bd70 | ||
|
|
594292a1d8 | ||
|
|
0ec711b5c4 | ||
|
|
f69876e558 | ||
|
|
17a7e45927 | ||
|
|
fde07ff436 | ||
|
|
99679fff62 | ||
|
|
437fcf713c | ||
|
|
b3f6b33e4b | ||
|
|
3f31ec950b | ||
|
|
2a3a094e0d | ||
|
|
c20d0e17c3 | ||
|
|
8e5292dfb8 | ||
|
|
7a804b9af4 | ||
|
|
4f591fdd0b | ||
|
|
8e4e1d484f | ||
|
|
0ddfd54b08 | ||
|
|
56e8714e2b | ||
|
|
e0245ae0ae | ||
|
|
3ed0384c41 | ||
|
|
194c1e89a4 | ||
|
|
5bf48c1186 | ||
|
|
5f3115535b | ||
|
|
433a7c614f | ||
|
|
7525860fb9 | ||
|
|
e1788d9ed9 | ||
|
|
caaf2899f6 | ||
|
|
7cfd12c78e | ||
|
|
a132e03507 | ||
|
|
269665866d | ||
|
|
2895f44e89 | ||
|
|
e6067bcb04 | ||
|
|
43066fe2ca | ||
|
|
0f56019db8 | ||
|
|
275c831a3c | ||
|
|
6f95025c9d | ||
|
|
15571e0c8f | ||
|
|
c91b2a3c3b | ||
|
|
ee6c466ba8 | ||
|
|
5c3fd50a75 | ||
|
|
480c0dc9e7 | ||
|
|
beaf631292 | ||
|
|
b9fc790ddc | ||
|
|
2e636af1ef | ||
|
|
9f61806875 | ||
|
|
661413d8c3 | ||
|
|
ca637bff0e | ||
|
|
d5fa424a9c | ||
|
|
ee74c7d36d | ||
|
|
d846bc8bab | ||
|
|
4e9ab7d3d8 | ||
|
|
78ee2953bf | ||
|
|
84e5274f7e | ||
|
|
f8f57dd76b | ||
|
|
43d739e99c | ||
|
|
cc0645fc64 | ||
|
|
96a93f9480 | ||
|
|
aeed6c1d89 | ||
|
|
3aae01fa9b | ||
|
|
31dc21f693 | ||
|
|
08b7bce540 | ||
|
|
040b00ef19 | ||
|
|
5b11cd0179 | ||
|
|
199355e234 | ||
|
|
fc3c8e3cdd | ||
|
|
54602c76a0 | ||
|
|
0f91b6174e | ||
|
|
8da69cbf30 | ||
|
|
82c7f192bd | ||
|
|
f5743a6f20 | ||
|
|
3953f7523e | ||
|
|
cfbeeafd4a | ||
|
|
f4473df430 | ||
|
|
72b86ad4e8 | ||
|
|
790a4654ae | ||
|
|
ce3c73dddd | ||
|
|
0497a86f70 | ||
|
|
8ecb0c76c3 | ||
|
|
50040d07e1 | ||
|
|
0b9f65dc01 | ||
|
|
2db1433eab | ||
|
|
f3e78eeff2 | ||
|
|
a50ca679a1 | ||
|
|
d232c1cc20 | ||
|
|
6c81b97a58 | ||
|
|
a40a8fe1e5 | ||
|
|
3058ffa501 | ||
|
|
d6fad2aa33 | ||
|
|
5106653c26 | ||
|
|
dc05bc7ee2 | ||
|
|
f1a6f220f5 | ||
|
|
dff2b95e4f | ||
|
|
38cdb01a32 | ||
|
|
877ca5bf85 | ||
|
|
32626bde6d | ||
|
|
d4db0cb182 | ||
|
|
68a734d66b | ||
|
|
034e496e98 | ||
|
|
d255e40c37 | ||
|
|
56699864f6 | ||
|
|
5c501f6fba | ||
|
|
15ea577af7 | ||
|
|
8264fc615a | ||
|
|
4afbba7bac | ||
|
|
4f92531819 | ||
|
|
e0c6272ac3 | ||
|
|
6344402389 | ||
|
|
948828b208 | ||
|
|
7e72d4fe9d | ||
|
|
5c75d1da85 | ||
|
|
34ece0b0a1 | ||
|
|
0f9cf6b545 | ||
|
|
bdaef0686f | ||
|
|
1f0653066c | ||
|
|
aa9f02bc30 | ||
|
|
442b068ac1 | ||
|
|
eab97b3075 | ||
|
|
e1aaf8903d | ||
|
|
d95e3c8ceb | ||
|
|
11d864b36d | ||
|
|
3292610bce | ||
|
|
731f957965 | ||
|
|
db1034ddaf | ||
|
|
1c5987d2ef | ||
|
|
d5d283dbc9 | ||
|
|
f331653fe8 | ||
|
|
d6df8901bc | ||
|
|
b44b8f2b7d | ||
|
|
e43b19c4c8 | ||
|
|
9d6231ef2a | ||
|
|
257909013e | ||
|
|
9a008a9e24 | ||
|
|
6b3f52e94f | ||
|
|
278491d2cc | ||
|
|
44dbcae6b9 | ||
|
|
b0097f3d21 | ||
|
|
01211e9af7 | ||
|
|
bc4e77927c | ||
|
|
1d0a120377 | ||
|
|
83e0138480 | ||
|
|
8f90efd006 | ||
|
|
518b92a5e3 | ||
|
|
b795e60844 | ||
|
|
887d530e62 | ||
|
|
51f60a6237 | ||
|
|
056caf4857 | ||
|
|
a300cfd43c | ||
|
|
7ca55ef3d1 | ||
|
|
960fc61624 | ||
|
|
41159f9604 | ||
|
|
4a423bedea | ||
|
|
5947491895 | ||
|
|
0eaa993ae6 | ||
|
|
e66948c3b5 | ||
|
|
0e181024c0 | ||
|
|
eea8e7530b | ||
|
|
6d488ca041 | ||
|
|
c67a96c4c1 | ||
|
|
561f8be2c9 | ||
|
|
8e81a99c26 | ||
|
|
1b31ce6982 | ||
|
|
f3c584d1e0 | ||
|
|
33a5de5a0e | ||
|
|
14ad7a2550 | ||
|
|
8f40ed634c | ||
|
|
dcb3f60d0a | ||
|
|
0da4d84300 | ||
|
|
6d36bd4c64 | ||
|
|
0c70708db7 | ||
|
|
8351407f87 | ||
|
|
b212633c41 | ||
|
|
45ff91af2e | ||
|
|
ad61335bf8 | ||
|
|
9a9d69e9e4 | ||
|
|
27e997d0eb | ||
|
|
c9db0ac6de | ||
|
|
d1f7003556 | ||
|
|
621876ff44 | ||
|
|
195c455d0a | ||
|
|
a1629ba1ec | ||
|
|
231d8719f1 | ||
|
|
cd00fa6ee1 | ||
|
|
fb282c7b30 | ||
|
|
fb41e82c77 | ||
|
|
f2d977aff1 | ||
|
|
6f4279421d | ||
|
|
f35f4b3396 | ||
|
|
eb989f4b75 | ||
|
|
b6ef652e50 | ||
|
|
b5a25a996d | ||
|
|
038fcfcf1b | ||
|
|
0ec869e8be | ||
|
|
a5207bb139 | ||
|
|
3afda5f007 | ||
|
|
43d1112d01 | ||
|
|
fbb47bf424 | ||
|
|
b8cd747cc8 | ||
|
|
67f7ed3e3a | ||
|
|
013d95af11 | ||
|
|
be107398e5 | ||
|
|
dadca988af | ||
|
|
c2bdd17856 | ||
|
|
a71c22fdf0 | ||
|
|
cf90729e09 | ||
|
|
c1b41c5c3b | ||
|
|
ae5cfc9f12 | ||
|
|
8f9be76b0d | ||
|
|
a8c8484ee1 | ||
|
|
293c37b906 | ||
|
|
5c0275e953 | ||
|
|
11d3389f5a | ||
|
|
fbcc100f5b | ||
|
|
ff7f0ff85c | ||
|
|
f38becab02 | ||
|
|
30b74dfff1 | ||
|
|
01a27b9054 | ||
|
|
79adacc431 | ||
|
|
9ad13ad14a | ||
|
|
c8d570c2b3 | ||
|
|
0d1ba34494 | ||
|
|
f9cfda6ad2 | ||
|
|
b19733bb42 | ||
|
|
f70c7b785b | ||
|
|
ee6f187b18 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -75,9 +75,12 @@
|
||||
/src/version.h
|
||||
/stamp-h1
|
||||
/tests/*/*.log
|
||||
/tests/.built-programs
|
||||
/tests/t?
|
||||
/tests/test-suite.log
|
||||
ID
|
||||
Makefile
|
||||
Makefile.in
|
||||
TAGS
|
||||
THANKS
|
||||
THANKS-to-translators
|
||||
|
||||
27
.mailmap
27
.mailmap
@@ -1,10 +1,31 @@
|
||||
# Map git author names and email addresses to canonical/preferred form.
|
||||
<jim@meyering.net> <meyering@iou.iou>
|
||||
<jim@meyering.net> <meyering@redhat.com>
|
||||
<jim@meyering.net> <meyering@rho.meyering.net>
|
||||
<jim@meyering.net> <meyering@vm.meyering.net.localdomain>
|
||||
Paul R. Eggert <eggert@cs.ucla.edu> <eggert@penguin.cs.ucla.edu>
|
||||
Paul R. Eggert <eggert@cs.ucla.edu> <eggert@CS.UCLA.EDU>
|
||||
Paul Eggert <eggert@cs.ucla.edu> <eggert@penguin.cs.ucla.edu>
|
||||
Paul Eggert <eggert@cs.ucla.edu> <eggert@CS.UCLA.EDU>
|
||||
<eggert@cs.ucla.edu> <eggert@twinsun.com>
|
||||
|
||||
# Evan's two changes listed my email address.
|
||||
Evan Hunt <ethanol@armory.com> Evan Hunt <jim@meyering.net>
|
||||
|
||||
<P@draigBrady.com> <P@draigBrady.com (trivial change)>
|
||||
Pádraig Brady <p@draigbrady.com> <p@draigBrady.com>
|
||||
Pádraig Brady <p@draigBrady.com> <P@draigBrady.com>
|
||||
<chen.guo.0625@gmail.com> <chenguo4@yahoo.com>
|
||||
<chen.guo.0625@gmail.com> <chenguo4@ucla.edu>
|
||||
<schwab@linux-m68k.org> <schwab@suse.de>
|
||||
<aurel32@debian.org> <aurelien@aurel32.net>
|
||||
<bob@proulx.com> <rwp@fc.hp.com>
|
||||
<bkorb@gnu.org> <bkorb@veritas.com>
|
||||
<bruno@clisp.org> <haible@clisp.cons.org>
|
||||
<eblake@redhat.com> <ebb9@byu.net>
|
||||
<jrv@debian.org> <jrvz@comcast.net>
|
||||
<dave.anglin@nrc.ca> <dave@hiauly1.hia.nrc.ca>
|
||||
<psfales@alcatel-lucent.com> <psfales@lucent.com>
|
||||
|
||||
# Prefer spelled-out middle name and its address.
|
||||
Arne Henrik Juul <arnej@imf.unit.no> Arne H. Juul <arnej@solan.unit.no>
|
||||
|
||||
# Had email as name.
|
||||
Dan Jacobson <jidanni@jidanni.org> jidanni@jidanni.org <jidanni@jidanni.org>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.6
|
||||
8.10
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Suppress valgrind diagnostics we don't care about.
|
||||
|
||||
# Copyright (C) 2003-2004, 2006-2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2004, 2006-2011 Free Software Foundation, Inc.
|
||||
|
||||
# This 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 +0,0 @@
|
||||
^build-aux/check\.mk$
|
||||
@@ -1,7 +0,0 @@
|
||||
^gl/lib/randint\.c$
|
||||
^gl/tests/test-di-set\.c$
|
||||
^gl/tests/test-fadvise\.c$
|
||||
^gl/tests/test-ino-map\.c$
|
||||
^gl/tests/test-mbsalign\.c$
|
||||
^gl/tests/test-rand-isaac\.c$
|
||||
^lib/euidaccess-stat\.c$
|
||||
@@ -1 +0,0 @@
|
||||
build-aux/cvsu
|
||||
@@ -1,5 +0,0 @@
|
||||
ChangeLog
|
||||
NEWS
|
||||
src/df.c
|
||||
src/stat.c
|
||||
tests/misc/df-P
|
||||
@@ -1 +0,0 @@
|
||||
ChangeLog
|
||||
@@ -1 +0,0 @@
|
||||
^gl/
|
||||
@@ -1,3 +0,0 @@
|
||||
gl/lib/randint.c
|
||||
lib/euidaccess-stat.c
|
||||
gl/tests/.*\.c
|
||||
@@ -1 +0,0 @@
|
||||
src/seq.c
|
||||
@@ -1,2 +0,0 @@
|
||||
^m4/stat-prog\.m4$
|
||||
ChangeLog
|
||||
@@ -1 +0,0 @@
|
||||
^lib/euidaccess-stat\.c$
|
||||
@@ -1 +0,0 @@
|
||||
^tests/pr/
|
||||
@@ -1,4 +0,0 @@
|
||||
\.mk$
|
||||
/Makefile\.am$
|
||||
^tests/init\.sh$
|
||||
^tests/test-lib\.sh$
|
||||
@@ -1,2 +0,0 @@
|
||||
configure.ac
|
||||
ChangeLog*
|
||||
@@ -1,4 +0,0 @@
|
||||
src/system.h
|
||||
tests/du/2g
|
||||
old/fileutils/ChangeLog-1997
|
||||
ChangeLog-2005
|
||||
@@ -1 +0,0 @@
|
||||
ChangeLog
|
||||
@@ -1,7 +0,0 @@
|
||||
^GNUMakefile$
|
||||
Makefile\.am$
|
||||
\.mk$
|
||||
^tests/pr/
|
||||
ChangeLog.*
|
||||
^man/help2man$
|
||||
^gl/lib/.*\.c\.diff$
|
||||
@@ -1,9 +0,0 @@
|
||||
^lib/buffer-lcm\.c$
|
||||
^src/false\.c$
|
||||
^src/lbracket\.c$
|
||||
^src/ls-dir\.c$
|
||||
^src/ls-ls\.c$
|
||||
^src/ls-vdir\.c$
|
||||
^src/tac-pipe\.c$
|
||||
^src/uname-arch\.c$
|
||||
^src/uname-uname\.c$
|
||||
@@ -1,9 +0,0 @@
|
||||
^lib/buffer-lcm\.c$
|
||||
^src/false\.c$
|
||||
^src/lbracket\.c$
|
||||
^src/ls-dir\.c$
|
||||
^src/ls-ls\.c$
|
||||
^src/ls-vdir\.c$
|
||||
^src/tac-pipe\.c$
|
||||
^src/uname-arch\.c$
|
||||
^src/uname-uname\.c$
|
||||
@@ -1,12 +0,0 @@
|
||||
config(ure|\.(guess|sub))
|
||||
tests/pr
|
||||
lib/regex.c
|
||||
config-log
|
||||
tests/misc/nl
|
||||
po/de.po
|
||||
m4/lib-ld.m4
|
||||
m4/lib-prefix.m4
|
||||
m4/po.m4
|
||||
aclocal.m4
|
||||
src/c99-to-c89.diff
|
||||
^gl/lib/.*\.c\.diff$
|
||||
@@ -1,2 +0,0 @@
|
||||
config-log
|
||||
build-aux/config.guess
|
||||
@@ -1,3 +0,0 @@
|
||||
^src/libstdbuf\.c$
|
||||
^src/system\.h$
|
||||
^src/copy\.h$
|
||||
@@ -1 +0,0 @@
|
||||
^tests/pr/
|
||||
@@ -1,2 +0,0 @@
|
||||
^lib/xstrtol\.h$
|
||||
^build-aux/cvsu$
|
||||
@@ -1,13 +0,0 @@
|
||||
^build-aux/config.guess
|
||||
^configure
|
||||
^lib/alloca.c
|
||||
^lib/fts.c
|
||||
^lib/getdate.c
|
||||
^lib/getloadavg.c
|
||||
^lib/gettext.h
|
||||
^lib/getusershell.c
|
||||
^lib/mbswidth.c
|
||||
^lib/strtod.c
|
||||
^lib/xstrtol.c
|
||||
^m4/
|
||||
^tests/misc/pwd-unreadable-parent
|
||||
@@ -9086,7 +9086,7 @@
|
||||
|
||||
split's --verbose option did nothing [broken in 4.5.10 and 5.0]
|
||||
* src/split.c (longopts): Use `1', not `0' as the value for
|
||||
for &verbose. Reported by Keith Thompson.
|
||||
&verbose. Reported by Keith Thompson.
|
||||
|
||||
Test for the above fix.
|
||||
* tests/misc/split-a: Also use --verbose and compare stderr
|
||||
@@ -11609,7 +11609,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002-2005, 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2005, 2009-2011 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2011 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007, 2009-2011 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2008-2011 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
18
HACKING
18
HACKING
@@ -439,12 +439,12 @@ The forms to choose from are in gnulib's doc/Copyright/ directory.
|
||||
If you want to assign a single change, you should use the file,
|
||||
doc/Copyright/request-assign.changes:
|
||||
|
||||
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=doc/Copyright/request-assign.changes;hb=HEAD
|
||||
http://www.gnu.org/software/gnulib/Copyright/request-assign.changes
|
||||
|
||||
If you would like to assign past and future contributions to a project,
|
||||
you'd use doc/Copyright/request-assign.future:
|
||||
|
||||
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=doc/Copyright/request-assign.future;hb=HEAD
|
||||
http://www.gnu.org/software/gnulib/Copyright/request-assign.future
|
||||
|
||||
You may make assignments for up to four projects at a time.
|
||||
|
||||
@@ -468,10 +468,8 @@ versions of gcc and the linux kernel, and modern GNU tools.
|
||||
Ensure that your changes are indented properly.
|
||||
===============================================
|
||||
Format the code the way GNU indent does.
|
||||
In a file with the "indent-tabs-mode: nil" directive at the end,
|
||||
running "indent --no-tabs" should induce no change.
|
||||
With other files, there will be some existing differences.
|
||||
Try not to add any more.
|
||||
Filtering most source files through "indent --no-tabs" should
|
||||
induce no change in indentation. Try not to add any more.
|
||||
|
||||
|
||||
Avoid trailing white space
|
||||
@@ -484,13 +482,11 @@ Do not add any more trailing blanks anywhere. While "make syntax-check"
|
||||
will alert you if you slip up, it's better to nip any problem in the
|
||||
bud, as you're typing. A good way to help you adapt to this rule is
|
||||
to configure your editor to highlight any offending characters in the
|
||||
files you edit. If you use Emacs, customize its font-lock mode (FIXME:
|
||||
provide more detail) or try one of its whitespace packages. This appears
|
||||
to be the one that will end up in emacs 23:
|
||||
files you edit. If you use Emacs, customize its font-lock mode
|
||||
or use its WhiteSpace mode:
|
||||
|
||||
http://www.emacswiki.org/emacs/WhiteSpace
|
||||
|
||||
[that page says its version also works with emacs 21 and 22]
|
||||
If you use vim, add this to ~/.vimrc:
|
||||
|
||||
let c_space_errors=1
|
||||
@@ -582,7 +578,7 @@ Then just open the index.html file (in the generated lcov-html directory)
|
||||
in your favorite web browser.
|
||||
|
||||
========================================================================
|
||||
Copyright (C) 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009-2011 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
|
||||
|
||||
56
Makefile.am
56
Makefile.am
@@ -1,6 +1,6 @@
|
||||
# Make coreutils. -*-Makefile-*-
|
||||
|
||||
# Copyright (C) 1990, 1993-2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1990, 1993-2011 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -39,38 +39,13 @@ changelog_etc = \
|
||||
old/textutils/NEWS \
|
||||
po/ChangeLog-2007
|
||||
|
||||
syntax_check_exceptions = \
|
||||
.x-sc_GPL_version \
|
||||
.x-sc_bindtextdomain \
|
||||
.x-sc_error_message_uppercase \
|
||||
.x-sc_file_system \
|
||||
.x-sc_obsolete_symbols \
|
||||
.x-sc_po_check \
|
||||
.x-sc_program_name \
|
||||
.x-sc_prohibit_always-defined_macros \
|
||||
.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 \
|
||||
.x-sc_prohibit_strcmp \
|
||||
.x-sc_prohibit_tab_based_indentation \
|
||||
.x-sc_require_config_h \
|
||||
.x-sc_require_config_h_first \
|
||||
.x-sc_space_tab \
|
||||
.x-sc_sun_os_names \
|
||||
.x-sc_system_h_headers \
|
||||
.x-sc_trailing_blank \
|
||||
.x-sc_prohibit_always_true_header_tests \
|
||||
.x-sc_unmarked_diagnostics \
|
||||
.x-sc_useless_cpp_parens
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(changelog_etc) \
|
||||
$(syntax_check_exceptions) \
|
||||
.mailmap \
|
||||
.prev-version \
|
||||
.version \
|
||||
.vg-suppressions \
|
||||
THANKS.in \
|
||||
THANKS-to-translators \
|
||||
THANKStt.in \
|
||||
bootstrap \
|
||||
@@ -79,7 +54,8 @@ EXTRA_DIST = \
|
||||
cfg.mk \
|
||||
dist-check.mk \
|
||||
gl/modules/getloadavg.diff \
|
||||
maint.mk
|
||||
maint.mk \
|
||||
thanks-gen
|
||||
|
||||
ALL_RECURSIVE_TARGETS += install-root
|
||||
install-root:
|
||||
@@ -152,3 +128,25 @@ check-ls-dircolors:
|
||||
|sed -n '/^ *"/p'|tr , '\n'|sed 's/^ *//' \
|
||||
|sed -n 's/^"\(..\)"/\1/p'|sort -u); \
|
||||
test "$$dc" = "$$ls"
|
||||
|
||||
# Sort in traditional ASCII order, regardless of the current locale;
|
||||
# otherwise we may get into trouble with distinct strings that the
|
||||
# current locale considers to be equal.
|
||||
ASSORT = LC_ALL=C sort
|
||||
|
||||
# Extract all lines up to the first one starting with "##".
|
||||
prologue = perl -ne '/^\#\#/ and exit; print' $(srcdir)/THANKS.in
|
||||
|
||||
THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version
|
||||
$(AM_V_GEN) \
|
||||
{ \
|
||||
$(prologue); echo; \
|
||||
{ perl -ne '/^$$/.../^$$/ and print' $(srcdir)/THANKS.in \
|
||||
| grep -v '^$$' | perl -pe 's/ +/\0/'; \
|
||||
git log --pretty=format:'%aN%x00%aE' \
|
||||
| $(ASSORT) -u; \
|
||||
} | $(srcdir)/thanks-gen \
|
||||
| LC_ALL=en_US.UTF-8 sort -f; \
|
||||
echo; \
|
||||
printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \
|
||||
} > $@-t && mv $@-t $@
|
||||
|
||||
158
NEWS
158
NEWS
@@ -1,5 +1,149 @@
|
||||
GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
* Noteworthy changes in release 8.11 (2011-04-13) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
cp -a --link would not create a hardlink to a symlink, instead
|
||||
copying the symlink and then not preserving its timestamp.
|
||||
[bug introduced in coreutils-8.0]
|
||||
|
||||
cp now avoids FIEMAP issues with BTRFS before Linux 2.6.38,
|
||||
which could result in corrupt copies of sparse files.
|
||||
[bug introduced in coreutils-8.10]
|
||||
|
||||
cut could segfault when invoked with a user-specified output
|
||||
delimiter and an unbounded range like "-f1234567890-".
|
||||
[bug introduced in coreutils-5.3.0]
|
||||
|
||||
du would infloop when given --files0-from=DIR
|
||||
[bug introduced in coreutils-7.1]
|
||||
|
||||
sort no longer spawns 7 worker threads to sort 16 lines
|
||||
[bug introduced in coreutils-8.6]
|
||||
|
||||
touch built on Solaris 9 would segfault when run on Solaris 10
|
||||
[bug introduced in coreutils-8.8]
|
||||
|
||||
wc would dereference a NULL pointer upon an early out-of-memory error
|
||||
[bug introduced in coreutils-7.1]
|
||||
|
||||
** New features
|
||||
|
||||
dd now accepts the 'nocache' flag to the iflag and oflag options,
|
||||
which will discard any cache associated with the files, or
|
||||
processed portion thereof.
|
||||
|
||||
dd now warns that 'iflag=fullblock' should be used,
|
||||
in various cases where partial reads can cause issues.
|
||||
|
||||
** Changes in behavior
|
||||
|
||||
cp now avoids syncing files when possible, when doing a FIEMAP copy.
|
||||
The sync is only needed on Linux kernels before 2.6.39.
|
||||
[The sync was introduced in coreutils-8.10]
|
||||
|
||||
cp now copies empty extents efficiently, when doing a FIEMAP copy.
|
||||
It no longer reads the zero bytes from the input, and also can efficiently
|
||||
create a hole in the output file when --sparse=always is specified.
|
||||
|
||||
df now aligns columns consistently, and no longer wraps entries
|
||||
with longer device identifiers, over two lines.
|
||||
|
||||
install now rejects its long-deprecated --preserve_context option.
|
||||
Use --preserve-context instead.
|
||||
|
||||
test now accepts "==" as a synonym for "="
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.10 (2011-02-04) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
du would abort with a failed assertion when two conditions are met:
|
||||
part of the hierarchy being traversed is moved to a higher level in the
|
||||
directory tree, and there is at least one more command line directory
|
||||
argument following the one containing the moved sub-tree.
|
||||
[bug introduced in coreutils-5.1.0]
|
||||
|
||||
join --header now skips the ordering check for the first line
|
||||
even if the other file is empty. [bug introduced in coreutils-8.5]
|
||||
|
||||
rm -f no longer fails for EINVAL or EILSEQ on file systems that
|
||||
reject file names invalid for that file system.
|
||||
|
||||
uniq -f NUM no longer tries to process fields after end of line.
|
||||
[bug introduced in coreutils-7.0]
|
||||
|
||||
** New features
|
||||
|
||||
cp now copies sparse files efficiently on file systems with FIEMAP
|
||||
support (ext4, btrfs, xfs, ocfs2). Before, it had to read 2^20 bytes
|
||||
when copying a 1MiB sparse file. Now, it copies bytes only for the
|
||||
non-sparse sections of a file. Similarly, to induce a hole in the
|
||||
output file, it had to detect a long sequence of zero bytes. Now,
|
||||
it knows precisely where each hole in an input file is, and can
|
||||
reproduce them efficiently in the output file. mv also benefits
|
||||
when it resorts to copying, e.g., between file systems.
|
||||
|
||||
join now supports -o 'auto' which will automatically infer the
|
||||
output format from the first line in each file, to ensure
|
||||
the same number of fields are output for each line.
|
||||
|
||||
** Changes in behavior
|
||||
|
||||
join no longer reports disorder when one of the files is empty.
|
||||
This allows one to use join as a field extractor like:
|
||||
join -a1 -o 1.3,1.1 - /dev/null
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.9 (2011-01-04) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
split no longer creates files with a suffix length that
|
||||
is dependent on the number of bytes or lines per file.
|
||||
[bug introduced in coreutils-8.8]
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.8 (2010-12-22) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
cp -u no longer does unnecessary copying merely because the source
|
||||
has finer-grained time stamps than the destination.
|
||||
|
||||
od now prints floating-point numbers without losing information, and
|
||||
it no longer omits spaces between floating-point columns in some cases.
|
||||
|
||||
sort -u with at least two threads could attempt to read through a
|
||||
corrupted pointer. [bug introduced in coreutils-8.6]
|
||||
|
||||
sort with at least two threads and with blocked output would busy-loop
|
||||
(spinlock) all threads, often using 100% of available CPU cycles to
|
||||
do no work. I.e., "sort < big-file | less" could waste a lot of power.
|
||||
[bug introduced in coreutils-8.6]
|
||||
|
||||
sort with at least two threads no longer segfaults due to use of pointers
|
||||
into the stack of an expired thread. [bug introduced in coreutils-8.6]
|
||||
|
||||
sort --compress no longer mishandles subprocesses' exit statuses,
|
||||
no longer hangs indefinitely due to a bug in waiting for subprocesses,
|
||||
and no longer generates many more than NMERGE subprocesses.
|
||||
|
||||
sort -m -o f f ... f no longer dumps core when file descriptors are limited.
|
||||
|
||||
** Changes in behavior
|
||||
|
||||
sort will not create more than 8 threads by default due to diminishing
|
||||
performance gains. Also the --parallel option is no longer restricted
|
||||
to the number of available processors.
|
||||
|
||||
** New features
|
||||
|
||||
split accepts the --number option to generate a specific number of files.
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.7 (2010-11-13) [stable]
|
||||
|
||||
** Bug fixes
|
||||
@@ -23,10 +167,10 @@ GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
stat's %X, %Y, and %Z directives once again print only the integer
|
||||
part of seconds since the epoch. This reverts a change from
|
||||
coreutils-8.6, that was deemed unnecessarily disruptive. To obtain
|
||||
a nanosecond-precision floating point time stamp for %X use %.X;
|
||||
if you want (say) just 3 fractional digits, use %.3X. Likewise
|
||||
for %Y and %Z.
|
||||
coreutils-8.6, that was deemed unnecessarily disruptive.
|
||||
To obtain a nanosecond-precision time stamp for %X use %.X;
|
||||
if you want (say) just 3 fractional digits, use %.3X.
|
||||
Likewise for %Y and %Z.
|
||||
|
||||
stat's new %W format directive would print floating point seconds.
|
||||
However, with the above change to %X, %Y and %Z, we've made %W work
|
||||
@@ -279,7 +423,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
if it uses helper processes for compression and its parent
|
||||
ignores CHLD signals. [bug introduced in coreutils-6.9]
|
||||
|
||||
tail without -f no longer access uninitialized memory
|
||||
tail without -f no longer accesses uninitialized memory
|
||||
[bug introduced in coreutils-7.6]
|
||||
|
||||
timeout is now immune to the signal handling of its parent.
|
||||
@@ -408,7 +552,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
ls -LR exits with status 2, not 0, when it encounters a cycle
|
||||
|
||||
ls -is is now consistent with ls -lis in ignoring values returned
|
||||
"ls -is" is now consistent with ls -lis in ignoring values returned
|
||||
from a failed stat/lstat. For example ls -Lis now prints "?", not "0",
|
||||
for the inode number and allocated size of a dereferenced dangling symlink.
|
||||
|
||||
@@ -3093,7 +3237,7 @@ packages, see ./old/*/NEWS.
|
||||
|
||||
========================================================================
|
||||
|
||||
Copyright (C) 2001-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2011 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
|
||||
|
||||
2
README
2
README
@@ -232,7 +232,7 @@ the address on the last line of --help output.
|
||||
|
||||
========================================================================
|
||||
|
||||
Copyright (C) 1998, 2002-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 2002-2011 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
|
||||
|
||||
@@ -91,7 +91,7 @@ each program. One way to do this is to use vc-dwim
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -29,13 +29,15 @@ FIXME: enable excluded programs like arch? to get their manual pages?
|
||||
Run the following on at least one SELinux-enabled (enforcing) and
|
||||
one non-SELinux system:
|
||||
|
||||
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
|
||||
n=$(( ($(nproc) + 1) / 2 ))
|
||||
sudo env PATH="$PATH" NON_ROOT_USERNAME=$USER make -k -j$(nproc) check-root\
|
||||
&& make distcheck \
|
||||
&& make -j$n check RUN_VERY_EXPENSIVE_TESTS=yes RUN_EXPENSIVE_TESTS=yes
|
||||
|
||||
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.
|
||||
Note that the use of -j$n tells make to use approximately half of the
|
||||
available processing units. 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:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
# Convert this package for use with valgrind.
|
||||
|
||||
# Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -16,26 +16,34 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
# Convert Makefile.am files:
|
||||
# find tests -name Makefile.am | xargs grep -wl PATH|xargs perl -pi -e \
|
||||
# 's,src(\$\(PATH_SEPARATOR\)\$\$PATH),src/vg$1,'
|
||||
# find tests -name check.mk | xargs grep -wl PATH |
|
||||
# xargs perl -pi -e 's,src(\$\(PATH_SEPARATOR\)),src/vg$1,'
|
||||
# To restore:
|
||||
# find tests -name Makefile.am|xargs grep -wl PATH|xargs perl -pi -e 's,src/vg,src,'
|
||||
# find tests -name check.mk | xargs grep -wl PATH |
|
||||
# xargs perl -pi -e 's,src/vg,src,'
|
||||
#
|
||||
# Create this symlink for suppressions (this is no longer necessary,
|
||||
# with Linux kernel 2.6.9 and valgrind-2.2.0):
|
||||
# ln -s $PWD/.vg-suppressions /tmp/cu-vg
|
||||
|
||||
|
||||
# Create src/vg:
|
||||
|
||||
coreutils=$(echo 'spy:;@echo $(all_programs)' | (cd src; make -f Makefile -f - spy | tr -s '\n ' ' '))
|
||||
coreutils=$(echo 'spy:;@echo $(all_programs) $(noinst_PROGRAMS)' |
|
||||
(cd src; make -f Makefile -f - spy | tr -s '\n ' ' '))
|
||||
mkdir -p src/vg
|
||||
pwd=`pwd`
|
||||
srcdir=$pwd/src
|
||||
_path='export PATH='$srcdir':${PATH#*:}'
|
||||
pre='#!/bin/sh\n'"$_path"'\n'
|
||||
n=15
|
||||
vg='exec /usr/bin/valgrind --suppressions=/tmp/cu-vg --log-fd=3 --leak-check=yes --track-fds=yes --leak-check=full --num-callers='$n
|
||||
n=15 # stack trace depth
|
||||
log_fd=3 # One can redirect this to file like 3>vg.log
|
||||
test -e /tmp/cu-vg && suppressions='--supressions=/tmp/cu-vg'
|
||||
vg="exec /usr/bin/valgrind $suppressions --log-fd=$log_fd \
|
||||
--leak-check=yes --track-fds=yes --leak-check=full --num-callers=$n"
|
||||
cat <<EOF > src/vg/gen
|
||||
for i in $coreutils; do
|
||||
printf "$pre$vg -- \$i"' "\$@"\n' > \$i
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
These people have contributed to the GNU coreutils (formerly, the fileutils,
|
||||
textutils, and/or sh-utils packages). Some have reported problems, others
|
||||
have contributed improvements to the documentation, actual code, and even
|
||||
complete programs. Those contributions are described in the ChangeLog
|
||||
files. If your name has been left out, if you'd rather not be listed,
|
||||
or if you'd prefer a different address be used, please send a note to
|
||||
the bug-report mailing list (as seen on last line of e.g., cp --help).
|
||||
complete programs. Those contributions are described in the version control
|
||||
logs and ChangeLog files. If your name has been left out, if you'd rather
|
||||
not be listed, or if you'd prefer a different address be used, please send a
|
||||
note to the bug-report mailing list (as seen at end of e.g., cp --help).
|
||||
##
|
||||
## There is no need to list here any name that appears as an Author in
|
||||
## "git log" output. Those are automatically added when this template
|
||||
## is used to generate the THANKS file. Note that numerous people listed
|
||||
## here would have been listed as commit authors if we had been using git
|
||||
## for version control when they contributed.
|
||||
|
||||
??? kytek@cybercomm.net
|
||||
A Costa agcosta@gis.net
|
||||
Aaron Burgemeister dajoker@gmail.com
|
||||
Aaron Hawley ashawley@uvm.edu
|
||||
Achim Blumensath blume@corona.oche.de
|
||||
Adam Jimerson vendion@charter.net
|
||||
@@ -39,12 +44,10 @@ Andreas Frische andreasfrische@gmail.com
|
||||
Andreas Gruenbacher ag@bestbits.at
|
||||
Andreas Jaeger jaeger@gnu.org
|
||||
Andreas Luik luik@isa.de
|
||||
Andreas Schwab schwab@linux-m68k.org
|
||||
Andreas Stolcke stolcke@ICSI.Berkeley.EDU
|
||||
Andrei Gaponenko andr@triumf.ca
|
||||
Andres Soolo andres@soolo.matti.ee
|
||||
Andrew Burgess aab@cichlid.com
|
||||
Andrew Church achurch@achurch.org
|
||||
Andrew Dalke dalke@bioreason.com
|
||||
Andrew Fabbro andrew@fabbro.org
|
||||
Andrew Pham andpha@us.ibm.com
|
||||
@@ -56,23 +59,21 @@ Anthony Thyssen anthony@griffith.edu.au
|
||||
Antonio Rendas ajrendas@yahoo.com
|
||||
Ariel Faigon ariel@cthulhu.engr.sgi.com
|
||||
Arjan Opmeer arjan.opmeer@gmail.com
|
||||
Arne H. Juul arnej@solan.unit.no
|
||||
Arne Henrik Juul arnej@imf.unit.no
|
||||
Arnold Robbins arnold@skeeve.com
|
||||
Arthur Pool pool@commerce.uq.edu.au
|
||||
Arun Sharma arun.sharma@intel.com
|
||||
Arvind Autar Autar022@planet.nl
|
||||
Augey Mikus mikus@dqc.org
|
||||
Aurelien Jarno aurel32@debian.org
|
||||
Austin Donnelly Austin.Donnelly@cl.cam.ac.uk
|
||||
Axel Kittenberger Anshil@gmx.net
|
||||
Barry Kelly http://barrkel.blogspot.com/
|
||||
Bauke Jan Douma bjdouma@xs4all.nl
|
||||
Ben Elliston bje@air.net.au
|
||||
Ben Harris bjh21@netbsd.org
|
||||
Ben Walton bwalton@artsci.utoronto.ca
|
||||
Bengt Martensson bengt@mathematik.uni-Bremen.de
|
||||
Benjamin Cutler cutlerbc@simla.colostate.edu
|
||||
Benno Schulenberg bensberg@justemail.net
|
||||
Bernard Giroud bernard.giroud@creditlyonnais.ch
|
||||
Bernd Eckenfels ecki@debian.org
|
||||
Bernd Leibing bernd.leibing@rz.uni-ulm.de
|
||||
@@ -87,17 +88,13 @@ Bill Brelsford wb@k2di.net
|
||||
Bill Peters peters@gaffel.as.arizona.edu
|
||||
Bjorn Helgaas helgaas@rsn.hp.com
|
||||
Bob McCracken kerouac@ravenet.com
|
||||
Bob Proulx rwp@fc.hp.com
|
||||
Branden Robinson branden@necrotic.deadbeast.net
|
||||
Brendan O'Dea bod@compusol.com.au
|
||||
Brian Kimball bfk@footbag.org
|
||||
Brian M. Carlson sandals@crustytoothpaste.ath.cx
|
||||
Brian Silverman bsilverman@conceptxdesign.com
|
||||
Brian Youmans 3diff@gnu.org
|
||||
Bruce Korb bkorb@veritas.com
|
||||
Bruce Robertson brucer@theodolite.dyndns.org
|
||||
Bruno Haible haible@clisp.cons.org
|
||||
C de-Avillez hggdh2@gmail.com
|
||||
Carl Johnson carlj@cjlinux.home.org
|
||||
Carl Lowenstein cdl@mpl.UCSD.EDU
|
||||
Carl Roth roth@urs.us
|
||||
@@ -122,7 +119,6 @@ Christophe LYON christophe.lyon@st.com
|
||||
Chuck Hedrick hedrick@klinzhai.rutgers.edu
|
||||
Clark Morgan cmorgan@aracnet.com
|
||||
Clement Wang clem.wang@overture.com
|
||||
Cliff Miller cbm@whatexit.org
|
||||
Colin Plumb colin@nyx.net
|
||||
Colin Watson cjw44@riva.ucam.org
|
||||
Collin Rogowski collin@rogowski.de
|
||||
@@ -132,11 +128,8 @@ Cyril Bouthors cyril@bouthors.org
|
||||
Dale Scheetz dwarf@polaris.net
|
||||
Dameon G. Rogers dgr03@uark.edu
|
||||
Dan Hagerty hag@gnu.ai.it.edu
|
||||
Dan Hipschman dsh@linux.ucla.edu
|
||||
Dan Jacobson jidanni@jidanni.org
|
||||
Dan Pascu dan@services.iiruc.ro
|
||||
Daniel Bergstrom noa@melody.se
|
||||
Daniel Dunbar ddunbar@stanford.edu
|
||||
Daniel P. Berrangé berrange@redhat.com
|
||||
Dániel Varga danielv@axelero.hu
|
||||
Danny Levinson danny.levinson@overture.com
|
||||
@@ -144,7 +137,6 @@ Darrel Francis d.francis@cheerful.com
|
||||
Darren Salt ds@youmustbejoking.demon.co.uk
|
||||
Dave Beckett dajobe@dajobe.org
|
||||
David Alan Gilbert gilbertd@treblig.org
|
||||
David Bartley dtbartle@csclub.uwaterloo.ca
|
||||
David Dyck dcd@tc.fluke.COM
|
||||
David Eisner cradle@umd.edu
|
||||
David Flynn dav@chess.plus.com
|
||||
@@ -165,14 +157,12 @@ Dick Streefland dick_streefland@tasking.com
|
||||
Dirk Lattermann dlatt@t-online.de
|
||||
Dirk-Jan Faber djfaber@snow.nl
|
||||
Dmitry Rutsky rutsky@school.ioffe.rssi.ru
|
||||
Dmitry V. Levin ldv@altlinux.org
|
||||
Don Parsons dparsons@synapse.kent.edu
|
||||
Donni Erpel donald@appc11.gsi.de
|
||||
Doug Coleman coleman@iarc1.ece.utexas.edu
|
||||
Doug McLaren dougmc@comco.com
|
||||
Dragos Harabor dharabor@us.oracle.com
|
||||
Duncan Roe duncanr@optimation.com.au
|
||||
Ed Avis ed@membled.com
|
||||
Edward Welbourne eddy@opera.com
|
||||
Edzer Pebesma Edzer.Pebesma@rivm.nl
|
||||
Egmont Koblinger egmont@uhulinux.hu
|
||||
@@ -180,18 +170,14 @@ Eirik Fuller eirik@hackrat.com
|
||||
Eivind eivindt@multinet.no
|
||||
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
|
||||
Eric G. Miller egm2@jps.net
|
||||
Eric Pemente pemente@northpark.edu
|
||||
Eric S. Raymond esr@snark.thyrsus.com
|
||||
Erik Bennett bennett@cvo.oneworld.com
|
||||
Erik Corry erik@kroete2.freinet.de
|
||||
Evan Hunt ethanol@armory.com
|
||||
Felix Lee flee@teleport.com
|
||||
Felix Rauch Valenti frauch@cse.unsw.edu.au
|
||||
Ferdinand fw@scenic.mine.nu
|
||||
@@ -221,7 +207,6 @@ Geoff Whale geoffw@cse.unsw.EDU.AU
|
||||
Gerald Pfeifer gerald@pfeifer.com
|
||||
Gerhard Poul gpoul@gnu.org
|
||||
Germano Leichsenring germano@jedi.cs.kobe-u.ac.jp
|
||||
Gilles Espinasse g.esp@free.fr
|
||||
Glen Lenker glen.lenker@gmail.com
|
||||
Göran Uddeborg goeran@uddeborg.se
|
||||
Guochun Shi gshi@ncsa.uiuc.edu
|
||||
@@ -266,10 +251,8 @@ James Antill jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
||||
James Lemley James.Lemley@acxiom.com
|
||||
James Hunt jamesodhunt@hotmail.com
|
||||
James Ralston ralston@pobox.com
|
||||
James R. Van Zandt jrvz@comcast.net
|
||||
James Sneeringer jvs@ocslink.com
|
||||
James Tanis jtt@soscorp.com
|
||||
James Youngman jay@gnu.org
|
||||
Jamie Lokier jamie@imbolc.ucc.ie
|
||||
Jamie McClelland jm@mayfirst.org
|
||||
Jan Engelhardt jengelh@medozas.de
|
||||
@@ -297,13 +280,11 @@ Jim Dennis jimd@starshine.org
|
||||
Joakim Rosqvist dvljrt@cs.umu.se
|
||||
Jochen Hein jochen@jochen.org
|
||||
Joe Orton joe@manyfish.co.uk
|
||||
Joel E. Denny jdenny@clemson.edu
|
||||
Joerg Sonnenberger joerg@britannica.bec.de
|
||||
Joey Hess joeyh@debian.org
|
||||
Johan Boule bohan@bohan.dyndns.org
|
||||
Johan Danielsson joda@pdc.kth.se
|
||||
John Bley jbb6@acpub.duke.edu
|
||||
John David Anglin dave.anglin@nrc.ca
|
||||
John Gatewood Ham zappaman@alphabox.compsci.buu.ac.th
|
||||
John Gotts jgotts@umich.edu
|
||||
John Kendall kendall@capps.com
|
||||
@@ -342,7 +323,6 @@ 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
|
||||
@@ -362,6 +342,7 @@ M. P. Suzuki mpsuzuki@hiroshima-u.ac.jp
|
||||
Maciej Kwapulinski pikpok@univ.gda.pl
|
||||
Manas Garg manas@cygsoft.com
|
||||
Manfred Hollstein manfred@s-direktnet.de
|
||||
Марк Коренберг socketpair@gmail.com
|
||||
Marc Boucher marc@mbsi.ca
|
||||
Marc Haber mh+debian-bugs@zugschlus.de
|
||||
Marc Lehman schmorp@schmorp.de
|
||||
@@ -407,7 +388,6 @@ Matthew Clarke Matthew_Clarke@mindlink.bc.ca
|
||||
Matthew S. Levine mslevine@theory.lcs.mit.edu
|
||||
Matthew Smith matts@bluesguitar.org
|
||||
Matthew Swift swift@alum.mit.edu
|
||||
Matthew Woehlke mw_triad@users.sourceforge.net
|
||||
Matthias Urlichs smurf@noris.de
|
||||
Matti Aarnio matti.aarnio@zmailer.org
|
||||
Mathias Brodala info@noctus.net
|
||||
@@ -426,9 +406,7 @@ Michael J. Croghan mcroghan@usatoday.com
|
||||
Michael McFarland sidlon@yahoo.com
|
||||
Michael McLagan mmclagan@invlogic.com
|
||||
Michael Piefel piefel@informatik.hu-berlin.de
|
||||
Michael Speer knomenet@gmail.com
|
||||
Michael Steffens michael.steffens@s.netic.de
|
||||
Michael Stone mstone@debian.org
|
||||
Michael Stutz stutz@dsl.org
|
||||
Michael van Elst mlelstv@dev.de.cw.net
|
||||
Michael Veksler mveksler@techunix.technion.ac.il
|
||||
@@ -437,11 +415,9 @@ Michal Politowski mpol@charybda.icm.edu.pl
|
||||
Michal Svec msvec@suse.cz
|
||||
Michel Robitaille robitail@IRO.UMontreal.CA
|
||||
Michiel Bacchiani bacchian@raven.bu.edu
|
||||
Mikael Magnusson mikachu@gmail.com
|
||||
Mike Castle dalgoda@ix.netcom.com
|
||||
Mike Coleman mkc@mathdogs.com
|
||||
Mike Jetzer mjetzer@mke.catalystwms.com
|
||||
Mike Frysinger vapier@gentoo.org
|
||||
Mikko Tuumanen m@sorvankyla.yok.utu.fi
|
||||
Mikulas Patocka mikulas@artax.karlin.mff.cuni.cz
|
||||
Miles Bader miles@gnu.ai.mit.edu
|
||||
@@ -469,10 +445,8 @@ Olivier Fourdan ofourdan@redhat.com
|
||||
Ørn E. Hansen oehansen@daimi.aau.dk
|
||||
Oskar Liljeblad osk@hem.passagen.se
|
||||
Otavio Salvador otavio@ossystems.com.br
|
||||
Pádraig Brady P@draigBrady.com
|
||||
Patrick Mauritz oxygene@studentenbude.ath.cx
|
||||
Paul D. Smith psmith@gnu.org
|
||||
Paul Eggert eggert@twinsun.com
|
||||
Paul Ghaleb paul.ghaleb@st.com
|
||||
Paul Jarc prj@po.cwru.edu
|
||||
Paul Nevai nevai@ops.mps.ohio-state.edu
|
||||
@@ -487,17 +461,14 @@ Per Starbäck starback@stp.lingfil.uu.se
|
||||
Peter Breitenlohner peb@mppmu.mpg.de
|
||||
Peter Dyballa peter_dyballa@web.de
|
||||
Peter Eriksson peter@ifm.liu.se
|
||||
Peter Fales psfales@lucent.com
|
||||
Peter Horst peter@ointment.org
|
||||
Peter Moulder reiter@netspace.net.au
|
||||
Peter O'Gorman bug-coreutils@mlists.thewrittenword.com
|
||||
Peter Samuelson psamuels@sampo.creighton.edu
|
||||
Peter Seebach seebs@taniemarie.solon.com
|
||||
Petr Uzel petr.uzel@suse.cz
|
||||
Petter Reinholdtsen pere@hungry.com
|
||||
Phelippe Neveu pneveu@pcigeomatics.com
|
||||
Phil Richards phil.richards@vf.vodafone.co.uk
|
||||
Philip Rowlands phr@doc.ic.ac.uk
|
||||
Philippe De Muyter phdm@macqel.be
|
||||
Philippe Schnoebelen Philippe.Schnoebelen@imag.fr
|
||||
Phillip Jones mouse@datastacks.com
|
||||
@@ -509,12 +480,9 @@ Prashant TR tr@eth.net
|
||||
Priit Jõerüüt jemm4jemm@yahoo.com
|
||||
Rainer Orth ro@TechFak.Uni-Bielefeld.DE
|
||||
Ralf W. Stephan stephan@tmt.de
|
||||
Ralf Wildenhues Ralf.Wildenhues@gmx.de
|
||||
Ralph Loader loader@maths.ox.ac.uk
|
||||
Raul Miller moth@magenta.com
|
||||
Raúl Núñez de Arenas Coronado raul@pleyades.net
|
||||
Reuben Thomas rrt@sc3d.org
|
||||
Yang Ren ryang@redhat.com
|
||||
Richard A Downing richard.downing@bcs.org.uk
|
||||
Richard Braakman dark@xs4all.nl
|
||||
Richard Dawe rich@phekda.freeserve.co.uk
|
||||
@@ -550,13 +518,14 @@ Scott Harrison scott.gnu.2009@scottrix.co.uk
|
||||
Scott Lurndal slurn@griffin.engr.sgi.com
|
||||
Sébastien Maret smaret@umich.edu
|
||||
Sergei Steshenko sergstesh@yahoo.com
|
||||
Sergey Vlasov vsu@altlinux.org
|
||||
Shing-Shong Shei shei@cs.indiana.edu
|
||||
Soeren Sonnenburg sonnenburg@informatik.hu-berlin.de
|
||||
Solar Designer solar@owl.openwall.com
|
||||
Stanislav Ievlev inger@altlinux.ru
|
||||
Stavros Passas stabat@ics.forth.gr
|
||||
Stefan Vargyas stvar@yahoo.com
|
||||
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
|
||||
@@ -573,13 +542,11 @@ 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
|
||||
Szakacsits Szabolcs szaka@sienet.hu
|
||||
Tadayoshi Funaba tadf@kt.rim.or.jp
|
||||
TAKAI Kousuke takai@vlsi.kuee.kyoto-u.ac.jp
|
||||
Theodore Ts'o tytso@rsts-11.mit.edu
|
||||
The Wanderer inverseparadox@comcast.net
|
||||
Theodoros V. Kalamatianos nyb@users.sourceforge.net
|
||||
Thomas Bushnell thomas@gnu.ai.mit.edu
|
||||
Thomas Goerlich thomas@schnappmatik.de
|
||||
Thomas Hood jdthood@yahoo.co.uk
|
||||
@@ -593,8 +560,6 @@ Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
|
||||
Tim Ryan Tim_Ryan@bnz.co.nz
|
||||
Tim Smithers mouse@dmouse.com.au
|
||||
Tim Waugh twaugh@redhat
|
||||
Tobias Quathamer toddy@debian.org
|
||||
Tobias Stoeckmann tobias@bugol.de
|
||||
Toby Peterson toby@opendarwin.org
|
||||
Todd A. Jacobs tjacobs@codegnome.org
|
||||
Tom Fitzhenry tom@tom-fitzhenry.me.uk
|
||||
@@ -640,10 +605,10 @@ Wis Macomson wis.macomson@intel.com
|
||||
Wojciech Purczynski cliph@isec.pl
|
||||
Wolfram Kleff kleff@cs.uni-bonn.de
|
||||
Won-kyu Park wkpark@chem.skku.ac.kr
|
||||
Yang Ren ryang@redhat.com
|
||||
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:
|
||||
;; coding: utf-8
|
||||
2
TODO
2
TODO
@@ -168,7 +168,7 @@ pr's use of nstrftime can make it malloc a very large (up to SIZE_MAX) buffer
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
125
bootstrap
125
bootstrap
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2010-10-08.16; # UTC
|
||||
scriptversion=2011-03-03.12; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2011 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -42,24 +42,32 @@ local_gl_dir=gl
|
||||
bt='._bootmp'
|
||||
bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
|
||||
bt2=${bt}2
|
||||
me=$0
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTION]...
|
||||
Usage: $me [OPTION]...
|
||||
Bootstrap this package from the checked-out sources.
|
||||
|
||||
Options:
|
||||
--gnulib-srcdir=DIRNAME Specify the local directory where gnulib
|
||||
--gnulib-srcdir=DIRNAME specify the local directory where gnulib
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
do not want to waste your bandwidth downloading
|
||||
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.
|
||||
--skip-po Do not download po files.
|
||||
them again. Defaults to \$GNULIB_SRCDIR
|
||||
--bootstrap-sync if this bootstrap script is not identical to
|
||||
the version in the local gnulib sources,
|
||||
update this script, and then restart it with
|
||||
/bin/sh or the shell \$CONFIG_SHELL
|
||||
--no-bootstrap-sync do not check whether bootstrap is out of sync
|
||||
--copy copy files instead of creating symbolic links
|
||||
--force attempt to bootstrap even if the sources seem
|
||||
not to have been checked out
|
||||
--no-git do not use git to update gnulib. Requires that
|
||||
--gnulib-srcdir point to a correct gnulib snapshot
|
||||
--skip-po do not download po files
|
||||
|
||||
If the file $0.conf exists in the same directory as this script, its
|
||||
If the file $me.conf exists in the same directory as this script, its
|
||||
contents are read as shell variables to configure the bootstrap.
|
||||
|
||||
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||
@@ -168,6 +176,13 @@ copy=false
|
||||
# on which version control system (if any) is used in the source directory.
|
||||
vc_ignore=auto
|
||||
|
||||
# Set this to true in bootstrap.conf to enable --bootstrap-sync by
|
||||
# default.
|
||||
bootstrap_sync=false
|
||||
|
||||
# Use git to update gnulib sources
|
||||
use_git=true
|
||||
|
||||
# find_tool ENVVAR NAMES...
|
||||
# -------------------------
|
||||
# Search for a required program. Use the value of ENVVAR, if set,
|
||||
@@ -192,11 +207,11 @@ find_tool ()
|
||||
find_tool_error_prefix="\$$find_tool_envvar: "
|
||||
fi
|
||||
if test x"$find_tool_res" = x; then
|
||||
echo >&2 "$0: one of these is required: $find_tool_names"
|
||||
echo >&2 "$me: one of these is required: $find_tool_names"
|
||||
exit 1
|
||||
fi
|
||||
($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
|
||||
echo >&2 "$0: ${find_tool_error_prefix}cannot run $find_tool_res --version"
|
||||
echo >&2 "$me: ${find_tool_error_prefix}cannot run $find_tool_res --version"
|
||||
exit 1
|
||||
}
|
||||
eval "$find_tool_envvar=\$find_tool_res"
|
||||
@@ -239,12 +254,25 @@ do
|
||||
checkout_only_file=;;
|
||||
--copy)
|
||||
copy=true;;
|
||||
--bootstrap-sync)
|
||||
bootstrap_sync=true;;
|
||||
--no-bootstrap-sync)
|
||||
bootstrap_sync=false;;
|
||||
--no-git)
|
||||
use_git=false;;
|
||||
*)
|
||||
echo >&2 "$0: $option: unknown option"
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if $use_git || test -d "$GNULIB_SRCDIR"; then
|
||||
:
|
||||
else
|
||||
echo "$0: Error: --no-git requires --gnulib-srcdir" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2
|
||||
exit 1
|
||||
@@ -344,17 +372,18 @@ get_version() {
|
||||
$app --version >/dev/null 2>&1 || return 1
|
||||
|
||||
$app --version 2>&1 |
|
||||
sed -n '# extract version within line
|
||||
s/.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
|
||||
t done
|
||||
sed -n '# Move version to start of line.
|
||||
s/.*[v ]\([0-9]\)/\1/
|
||||
|
||||
# extract version at start of line
|
||||
s/^\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
|
||||
t done
|
||||
# Skip lines that do not start with version.
|
||||
/^[0-9]/!d
|
||||
|
||||
d
|
||||
# Remove characters after the version.
|
||||
s/[^.a-z0-9-].*//
|
||||
|
||||
# The first component must be digits only.
|
||||
s/^\([0-9]*\)[a-z-].*/\1/
|
||||
|
||||
:done
|
||||
#the following essentially does s/5.005/5.5/
|
||||
s/\.0*\([1-9]\)/.\1/g
|
||||
p
|
||||
@@ -369,18 +398,22 @@ check_versions() {
|
||||
if test "$app" = libtool; then
|
||||
app=libtoolize
|
||||
fi
|
||||
# Exempt git if --no-git is in effect.
|
||||
if test "$app" = git; then
|
||||
$use_git || continue
|
||||
fi
|
||||
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
||||
appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
|
||||
test "$appvar" = TAR && appvar=AMTAR
|
||||
eval "app=\${$appvar-$app}"
|
||||
inst_ver=$(get_version $app)
|
||||
if [ ! "$inst_ver" ]; then
|
||||
echo "Error: '$app' not found" >&2
|
||||
echo "$me: Error: '$app' not found" >&2
|
||||
ret=1
|
||||
elif [ ! "$req_ver" = "-" ]; then
|
||||
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
||||
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
||||
echo "Error: '$app' version == $inst_ver is too old" >&2
|
||||
echo "$me: Error: '$app' version == $inst_ver is too old" >&2
|
||||
echo " '$app' version >= $req_ver is required" >&2
|
||||
ret=1
|
||||
fi
|
||||
@@ -413,9 +446,9 @@ fi
|
||||
if ! printf "$buildreq" | check_versions; then
|
||||
echo >&2
|
||||
if test -f README-prereq; then
|
||||
echo "See README-prereq for how to get the prerequisite programs" >&2
|
||||
echo "$0: See README-prereq for how to get the prerequisite programs" >&2
|
||||
else
|
||||
echo "Please install the prerequisite programs" >&2
|
||||
echo "$0: Please install the prerequisite programs" >&2
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
@@ -427,11 +460,11 @@ if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
||||
if git config merge.merge-changelog.driver >/dev/null ; then
|
||||
:
|
||||
elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then
|
||||
echo "initializing git-merge-changelog driver"
|
||||
echo "$0: initializing git-merge-changelog driver"
|
||||
git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
|
||||
git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
|
||||
else
|
||||
echo "consider installing git-merge-changelog from gnulib"
|
||||
echo "$0: consider installing git-merge-changelog from gnulib"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -447,7 +480,7 @@ git_modules_config () {
|
||||
}
|
||||
|
||||
gnulib_path=`git_modules_config submodule.gnulib.path`
|
||||
: ${gnulib_path=gnulib}
|
||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||
|
||||
# Get gnulib files.
|
||||
|
||||
@@ -500,6 +533,16 @@ case ${GNULIB_SRCDIR--} in
|
||||
;;
|
||||
esac
|
||||
|
||||
if $bootstrap_sync; then
|
||||
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
|
||||
echo "$0: updating bootstrap and restarting..."
|
||||
exec sh -c \
|
||||
'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
|
||||
-- "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
||||
"$0" "$@" --no-bootstrap-sync
|
||||
}
|
||||
fi
|
||||
|
||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||
<$gnulib_tool || exit
|
||||
|
||||
@@ -508,7 +551,7 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||
download_po_files() {
|
||||
subdir=$1
|
||||
domain=$2
|
||||
echo "$0: getting translations into $subdir for $domain..."
|
||||
echo "$me: getting translations into $subdir for $domain..."
|
||||
cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
|
||||
eval "$cmd"
|
||||
}
|
||||
@@ -542,7 +585,7 @@ update_po_files() {
|
||||
! test -f "$po_dir/$po.po" ||
|
||||
! $SHA1SUM -c --status "$cksum_file" \
|
||||
< "$new_po" > /dev/null; then
|
||||
echo "updated $po_dir/$po.po..."
|
||||
echo "$me: updated $po_dir/$po.po..."
|
||||
cp "$new_po" "$po_dir/$po.po" \
|
||||
&& $SHA1SUM < "$new_po" > "$cksum_file"
|
||||
fi
|
||||
@@ -587,13 +630,13 @@ symlink_to_dir()
|
||||
if $copy; then
|
||||
{
|
||||
test ! -h "$dst" || {
|
||||
echo "$0: rm -f $dst" &&
|
||||
echo "$me: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
} &&
|
||||
test -f "$dst" &&
|
||||
cmp -s "$src" "$dst" || {
|
||||
echo "$0: cp -fp $src $dst" &&
|
||||
echo "$me: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
}
|
||||
else
|
||||
@@ -607,7 +650,7 @@ symlink_to_dir()
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
echo >&2 "$0: invalid symlink calculation: $src -> $dst"
|
||||
echo >&2 "$me: invalid symlink calculation: $src -> $dst"
|
||||
exit 1;;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
@@ -615,7 +658,7 @@ symlink_to_dir()
|
||||
esac;;
|
||||
esac
|
||||
|
||||
echo "$0: ln -fs $dot_dots$src $dst" &&
|
||||
echo "$me: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
}
|
||||
fi
|
||||
@@ -648,7 +691,7 @@ cp_mark_as_generated()
|
||||
cmp -s "$cp_src" "$cp_dst" || {
|
||||
# Copy the file first to get proper permissions if it
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
echo "$0: cp -f $cp_src $cp_dst" &&
|
||||
echo "$me: cp -f $cp_src $cp_dst" &&
|
||||
rm -f "$cp_dst" &&
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
|
||||
@@ -666,7 +709,7 @@ cp_mark_as_generated()
|
||||
if cmp -s "$cp_dst-t" "$cp_dst"; then
|
||||
rm -f "$cp_dst-t"
|
||||
else
|
||||
echo "$0: cp $cp_src $cp_dst # with edits" &&
|
||||
echo "$me: cp $cp_src $cp_dst # with edits" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
fi
|
||||
fi
|
||||
@@ -685,7 +728,7 @@ version_controlled_file() {
|
||||
elif test -d .svn; then
|
||||
svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
else
|
||||
echo "$0: no version control for $dir/$file?" >&2
|
||||
echo "$me: no version control for $dir/$file?" >&2
|
||||
fi
|
||||
test $found = yes
|
||||
}
|
||||
@@ -709,18 +752,18 @@ slurp() {
|
||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||
sed "$remove_intl" $1/$dir/$file |
|
||||
cmp - $dir/$gnulib_mk > /dev/null || {
|
||||
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
echo "$me: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
rm -f $dir/$gnulib_mk &&
|
||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk &&
|
||||
gnulib_mk_hook $dir/$gnulib_mk
|
||||
}
|
||||
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
|
||||
version_controlled_file $dir $file; then
|
||||
echo "$0: $dir/$file overrides $1/$dir/$file"
|
||||
echo "$me: $dir/$file overrides $1/$dir/$file"
|
||||
else
|
||||
copied=$copied$sep$file; sep=$nl
|
||||
if test $file = gettext.m4; then
|
||||
echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
|
||||
echo "$me: patching m4/gettext.m4 to remove need for intl/* ..."
|
||||
rm -f $dir/$file
|
||||
sed '
|
||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||
@@ -831,7 +874,7 @@ grep -E '^[ ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
|
||||
|
||||
for command in \
|
||||
libtool \
|
||||
"${ACLOCAL-aclocal} --force -I m4 $ACLOCAL_FLAGS" \
|
||||
"${ACLOCAL-aclocal} --force -I '$m4_base' $ACLOCAL_FLAGS" \
|
||||
"${AUTOCONF-autoconf} --force" \
|
||||
"${AUTOHEADER-autoheader} --force" \
|
||||
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||
@@ -842,7 +885,7 @@ do
|
||||
command="${LIBTOOLIZE-libtoolize} -c -f"
|
||||
fi
|
||||
echo "$0: $command ..."
|
||||
$command || exit
|
||||
eval "$command" || exit
|
||||
done
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2006-2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2011 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -61,6 +61,7 @@ gnulib_modules="
|
||||
dirfd
|
||||
dirname
|
||||
do-release-commit-and-tag
|
||||
dtoastr
|
||||
dup2
|
||||
environ
|
||||
error
|
||||
@@ -88,6 +89,7 @@ gnulib_modules="
|
||||
fsusage
|
||||
fsync
|
||||
ftello
|
||||
ftoastr
|
||||
fts
|
||||
getgroups
|
||||
gethrxtime
|
||||
@@ -123,6 +125,7 @@ gnulib_modules="
|
||||
isblank
|
||||
lchmod
|
||||
lchown
|
||||
ldtoastr
|
||||
lib-ignore
|
||||
linebuffer
|
||||
link
|
||||
@@ -169,6 +172,7 @@ gnulib_modules="
|
||||
quotearg
|
||||
randint
|
||||
randperm
|
||||
read-file
|
||||
readlink
|
||||
readtokens
|
||||
readtokens0
|
||||
@@ -228,6 +232,7 @@ gnulib_modules="
|
||||
verror
|
||||
version-etc-fsf
|
||||
wcwidth
|
||||
wcswidth
|
||||
winsz-ioctl
|
||||
winsz-termios
|
||||
write-any-file
|
||||
@@ -295,7 +300,6 @@ if test $gettext_external = 1; then
|
||||
excluded_files='
|
||||
m4/glibc2.m4
|
||||
m4/intdiv0.m4
|
||||
m4/lcmessage.m4
|
||||
m4/uintmax_t.m4
|
||||
m4/ulonglong.m4
|
||||
m4/visibility.m4
|
||||
@@ -310,11 +314,12 @@ autoconf 2.62
|
||||
automake 1.11.1
|
||||
autopoint -
|
||||
bison -
|
||||
gettext 0.18
|
||||
gettext 0.17
|
||||
git 1.4.4
|
||||
gperf -
|
||||
gzip -
|
||||
makeinfo -
|
||||
patch -
|
||||
perl 5.5
|
||||
rsync -
|
||||
tar -
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
98
cfg.mk
98
cfg.mk
@@ -1,5 +1,5 @@
|
||||
# Customize maint.mk -*- makefile -*-
|
||||
# Copyright (C) 2003-2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2011 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -27,7 +27,7 @@ bootstrap-tools = autoconf,automake,gnulib,bison
|
||||
# Now that we have better tests, make this the default.
|
||||
export VERBOSE = yes
|
||||
|
||||
old_NEWS_hash = 594c508078596fb65a3db2c0f4437386
|
||||
old_NEWS_hash = 99b06e7bb289add96b10127fceced4e9
|
||||
|
||||
# Add an exemption for sc_makefile_at_at_check.
|
||||
_makefile_at_at_check_exceptions = ' && !/^cu_install_program =/'
|
||||
@@ -39,8 +39,8 @@ _hv_file ?= $(srcdir)/tests/misc/help-version
|
||||
dd = $(srcdir)/src/dd.c
|
||||
sc_dd_O_FLAGS:
|
||||
@rm -f $@.1 $@.2
|
||||
@{ echo O_FULLBLOCK; perl -nle '/^ +\| (O_\w*)$$/ and print $$1' \
|
||||
$(dd); } | sort > $@.1
|
||||
@{ echo O_FULLBLOCK; echo O_NOCACHE; \
|
||||
perl -nle '/^ +\| (O_\w*)$$/ and print $$1' $(dd); } | sort > $@.1
|
||||
@{ echo O_NOFOLLOW; perl -nle '/{"[a-z]+",\s*(O_\w+)},/ and print $$1' \
|
||||
$(dd); } | sort > $@.2
|
||||
@diff -u $@.1 $@.2 || diff=1 || diff=; \
|
||||
@@ -80,7 +80,7 @@ sc_root_tests:
|
||||
@if test -d tests \
|
||||
&& grep check-root tests/Makefile.am>/dev/null 2>&1; then \
|
||||
t1=sc-root.expected; t2=sc-root.actual; \
|
||||
grep -nl '^require_root_$$' \
|
||||
grep -nl '^ *require_root_$$' \
|
||||
$$($(VC_LIST) tests) |sed s,tests/,, |sort > $$t1; \
|
||||
sed -n '/^root_tests =[ ]*\\$$/,/[^\]$$/p' \
|
||||
$(srcdir)/tests/Makefile.am \
|
||||
@@ -93,19 +93,6 @@ sc_root_tests:
|
||||
exit 1; } || :; \
|
||||
fi
|
||||
|
||||
# Ensure that the syntax_check_exceptions file list in Makefile.am
|
||||
# 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' \
|
||||
| sed 's|^$(_dot_escaped_srcdir)/||'; \
|
||||
sed -n '/^$(sce) =[ ]*\\$$/,/[^\]$$/p' \
|
||||
$(srcdir)/Makefile.am \
|
||||
| sed 's/^ *//;/^$(sce) =/d' \
|
||||
| tr -s '\012\\' ' ' | fmt -1 \
|
||||
) | sort | uniq -u)" \
|
||||
&& { echo 'Makefile.am: $(sce) mismatch' >&2; exit 1; } || :;
|
||||
|
||||
# Create a list of regular expressions matching the names
|
||||
# of files included from system.h. Exclude a couple.
|
||||
.re-list:
|
||||
@@ -149,6 +136,23 @@ ALL_RECURSIVE_TARGETS += sc_check-AUTHORS
|
||||
sc_check-AUTHORS:
|
||||
@$(MAKE) -s -C src $@
|
||||
|
||||
# Look for lines longer than 80 characters, except omit:
|
||||
# - program-generated long lines in diff headers,
|
||||
# - tests involving long checksum lines, and
|
||||
# - the 'pr' test cases.
|
||||
LINE_LEN_MAX = 80
|
||||
FILTER_LONG_LINES = \
|
||||
/^[^:]*\.diff:[^:]*:@@ / d; \
|
||||
\|^[^:]*tests/misc/sha[0-9]*sum[-:]| d; \
|
||||
\|^[^:]*tests/pr/|{ \|^[^:]*tests/pr/pr-tests:| !d; };
|
||||
sc_long_lines:
|
||||
@files=$$($(VC_LIST_EXCEPT)) \
|
||||
halt='line(s) with more than $(LINE_LEN_MAX) characters; reindent'; \
|
||||
for file in $$files; do \
|
||||
expand $$file | grep -nE '^.{$(LINE_LEN_MAX)}.' | \
|
||||
sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)'; \
|
||||
done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
|
||||
|
||||
# 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$$')
|
||||
@@ -164,6 +168,13 @@ sc_man_file_correlation:
|
||||
@$(MAKE) -s -C src all_programs
|
||||
@$(MAKE) -s -C man $@
|
||||
|
||||
# Ensure that the end of each release's section is marked by two empty lines.
|
||||
sc_NEWS_two_empty_lines:
|
||||
@sed -n 4,/Noteworthy/p $(srcdir)/NEWS \
|
||||
| perl -n0e '/(^|\n)\n\n\* Noteworthy/ or exit 1' \
|
||||
|| { echo '$(ME): use two empty lines to separate NEWS sections' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Perl-based tests used to exec perl from a #!/bin/sh script.
|
||||
# Now they all start with #!/usr/bin/perl and the portability
|
||||
# infrastructure is in tests/Makefile.am. Make sure no old-style
|
||||
@@ -215,7 +226,8 @@ sc_prohibit_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.
|
||||
# Otherwise, setting file=1 in the environment would make tests fail
|
||||
# unexpectedly.
|
||||
sc_prohibit_fail_0:
|
||||
@prohibit='\<fail=0\>' \
|
||||
halt='fail=0 initialization' \
|
||||
@@ -244,6 +256,12 @@ sc_prohibit_sleep:
|
||||
halt='prefer xnanosleep over other sleep interfaces' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use print_ver_ (from init.cfg), not open-coded $VERBOSE check.
|
||||
sc_prohibit_verbose_version:
|
||||
@prohibit='test "\$$VERBOSE" = yes && .* --version' \
|
||||
halt='use the print_ver_ function instead...' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
###########################################################
|
||||
_p0 = \([^"'/]\|"\([^\"]\|[\].\)*"\|'\([^\']\|[\].\)*'
|
||||
_pre = $(_p0)\|[/][^"'/*]\|[/]"\([^\"]\|[\].\)*"\|[/]'\([^\']\|[\].\)*'\)*
|
||||
@@ -297,6 +315,15 @@ sc_space_before_open_paren:
|
||||
else :; \
|
||||
fi
|
||||
|
||||
# Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
|
||||
# Use STREQ_LEN or STRPREFIX rather than comparing strncmp == 0, or != 0.
|
||||
sc_prohibit_strncmp:
|
||||
@grep -nE '! *str''ncmp *\(|\<str''ncmp *\(.+\) *[!=]=' \
|
||||
$$($(VC_LIST_EXCEPT)) \
|
||||
| grep -vE ':# *define STR(N?EQ_LEN|PREFIX)\(' && \
|
||||
{ echo '$(ME): use STREQ_LEN or STRPREFIX instead of str''ncmp' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Override the default Cc: used in generating an announcement.
|
||||
announcement_Cc_ = $(translation_project_), \
|
||||
coreutils@gnu.org, coreutils-announce@gnu.org
|
||||
@@ -306,3 +333,36 @@ include $(srcdir)/dist-check.mk
|
||||
update-copyright-env = \
|
||||
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
|
||||
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
|
||||
|
||||
# List syntax-check exemptions.
|
||||
exclude_file_name_regexp--sc_space_tab = \
|
||||
^(tests/pr/|tests/misc/nl$$|gl/.*\.diff$$)
|
||||
exclude_file_name_regexp--sc_bindtextdomain = ^(gl/.*|lib/euidaccess-stat)\.c$$
|
||||
exclude_file_name_regexp--sc_unmarked_diagnostics = ^build-aux/cvsu$$
|
||||
exclude_file_name_regexp--sc_error_message_uppercase = ^build-aux/cvsu$$
|
||||
exclude_file_name_regexp--sc_trailing_blank = ^tests/pr/
|
||||
exclude_file_name_regexp--sc_system_h_headers = \
|
||||
^src/((system|copy)\.h|libstdbuf\.c)$$
|
||||
|
||||
_src = (false|lbracket|ls-(dir|ls|vdir)|tac-pipe|uname-(arch|uname))
|
||||
exclude_file_name_regexp--sc_require_config_h_first = \
|
||||
(^lib/buffer-lcm\.c|src/$(_src)\.c)$$
|
||||
exclude_file_name_regexp--sc_require_config_h = \
|
||||
$(exclude_file_name_regexp--sc_require_config_h_first)
|
||||
|
||||
exclude_file_name_regexp--sc_po_check = ^gl/
|
||||
exclude_file_name_regexp--sc_prohibit_always-defined_macros = ^src/seq\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/pr/
|
||||
exclude_file_name_regexp--sc_program_name = ^(gl/.*|lib/euidaccess-stat)\.c$$
|
||||
exclude_file_name_regexp--sc_file_system = \
|
||||
NEWS|^(tests/init\.cfg|src/df\.c|tests/misc/df-P)$$
|
||||
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
|
||||
^m4/stat-prog\.m4$$
|
||||
exclude_file_name_regexp--sc_prohibit_fail_0 = \
|
||||
(^tests/init\.sh|Makefile\.am|\.mk)$$
|
||||
exclude_file_name_regexp--sc_prohibit_atoi_atof = ^lib/euidaccess-stat\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
|
||||
^tests/pr/|(^gl/lib/reg.*\.c\.diff|Makefile(\.am)?|\.mk|^man/help2man)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_stat_st_blocks = \
|
||||
^(src/system\.h|tests/du/2g)$$
|
||||
|
||||
15
configure.ac
15
configure.ac
@@ -1,7 +1,7 @@
|
||||
# -*- autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
# Copyright (C) 1991, 1993-2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 1993-2011 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -98,7 +98,6 @@ if test "$gl_gcc_warnings" = yes; then
|
||||
done
|
||||
gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
|
||||
gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
|
||||
gl_WARN_ADD([-Wno-pointer-sign]) # Too many warnings for now
|
||||
gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
|
||||
|
||||
# In spite of excluding -Wlogical-op above, it is enabled, as of
|
||||
@@ -163,18 +162,18 @@ int main()
|
||||
time_t now = time ((time_t *) 0);
|
||||
int hour_GMT0, hour_unset;
|
||||
if (putenv ("TZ=GMT0") != 0)
|
||||
exit (1);
|
||||
return 1;
|
||||
hour_GMT0 = localtime (&now)->tm_hour;
|
||||
unset_TZ ();
|
||||
hour_unset = localtime (&now)->tm_hour;
|
||||
if (putenv ("TZ=PST8") != 0)
|
||||
exit (1);
|
||||
return 1;
|
||||
if (localtime (&now)->tm_hour == hour_GMT0)
|
||||
exit (1);
|
||||
return 1;
|
||||
unset_TZ ();
|
||||
if (localtime (&now)->tm_hour != hour_unset)
|
||||
exit (1);
|
||||
exit (0);
|
||||
return 1;
|
||||
return 0;
|
||||
}]])],
|
||||
[utils_cv_localtime_cache=no],
|
||||
[utils_cv_localtime_cache=yes],
|
||||
@@ -444,7 +443,7 @@ AC_SUBST([CONFIG_STATUS_DEPENDENCIES])
|
||||
# As long as "grep 'PRI[diouxX]' po/*.pot" reports matches in
|
||||
# translatable strings, we must use need-formatstring-macros here.
|
||||
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
||||
AM_GNU_GETTEXT_VERSION([0.18])
|
||||
AM_GNU_GETTEXT_VERSION([0.17])
|
||||
|
||||
# For a test of uniq: it uses the $LOCALE_FR envvar.
|
||||
gt_LOCALE_FR
|
||||
|
||||
@@ -2002,7 +2002,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2001-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2011 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-2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995-1998, 2001-2011 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -33,7 +33,8 @@ constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
|
||||
$(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'\
|
||||
sed -n -e \
|
||||
's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
|
||||
$(top_srcdir)/src/shred.c; } > t-$@ \
|
||||
&& mv t-$@ $@
|
||||
|
||||
@@ -60,6 +61,7 @@ syntax_checks = \
|
||||
.PHONY: $(syntax_checks) check-texinfo
|
||||
|
||||
# List words/regexps here that should not appear in the texinfo documentation.
|
||||
BAD_POSIX_PERL = /\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/
|
||||
check-texinfo: $(syntax_checks)
|
||||
$(AM_V_GEN)fail=0; \
|
||||
grep '@url{' $(srcdir)/*.texi && fail=1; \
|
||||
@@ -69,7 +71,7 @@ check-texinfo: $(syntax_checks)
|
||||
| $(EGREP) -v 'setfilename|[{]filename[}]' \
|
||||
&& fail=1; \
|
||||
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
|
||||
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
|
||||
'$(BAD_POSIX_PERL) and print,exit 1' \
|
||||
$(srcdir)/*.texi 2> /dev/null || fail=1; }; \
|
||||
exit $$fail
|
||||
|
||||
@@ -108,7 +110,8 @@ sc-avoid-non-zero:
|
||||
|
||||
# Use `zeros', not `zeroes' (nothing wrong with `zeroes'. just be consistent).
|
||||
sc-avoid-zeroes:
|
||||
$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi && exit 1 || :
|
||||
$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi \
|
||||
&& exit 1 || :
|
||||
|
||||
# ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
ME = doc/Makefile
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
* shuf: (coreutils)shuf invocation. Shuffling text files.
|
||||
* sleep: (coreutils)sleep invocation. Delay for a specified time.
|
||||
* sort: (coreutils)sort invocation. Sort text files.
|
||||
* split: (coreutils)split invocation. Split into fixed-size pieces.
|
||||
* split: (coreutils)split invocation. Split into pieces.
|
||||
* stat: (coreutils)stat invocation. Report file(system) status.
|
||||
* stdbuf: (coreutils)stdbuf invocation. Modify stdio buffering.
|
||||
* stty: (coreutils)stty invocation. Print/change terminal settings.
|
||||
@@ -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-2010 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1994-1996, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
@@ -217,6 +217,7 @@ Common Options
|
||||
* Exit status:: Indicating program success or failure
|
||||
* Backup options:: Backup options
|
||||
* Block size:: Block size
|
||||
* Floating point:: Floating point number representation
|
||||
* Signal specifications:: Specifying signals
|
||||
* Disambiguating names and IDs:: chgrp and chown owner and group syntax
|
||||
* Random sources:: Sources of random data
|
||||
@@ -624,7 +625,7 @@ Remove any trailing slashes from each @var{source} argument.
|
||||
@macro mayConflictWithShellBuiltIn{cmd}
|
||||
@cindex conflicts with shell built-ins
|
||||
@cindex built-in shell commands, conflicts with
|
||||
Due to shell aliases and built-in @command{\cmd\} command, using an
|
||||
Due to shell aliases and built-in @command{\cmd\} functions, using an
|
||||
unadorned @command{\cmd\} interactively or in a script may get you
|
||||
different functionality than that described here. Invoke it via
|
||||
@command{env} (i.e., @code{env \cmd\ @dots{}}) to avoid interference
|
||||
@@ -729,6 +730,7 @@ name.
|
||||
* Exit status:: Indicating program success or failure.
|
||||
* Backup options:: -b -S, in some programs.
|
||||
* Block size:: BLOCK_SIZE and --block-size, in some programs.
|
||||
* Floating point:: Floating point number representation.
|
||||
* Signal specifications:: Specifying signals using the --signal option.
|
||||
* Disambiguating names and IDs:: chgrp and chown owner and group syntax
|
||||
* Random sources:: --random-source, in some programs.
|
||||
@@ -736,7 +738,7 @@ name.
|
||||
* Trailing slashes:: --strip-trailing-slashes, in some programs.
|
||||
* Traversing symlinks:: -H, -L, or -P, in some programs.
|
||||
* Treating / specially:: --preserve-root and --no-preserve-root.
|
||||
* Special built-in utilities:: @command{break}, @command{:}, @command{eval}, @dots{}
|
||||
* Special built-in utilities:: @command{break}, @command{:}, @dots{}
|
||||
* Standards conformance:: Conformance to the @acronym{POSIX} standard.
|
||||
@end menu
|
||||
|
||||
@@ -1011,6 +1013,34 @@ set. The @option{-h} or @option{--human-readable} option is equivalent to
|
||||
@option{--block-size=human-readable}. The @option{--si} option is
|
||||
equivalent to @option{--block-size=si}.
|
||||
|
||||
@node Floating point
|
||||
@section Floating point numbers
|
||||
@cindex floating point
|
||||
@cindex IEEE floating point
|
||||
|
||||
Commands that accept or produce floating point numbers employ the
|
||||
floating point representation of the underlying system, and suffer
|
||||
from rounding error, overflow, and similar floating-point issues.
|
||||
Almost all modern systems use IEEE-754 floating point, and it is
|
||||
typically portable to assume IEEE-754 behavior these days. IEEE-754
|
||||
has positive and negative infinity, distinguishes positive from
|
||||
negative zero, and uses special values called NaNs to represent
|
||||
invalid computations such as dividing zero by itself. For more
|
||||
information, please see David Goldberg's paper
|
||||
@uref{http://@/www.validlab.com/@/goldberg/@/paper.pdf, What Every
|
||||
Computer Scientist Should Know About Floating-Point Arithmetic}.
|
||||
|
||||
@vindex LC_NUMERIC
|
||||
Commands that accept floating point numbers as options, operands or
|
||||
input use the standard C functions @code{strtod} and @code{strtold} to
|
||||
convert from text to floating point numbers. These floating point
|
||||
numbers therefore can use scientific notation like @code{1.0e-34} and
|
||||
@code{-10e100}. Modern C implementations also accept hexadecimal
|
||||
floating point numbers such as @code{-0x.ep-3}, which stands for
|
||||
@minus{}14/16 times @math{2^-3}, which equals @minus{}0.109375. The
|
||||
@env{LC_NUMERIC} locale determines the decimal-point character.
|
||||
@xref{Parsing of Floats,,, libc, The GNU C Library Reference Manual}.
|
||||
|
||||
@node Signal specifications
|
||||
@section Signal specifications
|
||||
@cindex signals, specifying
|
||||
@@ -1316,7 +1346,7 @@ a symlink or its referent.
|
||||
@macro choptH
|
||||
@item -H
|
||||
@opindex -H
|
||||
@cindex symbolic link to directory, traverse each that is specified on the command line
|
||||
@cindex symbolic link to directory, traverse if on the command line
|
||||
If @option{--recursive} (@option{-R}) is specified and
|
||||
a command line argument is a symbolic link to a directory, traverse it.
|
||||
@end macro
|
||||
@@ -1425,10 +1455,11 @@ The @sc{gnu} utilities normally conform to the version of @acronym{POSIX}
|
||||
that is standard for your system. To cause them to conform to a
|
||||
different version of @acronym{POSIX}, define the @env{_POSIX2_VERSION}
|
||||
environment variable to a value of the form @var{yyyymm} specifying
|
||||
the year and month the standard was adopted. Two values are currently
|
||||
the year and month the standard was adopted. Three values are currently
|
||||
supported for @env{_POSIX2_VERSION}: @samp{199209} stands for
|
||||
@acronym{POSIX} 1003.2-1992, and @samp{200112} stands for @acronym{POSIX}
|
||||
1003.1-2001. For example, if you have a newer system but are running software
|
||||
@acronym{POSIX} 1003.2-1992, @samp{200112} stands for @acronym{POSIX}
|
||||
1003.1-2001, and @samp{200809} stands for @acronym{POSIX} 1003.1-2008.
|
||||
For example, if you have a newer system but are running software
|
||||
that assumes an older version of @acronym{POSIX} and uses @samp{sort +1}
|
||||
or @samp{tail +10}, you can work around any compatibility problems by setting
|
||||
@samp{_POSIX2_VERSION=199209} in your environment.
|
||||
@@ -1778,7 +1809,8 @@ Synopses:
|
||||
@smallexample
|
||||
od [@var{option}]@dots{} [@var{file}]@dots{}
|
||||
od [-abcdfilosx]@dots{} [@var{file}] [[+]@var{offset}[.][b]]
|
||||
od [@var{option}]@dots{} --traditional [@var{file}] [[+]@var{offset}[.][b] [[+]@var{label}[.][b]]]
|
||||
od [@var{option}]@dots{} --traditional [@var{file}]@c
|
||||
[[+]@var{offset}[.][b] [[+]@var{label}[.][b]]]
|
||||
@end smallexample
|
||||
|
||||
Each line of output consists of the offset in the input, followed by
|
||||
@@ -1879,7 +1911,7 @@ named character, ignoring high-order bit
|
||||
@item d
|
||||
signed decimal
|
||||
@item f
|
||||
floating point
|
||||
floating point (@pxref{Floating point})
|
||||
@item o
|
||||
octal
|
||||
@item u
|
||||
@@ -2624,7 +2656,7 @@ These commands output pieces of the input.
|
||||
@menu
|
||||
* head invocation:: Output the first part of files.
|
||||
* tail invocation:: Output the last part of files.
|
||||
* split invocation:: Split a file into fixed-size pieces.
|
||||
* split invocation:: Split a file into pieces.
|
||||
* csplit invocation:: Split a file into context-determined pieces.
|
||||
@end menu
|
||||
|
||||
@@ -2819,8 +2851,8 @@ During one iteration, every specified file is checked to see if it has
|
||||
changed size.
|
||||
Historical implementations of @command{tail} have required that
|
||||
@var{number} be an integer. However, GNU @command{tail} accepts
|
||||
an arbitrary floating point number (using a period before any
|
||||
fractional digits).
|
||||
an arbitrary floating point number. @xref{Floating point}.
|
||||
When @command{tail} uses inotify, this polling-related option is ignored.
|
||||
|
||||
@itemx --pid=@var{pid}
|
||||
@opindex --pid
|
||||
@@ -2855,7 +2887,8 @@ still associated with the same device/inode-number pair as before.
|
||||
When following a log file that is rotated, this is approximately the
|
||||
number of seconds between when tail prints the last pre-rotation lines
|
||||
and when it prints the lines that have accumulated in the new log file.
|
||||
This option is meaningful only when following by name.
|
||||
This option is meaningful only when polling (i.e., without inotify)
|
||||
and when following by name.
|
||||
|
||||
@itemx -n @var{k}
|
||||
@itemx --lines=@var{k}
|
||||
@@ -2920,15 +2953,15 @@ mean either @samp{tail ./+4} or @samp{tail -n +4}.
|
||||
|
||||
|
||||
@node split invocation
|
||||
@section @command{split}: Split a file into fixed-size pieces
|
||||
@section @command{split}: Split a file into pieces.
|
||||
|
||||
@pindex split
|
||||
@cindex splitting a file into pieces
|
||||
@cindex pieces, splitting a file into
|
||||
|
||||
@command{split} creates output files containing consecutive sections of
|
||||
@var{input} (standard input if none is given or @var{input} is
|
||||
@samp{-}). Synopsis:
|
||||
@command{split} creates output files containing consecutive or interleaved
|
||||
sections of @var{input} (standard input if none is given or @var{input}
|
||||
is @samp{-}). Synopsis:
|
||||
|
||||
@example
|
||||
split [@var{option}] [@var{input} [@var{prefix}]]
|
||||
@@ -2941,10 +2974,9 @@ left over for the last section), into each output file.
|
||||
The output files' names consist of @var{prefix} (@samp{x} by default)
|
||||
followed by a group of characters (@samp{aa}, @samp{ab}, @dots{} by
|
||||
default), such that concatenating the output files in traditional
|
||||
sorted order by file name produces
|
||||
the original input file. If the output file names are exhausted,
|
||||
@command{split} reports an error without deleting the output files
|
||||
that it did create.
|
||||
sorted order by file name produces the original input file (except
|
||||
@option{-r}). If the output file names are exhausted, @command{split}
|
||||
reports an error without deleting the output files that it did create.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@@ -2976,6 +3008,41 @@ possible without exceeding @var{size} bytes. Individual lines longer than
|
||||
@var{size} bytes are broken into multiple files.
|
||||
@var{size} has the same format as for the @option{--bytes} option.
|
||||
|
||||
@item -n @var{chunks}
|
||||
@itemx --number=@var{chunks}
|
||||
@opindex -n
|
||||
@opindex --number
|
||||
|
||||
Split @var{input} to @var{chunks} output files where @var{chunks} may be:
|
||||
|
||||
@example
|
||||
@var{n} generate @var{n} files based on current size of @var{input}
|
||||
@var{k}/@var{n} only output @var{k}th of @var{n} to stdout
|
||||
l/@var{n} generate @var{n} files without splitting lines
|
||||
l/@var{k}/@var{n} likewise but only output @var{k}th of @var{n} to stdout
|
||||
r/@var{n} like @samp{l} but use round robin distribution
|
||||
r/@var{k}/@var{n} likewise but only output @var{k}th of @var{n} to stdout
|
||||
@end example
|
||||
|
||||
Any excess bytes remaining after dividing the @var{input}
|
||||
into @var{n} chunks, are assigned to the last chunk.
|
||||
Any excess bytes appearing after the initial calculation are discarded
|
||||
(except when using @samp{r} mode).
|
||||
|
||||
All @var{n} files are created even if there are fewer than @var{n} lines,
|
||||
or the @var{input} is truncated.
|
||||
|
||||
For @samp{l} mode, chunks are approximately @var{input} size / @var{n}.
|
||||
The @var{input} is partitioned into @var{n} equal sized portions, with
|
||||
the last assigned any excess. If a line @emph{starts} within a partition
|
||||
it is written completely to the corresponding file. Since lines
|
||||
are not split even if they overlap a partition, the files written
|
||||
can be larger or smaller than the partition size, and even empty
|
||||
if a line is so long as to completely overlap the partition.
|
||||
|
||||
For @samp{r} mode, the size of @var{input} is irrelevant,
|
||||
and so can be a pipe for example.
|
||||
|
||||
@item -a @var{length}
|
||||
@itemx --suffix-length=@var{length}
|
||||
@opindex -a
|
||||
@@ -2988,6 +3055,23 @@ Use suffixes of length @var{length}. The default @var{length} is 2.
|
||||
@opindex --numeric-suffixes
|
||||
Use digits in suffixes rather than lower-case letters.
|
||||
|
||||
@item -e
|
||||
@itemx --elide-empty-files
|
||||
@opindex -e
|
||||
@opindex --elide-empty-files
|
||||
Suppress the generation of zero-length output files. This can happen
|
||||
with the @option{--number} option if a file is (truncated to be) shorter
|
||||
than the number requested, or if a line is so long as to completely
|
||||
span a chunk. The output file sequence numbers, always run consecutively
|
||||
even when this option is specified.
|
||||
|
||||
@item -u
|
||||
@itemx --unbuffered
|
||||
@opindex -u
|
||||
@opindex --unbuffered
|
||||
Immediately copy input to output in @option{--number r/...} mode,
|
||||
which is a much slower mode of operation.
|
||||
|
||||
@itemx --verbose
|
||||
@opindex --verbose
|
||||
Write a diagnostic just before each output file is opened.
|
||||
@@ -2996,6 +3080,67 @@ Write a diagnostic just before each output file is opened.
|
||||
|
||||
@exitstatus
|
||||
|
||||
Here are a few examples to illustrate how the
|
||||
@option{--number} (@option{-n}) option works:
|
||||
|
||||
Notice how, by default, one line may be split onto two or more:
|
||||
|
||||
@example
|
||||
$ seq -w 6 10 > k; split -n3 k; head xa?
|
||||
==> xaa <==
|
||||
06
|
||||
07
|
||||
==> xab <==
|
||||
|
||||
08
|
||||
0
|
||||
==> xac <==
|
||||
9
|
||||
10
|
||||
@end example
|
||||
|
||||
Use the "l/" modifier to suppress that:
|
||||
|
||||
@example
|
||||
$ seq -w 6 10 > k; split -nl/3 k; head xa?
|
||||
==> xaa <==
|
||||
06
|
||||
07
|
||||
|
||||
==> xab <==
|
||||
08
|
||||
09
|
||||
|
||||
==> xac <==
|
||||
10
|
||||
@end example
|
||||
|
||||
Use the "r/" modifier to distribute lines in a round-robin fashion:
|
||||
|
||||
@example
|
||||
$ seq -w 6 10 > k; split -nr/3 k; head xa?
|
||||
==> xaa <==
|
||||
06
|
||||
09
|
||||
|
||||
==> xab <==
|
||||
07
|
||||
10
|
||||
|
||||
==> xac <==
|
||||
08
|
||||
@end example
|
||||
|
||||
You can also extract just the Kth chunk.
|
||||
This extracts and prints just the 7th "chunk" of 33:
|
||||
|
||||
@example
|
||||
$ seq 100 > k; split -nl/7/33 k
|
||||
20
|
||||
21
|
||||
22
|
||||
@end example
|
||||
|
||||
|
||||
@node csplit invocation
|
||||
@section @command{csplit}: Split a file into context-determined pieces
|
||||
@@ -3294,10 +3439,11 @@ length limitation.
|
||||
In such cases, running @command{\cmd\} via @command{xargs} is undesirable
|
||||
because it splits the list into pieces and makes @command{\cmd\} print
|
||||
\subListOutput\ for each sublist rather than for the entire list.
|
||||
One way to produce a list of @acronym{ASCII} @sc{nul} terminated file names is with @sc{gnu}
|
||||
One way to produce a list of @acronym{ASCII} @sc{nul} terminated file
|
||||
names is with @sc{gnu}
|
||||
@command{find}, using its @option{-print0} predicate.
|
||||
If @var{file} is @samp{-} then the @acronym{ASCII} @sc{nul} terminated file names
|
||||
are read from standard input.
|
||||
If @var{file} is @samp{-} then the @acronym{ASCII} @sc{nul} terminated
|
||||
file names are read from standard input.
|
||||
@end macro
|
||||
@filesZeroFromOption{wc,,a total}
|
||||
|
||||
@@ -3767,11 +3913,8 @@ the final result, after the throwing away.))
|
||||
@opindex --sort
|
||||
@cindex general numeric sort
|
||||
@vindex LC_NUMERIC
|
||||
Sort numerically, using the standard C function @code{strtold} to convert
|
||||
a prefix of each line to a long double-precision floating point number.
|
||||
This allows floating point numbers to be specified in scientific notation,
|
||||
like @code{1.0e-34} and @code{10e100}.
|
||||
The @env{LC_NUMERIC} locale determines the decimal-point character.
|
||||
Sort numerically, converting a prefix of each line to a long
|
||||
double-precision floating point number. @xref{Floating point}.
|
||||
Do not report overflow, underflow, or conversion errors.
|
||||
Use the following collating sequence:
|
||||
|
||||
@@ -4076,10 +4219,11 @@ disks and controllers.
|
||||
@item --parallel=@var{n}
|
||||
@opindex --parallel
|
||||
@cindex multithreaded sort
|
||||
Limit the number of sorts run in parallel to @var{n}. By default,
|
||||
@var{n} is set to the number of available processors, and values
|
||||
greater than that are reduced to that limit. Also see
|
||||
@ref{nproc invocation}.
|
||||
Set the number of sorts run in parallel to @var{n}. By default,
|
||||
@var{n} is set to the number of available processors, but limited
|
||||
to 8, as there are diminishing performance gains after that.
|
||||
Note also that using @var{n} threads increases the memory usage by
|
||||
a factor of log @var{n}. Also see @ref{nproc invocation}.
|
||||
|
||||
@item -u
|
||||
@itemx --unique
|
||||
@@ -4119,7 +4263,8 @@ or other special characters).
|
||||
|
||||
Historical (BSD and System V) implementations of @command{sort} have
|
||||
differed in their interpretation of some options, particularly
|
||||
@option{-b}, @option{-f}, and @option{-n}. @sc{gnu} sort follows the @acronym{POSIX}
|
||||
@option{-b}, @option{-f}, and @option{-n}.
|
||||
@sc{gnu} sort follows the @acronym{POSIX}
|
||||
behavior, which is usually (but not always!) like the System V behavior.
|
||||
According to @acronym{POSIX}, @option{-n} no longer implies @option{-b}. For
|
||||
consistency, @option{-M} has been changed in the same way. This may
|
||||
@@ -4289,7 +4434,10 @@ by the sort operation.
|
||||
@c and converting each @samp{\0} back to the original record delimiter.
|
||||
@c
|
||||
@c @example
|
||||
@c printf 'c\n\nb\n\na\n'|perl -0pe 's/\n\n/\n\0/g'|sort -z|perl -0pe 's/\0/\n/g'
|
||||
@c printf 'c\n\nb\n\na\n' |
|
||||
@c perl -0pe 's/\n\n/\n\0/g' |
|
||||
@c sort -z |
|
||||
@c perl -0pe 's/\0/\n/g'
|
||||
@c @end example
|
||||
|
||||
@item
|
||||
@@ -4640,11 +4788,17 @@ If there is an error it exits with nonzero status.
|
||||
@macro checkOrderOption{cmd}
|
||||
If the @option{--check-order} option is given, unsorted inputs will
|
||||
cause a fatal error message. If the option @option{--nocheck-order}
|
||||
is given, unsorted inputs will never cause an error message. If
|
||||
neither of these options is given, wrongly sorted inputs are diagnosed
|
||||
only if an input file is found to contain unpairable lines. If an
|
||||
input file is diagnosed as being unsorted, the @command{\cmd\} command
|
||||
will exit with a nonzero status (and the output should not be used).
|
||||
is given, unsorted inputs will never cause an error message. If neither
|
||||
of these options is given, wrongly sorted inputs are diagnosed
|
||||
only if an input file is found to contain unpairable
|
||||
@ifset JOIN_COMMAND
|
||||
lines, and when both input files are non empty.
|
||||
@end ifset
|
||||
@ifclear JOIN_COMMAND
|
||||
lines.
|
||||
@end ifclear
|
||||
If an input file is diagnosed as being unsorted, the @command{\cmd\}
|
||||
command will exit with a nonzero status (and the output should not be used).
|
||||
|
||||
Forcing @command{\cmd\} to process wrongly sorted input files
|
||||
containing unpairable lines by specifying @option{--nocheck-order} is
|
||||
@@ -5003,7 +5157,8 @@ Choose an output format suitable for @command{nroff} or @command{troff}
|
||||
processing. Each output line will look like:
|
||||
|
||||
@smallexample
|
||||
.xx "@var{tail}" "@var{before}" "@var{keyword_and_after}" "@var{head}" "@var{ref}"
|
||||
.xx "@var{tail}" "@var{before}" "@var{keyword_and_after}"@c
|
||||
"@var{head}" "@var{ref}"
|
||||
@end smallexample
|
||||
|
||||
so it will be possible to write a @samp{.xx} roff macro to take care of
|
||||
@@ -5023,7 +5178,8 @@ Choose an output format suitable for @TeX{} processing. Each output
|
||||
line will look like:
|
||||
|
||||
@smallexample
|
||||
\xx @{@var{tail}@}@{@var{before}@}@{@var{keyword}@}@{@var{after}@}@{@var{head}@}@{@var{ref}@}
|
||||
\xx @{@var{tail}@}@{@var{before}@}@{@var{keyword}@}@c
|
||||
@{@var{after}@}@{@var{head}@}@{@var{ref}@}
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
@@ -5351,11 +5507,26 @@ 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.
|
||||
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:
|
||||
|
||||
Note @command{awk} supports more sophisticated field processing,
|
||||
and by default will use (and discard) runs of blank characters to
|
||||
separate fields, and ignore leading and trailing blanks.
|
||||
@example
|
||||
tr -s '[:blank:]' '\t' | cut -f@dots{}
|
||||
@verbatim
|
||||
awk '{print $2}' # print the second field
|
||||
awk '{print $NF-1}' # print the penultimate field
|
||||
awk '{print $2,$1}' # reorder the first two fields
|
||||
@end verbatim
|
||||
@end example
|
||||
|
||||
In the unlikely event that @command{awk} is unavailable,
|
||||
one can use the @command{join} command, to process blank
|
||||
characters as @command{awk} does above.
|
||||
@example
|
||||
@verbatim
|
||||
join -a1 -o 1.2 - /dev/null # print the second field
|
||||
join -a1 -o 1.2,1.1 - /dev/null # reorder the first two fields
|
||||
@end verbatim
|
||||
@end example
|
||||
|
||||
@item -d @var{input_delim_byte}
|
||||
@@ -5523,7 +5694,9 @@ c c1 c2
|
||||
b b1 b2
|
||||
@end example
|
||||
|
||||
@set JOIN_COMMAND
|
||||
@checkOrderOption{join}
|
||||
@clear JOIN_COMMAND
|
||||
|
||||
The defaults are:
|
||||
@itemize
|
||||
@@ -5552,8 +5725,8 @@ Do not check that both input files are in sorted order. This is the default.
|
||||
|
||||
@item -e @var{string}
|
||||
@opindex -e
|
||||
Replace those output fields that are missing in the input with
|
||||
@var{string}.
|
||||
Replace those output fields that are missing in the input with @var{string}.
|
||||
I.E. missing fields specified with the @option{-12jo} options.
|
||||
|
||||
@item --header
|
||||
@opindex --header
|
||||
@@ -5584,10 +5757,17 @@ Join on field @var{field} (a positive integer) of file 2.
|
||||
Equivalent to @option{-1 @var{field} -2 @var{field}}.
|
||||
|
||||
@item -o @var{field-list}
|
||||
Construct each output line according to the format in @var{field-list}.
|
||||
Each element in @var{field-list} is either the single character @samp{0} or
|
||||
has the form @var{m.n} where the file number, @var{m}, is @samp{1} or
|
||||
@samp{2} and @var{n} is a positive field number.
|
||||
@itemx -o auto
|
||||
If the keyword @samp{auto} is specified, infer the output format from
|
||||
the first line in each file. This is the same as the default output format
|
||||
but also ensures the same number of fields are output for each line.
|
||||
Missing fields are replaced with the @option{-e} option and extra fields
|
||||
are discarded.
|
||||
|
||||
Otherwise, construct each output line according to the format in
|
||||
@var{field-list}. Each element in @var{field-list} is either the single
|
||||
character @samp{0} or has the form @var{m.n} where the file number, @var{m},
|
||||
is @samp{1} or @samp{2} and @var{n} is a positive field number.
|
||||
|
||||
A field specification of @samp{0} denotes the join field.
|
||||
In most cases, the functionality of the @samp{0} field spec
|
||||
@@ -5727,8 +5907,9 @@ Control-I.
|
||||
@item \v
|
||||
Control-K.
|
||||
@item \@var{ooo}
|
||||
The character with the value given by @var{ooo}, which is 1 to 3
|
||||
octal digits,
|
||||
The 8-bit character with the value given by @var{ooo}, which is 1 to 3
|
||||
octal digits. Note that @samp{\400} is interpreted as the two-byte
|
||||
sequence, @samp{\040} @samp{0}.
|
||||
@item \\
|
||||
A backslash.
|
||||
@end table
|
||||
@@ -5902,7 +6083,8 @@ newlines.
|
||||
@noindent
|
||||
By the way, the above idiom is not portable because it uses ranges, and
|
||||
it assumes that the octal code for newline is 012.
|
||||
Assuming a @acronym{POSIX} compliant @command{tr}, here is a better way to write it:
|
||||
Assuming a @acronym{POSIX} compliant @command{tr}, here is a better
|
||||
way to write it:
|
||||
|
||||
@example
|
||||
tr -cs '[:alnum:]' '[\n*]'
|
||||
@@ -7790,8 +7972,8 @@ Set both input and output block sizes to @var{bytes}.
|
||||
This makes @command{dd} read and write @var{bytes} per block,
|
||||
overriding any @samp{ibs} and @samp{obs} settings.
|
||||
In addition, if no data-transforming @option{conv} option is specified,
|
||||
each input block is copied to the output as a single block,
|
||||
without aggregating short reads.
|
||||
input is copied to the output as soon as it's read,
|
||||
even if it is smaller than the block size.
|
||||
|
||||
@item cbs=@var{bytes}
|
||||
@opindex cbs
|
||||
@@ -7881,22 +8063,29 @@ Swap every pair of input bytes. @sc{gnu} @command{dd}, unlike others, works
|
||||
when an odd number of bytes are read---the last byte is simply copied
|
||||
(since there is nothing to swap it with).
|
||||
|
||||
@item noerror
|
||||
@opindex noerror
|
||||
@cindex read errors, ignoring
|
||||
Continue after read errors.
|
||||
@item sync
|
||||
@opindex sync @r{(padding with @acronym{ASCII} @sc{nul}s)}
|
||||
Pad every input block to size of @samp{ibs} with trailing zero bytes.
|
||||
When used with @samp{block} or @samp{unblock}, pad with spaces instead of
|
||||
zero bytes.
|
||||
|
||||
@item nocreat
|
||||
@opindex nocreat
|
||||
@cindex creating output file, avoiding
|
||||
Do not create the output file; the output file must already exist.
|
||||
@end table
|
||||
|
||||
The following ``conversions'' are really file flags
|
||||
and don't affect internal processing:
|
||||
|
||||
@table @samp
|
||||
@item excl
|
||||
@opindex excl
|
||||
@cindex creating output file, requiring
|
||||
Fail if the output file already exists; @command{dd} must create the
|
||||
output file itself.
|
||||
|
||||
@item nocreat
|
||||
@opindex nocreat
|
||||
@cindex creating output file, avoiding
|
||||
Do not create the output file; the output file must already exist.
|
||||
|
||||
The @samp{excl} and @samp{nocreat} conversions are mutually exclusive.
|
||||
|
||||
@item notrunc
|
||||
@@ -7904,11 +8093,10 @@ The @samp{excl} and @samp{nocreat} conversions are mutually exclusive.
|
||||
@cindex truncating output file, avoiding
|
||||
Do not truncate the output file.
|
||||
|
||||
@item sync
|
||||
@opindex sync @r{(padding with @acronym{ASCII} @sc{nul}s)}
|
||||
Pad every input block to size of @samp{ibs} with trailing zero bytes.
|
||||
When used with @samp{block} or @samp{unblock}, pad with spaces instead of
|
||||
zero bytes.
|
||||
@item noerror
|
||||
@opindex noerror
|
||||
@cindex read errors, ignoring
|
||||
Continue after read errors.
|
||||
|
||||
@item fdatasync
|
||||
@opindex fdatasync
|
||||
@@ -7987,6 +8175,31 @@ last-access and last-modified time) is not necessarily synchronized.
|
||||
@cindex synchronized data and metadata I/O
|
||||
Use synchronized I/O for both data and metadata.
|
||||
|
||||
@item nocache
|
||||
@opindex nocache
|
||||
@cindex discarding file cache
|
||||
Discard the data cache for a file.
|
||||
When count=0 all cache is discarded,
|
||||
otherwise the cache is dropped for the processed
|
||||
portion of the file. Also when count=0
|
||||
failure to discard the cache is diagnosed
|
||||
and reflected in the exit status.
|
||||
Here as some usage examples:
|
||||
|
||||
@example
|
||||
# Advise to drop cache for whole file
|
||||
dd if=ifile iflag=nocache count=0
|
||||
|
||||
# Ensure drop cache for the whole file
|
||||
dd of=ofile oflag=nocache conv=notrunc,fdatasync count=0
|
||||
|
||||
# Drop cache for part of file
|
||||
dd if=ifile iflag=nocache skip=10 count=10 of=/dev/null
|
||||
|
||||
# Stream data using just the read-ahead cache
|
||||
dd if=ifile of=ofile iflag=nocache oflag=nocache
|
||||
@end example
|
||||
|
||||
@item nonblock
|
||||
@opindex nonblock
|
||||
@cindex nonblocking I/O
|
||||
@@ -8339,7 +8552,8 @@ response is not affirmative, the file is skipped.
|
||||
when it might be a symlink to a directory.
|
||||
Otherwise, @command{mv} may do something very surprising, since
|
||||
its behavior depends on the underlying rename system call.
|
||||
On a system with a modern Linux-based kernel, it fails with @code{errno=ENOTDIR}.
|
||||
On a system with a modern Linux-based kernel, it fails with
|
||||
@code{errno=ENOTDIR}.
|
||||
However, on other systems (at least FreeBSD 6.1 and Solaris 10) it silently
|
||||
renames not the symlink but rather the directory referenced by the symlink.
|
||||
@xref{Trailing slashes}.
|
||||
@@ -8730,7 +8944,8 @@ Display to standard error all status updates as sterilization proceeds.
|
||||
@opindex -x
|
||||
@opindex --exact
|
||||
By default, @command{shred} rounds the size of a regular file up to the next
|
||||
multiple of the file system block size to fully erase the last block of the file.
|
||||
multiple of the file system block size to fully erase the last block
|
||||
of the file.
|
||||
Use @option{--exact} to suppress that behavior.
|
||||
Thus, by default if you shred a 10-byte regular file on a system with 512-byte
|
||||
blocks, the resulting file will be 512 bytes long. With this option,
|
||||
@@ -8765,6 +8980,20 @@ your hard disk, you could give a command like this:
|
||||
shred --verbose /dev/sda5
|
||||
@end example
|
||||
|
||||
On modern disks, a single pass should be adequate,
|
||||
and it will take one third the time of the default three-pass approach.
|
||||
|
||||
@example
|
||||
# 1 pass, write pseudo-random data; 3x faster than the default
|
||||
shred --verbose -n1 /dev/sda5
|
||||
@end example
|
||||
|
||||
To be on the safe side, use at least one pass that overwrites using
|
||||
pseudo-random data. I.e., don't be tempted to use @samp{-n0 --zero},
|
||||
in case some disk controller optimizes the process of writing blocks
|
||||
of all zeros, and thereby does not clear all bytes in a block.
|
||||
Some SSDs may do just that.
|
||||
|
||||
A @var{file} of @samp{-} denotes standard output.
|
||||
The intended use of this is to shred a removed temporary file.
|
||||
For example:
|
||||
@@ -9513,7 +9742,8 @@ to @var{new-owner} or to the user and group of an existing reference file.
|
||||
Synopsis:
|
||||
|
||||
@example
|
||||
chown [@var{option}]@dots{} @{@var{new-owner} | --reference=@var{ref_file}@} @var{file}@dots{}
|
||||
chown [@var{option}]@dots{} @{@var{new-owner} | --reference=@var{ref_file}@}@c
|
||||
@var{file}@dots{}
|
||||
@end example
|
||||
|
||||
If used, @var{new-owner} specifies the new owner and/or group as follows
|
||||
@@ -9728,7 +9958,8 @@ to @var{group} (which can be either a group name or a numeric group ID)
|
||||
or to the group of an existing reference file. Synopsis:
|
||||
|
||||
@example
|
||||
chgrp [@var{option}]@dots{} @{@var{group} | --reference=@var{ref_file}@} @var{file}@dots{}
|
||||
chgrp [@var{option}]@dots{} @{@var{group} | --reference=@var{ref_file}@}@c
|
||||
@var{file}@dots{}
|
||||
@end example
|
||||
|
||||
If @var{group} is intended to represent a
|
||||
@@ -9849,7 +10080,8 @@ chgrp -hR staff /u
|
||||
@command{chmod} changes the access permissions of the named files. Synopsis:
|
||||
|
||||
@example
|
||||
chmod [@var{option}]@dots{} @{@var{mode} | --reference=@var{ref_file}@} @var{file}@dots{}
|
||||
chmod [@var{option}]@dots{} @{@var{mode} | --reference=@var{ref_file}@}@c
|
||||
@var{file}@dots{}
|
||||
@end example
|
||||
|
||||
@cindex symbolic links, permissions of
|
||||
@@ -10149,7 +10381,8 @@ Non-integer quantities are rounded up to the next higher unit.
|
||||
If an argument @var{file} is a disk device file containing a mounted
|
||||
file system, @command{df} shows the space available on that file system
|
||||
rather than on the file system containing the device node (i.e., the root
|
||||
file system). @sc{gnu} @command{df} does not attempt to determine the disk usage
|
||||
file system). @sc{gnu} @command{df} does not attempt to determine the
|
||||
disk usage
|
||||
on unmounted file systems, because on most kinds of systems doing so
|
||||
requires extremely nonportable intimate knowledge of file system
|
||||
structures.
|
||||
@@ -10721,7 +10954,7 @@ precision preceded by a period to specify the number of digits to
|
||||
print after the decimal point. For example, @samp{%.3X} outputs the
|
||||
last access time to millisecond precision. If a period is given but no
|
||||
precision, @command{stat} uses 9 digits, so @samp{%.X} is equivalent to
|
||||
@samp{%.9X} When discarding excess precision, time stamps are truncated
|
||||
@samp{%.9X}. When discarding excess precision, time stamps are truncated
|
||||
toward minus infinity.
|
||||
|
||||
@example
|
||||
@@ -10950,10 +11183,12 @@ vertical tab
|
||||
backslash
|
||||
@item \0@var{nnn}
|
||||
the eight-bit value that is the octal number @var{nnn}
|
||||
(zero to three octal digits)
|
||||
(zero to three octal digits), if @var{nnn} is
|
||||
a nine-bit value, the ninth bit is ignored
|
||||
@item \@var{nnn}
|
||||
the eight-bit value that is the octal number @var{nnn}
|
||||
(one to three octal digits)
|
||||
(one to three octal digits), if @var{nnn} is
|
||||
a nine-bit value, the ninth bit is ignored
|
||||
@item \x@var{hh}
|
||||
the eight-bit value that is the hexadecimal number @var{hh}
|
||||
(one or two hexadecimal digits)
|
||||
@@ -11034,7 +11269,8 @@ one.
|
||||
@command{printf} has an additional directive, @samp{%b}, which prints its
|
||||
argument string with @samp{\} escapes interpreted in the same way as in
|
||||
the @var{format} string, except that octal escapes are of the form
|
||||
@samp{\0@var{ooo}} where @var{ooo} is 0 to 3 octal digits.
|
||||
@samp{\0@var{ooo}} where @var{ooo} is 0 to 3 octal digits. If
|
||||
@samp{\@var{ooo}} is nine-bit value, ignore the ninth bit.
|
||||
If a precision is also given, it limits the number of bytes printed
|
||||
from the converted string.
|
||||
|
||||
@@ -11061,13 +11297,17 @@ digits, but is printed according to the @env{LC_NUMERIC} category of the
|
||||
current locale. For example, in a locale whose radix character is a
|
||||
comma, the command @samp{printf %g 3.14} outputs @samp{3,14} whereas
|
||||
the command @samp{printf %g 3,14} is an error.
|
||||
@xref{Floating point}.
|
||||
|
||||
@kindex \@var{ooo}
|
||||
@kindex \x@var{hh}
|
||||
@command{printf} interprets @samp{\@var{ooo}} in @var{format} as an octal number
|
||||
(if @var{ooo} is 1 to 3 octal digits) specifying a character to print,
|
||||
(if @var{ooo} is 1 to 3 octal digits) specifying a byte to print,
|
||||
and @samp{\x@var{hh}} as a hexadecimal number (if @var{hh} is 1 to 2 hex
|
||||
digits) specifying a character to print.
|
||||
Note however that when @samp{\@var{ooo}} specifies a number larger than 255,
|
||||
@command{printf} ignores the ninth bit.
|
||||
For example, @samp{printf '\400'} is equivalent to @samp{printf '\0'}.
|
||||
|
||||
@kindex \uhhhh
|
||||
@kindex \Uhhhhhhhh
|
||||
@@ -11275,7 +11515,8 @@ test
|
||||
|
||||
If @var{expression} is omitted, @command{test} returns false.
|
||||
If @var{expression} is a single argument,
|
||||
@command{test} returns false if the argument is null and true otherwise. The argument
|
||||
@command{test} returns false if the argument is null and true
|
||||
otherwise. The argument
|
||||
can be any string, including strings like @samp{-d}, @samp{-1},
|
||||
@samp{--}, @samp{--help}, and @samp{--version} that most other
|
||||
programs would treat as options. To get help and version information,
|
||||
@@ -11295,7 +11536,7 @@ Exit status:
|
||||
* File type tests:: -[bcdfhLpSt]
|
||||
* Access permission tests:: -[gkruwxOG]
|
||||
* File characteristic tests:: -e -s -nt -ot -ef
|
||||
* String tests:: -z -n = !=
|
||||
* String tests:: -z -n = == !=
|
||||
* Numeric tests:: -eq -ne -lt -le -gt -ge
|
||||
* Connectives for test:: ! -a -o
|
||||
@end menu
|
||||
@@ -11486,6 +11727,11 @@ True if the length of @var{string} is nonzero.
|
||||
@cindex equal string check
|
||||
True if the strings are equal.
|
||||
|
||||
@item @var{string1} == @var{string2}
|
||||
@opindex ==
|
||||
@cindex equal string check
|
||||
True if the strings are equal (synonym for =).
|
||||
|
||||
@item @var{string1} != @var{string2}
|
||||
@opindex !=
|
||||
@cindex not-equal string check
|
||||
@@ -12471,8 +12717,9 @@ be used in combination with any line settings.
|
||||
@opindex --file
|
||||
Set the line opened by the file name specified in @var{device} instead of
|
||||
the tty line connected to standard input. This option is necessary
|
||||
because opening a @acronym{POSIX} tty requires use of the @code{O_NONDELAY} flag to
|
||||
prevent a @acronym{POSIX} tty from blocking until the carrier detect line is high if
|
||||
because opening a @acronym{POSIX} tty requires use of the
|
||||
@code{O_NONDELAY} flag to prevent a @acronym{POSIX} tty from blocking
|
||||
until the carrier detect line is high if
|
||||
the @code{clocal} flag is not set. Hence, it is not always possible
|
||||
to allow the shell to open the device in the traditional manner.
|
||||
|
||||
@@ -12494,8 +12741,9 @@ case, that is, when @emph{not} negated (unless stated otherwise,
|
||||
of course).
|
||||
|
||||
Some settings are not available on all @acronym{POSIX} systems, since they use
|
||||
extensions. Such arguments are marked below with ``Non-@acronym{POSIX}'' in their
|
||||
description. On non-@acronym{POSIX} systems, those or other settings also may not
|
||||
extensions. Such arguments are marked below with
|
||||
``Non-@acronym{POSIX}'' in their description. On non-@acronym{POSIX}
|
||||
systems, those or other settings also may not
|
||||
be available, but it's not feasible to document all the variations: just
|
||||
try it and see.
|
||||
|
||||
@@ -12702,7 +12950,8 @@ Newline performs a carriage return. Non-@acronym{POSIX}. May be negated.
|
||||
@item ofill
|
||||
@opindex ofill
|
||||
@cindex pad instead of timing for delaying
|
||||
Use fill (padding) characters instead of timing for delays. Non-@acronym{POSIX}.
|
||||
Use fill (padding) characters instead of timing for delays.
|
||||
Non-@acronym{POSIX}.
|
||||
May be negated.
|
||||
|
||||
@item ofdel
|
||||
@@ -12830,7 +13079,8 @@ of literally. Non-@acronym{POSIX}. May be negated.
|
||||
@opindex crtkill
|
||||
Echo the @code{kill} special character by erasing each character on
|
||||
the line as indicated by the @code{echoprt} and @code{echoe} settings,
|
||||
instead of by the @code{echoctl} and @code{echok} settings. Non-@acronym{POSIX}.
|
||||
instead of by the @code{echoctl} and @code{echok} settings.
|
||||
Non-@acronym{POSIX}.
|
||||
May be negated.
|
||||
@end table
|
||||
|
||||
@@ -13054,7 +13304,8 @@ Set the output speed to @var{n}.
|
||||
|
||||
@item rows @var{n}
|
||||
@opindex rows
|
||||
Tell the tty kernel driver that the terminal has @var{n} rows. Non-@acronym{POSIX}.
|
||||
Tell the tty kernel driver that the terminal has @var{n} rows.
|
||||
Non-@acronym{POSIX}.
|
||||
|
||||
@item cols @var{n}
|
||||
@itemx columns @var{n}
|
||||
@@ -14271,7 +14522,8 @@ parsed reliably. In the following example, @var{release} is
|
||||
|
||||
@smallexample
|
||||
uname -a
|
||||
@result{} Linux dum 2.2.18 #4 SMP Tue Jun 5 11:24:08 PDT 2001 i686 unknown unknown GNU/Linux
|
||||
@result{} Linux dum 2.2.18 #4 SMP Tue Jun 5 11:24:08 PDT 2001 i686@c
|
||||
unknown unknown GNU/Linux
|
||||
@end smallexample
|
||||
|
||||
|
||||
@@ -14477,7 +14729,8 @@ Synopses:
|
||||
|
||||
@smallexample
|
||||
chcon [@var{option}]@dots{} @var{context} @var{file}@dots{}
|
||||
chcon [@var{option}]@dots{} [-u @var{user}] [-r @var{role}] [-l @var{range}] [-t @var{type}] @var{file}@dots{}
|
||||
chcon [@var{option}]@dots{} [-u @var{user}] [-r @var{role}] [-l @var{range}]@c
|
||||
[-t @var{type}] @var{file}@dots{}
|
||||
chcon [@var{option}]@dots{} --reference=@var{rfile} @var{file}@dots{}
|
||||
@end smallexample
|
||||
|
||||
@@ -14563,7 +14816,8 @@ Set range @var{range} in the target security context.
|
||||
Synopses:
|
||||
@smallexample
|
||||
runcon @var{context} @var{command} [@var{args}]
|
||||
runcon [ -c ] [-u @var{user}] [-r @var{role}] [-t @var{type}] [-l @var{range}] @var{command} [@var{args}]
|
||||
runcon [ -c ] [-u @var{user}] [-r @var{role}] [-t @var{type}]@c
|
||||
[-l @var{range}] @var{command} [@var{args}]
|
||||
@end smallexample
|
||||
|
||||
Run @var{command} with completely-specified @var{context}, or with
|
||||
@@ -14575,7 +14829,8 @@ is specified, the first argument is used as the complete context.
|
||||
Any additional arguments after @var{command}
|
||||
are interpreted as arguments to the command.
|
||||
|
||||
With neither @var{context} nor @var{command}, print the current security context.
|
||||
With neither @var{context} nor @var{command}, print the current
|
||||
security context.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@@ -15503,8 +15758,7 @@ days
|
||||
Historical implementations of @command{sleep} have required that
|
||||
@var{number} be an integer, and only accepted a single argument
|
||||
without a suffix. However, GNU @command{sleep} accepts
|
||||
arbitrary floating point numbers (using a period before any fractional
|
||||
digits).
|
||||
arbitrary floating point numbers. @xref{Floating point}.
|
||||
|
||||
The only options are @option{--help} and @option{--version}. @xref{Common
|
||||
options}.
|
||||
@@ -15604,8 +15858,7 @@ When @var{increment} is not specified, it defaults to @samp{1},
|
||||
even when @var{first} is larger than @var{last}.
|
||||
@var{first} also defaults to @samp{1}. So @code{seq 1} prints
|
||||
@samp{1}, but @code{seq 0} and @code{seq 10 5} produce no output.
|
||||
Floating-point numbers
|
||||
may be specified (using a period before any fractional digits).
|
||||
Floating-point numbers may be specified. @xref{Floating point}.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
Options must precede operands.
|
||||
@@ -15682,7 +15935,8 @@ of @code{%x}.
|
||||
|
||||
On most systems, seq can produce whole-number output for values up to
|
||||
at least @math{2^{53}}. Larger integers are approximated. The details
|
||||
differ depending on your floating-point implementation, but a common
|
||||
differ depending on your floating-point implementation.
|
||||
@xref{Floating point}. A common
|
||||
case is that @command{seq} works with integers through @math{2^{64}},
|
||||
and larger integers may not be numerically correct:
|
||||
|
||||
@@ -15738,7 +15992,8 @@ It was written by Arnold Robbins.
|
||||
@unnumberedsec Toolbox Introduction
|
||||
|
||||
This month's column is only peripherally related to the GNU Project, in
|
||||
that it describes a number of the GNU tools on your GNU/Linux system and how they
|
||||
that it describes a number of the GNU tools on your GNU/Linux system
|
||||
and how they
|
||||
might be used. What it's really about is the ``Software Tools'' philosophy
|
||||
of program development and usage.
|
||||
|
||||
@@ -15938,7 +16193,8 @@ by a count of the number of times that line occurred in the input.
|
||||
@unnumberedsec Putting the Tools Together
|
||||
|
||||
Now, let's suppose this is a large ISP server system with dozens of users
|
||||
logged in. The management wants the system administrator to write a program that will
|
||||
logged in. The management wants the system administrator to write a
|
||||
program that will
|
||||
generate a sorted list of logged in users. Furthermore, even if a user
|
||||
is logged in multiple times, his or her name should only show up in the
|
||||
output once.
|
||||
@@ -15980,7 +16236,8 @@ The @command{sort} command actually has a @option{-u} option that does what
|
||||
@command{uniq} does. However, @command{uniq} has other uses for which one
|
||||
cannot substitute @samp{sort -u}.
|
||||
|
||||
The administrator puts this pipeline into a shell script, and makes it available for
|
||||
The administrator puts this pipeline into a shell script, and makes it
|
||||
available for
|
||||
all the users on the system (@samp{#} is the system administrator,
|
||||
or @code{root}, prompt):
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@c File mode bits
|
||||
|
||||
@c Copyright (C) 1994, 1996, 1999-2001, 2003-2006, 2008-2010 Free Software
|
||||
@c Copyright (C) 1994, 1996, 1999-2001, 2003-2006, 2008-2011 Free Software
|
||||
@c Foundation, Inc.
|
||||
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
|
||||
237
gl/lib/di-set.c
237
gl/lib/di-set.c
@@ -1,237 +0,0 @@
|
||||
/* Set operations for device-inode pairs stored in a space-efficient manner.
|
||||
|
||||
Copyright 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
|
||||
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 Paul Eggert and Jim Meyering */
|
||||
|
||||
#include <config.h>
|
||||
#include "di-set.h"
|
||||
|
||||
#include "hash.h"
|
||||
#include "ino-map.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* The hash package hashes "void *", but this package wants to hash
|
||||
integers. Use integers that are as large as possible, but no
|
||||
larger than void *, so that they can be cast to void * and back
|
||||
without losing information. */
|
||||
typedef size_t hashint;
|
||||
#define HASHINT_MAX ((hashint) -1)
|
||||
|
||||
/* Integers represent inode numbers. Integers in the range
|
||||
1..(LARGE_INO_MIN-1) represent inode numbers directly. (The hash
|
||||
package does not work with null pointers, so inode 0 cannot be used
|
||||
as a key.) To find the representations of other inode numbers, map
|
||||
them through INO_MAP. */
|
||||
#define LARGE_INO_MIN (HASHINT_MAX / 2)
|
||||
|
||||
/* Set operations for device-inode pairs stored in a space-efficient
|
||||
manner. Use a two-level hash table. The top level hashes by
|
||||
device number, as there are typically a small number of devices.
|
||||
The lower level hashes by mapped inode numbers. In the typical
|
||||
case where the inode number is positive and small, the inode number
|
||||
maps to itself, masquerading as a void * value; otherwise, its
|
||||
value is the result of hashing the inode value through INO_MAP. */
|
||||
|
||||
/* A pair that maps a device number to a set of inode numbers. */
|
||||
struct di_ent
|
||||
{
|
||||
dev_t dev;
|
||||
struct hash_table *ino_set;
|
||||
};
|
||||
|
||||
/* A two-level hash table that manages and indexes these pairs. */
|
||||
struct di_set
|
||||
{
|
||||
/* Map device numbers to sets of inode number representatives. */
|
||||
struct hash_table *dev_map;
|
||||
|
||||
/* If nonnull, map large inode numbers to their small
|
||||
representatives. If null, there are no large inode numbers in
|
||||
this set. */
|
||||
struct ino_map *ino_map;
|
||||
|
||||
/* Cache of the most recently allocated and otherwise-unused storage
|
||||
for probing this table. */
|
||||
struct di_ent *probe;
|
||||
};
|
||||
|
||||
/* Hash a device-inode-set entry. */
|
||||
static size_t
|
||||
di_ent_hash (void const *x, size_t table_size)
|
||||
{
|
||||
struct di_ent const *p = x;
|
||||
dev_t dev = p->dev;
|
||||
|
||||
/* When DEV is wider than size_t, exclusive-OR the words of DEV into H.
|
||||
This avoids loss of info, without applying % to the wider type,
|
||||
which could be quite slow on some systems. */
|
||||
size_t h = dev;
|
||||
unsigned int i;
|
||||
unsigned int n_words = sizeof dev / sizeof h + (sizeof dev % sizeof h != 0);
|
||||
for (i = 1; i < n_words; i++)
|
||||
h ^= dev >> CHAR_BIT * sizeof h * i;
|
||||
|
||||
return h % table_size;
|
||||
}
|
||||
|
||||
/* Return true if two device-inode-set entries are the same. */
|
||||
static bool
|
||||
di_ent_compare (void const *x, void const *y)
|
||||
{
|
||||
struct di_ent const *a = x;
|
||||
struct di_ent const *b = y;
|
||||
return a->dev == b->dev;
|
||||
}
|
||||
|
||||
/* Free a device-inode-set entry. */
|
||||
static void
|
||||
di_ent_free (void *v)
|
||||
{
|
||||
struct di_ent *a = v;
|
||||
hash_free (a->ino_set);
|
||||
free (a);
|
||||
}
|
||||
|
||||
/* Create a set of device-inode pairs. Return NULL on allocation failure. */
|
||||
struct di_set *
|
||||
di_set_alloc (void)
|
||||
{
|
||||
struct di_set *dis = malloc (sizeof *dis);
|
||||
if (dis)
|
||||
{
|
||||
enum { INITIAL_DEV_MAP_SIZE = 11 };
|
||||
dis->dev_map = hash_initialize (INITIAL_DEV_MAP_SIZE, NULL,
|
||||
di_ent_hash, di_ent_compare,
|
||||
di_ent_free);
|
||||
if (! dis->dev_map)
|
||||
{
|
||||
free (dis);
|
||||
return NULL;
|
||||
}
|
||||
dis->ino_map = NULL;
|
||||
dis->probe = NULL;
|
||||
}
|
||||
|
||||
return dis;
|
||||
}
|
||||
|
||||
/* Free a set of device-inode pairs. */
|
||||
void
|
||||
di_set_free (struct di_set *dis)
|
||||
{
|
||||
hash_free (dis->dev_map);
|
||||
free (dis->ino_map);
|
||||
free (dis->probe);
|
||||
free (dis);
|
||||
}
|
||||
|
||||
/* Hash an encoded inode number I. */
|
||||
static size_t
|
||||
di_ino_hash (void const *i, size_t table_size)
|
||||
{
|
||||
return (hashint) i % table_size;
|
||||
}
|
||||
|
||||
/* Using the DIS table, map a device to a hash table that represents
|
||||
a set of inode numbers. Return NULL on error. */
|
||||
static struct hash_table *
|
||||
map_device (struct di_set *dis, dev_t dev)
|
||||
{
|
||||
/* Find space for the probe, reusing the cache if available. */
|
||||
struct di_ent *ent;
|
||||
struct di_ent *probe = dis->probe;
|
||||
if (probe)
|
||||
{
|
||||
/* If repeating a recent query, return the cached result. */
|
||||
if (probe->dev == dev)
|
||||
return probe->ino_set;
|
||||
}
|
||||
else
|
||||
{
|
||||
dis->probe = probe = malloc (sizeof *probe);
|
||||
if (! probe)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Probe for the device. */
|
||||
probe->dev = dev;
|
||||
ent = hash_insert (dis->dev_map, probe);
|
||||
if (! ent)
|
||||
return NULL;
|
||||
|
||||
if (ent != probe)
|
||||
{
|
||||
/* Use the existing entry. */
|
||||
probe->ino_set = ent->ino_set;
|
||||
}
|
||||
else
|
||||
{
|
||||
enum { INITIAL_INO_SET_SIZE = 1021 };
|
||||
|
||||
/* Prepare to allocate a new probe next time; this one is in use. */
|
||||
dis->probe = NULL;
|
||||
|
||||
/* DEV is new; allocate an inode set for it. */
|
||||
probe->ino_set = hash_initialize (INITIAL_INO_SET_SIZE, NULL,
|
||||
di_ino_hash, NULL, NULL);
|
||||
}
|
||||
|
||||
return probe->ino_set;
|
||||
}
|
||||
|
||||
/* Using the DIS table, map an inode number to a mapped value.
|
||||
Return INO_MAP_INSERT_FAILURE on error. */
|
||||
static hashint
|
||||
map_inode_number (struct di_set *dis, ino_t ino)
|
||||
{
|
||||
if (0 < ino && ino < LARGE_INO_MIN)
|
||||
return ino;
|
||||
|
||||
if (! dis->ino_map)
|
||||
{
|
||||
dis->ino_map = ino_map_alloc (LARGE_INO_MIN);
|
||||
if (! dis->ino_map)
|
||||
return INO_MAP_INSERT_FAILURE;
|
||||
}
|
||||
|
||||
return ino_map_insert (dis->ino_map, ino);
|
||||
}
|
||||
|
||||
/* Attempt to insert the DEV,INO pair into the set DIS.
|
||||
If it matches a pair already in DIS, keep that pair and return 0.
|
||||
Otherwise, if insertion is successful, return 1.
|
||||
Upon any failure return -1. */
|
||||
int
|
||||
di_set_insert (struct di_set *dis, dev_t dev, ino_t ino)
|
||||
{
|
||||
hashint i;
|
||||
|
||||
/* Map the device number to a set of inodes. */
|
||||
struct hash_table *ino_set = map_device (dis, dev);
|
||||
if (! ino_set)
|
||||
return -1;
|
||||
|
||||
/* Map the inode number to a small representative I. */
|
||||
i = map_inode_number (dis, ino);
|
||||
if (i == INO_MAP_INSERT_FAILURE)
|
||||
return -1;
|
||||
|
||||
/* Put I into the inode set. */
|
||||
return hash_insert0 (ino_set, (void *) i, NULL);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#undef _ATTRIBUTE_NONNULL_
|
||||
#if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__
|
||||
# define _ATTRIBUTE_NONNULL_(m) __attribute__ ((__nonnull__ (m)))
|
||||
#else
|
||||
# define _ATTRIBUTE_NONNULL_(m)
|
||||
#endif
|
||||
|
||||
struct di_set *di_set_alloc (void);
|
||||
int di_set_insert (struct di_set *, dev_t, ino_t) _ATTRIBUTE_NONNULL_ (1);
|
||||
void di_set_free (struct di_set *) _ATTRIBUTE_NONNULL_ (1);
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Declare an access pattern hint for files.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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 @@
|
||||
/* Declare an access pattern hint for files.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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 @@
|
||||
/* Barebones heap implementation supporting only insert and pop.
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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 @@
|
||||
/* Barebones heap implementation supporting only insert and pop.
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
164
gl/lib/ino-map.c
164
gl/lib/ino-map.c
@@ -1,164 +0,0 @@
|
||||
/* Map an ino_t inode number to a small integer.
|
||||
|
||||
Copyright 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
|
||||
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 Paul Eggert and Jim Meyering */
|
||||
|
||||
#include <config.h>
|
||||
#include "ino-map.h"
|
||||
|
||||
#include "hash.h"
|
||||
#include "verify.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* A pair that maps an inode number to a mapped inode number; the
|
||||
latter is a small unique ID for the former. */
|
||||
struct ino_map_ent
|
||||
{
|
||||
ino_t ino;
|
||||
size_t mapped_ino;
|
||||
};
|
||||
|
||||
/* A table that manages and indexes these pairs. */
|
||||
struct ino_map
|
||||
{
|
||||
/* A table of KEY,VAL pairs, where KEY is the raw ino_t value and
|
||||
VAL is the small number that it maps to. */
|
||||
struct hash_table *map;
|
||||
|
||||
/* The next mapped inode number to hand out. */
|
||||
size_t next_mapped_ino;
|
||||
|
||||
/* Cache of the most recently allocated and otherwise-unused storage
|
||||
for probing the table. */
|
||||
struct ino_map_ent *probe;
|
||||
};
|
||||
|
||||
/* Hash an inode map entry. */
|
||||
static size_t
|
||||
ino_hash (void const *x, size_t table_size)
|
||||
{
|
||||
struct ino_map_ent const *p = x;
|
||||
ino_t ino = p->ino;
|
||||
|
||||
/* When INO is wider than size_t, exclusive-OR the words of INO into H.
|
||||
This avoids loss of info, without applying % to the wider type,
|
||||
which could be quite slow on some systems. */
|
||||
size_t h = ino;
|
||||
unsigned int i;
|
||||
unsigned int n_words = sizeof ino / sizeof h + (sizeof ino % sizeof h != 0);
|
||||
for (i = 1; i < n_words; i++)
|
||||
h ^= ino >> CHAR_BIT * sizeof h * i;
|
||||
|
||||
return h % table_size;
|
||||
}
|
||||
|
||||
/* Return true if two inode map entries are the same. */
|
||||
static bool
|
||||
ino_compare (void const *x, void const *y)
|
||||
{
|
||||
struct ino_map_ent const *a = x;
|
||||
struct ino_map_ent const *b = y;
|
||||
return a->ino == b->ino;
|
||||
}
|
||||
|
||||
/* Allocate an inode map that will hand out integers starting with
|
||||
NEXT_MAPPED_INO. Return NULL if memory is exhausted. */
|
||||
struct ino_map *
|
||||
ino_map_alloc (size_t next_mapped_ino)
|
||||
{
|
||||
struct ino_map *im = malloc (sizeof *im);
|
||||
|
||||
if (im)
|
||||
{
|
||||
enum { INITIAL_INO_MAP_TABLE_SIZE = 1021 };
|
||||
im->map = hash_initialize (INITIAL_INO_MAP_TABLE_SIZE, NULL,
|
||||
ino_hash, ino_compare, free);
|
||||
if (! im->map)
|
||||
{
|
||||
free (im);
|
||||
return NULL;
|
||||
}
|
||||
im->next_mapped_ino = next_mapped_ino;
|
||||
im->probe = NULL;
|
||||
}
|
||||
|
||||
return im;
|
||||
}
|
||||
|
||||
/* Free an inode map. */
|
||||
void
|
||||
ino_map_free (struct ino_map *map)
|
||||
{
|
||||
hash_free (map->map);
|
||||
free (map->probe);
|
||||
free (map);
|
||||
}
|
||||
|
||||
|
||||
/* Insert into MAP the inode number INO if it's not there already,
|
||||
and return its nonnegative mapped inode number.
|
||||
If INO is already in MAP, return the existing mapped inode number.
|
||||
Return INO_MAP_INSERT_FAILURE on memory or counter exhaustion. */
|
||||
size_t
|
||||
ino_map_insert (struct ino_map *im, ino_t ino)
|
||||
{
|
||||
struct ino_map_ent *ent;
|
||||
|
||||
/* Find space for the probe, reusing the cache if available. */
|
||||
struct ino_map_ent *probe = im->probe;
|
||||
if (probe)
|
||||
{
|
||||
/* If repeating a recent query, return the cached result. */
|
||||
if (probe->ino == ino)
|
||||
return probe->mapped_ino;
|
||||
}
|
||||
else
|
||||
{
|
||||
im->probe = probe = malloc (sizeof *probe);
|
||||
if (! probe)
|
||||
return INO_MAP_INSERT_FAILURE;
|
||||
}
|
||||
|
||||
probe->ino = ino;
|
||||
ent = hash_insert (im->map, probe);
|
||||
if (! ent)
|
||||
return INO_MAP_INSERT_FAILURE;
|
||||
|
||||
if (ent != probe)
|
||||
{
|
||||
/* Use the existing entry. */
|
||||
probe->mapped_ino = ent->mapped_ino;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If adding 1 to map->next_mapped_ino would cause it to
|
||||
overflow to zero, then it must equal INO_MAP_INSERT_FAILURE,
|
||||
which is the value that should be returned in that case.
|
||||
Verify that this works. */
|
||||
verify (INO_MAP_INSERT_FAILURE + 1 == 0);
|
||||
|
||||
/* Prepare to allocate a new probe next time; this one is in use. */
|
||||
im->probe = NULL;
|
||||
|
||||
/* INO is new; allocate a mapped inode number for it. */
|
||||
probe->mapped_ino = im->next_mapped_ino++;
|
||||
}
|
||||
|
||||
return probe->mapped_ino;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#undef _ATTRIBUTE_NONNULL_
|
||||
#if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__
|
||||
# define _ATTRIBUTE_NONNULL_(m) __attribute__ ((__nonnull__ (m)))
|
||||
#else
|
||||
# define _ATTRIBUTE_NONNULL_(m)
|
||||
#endif
|
||||
|
||||
#define INO_MAP_INSERT_FAILURE ((size_t) -1)
|
||||
|
||||
struct ino_map *ino_map_alloc (size_t);
|
||||
void ino_map_free (struct ino_map *) _ATTRIBUTE_NONNULL_ (1);
|
||||
size_t ino_map_insert (struct ino_map *, ino_t) _ATTRIBUTE_NONNULL_ (1);
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Align/Truncate a string in a given screen width
|
||||
Copyright (C) 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -79,27 +79,6 @@ wc_truncate (wchar_t *wc, size_t width)
|
||||
return cells;
|
||||
}
|
||||
|
||||
/* FIXME: move this function to gnulib as it's missing on:
|
||||
OpenBSD 3.8, IRIX 5.3, Solaris 2.5.1, mingw, BeOS */
|
||||
|
||||
static int
|
||||
rpl_wcswidth (const wchar_t *s, size_t n)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
while (n-- > 0 && *s != L'\0')
|
||||
{
|
||||
int nwidth = wcwidth (*s++);
|
||||
if (nwidth == -1) /* non printable */
|
||||
return -1;
|
||||
if (ret > (INT_MAX - nwidth)) /* overflow */
|
||||
return -1;
|
||||
ret += nwidth;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Write N_SPACES space characters to DEST while ensuring
|
||||
nothing is written beyond DEST_END. A terminating NUL
|
||||
is always added to DEST.
|
||||
@@ -171,7 +150,7 @@ mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
str_wc[src_chars - 1] = L'\0';
|
||||
wc_enabled = true;
|
||||
conversion = wc_ensure_printable (str_wc);
|
||||
n_cols = rpl_wcswidth (str_wc, src_chars);
|
||||
n_cols = wcswidth (str_wc, src_chars);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Align/Truncate a string in a given screen width
|
||||
Copyright (C) 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -19,7 +19,7 @@
|
||||
typedef enum { MBS_ALIGN_LEFT, MBS_ALIGN_RIGHT, MBS_ALIGN_CENTER } mbs_align_t;
|
||||
|
||||
enum {
|
||||
/* Use unibyte mode for invalid multibyte strings or
|
||||
/* Use unibyte mode for invalid multibyte strings
|
||||
or when heap memory is exhausted. */
|
||||
MBA_UNIBYTE_FALLBACK = 0x0001
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Bob Jenkins's cryptographic random number generators, ISAAC and ISAAC64.
|
||||
|
||||
Copyright (C) 1999-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2006, 2009-2011 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 generators, ISAAC and ISAAC64.
|
||||
|
||||
Copyright (C) 1999-2005, 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2005, 2009-2011 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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 @@
|
||||
/* root-dev-ino.c -- get the device and inode numbers for `/'.
|
||||
Copyright (C) 2003, 2005-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2005-2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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 @@
|
||||
#serial 3
|
||||
dnl Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005-2006, 2009-2011 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,24 +0,0 @@
|
||||
Description:
|
||||
manipulate sets of device-inode pairs efficiently
|
||||
|
||||
Files:
|
||||
lib/di-set.c
|
||||
lib/di-set.h
|
||||
|
||||
Depends-on:
|
||||
ino-map
|
||||
hash
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
lib_SOURCES += di-set.c di-set.h
|
||||
|
||||
Include:
|
||||
"di-set.h"
|
||||
|
||||
License
|
||||
GPL
|
||||
|
||||
Maintainer:
|
||||
Jim Meyering
|
||||
@@ -1,10 +0,0 @@
|
||||
Files:
|
||||
tests/test-di-set.c
|
||||
|
||||
Depends-on:
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
TESTS += test-di-set
|
||||
check_PROGRAMS += test-di-set
|
||||
10
gl/modules/fadvise-tests
Normal file
10
gl/modules/fadvise-tests
Normal file
@@ -0,0 +1,10 @@
|
||||
Files:
|
||||
tests/test-fadvise.c
|
||||
|
||||
Depends-on:
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
TESTS += test-fadvise
|
||||
check_PROGRAMS += test-fadvise
|
||||
@@ -1,24 +0,0 @@
|
||||
Description:
|
||||
maintain a mapping of ino_t numbers to small integers
|
||||
|
||||
Files:
|
||||
lib/ino-map.c
|
||||
lib/ino-map.h
|
||||
|
||||
Depends-on:
|
||||
hash
|
||||
verify
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
lib_SOURCES += ino-map.c ino-map.h
|
||||
|
||||
Include:
|
||||
"ino-map.h"
|
||||
|
||||
License
|
||||
GPL
|
||||
|
||||
Maintainer:
|
||||
Jim Meyering
|
||||
@@ -1,10 +0,0 @@
|
||||
Files:
|
||||
tests/test-ino-map.c
|
||||
|
||||
Depends-on:
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
TESTS += test-ino-map
|
||||
check_PROGRAMS += test-ino-map
|
||||
@@ -1,5 +1,6 @@
|
||||
Files:
|
||||
tests/test-rand-isaac.c
|
||||
tests/macros.h
|
||||
|
||||
Depends-on:
|
||||
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
/* Test the di-set module.
|
||||
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 Jim Meyering. */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define ASSERT(expr) \
|
||||
do \
|
||||
{ \
|
||||
if (!(expr)) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
|
||||
fflush (stderr); \
|
||||
abort (); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#include "di-set.h"
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
struct di_set *dis = di_set_alloc ();
|
||||
ASSERT (dis);
|
||||
|
||||
ASSERT (di_set_insert (dis, 2, 5) == 1); /* first insertion succeeds */
|
||||
ASSERT (di_set_insert (dis, 2, 5) == 0); /* duplicate fails */
|
||||
ASSERT (di_set_insert (dis, 3, 5) == 1); /* diff dev, duplicate inode is ok */
|
||||
ASSERT (di_set_insert (dis, 2, 8) == 1); /* same dev, different inode is ok */
|
||||
|
||||
/* very large (or negative) inode number */
|
||||
ASSERT (di_set_insert (dis, 5, (ino_t) -1) == 1);
|
||||
ASSERT (di_set_insert (dis, 5, (ino_t) -1) == 0); /* dup */
|
||||
|
||||
unsigned int i;
|
||||
for (i = 0; i < 3000; i++)
|
||||
ASSERT (di_set_insert (dis, 9, i) == 1);
|
||||
for (i = 0; i < 3000; i++)
|
||||
ASSERT (di_set_insert (dis, 9, i) == 0); /* duplicate fails */
|
||||
|
||||
di_set_free (dis);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Test that fadvise works as advertised.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -21,6 +21,13 @@
|
||||
|
||||
#include "fadvise.h"
|
||||
|
||||
/* We ignore any errors as these hints are only advisory.
|
||||
* There is the chance one can pass invalid ADVICE, which will
|
||||
* not be indicated, but given the simplicity of the interface
|
||||
* this is unlikely. Also not returning errors allows the
|
||||
* unconditional passing of descriptors to non standard files,
|
||||
* which will just be ignored if unsupported. */
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/* Test the ino-map module.
|
||||
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 Jim Meyering. */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* FIXME: once/if in gnulib, use #include "macros.h" in place of this */
|
||||
#define ASSERT(expr) \
|
||||
do \
|
||||
{ \
|
||||
if (!(expr)) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
|
||||
fflush (stderr); \
|
||||
abort (); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#include "ino-map.h"
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
enum { INO_MAP_INIT = 123 };
|
||||
struct ino_map *ino_map = ino_map_alloc (INO_MAP_INIT);
|
||||
ASSERT (ino_map != NULL);
|
||||
|
||||
ASSERT (ino_map_insert (ino_map, 42) == INO_MAP_INIT);
|
||||
ASSERT (ino_map_insert (ino_map, 42) == INO_MAP_INIT);
|
||||
ASSERT (ino_map_insert (ino_map, 398) == INO_MAP_INIT + 1);
|
||||
ASSERT (ino_map_insert (ino_map, 398) == INO_MAP_INIT + 1);
|
||||
ASSERT (ino_map_insert (ino_map, 0) == INO_MAP_INIT + 2);
|
||||
ASSERT (ino_map_insert (ino_map, 0) == INO_MAP_INIT + 2);
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
ASSERT (ino_map_insert (ino_map, 10000 + i) == INO_MAP_INIT + 3 + i);
|
||||
}
|
||||
|
||||
ino_map_free (ino_map);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Test that mbsalign works as advertised.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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 @@
|
||||
/* Test the ISAAC or ISAAC64 pseudorandom number generator.
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -23,22 +23,9 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* FIXME: once/if in gnulib, use #include "macros.h" in place of this */
|
||||
#define ASSERT(expr) \
|
||||
do \
|
||||
{ \
|
||||
if (!(expr)) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
|
||||
fflush (stderr); \
|
||||
abort (); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
#include "macros.h"
|
||||
|
||||
/* This expected output was generated by running the programs in
|
||||
<http://burtleburtle.net/bob/rand/isaacafa.html>, as last modified
|
||||
|
||||
2
gnulib
2
gnulib
Submodule gnulib updated: a14bd22364...a81348d2e1
@@ -3,15 +3,18 @@ include gnulib.mk
|
||||
AM_CFLAGS = $(GNULIB_TEST_WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
|
||||
# A few tests are inherently warning-evoking.
|
||||
# Since we require -Werror, exempt the few offenders.
|
||||
# In the typical case where we use -Werror, exempt the few offenders.
|
||||
|
||||
# test-xvasprintf.c: In function 'test_xasprintf':
|
||||
# test-xvasprintf.c:100: error: format not a string literal and no \
|
||||
# format arguments [-Wformat-security]
|
||||
test_xvasprintf_CFLAGS = $(AM_CFLAGS) -Wno-format-security
|
||||
test_xvasprintf_CFLAGS = $(AM_CFLAGS) \
|
||||
`test -n '$(WERROR_CFLAGS)' && echo ' -Wno-format-security'`
|
||||
|
||||
# test-lock.c: In function 'lock_mutator_thread':
|
||||
# test-lock.c:148: error: cast from function call of type 'pthread_t' to \
|
||||
# non-matching type 'void *' [-Wbad-function-cast]
|
||||
test_lock_CFLAGS = $(AM_CFLAGS) -Wno-bad-function-cast
|
||||
test_tls_CFLAGS = $(AM_CFLAGS) -Wno-bad-function-cast
|
||||
test_lock_CFLAGS = $(AM_CFLAGS) \
|
||||
`test -n '$(WERROR_CFLAGS)' && echo ' -Wno-bad-function-cast'`
|
||||
test_tls_CFLAGS = $(AM_CFLAGS) \
|
||||
`test -n '$(WERROR_CFLAGS)' && echo ' -Wno-bad-function-cast'`
|
||||
|
||||
@@ -8746,7 +8746,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2000-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2011 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-2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995-2007, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
## This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2005, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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. This is an internal include file.
|
||||
|
||||
Copyright (C) 1988, 1991-1993, 1995-1996, 1998-2000, 2003-2006, 2009-2010
|
||||
Copyright (C) 1988, 1991-1993, 1995-1996, 1998-2000, 2003-2006, 2009-2011
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Compare numeric strings.
|
||||
|
||||
Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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-2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
# This 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-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
This 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,7 +5004,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1997-2006, 2009-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2006, 2009-2011 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# boottime.m4 serial 4
|
||||
# Determine whether this system has infrastructure for obtaining the boot time.
|
||||
|
||||
# Copyright (C) 1996, 2000, 2002-2004, 2006, 2008-2010 Free Software
|
||||
# Copyright (C) 1996, 2000, 2002-2004, 2006, 2008-2011 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -52,7 +52,9 @@ AC_DEFUN([GNULIB_BOOT_TIME],
|
||||
#endif
|
||||
],
|
||||
[[
|
||||
#if defined BOOT_TIME || (defined CTL_KERN && defined KERN_BOOTTIME) || HAVE_OS_H
|
||||
#if (defined BOOT_TIME \
|
||||
|| (defined CTL_KERN && defined KERN_BOOTTIME) \
|
||||
|| HAVE_OS_H)
|
||||
/* your system *does* have the infrastructure to determine boot time */
|
||||
#else
|
||||
please_tell_us_how_to_determine_boot_time_on_your_system
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#serial 26
|
||||
# Check declarations for this package.
|
||||
|
||||
dnl Copyright (C) 1997-2001, 2003-2006, 2008-2010 Free Software Foundation,
|
||||
dnl Copyright (C) 1997-2001, 2003-2006, 2008-2011 Free Software Foundation,
|
||||
dnl Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# serial 1
|
||||
dnl Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009-2011 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-2010 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009-2011 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-2010 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user