merging coreutils-7.4 into trunk
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30823 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -36,7 +36,8 @@ SYSTEM_BIN = "[" addattr alert arp base64 basename bash bc beep bootman bzip2
|
|||||||
factor false fdinfo ffm filepanel find finddir fmt fold fortune frcode
|
factor false fdinfo ffm filepanel find finddir fmt fold fortune frcode
|
||||||
ftp ftpd
|
ftp ftpd
|
||||||
funzip fwcontrol
|
funzip fwcontrol
|
||||||
gawk $(X86_ONLY)gdb grep groups gzip gzexe hd head hey hostname
|
gawk $(X86_ONLY)gdb getlimits grep groups gzip gzexe
|
||||||
|
hd head hey hostname
|
||||||
id ident ideinfo idestatus ifconfig <bin>install installsound iroster
|
id ident ideinfo idestatus ifconfig <bin>install installsound iroster
|
||||||
isvolume
|
isvolume
|
||||||
join
|
join
|
||||||
@@ -55,10 +56,10 @@ SYSTEM_BIN = "[" addattr alert arp base64 basename bash bc beep bootman bzip2
|
|||||||
safemode screen_blanker screenmode sed setdecor settype setversion setvolume
|
safemode screen_blanker screenmode sed setdecor settype setversion setvolume
|
||||||
seq sha1sum shar shred shuf shutdown sleep sort spamdbm split stat strace
|
seq sha1sum shar shred shuf shutdown sleep sort spamdbm split stat strace
|
||||||
stty su sum sync sysinfo
|
stty su sum sync sysinfo
|
||||||
tac tail tar tcpdump tcptester tee telnet telnetd test top touch tput tr
|
tac tail tar tcpdump tcptester tee telnet telnetd test timeout top touch tput
|
||||||
traceroute translate trash true tsort tty
|
tr traceroute translate trash true truncate tsort tty
|
||||||
uname unchop unexpand unmount uniq unrar unshar unzip unzipsfx <bin>updatedb
|
uname unchop unexpand unmount uniq unlink unrar unshar unzip unzipsfx
|
||||||
uptime urlwrapper useradd uudecode uuencode
|
<bin>updatedb uptime urlwrapper useradd uudecode uuencode
|
||||||
vdir version vim vmstat waitfor wc wget whoami xargs xres yes
|
vdir version vim vmstat waitfor wc wget whoami xargs xres yes
|
||||||
zdiff zforce zgrep zip zipcloak <bin>zipgrep zipnote zipsplit zmore znew
|
zdiff zforce zgrep zip zipcloak <bin>zipgrep zipnote zipsplit zmore znew
|
||||||
;
|
;
|
||||||
|
|||||||
+27
-17
@@ -1,35 +1,37 @@
|
|||||||
Here are the names of the programs in this package,
|
Here are the names of the programs in this package,
|
||||||
each followed by the name(s) of its author(s).
|
each followed by the name(s) of its author(s).
|
||||||
|
|
||||||
|
arch: David MacKenzie, Karel Zak
|
||||||
base64: Simon Josefsson
|
base64: Simon Josefsson
|
||||||
basename: FIXME unknown
|
basename: David MacKenzie
|
||||||
cat: Torbjorn Granlund, Richard M. Stallman
|
cat: Torbjörn Granlund, Richard M. Stallman
|
||||||
|
chcon: Russell Coker, Jim Meyering
|
||||||
chgrp: David MacKenzie, Jim Meyering
|
chgrp: David MacKenzie, Jim Meyering
|
||||||
chmod: David MacKenzie, Jim Meyering
|
chmod: David MacKenzie, Jim Meyering
|
||||||
chown: David MacKenzie, Jim Meyering
|
chown: David MacKenzie, Jim Meyering
|
||||||
chroot: Roland McGrath
|
chroot: Roland McGrath
|
||||||
cksum: Q. Frank Xia
|
cksum: Q. Frank Xia
|
||||||
comm: Richard Stallman, David MacKenzie
|
comm: Richard M. Stallman, David MacKenzie
|
||||||
cp: Torbjorn Granlund, David MacKenzie, Jim Meyering
|
cp: Torbjörn Granlund, David MacKenzie, Jim Meyering
|
||||||
csplit: Stuart Kemp, David MacKenzie
|
csplit: Stuart Kemp, David MacKenzie
|
||||||
cut: David Ihnat, David MacKenzie, Jim Meyering
|
cut: David M. Ihnat, David MacKenzie, Jim Meyering
|
||||||
date: David MacKenzie
|
date: David MacKenzie
|
||||||
dd: Paul Rubin, David MacKenzie, Stuart Kemp
|
dd: Paul Rubin, David MacKenzie, Stuart Kemp
|
||||||
df: Torbjorn Granlund, David MacKenzie, Paul Eggert
|
df: Torbjörn Granlund, David MacKenzie, Paul Eggert
|
||||||
dir: Richard Stallman, David MacKenzie
|
dir: Richard M. Stallman, David MacKenzie
|
||||||
dircolors: H. Peter Anvin
|
dircolors: H. Peter Anvin
|
||||||
dirname: David MacKenzie, Jim Meyering
|
dirname: David MacKenzie, Jim Meyering
|
||||||
du: Torbjorn Granlund, David MacKenzie, Paul Eggert, Jim Meyering
|
du: Torbjörn Granlund, David MacKenzie, Paul Eggert, Jim Meyering
|
||||||
echo: FIXME unknown
|
echo: Brian Fox, Chet Ramey
|
||||||
env: Richard Mlynarik, David MacKenzie
|
env: Richard Mlynarik, David MacKenzie
|
||||||
expand: David MacKenzie
|
expand: David MacKenzie
|
||||||
expr: Mike Parker
|
expr: Mike Parker, James Youngman, Paul Eggert
|
||||||
factor: Paul Rubin
|
factor: Paul Rubin
|
||||||
false: Jim Meyering
|
false: Jim Meyering
|
||||||
fmt: Ross Paterson
|
fmt: Ross Paterson
|
||||||
fold: David MacKenzie
|
fold: David MacKenzie
|
||||||
ginstall: David MacKenzie
|
ginstall: David MacKenzie
|
||||||
groups: David MacKenzie
|
groups: David MacKenzie, James Youngman
|
||||||
head: David MacKenzie, Jim Meyering
|
head: David MacKenzie, Jim Meyering
|
||||||
hostid: Jim Meyering
|
hostid: Jim Meyering
|
||||||
hostname: Jim Meyering
|
hostname: Jim Meyering
|
||||||
@@ -39,11 +41,12 @@ kill: Paul Eggert
|
|||||||
link: Michael Stone
|
link: Michael Stone
|
||||||
ln: Mike Parker, David MacKenzie
|
ln: Mike Parker, David MacKenzie
|
||||||
logname: FIXME: unknown
|
logname: FIXME: unknown
|
||||||
ls: Richard Stallman, David MacKenzie
|
ls: Richard M. Stallman, David MacKenzie
|
||||||
md5sum: Ulrich Drepper, Scott Miller, David Madore
|
md5sum: Ulrich Drepper, Scott Miller, David Madore
|
||||||
mkdir: David MacKenzie
|
mkdir: David MacKenzie
|
||||||
mkfifo: David MacKenzie
|
mkfifo: David MacKenzie
|
||||||
mknod: David MacKenzie
|
mknod: David MacKenzie
|
||||||
|
mktemp: Jim Meyering
|
||||||
mv: Mike Parker, David MacKenzie, Jim Meyering
|
mv: Mike Parker, David MacKenzie, Jim Meyering
|
||||||
nice: David MacKenzie
|
nice: David MacKenzie
|
||||||
nl: Scott Bartram, David MacKenzie
|
nl: Scott Bartram, David MacKenzie
|
||||||
@@ -55,11 +58,12 @@ pinky: Joseph Arceneaux, David MacKenzie, Kaveh Ghazi
|
|||||||
pr: Pete TerMaat, Roland Huebner
|
pr: Pete TerMaat, Roland Huebner
|
||||||
printenv: David MacKenzie, Richard Mlynarik
|
printenv: David MacKenzie, Richard Mlynarik
|
||||||
printf: David MacKenzie
|
printf: David MacKenzie
|
||||||
ptx: F. Pinard
|
ptx: François Pinard
|
||||||
pwd: Jim Meyering
|
pwd: Jim Meyering
|
||||||
readlink: Dmitry V. Levin
|
readlink: Dmitry V. Levin
|
||||||
rm: Paul Rubin, David MacKenzie, Richard Stallman, Jim Meyering
|
rm: Paul Rubin, David MacKenzie, Richard M. Stallman, Jim Meyering
|
||||||
rmdir: David MacKenzie
|
rmdir: David MacKenzie
|
||||||
|
runcon: Russell Coker
|
||||||
seq: Ulrich Drepper
|
seq: Ulrich Drepper
|
||||||
sha1sum: Ulrich Drepper, Scott Miller, David Madore
|
sha1sum: Ulrich Drepper, Scott Miller, David Madore
|
||||||
sha224sum: Ulrich Drepper, Scott Miller, David Madore
|
sha224sum: Ulrich Drepper, Scott Miller, David Madore
|
||||||
@@ -70,7 +74,7 @@ shred: Colin Plumb
|
|||||||
shuf: Paul Eggert
|
shuf: Paul Eggert
|
||||||
sleep: Jim Meyering, Paul Eggert
|
sleep: Jim Meyering, Paul Eggert
|
||||||
sort: Mike Haertel, Paul Eggert
|
sort: Mike Haertel, Paul Eggert
|
||||||
split: Torbjorn Granlund, Richard M. Stallman
|
split: Torbjörn Granlund, Richard M. Stallman
|
||||||
stat: Michael Meskes
|
stat: Michael Meskes
|
||||||
stty: David MacKenzie
|
stty: David MacKenzie
|
||||||
su: David MacKenzie
|
su: David MacKenzie
|
||||||
@@ -80,19 +84,25 @@ tac: Jay Lepreau, David MacKenzie
|
|||||||
tail: Paul Rubin, David MacKenzie, Ian Lance Taylor, Jim Meyering
|
tail: Paul Rubin, David MacKenzie, Ian Lance Taylor, Jim Meyering
|
||||||
tee: Mike Parker, Richard M. Stallman, David MacKenzie
|
tee: Mike Parker, Richard M. Stallman, David MacKenzie
|
||||||
test: Kevin Braunsdorf, Matthew Bradburn
|
test: Kevin Braunsdorf, Matthew Bradburn
|
||||||
|
timeout: Pádraig Brady
|
||||||
touch: Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, Randy Smith
|
touch: Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, Randy Smith
|
||||||
tr: Jim Meyering
|
tr: Jim Meyering
|
||||||
true: Jim Meyering
|
true: Jim Meyering
|
||||||
|
truncate: Pádraig Brady
|
||||||
tsort: Mark Kettenis
|
tsort: Mark Kettenis
|
||||||
tty: David MacKenzie
|
tty: David MacKenzie
|
||||||
uname: David MacKenzie
|
uname: David MacKenzie
|
||||||
unexpand: David MacKenzie
|
unexpand: David MacKenzie
|
||||||
uniq: Richard Stallman, David MacKenzie
|
uniq: Richard M. Stallman, David MacKenzie
|
||||||
unlink: Michael Stone
|
unlink: Michael Stone
|
||||||
uptime: Joseph Arceneaux, David MacKenzie, Kaveh Ghazi
|
uptime: Joseph Arceneaux, David MacKenzie, Kaveh Ghazi
|
||||||
users: Joseph Arceneaux, David MacKenzie
|
users: Joseph Arceneaux, David MacKenzie
|
||||||
vdir: Richard Stallman, David MacKenzie
|
vdir: Richard M. Stallman, David MacKenzie
|
||||||
wc: Paul Rubin, David MacKenzie
|
wc: Paul Rubin, David MacKenzie
|
||||||
who: Joseph Arceneaux, David MacKenzie, Michael Stone
|
who: Joseph Arceneaux, David MacKenzie, Michael Stone
|
||||||
whoami: Richard Mlynarik
|
whoami: Richard Mlynarik
|
||||||
yes: David MacKenzie
|
yes: David MacKenzie
|
||||||
|
|
||||||
|
;; Local Variables:
|
||||||
|
;; coding: utf-8
|
||||||
|
;; End:
|
||||||
|
|||||||
+584
-249
@@ -1,281 +1,622 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The GNU General Public License is a free, copyleft license for
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
software and other kinds of works.
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. This
|
The licenses for most software and other practical works are designed
|
||||||
General Public License applies to most of the Free Software
|
to take away your freedom to share and change the works. By contrast,
|
||||||
Foundation's software and to any other program whose authors commit to
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
share and change all versions of a program--to make sure it remains free
|
||||||
the GNU Lesser General Public License instead.) You can apply it to
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
your programs, too.
|
your programs, too.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
When we speak of free software, we are referring to freedom, not
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
have the freedom to distribute copies of free software (and charge for
|
have the freedom to distribute copies of free software (and charge for
|
||||||
this service if you wish), that you receive source code or can get it
|
them if you wish), that you receive source code or can get it if you
|
||||||
if you want it, that you can change the software or use pieces of it
|
want it, that you can change the software or use pieces of it in new
|
||||||
in new free programs; and that you know you can do these things.
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
To protect your rights, we need to prevent others from denying you
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
These restrictions translate to certain responsibilities for you if you
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
distribute copies of the software, or if you modify it.
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
For example, if you distribute copies of such a program, whether
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
you have. You must make sure that they, too, receive or can get the
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
source code. And you must show them these terms so they know their
|
or can get the source code. And you must show them these terms so they
|
||||||
rights.
|
know their rights.
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
distribute and/or modify the software.
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
that everyone understands that there is no warranty for this free
|
that there is no warranty for this free software. For both users' and
|
||||||
software. If the software is modified by someone else and passed on, we
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
want its recipients to know that what they have is not the original, so
|
changed, so that their problems will not be attributed erroneously to
|
||||||
that any problems introduced by others will not reflect on the original
|
authors of previous versions.
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
Some devices are designed to deny users access to install or run
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
modified versions of the software inside them, although the manufacturer
|
||||||
program will individually obtain patent licenses, in effect making the
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
protecting users' freedom to change the software. The systematic
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
TERMS AND CONDITIONS
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
0. Definitions.
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
|
||||||
under the terms of this General Public License. The "Program", below,
|
|
||||||
refers to any such program or work, and a "work based on the Program"
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running the Program is not restricted, and the output from the Program
|
|
||||||
is covered only if its contents constitute a work based on the
|
|
||||||
Program (independent of having been made by running the Program).
|
|
||||||
Whether that is true depends on what the Program does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
source code as you receive it, in any medium, provided that you
|
works, such as semiconductor masks.
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
|
||||||
notices that refer to this License and to the absence of any warranty;
|
|
||||||
and give any other recipients of the Program a copy of this License
|
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
of it, thus forming a work based on the Program, and copy and
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
distribute such modifications or work under the terms of Section 1
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
above, provided that you also meet all of these conditions:
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
A "covered work" means either the unmodified Program or a work based
|
||||||
stating that you changed the files and the date of any change.
|
on the Program.
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
To "propagate" a work means to do anything with it that, without
|
||||||
whole or in part contains or is derived from the Program or any
|
permission, would make you directly or secondarily liable for
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
infringement under applicable copyright law, except executing it on a
|
||||||
parties under the terms of this License.
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
To "convey" a work means any kind of propagation that enables other
|
||||||
when run, you must cause it, when started running for such
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
interactive use in the most ordinary way, to print or display an
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
announcement including an appropriate copyright notice and a
|
|
||||||
notice that there is no warranty (or else, saying that you provide
|
|
||||||
a warranty) and that users may redistribute the program under
|
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
identifiable sections of that work are not derived from the Program,
|
to the extent that it includes a convenient and prominently visible
|
||||||
and can be reasonably considered independent and separate works in
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
themselves, then this License, and its terms, do not apply to those
|
tells the user that there is no warranty for the work (except to the
|
||||||
sections when you distribute them as separate works. But when you
|
extent that warranties are provided), that licensees may convey the
|
||||||
distribute the same sections as part of a whole which is a work based
|
work under this License, and how to view a copy of this License. If
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
the interface presents a list of user commands or options, such as a
|
||||||
this License, whose permissions for other licensees extend to the
|
menu, a prominent item in the list meets this criterion.
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
1. Source Code.
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Program.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
The "source code" for a work means the preferred form of the work
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
for making modifications to it. "Object code" means any non-source
|
||||||
a storage or distribution medium does not bring the other work under
|
form of a work.
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
A "Standard Interface" means an interface that either is an official
|
||||||
under Section 2) in object code or executable form under the terms of
|
standard defined by a recognized standards body, or, in the case of
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
The "System Libraries" of an executable work include anything, other
|
||||||
source code, which must be distributed under the terms of Sections
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
The "Corresponding Source" for a work in object code form means all
|
||||||
years, to give any third party, for a charge no more than your
|
the source code needed to generate, install, and (for an executable
|
||||||
cost of physically performing source distribution, a complete
|
work) run the object code and to modify the work, including scripts to
|
||||||
machine-readable copy of the corresponding source code, to be
|
control those activities. However, it does not include the work's
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
System Libraries, or general-purpose tools or generally available free
|
||||||
customarily used for software interchange; or,
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
The Corresponding Source need not include anything that users
|
||||||
to distribute corresponding source code. (This alternative is
|
can regenerate automatically from other parts of the Corresponding
|
||||||
allowed only for noncommercial distribution and only if you
|
Source.
|
||||||
received the program in object code or executable form with such
|
|
||||||
an offer, in accord with Subsection b above.)
|
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
The Corresponding Source for a work in source code form is that
|
||||||
making modifications to it. For an executable work, complete source
|
same work.
|
||||||
code means all the source code for all modules it contains, plus any
|
|
||||||
associated interface definition files, plus the scripts used to
|
|
||||||
control compilation and installation of the executable. However, as a
|
|
||||||
special exception, the source code distributed need not include
|
|
||||||
anything that is normally distributed (in either source or binary
|
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
|
||||||
operating system on which the executable runs, unless that component
|
|
||||||
itself accompanies the executable.
|
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
2. Basic Permissions.
|
||||||
access to copy from a designated place, then offering equivalent
|
|
||||||
access to copy the source code from the same place counts as
|
|
||||||
distribution of the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
All rights granted under this License are granted for the term of
|
||||||
except as expressly provided under this License. Any attempt
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
void, and will automatically terminate your rights under this License.
|
permission to run the unmodified Program. The output from running a
|
||||||
However, parties who have received copies, or rights, from you under
|
covered work is covered by this License only if the output, given its
|
||||||
this License will not have their licenses terminated so long as such
|
content, constitutes a covered work. This License acknowledges your
|
||||||
parties remain in full compliance.
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
You may make, run and propagate covered works that you do not
|
||||||
signed it. However, nothing else grants you permission to modify or
|
convey, without conditions so long as your license otherwise remains
|
||||||
distribute the Program or its derivative works. These actions are
|
in force. You may convey covered works to others for the sole purpose
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
of having them make modifications exclusively for you, or provide you
|
||||||
modifying or distributing the Program (or any work based on the
|
with facilities for running those works, provided that you comply with
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
the terms of this License in conveying all material for which you do
|
||||||
all its terms and conditions for copying, distributing or modifying
|
not control copyright. Those thus making or running the covered works
|
||||||
the Program or works based on it.
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
Conveying under any other circumstances is permitted solely under
|
||||||
Program), the recipient automatically receives a license from the
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
makes it unnecessary.
|
||||||
these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
You are not responsible for enforcing compliance by third parties to
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
this License.
|
this License.
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
infringement or for any other reason (not limited to patent issues),
|
patent license under the contributor's essential patent claims, to
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
excuse you from the conditions of this License. If you cannot
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
License and any other pertinent obligations, then as a consequence you
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
may not distribute the Program at all. For example, if a patent
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
license would not permit royalty-free redistribution of the Program by
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
all those who receive copies directly or indirectly through you, then
|
the Program, the only way you could satisfy both those terms and this
|
||||||
the only way you could satisfy both it and this License would be to
|
License would be to refrain entirely from conveying the Program.
|
||||||
refrain entirely from distribution of the Program.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
13. Use with the GNU Affero General Public License.
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
Notwithstanding any other provision of this License, you have
|
||||||
patents or other property right claims or to contest validity of any
|
permission to link or combine any covered work with a work licensed
|
||||||
such claims; this section has the sole purpose of protecting the
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
integrity of the free software distribution system, which is
|
combined work, and to convey the resulting work. The terms of this
|
||||||
implemented by public license practices. Many people have made
|
License will continue to apply to the part which is the covered work,
|
||||||
generous contributions to the wide range of software distributed
|
but the special requirements of the GNU Affero General Public License,
|
||||||
through that system in reliance on consistent application of that
|
section 13, concerning interaction through a network will apply to the
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
combination as such.
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
14. Revised Versions of this License.
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
the GNU General Public License from time to time. Such new versions will
|
||||||
original copyright holder who places the Program under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding
|
|
||||||
those countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
address new problems or concerns.
|
address new problems or concerns.
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
Each version is given a distinguishing version number. If the
|
||||||
specifies a version number of this License which applies to it and "any
|
Program specifies that a certain numbered version of the GNU General
|
||||||
later version", you have the option of following the terms and conditions
|
Public License "or any later version" applies to it, you have the
|
||||||
either of that version or of any later version published by the Free
|
option of following the terms and conditions either of that numbered
|
||||||
Software Foundation. If the Program does not specify a version number of
|
version or of any later version published by the Free Software
|
||||||
this License, you may choose any version ever published by the Free Software
|
Foundation. If the Program does not specify a version number of the
|
||||||
Foundation.
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
If the Program specifies that a proxy can decide which future
|
||||||
programs whose distribution conditions are different, write to the author
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
public statement of acceptance of a version permanently authorizes you
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
to choose that version for the Program.
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
15. Disclaimer of Warranty.
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
||||||
REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
@@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
|
|||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
To do so, attach the following notices to the program. It is safest
|
||||||
to attach them to the start of each source file to most effectively
|
to attach them to the start of each source file to most effectively
|
||||||
convey the exclusion of warranty; and each file should have at least
|
state the exclusion of warranty; and each file should have at least
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
Copyright (C) <year> <name of author>
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -303,37 +644,31 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
You should have received a copy of the GNU General Public License
|
||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
If the program does terminal interaction, make it output a short
|
||||||
when it starts in an interactive mode:
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) year name of author
|
<program> Copyright (C) <year> <name of author>
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
parts of the General Public License. Of course, the commands you use may
|
parts of the General Public License. Of course, your program's commands
|
||||||
be called something other than `show w' and `show c'; they could even be
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
mouse-clicks or menu items--whatever suits your program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
necessary. Here is a sample; alter the names:
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
The GNU General Public License does not permit incorporating your program
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
<signature of Ty Coon>, 1 April 1989
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
Ty Coon, President of Vice
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
This General Public License does not permit incorporating your program into
|
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
|
||||||
consider it more useful to permit linking proprietary applications with the
|
|
||||||
library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License.
|
|
||||||
|
|||||||
+6221
-5144
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,608 @@
|
|||||||
|
2005-12-27 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
|
||||||
|
(sc_prohibit_assert_without_use): New rule.
|
||||||
|
(syntax-check-rules): Add it to the list.
|
||||||
|
* .x-sc_prohibit_assert_without_use: New empty file.
|
||||||
|
* Makefile.am (EXTRA_DIST): Add it.
|
||||||
|
|
||||||
|
* Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
|
||||||
|
|
||||||
|
* cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
|
||||||
|
Don't include <assert.h>; it wasn't used.
|
||||||
|
|
||||||
|
2005-12-26 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* src/chown-core.c (restricted_chown):
|
||||||
|
Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
|
||||||
|
* src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
|
||||||
|
| O_NOFOLLOW too, for consistency with other dir-openers.
|
||||||
|
Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
|
||||||
|
(is_empty_dir): Likewise.
|
||||||
|
* src/shred.c (wipename): Likewise. Don't bother trying to open
|
||||||
|
dir for writing, since POSIX prohibits it.
|
||||||
|
|
||||||
|
2005-12-22 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* tests/help-version: Redirect stderr to /dev/full, to suppress
|
||||||
|
write error diagnostic.
|
||||||
|
|
||||||
|
2005-12-19 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
|
||||||
|
Avoid a minor race condition when `-m MODE' is specified, by using
|
||||||
|
open, fchown, and close rather than just chown. To do that reliably --
|
||||||
|
even with an overly restrictive umask -- ensure that each mkdir,
|
||||||
|
mknod and mkfifo call uses a mode including at least owner-read access.
|
||||||
|
* src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
|
||||||
|
the subsequent chown (or equivalent open,fchown,close) fails.
|
||||||
|
* tests/misc/mknod: New tests.
|
||||||
|
* tests/misc/Makefile.am (TESTS): Add mknod.
|
||||||
|
|
||||||
|
2005-12-17 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
|
||||||
|
e.g., on a named pipe.
|
||||||
|
(OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
|
||||||
|
place of all uses, since it is guaranteed (system.h) to be defined.
|
||||||
|
|
||||||
|
2005-12-05 Andreas Gruenbacher <[email protected]>
|
||||||
|
|
||||||
|
Add POSIX ACL support
|
||||||
|
* src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
|
||||||
|
is no requirement for ACL support; particularly, it does not exist
|
||||||
|
on systems that have POSIX ACLs.
|
||||||
|
* src/copy.h (cp_option_init) [umask_kill]: Remove member.
|
||||||
|
* src/cp.c (umask_kill): With default acls, the umask is not to be
|
||||||
|
applied. Remove umask_kill, don't change the process umask, and let
|
||||||
|
the kernel apply the umask where appropriate.
|
||||||
|
* src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
|
||||||
|
* src/copy.c (get_dest_mode): Remove; it is obsolete after removing
|
||||||
|
umask_kill.
|
||||||
|
(copy_reg, copy_internal): Use copy_acl and set_acl
|
||||||
|
instead of fchown/chown. Fix the logic for POSIX ACLs.
|
||||||
|
(chown_succeded): Remove; we now always copy acls and
|
||||||
|
preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
|
||||||
|
did a chown before or not.
|
||||||
|
* src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
|
||||||
|
* src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
|
||||||
|
mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
|
||||||
|
to link with it via $(LIB_ACL), for the utilities that need it.
|
||||||
|
|
||||||
|
2005-12-16 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
|
||||||
|
(OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
|
||||||
|
(fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
|
||||||
|
value is now signified by whether cwd_errno is null.
|
||||||
|
(fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
|
||||||
|
pointer-to-bool to pointer-to-errno-value. All callers changed.
|
||||||
|
(rm_1): Don't bother setting a local cwd failure flag and then
|
||||||
|
ORing it into the caller's. Just set the caller's.
|
||||||
|
(rm): Use cwd failure errno value to print a slightly-better
|
||||||
|
diagnostic.
|
||||||
|
|
||||||
|
2005-12-15 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/stat.c (print_it): Properly handle a backslash at the
|
||||||
|
end of a --printf format string. Reported by Paul Eggert.
|
||||||
|
* tests/misc/stat-printf (end-bs): Add a test for the above.
|
||||||
|
|
||||||
|
2005-12-15 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
|
||||||
|
Don't assume /etc/passwd contains user names; use 'id' instead.
|
||||||
|
|
||||||
|
2005-12-15 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
stat: revert behavior of --format=FMT (-c)
|
||||||
|
stat: add new option: --printf=FMT
|
||||||
|
* NEWS: Mention this.
|
||||||
|
* src/stat.c (isodigit, octtobin, hextobin): Define.
|
||||||
|
(PRINTF_OPTION): Define.
|
||||||
|
(interpret_backslash_escapes, trailing_delim): New globals.
|
||||||
|
(usage): Document them. Alphabetize on long option names.
|
||||||
|
(print_esc_char): New function.
|
||||||
|
(print_it): Rewrite, in order to handle backslash escapes.
|
||||||
|
(main): Handle new option. Set globals for --format, too.
|
||||||
|
|
||||||
|
* tests/misc/stat-printf: Test --printf and --format.
|
||||||
|
* tests/misc/Makefile.am (TESTS): Add stat-printf.
|
||||||
|
|
||||||
|
2005-12-14 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* NEWS: sort now reports incompatible options.
|
||||||
|
* src/sort.c (incompatible_options, check_ordering_compatibility):
|
||||||
|
New functions.
|
||||||
|
(main): Use them. Don't bother with a usage message for
|
||||||
|
"sort -c a b", for consistency with other error diagnostics.
|
||||||
|
* tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
|
||||||
|
New tests.
|
||||||
|
|
||||||
|
* src/cat.c (main): Undo previous change. close_stdout already
|
||||||
|
does the check, so the previous change wasn't necessary.
|
||||||
|
|
||||||
|
2005-12-13 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* src/cat.c (main): Check for close (STDOUT_FILENO) failure.
|
||||||
|
|
||||||
|
2005-12-12 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
Install a more-conservative approach for sort -R. It's the
|
||||||
|
same basic idea as the existing code, except it uses the full ISAAC
|
||||||
|
approach (called the "more kosher" approach in the existing comments).
|
||||||
|
This makes "sort -R" quite a bit slower (about a factor of 2 on my
|
||||||
|
little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
|
||||||
|
better to be conservative here at first, and review any performance
|
||||||
|
improvements carefully.
|
||||||
|
* .x-sc_require_config_h: Add src/rand-isaac.c.
|
||||||
|
* src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
|
||||||
|
* src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
|
||||||
|
(shred_SOURCES, sort_SOURCES): Remove.
|
||||||
|
(EXTRA_DIST): Add rand-isaac.c.
|
||||||
|
* src/rand-isaac.c: Revert to what used to be in shred.c, without
|
||||||
|
changing it to allow for varying numbers of words in the state.
|
||||||
|
Alter so that we include rand-isaac.c directly rather than
|
||||||
|
compiling it and linking to it. Don't include config.h or
|
||||||
|
system.h; that's the includer's responsibility.
|
||||||
|
Omit functions that are specific to shred.
|
||||||
|
(ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
|
||||||
|
(isaac_step, struct irand_state):
|
||||||
|
Resurrect these, with the same defns that used to be in shred.c.
|
||||||
|
(ISAAC_SIZE, isaac_new, isaac_copy): Remove.
|
||||||
|
(isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
|
||||||
|
static again.
|
||||||
|
(struct isaac_state, isaac_refill, isaac_mix, isaac_init):
|
||||||
|
(isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
|
||||||
|
(irand_init, irand32, irand_mod):
|
||||||
|
Number of words is constant again.
|
||||||
|
(struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
|
||||||
|
* src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
|
||||||
|
* src/sort.c: Likewise.
|
||||||
|
* src/shred.c (fillrand, dopass, main): Undo previous change.
|
||||||
|
(struct irand_state, irand_init, irand32, irand_mod): Moved back here,
|
||||||
|
from rand-isaac.c.
|
||||||
|
* src/sort.c: Don't include md5.h; it wasn't needed.
|
||||||
|
(struct keyfield): Rename random_hash to random, for consistency
|
||||||
|
with the other member names. All uses changed.
|
||||||
|
(usage): Tweak wording to mention STRING for --seed option.
|
||||||
|
(short_options): Rorder for consistency with other programs.
|
||||||
|
(rand_state): Now a struct, not a pointer to one. All uses changed.
|
||||||
|
(HASH_WORDS, HASH_SIZE): Remove.
|
||||||
|
(get_hash): Remove comments around resbuf size, since we can assume C89.
|
||||||
|
Use a "more-kosher" (but slower) approach of invoking isaac_refill.
|
||||||
|
(keycompare): Adjust to the new get_hash.
|
||||||
|
Add a FIXME.
|
||||||
|
(badfieldspec): Omit recently-introduced comment; it isn't needed.
|
||||||
|
(main): Don't set need_random simply because gkey has it set; that
|
||||||
|
doesn't necessarily mean we'll need random numbers.
|
||||||
|
Redo seeding to match new get_hash approach.
|
||||||
|
|
||||||
|
2005-12-10 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
|
||||||
|
|
||||||
|
Avoid shred segfault on 64-bit systems.
|
||||||
|
* src/rand-isaac.c (isaac_refill): Don't try to negate a
|
||||||
|
local of type uint32_t. Make the local an `int' instead.
|
||||||
|
|
||||||
|
* NEWS: Mention sort's new options.
|
||||||
|
|
||||||
|
* src/rand-isaac.c (isaac_mix): Declare to be static.
|
||||||
|
Mark all other functions as `extern' so the tight-scope
|
||||||
|
part of `make distcheck' passes once again.
|
||||||
|
* src/rand-isaac.h (isaac_mix): Remove declaration.
|
||||||
|
|
||||||
|
* src/sort.c (get_hash): Change position of `*' in parameter
|
||||||
|
type to conform with convention.
|
||||||
|
(main): Split a long line so it fits in 80 columns.
|
||||||
|
(keycompare): Remove stray SPACE before TAB that was
|
||||||
|
causing `make distcheck' to fail.
|
||||||
|
|
||||||
|
* src/shred.c: Don't include gethrxtime.h. No longer needed.
|
||||||
|
|
||||||
|
* tests/misc/sort-rand: New file: basic tests for the new options.
|
||||||
|
* tests/misc/Makefile.am (TESTS): Add sort-rand.
|
||||||
|
|
||||||
|
2005-12-10 Frederik Eaton <[email protected]>
|
||||||
|
|
||||||
|
* src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
|
||||||
|
(shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
|
||||||
|
* src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
|
||||||
|
Make state size runtime-configurable.
|
||||||
|
(isaac_new, isaac_copy): New functions.
|
||||||
|
* src/rand-isaac.h: New file.
|
||||||
|
* src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
|
||||||
|
(fillrand, main): Adjust to the fact that the state size is now
|
||||||
|
runtime-configurable.
|
||||||
|
* src/sort.c (short_options, long_options, WORDS, keycompare, main):
|
||||||
|
(usage): Add options --random-sort and --seed to implement a random
|
||||||
|
shuffle.
|
||||||
|
Include md5.h and rand-isaac.h.
|
||||||
|
(get_hash): New function.
|
||||||
|
(rand_state): New var.
|
||||||
|
(HASH_WORDS, HASH_SIZE): New macros.
|
||||||
|
|
||||||
|
2005-12-09 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* tests/dd/misc: Add test for dd iflags=noatime.
|
||||||
|
|
||||||
|
2005-12-09 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/sort.c (usage): Mention white space vs -b and -t options.
|
||||||
|
From The Wanderer.
|
||||||
|
|
||||||
|
2005-12-09 Eric Blake <[email protected]>
|
||||||
|
|
||||||
|
* src/test.c (main): Fix misleading comment.
|
||||||
|
|
||||||
|
2005-12-07 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* NEWS: Mention dd's new noatime flag.
|
||||||
|
* src/system.h (O_NOATIME): Define to 0 if not already defined.
|
||||||
|
* src/dd.c (flags, usage): Add support for noatime flag.
|
||||||
|
|
||||||
|
2005-12-07 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Distribute the cvsu script, used only by `make syntax-check'.
|
||||||
|
* Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
|
||||||
|
* Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
|
||||||
|
distribute a copy of this script.
|
||||||
|
* .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
|
||||||
|
|
||||||
|
* tests/mv/acl: exit-77 before the trap, not after, if we fail
|
||||||
|
to create a temporary directory on another partition.
|
||||||
|
From Andreas Gruenbacher.
|
||||||
|
|
||||||
|
2005-12-06 Tomas Pospisek <[email protected]> (tiny change)
|
||||||
|
|
||||||
|
* man/basename.x: Cross-reference to dirname and readlink.
|
||||||
|
* man/dirname.x: Cross-reference to basename and readlink.
|
||||||
|
|
||||||
|
2005-12-05 Andreas Gruenbacher
|
||||||
|
|
||||||
|
* src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
|
||||||
|
(set_owner, preserve_author): New functions, factored out of copy_reg.
|
||||||
|
(copy_reg): Use them.
|
||||||
|
(copy_internal): Use them here, too.
|
||||||
|
|
||||||
|
2005-12-04 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/sleep.c (usage): Say what happens with two or more arguments.
|
||||||
|
Suggested by Justin Pryzby.
|
||||||
|
|
||||||
|
* src/uptime.c (print_uptime): Move decl of `upsecs' into scope
|
||||||
|
where it's used.
|
||||||
|
|
||||||
|
2005-12-03 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/rm.c (long_opts): Change the name of each undocumented, for-
|
||||||
|
testing-only option to start with `-', so that it cannot render
|
||||||
|
ambiguous any prefix it happens to share with some other option name.
|
||||||
|
Problem reported by Eric Blake.
|
||||||
|
* src/head.c (long_options): Likewise.
|
||||||
|
* src/tail.c (long_options): Likewise.
|
||||||
|
|
||||||
|
* tests/misc/head-elide-tail: Update uses of undocumented, for-
|
||||||
|
testing-only --presume* options to start with `---'.
|
||||||
|
* tests/rm/dangling-symlink: Likewise.
|
||||||
|
* tests/rm/dir-no-w: Likewise.
|
||||||
|
* tests/rm/isatty: Likewise.
|
||||||
|
|
||||||
|
2005-11-30 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* Makefile.maint: Add a comment about cvsu.
|
||||||
|
|
||||||
|
2005-11-25 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* NEWS: df updates for "none", "proc", inaccessible file systems.
|
||||||
|
* src/df.c (show_point): Ignore inaccessible file systems.
|
||||||
|
(usage): -a includes dummy file systems, not size-0 file systems.
|
||||||
|
|
||||||
|
* src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
|
||||||
|
to avoid collision with POSIX name space. All uses changed.
|
||||||
|
|
||||||
|
2005-11-24 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* tests/Makefile.am (EXTRA_DIST): Add acl to the list.
|
||||||
|
* tests/acl: Add `$0: ' prefix to diagnostics.
|
||||||
|
|
||||||
|
* .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
|
||||||
|
|
||||||
|
2005-11-23 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* src/copy.c: Improve performance a bit by optimizing away
|
||||||
|
unnecessary system calls and going to a block size of at least
|
||||||
|
8192 (on normal hosts, anyway). This improved performance 5% on my
|
||||||
|
Debian stable host (2.4.27 kernel, x86, copying from root
|
||||||
|
ext3 file system to itself).
|
||||||
|
Include "buffer-lcm.h".
|
||||||
|
(copy_reg): Omit last argument. All callers changed.
|
||||||
|
Use xmalloc to allocate rather than trusting alloca
|
||||||
|
(which is unwise with large block sizes).
|
||||||
|
Declare locals more locally, if possible.
|
||||||
|
Use uintptr_t words instead of int words, for a bit more speed
|
||||||
|
when looking for null blocks on 64-bit hosts.
|
||||||
|
Optimize away reads of zero bytes on regular files.
|
||||||
|
In the typical case, insist on 8 KiB buffers, at least.
|
||||||
|
Avoid unnecessary extra call to fstat when checking for sparse files.
|
||||||
|
Avoid now-unnecessary cast to off_t, and "0L".
|
||||||
|
Avoid unnecessary test of *new_dst when checking for same owner
|
||||||
|
and group.
|
||||||
|
|
||||||
|
2005-11-22 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* src/remove.c (rm): Don't assume C99 for-loop syntax.
|
||||||
|
|
||||||
|
2005-11-22 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/remove.c (AD_push): Remove debugging cruft.
|
||||||
|
|
||||||
|
* tests/rm/unread2 (rm): Change expected diagnostic,
|
||||||
|
`cannot open directory' to `cannot remove', to align with
|
||||||
|
new version of rm.
|
||||||
|
* tests/rm/rm2: Ensure that rm now continues removing entries
|
||||||
|
even after certain types of failure.
|
||||||
|
|
||||||
|
* src/remove.c: Rewrite. Now, this module is reentrant on systems
|
||||||
|
that provide openat (Solaris), and on systems like Linux+procfs
|
||||||
|
where our openat emulation code is reentrant. This also fixes a
|
||||||
|
few low-probability leaks and eliminates some code that could,
|
||||||
|
in very unusual circumstances, cause rm() (via a callee) to exit.
|
||||||
|
* NEWS: Mention this.
|
||||||
|
|
||||||
|
* configure.ac: Put copyright dates all on one line so the
|
||||||
|
emacs function that updates them works properly.
|
||||||
|
|
||||||
|
2005-11-18 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
|
||||||
|
Problem reported by Eric Blake.
|
||||||
|
(AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
|
||||||
|
we get a standard-conforming compiler. This relies on the new
|
||||||
|
m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
|
||||||
|
define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
|
||||||
|
m4/c.m4 can go away with Autoconf 2.60 comes out.
|
||||||
|
|
||||||
|
2005-11-17 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
|
||||||
|
(AD_mark_current_as_unremovable): Likewise, but for a local.
|
||||||
|
(rm_1): Likewise.
|
||||||
|
|
||||||
|
* tests/mv/acl: Let traps handle removing temporary directories.
|
||||||
|
|
||||||
|
Expect acl-related tests to fail, until the corresponding
|
||||||
|
patches are committed.
|
||||||
|
* tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
|
||||||
|
* tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
|
||||||
|
|
||||||
|
ACL tests, from Andreas Gruenbacher.
|
||||||
|
* tests/acl, tests/mv/acl, tests/cp/acl: New files.
|
||||||
|
* tests/mv/Makefile.am (TESTS): Add acl.
|
||||||
|
* tests/cp/Makefile.am (TESTS): Add acl.
|
||||||
|
|
||||||
|
* src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
|
||||||
|
|
||||||
|
2005-11-16 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* NEWS: Improve quality of ln's diagnostics.
|
||||||
|
* src/ln.c (do_link, usage): Likewise.
|
||||||
|
(do_link): Don't use alloca on a buffer of unbounded size.
|
||||||
|
|
||||||
|
2005-11-16 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* tests/cp/fail-perm: Accommodate HPUX. It appears to fail
|
||||||
|
with EACCES rather than EPERM. Reported by Peter O'Gorman here:
|
||||||
|
http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
|
||||||
|
This also affects AIX 4.3.3, according to Ralf Wildenhues, in
|
||||||
|
http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
|
||||||
|
|
||||||
|
2005-11-14 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
|
||||||
|
|
||||||
|
2005-11-13 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* announce-gen: Accept new option, --gpg-key-id=ID and
|
||||||
|
emit a blurb telling how to use the .sig files.
|
||||||
|
* Makefile.cfg (gpg_key_ID): Define.
|
||||||
|
* Makefile.maint (announcement): Use new option and key.
|
||||||
|
|
||||||
|
Require that most .c files include <config.h>.
|
||||||
|
* Makefile.maint (sc_require_config_h): New rule.
|
||||||
|
(syntax-check-rules): Add it.
|
||||||
|
* .x-sc_require_config_h: New file listing exceptions to the
|
||||||
|
above rule. Some are legit, others are simply grandfathered in.
|
||||||
|
* Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
|
||||||
|
|
||||||
|
2005-11-12 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
|
||||||
|
|
||||||
|
2005-11-11 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
|
||||||
|
Mention new readlink options in 5.3.0's `New features' section.
|
||||||
|
Spotted by Thomas Hood.
|
||||||
|
|
||||||
|
2005-11-08 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* NEWS: Merge in changes from b5_9x branch.
|
||||||
|
|
||||||
|
2005-11-08 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* NEWS: ls now defaults to --time-style='locale', which in turn acts
|
||||||
|
like --time-style='posix-long-iso' if the locale settings are messed up.
|
||||||
|
* src/ls.c (decode_switches): Implement this.
|
||||||
|
|
||||||
|
2005-11-08 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* tests/du/2g: s/expensive/very expensive/ in a comment.
|
||||||
|
From Paul Townsend.
|
||||||
|
|
||||||
|
2005-10-17 Eric Blake <[email protected]>
|
||||||
|
|
||||||
|
* src/ls.c (usage): Fix descriptions of --sort, --time.
|
||||||
|
Reported by Vitaly A. Ostanin.
|
||||||
|
|
||||||
|
2005-11-04 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* src/ln.c: Include filenamecat.c.
|
||||||
|
(FILE_BASENAME_CONCAT): Remove.
|
||||||
|
(do_link): Remove last arg DEST_IS_DIR. All callers changed.
|
||||||
|
(main): Use file_name_concat, base_name, and strip_trailing_slashes
|
||||||
|
instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
|
||||||
|
the use of alloca.
|
||||||
|
|
||||||
|
2005-11-04 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/du.c (process_file): Don't overflow for files of size >= 2^31
|
||||||
|
on systems with stat.st_blocks of a signed 32-bit type.
|
||||||
|
This bug causes trouble on some AIX 5.1 systems.
|
||||||
|
Report and trivial patch from Paul Townsend:
|
||||||
|
<http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
|
||||||
|
* NEWS: Mention this.
|
||||||
|
|
||||||
|
* tests/du/2g: New (very-expensive) test for the above-fixed bug.
|
||||||
|
* tests/du/Makefile.am (TESTS): Add it here.
|
||||||
|
* tests/very-expensive: New file.
|
||||||
|
* tests/Makefile.am (EXTRA_DIST): Add it here.
|
||||||
|
* tests/cp/perm: Mark this test as `very-expensive', too.
|
||||||
|
|
||||||
|
2005-11-02 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* NEWS: Mention that rm -d and maybe ln -d are scheduled for
|
||||||
|
removal in 2006.
|
||||||
|
* src/remove.h (struct rm_options): Remove unlink_dirs. All uses
|
||||||
|
removed.
|
||||||
|
* src/rm.c (usage): Don't mention rm -d.
|
||||||
|
|
||||||
|
2005-11-02 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
|
||||||
|
From Andreas Schwab.
|
||||||
|
|
||||||
|
* tests/dd/unblock-sync: Redirect stderr to /dev/null so the
|
||||||
|
`M+N records in/out' lines don't pollute `make check' output.
|
||||||
|
|
||||||
|
* tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
|
||||||
|
fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
|
||||||
|
* tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
|
||||||
|
to indicate that the input file should be piped into the command
|
||||||
|
under test (via `cat FILE | $prog ...').
|
||||||
|
|
||||||
|
* src/remove.c (remove_entry): Emit a better diagnostic when rm
|
||||||
|
(without -r) fails to remove a directory on a non-Linux system.
|
||||||
|
This change affects only newer Solaris systems (with priv_*
|
||||||
|
functions like priv_allocset). Reported by Keith Thompson.
|
||||||
|
|
||||||
|
* tests/rm/dir-nonrecur: New file/test for the above fix.
|
||||||
|
* tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
|
||||||
|
|
||||||
|
2005-11-01 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
|
||||||
|
POSIX 1002.1-2001 requires.
|
||||||
|
* src/tail.c (parse_obsolete_option): Implement this.
|
||||||
|
Problem reported by Vincent Lefevre.
|
||||||
|
* src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
|
||||||
|
* tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
|
||||||
|
(test_vector): Add special cases for _POSIX2_VERSION, and
|
||||||
|
regularize the old ones a bit.
|
||||||
|
* tests/touch/obsolescent: Add y2000 test.
|
||||||
|
|
||||||
|
2005-10-31 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* src/dd.c (skip): Fix off-by-one error reported by
|
||||||
|
Theodoros V. Kalamatianos.
|
||||||
|
|
||||||
|
2005-10-30 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* tests/mkdir/p-3: Require that the test be run as non-root.
|
||||||
|
Problem and trivial fix reported by Theodoros V. Kalamatianos.
|
||||||
|
|
||||||
|
2005-10-28 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
|
||||||
|
boundary between DEST and SOURCE in the result.
|
||||||
|
|
||||||
|
2005-10-26 Dmitry V. Levin <[email protected]>
|
||||||
|
|
||||||
|
* src/md5sum.c (main) [!O_BINARY]: Changed default read mode
|
||||||
|
back to text, to sync with documentation and for backwards
|
||||||
|
compatibility.
|
||||||
|
|
||||||
|
2005-10-25 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* tests/dircolors/simple (other-wr): Add an explicit test for
|
||||||
|
the dircolors bug (NULL-dereference) fixed yesterday.
|
||||||
|
|
||||||
|
2005-10-24 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/tac.c (tac_file): When determining whether a file is seekable,
|
||||||
|
also test whether it is a tty. Using only the lseek-based test would
|
||||||
|
give a false positive on Solaris. Reported by Peter Fales.
|
||||||
|
|
||||||
|
2005-10-24 Dmitry V. Levin <[email protected]>
|
||||||
|
|
||||||
|
* tests/install/d-slashdot: New test, for "install -d" failure.
|
||||||
|
* tests/install/Makefile.am (TESTS): Add d-slashdot.
|
||||||
|
* tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
|
||||||
|
* tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
|
||||||
|
|
||||||
|
2005-10-24 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/dircolors.c (ls_codes): Add missing comma.
|
||||||
|
Anonymous report and patch from
|
||||||
|
http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
|
||||||
|
|
||||||
|
* src/dircolors.c: Add compile-time assertion that the slack_codes
|
||||||
|
and ls_codes arrays have the same number of elements. This would
|
||||||
|
have prevented the above-fixed bug.
|
||||||
|
|
||||||
|
* src/expand.c (parse_tab_stops): Add a comment to make this function
|
||||||
|
identical to the one in unexpand.c.
|
||||||
|
* src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
|
||||||
|
identical to the one in expand.c.
|
||||||
|
|
||||||
|
* src/expand.c (next_file): Don't assume fopen cannot return stdin.
|
||||||
|
|
||||||
|
2005-10-23 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/md5sum.c (digest_check, main): Use ptr_align rather than
|
||||||
|
a dangerous pointer-value-to-`unsigned' cast.
|
||||||
|
* NEWS: mention the new sha* programs.
|
||||||
|
* AUTHORS: Add new sha* programs.
|
||||||
|
|
||||||
|
2005-08-28 David Madore <[email protected]>
|
||||||
|
|
||||||
|
Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
|
||||||
|
* README: Add their names to the list.
|
||||||
|
* src/md5sum.c: Provide framework for computing sha-2 hashes.
|
||||||
|
* src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
|
||||||
|
Rules for compiling sha-2 utilities
|
||||||
|
(noinst_HEADERS): Remove checksum.h.
|
||||||
|
* man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
|
||||||
|
New files.
|
||||||
|
* man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
|
||||||
|
(sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
|
||||||
|
* tests/misc/sha224sum, tests/misc/sha256sum: New files.
|
||||||
|
* tests/misc/sha384sum, tests/misc/sha512sum: New files.
|
||||||
|
* tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
|
||||||
|
sha384sum, sha512sum test scripts here rather that each in its
|
||||||
|
own directory.
|
||||||
|
|
||||||
|
2005-08-28 David Madore <[email protected]>
|
||||||
|
|
||||||
|
* tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
|
||||||
|
of the FIPS test vectors).
|
||||||
|
|
||||||
|
2005-10-23 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* configure.ac: Use 6.0-cvs as the version string.
|
||||||
|
* NEWS: Adjust accordingly.
|
||||||
|
|
||||||
2005-10-22 Jim Meyering <[email protected]>
|
2005-10-22 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
* Version 5.92.
|
* Version 5.92.
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,379 @@
|
|||||||
|
2008-12-16 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
NB: ChangeLog files are no longer manually maintained.
|
||||||
|
See HACKING for details.
|
||||||
|
|
||||||
|
2008-02-07 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
We *do* need two different version files.
|
||||||
|
One for tarball-only, the other to be updated any time we
|
||||||
|
get a new value of $(VERSION).
|
||||||
|
* Makefile.am (dist-hook): Create .tarball-version in dist tarball.
|
||||||
|
* GNUmakefile (_curr-ver): Make git-version-gen use it.
|
||||||
|
* .gitignore: Ignore it.
|
||||||
|
|
||||||
|
Fix a typo in description of size suffixes: s/GB/G/.
|
||||||
|
* doc/coreutils.texi (od invocation, head invocation, tail invocation):
|
||||||
|
Spotted by Bert Wesarg.
|
||||||
|
|
||||||
|
* NEWS [6.9.90]: Mention the added feature that head, od, split and
|
||||||
|
tail now accept the standard size suffixes (kB, M, MB, G, GB, and
|
||||||
|
so on for T, P, Y, Z, and Y) on arguments to selected options.
|
||||||
|
|
||||||
|
2008-02-06 Steven Schubiger <[email protected]>
|
||||||
|
|
||||||
|
mkdir, split: write --verbose output to stdout, not stderr.
|
||||||
|
* src/mkdir.c (verbose_output): New function.
|
||||||
|
(announce_mkdir): Use it.
|
||||||
|
* src/split.c (usage): Update.
|
||||||
|
* src/split.c (cwrite): Write to stdout, not stderr.
|
||||||
|
* doc/coreutils.texi (split invocation): Remove the mention
|
||||||
|
of --verbose output being printed to stderr.
|
||||||
|
* tests/mkdir/p-v: Redirect stdout, not stderr.
|
||||||
|
* tests/misc/split-a: Likewise.
|
||||||
|
* NEWS: Mention this change.
|
||||||
|
* TODO: Remove this item.
|
||||||
|
|
||||||
|
2008-02-04 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* Makefile.maint (announcement): Remove stale comment.
|
||||||
|
|
||||||
|
2008-02-02 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Clarify a comment.
|
||||||
|
* tests/sort/Test.pm: Replace a vague ChangeLog reference with a URL.
|
||||||
|
|
||||||
|
2008-01-31 Bob Proulx <[email protected]>
|
||||||
|
|
||||||
|
Improve wording of date and time man page.
|
||||||
|
* man/date.x: Improve compact description of the --date=STRING.
|
||||||
|
* man/touch.x: Likewise.
|
||||||
|
Suggested by A. Costa.
|
||||||
|
|
||||||
|
2008-01-31 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Remove alignment constraint from the sha*_read_ctx functions.
|
||||||
|
* lib/sha256.c (set_uint32): New function.
|
||||||
|
(sha256_read_ctx, sha224_read_ctx): Use it.
|
||||||
|
* lib/sha512.c (set_uint64): New function.
|
||||||
|
(sha512_read_ctx, sha384_read_ctx): Use it.
|
||||||
|
* lib/sha256.h: Remove warning about alignment constraint.
|
||||||
|
* lib/sha512.h: Likewise.
|
||||||
|
Prompted by similar changes in gnulib's sha1 and md[45] modules.
|
||||||
|
|
||||||
|
Adapt to new version of vc-list-files.
|
||||||
|
* tests/check.mk (vc_exe_in_TESTS): Adapt to new constraint
|
||||||
|
that vc-list-files be run only from $(top_srcdir).
|
||||||
|
|
||||||
|
Pull vc-list-files from gnulib.
|
||||||
|
* bootstrap.conf (gnulib_modules): Add vc-list-files.
|
||||||
|
* build-aux/vc-list-files: Remove file.
|
||||||
|
|
||||||
|
Improve the cp/parent-perm test.
|
||||||
|
* tests/cp/parent-perm: Also check that perms of existing dest
|
||||||
|
dirs are changed to match those of corresponding src dir
|
||||||
|
|
||||||
|
2008-01-30 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
Don't modify argv in dd due to ',' in arguments.
|
||||||
|
* src/dd.c: Include quotearg.h.
|
||||||
|
(operand_matches): New function.
|
||||||
|
(parse_symbols, operand_is): Use it.
|
||||||
|
(parse_symbols): 1st arg is now const pointer. Don't modify it.
|
||||||
|
msgid arg is now just the message, not a format.
|
||||||
|
(scanargs): Add some 'const's to check for problems like the above.
|
||||||
|
|
||||||
|
2008-01-30 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* src/c99-to-c89.diff: Adjust remove.c offsets, again.
|
||||||
|
|
||||||
|
Now that system.h defines is_empty_dir, include "openat.h".
|
||||||
|
* src/system.h: Include "openat.h" here, ...
|
||||||
|
* src/chcon.c: ... not here.
|
||||||
|
* src/chmod.c: Likewise.
|
||||||
|
* src/chown-core.c: Likewise.
|
||||||
|
* src/remove.c: Likewise.
|
||||||
|
|
||||||
|
* src/c99-to-c89.diff: Adjust remove.c offsets.
|
||||||
|
|
||||||
|
Improve "rmdir --ignore-fail-on-non-empty"
|
||||||
|
* src/rmdir.c (remove_parents, main): With --ignore-fail-on-non-empty,
|
||||||
|
suppress a diagnostic also for other errno values, which can arise
|
||||||
|
with read-only media or when the parent directory has the immutable
|
||||||
|
attribute (set via chattr +i).
|
||||||
|
(errno_may_be_empty, ignorable_failure): New functions.
|
||||||
|
* src/remove.c (is_empty_dir): Move function to ...
|
||||||
|
* src/system.h (is_empty_dir): ...here, and make it inline.
|
||||||
|
Suggested by Josselin Mouette in <http://bugs.debian.org/363011>
|
||||||
|
via Bob Proulx.
|
||||||
|
* NEWS: Mention the improvement.
|
||||||
|
|
||||||
|
2008-01-29 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
Don't modify argv in dd.
|
||||||
|
* src/dd.c (operand_is): New function.
|
||||||
|
(scanargs): Use it so that we don't need to modify argv, as a nicety.
|
||||||
|
Problem reported by Adam Goode in
|
||||||
|
<http://lists.gnu.org/archive/html/bug-coreutils/2008-01/msg00264.html>.
|
||||||
|
|
||||||
|
2008-01-29 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* Makefile.am (BUILT_SOURCES): Ensure that .version exists.
|
||||||
|
Reported by Bob Proulx.
|
||||||
|
|
||||||
|
2008-01-29 Bob Proulx <[email protected]>
|
||||||
|
|
||||||
|
Improve the man pages of --date=STRING for 'date' and 'touch'.
|
||||||
|
* man/date.x: Add a compact description of the --date=STRING.
|
||||||
|
* man/touch.x: Likewise.
|
||||||
|
Reported by A. Costa in http://bugs.debian.org/363011
|
||||||
|
|
||||||
|
2008-01-29 Michael Stone <[email protected]>
|
||||||
|
|
||||||
|
Improve the description of when dd outputs its final statistics.
|
||||||
|
* doc/coreutils.texi (dd invocation): Say that dd prints stats
|
||||||
|
upon normal termination and upon SIGINT.
|
||||||
|
|
||||||
|
2008-01-29 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Avoid "make distcheck" failure: newly-created man/*.1 files not removed
|
||||||
|
* Makefile.am (EXTRA_DIST): Add .version.
|
||||||
|
(.version): New rule.
|
||||||
|
(dist-hook): Don't create $(distdir)/.version here, now that it's
|
||||||
|
being distributed.
|
||||||
|
* man/Makefile.am (common_dep): Use ../.version, not ../VERSION.
|
||||||
|
(../VERSION): Remove rule.
|
||||||
|
* GNUmakefile (dummy): Create .version, not VERSION.
|
||||||
|
Add an extra "...:= $(shell..." statement to ensure that
|
||||||
|
.version exists even when the preceding code is not run.
|
||||||
|
* .gitignore: Remove both .version and VERSION.
|
||||||
|
|
||||||
|
ls: don't segfault on files in /proc with an old libselinux
|
||||||
|
* src/ls.c (gobble_file): Work around a bug in libselinux1-2.0.15
|
||||||
|
whereby getfilecon returns 0 yet sets the context to NULL.
|
||||||
|
Reported by Jan Moringen via Michael Stone in
|
||||||
|
http://bugs.debian.org/463043
|
||||||
|
* tests/ls/Makefile.am (TESTS): Add proc-selinux-segfault.
|
||||||
|
* tests/ls/proc-selinux-segfault: Test for the above fix.
|
||||||
|
* NEWS: Mention the fix.
|
||||||
|
|
||||||
|
2008-01-26 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Work around Darwin9's set-GID-like group ownership inheritance.
|
||||||
|
This avoids another spurious Mac OS 10.5.1 (Darwin 9.1) test failure.
|
||||||
|
* tests/cp/preserve-gid: Accept a group ID of 0, as well.
|
||||||
|
Reported by Elias Pipping.
|
||||||
|
|
||||||
|
Emit "info coreutils 'PROG invocation'" into the man page,
|
||||||
|
rather than just "info PROG". The latter would often fail
|
||||||
|
or simply display the man page.
|
||||||
|
* man/help2man: Change the template.
|
||||||
|
Prompted by http://bugs.debian.org/399684
|
||||||
|
|
||||||
|
chcon: correct description of --no-dereference (-h) option.
|
||||||
|
* src/chcon.c (usage): Remove invalid reference to lchown.
|
||||||
|
Reported by Göran Uddeborg.
|
||||||
|
|
||||||
|
Ensure that each version string change propagates to man pages.
|
||||||
|
* man/Makefile.am (common_dep): Don't depend on configure.ac for
|
||||||
|
version changes. Instead, depend on ../VERSION.
|
||||||
|
(../VERSION): New rule.
|
||||||
|
* Makefile.am (DISTCLEANFILES): Define.
|
||||||
|
* GNUmakefile: Update ./VERSION.
|
||||||
|
* .gitignore: List VERSION.
|
||||||
|
Reported by Sven Joachim.
|
||||||
|
|
||||||
|
Avoid cp/preserve-gid test failure on Mac OS 10.5.1 (Darwin 9.1)
|
||||||
|
* tests/cp/preserve-gid: Set group as well as owner on ".".
|
||||||
|
Reported by Elias Pipping.
|
||||||
|
|
||||||
|
Improve a warning about non-portable "mv" usage.
|
||||||
|
* doc/coreutils.texi (mv invocation): Adjust the warning: moving a
|
||||||
|
dir-symlink-specified-with-a-trailing-slash works in a surprising
|
||||||
|
manner only on some systems. Reported by Tomas Pospisek in
|
||||||
|
http://bugs.debian.org/343652.
|
||||||
|
|
||||||
|
2008-01-26 Mike Frysinger <[email protected]>
|
||||||
|
|
||||||
|
* src/dircolors.hin (TERM): Add jfbterm.
|
||||||
|
|
||||||
|
2008-01-23 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Clean up build-related rules.
|
||||||
|
* Makefile.cfg (gnulib_dir): Update comment.
|
||||||
|
* Makefile.maint (announcement) [cl_date, utc_date]: Don't set
|
||||||
|
now-unused variables.
|
||||||
|
|
||||||
|
* TODO: Update the note on getgrouplist.
|
||||||
|
|
||||||
|
2008-01-23 Zvi Har'El <[email protected]>
|
||||||
|
|
||||||
|
Add a ";", so "make install" works with --enable-install-program=su.
|
||||||
|
* src/Makefile.am (install_su): Add a semicolon. (tiny change)
|
||||||
|
|
||||||
|
2008-01-23 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Avoid misinterpreting mgetgroups failure in running root-only tests.
|
||||||
|
* src/setuidgid.c (main): Don't misinterpret as size_t an error
|
||||||
|
return from mgetgroups. Reported by Theodoros V. Kalamatianos.
|
||||||
|
|
||||||
|
* README: Remove/convert a few stray mentions of CVS.
|
||||||
|
|
||||||
|
2008-01-22 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Require automake-1.10.1, for its support of dist-lzma.
|
||||||
|
* configure.ac (AM_INIT_AUTOMAKE): Require 1.10.1.
|
||||||
|
|
||||||
|
Version 6.10.
|
||||||
|
|
||||||
|
* NEWS: Record release date.
|
||||||
|
|
||||||
|
* README-hacking: Update to reflect existence of automake-1.10.1.
|
||||||
|
|
||||||
|
2008-01-18 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Update README.
|
||||||
|
* README: Remove a note about failing tests on SunOS 4.
|
||||||
|
On Mac OS 10.5.1 (Darwin 9.1), you'll need --disable-acl.
|
||||||
|
(Running tests as root): Recommend using "check-root", not "check".
|
||||||
|
|
||||||
|
2008-01-17 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Do not define-away __attribute__ when __STRICT_ANSI__ is set.
|
||||||
|
* src/system.h (__attribute__): Remove the __STRICT_ANSI__ disjunct.
|
||||||
|
It has been unnecessary since approximately gcc-2.6, and now, leaving
|
||||||
|
it would cause gcc -Werror -ansi to fail to compile csplit.c.
|
||||||
|
* gl/lib/randread.c (__attribute__): Likewise.
|
||||||
|
|
||||||
|
2008-01-16 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* NEWS: Mention the configure.ac fix.
|
||||||
|
|
||||||
|
* TODO: Add an introduction.
|
||||||
|
Remove a few entries. Update a few others.
|
||||||
|
|
||||||
|
2008-01-13 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Remove each output redirection target before writing to it.
|
||||||
|
* tests/check.mk (vc_exe_in_TESTS): Remove t1 and t2 _first_,
|
||||||
|
in case they exist beforehand and are not writable.
|
||||||
|
* build-aux/check.mk (am__check_pre): Likewise, remove $@-t.
|
||||||
|
|
||||||
|
2008-01-13 Elias Pipping <[email protected]>
|
||||||
|
|
||||||
|
* configure.ac: Correct a non-portable use of sed.
|
||||||
|
|
||||||
|
2008-01-12 Mike Frysinger <[email protected]>
|
||||||
|
|
||||||
|
* src/dircolors.hin (image formats): Add the .svg suffix.
|
||||||
|
|
||||||
|
2008-01-12 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Use new version of announce-gen.
|
||||||
|
* Makefile.maint (announcement): Remove use of the
|
||||||
|
--gnulib-snapshot-time-stamp option.
|
||||||
|
Use new --gnulib-version option instead.
|
||||||
|
(gnulib-version): New variable.
|
||||||
|
|
||||||
|
2008-01-11 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* Version 6.9.92.
|
||||||
|
|
||||||
|
* tests/tr/Test.pm: Prefer en_US.ISO-8859-1 to en_US.iso88591.
|
||||||
|
Suggestions from James Youngman and Pádraig Brady in
|
||||||
|
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12218/focus=12227
|
||||||
|
|
||||||
|
2008-01-10 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* README-hacking: Add Git to the list of required tools.
|
||||||
|
|
||||||
|
2008-01-08 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
Fix a minor race condition when using cp -p --parents.
|
||||||
|
* src/cp.c (make_dir_parents_private): If stat fails on the parent
|
||||||
|
directory, do not add it to the list of directories whose modes
|
||||||
|
might need fixing later. Also, do not bother invoking 'stat'
|
||||||
|
unless the stat results might be needed later.
|
||||||
|
|
||||||
|
2008-01-08 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
parent-perm: avoid a bizarre test failure.
|
||||||
|
* tests/cp/parent-perm: Accommodate the situation in which
|
||||||
|
chmod ("dir", 02755) returns 0 yet fails to set the S_ISGID bit.
|
||||||
|
|
||||||
|
Remove uses of now-undefined Makefile variable.
|
||||||
|
* src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Remove uses
|
||||||
|
of no-longer-defined variable, $(LIB_ACL_TRIVIAL).
|
||||||
|
|
||||||
|
2008-01-07 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
cp (but not copy.c): plug a small leak.
|
||||||
|
* src/cp.c (do_copy) [--parents]: Free the attribute list.
|
||||||
|
|
||||||
|
Make a racy test failure less likely to happen.
|
||||||
|
* tests/misc/tty-eof: Uncomment a debug "warn".
|
||||||
|
This change happens to make this test far less likely to fail.
|
||||||
|
With that statement commented out, this test would fail about
|
||||||
|
20% of the time on my desktop. Now, it's gone 100 iterations
|
||||||
|
in a row with no failure.
|
||||||
|
|
||||||
|
* NEWS: Mention the cp bug fix.
|
||||||
|
|
||||||
|
2008-01-07 Jan Blunck <[email protected]>
|
||||||
|
|
||||||
|
cp --parents: don't use uninitialized memory when restoring permissions
|
||||||
|
* src/cp.c (make_dir_parents_private): Always stat each source
|
||||||
|
directory, in case its permissions are required in re_protect,
|
||||||
|
when setting permissions of a just-created destination directory.
|
||||||
|
|
||||||
|
2008-01-07 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
cp: add a test for today's bug fix.
|
||||||
|
* tests/cp/parent-perm: New script. Test today's change.
|
||||||
|
Based on reproducer from Jan Blunck.
|
||||||
|
* tests/cp/Makefile.am (TESTS): Add parent-perm.
|
||||||
|
|
||||||
|
2008-01-06 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
touch: add a test for today's change.
|
||||||
|
* tests/touch/now-owned-by-other: New script. Test today's change.
|
||||||
|
* tests/touch/Makefile.am (TESTS): Add now-owned-by-other.
|
||||||
|
* tests/Makefile.am (all_t): Add td, a new root-only test.
|
||||||
|
(td): New target.
|
||||||
|
* NEWS: Mention the improvement.
|
||||||
|
|
||||||
|
2008-01-06 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
touch: ignore "-d now" option, when appropriate
|
||||||
|
* src/touch.c (main): Treat "-d now" as if it were absent, if
|
||||||
|
neither -a nor -m is specified. Problem reported by Dan Jacobson in:
|
||||||
|
http://lists.gnu.org/archive/html/bug-coreutils/2008-01/msg00010.html
|
||||||
|
|
||||||
|
2008-01-05 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
Avoid tr case-conversion failure in some locales.
|
||||||
|
* src/tr.c (skip_construct): New function.
|
||||||
|
(main): When processing a pair of case-converting classes, don't
|
||||||
|
iterate through the elements of each [:upper:] or [:lower:] class.
|
||||||
|
Reported by Gerald Pfeifer in
|
||||||
|
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12218>.
|
||||||
|
* tests/tr/Test.pm [tolower-F]: New test for the above fix.
|
||||||
|
[upcase-xtra, dncase-xtra]: New tests, for a related code path.
|
||||||
|
* NEWS: Mention the tr bug fix.
|
||||||
|
|
||||||
|
2008-01-02 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* .gitignore: Ignore lzma-compressed files, too.
|
||||||
|
|
||||||
|
Update copyright date.
|
||||||
|
* tests/sample-test: Likewise.
|
||||||
|
* doc/coreutils.texi: Likewise.
|
||||||
|
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without
|
||||||
|
modification, are permitted provided the copyright notice
|
||||||
|
and this notice are preserved.
|
||||||
@@ -1,24 +1,24 @@
|
|||||||
# Having a separate GNUmakefile lets me `include' the dynamically
|
# Having a separate GNUmakefile lets me `include' the dynamically
|
||||||
# generated rules created via Makefile.maint as well as Makefile.maint itself.
|
# generated rules created via cfg.mk (package-local configuration)
|
||||||
|
# as well as maint.mk (generic maintainer rules).
|
||||||
# This makefile is used only if you run GNU Make.
|
# This makefile is used only if you run GNU Make.
|
||||||
# It is necessary if you want to build targets usually of interest
|
# It is necessary if you want to build targets usually of interest
|
||||||
# only to the maintainer.
|
# only to the maintainer.
|
||||||
|
|
||||||
# Copyright (C) 2001, 2003, 2006 Free Software Foundation, Inc.
|
# Copyright (C) 2001, 2003, 2006-2009 Free Software Foundation, Inc.
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
# You should have received a copy of the GNU General Public License
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
# Systems where /bin/sh is not the default shell need this. The $(shell)
|
# Systems where /bin/sh is not the default shell need this. The $(shell)
|
||||||
# command below won't work with e.g. stock DOS/Windows shells.
|
# command below won't work with e.g. stock DOS/Windows shells.
|
||||||
@@ -30,22 +30,79 @@ else
|
|||||||
SHELL = sh
|
SHELL = sh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
have-Makefile := $(shell test -f Makefile && echo yes)
|
|
||||||
|
|
||||||
# If the user runs GNU make but has not yet run ./configure,
|
# If the user runs GNU make but has not yet run ./configure,
|
||||||
# give them a diagnostic.
|
# give them a diagnostic.
|
||||||
ifeq ($(have-Makefile),yes)
|
_have-Makefile := $(shell test -f Makefile && echo yes)
|
||||||
|
ifeq ($(_have-Makefile),yes)
|
||||||
|
|
||||||
# Make tar archive easier to reproduce.
|
# Make tar archive easier to reproduce.
|
||||||
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
|
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
|
||||||
|
|
||||||
|
# Allow the user to add to this in the Makefile.
|
||||||
|
ALL_RECURSIVE_TARGETS =
|
||||||
|
|
||||||
include Makefile
|
include Makefile
|
||||||
include $(srcdir)/Makefile.cfg
|
|
||||||
include $(srcdir)/Makefile.maint
|
# Some projects override e.g., _autoreconf here.
|
||||||
|
-include $(srcdir)/cfg.mk
|
||||||
|
include $(srcdir)/maint.mk
|
||||||
|
|
||||||
|
# Allow cfg.mk to override these.
|
||||||
|
_build-aux ?= build-aux
|
||||||
|
_autoreconf ?= autoreconf
|
||||||
|
|
||||||
|
# Ensure that $(VERSION) is up to date for dist-related targets, but not
|
||||||
|
# for others: rerunning autoreconf and recompiling everything isn't cheap.
|
||||||
|
_have-git-version-gen := \
|
||||||
|
$(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
|
||||||
|
ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
|
||||||
|
_is-dist-target ?= $(filter-out %clean, \
|
||||||
|
$(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
|
||||||
|
_is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
|
||||||
|
ifneq (,$(_is-dist-target)$(_is-install-target))
|
||||||
|
_curr-ver := $(shell cd $(srcdir) \
|
||||||
|
&& $(_build-aux)/git-version-gen .tarball-version)
|
||||||
|
ifneq ($(_curr-ver),$(VERSION))
|
||||||
|
ifeq ($(_curr-ver),UNKNOWN)
|
||||||
|
$(info WARNING: unable to verify if $(VERSION) is the correct version)
|
||||||
|
else
|
||||||
|
ifneq (,$(_is-install-target))
|
||||||
|
# GNU Coding Standards state that 'make install' should not cause
|
||||||
|
# recompilation after 'make all'. But as long as changing the version
|
||||||
|
# string alters config.h, the cost of having 'make all' always have an
|
||||||
|
# up-to-date version is prohibitive. So, as a compromise, we merely
|
||||||
|
# warn when installing a version string that is out of date; the user
|
||||||
|
# should run 'autoreconf' (or something like 'make distcheck') to
|
||||||
|
# fix the version, 'make all' to propagate it, then 'make install'.
|
||||||
|
$(info WARNING: version string $(VERSION) is out of date;)
|
||||||
|
$(info run '$(MAKE) _version' to fix it)
|
||||||
|
else
|
||||||
|
$(info INFO: running autoreconf for new version string: $(_curr-ver))
|
||||||
|
_dummy := $(shell $(MAKE) $(AM_MAKEFLAGS) _version)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: _version
|
||||||
|
_version:
|
||||||
|
cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
all:
|
.DEFAULT_GOAL := abort-due-to-no-makefile
|
||||||
|
srcdir = .
|
||||||
|
|
||||||
|
# The package can override .DEFAULT_GOAL to run actions like autoreconf.
|
||||||
|
-include ./cfg.mk
|
||||||
|
include ./maint.mk
|
||||||
|
|
||||||
|
ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
|
||||||
|
$(MAKECMDGOALS): abort-due-to-no-makefile
|
||||||
|
endif
|
||||||
|
|
||||||
|
abort-due-to-no-makefile:
|
||||||
@echo There seems to be no Makefile in this directory. 1>&2
|
@echo There seems to be no Makefile in this directory. 1>&2
|
||||||
@echo "You must run ./configure before running \`make'." 1>&2
|
@echo "You must run ./configure before running \`make'." 1>&2
|
||||||
@exit 1
|
@exit 1
|
||||||
@@ -53,6 +110,18 @@ all:
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Tell version 3.79 and up of GNU make to not build goals in this
|
# Tell version 3.79 and up of GNU make to not build goals in this
|
||||||
# directory in parallel. This is necessary in case someone tries to
|
# directory in parallel, in case someone tries to build multiple
|
||||||
# build multiple targets on one command line.
|
# targets, and one of them can cause a recursive target to be invoked.
|
||||||
|
|
||||||
|
# Only set this if Automake doesn't provide it.
|
||||||
|
AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS:-recursive=) \
|
||||||
|
dist distcheck tags ctags
|
||||||
|
|
||||||
|
ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS)
|
||||||
|
|
||||||
|
ifneq ($(word 2, $(MAKECMDGOALS)), )
|
||||||
|
ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), )
|
||||||
.NOTPARALLEL:
|
.NOTPARALLEL:
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|||||||
+89
-21
@@ -2,15 +2,15 @@ Installation Instructions
|
|||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||||
2006 Free Software Foundation, Inc.
|
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is free documentation; the Free Software Foundation gives
|
This file is free documentation; the Free Software Foundation gives
|
||||||
unlimited permission to copy, distribute and modify it.
|
unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Briefly, the shell commands `./configure; make; make install' should
|
Briefly, the shell commands `./configure; make; make install' should
|
||||||
configure, build, and install this package. The following
|
configure, build, and install this package. The following
|
||||||
more-detailed instructions are generic; see the `README' file for
|
more-detailed instructions are generic; see the `README' file for
|
||||||
instructions specific to this package.
|
instructions specific to this package.
|
||||||
@@ -67,12 +67,15 @@ The simplest way to compile this package is:
|
|||||||
all sorts of other programs in order to regenerate files that came
|
all sorts of other programs in order to regenerate files that came
|
||||||
with the distribution.
|
with the distribution.
|
||||||
|
|
||||||
|
6. Often, you can also type `make uninstall' to remove the installed
|
||||||
|
files again.
|
||||||
|
|
||||||
Compilers and Options
|
Compilers and Options
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Some systems require unusual options for compilation or linking that the
|
Some systems require unusual options for compilation or linking that
|
||||||
`configure' script does not know about. Run `./configure --help' for
|
the `configure' script does not know about. Run `./configure --help'
|
||||||
details on some of the pertinent environment variables.
|
for details on some of the pertinent environment variables.
|
||||||
|
|
||||||
You can give `configure' initial values for configuration parameters
|
You can give `configure' initial values for configuration parameters
|
||||||
by setting variables in the command line or in the environment. Here
|
by setting variables in the command line or in the environment. Here
|
||||||
@@ -85,7 +88,7 @@ is an example:
|
|||||||
Compiling For Multiple Architectures
|
Compiling For Multiple Architectures
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
You can compile the package for more than one kind of computer at the
|
You can compile the package for more than one kind of computer at the
|
||||||
same time, by placing the object files for each architecture in their
|
same time, by placing the object files for each architecture in their
|
||||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||||
directory where you want the object files and executables to go and run
|
directory where you want the object files and executables to go and run
|
||||||
@@ -97,10 +100,24 @@ architecture at a time in the source code directory. After you have
|
|||||||
installed the package for one architecture, use `make distclean' before
|
installed the package for one architecture, use `make distclean' before
|
||||||
reconfiguring for another architecture.
|
reconfiguring for another architecture.
|
||||||
|
|
||||||
|
On MacOS X 10.5 and later systems, you can create libraries and
|
||||||
|
executables that work on multiple system types--known as "fat" or
|
||||||
|
"universal" binaries--by specifying multiple `-arch' options to the
|
||||||
|
compiler but only a single `-arch' option to the preprocessor. Like
|
||||||
|
this:
|
||||||
|
|
||||||
|
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
CPP="gcc -E" CXXCPP="g++ -E"
|
||||||
|
|
||||||
|
This is not guaranteed to produce working output in all cases, you
|
||||||
|
may have to build one architecture at a time and combine the results
|
||||||
|
using the `lipo' tool if you have problems.
|
||||||
|
|
||||||
Installation Names
|
Installation Names
|
||||||
==================
|
==================
|
||||||
|
|
||||||
By default, `make install' installs the package's commands under
|
By default, `make install' installs the package's commands under
|
||||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
can specify an installation prefix other than `/usr/local' by giving
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
`configure' the option `--prefix=PREFIX'.
|
`configure' the option `--prefix=PREFIX'.
|
||||||
@@ -123,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
|||||||
Optional Features
|
Optional Features
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Some packages pay attention to `--enable-FEATURE' options to
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
`configure', where FEATURE indicates an optional part of the package.
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
is something like `gnu-as' or `x' (for the X Window System). The
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
@@ -135,14 +152,46 @@ find the X include and library files automatically, but if it doesn't,
|
|||||||
you can use the `configure' options `--x-includes=DIR' and
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
`--x-libraries=DIR' to specify their locations.
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Particular systems
|
||||||
|
==================
|
||||||
|
|
||||||
|
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||||
|
CC is not installed, it is recommended to use the following options in
|
||||||
|
order to use an ANSI C compiler:
|
||||||
|
|
||||||
|
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||||
|
|
||||||
|
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||||
|
|
||||||
|
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||||
|
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||||
|
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||||
|
to try
|
||||||
|
|
||||||
|
./configure CC="cc"
|
||||||
|
|
||||||
|
and if that doesn't work, try
|
||||||
|
|
||||||
|
./configure CC="cc -nodtk"
|
||||||
|
|
||||||
|
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||||
|
directory contains several dysfunctional programs; working variants of
|
||||||
|
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||||
|
in your `PATH', put it _after_ `/usr/bin'.
|
||||||
|
|
||||||
|
On Haiku, software installed for all users goes in `/boot/common',
|
||||||
|
not `/usr/local'. It is recommended to use the following options:
|
||||||
|
|
||||||
|
./configure --prefix=/boot/common
|
||||||
|
|
||||||
Specifying the System Type
|
Specifying the System Type
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
There may be some features `configure' cannot figure out automatically,
|
There may be some features `configure' cannot figure out
|
||||||
but needs to determine by the type of machine the package will run on.
|
automatically, but needs to determine by the type of machine the package
|
||||||
Usually, assuming the package is built to be run on the _same_
|
will run on. Usually, assuming the package is built to be run on the
|
||||||
architectures, `configure' can figure that out, but if it prints a
|
_same_ architectures, `configure' can figure that out, but if it prints
|
||||||
message saying it cannot guess the machine type, give it the
|
a message saying it cannot guess the machine type, give it the
|
||||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
type, such as `sun4', or a canonical name which has the form:
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
@@ -150,7 +199,8 @@ type, such as `sun4', or a canonical name which has the form:
|
|||||||
|
|
||||||
where SYSTEM can have one of these forms:
|
where SYSTEM can have one of these forms:
|
||||||
|
|
||||||
OS KERNEL-OS
|
OS
|
||||||
|
KERNEL-OS
|
||||||
|
|
||||||
See the file `config.sub' for the possible values of each field. If
|
See the file `config.sub' for the possible values of each field. If
|
||||||
`config.sub' isn't included in this package, then this package doesn't
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
@@ -168,9 +218,9 @@ eventually be run) with `--host=TYPE'.
|
|||||||
Sharing Defaults
|
Sharing Defaults
|
||||||
================
|
================
|
||||||
|
|
||||||
If you want to set default values for `configure' scripts to share, you
|
If you want to set default values for `configure' scripts to share,
|
||||||
can create a site shell script called `config.site' that gives default
|
you can create a site shell script called `config.site' that gives
|
||||||
values for variables like `CC', `cache_file', and `prefix'.
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
`CONFIG_SITE' environment variable to the location of the site script.
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
@@ -179,7 +229,7 @@ A warning: not all `configure' scripts look for a site script.
|
|||||||
Defining Variables
|
Defining Variables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Variables not defined in a site shell script can be set in the
|
Variables not defined in a site shell script can be set in the
|
||||||
environment passed to `configure'. However, some packages may run
|
environment passed to `configure'. However, some packages may run
|
||||||
configure again during the build, and the customized values of these
|
configure again during the build, and the customized values of these
|
||||||
variables may be lost. In order to avoid this problem, you should set
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
@@ -198,11 +248,19 @@ an Autoconf bug. Until the bug is fixed you can use this workaround:
|
|||||||
`configure' Invocation
|
`configure' Invocation
|
||||||
======================
|
======================
|
||||||
|
|
||||||
`configure' recognizes the following options to control how it operates.
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
`--help'
|
`--help'
|
||||||
`-h'
|
`-h'
|
||||||
Print a summary of the options to `configure', and exit.
|
Print a summary of all of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--help=short'
|
||||||
|
`--help=recursive'
|
||||||
|
Print a summary of the options unique to this package's
|
||||||
|
`configure', and exit. The `short' variant lists options used
|
||||||
|
only in the top level, while the `recursive' variant lists options
|
||||||
|
also present in any nested packages.
|
||||||
|
|
||||||
`--version'
|
`--version'
|
||||||
`-V'
|
`-V'
|
||||||
@@ -229,6 +287,16 @@ an Autoconf bug. Until the bug is fixed you can use this workaround:
|
|||||||
Look for the package's source code in directory DIR. Usually
|
Look for the package's source code in directory DIR. Usually
|
||||||
`configure' can determine that directory automatically.
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`--prefix=DIR'
|
||||||
|
Use DIR as the installation prefix. *Note Installation Names::
|
||||||
|
for more details, including other options available for fine-tuning
|
||||||
|
the installation locations.
|
||||||
|
|
||||||
|
`--no-create'
|
||||||
|
`-n'
|
||||||
|
Run the configure checks, but stop before creating any output
|
||||||
|
files.
|
||||||
|
|
||||||
`configure' also accepts some other, not widely useful, options. Run
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
`configure --help' for more details.
|
`configure --help' for more details.
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Make coreutils. -*-Makefile-*-
|
# Make coreutils. -*-Makefile-*-
|
||||||
|
|
||||||
# Copyright (C) 1990, 1993-2007 Free Software Foundation, Inc.
|
# Copyright (C) 1990, 1993-2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
@@ -13,31 +13,21 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
# 02110-1301, USA.
|
|
||||||
|
|
||||||
SUBDIRS = lib src doc man po tests
|
ALL_RECURSIVE_TARGETS =
|
||||||
EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
|
|
||||||
.gitignore \
|
SUBDIRS = lib src doc man po tests gnulib-tests
|
||||||
.hgignore \
|
|
||||||
.kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
|
changelog_etc = \
|
||||||
.vg-suppressions \
|
|
||||||
.x-po-check \
|
|
||||||
.x-sc_file_system .x-sc_obsolete_symbols \
|
|
||||||
.x-sc_prohibit_atoi_atof \
|
|
||||||
.x-sc_require_config_h \
|
|
||||||
.x-sc_space_tab .x-sc_sun_os_names \
|
|
||||||
.x-sc_trailing_blank \
|
|
||||||
.x-sc_unmarked_diagnostics \
|
|
||||||
.x-sc_useless_cpp_parens \
|
|
||||||
ChangeLog-2005 \
|
ChangeLog-2005 \
|
||||||
bootstrap \
|
ChangeLog-2006 \
|
||||||
bootstrap.conf \
|
ChangeLog-2007 \
|
||||||
build-aux/cvsu \
|
ChangeLog-2008 \
|
||||||
build-aux/vc-list-files \
|
build-aux/ChangeLog-2007 \
|
||||||
gl/modules/getloadavg.diff \
|
doc/ChangeLog-2007 \
|
||||||
m4/ChangeLog \
|
lib/ChangeLog-2007 \
|
||||||
|
m4/ChangeLog-2007 \
|
||||||
old/fileutils/ChangeLog \
|
old/fileutils/ChangeLog \
|
||||||
old/fileutils/ChangeLog-1997 \
|
old/fileutils/ChangeLog-1997 \
|
||||||
old/fileutils/NEWS \
|
old/fileutils/NEWS \
|
||||||
@@ -45,22 +35,51 @@ EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
|
|||||||
old/sh-utils/ChangeLog.0 \
|
old/sh-utils/ChangeLog.0 \
|
||||||
old/sh-utils/NEWS \
|
old/sh-utils/NEWS \
|
||||||
old/textutils/ChangeLog \
|
old/textutils/ChangeLog \
|
||||||
old/textutils/NEWS
|
old/textutils/NEWS \
|
||||||
|
po/ChangeLog-2007
|
||||||
|
|
||||||
|
syntax_check_exceptions = \
|
||||||
|
.x-sc_GPL_version \
|
||||||
|
.x-sc_file_system \
|
||||||
|
.x-sc_obsolete_symbols \
|
||||||
|
.x-sc_po_check \
|
||||||
|
.x-sc_program_name \
|
||||||
|
.x-sc_prohibit_atoi_atof \
|
||||||
|
.x-sc_prohibit_stat_st_blocks \
|
||||||
|
.x-sc_prohibit_strcmp \
|
||||||
|
.x-sc_require_config_h \
|
||||||
|
.x-sc_space_tab \
|
||||||
|
.x-sc_sun_os_names \
|
||||||
|
.x-sc_trailing_blank \
|
||||||
|
.x-sc_unmarked_diagnostics \
|
||||||
|
.x-sc_useless_cpp_parens
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(changelog_etc) \
|
||||||
|
$(syntax_check_exceptions) \
|
||||||
|
.prev-version \
|
||||||
|
.version \
|
||||||
|
.vg-suppressions \
|
||||||
|
THANKS-to-translators \
|
||||||
|
THANKStt.in \
|
||||||
|
bootstrap \
|
||||||
|
bootstrap.conf \
|
||||||
|
build-aux/cvsu \
|
||||||
|
cfg.mk \
|
||||||
|
dist-check.mk \
|
||||||
|
gl/modules/getloadavg.diff \
|
||||||
|
maint.mk
|
||||||
|
|
||||||
|
ALL_RECURSIVE_TARGETS += install-root
|
||||||
install-root:
|
install-root:
|
||||||
cd src && $(MAKE) $@
|
cd src && $(MAKE) $@
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
# Some tests always need root privileges, others need them only sometimes.
|
# Some tests always need root privileges, others need them only sometimes.
|
||||||
|
ALL_RECURSIVE_TARGETS += check-root
|
||||||
check-root:
|
check-root:
|
||||||
cd tests && $(MAKE) $@
|
cd tests && $(MAKE) $@ SUBDIRS=
|
||||||
|
|
||||||
dist-hook:
|
|
||||||
test -x $(srcdir)/build-aux/install-sh
|
|
||||||
|
|
||||||
distcheck-hook:
|
|
||||||
$(MAKE) my-distcheck
|
|
||||||
|
|
||||||
# Just prior to distribution, ...
|
# Just prior to distribution, ...
|
||||||
# transform the automake-generated rule that runs `rm -f rm'.
|
# transform the automake-generated rule that runs `rm -f rm'.
|
||||||
@@ -69,20 +88,55 @@ distcheck-hook:
|
|||||||
# in the shell's search path that running `rm' would run the `rm'
|
# in the shell's search path that running `rm' would run the `rm'
|
||||||
# executable in the current directory.
|
# executable in the current directory.
|
||||||
# Similarly, adjust the clean-binPROGRAMS rule.
|
# Similarly, adjust the clean-binPROGRAMS rule.
|
||||||
|
|
||||||
rm_subst = \
|
rm_subst = \
|
||||||
s!(rm -f (rm|\$$\(bin_PROGRAMS\)))$$!$$1 > /dev/null 2>&1 || /bin/$$1!
|
s!(rm -f (rm\b|\$$\(bin_PROGRAMS\)$$))!$$1 > /dev/null 2>&1 || /bin/$$1!
|
||||||
MAINTAINERCLEANFILES = .kludge-stamp
|
|
||||||
.kludge-stamp: $(srcdir)/src/Makefile.in
|
|
||||||
perl -pi -e '$(rm_subst)' $(srcdir)/src/Makefile.in
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
|
BUILT_SOURCES = .version
|
||||||
|
.version:
|
||||||
|
echo $(VERSION) > $@-t && mv $@-t $@
|
||||||
|
|
||||||
MAINTAINERCLEANFILES += THANKS-to-translators
|
# Arrange so that .tarball-version appears only in the distribution
|
||||||
|
# tarball, and never in a checked-out repository.
|
||||||
|
# The perl substitution is to change some key uses of "rm" to "/bin/rm".
|
||||||
|
# See the rm_subst comment for details.
|
||||||
|
dist-hook: gen-ChangeLog
|
||||||
|
echo $(VERSION) > $(distdir)/.tarball-version
|
||||||
|
perl -pi -e '$(rm_subst)' $(distdir)/src/Makefile.in
|
||||||
|
|
||||||
|
gen_start_date = 2008-02-08
|
||||||
|
.PHONY: gen-ChangeLog
|
||||||
|
gen-ChangeLog:
|
||||||
|
if test -d .git; then \
|
||||||
|
$(top_srcdir)/build-aux/gitlog-to-changelog \
|
||||||
|
--since=$(gen_start_date) > $(distdir)/cl-t; \
|
||||||
|
rm -f $(distdir)/ChangeLog; \
|
||||||
|
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
ALL_RECURSIVE_TARGETS += distcheck-hook
|
||||||
|
distcheck-hook: check-ls-dircolors
|
||||||
|
$(MAKE) my-distcheck
|
||||||
|
|
||||||
|
DISTCLEANFILES = VERSION
|
||||||
|
MAINTAINERCLEANFILES = THANKS-to-translators
|
||||||
THANKS-to-translators: po/LINGUAS THANKStt.in
|
THANKS-to-translators: po/LINGUAS THANKStt.in
|
||||||
( \
|
( \
|
||||||
cat $(srcdir)/THANKStt.in; \
|
cat $(srcdir)/THANKStt.in; \
|
||||||
for lang in `cat $(srcdir)/po/LINGUAS`; do \
|
for lang in `cat $(srcdir)/po/LINGUAS`; do \
|
||||||
echo http://www.iro.umontreal.ca/contrib/po/HTML/team-$$lang.html; \
|
echo http://translationproject.org/team/$$lang.html; \
|
||||||
done; \
|
done; \
|
||||||
) > $@-tmp && mv $@-tmp $@
|
) > $@-tmp && mv $@-tmp $@
|
||||||
|
|
||||||
|
# Ensure that the sets of two-letter codes in ls.c and dircolors.c
|
||||||
|
# remain in sync.
|
||||||
|
.PHONY: check-ls-dircolors
|
||||||
|
check-ls-dircolors:
|
||||||
|
dc=$$(sed -n '/static.*ls_codes\[/,/};'/p \
|
||||||
|
$(srcdir)/src/dircolors.c \
|
||||||
|
|sed -n '/^ *"/p'|tr , '\n'|sed 's/^ *//' \
|
||||||
|
|sed -n 's/^"\(..\)"/\1/p'|sort -u); \
|
||||||
|
ls=$$(sed -n '/static.*indicator_name\[/,/};'/\p \
|
||||||
|
$(srcdir)/src/ls.c \
|
||||||
|
|sed -n '/^ *"/p'|tr , '\n'|sed 's/^ *//' \
|
||||||
|
|sed -n 's/^"\(..\)"/\1/p'|sort -u); \
|
||||||
|
test "$$dc" = "$$ls"
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
# Customize Makefile.maint. -*- makefile -*-
|
|
||||||
# Copyright (C) 2003-2007 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
# 02110-1301, USA.
|
|
||||||
|
|
||||||
# Use alpha.gnu.org for alpha and beta releases.
|
|
||||||
# Use ftp.gnu.org for major releases.
|
|
||||||
gnu_ftp_host-alpha = alpha.gnu.org
|
|
||||||
gnu_ftp_host-beta = alpha.gnu.org
|
|
||||||
gnu_ftp_host-major = ftp.gnu.org
|
|
||||||
gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE))
|
|
||||||
|
|
||||||
url_dir_list = \
|
|
||||||
ftp://$(gnu_rel_host)/gnu/coreutils
|
|
||||||
|
|
||||||
# The GnuPG ID of the key used to sign the tarballs.
|
|
||||||
gpg_key_ID = D333CBA1
|
|
||||||
|
|
||||||
# Tests not to run as part of "make distcheck".
|
|
||||||
# Exclude changelog-check here so that there's less churn in ChangeLog
|
|
||||||
# files -- otherwise, you'd need to have the upcoming version number
|
|
||||||
# at the top of the file for each `make distcheck' run.
|
|
||||||
local-checks-to-skip = changelog-check strftime-check
|
|
||||||
|
|
||||||
# The local directory containing the checked-out copy of gnulib used in
|
|
||||||
# this release. Used solely to get a date for the "announcement" target.
|
|
||||||
gnulib_dir = /gnulib
|
|
||||||
+706
-189
File diff suppressed because it is too large
Load Diff
@@ -1,623 +0,0 @@
|
|||||||
# -*-Makefile-*-
|
|
||||||
# This Makefile fragment is shared between the coreutils,
|
|
||||||
# CPPI, Bison, and Autoconf.
|
|
||||||
|
|
||||||
## Copyright (C) 2001-2007 Free Software Foundation, Inc.
|
|
||||||
##
|
|
||||||
## This program is free software; you can redistribute it and/or modify
|
|
||||||
## it under the terms of the GNU General Public License as published by
|
|
||||||
## the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
## any later version.
|
|
||||||
##
|
|
||||||
## This program is distributed in the hope that it will be useful,
|
|
||||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
## GNU General Public License for more details.
|
|
||||||
##
|
|
||||||
## You should have received a copy of the GNU General Public License
|
|
||||||
## along with this program; if not, write to the Free Software
|
|
||||||
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
## 02110-1301, USA.
|
|
||||||
|
|
||||||
# This is reported not to work with make-3.79.1
|
|
||||||
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
|
||||||
ME := Makefile.maint
|
|
||||||
|
|
||||||
# Do not save the original name or timestamp in the .tar.gz file.
|
|
||||||
# Use --rsyncable if available.
|
|
||||||
gzip_rsyncable := \
|
|
||||||
$(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
|
|
||||||
GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
|
|
||||||
|
|
||||||
CVS = cvs
|
|
||||||
GIT = git
|
|
||||||
VC = $(GIT)
|
|
||||||
VC-tag = git-tag -s -m '$(VERSION)'
|
|
||||||
|
|
||||||
CVS_LIST = build-aux/vc-list-files
|
|
||||||
|
|
||||||
CVS_LIST_EXCEPT = \
|
|
||||||
$(CVS_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
|
|
||||||
|
|
||||||
ifeq ($(origin prev_version_file), undefined)
|
|
||||||
prev_version_file = .prev-version
|
|
||||||
endif
|
|
||||||
|
|
||||||
PREV_VERSION := $(shell cat $(prev_version_file))
|
|
||||||
VERSION_REGEXP = $(subst .,\.,$(VERSION))
|
|
||||||
|
|
||||||
tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
|
|
||||||
tag-this-version = $(subst .,_,$(VERSION))
|
|
||||||
this-vc-tag = $(tag-package)-$(tag-this-version)
|
|
||||||
my_distdir = $(PACKAGE)-$(VERSION)
|
|
||||||
|
|
||||||
# Old releases are stored here.
|
|
||||||
# Used for diffs and xdeltas.
|
|
||||||
release_archive_dir ?= ../release
|
|
||||||
|
|
||||||
# Prevent programs like 'sort' from considering distinct strings to be equal.
|
|
||||||
# Doing it here saves us from having to set LC_ALL elsewhere in this file.
|
|
||||||
export LC_ALL = C
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## --------------- ##
|
|
||||||
## Sanity checks. ##
|
|
||||||
## --------------- ##
|
|
||||||
|
|
||||||
# FIXME: add a check to prohibit definition in src/*.c of symbols defined
|
|
||||||
# in system.h. E.g. today I removed from tail.c a useless definition of
|
|
||||||
# ENOSYS. It was useless because system.h ensures it's defined.
|
|
||||||
|
|
||||||
# Collect the names of rules starting with `sc_'.
|
|
||||||
syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(ME))
|
|
||||||
.PHONY: $(syntax-check-rules)
|
|
||||||
|
|
||||||
# Checks that don't require cvs.
|
|
||||||
# Run `changelog-check' last, as previous test may reveal problems requiring
|
|
||||||
# new ChangeLog entries.
|
|
||||||
local-checks-available = \
|
|
||||||
po-check copyright-check m4-check author_mark_check \
|
|
||||||
changelog-check patch-check strftime-check $(syntax-check-rules) \
|
|
||||||
makefile_path_separator_check \
|
|
||||||
makefile-check check-AUTHORS
|
|
||||||
.PHONY: $(local-checks-available)
|
|
||||||
|
|
||||||
local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available))
|
|
||||||
|
|
||||||
syntax-check: $(local-check)
|
|
||||||
# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
|
|
||||||
# $$(find -type f -name '*.[chly]') && \
|
|
||||||
# { echo '$(ME): found conditional include' 1>&2; \
|
|
||||||
# exit 1; } || :
|
|
||||||
|
|
||||||
# grep -nE '^# *include <(string|stdlib)\.h>' \
|
|
||||||
# $(srcdir)/{lib,src}/*.[chy] && \
|
|
||||||
# { echo '$(ME): FIXME' 1>&2; \
|
|
||||||
# exit 1; } || :
|
|
||||||
# FIXME: don't allow `#include .strings\.h' anywhere
|
|
||||||
|
|
||||||
sc_cast_of_argument_to_free:
|
|
||||||
@grep -nE '\<free \(\(' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_cast_of_x_alloc_return_value:
|
|
||||||
@grep -nE '\*\) *x(m|c|re)alloc\>' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_cast_of_alloca_return_value:
|
|
||||||
@grep -nE '\*\) *alloca\>' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): don'\''t cast alloca return value' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_space_tab:
|
|
||||||
@grep -n '[ ] ' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Don't use *scanf or the old ato* functions in `real' code.
|
|
||||||
# They provide no error checking mechanism.
|
|
||||||
# Instead, use strto* functions.
|
|
||||||
sc_prohibit_atoi_atof:
|
|
||||||
@grep -nE '\<([fs]?scanf|ato([filq]|ll))\>' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): do not use *scan''f, ato''f, ato''i, ato''l, ato''ll, or ato''q' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Using EXIT_SUCCESS as the first argument to error is misleading,
|
|
||||||
# since when that parameter is 0, error does not exit. Use `0' instead.
|
|
||||||
sc_error_exit_success:
|
|
||||||
@grep -nF 'error (EXIT_SUCCESS,' \
|
|
||||||
$$(find -type f -name '*.[chly]') && \
|
|
||||||
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_file_system:
|
|
||||||
@grep -ni 'file''system' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found use of "file''system";' \
|
|
||||||
'rewrite to use "file system"' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_no_have_config_h:
|
|
||||||
@grep -n 'HAVE''_CONFIG_H' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found use of HAVE''_CONFIG_H; remove' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Nearly all .c files must include <config.h>.
|
|
||||||
sc_require_config_h:
|
|
||||||
@if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
|
||||||
grep -L '^# *include <config\.h>' \
|
|
||||||
$$($(CVS_LIST_EXCEPT) | grep '\.c$$') \
|
|
||||||
| grep . && \
|
|
||||||
{ echo '$(ME): the above files do not include <config.h>' \
|
|
||||||
1>&2; exit 1; } || :; \
|
|
||||||
else :; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prohibit the inclusion of assert.h without an actual use of assert.
|
|
||||||
sc_prohibit_assert_without_use:
|
|
||||||
@if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
|
||||||
files=$$(grep -l '# *include <assert\.h>' \
|
|
||||||
$$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
|
|
||||||
grep -L '\<assert (' $$files \
|
|
||||||
| grep . && \
|
|
||||||
{ echo "$(ME): the above files include <assert.h> but don't use it" \
|
|
||||||
1>&2; exit 1; } || :; \
|
|
||||||
else :; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
sc_obsolete_symbols:
|
|
||||||
@grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
|
|
||||||
$$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
|
|
||||||
|
|
||||||
# Each nonempty line must start with a year number, or a TAB.
|
|
||||||
sc_changelog:
|
|
||||||
@grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
|
|
||||||
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
# Ensure that dd's definition of LONGEST_SYMBOL stays in sync
|
|
||||||
# with the strings from the two affected variables.
|
|
||||||
dd_c = $(srcdir)/src/dd.c
|
|
||||||
sc_dd_max_sym_length:
|
|
||||||
ifneq ($(wildcard $(dd_c)),)
|
|
||||||
@len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\
|
|
||||||
sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \
|
|
||||||
|sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
|
|
||||||
| wc --max-line-length); \
|
|
||||||
max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
|
|
||||||
|tr -d '"' | wc --max-line-length); \
|
|
||||||
if test "$$len" = "$$max"; then :; else \
|
|
||||||
echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Many m4 macros names once began with `jm_'.
|
|
||||||
# On 2004-04-13, they were all changed to start with gl_ instead.
|
|
||||||
# Make sure that none are inadvertently reintroduced.
|
|
||||||
sc_prohibit_jm_in_m4:
|
|
||||||
@grep -nE 'jm_[A-Z]' \
|
|
||||||
$$($(CVS_LIST) m4 |grep '\.m4$$'; echo /dev/null) && \
|
|
||||||
{ echo '$(ME): do not use jm_ in m4 macro names' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
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 '^PRIV_CHECK_ARG=require-root' \
|
|
||||||
$$($(CVS_LIST) tests) |sed s,tests,., |sort > $$t1; \
|
|
||||||
sed -n 's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \
|
|
||||||
$(srcdir)/tests/Makefile.am |sort > $$t2; \
|
|
||||||
diff -u $$t1 $$t2 || diff=1; \
|
|
||||||
rm -f $$t1 $$t2; \
|
|
||||||
test "$$diff" \
|
|
||||||
&& { echo 'tests/Makefile.am: missing check-root action'>&2; \
|
|
||||||
exit 1; } || :; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
headers_with_interesting_macro_defs = \
|
|
||||||
exit.h \
|
|
||||||
fcntl_.h \
|
|
||||||
fnmatch_.h \
|
|
||||||
intprops.h \
|
|
||||||
inttypes_.h \
|
|
||||||
lchown.h \
|
|
||||||
openat.h \
|
|
||||||
stat-macros.h \
|
|
||||||
stdint_.h
|
|
||||||
|
|
||||||
# Create a list of regular expressions matching the names
|
|
||||||
# of macros that are guaranteed by parts of gnulib to be defined.
|
|
||||||
.re-defmac:
|
|
||||||
@(cd $(srcdir)/lib; \
|
|
||||||
for f in $(headers_with_interesting_macro_defs); do \
|
|
||||||
test -f $$f && \
|
|
||||||
sed -n '/^# *define \([^_ (][^ (]*\)[ (].*/s//\1/p' $$f; \
|
|
||||||
done; \
|
|
||||||
) | sort -u \
|
|
||||||
| grep -Ev 'ATTRIBUTE_NORETURN|SIZE_MAX' \
|
|
||||||
| sed 's/^/^# *define /' \
|
|
||||||
> $@-t
|
|
||||||
@mv $@-t $@
|
|
||||||
|
|
||||||
# Don't define macros that we already get from gnulib header files.
|
|
||||||
sc_always_defined_macros: .re-defmac
|
|
||||||
@if test -f $(srcdir)/src/system.h; then \
|
|
||||||
trap 'rc=$$?; rm -f .re-defmac; exit $$rc' 0 1 2 3 15; \
|
|
||||||
grep -f .re-defmac $$($(CVS_LIST)) \
|
|
||||||
&& { echo '$(ME): define the above via some gnulib .h file' \
|
|
||||||
1>&2; exit 1; } || :; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create a list of regular expressions matching the names
|
|
||||||
# of files included from system.h. Exclude a couple.
|
|
||||||
.re-list:
|
|
||||||
@sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
|
|
||||||
| grep -Ev 'sys/(param|file)\.h' \
|
|
||||||
| sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \
|
|
||||||
> $@-t
|
|
||||||
@mv $@-t $@
|
|
||||||
|
|
||||||
# Files in src/ should not include directly any of
|
|
||||||
# the headers already included via system.h.
|
|
||||||
sc_system_h_headers: .re-list
|
|
||||||
@if test -f $(srcdir)/src/system.h; then \
|
|
||||||
trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \
|
|
||||||
grep -nE -f .re-list \
|
|
||||||
$$($(CVS_LIST) src | \
|
|
||||||
grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \
|
|
||||||
&& { echo '$(ME): the above are already included via system.h'\
|
|
||||||
1>&2; exit 1; } || :; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
sc_sun_os_names:
|
|
||||||
@grep -nEi \
|
|
||||||
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
|
|
||||||
$$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_the_the:
|
|
||||||
@grep -ni '\<the ''the\>' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found use of "the ''the";' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_tight_scope:
|
|
||||||
$(MAKE) -C src $@
|
|
||||||
|
|
||||||
sc_trailing_blank:
|
|
||||||
@grep -n '[ ]$$' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found trailing blank(s)' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Match lines like the following, but where there is only one space
|
|
||||||
# between the options and the description:
|
|
||||||
# -D, --all-repeated[=delimit-method] print all duplicate lines\n
|
|
||||||
longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)?
|
|
||||||
sc_two_space_separator_in_usage:
|
|
||||||
@grep -nE '^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \
|
|
||||||
$$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo "$(ME): help2man requires at least two spaces between"; \
|
|
||||||
echo "$(ME): an option and its description"; \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Look for diagnostics that aren't marked for translation.
|
|
||||||
# This won't find any for which error's format string is on a separate line.
|
|
||||||
sc_unmarked_diagnostics:
|
|
||||||
@grep -nE \
|
|
||||||
'\<error \([^"]*"[^"]*[a-z]{3}' $$($(CVS_LIST_EXCEPT)) \
|
|
||||||
| grep -v '_''(' && \
|
|
||||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
# Avoid useless parentheses like those in this example:
|
|
||||||
# #if defined (SYMBOL) || defined (SYM2)
|
|
||||||
sc_useless_cpp_parens:
|
|
||||||
@grep -n '^# *if .*defined *(' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found useless parentheses in cpp directive' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Ensure that the c99-to-c89 patch applies cleanly.
|
|
||||||
patch-check:
|
|
||||||
rm -rf src-c89 $@.1 $@.2
|
|
||||||
cp -a src src-c89
|
|
||||||
(cd src-c89; patch -p2 -V never --fuzz=0) < src/c99-to-c89.diff \
|
|
||||||
> $@.1 2>&1
|
|
||||||
if test "$${REGEN_PATCH+set}" = set; then \
|
|
||||||
diff -upr src src-c89 > new-diff || : ; fi
|
|
||||||
grep -v '^patching file ' $@.1 > $@.2 || :
|
|
||||||
msg=ok; test -s $@.2 && msg='fuzzy patch' || : ; \
|
|
||||||
rm -f src-c89/*.o || msg='rm failed'; \
|
|
||||||
$(MAKE) -C src-c89 CFLAGS='-Wdeclaration-after-statement -Werror' \
|
|
||||||
|| msg='compile failure with extra options'; \
|
|
||||||
rm -rf src-c89 $@.1 $@.2; \
|
|
||||||
test "$$msg" = ok && : || echo "$$msg" 1>&2; \
|
|
||||||
test "$$msg" = ok
|
|
||||||
|
|
||||||
# Ensure that date's --help output stays in sync with the info
|
|
||||||
# documentation for GNU strftime. The only exception is %N,
|
|
||||||
# which date accepts but GNU strftime does not.
|
|
||||||
extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/'
|
|
||||||
strftime-check:
|
|
||||||
if test -f $(srcdir)/src/date.c; then \
|
|
||||||
grep '^ %. ' $(srcdir)/src/date.c | sort \
|
|
||||||
| $(extract_char) > $@-src; \
|
|
||||||
{ echo N; \
|
|
||||||
info libc date calendar format | grep '^ `%.'\' \
|
|
||||||
| $(extract_char); } | sort > $@-info; \
|
|
||||||
diff -u $@-src $@-info || exit 1; \
|
|
||||||
rm -f $@-src $@-info; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
check-AUTHORS:
|
|
||||||
$(MAKE) -C src $@
|
|
||||||
|
|
||||||
# Ensure that we use only the standard $(VAR) notation,
|
|
||||||
# not @...@ in Makefile.am, now that we can rely on automake
|
|
||||||
# to emit a definition for each substituted variable.
|
|
||||||
makefile-check:
|
|
||||||
grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \
|
|
||||||
&& { echo 'Makefile.maint: use $$(...), not @...@' 1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
news-date-check: NEWS
|
|
||||||
today=`date +%Y-%m-%d`; \
|
|
||||||
if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \
|
|
||||||
>/dev/null; then \
|
|
||||||
:; \
|
|
||||||
else \
|
|
||||||
echo "version or today's date is not in NEWS" 1>&2; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
changelog-check:
|
|
||||||
if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \
|
|
||||||
>/dev/null; then \
|
|
||||||
:; \
|
|
||||||
else \
|
|
||||||
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
m4-check:
|
|
||||||
@grep -n 'AC_DEFUN([^[]' m4/*.m4 \
|
|
||||||
&& { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
|
||||||
# FIXME: don't hard-code file names below; use a more general mechanism.
|
|
||||||
po-check:
|
|
||||||
if test -f po/POTFILES.in; then \
|
|
||||||
grep -E -v '^(#|$$)' po/POTFILES.in \
|
|
||||||
| grep -v '^src/false\.c$$' | sort > $@-1; \
|
|
||||||
files=; \
|
|
||||||
for file in $$($(CVS_LIST_EXCEPT)) lib/*.[ch]; do \
|
|
||||||
case $$file in \
|
|
||||||
djgpp/* | man/*) continue;; \
|
|
||||||
*/c99-to-c89.diff) continue;; \
|
|
||||||
esac; \
|
|
||||||
case $$file in \
|
|
||||||
*.[ch]) \
|
|
||||||
base=`expr " $$file" : ' \(.*\)\..'`; \
|
|
||||||
{ test -f $$base.l || test -f $$base.y; } && continue;; \
|
|
||||||
esac; \
|
|
||||||
files="$$files $$file"; \
|
|
||||||
done; \
|
|
||||||
grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
|
|
||||||
| sort -u > $@-2; \
|
|
||||||
diff -u $@-1 $@-2 || exit 1; \
|
|
||||||
rm -f $@-1 $@-2; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# In a definition of #define AUTHORS "... and ..." where the RHS contains
|
|
||||||
# the English word `and', the string must be marked with `N_ (...)' so that
|
|
||||||
# gettext recognizes it as a string requiring translation.
|
|
||||||
author_mark_check:
|
|
||||||
@grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
|
|
||||||
{ echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
# Sometimes it is useful to change the PATH environment variable
|
|
||||||
# in Makefiles. When doing so, it's better not to use the Unix-centric
|
|
||||||
# path separator of `:', but rather the automake-provided `@PATH_SEPARATOR@'.
|
|
||||||
# It'd be better to use `find -print0 ...|xargs -0 ...', but less portable,
|
|
||||||
# and there probably aren't many projects with so many Makefile.am files
|
|
||||||
# that we'd have to worry about limits on command line length.
|
|
||||||
msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
|
|
||||||
makefile_path_separator_check:
|
|
||||||
@grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
|
|
||||||
&& { echo $(msg) 1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Check that `make alpha' will not fail at the end of the process.
|
|
||||||
writable-files:
|
|
||||||
if test -d $(release_archive_dir); then :; else \
|
|
||||||
mkdir $(release_archive_dir); \
|
|
||||||
fi
|
|
||||||
for file in $(distdir).tar.gz $(xd-delta) \
|
|
||||||
$(release_archive_dir)/$(distdir).tar.gz \
|
|
||||||
$(release_archive_dir)/$(xd-delta); do \
|
|
||||||
test -e $$file || continue; \
|
|
||||||
test -w $$file \
|
|
||||||
|| { echo ERROR: $$file is not writable; fail=1; }; \
|
|
||||||
done; \
|
|
||||||
test "$$fail" && exit 1 || :
|
|
||||||
|
|
||||||
v_etc_file = lib/version-etc.c
|
|
||||||
sample-test = tests/sample-test
|
|
||||||
# Make sure that the copyright date in $(v_etc_file) is up to date.
|
|
||||||
copyright-check:
|
|
||||||
@if test -f $(v_etc_file); then \
|
|
||||||
grep 'enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' $(v_etc_file) \
|
|
||||||
>/dev/null \
|
|
||||||
|| { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
|
|
||||||
exit 1; }; \
|
|
||||||
fi
|
|
||||||
@if test -f $(sample-test); then \
|
|
||||||
grep '# Copyright (C) '$$(date +%Y)' Free' $(sample-test) \
|
|
||||||
>/dev/null \
|
|
||||||
|| { echo 'out of date copyright in $(sample-test); update it' 1>&2; \
|
|
||||||
exit 1; }; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Sanity checks with the repository.
|
|
||||||
# Abort early if this tag has already been used.
|
|
||||||
vc-tag-check:
|
|
||||||
used=no; \
|
|
||||||
if $(VC) --help | grep CVS; then \
|
|
||||||
$(CVS) -n log -h README|grep -e $(this-vc-tag): >/dev/null \
|
|
||||||
&& used=yes; \
|
|
||||||
else \
|
|
||||||
$(GIT) tag -l '^$(this-vc-tag)$$' && used=yes; \
|
|
||||||
fi; \
|
|
||||||
if test "$$used" = yes; then \
|
|
||||||
echo "$(this-vc-tag) has already been used; not tagging" 1>&2; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
vc-diff-check:
|
|
||||||
$(VC) diff > vc-diffs || :
|
|
||||||
if test -s vc-diffs; then \
|
|
||||||
cat vc-diffs; \
|
|
||||||
echo "Some files are locally modified:" 1>&2; \
|
|
||||||
exit 1; \
|
|
||||||
else \
|
|
||||||
rm vc-diffs; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
cvs-check: vc-diff-check vc-tag-check
|
|
||||||
|
|
||||||
maintainer-distcheck:
|
|
||||||
$(MAKE) distcheck
|
|
||||||
$(MAKE) my-distcheck
|
|
||||||
|
|
||||||
|
|
||||||
# Tag before making distribution. Also, don't make a distribution if
|
|
||||||
# checks fail. Also, make sure the NEWS file is up-to-date.
|
|
||||||
# FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
|
|
||||||
vc-dist: $(local-check) cvs-check maintainer-distcheck
|
|
||||||
$(VC-tag) $(this-vc-tag)
|
|
||||||
$(MAKE) dist
|
|
||||||
|
|
||||||
# Use this to make sure we don't run these programs when building
|
|
||||||
# from a virgin tgz file, below.
|
|
||||||
null_AM_MAKEFLAGS = \
|
|
||||||
ACLOCAL=false \
|
|
||||||
AUTOCONF=false \
|
|
||||||
AUTOMAKE=false \
|
|
||||||
AUTOHEADER=false \
|
|
||||||
MAKEINFO=false
|
|
||||||
|
|
||||||
warn_cflags = -Dlint -O -Werror -Wall -Wformat -Wshadow -Wpointer-arith
|
|
||||||
|
|
||||||
# Use -Wformat -Werror to detect format-string/arg-list mismatches.
|
|
||||||
# Also, check for shadowing problems with -Wshadow, and for pointer
|
|
||||||
# arithmetic problems with -Wpointer-arith.
|
|
||||||
# These CFLAGS are pretty strict. If you build this target, you probably
|
|
||||||
# have to have a recent version of gcc and glibc headers.
|
|
||||||
TMPDIR ?= /tmp
|
|
||||||
t=$(TMPDIR)/$(PACKAGE)/test
|
|
||||||
my-distcheck: $(local-check) $(release_archive_dir)/$(prev-tgz)
|
|
||||||
-rm -rf $(t)
|
|
||||||
mkdir -p $(t)
|
|
||||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
|
||||||
cd $(t)/$(distdir) \
|
|
||||||
&& ./configure --disable-nls \
|
|
||||||
&& $(MAKE) CFLAGS='$(warn_cflags)' \
|
|
||||||
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
|
||||||
&& $(MAKE) dvi \
|
|
||||||
&& $(MAKE) check \
|
|
||||||
&& $(MAKE) distclean
|
|
||||||
(cd $(t) && mv $(distdir) $(distdir).old \
|
|
||||||
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
|
|
||||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
|
||||||
if test -f $(srcdir)/src/c99-to-c89.diff; then \
|
|
||||||
cd $(t)/$(distdir) \
|
|
||||||
&& (cd src && patch -V never --fuzz=0 <c99-to-c89.diff) \
|
|
||||||
&& ./configure --disable-largefile \
|
|
||||||
CFLAGS='-Werror -ansi -pedantic -Wno-long-long' \
|
|
||||||
&& $(MAKE); \
|
|
||||||
fi
|
|
||||||
-rm -rf $(t)
|
|
||||||
@echo "========================"; \
|
|
||||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
|
||||||
echo "========================"
|
|
||||||
|
|
||||||
WGET = wget
|
|
||||||
WGETFLAGS = -C off
|
|
||||||
|
|
||||||
rel-check:
|
|
||||||
tarz=/tmp/rel-check-tarz-$$$$; \
|
|
||||||
md5_tmp=/tmp/rel-check-md5-$$$$; \
|
|
||||||
set -e; \
|
|
||||||
trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
|
|
||||||
$(WGET) $(WGETFLAGS) -q --output-document=$$tarz $(url); \
|
|
||||||
echo "$(md5) -" > $$md5_tmp; \
|
|
||||||
md5sum -c $$md5_tmp < $$tarz
|
|
||||||
|
|
||||||
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
|
|
||||||
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
|
|
||||||
|
|
||||||
rel-files = $(xd-delta) $(DIST_ARCHIVES)
|
|
||||||
|
|
||||||
# Approximate the date of last gnulib "update" by the ChangeLog file's
|
|
||||||
# mtime, and provide that date in the announcement.
|
|
||||||
announcement: NEWS ChangeLog $(rel-files)
|
|
||||||
@cl_date=$$(stat --printf @%Y $(gnulib_dir)/ChangeLog); \
|
|
||||||
utc_date=$$(date -u --date $$cl_date '+%Y-%m-%d %T %z'); \
|
|
||||||
./build-aux/announce-gen \
|
|
||||||
--release-type=$(RELEASE_TYPE) \
|
|
||||||
--package=$(PACKAGE) \
|
|
||||||
--prev=$(PREV_VERSION) \
|
|
||||||
--curr=$(VERSION) \
|
|
||||||
--gpg-key-id=$(gpg_key_ID) \
|
|
||||||
--news=NEWS \
|
|
||||||
--bootstrap-tools=autoconf,automake,bison,gnulib \
|
|
||||||
--gnulib-snapshot-time-stamp="$$utc_date" \
|
|
||||||
$(addprefix --url-dir=, $(url_dir_list))
|
|
||||||
|
|
||||||
## ---------------- ##
|
|
||||||
## Updating files. ##
|
|
||||||
## ---------------- ##
|
|
||||||
|
|
||||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
|
||||||
www-gnu = http://www.gnu.org
|
|
||||||
|
|
||||||
# Use mv, if you don't have/want move-if-change.
|
|
||||||
move_if_change ?= move-if-change
|
|
||||||
|
|
||||||
emit_upload_commands:
|
|
||||||
@echo =====================================
|
|
||||||
@echo =====================================
|
|
||||||
@echo "$(srcdir)/build-aux/gnupload $(GNUPLOADFLAGS) \\"
|
|
||||||
@echo " --to $(gnu_rel_host):$(PACKAGE) \\"
|
|
||||||
@echo " $(rel-files)"
|
|
||||||
@echo '# send the /tmp/announcement e-mail'
|
|
||||||
@echo =====================================
|
|
||||||
@echo =====================================
|
|
||||||
|
|
||||||
$(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz
|
|
||||||
xdelta delta -9 $^ $@ || :
|
|
||||||
|
|
||||||
.PHONY: alpha beta major
|
|
||||||
alpha beta major: news-date-check changelog-check $(local-check) writable-files
|
|
||||||
test $@ = major \
|
|
||||||
&& { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|
|
||||||
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
|
|
||||||
|| :
|
|
||||||
$(MAKE) vc-dist
|
|
||||||
$(MAKE) $(xd-delta)
|
|
||||||
$(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
|
|
||||||
ln $(rel-files) $(release_archive_dir)
|
|
||||||
chmod a-w $(rel-files)
|
|
||||||
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
|
|
||||||
echo $(VERSION) > $(prev_version_file)
|
|
||||||
$(VC) commit -m \
|
|
||||||
'$(prev_version_file): Record previous version: $(VERSION).' \
|
|
||||||
$(prev_version_file)
|
|
||||||
+661
-4
@@ -1,5 +1,642 @@
|
|||||||
GNU coreutils NEWS -*- outline -*-
|
GNU coreutils NEWS -*- outline -*-
|
||||||
|
|
||||||
|
* Noteworthy changes in release 7.4 (2009-05-07) [stable]
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
date -d 'next mon', when run on a Monday, now prints the date
|
||||||
|
7 days in the future rather than the current day. Same for any other
|
||||||
|
day-of-the-week name, when run on that same day of the week.
|
||||||
|
[This bug appears to have been present in "the beginning". ]
|
||||||
|
|
||||||
|
date -d tuesday, when run on a Tuesday -- using date built from the 7.3
|
||||||
|
release tarball, not from git -- would print the date 7 days in the future.
|
||||||
|
Now, it works properly and prints the current date. That was due to
|
||||||
|
human error (including not-committed changes in a release tarball)
|
||||||
|
and the fact that there is no check to detect when the gnulib/ git
|
||||||
|
submodule is dirty.
|
||||||
|
|
||||||
|
** Build-related
|
||||||
|
|
||||||
|
make check: two tests have been corrected
|
||||||
|
|
||||||
|
** Portability
|
||||||
|
|
||||||
|
There have been some ACL-related portability fixes for *BSD,
|
||||||
|
inherited from gnulib.
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 7.3 (2009-05-01) [stable]
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
cp now diagnoses failure to preserve selinux/xattr attributes when
|
||||||
|
--preserve=context,xattr is specified in combination with -a.
|
||||||
|
Also, cp no longer suppresses attribute-preservation diagnostics
|
||||||
|
when preserving SELinux context was explicitly requested.
|
||||||
|
|
||||||
|
ls now aligns output correctly in the presence of abbreviated month
|
||||||
|
names from the locale database that have differing widths.
|
||||||
|
|
||||||
|
ls -v and sort -V now order names like "#.b#" properly
|
||||||
|
|
||||||
|
mv: do not print diagnostics when failing to preserve xattr's on file
|
||||||
|
systems without xattr support.
|
||||||
|
|
||||||
|
sort -m no longer segfaults when its output file is also an input file.
|
||||||
|
E.g., with this, touch 1; sort -m -o 1 1, sort would segfault.
|
||||||
|
[introduced in coreutils-7.2]
|
||||||
|
|
||||||
|
** Changes in behavior
|
||||||
|
|
||||||
|
shred, sort, shuf: now use an internal pseudorandom generator by default.
|
||||||
|
This is mainly noticable in shred where the 3 random passes it does by
|
||||||
|
default should proceed at the speed of the disk. Previously /dev/urandom
|
||||||
|
was used if available, which is relatively slow on GNU/Linux systems.
|
||||||
|
|
||||||
|
** Improved robustness
|
||||||
|
|
||||||
|
cp would exit successfully after copying less than the full contents
|
||||||
|
of a file larger than ~4000 bytes from a linux-/proc file system to a
|
||||||
|
destination file system with a fundamental block size of 4KiB or greater.
|
||||||
|
Reading into a 4KiB-or-larger buffer, cp's "read" syscall would return
|
||||||
|
a value smaller than 4096, and cp would interpret that as EOF (POSIX
|
||||||
|
allows this). This optimization, now removed, saved 50% of cp's read
|
||||||
|
syscalls when copying small files. Affected linux kernels: at least
|
||||||
|
2.6.9 through 2.6.29.
|
||||||
|
[the optimization was introduced in coreutils-6.0]
|
||||||
|
|
||||||
|
** Portability
|
||||||
|
|
||||||
|
df now pre-mounts automountable directories even with automounters for
|
||||||
|
which stat-like syscalls no longer provoke mounting. Now, df uses open.
|
||||||
|
|
||||||
|
`id -G $USER` now works correctly even on Darwin and NetBSD. Previously it
|
||||||
|
would either truncate the group list to 10, or go into an infinite loop,
|
||||||
|
due to their non-standard getgrouplist implementations.
|
||||||
|
[truncation introduced in coreutils-6.11]
|
||||||
|
[infinite loop introduced in coreutils-7.1]
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 7.2 (2009-03-31) [stable]
|
||||||
|
|
||||||
|
** New features
|
||||||
|
|
||||||
|
pwd now accepts the options --logical (-L) and --physical (-P). For
|
||||||
|
compatibility with existing scripts, -P is the default behavior
|
||||||
|
unless POSIXLY_CORRECT is requested.
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
cat once again immediately outputs data it has processed.
|
||||||
|
Previously it would have been buffered and only output if enough
|
||||||
|
data was read, or on process exit.
|
||||||
|
[bug introduced in coreutils-6.0]
|
||||||
|
|
||||||
|
comm's new --check-order option would fail to detect disorder on any pair
|
||||||
|
of lines where one was a prefix of the other. For example, this would
|
||||||
|
fail to report the disorder: printf 'Xb\nX\n'>k; comm --check-order k k
|
||||||
|
[bug introduced in coreutils-7.0]
|
||||||
|
|
||||||
|
cp once again diagnoses the invalid "cp -rl dir dir" right away,
|
||||||
|
rather than after creating a very deep dir/dir/dir/... hierarchy.
|
||||||
|
The bug strikes only with both --recursive (-r, -R) and --link (-l).
|
||||||
|
[bug introduced in coreutils-7.1]
|
||||||
|
|
||||||
|
ls --sort=version (-v) sorted names beginning with "." inconsistently.
|
||||||
|
Now, names that start with "." are always listed before those that don't.
|
||||||
|
|
||||||
|
pr: fix the bug whereby --indent=N (-o) did not indent header lines
|
||||||
|
[bug introduced in coreutils-6.9.90]
|
||||||
|
|
||||||
|
sort now handles specified key ends correctly.
|
||||||
|
Previously -k1,1b would have caused leading space from field 2 to be
|
||||||
|
included in the sort while -k2,3.0 would have not included field 3.
|
||||||
|
|
||||||
|
** Changes in behavior
|
||||||
|
|
||||||
|
cat,cp,install,mv,split: these programs now read and write a minimum
|
||||||
|
of 32KiB at a time. This was seen to double throughput when reading
|
||||||
|
cached files on GNU/Linux-based systems.
|
||||||
|
|
||||||
|
cp -a now tries to preserve extended attributes (xattr), but does not
|
||||||
|
diagnose xattr-preservation failure. However, cp --preserve=all still does.
|
||||||
|
|
||||||
|
ls --color: hard link highlighting can be now disabled by changing the
|
||||||
|
LS_COLORS environment variable. To disable it you can add something like
|
||||||
|
this to your profile: eval `dircolors | sed s/hl=[^:]*:/hl=:/`
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 7.1 (2009-02-21) [stable]
|
||||||
|
|
||||||
|
** New features
|
||||||
|
|
||||||
|
Add extended attribute support available on certain filesystems like ext2
|
||||||
|
and XFS.
|
||||||
|
cp: Tries to copy xattrs when --preserve=xattr or --preserve=all specified
|
||||||
|
mv: Always tries to copy xattrs
|
||||||
|
install: Never copies xattrs
|
||||||
|
|
||||||
|
cp and mv accept a new option, --no-clobber (-n): silently refrain
|
||||||
|
from overwriting any existing destination file
|
||||||
|
|
||||||
|
dd accepts iflag=cio and oflag=cio to open the file in CIO (concurrent I/O)
|
||||||
|
mode where this feature is available.
|
||||||
|
|
||||||
|
install accepts a new option, --compare (-C): compare each pair of source
|
||||||
|
and destination files, and if the destination has identical content and
|
||||||
|
any specified owner, group, permissions, and possibly SELinux context, then
|
||||||
|
do not modify the destination at all.
|
||||||
|
|
||||||
|
ls --color now highlights hard linked files, too
|
||||||
|
|
||||||
|
stat -f recognizes the Lustre file system type
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
chgrp, chmod, chown --silent (--quiet, -f) no longer print some diagnostics
|
||||||
|
[bug introduced in coreutils-5.1]
|
||||||
|
|
||||||
|
cp uses much less memory in some situations
|
||||||
|
|
||||||
|
cp -a now correctly tries to preserve SELinux context (announced in 6.9.90),
|
||||||
|
doesn't inform about failure, unlike with --preserve=all
|
||||||
|
|
||||||
|
du --files0-from=FILE no longer reads all of FILE into RAM before
|
||||||
|
processing the first file name
|
||||||
|
|
||||||
|
seq 9223372036854775807 9223372036854775808 now prints only two numbers
|
||||||
|
on systems with extended long double support and good library support.
|
||||||
|
Even with this patch, on some systems, it still produces invalid output,
|
||||||
|
from 3 to at least 1026 lines long. [bug introduced in coreutils-6.11]
|
||||||
|
|
||||||
|
seq -w now accounts for a decimal point added to the last number
|
||||||
|
to correctly print all numbers to the same width.
|
||||||
|
|
||||||
|
wc --files0-from=FILE no longer reads all of FILE into RAM, before
|
||||||
|
processing the first file name, unless the list of names is known
|
||||||
|
to be small enough.
|
||||||
|
|
||||||
|
** Changes in behavior
|
||||||
|
|
||||||
|
cp and mv: the --reply={yes,no,query} option has been removed.
|
||||||
|
Using it has elicited a warning for the last three years.
|
||||||
|
|
||||||
|
dd: user specified offsets that are too big are handled better.
|
||||||
|
Previously, erroneous parameters to skip and seek could result
|
||||||
|
in redundant reading of the file with no warnings or errors.
|
||||||
|
|
||||||
|
du: -H (initially equivalent to --si) is now equivalent to
|
||||||
|
--dereference-args, and thus works as POSIX requires
|
||||||
|
|
||||||
|
shred: now does 3 overwrite passes by default rather than 25.
|
||||||
|
|
||||||
|
ls -l now marks SELinux-only files with the less obtrusive '.',
|
||||||
|
rather than '+'. A file with any other combination of MAC and ACL
|
||||||
|
is still marked with a '+'.
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 7.0 (2008-10-05) [beta]
|
||||||
|
|
||||||
|
** New programs
|
||||||
|
|
||||||
|
timeout: Run a command with bounded time.
|
||||||
|
truncate: Set the size of a file to a specified size.
|
||||||
|
|
||||||
|
** New features
|
||||||
|
|
||||||
|
chgrp, chmod, chown, chcon, du, rm: now all display linear performance,
|
||||||
|
even when operating on million-entry directories on ext3 and ext4 file
|
||||||
|
systems. Before, they would exhibit O(N^2) performance, due to linear
|
||||||
|
per-entry seek time cost when operating on entries in readdir order.
|
||||||
|
Rm was improved directly, while the others inherit the improvement
|
||||||
|
from the newer version of fts in gnulib.
|
||||||
|
|
||||||
|
comm now verifies that the inputs are in sorted order. This check can
|
||||||
|
be turned off with the --nocheck-order option.
|
||||||
|
|
||||||
|
comm accepts new option, --output-delimiter=STR, that allows specification
|
||||||
|
of an output delimiter other than the default single TAB.
|
||||||
|
|
||||||
|
cp and mv: the deprecated --reply=X option is now also undocumented.
|
||||||
|
|
||||||
|
dd accepts iflag=fullblock to make it accumulate full input blocks.
|
||||||
|
With this new option, after a short read, dd repeatedly calls read,
|
||||||
|
until it fills the incomplete block, reaches EOF, or encounters an error.
|
||||||
|
|
||||||
|
df accepts a new option --total, which produces a grand total of all
|
||||||
|
arguments after all arguments have been processed.
|
||||||
|
|
||||||
|
If the GNU MP library is available at configure time, factor and
|
||||||
|
expr support arbitrarily large numbers. Pollard's rho algorithm is
|
||||||
|
used to factor large numbers.
|
||||||
|
|
||||||
|
install accepts a new option --strip-program to specify the program used to
|
||||||
|
strip binaries.
|
||||||
|
|
||||||
|
ls now colorizes files with capabilities if libcap is available
|
||||||
|
|
||||||
|
ls -v now uses filevercmp function as sort predicate (instead of strverscmp)
|
||||||
|
|
||||||
|
md5sum now accepts the new option, --quiet, to suppress the printing of
|
||||||
|
'OK' messages. sha1sum, sha224sum, sha384sum, and sha512sum accept it, too.
|
||||||
|
|
||||||
|
sort accepts a new option, --files0-from=F, that specifies a file
|
||||||
|
containing a null-separated list of files to sort. This list is used
|
||||||
|
instead of filenames passed on the command-line to avoid problems with
|
||||||
|
maximum command-line (argv) length.
|
||||||
|
|
||||||
|
sort accepts a new option --batch-size=NMERGE, where NMERGE
|
||||||
|
represents the maximum number of inputs that will be merged at once.
|
||||||
|
When processing more than NMERGE inputs, sort uses temporary files.
|
||||||
|
|
||||||
|
sort accepts a new option --version-sort (-V, --sort=version),
|
||||||
|
specifying that ordering is to be based on filevercmp.
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
chcon --verbose now prints a newline after each message
|
||||||
|
|
||||||
|
od no longer suffers from platform bugs in printf(3). This is
|
||||||
|
probably most noticeable when using 'od -tfL' to print long doubles.
|
||||||
|
|
||||||
|
seq -0.1 0.1 2 now prints 2,0 when locale's decimal point is ",".
|
||||||
|
Before, it would mistakenly omit the final number in that example.
|
||||||
|
|
||||||
|
shuf honors the --zero-terminated (-z) option, even with --input-range=LO-HI
|
||||||
|
|
||||||
|
shuf --head-count is now correctly documented. The documentation
|
||||||
|
previously claimed it was called --head-lines.
|
||||||
|
|
||||||
|
** Improvements
|
||||||
|
|
||||||
|
Improved support for access control lists (ACLs): On MacOS X, Solaris 7..10,
|
||||||
|
HP-UX 11, Tru64, AIX, IRIX 6.5, and Cygwin, "ls -l" now displays the presence
|
||||||
|
of an ACL on a file via a '+' sign after the mode, and "cp -p" copies ACLs.
|
||||||
|
|
||||||
|
join has significantly better performance due to better memory management
|
||||||
|
|
||||||
|
ls now uses constant memory when not sorting and using one_per_line format,
|
||||||
|
no matter how many files are in a given directory
|
||||||
|
|
||||||
|
od now aligns fields across lines when printing multiple -t
|
||||||
|
specifiers, and no longer prints fields that resulted entirely from
|
||||||
|
padding the input out to the least common multiple width.
|
||||||
|
|
||||||
|
** Changes in behavior
|
||||||
|
|
||||||
|
stat's --context (-Z) option has always been a no-op.
|
||||||
|
Now it evokes a warning that it is obsolete and will be removed.
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 6.12 (2008-05-31) [stable]
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
chcon, runcon: --help output now includes the bug-reporting address
|
||||||
|
|
||||||
|
cp -p copies permissions more portably. For example, on MacOS X 10.5,
|
||||||
|
"cp -p some-fifo some-file" no longer fails while trying to copy the
|
||||||
|
permissions from the some-fifo argument.
|
||||||
|
|
||||||
|
id with no options now prints the SELinux context only when invoked
|
||||||
|
with no USERNAME argument.
|
||||||
|
|
||||||
|
id and groups once again print the AFS-specific nameless group-ID (PAG).
|
||||||
|
Printing of such large-numbered, kernel-only (not in /etc/group) group-IDs
|
||||||
|
was suppressed in 6.11 due to ignorance that they are useful.
|
||||||
|
|
||||||
|
uniq: avoid subtle field-skipping malfunction due to isblank misuse.
|
||||||
|
In some locales on some systems, isblank(240) (aka  ) is nonzero.
|
||||||
|
On such systems, uniq --skip-fields=N would fail to skip the proper
|
||||||
|
number of fields for some inputs.
|
||||||
|
|
||||||
|
tac: avoid segfault with --regex (-r) and multiple files, e.g.,
|
||||||
|
"echo > x; tac -r x x". [bug present at least in textutils-1.8b, from 1992]
|
||||||
|
|
||||||
|
** Changes in behavior
|
||||||
|
|
||||||
|
install once again sets SELinux context, when possible
|
||||||
|
[it was deliberately disabled in 6.9.90]
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 6.11 (2008-04-19) [stable]
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
configure --enable-no-install-program=groups now works.
|
||||||
|
|
||||||
|
"cp -fR fifo E" now succeeds with an existing E. Before this fix, using
|
||||||
|
-fR to copy a fifo or "special" file onto an existing file would fail
|
||||||
|
with EEXIST. Now, it once again unlinks the destination before trying
|
||||||
|
to create the destination file. [bug introduced in coreutils-5.90]
|
||||||
|
|
||||||
|
dd once again works with unnecessary options like if=/dev/stdin and
|
||||||
|
of=/dev/stdout. [bug introduced in fileutils-4.0h]
|
||||||
|
|
||||||
|
id now uses getgrouplist, when possible. This results in
|
||||||
|
much better performance when there are many users and/or groups.
|
||||||
|
|
||||||
|
ls no longer segfaults on files in /proc when linked with an older version
|
||||||
|
of libselinux. E.g., ls -l /proc/sys would dereference a NULL pointer.
|
||||||
|
|
||||||
|
md5sum would segfault for invalid BSD-style input, e.g.,
|
||||||
|
echo 'MD5 (' | md5sum -c - Now, md5sum ignores that line.
|
||||||
|
sha1sum, sha224sum, sha384sum, and sha512sum are affected, too.
|
||||||
|
[bug introduced in coreutils-5.1.0]
|
||||||
|
|
||||||
|
md5sum -c would accept a NUL-containing checksum string like "abcd\0..."
|
||||||
|
and would unnecessarily read and compute the checksum of the named file,
|
||||||
|
and then compare that checksum to the invalid one: guaranteed to fail.
|
||||||
|
Now, it recognizes that the line is not valid and skips it.
|
||||||
|
sha1sum, sha224sum, sha384sum, and sha512sum are affected, too.
|
||||||
|
[bug present in the original version, in coreutils-4.5.1, 1995]
|
||||||
|
|
||||||
|
"mkdir -Z x dir" no longer segfaults when diagnosing invalid context "x"
|
||||||
|
mkfifo and mknod would fail similarly. Now they're fixed.
|
||||||
|
|
||||||
|
mv would mistakenly unlink a destination file before calling rename,
|
||||||
|
when the destination had two or more hard links. It no longer does that.
|
||||||
|
[bug introduced in coreutils-5.3.0]
|
||||||
|
|
||||||
|
"paste -d'\' file" no longer overruns memory (heap since coreutils-5.1.2,
|
||||||
|
stack before then) [bug present in the original version, in 1992]
|
||||||
|
|
||||||
|
"pr -e" with a mix of backspaces and TABs no longer corrupts the heap
|
||||||
|
[bug present in the original version, in 1992]
|
||||||
|
|
||||||
|
"ptx -F'\' long-file-name" would overrun a malloc'd buffer and corrupt
|
||||||
|
the heap. That was triggered by a lone backslash (or odd number of them)
|
||||||
|
at the end of the option argument to --flag-truncation=STRING (-F),
|
||||||
|
--word-regexp=REGEXP (-W), or --sentence-regexp=REGEXP (-S).
|
||||||
|
|
||||||
|
"rm -r DIR" would mistakenly declare to be "write protected" -- and
|
||||||
|
prompt about -- full DIR-relative names longer than MIN (PATH_MAX, 8192).
|
||||||
|
|
||||||
|
"rmdir --ignore-fail-on-non-empty" detects and ignores the failure
|
||||||
|
in more cases when a directory is empty.
|
||||||
|
|
||||||
|
"seq -f % 1" would issue the erroneous diagnostic "seq: memory exhausted"
|
||||||
|
rather than reporting the invalid string format.
|
||||||
|
[bug introduced in coreutils-6.0]
|
||||||
|
|
||||||
|
** New features
|
||||||
|
|
||||||
|
join now verifies that the inputs are in sorted order. This check can
|
||||||
|
be turned off with the --nocheck-order option.
|
||||||
|
|
||||||
|
sort accepts the new option --sort=WORD, where WORD can be one of
|
||||||
|
general-numeric, month, numeric or random. These are equivalent to the
|
||||||
|
options --general-numeric-sort/-g, --month-sort/-M, --numeric-sort/-n
|
||||||
|
and --random-sort/-R, resp.
|
||||||
|
|
||||||
|
** Improvements
|
||||||
|
|
||||||
|
id and groups work around an AFS-related bug whereby those programs
|
||||||
|
would print an invalid group number, when given no user-name argument.
|
||||||
|
|
||||||
|
ls --color no longer outputs unnecessary escape sequences
|
||||||
|
|
||||||
|
seq gives better diagnostics for invalid formats.
|
||||||
|
|
||||||
|
** Portability
|
||||||
|
|
||||||
|
rm now works properly even on systems like BeOS and Haiku,
|
||||||
|
which have negative errno values.
|
||||||
|
|
||||||
|
** Consistency
|
||||||
|
|
||||||
|
install, mkdir, rmdir and split now write --verbose output to stdout,
|
||||||
|
not to stderr.
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 6.10 (2008-01-22) [stable]
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
Fix a non-portable use of sed in configure.ac.
|
||||||
|
[bug introduced in coreutils-6.9.92]
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 6.9.92 (2008-01-12) [beta]
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
cp --parents no longer uses uninitialized memory when restoring the
|
||||||
|
permissions of a just-created destination directory.
|
||||||
|
[bug introduced in coreutils-6.9.90]
|
||||||
|
|
||||||
|
tr's case conversion would fail in a locale with differing numbers
|
||||||
|
of lower case and upper case characters. E.g., this would fail:
|
||||||
|
env LC_CTYPE=en_US.ISO-8859-1 tr '[:upper:]' '[:lower:]'
|
||||||
|
[bug introduced in coreutils-6.9.90]
|
||||||
|
|
||||||
|
** Improvements
|
||||||
|
|
||||||
|
"touch -d now writable-but-owned-by-someone-else" now succeeds
|
||||||
|
whenever that same command would succeed without "-d now".
|
||||||
|
Before, it would work fine with no -d option, yet it would
|
||||||
|
fail with the ostensibly-equivalent "-d now".
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 6.9.91 (2007-12-15) [beta]
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
"ls -l" would not output "+" on SELinux hosts unless -Z was also given.
|
||||||
|
|
||||||
|
"rm" would fail to unlink a non-directory when run in an environment
|
||||||
|
in which the user running rm is capable of unlinking a directory.
|
||||||
|
[bug introduced in coreutils-6.9]
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 6.9.90 (2007-12-01) [beta]
|
||||||
|
|
||||||
|
** New programs
|
||||||
|
|
||||||
|
arch: equivalent to uname -m, not installed by default
|
||||||
|
But don't install this program on Solaris systems.
|
||||||
|
|
||||||
|
chcon: change the SELinux security context of a file
|
||||||
|
|
||||||
|
mktemp: create a temporary file or directory (or names)
|
||||||
|
|
||||||
|
runcon: run a program in a different SELinux security context
|
||||||
|
|
||||||
|
** Programs no longer installed by default
|
||||||
|
|
||||||
|
hostname, su
|
||||||
|
|
||||||
|
** Changes in behavior
|
||||||
|
|
||||||
|
cp, by default, refuses to copy through a dangling destination symlink
|
||||||
|
Set POSIXLY_CORRECT if you require the old, risk-prone behavior.
|
||||||
|
|
||||||
|
pr -F no longer suppresses the footer or the first two blank lines in
|
||||||
|
the header. This is for compatibility with BSD and POSIX.
|
||||||
|
|
||||||
|
tr now warns about an unescaped backslash at end of string.
|
||||||
|
The tr from coreutils-5.2.1 and earlier would fail for such usage,
|
||||||
|
and Solaris' tr ignores that final byte.
|
||||||
|
|
||||||
|
** New features
|
||||||
|
|
||||||
|
Add SELinux support, based on the patch from Fedora:
|
||||||
|
* cp accepts new --preserve=context option.
|
||||||
|
* "cp -a" works with SELinux:
|
||||||
|
Now, cp -a attempts to preserve context, but failure to do so does
|
||||||
|
not change cp's exit status. However "cp --preserve=context" is
|
||||||
|
similar, but failure *does* cause cp to exit with nonzero status.
|
||||||
|
* install accepts new "-Z, --context=C" option.
|
||||||
|
* id accepts new "-Z" option.
|
||||||
|
* stat honors the new %C format directive: SELinux security context string
|
||||||
|
* ls accepts a slightly modified -Z option.
|
||||||
|
* ls: contrary to Fedora version, does not accept --lcontext and --scontext
|
||||||
|
|
||||||
|
The following commands and options now support the standard size
|
||||||
|
suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y:
|
||||||
|
head -c, head -n, od -j, od -N, od -S, split -b, split -C,
|
||||||
|
tail -c, tail -n.
|
||||||
|
|
||||||
|
cp -p tries to preserve the GID of a file even if preserving the UID
|
||||||
|
is not possible.
|
||||||
|
|
||||||
|
uniq accepts a new option: --zero-terminated (-z). As with the sort
|
||||||
|
option of the same name, this makes uniq consume and produce
|
||||||
|
NUL-terminated lines rather than newline-terminated lines.
|
||||||
|
|
||||||
|
wc no longer warns about character decoding errors in multibyte locales.
|
||||||
|
This means for example that "wc /bin/sh" now produces normal output
|
||||||
|
(though the word count will have no real meaning) rather than many
|
||||||
|
error messages.
|
||||||
|
|
||||||
|
** New build options
|
||||||
|
|
||||||
|
By default, "make install" no longer attempts to install (or even build) su.
|
||||||
|
To change that, use ./configure --enable-install-program=su.
|
||||||
|
If you also want to install the new "arch" program, do this:
|
||||||
|
./configure --enable-install-program=arch,su.
|
||||||
|
|
||||||
|
You can inhibit the compilation and installation of selected programs
|
||||||
|
at configure time. For example, to avoid installing "hostname" and
|
||||||
|
"uptime", use ./configure --enable-no-install-program=hostname,uptime
|
||||||
|
Note: currently, "make check" passes, even when arch and su are not
|
||||||
|
built (that's the new default). However, if you inhibit the building
|
||||||
|
and installation of other programs, don't be surprised if some parts
|
||||||
|
of "make check" fail.
|
||||||
|
|
||||||
|
** Remove deprecated options
|
||||||
|
|
||||||
|
df no longer accepts the --kilobytes option.
|
||||||
|
du no longer accepts the --kilobytes or --megabytes options.
|
||||||
|
ls no longer accepts the --kilobytes option.
|
||||||
|
ptx longer accepts the --copyright option.
|
||||||
|
who no longer accepts -i or --idle.
|
||||||
|
|
||||||
|
** Improved robustness
|
||||||
|
|
||||||
|
ln -f can no longer silently clobber a just-created hard link.
|
||||||
|
In some cases, ln could be seen as being responsible for data loss.
|
||||||
|
For example, given directories a, b, c, and files a/f and b/f, we
|
||||||
|
should be able to do this safely: ln -f a/f b/f c && rm -f a/f b/f
|
||||||
|
However, before this change, ln would succeed, and thus cause the
|
||||||
|
loss of the contents of a/f.
|
||||||
|
|
||||||
|
stty no longer silently accepts certain invalid hex values
|
||||||
|
in its 35-colon command-line argument
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
chmod no longer ignores a dangling symlink. Now, chmod fails
|
||||||
|
with a diagnostic saying that it cannot operate on such a file.
|
||||||
|
[bug introduced in coreutils-5.1.0]
|
||||||
|
|
||||||
|
cp attempts to read a regular file, even if stat says it is empty.
|
||||||
|
Before, "cp /proc/cpuinfo c" would create an empty file when the kernel
|
||||||
|
reports stat.st_size == 0, while "cat /proc/cpuinfo > c" would "work",
|
||||||
|
and create a nonempty one. [bug introduced in coreutils-6.0]
|
||||||
|
|
||||||
|
cp --parents no longer mishandles symlinks to directories in file
|
||||||
|
name components in the source, e.g., "cp --parents symlink/a/b d"
|
||||||
|
no longer fails. Also, 'cp' no longer considers a destination
|
||||||
|
symlink to be the same as the referenced file when copying links
|
||||||
|
or making backups. For example, if SYM is a symlink to FILE,
|
||||||
|
"cp -l FILE SYM" now reports an error instead of silently doing
|
||||||
|
nothing. The behavior of 'cp' is now better documented when the
|
||||||
|
destination is a symlink.
|
||||||
|
|
||||||
|
"cp -i --update older newer" no longer prompts; same for mv
|
||||||
|
|
||||||
|
"cp -i" now detects read errors on standard input, and no longer consumes
|
||||||
|
too much seekable input; same for ln, install, mv, and rm.
|
||||||
|
|
||||||
|
cut now diagnoses a range starting with zero (e.g., -f 0-2) as invalid;
|
||||||
|
before, it would treat it as if it started with 1 (-f 1-2).
|
||||||
|
|
||||||
|
"cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
|
||||||
|
|
||||||
|
cut now diagnoses the '-' in "cut -f -" as an invalid range, rather
|
||||||
|
than interpreting it as the unlimited range, "1-".
|
||||||
|
|
||||||
|
date -d now accepts strings of the form e.g., 'YYYYMMDD +N days',
|
||||||
|
in addition to the usual 'YYYYMMDD N days'.
|
||||||
|
|
||||||
|
du -s now includes the size of any stat'able-but-inaccessible directory
|
||||||
|
in the total size.
|
||||||
|
|
||||||
|
du (without -s) prints whatever it knows of the size of an inaccessible
|
||||||
|
directory. Before, du would print nothing for such a directory.
|
||||||
|
|
||||||
|
ls -x DIR would sometimes output the wrong string in place of the
|
||||||
|
first entry. [introduced in coreutils-6.8]
|
||||||
|
|
||||||
|
ls --color would mistakenly color a dangling symlink as if it were
|
||||||
|
a regular symlink. This would happen only when the dangling symlink
|
||||||
|
was not a command-line argument and in a directory with d_type support.
|
||||||
|
[introduced in coreutils-6.0]
|
||||||
|
|
||||||
|
ls --color, (with a custom LS_COLORS envvar value including the
|
||||||
|
ln=target attribute) would mistakenly output the string "target"
|
||||||
|
before the name of each symlink. [introduced in coreutils-6.0]
|
||||||
|
|
||||||
|
od's --skip (-j) option now works even when the kernel says that a
|
||||||
|
nonempty regular file has stat.st_size = 0. This happens at least
|
||||||
|
with files in /proc and linux-2.6.22.
|
||||||
|
|
||||||
|
"od -j L FILE" had a bug: when the number of bytes to skip, L, is exactly
|
||||||
|
the same as the length of FILE, od would skip *no* bytes. When the number
|
||||||
|
of bytes to skip is exactly the sum of the lengths of the first N files,
|
||||||
|
od would skip only the first N-1 files. [introduced in textutils-2.0.9]
|
||||||
|
|
||||||
|
./printf %.10000000f 1 could get an internal ENOMEM error and generate
|
||||||
|
no output, yet erroneously exit with status 0. Now it diagnoses the error
|
||||||
|
and exits with nonzero status. [present in initial implementation]
|
||||||
|
|
||||||
|
seq no longer mishandles obvious cases like "seq 0 0.000001 0.000003",
|
||||||
|
so workarounds like "seq 0 0.000001 0.0000031" are no longer needed.
|
||||||
|
|
||||||
|
seq would mistakenly reject some valid format strings containing %%,
|
||||||
|
and would mistakenly accept some invalid ones. e.g., %g%% and %%g, resp.
|
||||||
|
|
||||||
|
"seq .1 .1" would mistakenly generate no output on some systems
|
||||||
|
|
||||||
|
Obsolete sort usage with an invalid ordering-option character, e.g.,
|
||||||
|
"env _POSIX2_VERSION=199209 sort +1x" no longer makes sort free an
|
||||||
|
invalid pointer [introduced in coreutils-6.5]
|
||||||
|
|
||||||
|
sorting very long lines (relative to the amount of available memory)
|
||||||
|
no longer provokes unaligned memory access
|
||||||
|
|
||||||
|
split --line-bytes=N (-C N) no longer creates an empty file
|
||||||
|
[this bug is present at least as far back as textutils-1.22 (Jan, 1997)]
|
||||||
|
|
||||||
|
tr -c no longer aborts when translating with Set2 larger than the
|
||||||
|
complement of Set1. [present in the original version, in 1992]
|
||||||
|
|
||||||
|
tr no longer rejects an unmatched [:lower:] or [:upper:] in SET1.
|
||||||
|
[present in the original version]
|
||||||
|
|
||||||
|
|
||||||
* Noteworthy changes in release 6.9 (2007-03-22) [stable]
|
* Noteworthy changes in release 6.9 (2007-03-22) [stable]
|
||||||
|
|
||||||
** Bug fixes
|
** Bug fixes
|
||||||
@@ -13,7 +650,6 @@ GNU coreutils NEWS -*- outline -*-
|
|||||||
Using pr -m -s (i.e. merging files, with TAB as the output separator)
|
Using pr -m -s (i.e. merging files, with TAB as the output separator)
|
||||||
no longer inserts extraneous spaces between output columns.
|
no longer inserts extraneous spaces between output columns.
|
||||||
|
|
||||||
|
|
||||||
* Noteworthy changes in release 6.8 (2007-02-24) [not-unstable]
|
* Noteworthy changes in release 6.8 (2007-02-24) [not-unstable]
|
||||||
|
|
||||||
** Bug fixes
|
** Bug fixes
|
||||||
@@ -51,11 +687,33 @@ GNU coreutils NEWS -*- outline -*-
|
|||||||
pwd and "readlink -e ." no longer fail unnecessarily when a parent
|
pwd and "readlink -e ." no longer fail unnecessarily when a parent
|
||||||
directory is unreadable.
|
directory is unreadable.
|
||||||
|
|
||||||
|
rm (without -f) could prompt when it shouldn't, or fail to prompt
|
||||||
|
when it should, when operating on a full name longer than 511 bytes
|
||||||
|
and getting an ENOMEM error while trying to form the long name.
|
||||||
|
|
||||||
|
rm could mistakenly traverse into the wrong directory under unusual
|
||||||
|
conditions: when a full name longer than 511 bytes specifies a search-only
|
||||||
|
directory, and when forming that name fails with ENOMEM, rm would attempt
|
||||||
|
to open a truncated-to-511-byte name with the first five bytes replaced
|
||||||
|
with "[...]". If such a directory were to actually exist, rm would attempt
|
||||||
|
to remove it.
|
||||||
|
|
||||||
"rm -rf /etc/passwd" (run by non-root) now prints a diagnostic.
|
"rm -rf /etc/passwd" (run by non-root) now prints a diagnostic.
|
||||||
Before it would print nothing.
|
Before it would print nothing.
|
||||||
|
|
||||||
"rm --interactive=never F" no longer prompts for an unwritable F
|
"rm --interactive=never F" no longer prompts for an unwritable F
|
||||||
|
|
||||||
|
"rm -rf D" would emit an misleading diagnostic when failing to
|
||||||
|
remove a symbolic link within the unwritable directory, D.
|
||||||
|
Introduced in coreutils-6.0. Similarly, when a cross-partition
|
||||||
|
"mv" fails because the source directory is unwritable, it now gives
|
||||||
|
a reasonable diagnostic. Before, this would print
|
||||||
|
$ mkdir /tmp/x; touch /tmp/x/y; chmod -w /tmp/x;
|
||||||
|
$ test $(stat -c %d /tmp/x) -ne $(stat -c %d .) && mv /tmp/x/y .
|
||||||
|
mv: cannot remove `/tmp/x/y': Not a directory
|
||||||
|
Now it prints this:
|
||||||
|
mv: cannot remove `/tmp/x/y': Permission denied.
|
||||||
|
|
||||||
** New features
|
** New features
|
||||||
|
|
||||||
sort's new --compress-program=PROG option specifies a compression
|
sort's new --compress-program=PROG option specifies a compression
|
||||||
@@ -87,7 +745,7 @@ GNU coreutils NEWS -*- outline -*-
|
|||||||
Fix similar problems with cp options like -p that imply
|
Fix similar problems with cp options like -p that imply
|
||||||
--preserve=ownership, with install -d when combined with either -o
|
--preserve=ownership, with install -d when combined with either -o
|
||||||
or -g, and with mv when copying across file system boundaries.
|
or -g, and with mv when copying across file system boundaries.
|
||||||
This bug affects coreutils 6.0 through 6.6.
|
This bug affects all versions of coreutils through 6.6.
|
||||||
|
|
||||||
du --one-file-system (-x) would skip subdirectories of any directory
|
du --one-file-system (-x) would skip subdirectories of any directory
|
||||||
listed as second or subsequent command line argument. This bug affects
|
listed as second or subsequent command line argument. This bug affects
|
||||||
@@ -1842,8 +2500,7 @@ packages, see ./old/*/NEWS.
|
|||||||
|
|
||||||
========================================================================
|
========================================================================
|
||||||
|
|
||||||
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
|
Copyright (C) 2001-2009 Free Software Foundation, Inc.
|
||||||
Foundation, Inc.
|
|
||||||
|
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
under the terms of the GNU Free Documentation License, Version 1.2 or
|
under the terms of the GNU Free Documentation License, Version 1.2 or
|
||||||
|
|||||||
+54
-36
@@ -7,18 +7,21 @@ arbitrary limits.
|
|||||||
|
|
||||||
The programs that can be built with this package are:
|
The programs that can be built with this package are:
|
||||||
|
|
||||||
[ base64 basename cat chgrp chmod chown chroot cksum comm cp csplit cut date
|
[ arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp
|
||||||
dd df dir dircolors dirname du echo env expand expr factor false fmt fold
|
csplit cut date dd df dir dircolors dirname du echo env expand expr
|
||||||
ginstall groups head hostid hostname id join kill link ln logname ls
|
factor false fmt fold groups head hostid hostname id install join kill
|
||||||
md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
|
link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup
|
||||||
printenv printf ptx pwd readlink rm rmdir seq sha1sum sha224sum sha256sum
|
od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir
|
||||||
sha384sum sha512sum shred shuf sleep sort split stat stty su sum sync tac
|
runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf
|
||||||
tail tee test touch tr true tsort tty uname unexpand uniq unlink uptime
|
sleep sort split stat stty su sum sync tac tail tee test timeout touch tr
|
||||||
users vdir wc who whoami yes
|
true truncate tsort tty uname unexpand uniq unlink uptime users vdir wc who
|
||||||
|
whoami yes
|
||||||
|
|
||||||
See the file NEWS for a list of major changes in the current release.
|
See the file NEWS for a list of major changes in the current release.
|
||||||
|
|
||||||
See the file INSTALL for compilation and installation instructions.
|
If you obtained this file as part of a "git clone", then see the
|
||||||
|
README-hacking file. If this file came to you as part of a tar archive,
|
||||||
|
then see the file INSTALL for compilation and installation instructions.
|
||||||
|
|
||||||
These programs are intended to conform to POSIX (with BSD and other
|
These programs are intended to conform to POSIX (with BSD and other
|
||||||
extensions), like the rest of the GNU system. By default they conform
|
extensions), like the rest of the GNU system. By default they conform
|
||||||
@@ -38,7 +41,7 @@ Special thanks to Paul Eggert, Brian Matthews, Bruce Evans, Karl Berry,
|
|||||||
Kaveh Ghazi, and François Pinard for help with debugging and porting
|
Kaveh Ghazi, and François Pinard for help with debugging and porting
|
||||||
these programs. Many thanks to all of the people who have taken the
|
these programs. Many thanks to all of the people who have taken the
|
||||||
time to submit problem reports and fixes. All contributed changes are
|
time to submit problem reports and fixes. All contributed changes are
|
||||||
attributed in the ChangeLog files.
|
attributed in the commit logs.
|
||||||
|
|
||||||
And thanks to the following people who have provided accounts for
|
And thanks to the following people who have provided accounts for
|
||||||
portability testing on many different types of systems: Bob Proulx,
|
portability testing on many different types of systems: Bob Proulx,
|
||||||
@@ -55,9 +58,28 @@ and from the corresponding --help usage message. Patches to the template
|
|||||||
files (man/*.x) are welcome. However, the authoritative documentation
|
files (man/*.x) are welcome. However, the authoritative documentation
|
||||||
is in texinfo form in the doc directory.
|
is in texinfo form in the doc directory.
|
||||||
|
|
||||||
If you run the tests on a SunOS4.1.4 system, expect the ctime-part of
|
|
||||||
the ls `time-1' test to fail. I believe that is due to a bug in the
|
*****************************************
|
||||||
way Sun implemented link(2) and chmod(2).
|
On Mac OS X 10.5.1 (Darwin 9.1), test failure
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
Mac OS X 10.5.1 (Darwin 9.1) provides only partial (and incompatible)
|
||||||
|
ACL support, so although "./configure && make" succeeds, "make check"
|
||||||
|
exposes numerous failures. The solution is to turn off ACL support
|
||||||
|
manually via "./configure --disable-acl". For details, see
|
||||||
|
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12292/focus=12318>.
|
||||||
|
|
||||||
|
|
||||||
|
*****************************************
|
||||||
|
Test failure with NLS and gettext <= 0.17
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
Due to a conflict between libintl.h and gnulib's new xprintf module,
|
||||||
|
when you configure with NLS support, and with a gettext installation
|
||||||
|
older than 0.17.1 (not yet released, at the time of this writing),
|
||||||
|
then some tests fail, at least on NetBSD 1.6. To work around it in
|
||||||
|
the mean time, you can configure with --disable-nls. For details,
|
||||||
|
see <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/12015/>.
|
||||||
|
|
||||||
|
|
||||||
***********************
|
***********************
|
||||||
@@ -70,11 +92,15 @@ compiler, due to the use of declarations after non-declaration statements
|
|||||||
in several files in src/. There is code in configure to find and, if
|
in several files in src/. There is code in configure to find and, if
|
||||||
possible, enable an appropriate compiler. However, if configure doesn't
|
possible, enable an appropriate compiler. However, if configure doesn't
|
||||||
find a C99 compiler, it continues nonetheless, and your build will fail.
|
find a C99 compiler, it continues nonetheless, and your build will fail.
|
||||||
If that happens, simply apply the included patch using the following
|
If that happens, simply[*] apply the included patch using the following
|
||||||
command, and then run make again:
|
command, and then run make again:
|
||||||
|
|
||||||
cd src && patch < c99-to-c89.diff
|
cd src && patch < c99-to-c89.diff
|
||||||
|
|
||||||
|
[*] however, as of coreutils-7.1, the "c99-to-c89.diff" file is no longer
|
||||||
|
maintained, so even if the patches still apply, the result will be an
|
||||||
|
incomplete conversion. It's been 10 years. Get a decent compiler! ;-)
|
||||||
|
|
||||||
|
|
||||||
***********************
|
***********************
|
||||||
HPUX 11.x build failure
|
HPUX 11.x build failure
|
||||||
@@ -124,7 +150,7 @@ I find that it is best to unpack and build as a non-privileged
|
|||||||
user, and then to run the following command as that user in order
|
user, and then to run the following command as that user in order
|
||||||
to run the privilege-requiring tests:
|
to run the privilege-requiring tests:
|
||||||
|
|
||||||
sudo env NON_ROOT_USERNAME=$USER make -k check
|
sudo env PATH="$PATH" NON_ROOT_USERNAME=$USER make -k check-root
|
||||||
|
|
||||||
If you can run the tests as root, please do so and report any
|
If you can run the tests as root, please do so and report any
|
||||||
problems. We get much less test coverage in that mode, and it's
|
problems. We get much less test coverage in that mode, and it's
|
||||||
@@ -139,17 +165,17 @@ Reporting bugs:
|
|||||||
IMPORTANT: if you take the time to report a test failure,
|
IMPORTANT: if you take the time to report a test failure,
|
||||||
please be sure to include the output of running `make check'
|
please be sure to include the output of running `make check'
|
||||||
in verbose mode for each failing test. For example,
|
in verbose mode for each failing test. For example,
|
||||||
if the test that fails is tests/mv/hard-link-1, then you
|
if the test that fails is tests/misc/df, then you would
|
||||||
would run this command:
|
run this command:
|
||||||
|
|
||||||
env VERBOSE=yes make check -C tests/mv TESTS=hard-link-1 >> log 2>&1
|
(cd tests && make check TESTS=misc/df VERBOSE=yes) >> log 2>&1
|
||||||
|
|
||||||
For some tests, you can get even more detail by including
|
For some tests, you can get even more detail by adding DEBUG=yes.
|
||||||
DEBUG=yes in the environment:
|
Then include the contents of the file `log' in your bug report.
|
||||||
|
|
||||||
env DEBUG=yes VERBOSE=yes make check -C tests/mv TESTS=hard-link-1 >> log 2>&1
|
Send bug reports, questions, comments, etc. to [email protected].
|
||||||
|
If you would like to suggest a patch, see the files README-hacking
|
||||||
and then include the contents of the file `log' in your bug report.
|
and HACKING for tips.
|
||||||
|
|
||||||
***************************************
|
***************************************
|
||||||
|
|
||||||
@@ -163,14 +189,13 @@ If you sent a complete patch and, after a couple weeks you haven't
|
|||||||
received any acknowledgement, please ping us. A complete patch includes
|
received any acknowledgement, please ping us. A complete patch includes
|
||||||
a well-written ChangeLog entry, unified (diff -u format) diffs relative
|
a well-written ChangeLog entry, unified (diff -u format) diffs relative
|
||||||
to the most recent test release (or, better, relative to the latest
|
to the most recent test release (or, better, relative to the latest
|
||||||
sources in the CVS repository), an explanation for why the patch is
|
sources in the public repository), an explanation for why the patch is
|
||||||
necessary or useful, and if at all possible, enough information to
|
necessary or useful, and if at all possible, enough information to
|
||||||
reproduce whatever problem prompted it. Plus, you'll earn lots of
|
reproduce whatever problem prompted it. Plus, you'll earn lots of
|
||||||
karma if you include a test case to exercise any bug(s) you fix.
|
karma if you include a test case to exercise any bug(s) you fix.
|
||||||
Instructions for checking out the latest source via CVS are here:
|
Here are instructions for checking out the latest development sources:
|
||||||
|
|
||||||
http://savannah.gnu.org/cvs/?group=coreutils
|
|
||||||
|
|
||||||
|
http://savannah.gnu.org/git/?group=coreutils
|
||||||
|
|
||||||
If your patch adds a new feature, please try to get some sort of consensus
|
If your patch adds a new feature, please try to get some sort of consensus
|
||||||
that it is a worthwhile change. One way to do that is to send mail to
|
that it is a worthwhile change. One way to do that is to send mail to
|
||||||
@@ -188,13 +213,7 @@ subtle bugs.
|
|||||||
WARNING: If you modify files like configure.in, m4/*.m4, aclocal.m4,
|
WARNING: If you modify files like configure.in, m4/*.m4, aclocal.m4,
|
||||||
or any Makefile.am, then don't be surprised if what gets regenerated no
|
or any Makefile.am, then don't be surprised if what gets regenerated no
|
||||||
longer works. To make things work, you'll have to be using appropriate
|
longer works. To make things work, you'll have to be using appropriate
|
||||||
versions of automake and autoconf. As for what versions are `appropriate',
|
versions of the tools listed in bootstrap.conf's buildreq string.
|
||||||
use the versions of
|
|
||||||
|
|
||||||
* autoconf specified via AC_PREREQ in m4/jm-macros.m4
|
|
||||||
* automake specified via AM_INIT_AUTOMAKE in configure.ac
|
|
||||||
|
|
||||||
Usually it's fine to use versions that are newer than those specified.
|
|
||||||
|
|
||||||
All of these programs except `test' recognize the `--version' option.
|
All of these programs except `test' recognize the `--version' option.
|
||||||
When reporting bugs, please include in the subject line both the package
|
When reporting bugs, please include in the subject line both the package
|
||||||
@@ -210,8 +229,7 @@ the address on the last line of --help output.
|
|||||||
|
|
||||||
========================================================================
|
========================================================================
|
||||||
|
|
||||||
Copyright (C) 1998, 2002, 2003, 2004, 2005, 2006 Free Software
|
Copyright (C) 1998, 2002-2009 Free Software Foundation, Inc.
|
||||||
Foundation, Inc.
|
|
||||||
|
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
under the terms of the GNU Free Documentation License, Version 1.2 or
|
under the terms of the GNU Free Documentation License, Version 1.2 or
|
||||||
|
|||||||
@@ -2,37 +2,39 @@ The following teams have translated the many diagnostics of this
|
|||||||
package into many different languages. Thank you!
|
package into many different languages. Thank you!
|
||||||
|
|
||||||
---
|
---
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-af.html
|
http://translationproject.org/team/af.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-be.html
|
http://translationproject.org/team/be.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-bg.html
|
http://translationproject.org/team/bg.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-ca.html
|
http://translationproject.org/team/ca.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-cs.html
|
http://translationproject.org/team/cs.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-da.html
|
http://translationproject.org/team/da.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-de.html
|
http://translationproject.org/team/de.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-el.html
|
http://translationproject.org/team/el.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-es.html
|
http://translationproject.org/team/es.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-et.html
|
http://translationproject.org/team/et.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-eu.html
|
http://translationproject.org/team/eu.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-fi.html
|
http://translationproject.org/team/fi.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-fr.html
|
http://translationproject.org/team/fr.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-ga.html
|
http://translationproject.org/team/ga.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-gl.html
|
http://translationproject.org/team/gl.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-hu.html
|
http://translationproject.org/team/hu.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-it.html
|
http://translationproject.org/team/id.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-ja.html
|
http://translationproject.org/team/it.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-ko.html
|
http://translationproject.org/team/ja.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-ms.html
|
http://translationproject.org/team/ko.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-nb.html
|
http://translationproject.org/team/lt.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-nl.html
|
http://translationproject.org/team/ms.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-no.html
|
http://translationproject.org/team/nb.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-pl.html
|
http://translationproject.org/team/nl.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-pt.html
|
http://translationproject.org/team/pl.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-pt_BR.html
|
http://translationproject.org/team/pt.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-ru.html
|
http://translationproject.org/team/pt_BR.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-rw.html
|
http://translationproject.org/team/ru.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-sk.html
|
http://translationproject.org/team/sk.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-sl.html
|
http://translationproject.org/team/sl.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-sv.html
|
http://translationproject.org/team/sv.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-tr.html
|
http://translationproject.org/team/tr.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-zh_CN.html
|
http://translationproject.org/team/uk.html
|
||||||
http://www.iro.umontreal.ca/contrib/po/HTML/team-zh_TW.html
|
http://translationproject.org/team/vi.html
|
||||||
|
http://translationproject.org/team/zh_CN.html
|
||||||
|
http://translationproject.org/team/zh_TW.html
|
||||||
|
|||||||
+54
-66
@@ -1,14 +1,43 @@
|
|||||||
stty.c:
|
If you're interested in helping, here are some tasks that we've considered
|
||||||
use xstrtoul, not sscanf
|
over the years. Beware: some are quite old and no longer valid. To avoid
|
||||||
|
wasting your time by duplicating work or by working on a task that is no
|
||||||
|
longer pertinent, please search the mailing list and post your intent
|
||||||
|
before embarking on a big project.
|
||||||
|
|
||||||
|
==================================================
|
||||||
|
Modify chmod so that it does not change an inode's st_ctime
|
||||||
|
when the selected operation would have no other effect.
|
||||||
|
First suggested by Hans Ecke <http://hans.ecke.ws> in
|
||||||
|
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/2920
|
||||||
|
Discussed more recently on <http://bugs.debian.org/497514>.
|
||||||
|
|
||||||
|
document the following in coreutils.texi:
|
||||||
|
mktemp
|
||||||
|
[
|
||||||
|
pinky
|
||||||
|
|
||||||
|
Suggestion from Paul Eggert:
|
||||||
|
More generally, there's not that much use for imaxtostr nowadays,
|
||||||
|
since the inttypes module and newer versions of gettext allow things
|
||||||
|
like _("truncating %s at %" PRIdMAX " bytes") to work portably.
|
||||||
|
I suspect that (if someone cares to take the time) we can remove
|
||||||
|
all instances of imaxtostr and umaxtostr in coreutils and gnulib.
|
||||||
|
|
||||||
|
cp --recursive: use fts and *at functions to perform directory traversals
|
||||||
|
in source and destination hierarchy rather than forming full file names.
|
||||||
|
The latter (current) approach fails unnecessarily when the names
|
||||||
|
become very long, and requires space and time that is quadratic in the
|
||||||
|
depth of the hierarchy. [Bo Borgerson is working on this]
|
||||||
|
|
||||||
printf:
|
printf:
|
||||||
Now that gnulib supports *printf("%a"), import one of the
|
Now that gnulib supports *printf("%a"), import one of the
|
||||||
*printf-posix modules so that printf(1) will support %a even on
|
*printf-posix modules so that printf(1) will support %a even on
|
||||||
platforms where the native *printf(3) is deficient.
|
platforms where the native *printf(3) is deficient.
|
||||||
Suggestion form Eric Blake.
|
Suggestion from Eric Blake.
|
||||||
|
|
||||||
strip: add an option to specify the program used to strip binaries.
|
renice: POSIX utility, needs implementing.
|
||||||
suggestion from Karl Berry
|
suggestion from Karl Berry (among others).
|
||||||
|
Bob Proulx is working on this.
|
||||||
|
|
||||||
doc/coreutils.texi:
|
doc/coreutils.texi:
|
||||||
Address this comment: FIXME: mv's behavior in this case is system-dependent
|
Address this comment: FIXME: mv's behavior in this case is system-dependent
|
||||||
@@ -24,13 +53,6 @@ And once that's done, add an exclusion so that `cp --link'
|
|||||||
no longer incurs the overhead of saving src. dev/ino and dest. filename
|
no longer incurs the overhead of saving src. dev/ino and dest. filename
|
||||||
in the hash table.
|
in the hash table.
|
||||||
|
|
||||||
See if we can be consistent about where --verbose sends its output:
|
|
||||||
These all send --verbose output to stdout:
|
|
||||||
head, tail, rm, cp, mv, ln, chmod, chown, chgrp, install, ln
|
|
||||||
These send it to stderr:
|
|
||||||
shred mkdir split
|
|
||||||
readlink is different
|
|
||||||
|
|
||||||
Write an autoconf test to work around build failure in HPUX's 64-bit mode.
|
Write an autoconf test to work around build failure in HPUX's 64-bit mode.
|
||||||
See notes in README -- and remove them once there's a work-around.
|
See notes in README -- and remove them once there's a work-around.
|
||||||
|
|
||||||
@@ -44,19 +66,9 @@ Should printf '\0123' print "\n3"?
|
|||||||
|
|
||||||
printf: consider adapting builtins/printf.def from bash
|
printf: consider adapting builtins/printf.def from bash
|
||||||
|
|
||||||
df: add `--total' option, suggested here http://bugs.debian.org/186007
|
|
||||||
|
|
||||||
seq: give better diagnostics for invalid formats:
|
|
||||||
e.g. no or too many % directives
|
|
||||||
seq: consider allowing format string to contain no %-directives
|
|
||||||
|
|
||||||
resolve RH report on cp -a forwarded by Tim Waugh
|
|
||||||
|
|
||||||
tail: don't use xlseek; it *exits*.
|
tail: don't use xlseek; it *exits*.
|
||||||
Instead, maybe use a macro and return nonzero.
|
Instead, maybe use a macro and return nonzero.
|
||||||
|
|
||||||
add mktemp? Suggested by Nelson Beebe
|
|
||||||
|
|
||||||
tr: support nontrivial equivalence classes, e.g. [=e=] with LC_COLLATE=fr_FR
|
tr: support nontrivial equivalence classes, e.g. [=e=] with LC_COLLATE=fr_FR
|
||||||
|
|
||||||
lib/strftime.c: Since %N is the only format that we need but that
|
lib/strftime.c: Since %N is the only format that we need but that
|
||||||
@@ -64,11 +76,6 @@ lib/strftime.c: Since %N is the only format that we need but that
|
|||||||
would expand /%(-_)?\d*N/ to the desired string and then pass the
|
would expand /%(-_)?\d*N/ to the desired string and then pass the
|
||||||
resulting string to glibc's strftime.
|
resulting string to glibc's strftime.
|
||||||
|
|
||||||
sort: Compress temporary files when doing large external sort/merges.
|
|
||||||
This improves performance when you can compress/uncompress faster than
|
|
||||||
you can read/write, which is common in these days of fast CPUs.
|
|
||||||
suggestion from Charles Randall on 2001-08-10
|
|
||||||
|
|
||||||
unexpand: [http://www.opengroup.org/onlinepubs/007908799/xcu/unexpand.html]
|
unexpand: [http://www.opengroup.org/onlinepubs/007908799/xcu/unexpand.html]
|
||||||
printf 'x\t \t y\n'|unexpand -t 8,9 should print its input, unmodified.
|
printf 'x\t \t y\n'|unexpand -t 8,9 should print its input, unmodified.
|
||||||
printf 'x\t \t y\n'|unexpand -t 5,8 should print "x\ty\n"
|
printf 'x\t \t y\n'|unexpand -t 5,8 should print "x\ty\n"
|
||||||
@@ -94,9 +101,8 @@ sort: Investigate better sorting algorithms; see Knuth vol. 3.
|
|||||||
5.3.1, who credits Lester Ford, Jr. and Selmer Johnson, American
|
5.3.1, who credits Lester Ford, Jr. and Selmer Johnson, American
|
||||||
Mathematical Monthly 66 (1959), 387-389.
|
Mathematical Monthly 66 (1959), 387-389.
|
||||||
|
|
||||||
cp --recursive: perform dir traversals in source and dest hierarchy rather
|
shred: Update shred as described here to conform to DoD 5220 rules:
|
||||||
than forming full file names. The latter (current) approach fails
|
http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00075.html
|
||||||
unnecessarily when the names become very long.
|
|
||||||
|
|
||||||
Remove suspicious uses of alloca (ones that may allocate more than
|
Remove suspicious uses of alloca (ones that may allocate more than
|
||||||
about 4k)
|
about 4k)
|
||||||
@@ -104,16 +110,15 @@ Remove suspicious uses of alloca (ones that may allocate more than
|
|||||||
Adapt these contribution guidelines for coreutils:
|
Adapt these contribution guidelines for coreutils:
|
||||||
http://sources.redhat.com/automake/contribute.html
|
http://sources.redhat.com/automake/contribute.html
|
||||||
|
|
||||||
|
Improve test coverage.
|
||||||
|
See HACKING for instructions on generating an html test coverage report.
|
||||||
|
Find a program that has poor coverage and improve.
|
||||||
|
|
||||||
Changes expected to go in, someday.
|
Changes expected to go in, someday.
|
||||||
======================================
|
======================================
|
||||||
|
|
||||||
dd patch from Olivier Delhomme
|
dd patch from Olivier Delhomme
|
||||||
|
|
||||||
Andreas Gruenbacher's xattr changes
|
|
||||||
|
|
||||||
Apply Bruno Haible's hostname changes
|
|
||||||
|
|
||||||
test/mv/*: clean up $other_partition_tmpdir in all cases
|
test/mv/*: clean up $other_partition_tmpdir in all cases
|
||||||
|
|
||||||
ls: when both -l and --dereference-command-line-symlink-to-dir are
|
ls: when both -l and --dereference-command-line-symlink-to-dir are
|
||||||
@@ -122,27 +127,18 @@ Changes expected to go in, someday.
|
|||||||
an implicit --NO-dereference-command-line-symlink-to-dir meaning.
|
an implicit --NO-dereference-command-line-symlink-to-dir meaning.
|
||||||
Pointed out by Karl Berry.
|
Pointed out by Karl Berry.
|
||||||
|
|
||||||
A more efficient version of factor, and possibly one that
|
|
||||||
accepts inputs of size 2^64 and larger.
|
|
||||||
|
|
||||||
dd: consider adding an option to suppress `bytes/block read/written'
|
dd: consider adding an option to suppress `bytes/block read/written'
|
||||||
output to stderr. Suggested here:
|
output to stderr. Suggested here:
|
||||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045
|
||||||
|
|
||||||
Pending copyright papers:
|
Pending copyright papers:
|
||||||
------------------------
|
------------------------
|
||||||
ls --color: Ed Avis' patch to suppress escape sequences for
|
|
||||||
non-highlighted files
|
|
||||||
|
|
||||||
getpwnam from Bruce Korb
|
getpwnam from Bruce Korb
|
||||||
|
|
||||||
pb (progress bar) from Miika Pekkarinen
|
pb (progress bar) from Miika Pekkarinen
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
Have euidaccess.m4 check for eaccess as well as euidaccess
|
|
||||||
If found, then do `#define euidaccess eaccess'.
|
|
||||||
|
|
||||||
Remove long-deprecated options. Search case-insensitive for
|
Remove long-deprecated options. Search case-insensitive for
|
||||||
`deprecated' and `remove in '. Automate this.
|
`deprecated' and `remove in '. Automate this.
|
||||||
|
|
||||||
@@ -150,43 +146,36 @@ Add a distcheck-time test to ensure that every distributed
|
|||||||
file is either read-only(indicating generated) or is
|
file is either read-only(indicating generated) or is
|
||||||
version-controlled and up to date.
|
version-controlled and up to date.
|
||||||
|
|
||||||
Implement Ulrich Drepper's suggestion to use getgrouplist rather
|
remove `%s' notation (now that they're all gone, add a maint.mk sc_
|
||||||
than getugroups. This affects only `id', but makes a big difference
|
rule to ensure no new ones are added):
|
||||||
on systems with many users and/or groups, and makes id usable once
|
|
||||||
again on systems where access restrictions make getugroups fail.
|
|
||||||
But first we'll need a run-test (either in an autoconf macro or at
|
|
||||||
run time) to avoid the segfault bug in libc-2.3.2's getgrouplist.
|
|
||||||
In that case, we'd revert to using a new (to-be-written) getgrouplist
|
|
||||||
module that does most of what `id' already does. Or just avoid the
|
|
||||||
buggy use of getgrouplist by never passing it a buffer of length zero.
|
|
||||||
See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200327
|
|
||||||
|
|
||||||
remove `%s' notation:
|
|
||||||
grep -E "\`%.{,4}s'" src/*.c
|
grep -E "\`%.{,4}s'" src/*.c
|
||||||
|
|
||||||
|
remove all uses of the `register' keyword: Done. add a maint.mk rule
|
||||||
|
for this, too.
|
||||||
|
|
||||||
remove or adjust chown's --changes option, since it
|
remove or adjust chown's --changes option, since it
|
||||||
can't always do what it currently says it does.
|
can't always do what it currently says it does.
|
||||||
|
|
||||||
|
Support arbitrary-precision arithmetic in those tools for which it
|
||||||
|
makes sense. Factor and expr already support this via libgmp.
|
||||||
|
The "test" program is covered via its string-based comparison of
|
||||||
|
integers. To be converted: seq.
|
||||||
|
|
||||||
Adapt tools like wc, tr, fmt, etc. (most of the textutils) to be
|
Adapt tools like wc, tr, fmt, etc. (most of the textutils) to be
|
||||||
multibyte aware. The problem is that I want to avoid duplicating
|
multibyte aware. The problem is that I want to avoid duplicating
|
||||||
significant blocks of logic, yet I also want to incur only minimal
|
significant blocks of logic, yet I also want to incur only minimal
|
||||||
(preferably `no') cost when operating in single-byte mode.
|
(preferably `no') cost when operating in single-byte mode.
|
||||||
|
|
||||||
Remove all uses of the `register' keyword
|
|
||||||
|
|
||||||
pr's use of nstrftime can make it malloc a very large (up to SIZE_MAX) buffer
|
pr's use of nstrftime can make it malloc a very large (up to SIZE_MAX) buffer
|
||||||
|
|
||||||
ls.c: use gettime rather than clock_gettime, gettimeofday, time
|
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
|
Copyright (C) 2002-2009 Free Software Foundation, Inc.
|
||||||
Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -194,5 +183,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|||||||
Vendored
+266
-75
@@ -1,7 +1,7 @@
|
|||||||
# generated automatically by aclocal 1.10 -*- Autoconf -*-
|
# generated automatically by aclocal 1.10c -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
# 2005, 2006 Free Software Foundation, Inc.
|
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
@@ -11,12 +11,15 @@
|
|||||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
m4_if(m4_PACKAGE_VERSION, [2.61a],,
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_fatal([this file was generated for autoconf 2.61a.
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
You have another version of autoconf. If you want to use that,
|
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63b.42-b26d5],,
|
||||||
you should regenerate the build system entirely.], [63])])
|
[m4_warning([this file was generated for autoconf 2.63b.42-b26d5.
|
||||||
|
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||||
|
If you have problems, you may need to regenerate the build system entirely.
|
||||||
|
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||||
|
|
||||||
# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
|
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -28,10 +31,10 @@ you should regenerate the build system entirely.], [63])])
|
|||||||
# generated from the m4 files accompanying Automake X.Y.
|
# generated from the m4 files accompanying Automake X.Y.
|
||||||
# (This private macro should not be called outside this file.)
|
# (This private macro should not be called outside this file.)
|
||||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||||
[am__api_version='1.10'
|
[am__api_version='1.10c'
|
||||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||||
dnl require some minimum version. Point them to the right macro.
|
dnl require some minimum version. Point them to the right macro.
|
||||||
m4_if([$1], [1.10], [],
|
m4_if([$1], [1.10c], [],
|
||||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -45,10 +48,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
|||||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
[AM_AUTOMAKE_VERSION([1.10])dnl
|
[AM_AUTOMAKE_VERSION([1.10c])dnl
|
||||||
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
|
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||||
|
|
||||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
@@ -105,14 +110,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
|
|||||||
|
|
||||||
# AM_CONDITIONAL -*- Autoconf -*-
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
|
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
# serial 8
|
# serial 9
|
||||||
|
|
||||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
@@ -125,6 +130,7 @@ AC_SUBST([$1_TRUE])dnl
|
|||||||
AC_SUBST([$1_FALSE])dnl
|
AC_SUBST([$1_FALSE])dnl
|
||||||
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||||
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||||
|
m4_define([_AM_COND_VALUE_$1], [$2])dnl
|
||||||
if $2; then
|
if $2; then
|
||||||
$1_TRUE=
|
$1_TRUE=
|
||||||
$1_FALSE='#'
|
$1_FALSE='#'
|
||||||
@@ -138,14 +144,14 @@ AC_CONFIG_COMMANDS_PRE(
|
|||||||
Usually this means the macro was only invoked conditionally.]])
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
fi])])
|
fi])])
|
||||||
|
|
||||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
# serial 9
|
# serial 10
|
||||||
|
|
||||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||||
# written in clear, in which case automake, when reading aclocal.m4,
|
# written in clear, in which case automake, when reading aclocal.m4,
|
||||||
@@ -202,6 +208,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
|
|||||||
if test "$am_compiler_list" = ""; then
|
if test "$am_compiler_list" = ""; then
|
||||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||||
fi
|
fi
|
||||||
|
am__universal=false
|
||||||
|
m4_case([$1], [CC],
|
||||||
|
[case " $depcc " in #(
|
||||||
|
*\ -arch\ *\ -arch\ *) am__universal=true ;;
|
||||||
|
esac],
|
||||||
|
[CXX],
|
||||||
|
[case " $depcc " in #(
|
||||||
|
*\ -arch\ *\ -arch\ *) am__universal=true ;;
|
||||||
|
esac])
|
||||||
|
|
||||||
for depmode in $am_compiler_list; do
|
for depmode in $am_compiler_list; do
|
||||||
# Setup a source with many dependencies, because some compilers
|
# Setup a source with many dependencies, because some compilers
|
||||||
# like to wrap large dependency lists on column 80 (with \), and
|
# like to wrap large dependency lists on column 80 (with \), and
|
||||||
@@ -219,7 +235,17 @@ AC_CACHE_CHECK([dependency style of $depcc],
|
|||||||
done
|
done
|
||||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||||
|
|
||||||
|
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||||
|
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||||
|
# handle `-M -o', and we need to detect this. Also, some Intel
|
||||||
|
# versions had trouble with output in subdirs
|
||||||
|
am__obj=sub/conftest.${OBJEXT-o}
|
||||||
|
am__minus_obj="-o $am__obj"
|
||||||
case $depmode in
|
case $depmode in
|
||||||
|
gcc)
|
||||||
|
# This depmode causes a compiler race in universal mode.
|
||||||
|
test "$am__universal" = false || continue
|
||||||
|
;;
|
||||||
nosideeffect)
|
nosideeffect)
|
||||||
# after this tag, mechanisms are not by side-effect, so they'll
|
# after this tag, mechanisms are not by side-effect, so they'll
|
||||||
# only be used when explicitly requested
|
# only be used when explicitly requested
|
||||||
@@ -229,19 +255,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
msvisualcpp | msvcmsys)
|
||||||
|
# This compiler won't grok `-c -o', but also, the minuso test has
|
||||||
|
# not run yet. These depmodes are late enough in the game, and
|
||||||
|
# so weak that their functioning should not be impacted.
|
||||||
|
am__obj=conftest.${OBJEXT-o}
|
||||||
|
am__minus_obj=
|
||||||
|
;;
|
||||||
none) break ;;
|
none) break ;;
|
||||||
esac
|
esac
|
||||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
|
||||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
|
||||||
# handle `-M -o', and we need to detect this.
|
|
||||||
if depmode=$depmode \
|
if depmode=$depmode \
|
||||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
source=sub/conftest.c object=$am__obj \
|
||||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
|
||||||
>/dev/null 2>conftest.err &&
|
>/dev/null 2>conftest.err &&
|
||||||
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||||
# icc doesn't choke on unknown options, it will just issue warnings
|
# icc doesn't choke on unknown options, it will just issue warnings
|
||||||
# or remarks (even with -Werror). So we grep stderr for any message
|
# or remarks (even with -Werror). So we grep stderr for any message
|
||||||
@@ -298,19 +328,29 @@ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
|
|||||||
|
|
||||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
#serial 3
|
#serial 5
|
||||||
|
|
||||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
[for mf in $CONFIG_FILES; do
|
[{
|
||||||
|
# Autoconf 2.62 quotes --file arguments for eval, but not when files
|
||||||
|
# are listed without --file. Let's play safe and only enable the eval
|
||||||
|
# if we detect the quoting.
|
||||||
|
case $CONFIG_FILES in
|
||||||
|
*\'*) eval set x "$CONFIG_FILES" ;;
|
||||||
|
*) set x $CONFIG_FILES ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
for mf
|
||||||
|
do
|
||||||
# Strip MF so we end up with the name of the file.
|
# Strip MF so we end up with the name of the file.
|
||||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||||
# Check whether this is an Automake generated Makefile or not.
|
# Check whether this is an Automake generated Makefile or not.
|
||||||
@@ -320,7 +360,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||||||
# each Makefile.in and add a new line on top of each file to say so.
|
# each Makefile.in and add a new line on top of each file to say so.
|
||||||
# Grep'ing the whole file is not good either: AIX grep has a line
|
# Grep'ing the whole file is not good either: AIX grep has a line
|
||||||
# limit of 2048, but all sed's we know have understand at least 4000.
|
# limit of 2048, but all sed's we know have understand at least 4000.
|
||||||
if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
|
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
||||||
dirpart=`AS_DIRNAME("$mf")`
|
dirpart=`AS_DIRNAME("$mf")`
|
||||||
else
|
else
|
||||||
continue
|
continue
|
||||||
@@ -348,7 +388,8 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||||||
# echo "creating $dirpart/$file"
|
# echo "creating $dirpart/$file"
|
||||||
echo '# dummy' > "$dirpart/$file"
|
echo '# dummy' > "$dirpart/$file"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
}
|
||||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
|
||||||
|
|
||||||
@@ -368,13 +409,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||||||
# Do all the work for Automake. -*- Autoconf -*-
|
# Do all the work for Automake. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
# 2005, 2006 Free Software Foundation, Inc.
|
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
# serial 12
|
# serial 16
|
||||||
|
|
||||||
# This macro actually does too much. Some checks are only needed if
|
# This macro actually does too much. Some checks are only needed if
|
||||||
# your package does certain things. But this isn't really a big deal.
|
# your package does certain things. But this isn't really a big deal.
|
||||||
@@ -391,7 +432,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||||||
# arguments mandatory, and then we can depend on a new Autoconf
|
# arguments mandatory, and then we can depend on a new Autoconf
|
||||||
# release and drop the old call support.
|
# release and drop the old call support.
|
||||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||||
[AC_PREREQ([2.60])dnl
|
[AC_PREREQ([2.62])dnl
|
||||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||||
dnl the ones we care about.
|
dnl the ones we care about.
|
||||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||||
@@ -442,8 +483,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
|
|||||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||||
AM_PROG_INSTALL_SH
|
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||||
AM_PROG_INSTALL_STRIP
|
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
|
||||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||||
# We need awk for the "check" target. The system "awk" is bad on
|
# We need awk for the "check" target. The system "awk" is bad on
|
||||||
# some platforms.
|
# some platforms.
|
||||||
@@ -467,8 +508,21 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
|||||||
[define([AC_PROG_OBJC],
|
[define([AC_PROG_OBJC],
|
||||||
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
|
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
|
||||||
])
|
])
|
||||||
|
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
|
||||||
|
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
|
||||||
|
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
|
||||||
|
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
||||||
|
AC_CONFIG_COMMANDS_PRE(dnl
|
||||||
|
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
||||||
|
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
||||||
|
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
|
||||||
|
dnl mangled by Autoconf and run in a shell conditional statement.
|
||||||
|
m4_define([_AC_COMPILER_EXEEXT],
|
||||||
|
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
||||||
|
|
||||||
|
|
||||||
# When config.status generates a header, we must update the stamp-h file.
|
# When config.status generates a header, we must update the stamp-h file.
|
||||||
# This file resides in the same directory as the config header
|
# This file resides in the same directory as the config header
|
||||||
@@ -479,18 +533,19 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
|||||||
# our stamp files there.
|
# our stamp files there.
|
||||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||||
[# Compute $1's index in $config_headers.
|
[# Compute $1's index in $config_headers.
|
||||||
|
_am_arg=$1
|
||||||
_am_stamp_count=1
|
_am_stamp_count=1
|
||||||
for _am_header in $config_headers :; do
|
for _am_header in $config_headers :; do
|
||||||
case $_am_header in
|
case $_am_header in
|
||||||
$1 | $1:* )
|
$_am_arg | $_am_arg:* )
|
||||||
break ;;
|
break ;;
|
||||||
* )
|
* )
|
||||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||||
|
|
||||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -501,7 +556,14 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
|||||||
# Define $install_sh.
|
# Define $install_sh.
|
||||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
|
if test x"${install_sh}" != xset; then
|
||||||
|
case $am_aux_dir in
|
||||||
|
*\ * | *\ *)
|
||||||
|
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
||||||
|
*)
|
||||||
|
install_sh="\${SHELL} $am_aux_dir/install-sh"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
AC_SUBST(install_sh)])
|
AC_SUBST(install_sh)])
|
||||||
|
|
||||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||||
@@ -527,13 +589,13 @@ AC_SUBST([am__leading_dot])])
|
|||||||
|
|
||||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
# serial 3
|
# serial 4
|
||||||
|
|
||||||
# AM_MAKE_INCLUDE()
|
# AM_MAKE_INCLUDE()
|
||||||
# -----------------
|
# -----------------
|
||||||
@@ -542,7 +604,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
|
|||||||
[am_make=${MAKE-make}
|
[am_make=${MAKE-make}
|
||||||
cat > confinc << 'END'
|
cat > confinc << 'END'
|
||||||
am__doit:
|
am__doit:
|
||||||
@echo done
|
@echo this is the am__doit target
|
||||||
.PHONY: am__doit
|
.PHONY: am__doit
|
||||||
END
|
END
|
||||||
# If we don't find an include directive, just comment out the code.
|
# If we don't find an include directive, just comment out the code.
|
||||||
@@ -552,24 +614,24 @@ am__quote=
|
|||||||
_am_result=none
|
_am_result=none
|
||||||
# First try GNU make style include.
|
# First try GNU make style include.
|
||||||
echo "include confinc" > confmf
|
echo "include confinc" > confmf
|
||||||
# We grep out `Entering directory' and `Leaving directory'
|
# Ignore all kinds of additional output from `make'.
|
||||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
case `$am_make -s -f confmf 2> /dev/null` in #(
|
||||||
# In particular we don't look at `^make:' because GNU make might
|
*the\ am__doit\ target*)
|
||||||
# be invoked under some other name (usually "gmake"), in which
|
|
||||||
# case it prints its new name instead of `make'.
|
|
||||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
|
||||||
am__include=include
|
am__include=include
|
||||||
am__quote=
|
am__quote=
|
||||||
_am_result=GNU
|
_am_result=GNU
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
# Now try BSD make style include.
|
# Now try BSD make style include.
|
||||||
if test "$am__include" = "#"; then
|
if test "$am__include" = "#"; then
|
||||||
echo '.include "confinc"' > confmf
|
echo '.include "confinc"' > confmf
|
||||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
case `$am_make -s -f confmf 2> /dev/null` in #(
|
||||||
|
*the\ am__doit\ target*)
|
||||||
am__include=.include
|
am__include=.include
|
||||||
am__quote="\""
|
am__quote="\""
|
||||||
_am_result=BSD
|
_am_result=BSD
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
AC_SUBST([am__include])
|
AC_SUBST([am__include])
|
||||||
AC_SUBST([am__quote])
|
AC_SUBST([am__quote])
|
||||||
@@ -577,14 +639,14 @@ AC_MSG_RESULT([$_am_result])
|
|||||||
rm -f confinc confmf
|
rm -f confinc confmf
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
|
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
# serial 5
|
# serial 6
|
||||||
|
|
||||||
# AM_PROG_CC_C_O
|
# AM_PROG_CC_C_O
|
||||||
# --------------
|
# --------------
|
||||||
@@ -596,8 +658,9 @@ AC_REQUIRE_AUX_FILE([compile])dnl
|
|||||||
# FIXME: we rely on the cache variable name because
|
# FIXME: we rely on the cache variable name because
|
||||||
# there is no other way.
|
# there is no other way.
|
||||||
set dummy $CC
|
set dummy $CC
|
||||||
ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
|
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
|
||||||
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
|
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
|
||||||
|
if test "$am_t" != yes; then
|
||||||
# Losing compiler, so override with the script.
|
# Losing compiler, so override with the script.
|
||||||
# FIXME: It is wrong to rewrite CC.
|
# FIXME: It is wrong to rewrite CC.
|
||||||
# But if we don't then we get into trouble of one sort or another.
|
# But if we don't then we get into trouble of one sort or another.
|
||||||
@@ -613,14 +676,14 @@ m4_define([AC_PROG_CC],
|
|||||||
|
|
||||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
|
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
# serial 5
|
# serial 6
|
||||||
|
|
||||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
@@ -637,7 +700,14 @@ AC_SUBST($1)])
|
|||||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
if test x"${MISSING+set}" != xset; then
|
||||||
|
case $am_aux_dir in
|
||||||
|
*\ * | *\ *)
|
||||||
|
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
||||||
|
*)
|
||||||
|
MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
# Use eval to expand $SHELL
|
# Use eval to expand $SHELL
|
||||||
if eval "$MISSING --run true"; then
|
if eval "$MISSING --run true"; then
|
||||||
am_missing_run="$MISSING --run "
|
am_missing_run="$MISSING --run "
|
||||||
@@ -675,13 +745,13 @@ esac
|
|||||||
|
|
||||||
# Helper functions for option handling. -*- Autoconf -*-
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
# serial 3
|
# serial 4
|
||||||
|
|
||||||
# _AM_MANGLE_OPTION(NAME)
|
# _AM_MANGLE_OPTION(NAME)
|
||||||
# -----------------------
|
# -----------------------
|
||||||
@@ -698,7 +768,7 @@ AC_DEFUN([_AM_SET_OPTION],
|
|||||||
# ----------------------------------
|
# ----------------------------------
|
||||||
# OPTIONS is a space-separated list of Automake options.
|
# OPTIONS is a space-separated list of Automake options.
|
||||||
AC_DEFUN([_AM_SET_OPTIONS],
|
AC_DEFUN([_AM_SET_OPTIONS],
|
||||||
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||||
|
|
||||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||||
# -------------------------------------------
|
# -------------------------------------------
|
||||||
@@ -734,14 +804,14 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
|
|||||||
|
|
||||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
# serial 4
|
# serial 5
|
||||||
|
|
||||||
# AM_SANITY_CHECK
|
# AM_SANITY_CHECK
|
||||||
# ---------------
|
# ---------------
|
||||||
@@ -750,16 +820,29 @@ AC_DEFUN([AM_SANITY_CHECK],
|
|||||||
# Just in case
|
# Just in case
|
||||||
sleep 1
|
sleep 1
|
||||||
echo timestamp > conftest.file
|
echo timestamp > conftest.file
|
||||||
|
# Reject unsafe characters in $srcdir or the absolute working directory
|
||||||
|
# name. Accept space and tab only in the latter.
|
||||||
|
am_lf='
|
||||||
|
'
|
||||||
|
case `pwd` in
|
||||||
|
*[[\\\"\#\$\&\'\`$am_lf]]*)
|
||||||
|
AC_MSG_ERROR([unsafe absolute working directory name]);;
|
||||||
|
esac
|
||||||
|
case $srcdir in
|
||||||
|
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
|
||||||
|
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
|
||||||
|
esac
|
||||||
|
|
||||||
# Do `set' in a subshell so we don't clobber the current shell's
|
# Do `set' in a subshell so we don't clobber the current shell's
|
||||||
# arguments. Must try -L first in case configure is actually a
|
# arguments. Must try -L first in case configure is actually a
|
||||||
# symlink; some systems play weird games with the mod time of symlinks
|
# symlink; some systems play weird games with the mod time of symlinks
|
||||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||||
# directory).
|
# directory).
|
||||||
if (
|
if (
|
||||||
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
|
||||||
if test "$[*]" = "X"; then
|
if test "$[*]" = "X"; then
|
||||||
# -L didn't work.
|
# -L didn't work.
|
||||||
set X `ls -t $srcdir/configure conftest.file`
|
set X `ls -t "$srcdir/configure" conftest.file`
|
||||||
fi
|
fi
|
||||||
rm -f conftest.file
|
rm -f conftest.file
|
||||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||||
@@ -784,6 +867,33 @@ Check your system clock])
|
|||||||
fi
|
fi
|
||||||
AC_MSG_RESULT(yes)])
|
AC_MSG_RESULT(yes)])
|
||||||
|
|
||||||
|
# Copyright (C) 2009 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 1
|
||||||
|
|
||||||
|
# AM_SILENT_RULES([DEFAULT])
|
||||||
|
# --------------------------
|
||||||
|
# Enable less verbose build rules; with the default set to DEFAULT
|
||||||
|
# (`yes' being less verbose, `no' or empty being verbose).
|
||||||
|
AC_DEFUN([AM_SILENT_RULES],
|
||||||
|
[AC_ARG_ENABLE([silent-rules],
|
||||||
|
[ --enable-silent-rules less verbose build output (undo: `make V=1')
|
||||||
|
--disable-silent-rules verbose build output (undo: `make V=0')])
|
||||||
|
case $enable_silent_rules in
|
||||||
|
yes) AM_DEFAULT_VERBOSITY=0;;
|
||||||
|
no) AM_DEFAULT_VERBOSITY=1;;
|
||||||
|
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
|
||||||
|
esac
|
||||||
|
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
|
||||||
|
AM_BACKSLASH='\'
|
||||||
|
AC_SUBST([AM_BACKSLASH])dnl
|
||||||
|
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||||
|
])
|
||||||
|
|
||||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
@@ -812,18 +922,25 @@ fi
|
|||||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||||
|
|
||||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 2
|
||||||
|
|
||||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
|
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||||
# This macro is traced by Automake.
|
# This macro is traced by Automake.
|
||||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||||
|
|
||||||
|
# AM_SUBST_NOTMAKE(VARIABLE)
|
||||||
|
# ---------------------------
|
||||||
|
# Public sister of _AM_SUBST_NOTMAKE.
|
||||||
|
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||||
|
|
||||||
# Check how to create a tarball. -*- Autoconf -*-
|
# Check how to create a tarball. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||||
@@ -920,10 +1037,9 @@ AC_SUBST([am__tar])
|
|||||||
AC_SUBST([am__untar])
|
AC_SUBST([am__untar])
|
||||||
]) # _AM_PROG_TAR
|
]) # _AM_PROG_TAR
|
||||||
|
|
||||||
m4_include([m4/absolute-header.m4])
|
m4_include([m4/00gnulib.m4])
|
||||||
m4_include([m4/acl.m4])
|
m4_include([m4/acl.m4])
|
||||||
m4_include([m4/alloca.m4])
|
m4_include([m4/alloca.m4])
|
||||||
m4_include([m4/allocsa.m4])
|
|
||||||
m4_include([m4/argmatch.m4])
|
m4_include([m4/argmatch.m4])
|
||||||
m4_include([m4/arpa_inet_h.m4])
|
m4_include([m4/arpa_inet_h.m4])
|
||||||
m4_include([m4/assert.m4])
|
m4_include([m4/assert.m4])
|
||||||
@@ -933,6 +1049,7 @@ m4_include([m4/backupfile.m4])
|
|||||||
m4_include([m4/base64.m4])
|
m4_include([m4/base64.m4])
|
||||||
m4_include([m4/bison.m4])
|
m4_include([m4/bison.m4])
|
||||||
m4_include([m4/boottime.m4])
|
m4_include([m4/boottime.m4])
|
||||||
|
m4_include([m4/btowc.m4])
|
||||||
m4_include([m4/c-strtod.m4])
|
m4_include([m4/c-strtod.m4])
|
||||||
m4_include([m4/calloc.m4])
|
m4_include([m4/calloc.m4])
|
||||||
m4_include([m4/canon-host.m4])
|
m4_include([m4/canon-host.m4])
|
||||||
@@ -943,40 +1060,56 @@ m4_include([m4/chown.m4])
|
|||||||
m4_include([m4/clock_time.m4])
|
m4_include([m4/clock_time.m4])
|
||||||
m4_include([m4/cloexec.m4])
|
m4_include([m4/cloexec.m4])
|
||||||
m4_include([m4/close-stream.m4])
|
m4_include([m4/close-stream.m4])
|
||||||
|
m4_include([m4/close.m4])
|
||||||
|
m4_include([m4/closein.m4])
|
||||||
m4_include([m4/closeout.m4])
|
m4_include([m4/closeout.m4])
|
||||||
m4_include([m4/codeset.m4])
|
m4_include([m4/codeset.m4])
|
||||||
m4_include([m4/config-h.m4])
|
m4_include([m4/config-h.m4])
|
||||||
m4_include([m4/cycle-check.m4])
|
m4_include([m4/cycle-check.m4])
|
||||||
m4_include([m4/d-ino.m4])
|
m4_include([m4/d-ino.m4])
|
||||||
m4_include([m4/d-type.m4])
|
m4_include([m4/d-type.m4])
|
||||||
|
m4_include([m4/dirent_h.m4])
|
||||||
m4_include([m4/dirfd.m4])
|
m4_include([m4/dirfd.m4])
|
||||||
m4_include([m4/dirname.m4])
|
m4_include([m4/dirname.m4])
|
||||||
m4_include([m4/dos.m4])
|
m4_include([m4/dos.m4])
|
||||||
m4_include([m4/double-slash-root.m4])
|
m4_include([m4/double-slash-root.m4])
|
||||||
m4_include([m4/dup2.m4])
|
m4_include([m4/dup2.m4])
|
||||||
m4_include([m4/eealloc.m4])
|
m4_include([m4/eealloc.m4])
|
||||||
m4_include([m4/eoverflow.m4])
|
m4_include([m4/environ.m4])
|
||||||
|
m4_include([m4/errno_h.m4])
|
||||||
m4_include([m4/error.m4])
|
m4_include([m4/error.m4])
|
||||||
m4_include([m4/euidaccess-stat.m4])
|
m4_include([m4/euidaccess-stat.m4])
|
||||||
m4_include([m4/euidaccess.m4])
|
m4_include([m4/euidaccess.m4])
|
||||||
m4_include([m4/exclude.m4])
|
m4_include([m4/exclude.m4])
|
||||||
m4_include([m4/exitfail.m4])
|
m4_include([m4/exitfail.m4])
|
||||||
|
m4_include([m4/exponentd.m4])
|
||||||
|
m4_include([m4/exponentf.m4])
|
||||||
|
m4_include([m4/exponentl.m4])
|
||||||
m4_include([m4/extensions.m4])
|
m4_include([m4/extensions.m4])
|
||||||
m4_include([m4/fchdir.m4])
|
m4_include([m4/fchdir.m4])
|
||||||
|
m4_include([m4/fclose.m4])
|
||||||
m4_include([m4/fcntl-safer.m4])
|
m4_include([m4/fcntl-safer.m4])
|
||||||
m4_include([m4/fcntl_h.m4])
|
m4_include([m4/fcntl_h.m4])
|
||||||
m4_include([m4/fd-reopen.m4])
|
m4_include([m4/fd-reopen.m4])
|
||||||
|
m4_include([m4/fflush.m4])
|
||||||
m4_include([m4/file-type.m4])
|
m4_include([m4/file-type.m4])
|
||||||
m4_include([m4/fileblocks.m4])
|
m4_include([m4/fileblocks.m4])
|
||||||
m4_include([m4/filemode.m4])
|
m4_include([m4/filemode.m4])
|
||||||
m4_include([m4/filenamecat.m4])
|
m4_include([m4/filenamecat.m4])
|
||||||
m4_include([m4/flexmember.m4])
|
m4_include([m4/flexmember.m4])
|
||||||
|
m4_include([m4/float_h.m4])
|
||||||
m4_include([m4/fnmatch.m4])
|
m4_include([m4/fnmatch.m4])
|
||||||
m4_include([m4/fpending.m4])
|
m4_include([m4/fpending.m4])
|
||||||
|
m4_include([m4/fpieee.m4])
|
||||||
m4_include([m4/fprintftime.m4])
|
m4_include([m4/fprintftime.m4])
|
||||||
m4_include([m4/free.m4])
|
m4_include([m4/fpurge.m4])
|
||||||
|
m4_include([m4/freading.m4])
|
||||||
|
m4_include([m4/frexp.m4])
|
||||||
|
m4_include([m4/frexpl.m4])
|
||||||
|
m4_include([m4/fseeko.m4])
|
||||||
m4_include([m4/fstypename.m4])
|
m4_include([m4/fstypename.m4])
|
||||||
m4_include([m4/fsusage.m4])
|
m4_include([m4/fsusage.m4])
|
||||||
|
m4_include([m4/ftello.m4])
|
||||||
m4_include([m4/ftruncate.m4])
|
m4_include([m4/ftruncate.m4])
|
||||||
m4_include([m4/fts.m4])
|
m4_include([m4/fts.m4])
|
||||||
m4_include([m4/getaddrinfo.m4])
|
m4_include([m4/getaddrinfo.m4])
|
||||||
@@ -1000,29 +1133,42 @@ m4_include([m4/gettimeofday.m4])
|
|||||||
m4_include([m4/getugroups.m4])
|
m4_include([m4/getugroups.m4])
|
||||||
m4_include([m4/getusershell.m4])
|
m4_include([m4/getusershell.m4])
|
||||||
m4_include([m4/glibc21.m4])
|
m4_include([m4/glibc21.m4])
|
||||||
|
m4_include([m4/gmp.m4])
|
||||||
|
m4_include([m4/gnu-make.m4])
|
||||||
m4_include([m4/gnulib-common.m4])
|
m4_include([m4/gnulib-common.m4])
|
||||||
m4_include([m4/gnulib-comp.m4])
|
m4_include([m4/gnulib-comp.m4])
|
||||||
m4_include([m4/group-member.m4])
|
m4_include([m4/group-member.m4])
|
||||||
m4_include([m4/hard-locale.m4])
|
m4_include([m4/hard-locale.m4])
|
||||||
m4_include([m4/hash.m4])
|
m4_include([m4/hash.m4])
|
||||||
m4_include([m4/host-os.m4])
|
m4_include([m4/host-os.m4])
|
||||||
|
m4_include([m4/hostent.m4])
|
||||||
m4_include([m4/human.m4])
|
m4_include([m4/human.m4])
|
||||||
m4_include([m4/i-ring.m4])
|
m4_include([m4/i-ring.m4])
|
||||||
m4_include([m4/iconv.m4])
|
m4_include([m4/iconv.m4])
|
||||||
|
m4_include([m4/iconv_h.m4])
|
||||||
|
m4_include([m4/iconv_open.m4])
|
||||||
m4_include([m4/idcache.m4])
|
m4_include([m4/idcache.m4])
|
||||||
|
m4_include([m4/include-exclude-prog.m4])
|
||||||
|
m4_include([m4/include_next.m4])
|
||||||
m4_include([m4/inet_ntop.m4])
|
m4_include([m4/inet_ntop.m4])
|
||||||
|
m4_include([m4/inet_pton.m4])
|
||||||
m4_include([m4/inline.m4])
|
m4_include([m4/inline.m4])
|
||||||
|
m4_include([m4/intlmacosx.m4])
|
||||||
m4_include([m4/intmax_t.m4])
|
m4_include([m4/intmax_t.m4])
|
||||||
m4_include([m4/inttostr.m4])
|
m4_include([m4/inttostr.m4])
|
||||||
m4_include([m4/inttypes-pri.m4])
|
m4_include([m4/inttypes-pri.m4])
|
||||||
m4_include([m4/inttypes.m4])
|
m4_include([m4/inttypes.m4])
|
||||||
m4_include([m4/inttypes_h.m4])
|
m4_include([m4/inttypes_h.m4])
|
||||||
m4_include([m4/isapipe.m4])
|
m4_include([m4/isapipe.m4])
|
||||||
|
m4_include([m4/isnand.m4])
|
||||||
|
m4_include([m4/isnanf.m4])
|
||||||
|
m4_include([m4/isnanl.m4])
|
||||||
m4_include([m4/jm-macros.m4])
|
m4_include([m4/jm-macros.m4])
|
||||||
m4_include([m4/jm-winsz1.m4])
|
m4_include([m4/jm-winsz1.m4])
|
||||||
m4_include([m4/jm-winsz2.m4])
|
m4_include([m4/jm-winsz2.m4])
|
||||||
m4_include([m4/lchmod.m4])
|
m4_include([m4/lchmod.m4])
|
||||||
m4_include([m4/lchown.m4])
|
m4_include([m4/lchown.m4])
|
||||||
|
m4_include([m4/ldexpl.m4])
|
||||||
m4_include([m4/lib-check.m4])
|
m4_include([m4/lib-check.m4])
|
||||||
m4_include([m4/lib-ignore.m4])
|
m4_include([m4/lib-ignore.m4])
|
||||||
m4_include([m4/lib-ld.m4])
|
m4_include([m4/lib-ld.m4])
|
||||||
@@ -1030,15 +1176,25 @@ m4_include([m4/lib-link.m4])
|
|||||||
m4_include([m4/lib-prefix.m4])
|
m4_include([m4/lib-prefix.m4])
|
||||||
m4_include([m4/link-follow.m4])
|
m4_include([m4/link-follow.m4])
|
||||||
m4_include([m4/localcharset.m4])
|
m4_include([m4/localcharset.m4])
|
||||||
|
m4_include([m4/locale-fr.m4])
|
||||||
|
m4_include([m4/locale-ja.m4])
|
||||||
|
m4_include([m4/locale-tr.m4])
|
||||||
|
m4_include([m4/locale-zh.m4])
|
||||||
m4_include([m4/long-options.m4])
|
m4_include([m4/long-options.m4])
|
||||||
m4_include([m4/longdouble.m4])
|
|
||||||
m4_include([m4/longlong.m4])
|
m4_include([m4/longlong.m4])
|
||||||
m4_include([m4/ls-mntd-fs.m4])
|
m4_include([m4/ls-mntd-fs.m4])
|
||||||
|
m4_include([m4/lseek.m4])
|
||||||
m4_include([m4/lstat.m4])
|
m4_include([m4/lstat.m4])
|
||||||
|
m4_include([m4/malloc.m4])
|
||||||
|
m4_include([m4/malloca.m4])
|
||||||
|
m4_include([m4/manywarnings.m4])
|
||||||
|
m4_include([m4/math_h.m4])
|
||||||
m4_include([m4/mbchar.m4])
|
m4_include([m4/mbchar.m4])
|
||||||
m4_include([m4/mbiter.m4])
|
m4_include([m4/mbiter.m4])
|
||||||
|
m4_include([m4/mbrlen.m4])
|
||||||
m4_include([m4/mbrtowc.m4])
|
m4_include([m4/mbrtowc.m4])
|
||||||
m4_include([m4/mbscasecmp.m4])
|
m4_include([m4/mbsinit.m4])
|
||||||
|
m4_include([m4/mbsrtowcs.m4])
|
||||||
m4_include([m4/mbstate_t.m4])
|
m4_include([m4/mbstate_t.m4])
|
||||||
m4_include([m4/mbswidth.m4])
|
m4_include([m4/mbswidth.m4])
|
||||||
m4_include([m4/md5.m4])
|
m4_include([m4/md5.m4])
|
||||||
@@ -1052,6 +1208,7 @@ m4_include([m4/mempcpy.m4])
|
|||||||
m4_include([m4/memrchr.m4])
|
m4_include([m4/memrchr.m4])
|
||||||
m4_include([m4/memset.m4])
|
m4_include([m4/memset.m4])
|
||||||
m4_include([m4/memxfrm.m4])
|
m4_include([m4/memxfrm.m4])
|
||||||
|
m4_include([m4/mgetgroups.m4])
|
||||||
m4_include([m4/mkancesdirs.m4])
|
m4_include([m4/mkancesdirs.m4])
|
||||||
m4_include([m4/mkdir-p.m4])
|
m4_include([m4/mkdir-p.m4])
|
||||||
m4_include([m4/mkdir-slash.m4])
|
m4_include([m4/mkdir-slash.m4])
|
||||||
@@ -1060,27 +1217,36 @@ m4_include([m4/mktime.m4])
|
|||||||
m4_include([m4/modechange.m4])
|
m4_include([m4/modechange.m4])
|
||||||
m4_include([m4/mountlist.m4])
|
m4_include([m4/mountlist.m4])
|
||||||
m4_include([m4/mpsort.m4])
|
m4_include([m4/mpsort.m4])
|
||||||
|
m4_include([m4/multiarch.m4])
|
||||||
m4_include([m4/nanosleep.m4])
|
m4_include([m4/nanosleep.m4])
|
||||||
|
m4_include([m4/netdb_h.m4])
|
||||||
m4_include([m4/netinet_in_h.m4])
|
m4_include([m4/netinet_in_h.m4])
|
||||||
m4_include([m4/nls.m4])
|
m4_include([m4/nls.m4])
|
||||||
|
m4_include([m4/nocrash.m4])
|
||||||
|
m4_include([m4/open.m4])
|
||||||
m4_include([m4/openat.m4])
|
m4_include([m4/openat.m4])
|
||||||
m4_include([m4/pathmax.m4])
|
m4_include([m4/pathmax.m4])
|
||||||
m4_include([m4/perl.m4])
|
m4_include([m4/perl.m4])
|
||||||
|
m4_include([m4/perror.m4])
|
||||||
m4_include([m4/physmem.m4])
|
m4_include([m4/physmem.m4])
|
||||||
m4_include([m4/po.m4])
|
m4_include([m4/po.m4])
|
||||||
|
m4_include([m4/posix-shell.m4])
|
||||||
m4_include([m4/posixtm.m4])
|
m4_include([m4/posixtm.m4])
|
||||||
m4_include([m4/posixver.m4])
|
m4_include([m4/posixver.m4])
|
||||||
m4_include([m4/prereq.m4])
|
m4_include([m4/prereq.m4])
|
||||||
|
m4_include([m4/printf-frexp.m4])
|
||||||
|
m4_include([m4/printf-frexpl.m4])
|
||||||
|
m4_include([m4/printf.m4])
|
||||||
|
m4_include([m4/priv-set.m4])
|
||||||
m4_include([m4/progtest.m4])
|
m4_include([m4/progtest.m4])
|
||||||
m4_include([m4/putenv.m4])
|
m4_include([m4/putenv.m4])
|
||||||
m4_include([m4/quote.m4])
|
m4_include([m4/quote.m4])
|
||||||
m4_include([m4/quotearg.m4])
|
m4_include([m4/quotearg.m4])
|
||||||
m4_include([m4/randint.m4])
|
m4_include([m4/read-file.m4])
|
||||||
m4_include([m4/randperm.m4])
|
|
||||||
m4_include([m4/randread.m4])
|
|
||||||
m4_include([m4/readlink.m4])
|
m4_include([m4/readlink.m4])
|
||||||
m4_include([m4/readtokens.m4])
|
m4_include([m4/readtokens.m4])
|
||||||
m4_include([m4/readutmp.m4])
|
m4_include([m4/readutmp.m4])
|
||||||
|
m4_include([m4/realloc.m4])
|
||||||
m4_include([m4/regex.m4])
|
m4_include([m4/regex.m4])
|
||||||
m4_include([m4/rename-dest-slash.m4])
|
m4_include([m4/rename-dest-slash.m4])
|
||||||
m4_include([m4/rename.m4])
|
m4_include([m4/rename.m4])
|
||||||
@@ -1094,13 +1260,24 @@ m4_include([m4/same.m4])
|
|||||||
m4_include([m4/save-cwd.m4])
|
m4_include([m4/save-cwd.m4])
|
||||||
m4_include([m4/savedir.m4])
|
m4_include([m4/savedir.m4])
|
||||||
m4_include([m4/savewd.m4])
|
m4_include([m4/savewd.m4])
|
||||||
|
m4_include([m4/select.m4])
|
||||||
|
m4_include([m4/selinux-context-h.m4])
|
||||||
|
m4_include([m4/selinux-selinux-h.m4])
|
||||||
|
m4_include([m4/servent.m4])
|
||||||
m4_include([m4/setenv.m4])
|
m4_include([m4/setenv.m4])
|
||||||
m4_include([m4/settime.m4])
|
m4_include([m4/settime.m4])
|
||||||
m4_include([m4/sha1.m4])
|
m4_include([m4/sha1.m4])
|
||||||
m4_include([m4/sha256.m4])
|
m4_include([m4/sha256.m4])
|
||||||
m4_include([m4/sha512.m4])
|
m4_include([m4/sha512.m4])
|
||||||
m4_include([m4/sig2str.m4])
|
m4_include([m4/sig2str.m4])
|
||||||
|
m4_include([m4/sigaction.m4])
|
||||||
|
m4_include([m4/signal_h.m4])
|
||||||
|
m4_include([m4/signalblocking.m4])
|
||||||
|
m4_include([m4/signbit.m4])
|
||||||
|
m4_include([m4/size_max.m4])
|
||||||
|
m4_include([m4/sleep.m4])
|
||||||
m4_include([m4/snprintf.m4])
|
m4_include([m4/snprintf.m4])
|
||||||
|
m4_include([m4/sockets.m4])
|
||||||
m4_include([m4/socklen.m4])
|
m4_include([m4/socklen.m4])
|
||||||
m4_include([m4/sockpfaf.m4])
|
m4_include([m4/sockpfaf.m4])
|
||||||
m4_include([m4/ssize_t.m4])
|
m4_include([m4/ssize_t.m4])
|
||||||
@@ -1116,8 +1293,10 @@ m4_include([m4/stdio_h.m4])
|
|||||||
m4_include([m4/stdlib-safer.m4])
|
m4_include([m4/stdlib-safer.m4])
|
||||||
m4_include([m4/stdlib_h.m4])
|
m4_include([m4/stdlib_h.m4])
|
||||||
m4_include([m4/stpcpy.m4])
|
m4_include([m4/stpcpy.m4])
|
||||||
|
m4_include([m4/stpncpy.m4])
|
||||||
m4_include([m4/strcspn.m4])
|
m4_include([m4/strcspn.m4])
|
||||||
m4_include([m4/strdup.m4])
|
m4_include([m4/strdup.m4])
|
||||||
|
m4_include([m4/strerror.m4])
|
||||||
m4_include([m4/strftime.m4])
|
m4_include([m4/strftime.m4])
|
||||||
m4_include([m4/string_h.m4])
|
m4_include([m4/string_h.m4])
|
||||||
m4_include([m4/strndup.m4])
|
m4_include([m4/strndup.m4])
|
||||||
@@ -1132,6 +1311,8 @@ m4_include([m4/strtoul.m4])
|
|||||||
m4_include([m4/strtoull.m4])
|
m4_include([m4/strtoull.m4])
|
||||||
m4_include([m4/strtoumax.m4])
|
m4_include([m4/strtoumax.m4])
|
||||||
m4_include([m4/strverscmp.m4])
|
m4_include([m4/strverscmp.m4])
|
||||||
|
m4_include([m4/sys_ioctl_h.m4])
|
||||||
|
m4_include([m4/sys_select_h.m4])
|
||||||
m4_include([m4/sys_socket_h.m4])
|
m4_include([m4/sys_socket_h.m4])
|
||||||
m4_include([m4/sys_stat_h.m4])
|
m4_include([m4/sys_stat_h.m4])
|
||||||
m4_include([m4/sys_time_h.m4])
|
m4_include([m4/sys_time_h.m4])
|
||||||
@@ -1141,6 +1322,7 @@ m4_include([m4/time_r.m4])
|
|||||||
m4_include([m4/timespec.m4])
|
m4_include([m4/timespec.m4])
|
||||||
m4_include([m4/tm_gmtoff.m4])
|
m4_include([m4/tm_gmtoff.m4])
|
||||||
m4_include([m4/tzset.m4])
|
m4_include([m4/tzset.m4])
|
||||||
|
m4_include([m4/ungetc.m4])
|
||||||
m4_include([m4/unicodeio.m4])
|
m4_include([m4/unicodeio.m4])
|
||||||
m4_include([m4/unistd-safer.m4])
|
m4_include([m4/unistd-safer.m4])
|
||||||
m4_include([m4/unistd_h.m4])
|
m4_include([m4/unistd_h.m4])
|
||||||
@@ -1150,23 +1332,32 @@ m4_include([m4/unlocked-io.m4])
|
|||||||
m4_include([m4/uptime.m4])
|
m4_include([m4/uptime.m4])
|
||||||
m4_include([m4/userspec.m4])
|
m4_include([m4/userspec.m4])
|
||||||
m4_include([m4/utimbuf.m4])
|
m4_include([m4/utimbuf.m4])
|
||||||
m4_include([m4/utime.m4])
|
|
||||||
m4_include([m4/utimecmp.m4])
|
m4_include([m4/utimecmp.m4])
|
||||||
m4_include([m4/utimens.m4])
|
m4_include([m4/utimens.m4])
|
||||||
m4_include([m4/utimes-null.m4])
|
|
||||||
m4_include([m4/utimes.m4])
|
m4_include([m4/utimes.m4])
|
||||||
m4_include([m4/vasnprintf.m4])
|
m4_include([m4/vasnprintf.m4])
|
||||||
|
m4_include([m4/vasprintf-posix.m4])
|
||||||
m4_include([m4/vasprintf.m4])
|
m4_include([m4/vasprintf.m4])
|
||||||
|
m4_include([m4/vfprintf-posix.m4])
|
||||||
|
m4_include([m4/vprintf-posix.m4])
|
||||||
|
m4_include([m4/warnings.m4])
|
||||||
m4_include([m4/wchar.m4])
|
m4_include([m4/wchar.m4])
|
||||||
m4_include([m4/wchar_t.m4])
|
m4_include([m4/wchar_t.m4])
|
||||||
|
m4_include([m4/wcrtomb.m4])
|
||||||
|
m4_include([m4/wctob.m4])
|
||||||
m4_include([m4/wctype.m4])
|
m4_include([m4/wctype.m4])
|
||||||
m4_include([m4/wcwidth.m4])
|
m4_include([m4/wcwidth.m4])
|
||||||
m4_include([m4/wint_t.m4])
|
m4_include([m4/wint_t.m4])
|
||||||
|
m4_include([m4/write-any-file.m4])
|
||||||
|
m4_include([m4/write.m4])
|
||||||
m4_include([m4/xalloc.m4])
|
m4_include([m4/xalloc.m4])
|
||||||
|
m4_include([m4/xattr.m4])
|
||||||
m4_include([m4/xfts.m4])
|
m4_include([m4/xfts.m4])
|
||||||
m4_include([m4/xgetcwd.m4])
|
m4_include([m4/xgetcwd.m4])
|
||||||
m4_include([m4/xnanosleep.m4])
|
m4_include([m4/xnanosleep.m4])
|
||||||
|
m4_include([m4/xsize.m4])
|
||||||
m4_include([m4/xstrndup.m4])
|
m4_include([m4/xstrndup.m4])
|
||||||
m4_include([m4/xstrtod.m4])
|
m4_include([m4/xstrtod.m4])
|
||||||
m4_include([m4/xstrtol.m4])
|
m4_include([m4/xstrtol.m4])
|
||||||
|
m4_include([m4/xvasprintf.m4])
|
||||||
m4_include([m4/yesno.m4])
|
m4_include([m4/yesno.m4])
|
||||||
|
|||||||
+334
-119
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
# Bootstrap this package from checked-out sources.
|
# Bootstrap this package from checked-out sources.
|
||||||
|
|
||||||
# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
# Copyright (C) 2003-2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# any later version.
|
# (at your option) any later version.
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -15,9 +15,7 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
# 02110-1301, USA.
|
|
||||||
|
|
||||||
# Written by Paul Eggert.
|
# Written by Paul Eggert.
|
||||||
|
|
||||||
@@ -25,10 +23,11 @@ nl='
|
|||||||
'
|
'
|
||||||
|
|
||||||
# Ensure file names are sorted consistently across platforms.
|
# Ensure file names are sorted consistently across platforms.
|
||||||
# Also, ensure diagnostics are in English, e.g., "wget --help" below.
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
local_gl_dir=gl
|
||||||
|
|
||||||
# Temporary directory names.
|
# Temporary directory names.
|
||||||
bt='._bootmp'
|
bt='._bootmp'
|
||||||
bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
|
bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
|
||||||
@@ -49,34 +48,42 @@ Options:
|
|||||||
--force Attempt to bootstrap even if the sources seem
|
--force Attempt to bootstrap even if the sources seem
|
||||||
not to have been checked out.
|
not to have been checked out.
|
||||||
--skip-po Do not download po files.
|
--skip-po Do not download po files.
|
||||||
--cvs-user=USERNAME Set the username to use when checking out
|
|
||||||
sources from the gnulib repository.
|
|
||||||
|
|
||||||
If the file .bootstrap.conf exists in the current working directory, its
|
If the file $0.conf exists in the same directory as this script, its
|
||||||
contents are read as shell variables to configure the bootstrap.
|
contents are read as shell variables to configure the bootstrap.
|
||||||
|
|
||||||
|
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||||
|
are honored.
|
||||||
|
|
||||||
Running without arguments will suffice in most cases.
|
Running without arguments will suffice in most cases.
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configuration.
|
# Configuration.
|
||||||
|
|
||||||
|
# Name of the Makefile.am
|
||||||
|
gnulib_mk=gnulib.mk
|
||||||
|
|
||||||
# List of gnulib modules needed.
|
# List of gnulib modules needed.
|
||||||
gnulib_modules=
|
gnulib_modules=
|
||||||
|
|
||||||
# Any gnulib files needed that are not in modules.
|
# Any gnulib files needed that are not in modules.
|
||||||
gnulib_files=
|
gnulib_files=
|
||||||
|
|
||||||
# Translation Project URL, for the registry of all projects
|
# The command to download all .po files for a specified domain into
|
||||||
# and for the translation-team master directory.
|
# a specified directory. Fill in the first %s is the domain name, and
|
||||||
TP_URL='http://www.iro.umontreal.ca/translation/registry.cgi?domain='
|
# the second with the destination directory. Use rsync's -L and -r
|
||||||
TP_PO_URL='http://www.iro.umontreal.ca/translation/teams/PO/'
|
# options because the latest/%s directory and the .po files within are
|
||||||
|
# all symlinks.
|
||||||
|
po_download_command_format=\
|
||||||
|
"rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'"
|
||||||
|
|
||||||
extract_package_name='
|
extract_package_name='
|
||||||
/^AC_INIT(/{
|
/^AC_INIT(/{
|
||||||
/.*,.*,.*,/{
|
/.*,.*,.*, */{
|
||||||
s///
|
s///
|
||||||
s/[][]//g
|
s/[][]//g
|
||||||
|
s/)$//
|
||||||
p
|
p
|
||||||
q
|
q
|
||||||
}
|
}
|
||||||
@@ -92,6 +99,11 @@ package=`sed -n "$extract_package_name" configure.ac` || exit
|
|||||||
gnulib_name=lib$package
|
gnulib_name=lib$package
|
||||||
|
|
||||||
build_aux=build-aux
|
build_aux=build-aux
|
||||||
|
source_base=lib
|
||||||
|
m4_base=m4
|
||||||
|
doc_base=doc
|
||||||
|
tests_base=tests
|
||||||
|
|
||||||
# Extra files from gnulib, which override files from other sources.
|
# Extra files from gnulib, which override files from other sources.
|
||||||
gnulib_extra_files="
|
gnulib_extra_files="
|
||||||
$build_aux/install-sh
|
$build_aux/install-sh
|
||||||
@@ -104,6 +116,9 @@ gnulib_extra_files="
|
|||||||
doc/INSTALL
|
doc/INSTALL
|
||||||
"
|
"
|
||||||
|
|
||||||
|
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
||||||
|
gnulib_tool_option_extras=
|
||||||
|
|
||||||
# Other locale categories that need message catalogs.
|
# Other locale categories that need message catalogs.
|
||||||
EXTRA_LOCALE_CATEGORIES=
|
EXTRA_LOCALE_CATEGORIES=
|
||||||
|
|
||||||
@@ -114,6 +129,9 @@ XGETTEXT_OPTIONS='\\\
|
|||||||
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
|
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
|
||||||
'
|
'
|
||||||
|
|
||||||
|
# Package bug report address for gettext files
|
||||||
|
[email protected]
|
||||||
|
|
||||||
# Files we don't want to import.
|
# Files we don't want to import.
|
||||||
excluded_files=
|
excluded_files=
|
||||||
|
|
||||||
@@ -124,8 +142,26 @@ checkout_only_file=README-hacking
|
|||||||
# Whether to use copies instead of symlinks.
|
# Whether to use copies instead of symlinks.
|
||||||
copy=false
|
copy=false
|
||||||
|
|
||||||
|
# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want
|
||||||
|
# those files to be generated in directories like lib/, m4/, and po/.
|
||||||
|
# Or set it to 'auto' to make this script select which to use based
|
||||||
|
# on which version control system (if any) is used in the source directory.
|
||||||
|
vc_ignore=auto
|
||||||
|
|
||||||
# Override the default configuration, if necessary.
|
# Override the default configuration, if necessary.
|
||||||
test -r bootstrap.conf && . ./bootstrap.conf
|
# Make sure that bootstrap.conf is sourced from the current directory
|
||||||
|
# if we were invoked as "sh bootstrap".
|
||||||
|
case "$0" in
|
||||||
|
*/*) test -r "$0.conf" && . "$0.conf" ;;
|
||||||
|
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
if test "$vc_ignore" = auto; then
|
||||||
|
vc_ignore=
|
||||||
|
test -d .git && vc_ignore=.gitignore
|
||||||
|
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
|
||||||
|
fi
|
||||||
|
|
||||||
# Translate configuration into internal form.
|
# Translate configuration into internal form.
|
||||||
|
|
||||||
@@ -138,9 +174,7 @@ do
|
|||||||
usage
|
usage
|
||||||
exit;;
|
exit;;
|
||||||
--gnulib-srcdir=*)
|
--gnulib-srcdir=*)
|
||||||
GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
|
GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
|
||||||
--cvs-user=*)
|
|
||||||
CVS_USER=`expr "$option" : '--cvs-user=\(.*\)'`;;
|
|
||||||
--skip-po)
|
--skip-po)
|
||||||
SKIP_PO=t;;
|
SKIP_PO=t;;
|
||||||
--force)
|
--force)
|
||||||
@@ -163,7 +197,8 @@ fi
|
|||||||
insert_sorted_if_absent() {
|
insert_sorted_if_absent() {
|
||||||
file=$1
|
file=$1
|
||||||
str=$2
|
str=$2
|
||||||
echo "$str" | sort -u - $file | cmp -s - $file \
|
test -f $file || touch $file
|
||||||
|
echo "$str" | sort -u - $file | cmp - $file > /dev/null \
|
||||||
|| echo "$str" | sort -u - $file -o $file \
|
|| echo "$str" | sort -u - $file -o $file \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
}
|
}
|
||||||
@@ -176,55 +211,175 @@ grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
|
|||||||
>/dev/null && found_aux_dir=yes
|
>/dev/null && found_aux_dir=yes
|
||||||
if test $found_aux_dir = no; then
|
if test $found_aux_dir = no; then
|
||||||
echo "$0: expected line not found in configure.ac. Add the following:" >&2
|
echo "$0: expected line not found in configure.ac. Add the following:" >&2
|
||||||
echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2.
|
echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If $build_aux doesn't exist, create it now, otherwise some bits
|
# If $build_aux doesn't exist, create it now, otherwise some bits
|
||||||
# below will malfunction. If creating it, also mark it as ignored.
|
# below will malfunction. If creating it, also mark it as ignored.
|
||||||
if test ! -d $build_aux; then
|
if test ! -d $build_aux; then
|
||||||
mkdir $build_aux
|
mkdir $build_aux
|
||||||
for ig in .cvsignore .gitignore; do
|
for dot_ig in x $vc_ignore; do
|
||||||
test -f $ig && insert_sorted_if_absent $ig $build_aux
|
test $dot_ig = x && continue
|
||||||
|
insert_sorted_if_absent $dot_ig $build_aux
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Note this deviates from the version comparison in automake
|
||||||
|
# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
|
||||||
|
# but this should suffice as we won't be specifying old
|
||||||
|
# version formats or redundant trailing .0 in bootstrap.conf.
|
||||||
|
# If we did want full compatibility then we should probably
|
||||||
|
# use m4_version_compare from autoconf.
|
||||||
|
sort_ver() { # sort -V is not generally available
|
||||||
|
ver1="$1"
|
||||||
|
ver2="$2"
|
||||||
|
|
||||||
|
# split on '.' and compare each component
|
||||||
|
i=1
|
||||||
|
while : ; do
|
||||||
|
p1=$(echo "$ver1" | cut -d. -f$i)
|
||||||
|
p2=$(echo "$ver2" | cut -d. -f$i)
|
||||||
|
if [ ! "$p1" ]; then
|
||||||
|
echo "$1 $2"
|
||||||
|
break
|
||||||
|
elif [ ! "$p2" ]; then
|
||||||
|
echo "$2 $1"
|
||||||
|
break
|
||||||
|
elif [ ! "$p1" = "$p2" ]; then
|
||||||
|
if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
|
||||||
|
echo "$2 $1"
|
||||||
|
elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
|
||||||
|
echo "$1 $2"
|
||||||
|
else # numeric, then lexicographic comparison
|
||||||
|
lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
|
||||||
|
if [ "$lp" = "$p2" ]; then
|
||||||
|
echo "$1 $2"
|
||||||
|
else
|
||||||
|
echo "$2 $1"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
i=$(($i+1))
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
get_version() {
|
||||||
|
app=$1
|
||||||
|
|
||||||
|
$app --version >/dev/null 2>&1 || return 1
|
||||||
|
|
||||||
|
$app --version 2>&1 |
|
||||||
|
sed -n 's/[^0-9.]*\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/p
|
||||||
|
t done
|
||||||
|
d
|
||||||
|
:done
|
||||||
|
q'
|
||||||
|
}
|
||||||
|
|
||||||
|
check_versions() {
|
||||||
|
ret=0
|
||||||
|
|
||||||
|
while read app req_ver; do
|
||||||
|
# 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
|
||||||
|
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 " '$app' version >= $req_ver is required" >&2
|
||||||
|
ret=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
|
print_versions() {
|
||||||
|
echo "Program Min_version"
|
||||||
|
echo "----------------------"
|
||||||
|
printf "$buildreq"
|
||||||
|
echo "----------------------"
|
||||||
|
# can't depend on column -t
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! printf "$buildreq" | check_versions; then
|
||||||
|
test -f README-prereq &&
|
||||||
|
echo "Please see README-prereq for notes on obtaining these prerequisite programs:" >&2
|
||||||
|
echo
|
||||||
|
print_versions
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||||
|
|
||||||
|
# See if we can use gnulib's git-merge-changelog merge driver.
|
||||||
|
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"
|
||||||
|
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"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
cleanup_gnulib() {
|
cleanup_gnulib() {
|
||||||
status=$?
|
status=$?
|
||||||
rm -fr gnulib
|
rm -fr gnulib
|
||||||
exit $status
|
exit $status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
git_modules_config () {
|
||||||
|
GIT_CONFIG=.gitmodules git config "$@"
|
||||||
|
}
|
||||||
|
|
||||||
# Get gnulib files.
|
# Get gnulib files.
|
||||||
|
|
||||||
case ${GNULIB_SRCDIR--} in
|
case ${GNULIB_SRCDIR--} in
|
||||||
-)
|
-)
|
||||||
if [ ! -d gnulib ]; then
|
if git_modules_config submodule.gnulib.url >/dev/null; then
|
||||||
echo "$0: getting gnulib files..."
|
echo "$0: getting gnulib files..."
|
||||||
|
git submodule init || exit $?
|
||||||
|
git submodule update || exit $?
|
||||||
|
|
||||||
case ${CVS_AUTH-pserver} in
|
elif [ ! -d gnulib ]; then
|
||||||
pserver)
|
echo "$0: getting gnulib files..."
|
||||||
CVS_PREFIX=':pserver:anonymous@';;
|
|
||||||
ssh)
|
|
||||||
CVS_PREFIX="$CVS_USER${CVS_USER+@}";;
|
|
||||||
*)
|
|
||||||
echo "$0: $CVS_AUTH: Unknown CVS access method" >&2
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case $CVS_RSH in
|
|
||||||
'') CVS_RSH=ssh; export CVS_RSH;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
trap cleanup_gnulib 1 2 13 15
|
trap cleanup_gnulib 1 2 13 15
|
||||||
|
|
||||||
cvs -z3 -q -d ${CVS_PREFIX}cvs.savannah.gnu.org:/cvsroot/gnulib co gnulib ||
|
git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
|
||||||
|
git clone $shallow git://git.sv.gnu.org/gnulib ||
|
||||||
cleanup_gnulib
|
cleanup_gnulib
|
||||||
|
|
||||||
trap - 1 2 13 15
|
trap - 1 2 13 15
|
||||||
fi
|
fi
|
||||||
GNULIB_SRCDIR=gnulib
|
GNULIB_SRCDIR=gnulib
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Redirect the gnulib submodule to the directory on the command line
|
||||||
|
# if possible.
|
||||||
|
if test -d "$GNULIB_SRCDIR"/.git && \
|
||||||
|
git_modules_config submodule.gnulib.url >/dev/null; then
|
||||||
|
git submodule init
|
||||||
|
GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd`
|
||||||
|
git config --replace-all submodule.gnulib.url $GNULIB_SRCDIR
|
||||||
|
echo "$0: getting gnulib files..."
|
||||||
|
git submodule update || exit $?
|
||||||
|
GNULIB_SRCDIR=gnulib
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||||
@@ -232,71 +387,81 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
|||||||
|
|
||||||
# Get translations.
|
# Get translations.
|
||||||
|
|
||||||
get_translations() {
|
download_po_files() {
|
||||||
subdir=$1
|
subdir=$1
|
||||||
domain=$2
|
domain=$2
|
||||||
|
echo "$0: getting translations into $subdir for $domain..."
|
||||||
|
cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
|
||||||
|
eval "$cmd"
|
||||||
|
}
|
||||||
|
|
||||||
case $WGET_COMMAND in
|
# Download .po files to $po_dir/.reference and copy only the new
|
||||||
'')
|
# or modified ones into $po_dir. Also update $po_dir/LINGUAS.
|
||||||
echo "$0: wget not available; skipping translations";;
|
update_po_files() {
|
||||||
?*)
|
# Directory containing primary .po files.
|
||||||
echo "$0: getting translations into $subdir for $domain..." &&
|
# Overwrite them only when we're sure a .po file is new.
|
||||||
|
po_dir=$1
|
||||||
|
domain=$2
|
||||||
|
|
||||||
(cd $subdir && rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'`) &&
|
# Download *.po files into this dir.
|
||||||
$WGET_COMMAND -O "$subdir/$domain.html" "$TP_URL$domain" &&
|
# Usually contains *.s1 checksum files.
|
||||||
|
ref_po_dir="$po_dir/.reference"
|
||||||
|
|
||||||
sed -n 's|.*"http://[^"]*/translation/teams/PO/\([^/"]*\)/'"$domain"'-\([^/"]*\)\.[^."]*\.po".*|\1.\2|p' <"$subdir/$domain.html" |
|
test -d $ref_po_dir || mkdir $ref_po_dir || return
|
||||||
sort -k 1,1 -k 2,2n -k2,2 -k3,3n -k3,3 -k4,4n -k4,4 -k5,5n -k5.5 |
|
download_po_files $ref_po_dir $domain \
|
||||||
awk -F. '
|
&& ls "$ref_po_dir"/*.po 2>/dev/null |
|
||||||
{ if (lang && $1 != lang) print lang, ver }
|
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS"
|
||||||
{ lang = $1; ver = substr($0, index($0, ".") + 1) }
|
|
||||||
END { if (lang) print lang, ver }
|
langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
|
||||||
' | awk -v domain="$domain" -v subdir="$subdir" '
|
test "$langs" = '*' && langs=x
|
||||||
{
|
for po in $langs; do
|
||||||
lang = $1
|
case $po in x) continue;; esac
|
||||||
ver = $2
|
new_po="$ref_po_dir/$po.po"
|
||||||
urlfmt = ""
|
cksum_file="$ref_po_dir/$po.s1"
|
||||||
printf "{ $WGET_COMMAND -O %s/%s.po '\'"$TP_PO_URL"'/%s/%s-%s.%s.po'\'' &&\n", subdir, lang, lang, domain, ver, lang
|
if ! test -f "$cksum_file" ||
|
||||||
printf " msgfmt -c -o /dev/null %s/%s.po || {\n", subdir, lang
|
! test -f "$po_dir/$po.po" ||
|
||||||
printf " echo >&2 '\'"$0"': omitting translation for %s'\''\n", lang
|
! ${SHA1SUM-sha1sum} -c --status "$cksum_file" < "$new_po" > /dev/null; then
|
||||||
printf " rm -f %s/%s.po; }; } &&\n", subdir, lang
|
echo "updated $po_dir/$po.po..."
|
||||||
}
|
cp "$new_po" "$po_dir/$po.po" && ${SHA1SUM-sha1sum} < "$new_po" > "$cksum_file"
|
||||||
END { print ":" }
|
fi
|
||||||
' | WGET_COMMAND="$WGET_COMMAND" sh;;
|
done
|
||||||
esac &&
|
|
||||||
ls "$subdir"/*.po 2>/dev/null |
|
|
||||||
sed 's|.*/||; s|\.po$||' >"$subdir/LINGUAS" &&
|
|
||||||
rm -f "$subdir/$domain.html"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case $SKIP_PO in
|
case $SKIP_PO in
|
||||||
'')
|
'')
|
||||||
case `wget --help` in
|
|
||||||
*'--no-cache'*)
|
|
||||||
WGET_COMMAND='wget -nv --no-cache';;
|
|
||||||
*'--cache=on/off'*)
|
|
||||||
WGET_COMMAND='wget -nv --cache=off';;
|
|
||||||
*'--non-verbose'*)
|
|
||||||
WGET_COMMAND='wget -nv';;
|
|
||||||
*)
|
|
||||||
WGET_COMMAND='';;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test -d po; then
|
if test -d po; then
|
||||||
get_translations po $package || exit
|
update_po_files po $package || exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -d runtime-po; then
|
if test -d runtime-po; then
|
||||||
get_translations runtime-po $package-runtime || exit
|
update_po_files runtime-po $package-runtime || exit
|
||||||
fi;;
|
fi;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
symlink_to_gnulib()
|
symlink_to_dir()
|
||||||
{
|
{
|
||||||
src=$GNULIB_SRCDIR/$1
|
src=$1/$2
|
||||||
dst=${2-$1}
|
dst=${3-$2}
|
||||||
|
|
||||||
test -f "$src" && {
|
test -f "$src" && {
|
||||||
|
|
||||||
|
# If the destination directory doesn't exist, create it.
|
||||||
|
# This is required at least for "lib/uniwidth/cjk.h".
|
||||||
|
dst_dir=`dirname "$dst"`
|
||||||
|
if ! test -d "$dst_dir"; then
|
||||||
|
mkdir -p "$dst_dir"
|
||||||
|
|
||||||
|
# If we've just created a directory like lib/uniwidth,
|
||||||
|
# tell version control system(s) it's ignorable.
|
||||||
|
# FIXME: for now, this does only one level
|
||||||
|
parent=`dirname "$dst_dir"`
|
||||||
|
for dot_ig in x $vc_ignore; do
|
||||||
|
test $dot_ig = x && continue
|
||||||
|
ig=$parent/$dot_ig
|
||||||
|
insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'`
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if $copy; then
|
if $copy; then
|
||||||
{
|
{
|
||||||
test ! -h "$dst" || {
|
test ! -h "$dst" || {
|
||||||
@@ -341,7 +506,9 @@ cp_mark_as_generated()
|
|||||||
cp_dst=$2
|
cp_dst=$2
|
||||||
|
|
||||||
if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
|
if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
|
||||||
symlink_to_gnulib "$cp_dst"
|
symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst"
|
||||||
|
elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then
|
||||||
|
symlink_to_dir $local_gl_dir "$cp_dst"
|
||||||
else
|
else
|
||||||
case $cp_dst in
|
case $cp_dst in
|
||||||
*.[ch]) c1='/* '; c2=' */';;
|
*.[ch]) c1='/* '; c2=' */';;
|
||||||
@@ -350,11 +517,20 @@ cp_mark_as_generated()
|
|||||||
*) c1= ; c2= ;;
|
*) c1= ; c2= ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# If the destination directory doesn't exist, create it.
|
||||||
|
# This is required at least for "lib/uniwidth/cjk.h".
|
||||||
|
dst_dir=`dirname "$cp_dst"`
|
||||||
|
test -d "$dst_dir" || mkdir -p "$dst_dir"
|
||||||
|
|
||||||
if test -z "$c1"; then
|
if test -z "$c1"; then
|
||||||
cmp -s "$cp_src" "$cp_dst" || {
|
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 "$0: cp -f $cp_src $cp_dst" &&
|
||||||
rm -f "$cp_dst" &&
|
rm -f "$cp_dst" &&
|
||||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst"
|
cp "$cp_src" "$cp_dst-t" &&
|
||||||
|
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
|
||||||
|
mv -f "$cp_dst-t" "$cp_dst"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
# Copy the file first to get proper permissions if it
|
# Copy the file first to get proper permissions if it
|
||||||
@@ -363,6 +539,7 @@ cp_mark_as_generated()
|
|||||||
(
|
(
|
||||||
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
||||||
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
||||||
|
echo '#line 1' &&
|
||||||
sed "s!$bt_regex/!!g" "$cp_src"
|
sed "s!$bt_regex/!!g" "$cp_src"
|
||||||
) > $cp_dst-t &&
|
) > $cp_dst-t &&
|
||||||
if cmp -s "$cp_dst-t" "$cp_dst"; then
|
if cmp -s "$cp_dst-t" "$cp_dst"; then
|
||||||
@@ -383,7 +560,9 @@ version_controlled_file() {
|
|||||||
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
|
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
|
||||||
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
||||||
elif test -d .git; then
|
elif test -d .git; then
|
||||||
git-rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||||
|
elif test -d .svn; then
|
||||||
|
svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||||
else
|
else
|
||||||
echo "$0: no version control for $dir/$file?" >&2
|
echo "$0: no version control for $dir/$file?" >&2
|
||||||
fi
|
fi
|
||||||
@@ -394,18 +573,22 @@ slurp() {
|
|||||||
for dir in . `(cd $1 && find * -type d -print)`; do
|
for dir in . `(cd $1 && find * -type d -print)`; do
|
||||||
copied=
|
copied=
|
||||||
sep=
|
sep=
|
||||||
for file in `ls $1/$dir`; do
|
for file in `ls -a $1/$dir`; do
|
||||||
|
case $file in
|
||||||
|
.|..) continue;;
|
||||||
|
.*) continue;; # FIXME: should all file names starting with "." be ignored?
|
||||||
|
esac
|
||||||
test -d $1/$dir/$file && continue
|
test -d $1/$dir/$file && continue
|
||||||
for excluded_file in $excluded_files; do
|
for excluded_file in $excluded_files; do
|
||||||
test "$dir/$file" = "$excluded_file" && continue 2
|
test "$dir/$file" = "$excluded_file" && continue 2
|
||||||
done
|
done
|
||||||
if test $file = Makefile.am; then
|
if test $file = Makefile.am; then
|
||||||
copied=$copied${sep}gnulib.mk; sep=$nl
|
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||||
sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/gnulib.mk || {
|
sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || {
|
||||||
echo "$0: Copying $1/$dir/$file to $dir/gnulib.mk ..." &&
|
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||||
rm -f $dir/gnulib.mk &&
|
rm -f $dir/$gnulib_mk &&
|
||||||
sed "$remove_intl" $1/$dir/$file >$dir/gnulib.mk
|
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
||||||
}
|
}
|
||||||
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
|
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
|
||||||
version_controlled_file $dir $file; then
|
version_controlled_file $dir $file; then
|
||||||
@@ -429,14 +612,21 @@ slurp() {
|
|||||||
fi || exit
|
fi || exit
|
||||||
done
|
done
|
||||||
|
|
||||||
for dot_ig in .cvsignore .gitignore; do
|
for dot_ig in x $vc_ignore; do
|
||||||
|
test $dot_ig = x && continue
|
||||||
ig=$dir/$dot_ig
|
ig=$dir/$dot_ig
|
||||||
if test -n "$copied" && test -f $ig; then
|
if test -n "$copied"; then
|
||||||
insert_sorted_if_absent $ig "$copied"
|
insert_sorted_if_absent $ig "$copied"
|
||||||
# If an ignored file name ends with _.h, then also add
|
# If an ignored file name ends with .in.h, then also add
|
||||||
# the name with just ".h". Many gnulib headers are generated,
|
# the name with just ".h". Many gnulib headers are generated,
|
||||||
# e.g., stdint_.h -> stdint.h, dirent_.h ->..., etc.
|
# e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
|
||||||
f=`echo "$copied"|sed 's/_\.h$/.h/'`
|
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
||||||
|
f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
|
||||||
|
insert_sorted_if_absent $ig "$f"
|
||||||
|
|
||||||
|
# For files like sys_stat.in.h and sys_time.in.h, record as
|
||||||
|
# ignorable the directory we might eventually create: sys/.
|
||||||
|
f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
|
||||||
insert_sorted_if_absent $ig "$f"
|
insert_sorted_if_absent $ig "$f"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -454,19 +644,20 @@ gnulib_tool_options="\
|
|||||||
--import\
|
--import\
|
||||||
--no-changelog\
|
--no-changelog\
|
||||||
--aux-dir $bt/$build_aux\
|
--aux-dir $bt/$build_aux\
|
||||||
--doc-base $bt/doc\
|
--doc-base $bt/$doc_base\
|
||||||
--lib $gnulib_name\
|
--lib $gnulib_name\
|
||||||
--m4-base $bt/m4/\
|
--m4-base $bt/$m4_base/\
|
||||||
--source-base $bt/lib/\
|
--source-base $bt/$source_base/\
|
||||||
--tests-base $bt/tests\
|
--tests-base $bt/$tests_base\
|
||||||
--local-dir gl\
|
--local-dir $local_gl_dir\
|
||||||
|
$gnulib_tool_option_extras\
|
||||||
"
|
"
|
||||||
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
||||||
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
||||||
slurp $bt || exit
|
slurp $bt || exit
|
||||||
|
|
||||||
for file in $gnulib_files; do
|
for file in $gnulib_files; do
|
||||||
symlink_to_gnulib $file || exit
|
symlink_to_dir "$GNULIB_SRCDIR" $file || exit
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
@@ -476,28 +667,46 @@ grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
|
|||||||
with_gettext=no
|
with_gettext=no
|
||||||
|
|
||||||
if test $with_gettext = yes; then
|
if test $with_gettext = yes; then
|
||||||
echo "$0: (cd $bt2; autopoint) ..."
|
echo "$0: (cd $bt2; ${AUTOPOINT-autopoint}) ..."
|
||||||
cp configure.ac $bt2 &&
|
cp configure.ac $bt2 &&
|
||||||
(cd $bt2 && autopoint && rm configure.ac) &&
|
(cd $bt2 && ${AUTOPOINT-autopoint} && rm configure.ac) &&
|
||||||
slurp $bt2 $bt || exit
|
slurp $bt2 $bt || exit
|
||||||
|
|
||||||
rm -fr $bt $bt2 || exit
|
|
||||||
fi
|
fi
|
||||||
|
rm -fr $bt $bt2 || exit
|
||||||
|
|
||||||
|
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||||
|
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
||||||
|
# The following requires GNU find 4.2.3 or newer. Considering the usual
|
||||||
|
# portability constraints of this script, that may seem a very demanding
|
||||||
|
# requirement, but it should be ok. Ignore any failure, which is fine,
|
||||||
|
# since this is only a convenience to help developers avoid the relatively
|
||||||
|
# unusual case in which a symlinked-to .m4 file is git-removed from gnulib
|
||||||
|
# between successive runs of this script.
|
||||||
|
find "$m4_base" "$source_base" \
|
||||||
|
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||||
|
-type l -xtype l -delete > /dev/null 2>&1
|
||||||
|
|
||||||
# Reconfigure, getting other files.
|
# Reconfigure, getting other files.
|
||||||
|
|
||||||
for command in \
|
for command in \
|
||||||
libtool \
|
libtool \
|
||||||
'aclocal --force -I m4' \
|
"${ACLOCAL-aclocal} --force -I m4" \
|
||||||
'autoconf --force' \
|
"${AUTOCONF-autoconf} --force" \
|
||||||
'autoheader --force' \
|
"${AUTOHEADER-autoheader} --force" \
|
||||||
'automake --add-missing --copy --force-missing';
|
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||||
do
|
do
|
||||||
if test "$command" = libtool; then
|
if test "$command" = libtool; then
|
||||||
grep '^[ ]*AM_PROG_LIBTOOL\>' configure.ac >/dev/null ||
|
use_libtool=0
|
||||||
continue
|
# We'd like to use grep -E, to see if any of LT_INIT,
|
||||||
command='libtoolize -c -f'
|
# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
|
||||||
|
# but that's not portable enough (e.g., for Solaris).
|
||||||
|
grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
|
||||||
|
&& use_libtool=1
|
||||||
|
grep '^[ ]*LT_INIT' configure.ac >/dev/null \
|
||||||
|
&& use_libtool=1
|
||||||
|
test $use_libtool = 0 \
|
||||||
|
&& continue
|
||||||
|
command="${LIBTOOLIZE-libtoolize} -c -f"
|
||||||
fi
|
fi
|
||||||
echo "$0: $command ..."
|
echo "$0: $command ..."
|
||||||
$command || exit
|
$command || exit
|
||||||
@@ -505,13 +714,13 @@ done
|
|||||||
|
|
||||||
|
|
||||||
# Get some extra files from gnulib, overriding existing files.
|
# Get some extra files from gnulib, overriding existing files.
|
||||||
|
|
||||||
for file in $gnulib_extra_files; do
|
for file in $gnulib_extra_files; do
|
||||||
case $file in
|
case $file in
|
||||||
*/INSTALL) dst=INSTALL;;
|
*/INSTALL) dst=INSTALL;;
|
||||||
|
build-aux/*) dst=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;;
|
||||||
*) dst=$file;;
|
*) dst=$file;;
|
||||||
esac
|
esac
|
||||||
symlink_to_gnulib $file $dst || exit
|
symlink_to_dir "$GNULIB_SRCDIR" $file $dst || exit
|
||||||
done
|
done
|
||||||
|
|
||||||
if test $with_gettext = yes; then
|
if test $with_gettext = yes; then
|
||||||
@@ -520,7 +729,7 @@ if test $with_gettext = yes; then
|
|||||||
rm -f po/Makevars
|
rm -f po/Makevars
|
||||||
sed '
|
sed '
|
||||||
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
|
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
|
||||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
|
/^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/
|
||||||
/^XGETTEXT_OPTIONS *=/{
|
/^XGETTEXT_OPTIONS *=/{
|
||||||
s/$/ \\/
|
s/$/ \\/
|
||||||
a\
|
a\
|
||||||
@@ -547,4 +756,10 @@ if test $with_gettext = yes; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Horrible, coreutils-specific kludges.
|
||||||
|
# Change paths in gnulib-tests/gnulib.mk from "../.." to "..".
|
||||||
|
m=gnulib-tests/gnulib.mk
|
||||||
|
sed 's,\.\./\.\.,..,g' $m > $m-t
|
||||||
|
mv -f $m-t $m
|
||||||
|
|
||||||
echo "$0: done. Now you can run './configure'."
|
echo "$0: done. Now you can run './configure'."
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
# Bootstrap configuration.
|
# Bootstrap configuration.
|
||||||
|
|
||||||
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
# Copyright (C) 2006-2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# any later version.
|
# (at your option) any later version.
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,61 +13,232 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
# 02110-1301, USA.
|
|
||||||
|
|
||||||
|
|
||||||
# We don't need these modules, even though gnulib-tool mistakenly
|
# We don't need these modules.
|
||||||
# includes them because of gettext and fchdir dependencies.
|
|
||||||
avoided_gnulib_modules='
|
avoided_gnulib_modules='
|
||||||
--avoid=lock
|
|
||||||
--avoid=size_max
|
|
||||||
--avoid=xsize
|
|
||||||
--avoid=canonicalize-lgpl
|
--avoid=canonicalize-lgpl
|
||||||
|
--avoid=dummy
|
||||||
|
--avoid=lock
|
||||||
'
|
'
|
||||||
|
|
||||||
# These modules are obsolete and can probably be removed soon,
|
# These modules are obsolete and can probably be removed soon,
|
||||||
# but leave them in for now to minimize changes.
|
# but leave them in for now to minimize changes.
|
||||||
obsolete_gnulib_modules='
|
obsolete_gnulib_modules='
|
||||||
atexit free memchr memcmp memcpy memmove memset rename
|
atexit
|
||||||
strcspn strtod strtol utime
|
memchr
|
||||||
|
memcmp
|
||||||
|
memcpy
|
||||||
|
memmove
|
||||||
|
memset
|
||||||
|
rename
|
||||||
|
strcspn
|
||||||
|
strtod
|
||||||
|
strtol
|
||||||
'
|
'
|
||||||
|
|
||||||
# gnulib modules used by this package.
|
# gnulib modules used by this package.
|
||||||
gnulib_modules="
|
gnulib_modules="
|
||||||
$avoided_gnulib_modules
|
$avoided_gnulib_modules
|
||||||
$obsolete_gnulib_modules
|
$obsolete_gnulib_modules
|
||||||
acl alloca announce-gen argmatch assert backupfile base64
|
acl
|
||||||
c-strcase c-strtod
|
alloca
|
||||||
c-strtold calloc canon-host canonicalize chown cloexec
|
announce-gen
|
||||||
config-h configmake
|
areadlink-with-size
|
||||||
closeout cycle-check d-ino d-type diacrit dirfd dirname dup2
|
argmatch
|
||||||
error euidaccess exclude exitfail fchdir fcntl fcntl-safer fdl
|
argv-iter
|
||||||
file-type fileblocks filemode filenamecat fnmatch-gnu
|
assert
|
||||||
|
autobuild
|
||||||
|
backupfile
|
||||||
|
base64
|
||||||
|
c-strcase
|
||||||
|
c-strtod
|
||||||
|
c-strtold
|
||||||
|
calloc
|
||||||
|
canon-host
|
||||||
|
canonicalize
|
||||||
|
chown
|
||||||
|
cloexec
|
||||||
|
closein
|
||||||
|
closeout
|
||||||
|
config-h
|
||||||
|
configmake
|
||||||
|
crypto/md5
|
||||||
|
crypto/sha1
|
||||||
|
crypto/sha256
|
||||||
|
crypto/sha512
|
||||||
|
cycle-check
|
||||||
|
d-ino
|
||||||
|
d-type
|
||||||
|
diacrit
|
||||||
|
dirfd
|
||||||
|
dirname
|
||||||
|
dup2
|
||||||
|
error
|
||||||
|
euidaccess
|
||||||
|
exclude
|
||||||
|
exitfail
|
||||||
|
fchdir
|
||||||
|
fcntl
|
||||||
|
fcntl-safer
|
||||||
|
fdl
|
||||||
|
file-type
|
||||||
|
fileblocks
|
||||||
|
filemode
|
||||||
|
filenamecat
|
||||||
|
filevercmp
|
||||||
|
fnmatch-gnu
|
||||||
fopen-safer
|
fopen-safer
|
||||||
fprintftime fsusage ftruncate fts getdate getgroups gethrxtime
|
fprintftime
|
||||||
getline getloadavg getndelim2 getopt getpagesize getpass-gnu
|
fseeko
|
||||||
gettext gettime gettimeofday getugroups getusershell gnupload
|
fsusage
|
||||||
group-member hard-locale hash hash-pjw host-os human idcache
|
ftello
|
||||||
inttostr inttypes isapipe
|
ftruncate
|
||||||
lchmod lchown lib-ignore linebuffer link-follow
|
fts
|
||||||
long-options lstat malloc mbswidth md5 memcasecmp mempcpy
|
gendocs
|
||||||
memrchr mkancesdirs mkdir mkdir-p mkstemp mktime modechange
|
getdate
|
||||||
mountlist mpsort obstack pathmax perl physmem posixtm posixver putenv
|
getgroups
|
||||||
quote quotearg raise readlink readtokens readtokens0 readutmp
|
gethrxtime
|
||||||
realloc regex rename-dest-slash rmdir rmdir-errno
|
getline
|
||||||
|
getloadavg
|
||||||
|
getndelim2
|
||||||
|
getopt
|
||||||
|
getpagesize
|
||||||
|
getpass-gnu
|
||||||
|
gettext
|
||||||
|
gettime
|
||||||
|
gettimeofday
|
||||||
|
getugroups
|
||||||
|
getusershell
|
||||||
|
git-version-gen
|
||||||
|
gitlog-to-changelog
|
||||||
|
gnu-make
|
||||||
|
gnumakefile
|
||||||
|
gnupload
|
||||||
|
group-member
|
||||||
|
hard-locale
|
||||||
|
hash
|
||||||
|
hash-pjw
|
||||||
|
host-os
|
||||||
|
human
|
||||||
|
idcache
|
||||||
|
ignore-value
|
||||||
|
inttostr
|
||||||
|
inttypes
|
||||||
|
isapipe
|
||||||
|
lchmod
|
||||||
|
lchown
|
||||||
|
lib-ignore
|
||||||
|
linebuffer
|
||||||
|
link-follow
|
||||||
|
long-options
|
||||||
|
lstat
|
||||||
|
maintainer-makefile
|
||||||
|
malloc
|
||||||
|
manywarnings
|
||||||
|
mbrtowc
|
||||||
|
mbsalign
|
||||||
|
mbswidth
|
||||||
|
memcasecmp
|
||||||
|
memcmp2
|
||||||
|
mempcpy
|
||||||
|
memrchr
|
||||||
|
mgetgroups
|
||||||
|
mkancesdirs
|
||||||
|
mkdir
|
||||||
|
mkdir-p
|
||||||
|
mkstemp
|
||||||
|
mktime
|
||||||
|
modechange
|
||||||
|
mountlist
|
||||||
|
mpsort
|
||||||
|
obstack
|
||||||
|
pathmax
|
||||||
|
perl
|
||||||
|
physmem
|
||||||
|
posix-shell
|
||||||
|
posixtm
|
||||||
|
posixver
|
||||||
|
priv-set
|
||||||
|
progname
|
||||||
|
propername
|
||||||
|
putenv
|
||||||
|
quote
|
||||||
|
quotearg
|
||||||
|
raise
|
||||||
|
randint
|
||||||
|
randperm
|
||||||
|
readlink
|
||||||
|
readtokens
|
||||||
|
readtokens0
|
||||||
|
readutmp
|
||||||
|
realloc
|
||||||
|
regex
|
||||||
|
rename-dest-slash
|
||||||
|
rmdir
|
||||||
|
rmdir-errno
|
||||||
root-dev-ino
|
root-dev-ino
|
||||||
rpmatch
|
rpmatch
|
||||||
safe-read same
|
safe-read
|
||||||
save-cwd savedir savewd settime sha1 sig2str ssize_t stat-macros
|
same
|
||||||
stat-time stdbool stdlib-safer stpcpy strftime
|
save-cwd
|
||||||
strpbrk strtoimax strtoumax strverscmp sys_stat timespec tzset
|
savedir
|
||||||
unicodeio unistd-safer unlink-busy unlinkdir unlocked-io
|
savewd
|
||||||
uptime userspec utimecmp utimens vasprintf verify version-etc-fsf
|
selinux-at
|
||||||
wcwidth winsz-ioctl winsz-termios xalloc xgetcwd xgethostname
|
settime
|
||||||
xmemcoll xnanosleep xreadlink xreadlink-with-size xstrtod xstrtoimax
|
sig2str
|
||||||
xstrtol xstrtold xstrtoumax yesno
|
sigaction
|
||||||
|
ssize_t
|
||||||
|
stat-macros
|
||||||
|
stat-time
|
||||||
|
stdbool
|
||||||
|
stdlib-safer
|
||||||
|
stpcpy
|
||||||
|
stpncpy
|
||||||
|
strdup
|
||||||
|
strftime
|
||||||
|
strpbrk
|
||||||
|
strtoimax
|
||||||
|
strtoumax
|
||||||
|
strverscmp
|
||||||
|
sys_stat
|
||||||
|
timespec
|
||||||
|
tzset
|
||||||
|
unicodeio
|
||||||
|
unistd-safer
|
||||||
|
unlink-busy
|
||||||
|
unlinkdir
|
||||||
|
unlocked-io
|
||||||
|
uptime
|
||||||
|
useless-if-before-free
|
||||||
|
userspec
|
||||||
|
utimecmp
|
||||||
|
utimens
|
||||||
|
vasprintf-posix
|
||||||
|
vc-list-files
|
||||||
|
verify
|
||||||
|
verror
|
||||||
|
version-etc-fsf
|
||||||
|
warnings
|
||||||
|
wcwidth
|
||||||
|
winsz-ioctl
|
||||||
|
winsz-termios
|
||||||
|
write-any-file
|
||||||
|
xalloc
|
||||||
|
xfreopen
|
||||||
|
xgetcwd
|
||||||
|
xgethostname
|
||||||
|
xmemcoll
|
||||||
|
xnanosleep
|
||||||
|
xprintf
|
||||||
|
xprintf-posix
|
||||||
|
xstrtod
|
||||||
|
xstrtoimax
|
||||||
|
xstrtol
|
||||||
|
xstrtold
|
||||||
|
xstrtoumax
|
||||||
|
yesno
|
||||||
"
|
"
|
||||||
|
|
||||||
# Other locale categories that need message catalogs.
|
# Other locale categories that need message catalogs.
|
||||||
@@ -75,10 +246,27 @@ EXTRA_LOCALE_CATEGORIES=LC_TIME
|
|||||||
|
|
||||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||||
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
||||||
--from-code=UTF-8\\\
|
--flag=asnprintf:3:c-format\\\
|
||||||
--flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\
|
--flag=asprintf:2:c-format\\\
|
||||||
--flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
|
--flag=error:3:c-format\\\
|
||||||
|
--flag=error_at_line:5:c-format\\\
|
||||||
|
--flag=vasnprintf:3:c-format\\\
|
||||||
|
--flag=vasprintf:2:c-format\\\
|
||||||
|
--flag=verror:3:c-format\\\
|
||||||
|
--flag=verror_at_line:5:c-format\\\
|
||||||
--flag=wrapf:1:c-format\\\
|
--flag=wrapf:1:c-format\\\
|
||||||
|
--flag=xasprintf:1:c-format\\\
|
||||||
|
--flag=xfprintf:2:c-format\\\
|
||||||
|
--flag=xprintf:1:c-format\\\
|
||||||
|
--from-code=UTF-8\\\
|
||||||
|
'
|
||||||
|
|
||||||
|
# Append these, since we use the propername module.
|
||||||
|
see_manual='"This is a proper name. See the gettext manual, section Names."'
|
||||||
|
see_manual=\'"$see_manual"\'
|
||||||
|
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
||||||
|
--keyword=proper_name:1,'"$see_manual"'\\\
|
||||||
|
--keyword=proper_name_utf8:1,'"$see_manual"'\\\
|
||||||
'
|
'
|
||||||
|
|
||||||
# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
|
# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
|
||||||
@@ -102,11 +290,29 @@ if test $gettext_external = 1; then
|
|||||||
m4/intdiv0.m4
|
m4/intdiv0.m4
|
||||||
m4/lcmessage.m4
|
m4/lcmessage.m4
|
||||||
m4/lock.m4
|
m4/lock.m4
|
||||||
m4/printf-posix.m4
|
|
||||||
m4/size_max.m4
|
|
||||||
m4/uintmax_t.m4
|
m4/uintmax_t.m4
|
||||||
m4/ulonglong.m4
|
m4/ulonglong.m4
|
||||||
m4/visibility.m4
|
m4/visibility.m4
|
||||||
m4/xsize.m4
|
|
||||||
'
|
'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests"
|
||||||
|
|
||||||
|
# Build prerequisites
|
||||||
|
buildreq="\
|
||||||
|
autoconf 2.61
|
||||||
|
automake 1.10b
|
||||||
|
autopoint -
|
||||||
|
bison -
|
||||||
|
gettext -
|
||||||
|
git 1.4.4
|
||||||
|
gperf -
|
||||||
|
gzip -
|
||||||
|
makeinfo -
|
||||||
|
perl 5.5
|
||||||
|
rsync -
|
||||||
|
tar -
|
||||||
|
"
|
||||||
|
|
||||||
|
# Automake requires that ChangeLog exist.
|
||||||
|
touch ChangeLog
|
||||||
|
|||||||
Vendored
+26069
-36503
File diff suppressed because it is too large
Load Diff
+219
-110
@@ -1,12 +1,12 @@
|
|||||||
# -*- autoconf -*-
|
# -*- autoconf -*-
|
||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
# Copyright (C) 1991, 1993-2007 Free Software Foundation, Inc.
|
# Copyright (C) 1991, 1993-2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# any later version.
|
# (at your option) any later version.
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -14,20 +14,26 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software Foundation,
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
dnl Written by Jim Meyering.
|
dnl Written by Jim Meyering.
|
||||||
|
|
||||||
AC_PREREQ(2.61)
|
AC_PREREQ([2.61])
|
||||||
AC_INIT([GNU coreutils],[6.9],[[email protected]])
|
|
||||||
AC_CONFIG_SRCDIR(src/ls.c)
|
|
||||||
|
|
||||||
AC_CONFIG_AUX_DIR(build-aux)
|
# Make inter-release version strings look like, e.g., v6.9-219-g58ddd, which
|
||||||
|
# indicates that it is built from the 219th delta (in _some_ repository)
|
||||||
|
# following the v6.9 tag, and that 58ddd is a prefix of the commit SHA1.
|
||||||
|
AC_INIT([GNU coreutils],
|
||||||
|
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||||
|
[[email protected]])
|
||||||
|
|
||||||
|
AC_CONFIG_SRCDIR([src/ls.c])
|
||||||
|
|
||||||
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
||||||
|
|
||||||
AB_INIT()
|
AM_INIT_AUTOMAKE([1.10b dist-xz color-tests parallel-tests])
|
||||||
AM_INIT_AUTOMAKE([1.10 dist-bzip2])
|
AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
|
||||||
|
|
||||||
AC_PROG_CC_STDC
|
AC_PROG_CC_STDC
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
@@ -39,22 +45,82 @@ gl_EARLY
|
|||||||
gl_INIT
|
gl_INIT
|
||||||
coreutils_MACROS
|
coreutils_MACROS
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([gcc-warnings],
|
||||||
|
[AS_HELP_STRING([--enable-gcc-warnings],
|
||||||
|
[turn on lots of GCC warnings (for developers)])],
|
||||||
|
[case $enableval in
|
||||||
|
yes|no) ;;
|
||||||
|
*) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
|
||||||
|
esac
|
||||||
|
gl_gcc_warnings=$enableval],
|
||||||
|
[gl_gcc_warnings=no]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$gl_gcc_warnings" = yes; then
|
||||||
|
gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
|
||||||
|
AC_SUBST([WERROR_CFLAGS])
|
||||||
|
|
||||||
|
# Add many warnings, except some...
|
||||||
|
nw="$nw -Wdeclaration-after-statement" # too useful to forbid
|
||||||
|
nw="$nw -Waggregate-return" # anachronistic
|
||||||
|
nw="$nw -Wc++-compat" # We don't care about C++ compilers
|
||||||
|
nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
|
||||||
|
nw="$nw -Wtraditional" # Warns on #elif which we use often
|
||||||
|
nw="$nw -Wcast-qual" # Too many warnings for now
|
||||||
|
nw="$nw -Wconversion" # Too many warnings for now
|
||||||
|
nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
|
||||||
|
nw="$nw -Wsign-conversion" # Too many warnings for now
|
||||||
|
nw="$nw -Wtraditional-conversion" # Too many warnings for now
|
||||||
|
nw="$nw -Wunreachable-code" # Too many warnings for now
|
||||||
|
nw="$nw -Wpadded" # Our structs are not padded
|
||||||
|
nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat
|
||||||
|
nw="$nw -Wlogical-op" # any use of fwrite provokes this
|
||||||
|
nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
|
||||||
|
nw="$nw -Wvla" # warnings in gettext.h
|
||||||
|
nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
|
||||||
|
nw="$nw -Wswitch-enum" # Too many warnings for now
|
||||||
|
nw="$nw -Wswitch-default" # Too many warnings for now
|
||||||
|
# things I might fix soon:
|
||||||
|
nw="$nw -Wfloat-equal" # sort.c, seq.c
|
||||||
|
nw="$nw -Wmissing-format-attribute" # copy.c
|
||||||
|
nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
|
||||||
|
nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
|
||||||
|
nw="$nw -Wstrict-overflow" # expr.c, pr.c, tr.c, factor.c
|
||||||
|
# ?? -Wstrict-overflow
|
||||||
|
|
||||||
|
gl_MANYWARN_ALL_GCC([ws])
|
||||||
|
gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
|
||||||
|
for w in $ws; do
|
||||||
|
gl_WARN_ADD([$w])
|
||||||
|
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
|
||||||
|
gl_WARN_ADD([-fdiagnostics-show-option])
|
||||||
|
|
||||||
|
AC_SUBST([WARN_CFLAGS])
|
||||||
|
|
||||||
|
AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
|
||||||
|
AC_DEFINE([_FORTIFY_SOURCE], [2],
|
||||||
|
[enable compile-time and run-time bounds-checking, and some warnings])
|
||||||
|
AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_FUNC_FORK
|
AC_FUNC_FORK
|
||||||
|
|
||||||
AC_CHECK_FUNCS(uname,
|
optional_bin_progs=
|
||||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uname\$(EXEEXT)"
|
AC_CHECK_FUNCS([uname],
|
||||||
MAN="$MAN uname.1")
|
gl_ADD_PROG([optional_bin_progs], [uname]))
|
||||||
AC_CHECK_FUNCS(chroot,
|
AC_CHECK_FUNCS([chroot],
|
||||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS chroot\$(EXEEXT)"
|
gl_ADD_PROG([optional_bin_progs], [chroot]))
|
||||||
MAN="$MAN chroot.1")
|
AC_CHECK_FUNCS([gethostid],
|
||||||
AC_CHECK_FUNCS(gethostid,
|
gl_ADD_PROG([optional_bin_progs], [hostid]))
|
||||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS hostid\$(EXEEXT)"
|
|
||||||
MAN="$MAN hostid.1")
|
|
||||||
|
|
||||||
gl_WINSIZE_IN_PTEM
|
gl_WINSIZE_IN_PTEM
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether localtime caches TZ)
|
AC_MSG_CHECKING([whether localtime caches TZ])
|
||||||
AC_CACHE_VAL(utils_cv_localtime_cache,
|
AC_CACHE_VAL([utils_cv_localtime_cache],
|
||||||
[if test x$ac_cv_func_tzset = xyes; then
|
[if test x$ac_cv_func_tzset = xyes; then
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h>
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h>
|
||||||
#if STDC_HEADERS
|
#if STDC_HEADERS
|
||||||
@@ -95,22 +161,22 @@ else
|
|||||||
# since we can't invalidate the cache if we don't have tzset.
|
# since we can't invalidate the cache if we don't have tzset.
|
||||||
utils_cv_localtime_cache=no
|
utils_cv_localtime_cache=no
|
||||||
fi])dnl
|
fi])dnl
|
||||||
AC_MSG_RESULT($utils_cv_localtime_cache)
|
AC_MSG_RESULT([$utils_cv_localtime_cache])
|
||||||
if test $utils_cv_localtime_cache = yes; then
|
if test $utils_cv_localtime_cache = yes; then
|
||||||
AC_DEFINE(LOCALTIME_CACHE, 1, [FIXME])
|
AC_DEFINE([LOCALTIME_CACHE], [1], [FIXME])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# SCO-ODT-3.0 is reported to need -los to link programs using initgroups
|
# SCO-ODT-3.0 is reported to need -los to link programs using initgroups
|
||||||
AC_CHECK_FUNCS(initgroups)
|
AC_CHECK_FUNCS([initgroups])
|
||||||
if test $ac_cv_func_initgroups = no; then
|
if test $ac_cv_func_initgroups = no; then
|
||||||
AC_CHECK_LIB(os, initgroups)
|
AC_CHECK_LIB([os], [initgroups])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_FUNCS(syslog)
|
AC_CHECK_FUNCS([syslog])
|
||||||
if test $ac_cv_func_syslog = no; then
|
if test $ac_cv_func_syslog = no; then
|
||||||
# syslog is not in the default libraries. See if it's in some other.
|
# syslog is not in the default libraries. See if it's in some other.
|
||||||
for lib in bsd socket inet; do
|
for lib in bsd socket inet; do
|
||||||
AC_CHECK_LIB($lib, syslog, [AC_DEFINE(HAVE_SYSLOG, 1, [FIXME])
|
AC_CHECK_LIB([$lib], [syslog], [AC_DEFINE([HAVE_SYSLOG], [1], [FIXME])
|
||||||
LIBS="$LIBS -l$lib"; break])
|
LIBS="$LIBS -l$lib"; break])
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -130,76 +196,72 @@ if test $utils_cv_func_setpriority = no; then
|
|||||||
fi
|
fi
|
||||||
case $utils_cv_func_setpriority,$ac_cv_func_nice in
|
case $utils_cv_func_setpriority,$ac_cv_func_nice in
|
||||||
*yes*)
|
*yes*)
|
||||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS nice\$(EXEEXT)"
|
gl_ADD_PROG([optional_bin_progs], [nice])
|
||||||
MAN="$MAN nice.1";;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_DEFUN([coreutils_DUMMY_1],
|
AC_DEFUN([coreutils_DUMMY_1],
|
||||||
[
|
[
|
||||||
AC_REQUIRE([gl_READUTMP])
|
AC_REQUIRE([gl_READUTMP])
|
||||||
if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
|
if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
|
||||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS pinky\$(EXEEXT)"
|
gl_ADD_PROG([optional_bin_progs], [who])
|
||||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS users\$(EXEEXT)"
|
gl_ADD_PROG([optional_bin_progs], [users])
|
||||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS who\$(EXEEXT)"
|
gl_ADD_PROG([optional_bin_progs], [pinky])
|
||||||
MAN="$MAN pinky.1 users.1 who.1"
|
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
coreutils_DUMMY_1
|
coreutils_DUMMY_1
|
||||||
|
|
||||||
AC_MSG_CHECKING(ut_host in struct utmp)
|
AC_MSG_CHECKING([ut_host in struct utmp])
|
||||||
AC_CACHE_VAL(su_cv_func_ut_host_in_utmp,
|
AC_CACHE_VAL([su_cv_func_ut_host_in_utmp],
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||||
#include <utmp.h>]], [[struct utmp ut; return !sizeof ut.ut_host;]])],
|
#include <utmp.h>]], [[struct utmp ut; return !sizeof ut.ut_host;]])],
|
||||||
[su_cv_func_ut_host_in_utmp=yes],
|
[su_cv_func_ut_host_in_utmp=yes],
|
||||||
[su_cv_func_ut_host_in_utmp=no])])
|
[su_cv_func_ut_host_in_utmp=no])])
|
||||||
AC_MSG_RESULT($su_cv_func_ut_host_in_utmp)
|
AC_MSG_RESULT([$su_cv_func_ut_host_in_utmp])
|
||||||
if test $su_cv_func_ut_host_in_utmp = yes; then
|
if test $su_cv_func_ut_host_in_utmp = yes; then
|
||||||
have_ut_host=1
|
have_ut_host=1
|
||||||
AC_DEFINE(HAVE_UT_HOST, 1, [FIXME])
|
AC_DEFINE([HAVE_UT_HOST], [1], [FIXME])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$have_ut_host"; then
|
if test -z "$have_ut_host"; then
|
||||||
AC_MSG_CHECKING(ut_host in struct utmpx)
|
AC_MSG_CHECKING([ut_host in struct utmpx])
|
||||||
AC_CACHE_VAL(su_cv_func_ut_host_in_utmpx,
|
AC_CACHE_VAL([su_cv_func_ut_host_in_utmpx],
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||||
#include <utmpx.h>]], [[struct utmpx ut; return !sizeof ut.ut_host;]])],
|
#include <utmpx.h>]], [[struct utmpx ut; return !sizeof ut.ut_host;]])],
|
||||||
[su_cv_func_ut_host_in_utmpx=yes],
|
[su_cv_func_ut_host_in_utmpx=yes],
|
||||||
[su_cv_func_ut_host_in_utmpx=no])])
|
[su_cv_func_ut_host_in_utmpx=no])])
|
||||||
AC_MSG_RESULT($su_cv_func_ut_host_in_utmpx)
|
AC_MSG_RESULT([$su_cv_func_ut_host_in_utmpx])
|
||||||
if test $su_cv_func_ut_host_in_utmpx = yes; then
|
if test $su_cv_func_ut_host_in_utmpx = yes; then
|
||||||
AC_DEFINE(HAVE_UTMPX_H, 1, [FIXME])
|
AC_DEFINE([HAVE_UTMPX_H], [1], [FIXME])
|
||||||
AC_DEFINE(HAVE_UT_HOST, 1, [FIXME])
|
AC_DEFINE([HAVE_UT_HOST], [1], [FIXME])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GNULIB_BOOT_TIME(
|
GNULIB_BOOT_TIME([gl_ADD_PROG([optional_bin_progs], [uptime])])
|
||||||
[OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uptime\$(EXEEXT)"
|
|
||||||
MAN="$MAN uptime.1"])
|
|
||||||
|
|
||||||
AC_SYS_POSIX_TERMIOS()
|
AC_SYS_POSIX_TERMIOS()
|
||||||
gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
|
gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
|
||||||
|
|
||||||
if test $ac_cv_sys_posix_termios = yes; then
|
if test $ac_cv_sys_posix_termios = yes; then
|
||||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS stty\$(EXEEXT)" MAN="$MAN stty.1"
|
gl_ADD_PROG([optional_bin_progs], [stty])
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether termios.h needs _XOPEN_SOURCE)
|
AC_MSG_CHECKING([whether termios.h needs _XOPEN_SOURCE])
|
||||||
AC_CACHE_VAL(su_cv_sys_termios_needs_xopen_source,
|
AC_CACHE_VAL([su_cv_sys_termios_needs_xopen_source],
|
||||||
[AC_EGREP_CPP(yes, [#include <termios.h>
|
[AC_EGREP_CPP([yes], [#include <termios.h>
|
||||||
#ifdef IUCLC
|
#ifdef IUCLC
|
||||||
yes
|
yes
|
||||||
#endif], su_cv_sys_termios_needs_xopen_source=no,
|
#endif], su_cv_sys_termios_needs_xopen_source=no,
|
||||||
AC_EGREP_CPP(yes, [#define _XOPEN_SOURCE
|
AC_EGREP_CPP([yes], [#define _XOPEN_SOURCE
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#ifdef IUCLC
|
#ifdef IUCLC
|
||||||
yes
|
yes
|
||||||
#endif], su_cv_sys_termios_needs_xopen_source=yes,
|
#endif], su_cv_sys_termios_needs_xopen_source=yes,
|
||||||
su_cv_sys_termios_needs_xopen_source=no))])
|
su_cv_sys_termios_needs_xopen_source=no))])
|
||||||
AC_MSG_RESULT($su_cv_sys_termios_needs_xopen_source)
|
AC_MSG_RESULT([$su_cv_sys_termios_needs_xopen_source])
|
||||||
test $su_cv_sys_termios_needs_xopen_source = yes &&
|
test $su_cv_sys_termios_needs_xopen_source = yes &&
|
||||||
AC_DEFINE(TERMIOS_NEEDS_XOPEN_SOURCE, 1, [FIXME])
|
AC_DEFINE([TERMIOS_NEEDS_XOPEN_SOURCE], [1], [FIXME])
|
||||||
|
|
||||||
AC_MSG_CHECKING(c_line in struct termios)
|
AC_MSG_CHECKING([c_line in struct termios])
|
||||||
AC_CACHE_VAL(su_cv_sys_c_line_in_termios,
|
AC_CACHE_VAL([su_cv_sys_c_line_in_termios],
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if TERMIOS_NEEDS_XOPEN_SOURCE
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if TERMIOS_NEEDS_XOPEN_SOURCE
|
||||||
#define _XOPEN_SOURCE
|
#define _XOPEN_SOURCE
|
||||||
#endif
|
#endif
|
||||||
@@ -207,9 +269,9 @@ yes
|
|||||||
#include <termios.h>]], [[struct termios t; return !sizeof t.c_line;]])],
|
#include <termios.h>]], [[struct termios t; return !sizeof t.c_line;]])],
|
||||||
[su_cv_sys_c_line_in_termios=yes],
|
[su_cv_sys_c_line_in_termios=yes],
|
||||||
[su_cv_sys_c_line_in_termios=no])])
|
[su_cv_sys_c_line_in_termios=no])])
|
||||||
AC_MSG_RESULT($su_cv_sys_c_line_in_termios)
|
AC_MSG_RESULT([$su_cv_sys_c_line_in_termios])
|
||||||
test $su_cv_sys_c_line_in_termios = yes \
|
test $su_cv_sys_c_line_in_termios = yes \
|
||||||
&& AC_DEFINE(HAVE_C_LINE, 1, [FIXME])
|
&& AC_DEFINE([HAVE_C_LINE], [1], [FIXME])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# FIXME: note that this macro appears above, too.
|
# FIXME: note that this macro appears above, too.
|
||||||
@@ -218,10 +280,10 @@ gl_WINSIZE_IN_PTEM
|
|||||||
|
|
||||||
gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H
|
gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H
|
||||||
|
|
||||||
if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no && \
|
if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \
|
||||||
test $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h = no; then
|
test $gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h = no; then
|
||||||
AC_MSG_CHECKING(TIOCGWINSZ in sys/pty.h)
|
AC_MSG_CHECKING([TIOCGWINSZ in sys/pty.h])
|
||||||
AC_CACHE_VAL(su_cv_sys_tiocgwinsz_in_sys_pty_h,
|
AC_CACHE_VAL([su_cv_sys_tiocgwinsz_in_sys_pty_h],
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||||
#ifdef WINSIZE_IN_PTEM
|
#ifdef WINSIZE_IN_PTEM
|
||||||
# include <sys/stream.h>
|
# include <sys/stream.h>
|
||||||
@@ -232,10 +294,10 @@ if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no && \
|
|||||||
#include <sys/pty.h>]], [[int x = TIOCGWINSZ;]])],
|
#include <sys/pty.h>]], [[int x = TIOCGWINSZ;]])],
|
||||||
[su_cv_sys_tiocgwinsz_in_sys_pty_h=yes],
|
[su_cv_sys_tiocgwinsz_in_sys_pty_h=yes],
|
||||||
[su_cv_sys_tiocgwinsz_in_sys_pty_h=no])])
|
[su_cv_sys_tiocgwinsz_in_sys_pty_h=no])])
|
||||||
AC_MSG_RESULT($su_cv_sys_tiocgwinsz_in_sys_pty_h)
|
AC_MSG_RESULT([$su_cv_sys_tiocgwinsz_in_sys_pty_h])
|
||||||
|
|
||||||
test $su_cv_sys_tiocgwinsz_in_sys_pty_h = yes \
|
test $su_cv_sys_tiocgwinsz_in_sys_pty_h = yes \
|
||||||
&& AC_DEFINE(GWINSZ_IN_SYS_PTY, 1,
|
&& AC_DEFINE([GWINSZ_IN_SYS_PTY], [1],
|
||||||
[Define if your system defines TIOCGWINSZ in sys/pty.h.])
|
[Define if your system defines TIOCGWINSZ in sys/pty.h.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -244,14 +306,103 @@ AC_CHECK_DECLS([strsignal, sys_siglist, _sys_siglist, __sys_siglist], , ,
|
|||||||
[AC_INCLUDES_DEFAULT
|
[AC_INCLUDES_DEFAULT
|
||||||
#include <signal.h>])
|
#include <signal.h>])
|
||||||
|
|
||||||
# For src/kill.c and src/printf.c.
|
|
||||||
AC_CHECK_DECLS([strtoimax, strtoumax])
|
|
||||||
|
|
||||||
cu_LIB_CHECK
|
cu_LIB_CHECK
|
||||||
|
cu_GMP
|
||||||
|
|
||||||
|
# Build df only if there's a point to it.
|
||||||
|
if test $gl_cv_list_mounted_fs = yes && test $gl_cv_fs_space = yes; then
|
||||||
|
gl_ADD_PROG([optional_bin_progs], [df])
|
||||||
|
fi
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
mk="$srcdir/src/Makefile.am"
|
||||||
|
# Extract all literal names from the definition of $(EXTRA_PROGRAMS)
|
||||||
|
# in $mk but don't expand the variable references.
|
||||||
|
# Append each literal name to $optional_bin_progs.
|
||||||
|
v=EXTRA_PROGRAMS
|
||||||
|
for gl_i in `sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
|
||||||
|
| sed 's/^ *//;/^\$.*/d;/^'$v' =/d' \
|
||||||
|
| tr -s '\\015\\012\\\\' ' '`; do
|
||||||
|
gl_ADD_PROG([optional_bin_progs], $gl_i)
|
||||||
|
done
|
||||||
|
|
||||||
|
# As above, extract literal names from the definition of $(no_install__progs)
|
||||||
|
# in $mk but don't expand the variable references.
|
||||||
|
v=no_install__progs
|
||||||
|
t=`sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
|
||||||
|
| sed 's/^ *//;/^\$.*/d;/^'$v' =/d' \
|
||||||
|
| tr -s '\\015\\012\\\\' ' '`
|
||||||
|
# Remove any trailing space.
|
||||||
|
no_install_progs_default=`echo "$t"|sed 's/ $//'`
|
||||||
|
|
||||||
|
# Unfortunately, due to the way autoconf's AS_HELP_STRING works, the list
|
||||||
|
# of default-not-installed programs, "arch hostname su", must appear in two
|
||||||
|
# places: in this file below, and in $mk. Using "$no_install_progs_default"
|
||||||
|
# below cannot work. And we can't substitute the names into $mk because
|
||||||
|
# automake needs the literals, too.
|
||||||
|
# The compromise is to ensure that the space-separated list extracted
|
||||||
|
# above matches the literal 2nd argument below.
|
||||||
|
c="$srcdir/configure.ac"
|
||||||
|
re='^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])'
|
||||||
|
t=`sed -n '/'"$re"'/{s/'"$re"'/\1/;s/,/ /gp
|
||||||
|
}' $c`
|
||||||
|
case $t in
|
||||||
|
$no_install_progs_default) ;;
|
||||||
|
*) AC_MSG_ERROR([[internal error: g'l_INCLUDE_EXCLUDE_PROG's 2nd arg, $t,
|
||||||
|
does not match the list of default-not-installed programs
|
||||||
|
($no_install_progs_default) also recorded in $mk]],
|
||||||
|
1) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Given the name of a variable containing a space-separated list of
|
||||||
|
# install-by-default programs and the actual list do-not-install-by-default
|
||||||
|
# programs, modify the former variable to reflect any "do-install" and
|
||||||
|
# "don't-install" requests.
|
||||||
|
# I.e., add any program name specified via --enable-install-program=..., and
|
||||||
|
# remove any program name specified via --enable-no-install-program=...
|
||||||
|
# Note how the second argument below is a literal, with "," separators.
|
||||||
|
# That is required due to the way the macro works, and since the
|
||||||
|
# corresponding ./configure option argument is comma-separated on input.
|
||||||
|
gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [arch,hostname,su])
|
||||||
|
|
||||||
|
# Set INSTALL_SU if su installation has been requested via
|
||||||
|
# --enable-install-program=su.
|
||||||
|
AC_SUBST([INSTALL_SU])
|
||||||
|
case " $optional_bin_progs " in
|
||||||
|
*' su '*) INSTALL_SU=yes ;;
|
||||||
|
*) INSTALL_SU=no ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
MAN=`echo "$optional_bin_progs "|sed 's/ /.1 /g;s/ $//'|tr -d '\\015\\012'`
|
||||||
|
|
||||||
|
# Change ginstall.1 to "install.h" in $MAN.
|
||||||
|
MAN=`for m in $MAN; do test $m = ginstall.1 && m=install.1; echo $m; done \
|
||||||
|
| tr '\015\012' ' '; echo`
|
||||||
|
|
||||||
|
# Remove [.1, since writing a portable rule for it in man/Makefile.am
|
||||||
|
# is not practical. The sed LHS below uses the autoconf quadrigraph
|
||||||
|
# representing '['.
|
||||||
|
MAN=`echo "$MAN"|sed 's/\@<:@\.1//'`
|
||||||
|
|
||||||
|
OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
|
||||||
|
AC_SUBST([OPTIONAL_BIN_PROGS])
|
||||||
|
NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
|
||||||
|
AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
|
||||||
|
|
||||||
|
# Arrange to rerun configure whenever the file, src/Makefile.am,
|
||||||
|
# containing the list of program names changes.
|
||||||
|
CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/src/Makefile.am'
|
||||||
|
AC_SUBST([CONFIG_STATUS_DEPENDENCIES])
|
||||||
|
############################################################################
|
||||||
|
|
||||||
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
||||||
AM_GNU_GETTEXT_VERSION([0.15])
|
AM_GNU_GETTEXT_VERSION([0.15])
|
||||||
|
|
||||||
|
# For a test of uniq: it uses the $LOCALE_FR envvar.
|
||||||
|
gt_LOCALE_FR
|
||||||
|
|
||||||
AC_CONFIG_FILES(
|
AC_CONFIG_FILES(
|
||||||
Makefile
|
Makefile
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
@@ -260,48 +411,6 @@ AC_CONFIG_FILES(
|
|||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
src/Makefile
|
src/Makefile
|
||||||
tests/Makefile
|
tests/Makefile
|
||||||
tests/chgrp/Makefile
|
gnulib-tests/Makefile
|
||||||
tests/chmod/Makefile
|
|
||||||
tests/chown/Makefile
|
|
||||||
tests/cp/Makefile
|
|
||||||
tests/cut/Makefile
|
|
||||||
tests/dd/Makefile
|
|
||||||
tests/dircolors/Makefile
|
|
||||||
tests/du/Makefile
|
|
||||||
tests/expr/Makefile
|
|
||||||
tests/factor/Makefile
|
|
||||||
tests/fmt/Makefile
|
|
||||||
tests/head/Makefile
|
|
||||||
tests/install/Makefile
|
|
||||||
tests/join/Makefile
|
|
||||||
tests/ln/Makefile
|
|
||||||
tests/ls-2/Makefile
|
|
||||||
tests/ls/Makefile
|
|
||||||
tests/md5sum/Makefile
|
|
||||||
tests/misc/Makefile
|
|
||||||
tests/mkdir/Makefile
|
|
||||||
tests/mv/Makefile
|
|
||||||
tests/od/Makefile
|
|
||||||
tests/pr/Makefile
|
|
||||||
tests/readlink/Makefile
|
|
||||||
tests/rm/Makefile
|
|
||||||
tests/rmdir/Makefile
|
|
||||||
tests/seq/Makefile
|
|
||||||
tests/sha1sum/Makefile
|
|
||||||
tests/shred/Makefile
|
|
||||||
tests/sort/Makefile
|
|
||||||
tests/stty/Makefile
|
|
||||||
tests/sum/Makefile
|
|
||||||
tests/tac/Makefile
|
|
||||||
tests/tail-2/Makefile
|
|
||||||
tests/tail/Makefile
|
|
||||||
tests/tee/Makefile
|
|
||||||
tests/test/Makefile
|
|
||||||
tests/touch/Makefile
|
|
||||||
tests/tr/Makefile
|
|
||||||
tests/tsort/Makefile
|
|
||||||
tests/unexpand/Makefile
|
|
||||||
tests/uniq/Makefile
|
|
||||||
tests/wc/Makefile
|
|
||||||
)
|
)
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
@@ -1,3 +1,42 @@
|
|||||||
|
2007-10-05 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* coreutils.texi (chroot invocation): List two systems on which
|
||||||
|
chroot works when run by non-root.
|
||||||
|
|
||||||
|
2007-09-19 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* coreutils.texi (expr invocation): Correct description of relative
|
||||||
|
operator precedence. Reported by [email protected].
|
||||||
|
|
||||||
|
2007-08-25 Eric Blake <[email protected]>
|
||||||
|
|
||||||
|
Avoid case-insensitive clash in one-page-per-node html docs.
|
||||||
|
* coreutils.texi (Concept index): Rename from Index.
|
||||||
|
|
||||||
|
2007-07-15 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* coreutils.texi: Revise node structure per new fdl.texi.
|
||||||
|
|
||||||
|
2007-06-06 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* coreutils.texi (rmdir invocation): Fix a tiny typo.
|
||||||
|
|
||||||
|
2007-06-03 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* constants.texi: Remove from version control.
|
||||||
|
This file has always been generated.
|
||||||
|
* .gitignore: Add constants.texi.
|
||||||
|
|
||||||
|
2007-04-28 Paul Eggert <[email protected]>
|
||||||
|
|
||||||
|
* coreutils.texi (nohup invocation): Add advice about saving
|
||||||
|
output to a file.
|
||||||
|
|
||||||
|
2007-04-16 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* coreutils.texi (cut invocation): Adjust synopsis to show that an
|
||||||
|
OPTION is required. Reported by Rudolf Kastl.
|
||||||
|
|
||||||
2007-03-21 Eric Blake <[email protected]>
|
2007-03-21 Eric Blake <[email protected]>
|
||||||
|
|
||||||
* coreutils.texi (md5sum invocation): Document escapes in output
|
* coreutils.texi (md5sum invocation): Document escapes in output
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
# Make coreutils documentation. -*-Makefile-*-
|
# Make coreutils documentation. -*-Makefile-*-
|
||||||
|
|
||||||
# Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2005,
|
# Copyright (C) 1995-1998, 2001-2009 Free Software Foundation, Inc.
|
||||||
# 2006 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
@@ -14,9 +13,7 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
# 02110-1301, USA.
|
|
||||||
|
|
||||||
info_TEXINFOS = coreutils.texi
|
info_TEXINFOS = coreutils.texi
|
||||||
|
|
||||||
@@ -32,10 +29,13 @@ EXTRA_DIST = perm.texi getdate.texi constants.texi fdl.texi
|
|||||||
# old systems.
|
# old systems.
|
||||||
AM_MAKEINFOFLAGS = --no-split
|
AM_MAKEINFOFLAGS = --no-split
|
||||||
|
|
||||||
constants.texi: $(top_srcdir)/src/tail.c
|
constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
|
||||||
LC_ALL=C \
|
LC_ALL=C \
|
||||||
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
|
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
|
||||||
$(top_srcdir)/src/tail.c > t-$@
|
$(top_srcdir)/src/tail.c > t-$@
|
||||||
|
LC_ALL=C \
|
||||||
|
sed -n -e 's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
|
||||||
|
$(top_srcdir)/src/shred.c >> t-$@
|
||||||
mv t-$@ $@
|
mv t-$@ $@
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = constants.texi
|
MAINTAINERCLEANFILES = constants.texi
|
||||||
@@ -47,28 +47,75 @@ $(INFO_DEPS): $(EXTRA_DIST)
|
|||||||
_W = (^|[^A-Za-z0-9_])
|
_W = (^|[^A-Za-z0-9_])
|
||||||
W_ = ([^A-Za-z0-9_]|$$)
|
W_ = ([^A-Za-z0-9_]|$$)
|
||||||
|
|
||||||
|
syntax_checks = \
|
||||||
|
sc-avoid-io \
|
||||||
|
sc-avoid-non-zero \
|
||||||
|
sc-avoid-timezone \
|
||||||
|
sc-avoid-zeroes \
|
||||||
|
sc-exponent-grouping \
|
||||||
|
sc-lower-case-var \
|
||||||
|
sc-use-small-caps-NUL
|
||||||
|
|
||||||
|
.PHONY: $(syntax_checks) check-texinfo
|
||||||
|
|
||||||
# List words/regexps here that should not appear in the texinfo documentation.
|
# List words/regexps here that should not appear in the texinfo documentation.
|
||||||
# E.g., use @sc{nul}, not `NUL'
|
check-texinfo: $(syntax_checks)
|
||||||
# Use `time zone', not `timezone'.
|
$(AM_V_GEN)fail=0; \
|
||||||
# Use `zeros', not `zeroes' (nothing wrong with `zeroes'. just be consistent).
|
|
||||||
check-texinfo:
|
|
||||||
fail=0; \
|
|
||||||
grep timezone $(srcdir)/*.texi && fail=1; \
|
|
||||||
$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && fail=1; \
|
|
||||||
grep non-zero $(srcdir)/*.texi && fail=1; \
|
|
||||||
grep '@url{' $(srcdir)/*.texi && fail=1; \
|
grep '@url{' $(srcdir)/*.texi && fail=1; \
|
||||||
$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && fail=1; \
|
|
||||||
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
|
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
|
||||||
grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
|
grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
|
||||||
grep -n filename $(srcdir)/*.texi|$(EGREP) -v 'setfilename|[{]filename[}]' \
|
grep -n filename $(srcdir)/*.texi \
|
||||||
|
| $(EGREP) -v 'setfilename|[{]filename[}]' \
|
||||||
&& fail=1; \
|
&& fail=1; \
|
||||||
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
|
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
|
||||||
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
|
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
|
||||||
$(srcdir)/*.texi 2> /dev/null || fail=1; }; \
|
$(srcdir)/*.texi 2> /dev/null || fail=1; }; \
|
||||||
$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi && fail=1; \
|
|
||||||
$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi && fail=1; \
|
$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi && fail=1; \
|
||||||
$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
|
$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
|
||||||
| $(EGREP) -v '@vindex PATH$$|@env[{]PATH[}]' && fail=1; \
|
| $(EGREP) -v 'search path|@vindex PATH$$|@env[{]PATH[}]' && fail=1; \
|
||||||
exit $$fail
|
exit $$fail
|
||||||
|
|
||||||
|
# Use `time zone', not `timezone'.
|
||||||
|
sc-avoid-timezone:
|
||||||
|
$(AM_V_GEN)$(EGREP) timezone $(srcdir)/*.texi && exit 1 || :
|
||||||
|
|
||||||
|
# Check for insufficient exponent grouping, e.g.,
|
||||||
|
# @math{2^64} should be @math{2^{64}}.
|
||||||
|
sc-exponent-grouping:
|
||||||
|
$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/*.texi && exit 1 || :
|
||||||
|
|
||||||
|
# E.g., use @sc{nul}, not NUL.
|
||||||
|
sc-use-small-caps-NUL:
|
||||||
|
$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && exit 1 || :
|
||||||
|
|
||||||
|
# Say I/O, not IO.
|
||||||
|
sc-avoid-io:
|
||||||
|
$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && exit 1 || :
|
||||||
|
|
||||||
|
# I prefer nonzero over non-zero.
|
||||||
|
sc-avoid-non-zero:
|
||||||
|
$(AM_V_GEN)$(EGREP) non-zero $(srcdir)/*.texi && exit 1 || :
|
||||||
|
|
||||||
|
# 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 || :
|
||||||
|
|
||||||
|
# ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||||
|
ME = doc/Makefile
|
||||||
|
|
||||||
|
# The quantity inside @var{...} should not contain upper case letters.
|
||||||
|
# The leading backslash exemption is to permit in-macro uses like
|
||||||
|
# @var{\varName\} where the upper case letter is part of a parameter name.
|
||||||
|
find_upper_case_var = \
|
||||||
|
'/\@var{/ or next; \
|
||||||
|
while (/\@var{(.+?)}/g) \
|
||||||
|
{ \
|
||||||
|
$$v = $$1; \
|
||||||
|
$$v =~ /[A-Z]/ && $$v !~ /^\\/ and (print "$$ARGV:$$.:$$_"), $$m = 1 \
|
||||||
|
} \
|
||||||
|
END {$$m and (warn "$(ME): do not use upper case in \@var{...}\n"), exit 1}'
|
||||||
|
sc-lower-case-var:
|
||||||
|
$(AM_V_GEN)$(PERL) -e 1 \
|
||||||
|
&& $(PERL) -lne $(find_upper_case_var) $(srcdir)/*.texi
|
||||||
|
|
||||||
check: check-texinfo
|
check: check-texinfo
|
||||||
|
|||||||
+649
-171
File diff suppressed because it is too large
Load Diff
@@ -1 +1,2 @@
|
|||||||
@set DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS 5
|
@set DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS 5
|
||||||
|
@set SHRED_DEFAULT_PASSES 3
|
||||||
|
|||||||
+2892
-1811
File diff suppressed because it is too large
Load Diff
+1662
-690
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,12 @@
|
|||||||
|
@c The GNU Free Documentation License.
|
||||||
|
@center Version 1.3, 3 November 2008
|
||||||
|
|
||||||
@node GNU Free Documentation License
|
@c This file is intended to be included within another document,
|
||||||
@appendixsec GNU Free Documentation License
|
@c hence no sectioning command or @node.
|
||||||
|
|
||||||
@cindex FDL, GNU Free Documentation License
|
|
||||||
@center Version 1.2, November 2002
|
|
||||||
|
|
||||||
@display
|
@display
|
||||||
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
|
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
@uref{http://fsf.org/}
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
@@ -112,6 +111,9 @@ formats which do not have any title page as such, ``Title Page'' means
|
|||||||
the text near the most prominent appearance of the work's title,
|
the text near the most prominent appearance of the work's title,
|
||||||
preceding the beginning of the body of the text.
|
preceding the beginning of the body of the text.
|
||||||
|
|
||||||
|
The ``publisher'' means any person or entity that distributes copies
|
||||||
|
of the Document to the public.
|
||||||
|
|
||||||
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
||||||
title either is precisely XYZ or contains XYZ in parentheses following
|
title either is precisely XYZ or contains XYZ in parentheses following
|
||||||
text that translates XYZ in another language. (Here XYZ stands for a
|
text that translates XYZ in another language. (Here XYZ stands for a
|
||||||
@@ -380,13 +382,30 @@ title.
|
|||||||
@item
|
@item
|
||||||
TERMINATION
|
TERMINATION
|
||||||
|
|
||||||
You may not copy, modify, sublicense, or distribute the Document except
|
You may not copy, modify, sublicense, or distribute the Document
|
||||||
as expressly provided for under this License. Any other attempt to
|
except as expressly provided under this License. Any attempt
|
||||||
copy, modify, sublicense or distribute the Document is void, and will
|
otherwise to copy, modify, sublicense, or distribute it is void, and
|
||||||
automatically terminate your rights under this License. However,
|
will automatically terminate your rights under this License.
|
||||||
parties who have received copies, or rights, from you under this
|
|
||||||
License will not have their licenses terminated so long as such
|
However, if you cease all violation of this License, then your license
|
||||||
parties remain in full compliance.
|
from a particular copyright holder is reinstated (a) provisionally,
|
||||||
|
unless and until the copyright holder explicitly and finally
|
||||||
|
terminates your license, and (b) permanently, if the copyright holder
|
||||||
|
fails to notify you of the violation by some reasonable means prior to
|
||||||
|
60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, receipt of a copy of some or all of the same material does
|
||||||
|
not give you any rights to use it.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
FUTURE REVISIONS OF THIS LICENSE
|
FUTURE REVISIONS OF THIS LICENSE
|
||||||
@@ -404,7 +423,42 @@ following the terms and conditions either of that specified version or
|
|||||||
of any later version that has been published (not as a draft) by the
|
of any later version that has been published (not as a draft) by the
|
||||||
Free Software Foundation. If the Document does not specify a version
|
Free Software Foundation. If the Document does not specify a version
|
||||||
number of this License, you may choose any version ever published (not
|
number of this License, you may choose any version ever published (not
|
||||||
as a draft) by the Free Software Foundation.
|
as a draft) by the Free Software Foundation. If the Document
|
||||||
|
specifies that a proxy can decide which future versions of this
|
||||||
|
License can be used, that proxy's public statement of acceptance of a
|
||||||
|
version permanently authorizes you to choose that version for the
|
||||||
|
Document.
|
||||||
|
|
||||||
|
@item
|
||||||
|
RELICENSING
|
||||||
|
|
||||||
|
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
|
||||||
|
World Wide Web server that publishes copyrightable works and also
|
||||||
|
provides prominent facilities for anybody to edit those works. A
|
||||||
|
public wiki that anybody can edit is an example of such a server. A
|
||||||
|
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
|
||||||
|
site means any set of copyrightable works thus published on the MMC
|
||||||
|
site.
|
||||||
|
|
||||||
|
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
|
||||||
|
license published by Creative Commons Corporation, a not-for-profit
|
||||||
|
corporation with a principal place of business in San Francisco,
|
||||||
|
California, as well as future copyleft versions of that license
|
||||||
|
published by that same organization.
|
||||||
|
|
||||||
|
``Incorporate'' means to publish or republish a Document, in whole or
|
||||||
|
in part, as part of another Document.
|
||||||
|
|
||||||
|
An MMC is ``eligible for relicensing'' if it is licensed under this
|
||||||
|
License, and if all works that were first published under this License
|
||||||
|
somewhere other than this MMC, and subsequently incorporated in whole
|
||||||
|
or in part into the MMC, (1) had no cover texts or invariant sections,
|
||||||
|
and (2) were thus incorporated prior to November 1, 2008.
|
||||||
|
|
||||||
|
The operator of an MMC Site may republish an MMC contained in the site
|
||||||
|
under CC-BY-SA on the same site at any time before August 1, 2009,
|
||||||
|
provided the MMC is eligible for relicensing.
|
||||||
|
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
@page
|
@page
|
||||||
@@ -418,7 +472,7 @@ license notices just after the title page:
|
|||||||
@group
|
@group
|
||||||
Copyright (C) @var{year} @var{your name}.
|
Copyright (C) @var{year} @var{your name}.
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
under the terms of the GNU Free Documentation License, Version 1.2
|
under the terms of the GNU Free Documentation License, Version 1.3
|
||||||
or any later version published by the Free Software Foundation;
|
or any later version published by the Free Software Foundation;
|
||||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||||
Texts. A copy of the license is included in the section entitled ``GNU
|
Texts. A copy of the license is included in the section entitled ``GNU
|
||||||
@@ -427,7 +481,7 @@ license notices just after the title page:
|
|||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||||
replace the ``with...Texts.'' line with this:
|
replace the ``with@dots{}Texts.'' line with this:
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
@group
|
@group
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
@c Permission is granted to copy, distribute and/or modify this document
|
@c Permission is granted to copy, distribute and/or modify this document
|
||||||
@c under the terms of the GNU Free Documentation License, Version 1.2 or
|
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||||
@c any later version published by the Free Software Foundation; with no
|
@c any later version published by the Free Software Foundation; with no
|
||||||
@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||||
@c Texts. A copy of the license is included in the ``GNU Free
|
@c Texts. A copy of the license is included in the ``GNU Free
|
||||||
@@ -265,16 +265,19 @@ which uses @samp{12m} for noon and @samp{12pm} for midnight.)
|
|||||||
The time may alternatively be followed by a time zone correction,
|
The time may alternatively be followed by a time zone correction,
|
||||||
expressed as @samp{@var{s}@var{hh}@var{mm}}, where @var{s} is @samp{+}
|
expressed as @samp{@var{s}@var{hh}@var{mm}}, where @var{s} is @samp{+}
|
||||||
or @samp{-}, @var{hh} is a number of zone hours and @var{mm} is a number
|
or @samp{-}, @var{hh} is a number of zone hours and @var{mm} is a number
|
||||||
of zone minutes. You can also separate @var{hh} from @var{mm} with a colon.
|
of zone minutes.
|
||||||
|
The zone minutes term, @var{mm}, may be omitted, in which case
|
||||||
|
the one- or two-digit correction is interpreted as a number of hours.
|
||||||
|
You can also separate @var{hh} from @var{mm} with a colon.
|
||||||
When a time zone correction is given this way, it
|
When a time zone correction is given this way, it
|
||||||
forces interpretation of the time relative to
|
forces interpretation of the time relative to
|
||||||
Coordinated Universal Time (@sc{utc}), overriding any previous
|
Coordinated Universal Time (@sc{utc}), overriding any previous
|
||||||
specification for the time zone or the local time zone. For example,
|
specification for the time zone or the local time zone. For example,
|
||||||
@samp{+0530} and @samp{+05:30} both stand for the time zone 5.5 hours
|
@samp{+0530} and @samp{+05:30} both stand for the time zone 5.5 hours
|
||||||
ahead of @sc{utc} (e.g., India). The @var{minute}
|
ahead of @sc{utc} (e.g., India).
|
||||||
part of the time of day may not be elided when a time zone correction
|
This is the best way to
|
||||||
is used. This is the best way to specify a time zone correction by
|
specify a time zone correction by fractional parts of an hour.
|
||||||
fractional parts of an hour.
|
The maximum zone correction is 24 hours.
|
||||||
|
|
||||||
Either @samp{am}/@samp{pm} or a time zone correction may be specified,
|
Either @samp{am}/@samp{pm} or a time zone correction may be specified,
|
||||||
but not both.
|
but not both.
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
@c File mode bits
|
@c File mode bits
|
||||||
|
|
||||||
@c Copyright (C) 1994, 1996, 1999, 2000, 2001, 2003, 2004, 2005, 2006
|
@c Copyright (C) 1994, 1996, 1999-2001, 2003-2006, 2008
|
||||||
@c Free Software Foundation, Inc.
|
@c Free Software Foundation, Inc.
|
||||||
|
|
||||||
@c Permission is granted to copy, distribute and/or modify this document
|
@c Permission is granted to copy, distribute and/or modify this document
|
||||||
@c under the terms of the GNU Free Documentation License, Version 1.2 or
|
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||||
@c any later version published by the Free Software Foundation; with no
|
@c any later version published by the Free Software Foundation; with no
|
||||||
@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||||
@c Texts. A copy of the license is included in the ``GNU Free
|
@c Texts. A copy of the license is included in the ``GNU Free
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@set UPDATED 22 March 2007
|
@set UPDATED 5 May 2009
|
||||||
@set UPDATED-MONTH March 2007
|
@set UPDATED-MONTH May 2009
|
||||||
@set EDITION 6.9
|
@set EDITION 7.4
|
||||||
@set VERSION 6.9
|
@set VERSION 7.4
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@set UPDATED 22 March 2007
|
@set UPDATED 5 May 2009
|
||||||
@set UPDATED-MONTH March 2007
|
@set UPDATED-MONTH May 2009
|
||||||
@set EDITION 6.9
|
@set EDITION 7.4
|
||||||
@set VERSION 6.9
|
@set VERSION 7.4
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2007-05-31 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
|
* printf-parse.c, vasnprintf.c, unicodeio.c: Remove local
|
||||||
|
copies, so we now get these files from gnulib.
|
||||||
|
|
||||||
2007-03-20 Jim Meyering <[email protected]>
|
2007-03-20 Jim Meyering <[email protected]>
|
||||||
|
|
||||||
Fix a typo in the handling of %x and %X.
|
Fix a typo in the handling of %x and %X.
|
||||||
@@ -10,11 +10,13 @@ SubDirSysHdrs $(SUBDIR) ;
|
|||||||
#SubDirSysHdrs $(SUBDIR) $(DOTDOT) ;
|
#SubDirSysHdrs $(SUBDIR) $(DOTDOT) ;
|
||||||
|
|
||||||
StaticLibrary libfetish.a :
|
StaticLibrary libfetish.a :
|
||||||
__fpending.c
|
# __fpending.c
|
||||||
acl.c
|
# acl.c
|
||||||
# alloca.c
|
# alloca.c
|
||||||
allocsa.c
|
# allocsa.c
|
||||||
|
areadlink-with-size.c
|
||||||
argmatch.c
|
argmatch.c
|
||||||
|
argv-iter.c
|
||||||
asnprintf.c
|
asnprintf.c
|
||||||
# atexit.c
|
# atexit.c
|
||||||
backupfile.c
|
backupfile.c
|
||||||
@@ -31,11 +33,12 @@ StaticLibrary libfetish.a :
|
|||||||
chown.c
|
chown.c
|
||||||
cloexec.c
|
cloexec.c
|
||||||
close-stream.c
|
close-stream.c
|
||||||
|
closein.c
|
||||||
closeout.c
|
closeout.c
|
||||||
|
copy-acl.c
|
||||||
cycle-check.c
|
cycle-check.c
|
||||||
diacrit.c
|
diacrit.c
|
||||||
dirchownmod.c
|
dirchownmod.c
|
||||||
# dirfd.c
|
|
||||||
dirname.c
|
dirname.c
|
||||||
dup-safer.c
|
dup-safer.c
|
||||||
# dup2.c
|
# dup2.c
|
||||||
@@ -50,13 +53,20 @@ StaticLibrary libfetish.a :
|
|||||||
# fchown-stub.c
|
# fchown-stub.c
|
||||||
fd-reopen.c
|
fd-reopen.c
|
||||||
fd-safer.c
|
fd-safer.c
|
||||||
|
file-has-acl.c
|
||||||
|
file-set.c
|
||||||
file-type.c
|
file-type.c
|
||||||
# fileblocks.c
|
# fileblocks.c
|
||||||
filemode.c
|
filemode.c
|
||||||
filenamecat.c
|
filenamecat.c
|
||||||
|
filevercmp.c
|
||||||
fnmatch.c
|
fnmatch.c
|
||||||
fopen-safer.c
|
fopen-safer.c
|
||||||
|
fpending.c
|
||||||
fprintftime.c
|
fprintftime.c
|
||||||
|
freadahead.c
|
||||||
|
freadptr.c
|
||||||
|
freadseek.c
|
||||||
# fsusage.c
|
# fsusage.c
|
||||||
# ftruncate.c
|
# ftruncate.c
|
||||||
fts.c
|
fts.c
|
||||||
@@ -67,7 +77,6 @@ StaticLibrary libfetish.a :
|
|||||||
# getgroups.c
|
# getgroups.c
|
||||||
# gethostname.c
|
# gethostname.c
|
||||||
gethrxtime.c
|
gethrxtime.c
|
||||||
# getline.c
|
|
||||||
getloadavg.c
|
getloadavg.c
|
||||||
getndelim2.c
|
getndelim2.c
|
||||||
# getopt.c
|
# getopt.c
|
||||||
@@ -81,32 +90,39 @@ StaticLibrary libfetish.a :
|
|||||||
hard-locale.c
|
hard-locale.c
|
||||||
hash-pjw.c
|
hash-pjw.c
|
||||||
hash.c
|
hash.c
|
||||||
|
hash-triple.c
|
||||||
human.c
|
human.c
|
||||||
i-ring.c
|
i-ring.c
|
||||||
idcache.c
|
idcache.c
|
||||||
imaxtostr.c
|
imaxtostr.c
|
||||||
inet_ntop.c
|
inet_ntop.c
|
||||||
isapipe.c
|
isapipe.c
|
||||||
# lchown.c
|
|
||||||
linebuffer.c
|
linebuffer.c
|
||||||
localcharset.c
|
localcharset.c
|
||||||
long-options.c
|
long-options.c
|
||||||
# lstat-stub.c
|
# lstat-stub.c
|
||||||
# lstat.c
|
# lstat.c
|
||||||
# malloc.c
|
# malloc.c
|
||||||
|
malloca.c
|
||||||
|
mbchar.c
|
||||||
mbscasecmp.c
|
mbscasecmp.c
|
||||||
|
mbslen.c
|
||||||
|
mbsstr.c
|
||||||
mbswidth.c
|
mbswidth.c
|
||||||
md5.c
|
md5.c
|
||||||
memcasecmp.c
|
memcasecmp.c
|
||||||
# memchr.c
|
# memchr.c
|
||||||
|
memchr2.c
|
||||||
# memcmp.c
|
# memcmp.c
|
||||||
memcoll.c
|
memcoll.c
|
||||||
|
memcmp2.c
|
||||||
# memcpy.c
|
# memcpy.c
|
||||||
# memmove.c
|
# memmove.c
|
||||||
mempcpy.c
|
mempcpy.c
|
||||||
memrchr.c
|
memrchr.c
|
||||||
# memset.c
|
# memset.c
|
||||||
memxfrm.c
|
memxfrm.c
|
||||||
|
mgetgroups.c
|
||||||
mkancesdirs.c
|
mkancesdirs.c
|
||||||
mkdir.c
|
mkdir.c
|
||||||
mkdir-p.c
|
mkdir-p.c
|
||||||
@@ -126,7 +142,9 @@ StaticLibrary libfetish.a :
|
|||||||
physmem.c
|
physmem.c
|
||||||
posixtm.c
|
posixtm.c
|
||||||
posixver.c
|
posixver.c
|
||||||
putenv.c
|
progname.c
|
||||||
|
propername.c
|
||||||
|
# putenv.c
|
||||||
quote.c
|
quote.c
|
||||||
quotearg.c
|
quotearg.c
|
||||||
# raise.c
|
# raise.c
|
||||||
@@ -151,6 +169,7 @@ StaticLibrary libfetish.a :
|
|||||||
savedir.c
|
savedir.c
|
||||||
savewd.c
|
savewd.c
|
||||||
# setenv.c
|
# setenv.c
|
||||||
|
set-mode-acl.c
|
||||||
settime.c
|
settime.c
|
||||||
sha1.c
|
sha1.c
|
||||||
sha256.c
|
sha256.c
|
||||||
@@ -162,6 +181,7 @@ StaticLibrary libfetish.a :
|
|||||||
strftime.c
|
strftime.c
|
||||||
strintcmp.c
|
strintcmp.c
|
||||||
stripslash.c
|
stripslash.c
|
||||||
|
strnlen1.c
|
||||||
# strncasecmp.c
|
# strncasecmp.c
|
||||||
strndup.c
|
strndup.c
|
||||||
strnlen.c
|
strnlen.c
|
||||||
@@ -178,6 +198,10 @@ StaticLibrary libfetish.a :
|
|||||||
strverscmp.c
|
strverscmp.c
|
||||||
# tempname.c
|
# tempname.c
|
||||||
time_r.c
|
time_r.c
|
||||||
|
trim.c
|
||||||
|
u8-uctomb.c
|
||||||
|
u8-uctomb-aux.c
|
||||||
|
uinttostr.c
|
||||||
umaxtostr.c
|
umaxtostr.c
|
||||||
unicodeio.c
|
unicodeio.c
|
||||||
unlinkdir.c
|
unlinkdir.c
|
||||||
@@ -186,8 +210,10 @@ StaticLibrary libfetish.a :
|
|||||||
# utime.c
|
# utime.c
|
||||||
utimecmp.c
|
utimecmp.c
|
||||||
utimens.c
|
utimens.c
|
||||||
|
version.c
|
||||||
version-etc.c
|
version-etc.c
|
||||||
version-etc-fsf.c
|
version-etc-fsf.c
|
||||||
|
write-any-file.c
|
||||||
xalloc-die.c
|
xalloc-die.c
|
||||||
xfts.c
|
xfts.c
|
||||||
xgetcwd.c
|
xgetcwd.c
|
||||||
@@ -196,15 +222,16 @@ StaticLibrary libfetish.a :
|
|||||||
xmemcoll.c
|
xmemcoll.c
|
||||||
xmemxfrm.c
|
xmemxfrm.c
|
||||||
xnanosleep.c
|
xnanosleep.c
|
||||||
xreadlink.c
|
xprintf.c
|
||||||
xreadlink-with-size.c
|
|
||||||
xstrndup.c
|
xstrndup.c
|
||||||
xstrtod.c
|
xstrtod.c
|
||||||
xstrtoimax.c
|
xstrtoimax.c
|
||||||
xstrtol.c
|
xstrtol.c
|
||||||
|
xstrtol-error.c
|
||||||
xstrtold.c
|
xstrtold.c
|
||||||
xstrtoul.c
|
xstrtoul.c
|
||||||
xstrtoumax.c
|
xstrtoumax.c
|
||||||
yesno.c
|
yesno.c
|
||||||
;
|
;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles u8-uctomb.c u8-uctomb-aux.c ] = [ FDirName $(SUBDIR) unistr ] ;
|
||||||
|
|||||||
@@ -1,28 +1,23 @@
|
|||||||
## Makefile for gnulib/lib -*-Makefile-*-
|
## Makefile for gnulib/lib -*-Makefile-*-
|
||||||
|
|
||||||
# Copyright (C) 1995-2006 Free Software Foundation, Inc.
|
# Copyright (C) 1995-2007, 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
## This program is free software; you can redistribute it and/or modify
|
## This program is free software: you can redistribute it and/or modify
|
||||||
## it under the terms of the GNU General Public License as published by
|
## it under the terms of the GNU General Public License as published by
|
||||||
## the Free Software Foundation; either version 2, or (at your option)
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
## any later version.
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
## This program is distributed in the hope that it will be useful,
|
## This program is distributed in the hope that it will be useful,
|
||||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
## GNU General Public License for more details.
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
## You should have received a copy of the GNU General Public License
|
## You should have received a copy of the GNU General Public License
|
||||||
## along with this program; if not, write to the Free Software
|
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
## 02110-1301, USA.
|
|
||||||
|
|
||||||
include gnulib.mk
|
include gnulib.mk
|
||||||
|
|
||||||
AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS)
|
AM_CFLAGS += $(WARN_CFLAGS) # $(WERROR_CFLAGS)
|
||||||
|
|
||||||
noinst_PROGRAMS = t-fpending
|
|
||||||
LDADD = $(noinst_LIBRARIES)
|
|
||||||
|
|
||||||
libcoreutils_a_SOURCES += \
|
libcoreutils_a_SOURCES += \
|
||||||
buffer-lcm.c buffer-lcm.h \
|
buffer-lcm.c buffer-lcm.h \
|
||||||
@@ -30,9 +25,3 @@ libcoreutils_a_SOURCES += \
|
|||||||
|
|
||||||
libcoreutils_a_LIBADD += $(LIBOBJS)
|
libcoreutils_a_LIBADD += $(LIBOBJS)
|
||||||
libcoreutils_a_DEPENDENCIES += $(LIBOBJS)
|
libcoreutils_a_DEPENDENCIES += $(LIBOBJS)
|
||||||
|
|
||||||
check: unit-test
|
|
||||||
|
|
||||||
.PHONY: unit-test
|
|
||||||
unit-test: t-fpending
|
|
||||||
./t-fpending > /dev/null
|
|
||||||
|
|||||||
+1632
-409
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
/* Internal implementation of access control lists.
|
/* Internal implementation of access control lists.
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,18 +13,24 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
Written by Paul Eggert and Andreas Gruenbacher. */
|
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include "acl.h"
|
#include "acl.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
/* All systems define the ACL related API in <sys/acl.h>. */
|
||||||
|
#if HAVE_SYS_ACL_H
|
||||||
|
# include <sys/acl.h>
|
||||||
|
#endif
|
||||||
|
#if defined HAVE_ACL && ! defined GETACLCNT && defined ACL_CNT
|
||||||
|
# define GETACLCNT ACL_CNT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* On Linux, additional ACL related API is available in <acl/libacl.h>. */
|
||||||
#ifdef HAVE_ACL_LIBACL_H
|
#ifdef HAVE_ACL_LIBACL_H
|
||||||
# include <acl/libacl.h>
|
# include <acl/libacl.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -40,47 +46,175 @@
|
|||||||
# define ENOTSUP (-1)
|
# define ENOTSUP (-1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gettext.h"
|
|
||||||
#define _(msgid) gettext (msgid)
|
|
||||||
|
|
||||||
#ifndef HAVE_FCHMOD
|
#ifndef HAVE_FCHMOD
|
||||||
# define HAVE_FCHMOD false
|
# define HAVE_FCHMOD false
|
||||||
# define fchmod(fd, mode) (-1)
|
# define fchmod(fd, mode) (-1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN_ACL_ENTRIES
|
|
||||||
|
#if USE_ACL
|
||||||
|
|
||||||
|
# if HAVE_ACL_GET_FILE
|
||||||
|
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
|
||||||
|
/* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
|
||||||
|
|
||||||
|
# ifndef MIN_ACL_ENTRIES
|
||||||
# define MIN_ACL_ENTRIES 4
|
# define MIN_ACL_ENTRIES 4
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
/* POSIX 1003.1e (draft 17) */
|
/* POSIX 1003.1e (draft 17) */
|
||||||
#ifndef HAVE_ACL_GET_FD
|
# ifdef HAVE_ACL_GET_FD
|
||||||
|
/* Most platforms have a 1-argument acl_get_fd, only OSF/1 has a 2-argument
|
||||||
|
macro(!). */
|
||||||
|
# if HAVE_ACL_FREE_TEXT /* OSF/1 */
|
||||||
|
static inline acl_t
|
||||||
|
rpl_acl_get_fd (int fd)
|
||||||
|
{
|
||||||
|
return acl_get_fd (fd, ACL_TYPE_ACCESS);
|
||||||
|
}
|
||||||
|
# undef acl_get_fd
|
||||||
|
# define acl_get_fd rpl_acl_get_fd
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
# define HAVE_ACL_GET_FD false
|
# define HAVE_ACL_GET_FD false
|
||||||
|
# undef acl_get_fd
|
||||||
# define acl_get_fd(fd) (NULL)
|
# define acl_get_fd(fd) (NULL)
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
/* POSIX 1003.1e (draft 17) */
|
/* POSIX 1003.1e (draft 17) */
|
||||||
#ifndef HAVE_ACL_SET_FD
|
# ifdef HAVE_ACL_SET_FD
|
||||||
|
/* Most platforms have a 2-argument acl_set_fd, only OSF/1 has a 3-argument
|
||||||
|
macro(!). */
|
||||||
|
# if HAVE_ACL_FREE_TEXT /* OSF/1 */
|
||||||
|
static inline int
|
||||||
|
rpl_acl_set_fd (int fd, acl_t acl)
|
||||||
|
{
|
||||||
|
return acl_set_fd (fd, ACL_TYPE_ACCESS, acl);
|
||||||
|
}
|
||||||
|
# undef acl_set_fd
|
||||||
|
# define acl_set_fd rpl_acl_set_fd
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
# define HAVE_ACL_SET_FD false
|
# define HAVE_ACL_SET_FD false
|
||||||
|
# undef acl_set_fd
|
||||||
# define acl_set_fd(fd, acl) (-1)
|
# define acl_set_fd(fd, acl) (-1)
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
|
/* POSIX 1003.1e (draft 13) */
|
||||||
|
# if ! HAVE_ACL_FREE_TEXT
|
||||||
|
# define acl_free_text(buf) acl_free (buf)
|
||||||
|
# endif
|
||||||
|
|
||||||
/* Linux-specific */
|
/* Linux-specific */
|
||||||
#ifndef HAVE_ACL_EXTENDED_FILE
|
# ifndef HAVE_ACL_EXTENDED_FILE
|
||||||
# define HAVE_ACL_EXTENDED_FILE false
|
# define HAVE_ACL_EXTENDED_FILE false
|
||||||
# define acl_extended_file(name) (-1)
|
# define acl_extended_file(name) (-1)
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
/* Linux-specific */
|
/* Linux-specific */
|
||||||
#ifndef HAVE_ACL_FROM_MODE
|
# ifndef HAVE_ACL_FROM_MODE
|
||||||
# define HAVE_ACL_FROM_MODE false
|
# define HAVE_ACL_FROM_MODE false
|
||||||
# define acl_from_mode(mode) (NULL)
|
# define acl_from_mode(mode) (NULL)
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#define ACL_NOT_WELL_SUPPORTED(Errno) \
|
/* Set to 1 if a file's mode is implicit by the ACL.
|
||||||
((Errno) == ENOTSUP || (Errno) == ENOSYS || (Errno) == EINVAL)
|
Set to 0 if a file's mode is stored independently from the ACL. */
|
||||||
|
# if HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP /* MacOS X */
|
||||||
|
# define MODE_INSIDE_ACL 0
|
||||||
|
# else
|
||||||
|
# define MODE_INSIDE_ACL 1
|
||||||
|
# endif
|
||||||
|
|
||||||
/* Define a replacement for acl_entries if needed. */
|
# if defined __APPLE__ && defined __MACH__ /* MacOS X */
|
||||||
#if USE_ACL && HAVE_ACL_GET_FILE && HAVE_ACL_FREE && !HAVE_ACL_ENTRIES
|
# define ACL_NOT_WELL_SUPPORTED(Err) \
|
||||||
|
((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == ENOENT)
|
||||||
|
# elif defined EOPNOTSUPP /* Tru64 NFS */
|
||||||
|
# define ACL_NOT_WELL_SUPPORTED(Err) \
|
||||||
|
((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == EOPNOTSUPP)
|
||||||
|
# else
|
||||||
|
# define ACL_NOT_WELL_SUPPORTED(Err) \
|
||||||
|
((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Return the number of entries in ACL.
|
||||||
|
Return -1 and set errno upon failure to determine it. */
|
||||||
|
/* Define a replacement for acl_entries if needed. (Only Linux has it.) */
|
||||||
|
# if !HAVE_ACL_ENTRIES
|
||||||
# define acl_entries rpl_acl_entries
|
# define acl_entries rpl_acl_entries
|
||||||
int acl_entries (acl_t);
|
extern int acl_entries (acl_t);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if HAVE_ACL_TYPE_EXTENDED /* MacOS X */
|
||||||
|
/* ACL is an ACL, from a file, stored as type ACL_TYPE_EXTENDED.
|
||||||
|
Return 1 if the given ACL is non-trivial.
|
||||||
|
Return 0 if it is trivial. */
|
||||||
|
extern int acl_extended_nontrivial (acl_t);
|
||||||
|
# else
|
||||||
|
/* ACL is an ACL, from a file, stored as type ACL_TYPE_ACCESS.
|
||||||
|
Return 1 if the given ACL is non-trivial.
|
||||||
|
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.
|
||||||
|
Return -1 and set errno upon failure to determine it. */
|
||||||
|
extern int acl_access_nontrivial (acl_t);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# elif HAVE_ACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
|
||||||
|
|
||||||
|
/* Set to 1 if a file's mode is implicit by the ACL.
|
||||||
|
Set to 0 if a file's mode is stored independently from the ACL. */
|
||||||
|
# if defined __CYGWIN__ /* Cygwin */
|
||||||
|
# define MODE_INSIDE_ACL 0
|
||||||
|
# else /* Solaris */
|
||||||
|
# define MODE_INSIDE_ACL 1
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if !defined ACL_NO_TRIVIAL /* Solaris <= 10, Cygwin */
|
||||||
|
|
||||||
|
/* Return 1 if the given ACL is non-trivial.
|
||||||
|
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||||
|
extern int acl_nontrivial (int count, aclent_t *entries);
|
||||||
|
|
||||||
|
# ifdef ACE_GETACL /* Solaris 10 */
|
||||||
|
|
||||||
|
/* Test an ACL retrieved with ACE_GETACL.
|
||||||
|
Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
|
||||||
|
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||||
|
extern int acl_ace_nontrivial (int count, ace_t *entries);
|
||||||
|
|
||||||
|
/* Definitions for when the built executable is executed on Solaris 10
|
||||||
|
(newer version) or Solaris 11. */
|
||||||
|
/* For a_type. */
|
||||||
|
# define ACE_ACCESS_ALLOWED_ACE_TYPE 0 /* replaces ALLOW */
|
||||||
|
# define ACE_ACCESS_DENIED_ACE_TYPE 1 /* replaces DENY */
|
||||||
|
/* For a_flags. */
|
||||||
|
# define NEW_ACE_OWNER 0x1000
|
||||||
|
# define NEW_ACE_GROUP 0x2000
|
||||||
|
# define NEW_ACE_IDENTIFIER_GROUP 0x0040
|
||||||
|
# define ACE_EVERYONE 0x4000
|
||||||
|
/* For a_access_mask. */
|
||||||
|
# define NEW_ACE_READ_DATA 0x001 /* corresponds to 'r' */
|
||||||
|
# define NEW_ACE_WRITE_DATA 0x002 /* corresponds to 'w' */
|
||||||
|
# define NEW_ACE_EXECUTE 0x004 /* corresponds to 'x' */
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# elif HAVE_GETACL /* HP-UX */
|
||||||
|
|
||||||
|
/* Return 1 if the given ACL is non-trivial.
|
||||||
|
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||||
|
extern int acl_nontrivial (int count, struct acl_entry *entries, struct stat *sb);
|
||||||
|
|
||||||
|
# elif HAVE_ACLX_GET && 0 /* AIX */
|
||||||
|
|
||||||
|
/* TODO */
|
||||||
|
|
||||||
|
# elif HAVE_STATACL /* older AIX */
|
||||||
|
|
||||||
|
/* Return 1 if the given ACL is non-trivial.
|
||||||
|
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||||
|
extern int acl_nontrivial (struct acl *a);
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,256 +0,0 @@
|
|||||||
/* acl.c - access control lists
|
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
Written by Paul Eggert and Andreas Gruenbacher. */
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include "acl.h"
|
|
||||||
|
|
||||||
#include "acl-internal.h"
|
|
||||||
|
|
||||||
/* If DESC is a valid file descriptor use fchmod to change the
|
|
||||||
file's mode to MODE on systems that have fchown. On systems
|
|
||||||
that don't have fchown and if DESC is invalid, use chown on
|
|
||||||
NAME instead. */
|
|
||||||
|
|
||||||
int
|
|
||||||
chmod_or_fchmod (const char *name, int desc, mode_t mode)
|
|
||||||
{
|
|
||||||
if (HAVE_FCHMOD && desc != -1)
|
|
||||||
return fchmod (desc, mode);
|
|
||||||
else
|
|
||||||
return chmod (name, mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Copy access control lists from one file to another. If SOURCE_DESC is
|
|
||||||
a valid file descriptor, use file descriptor operations, else use
|
|
||||||
filename based operations on SRC_NAME. Likewise for DEST_DESC and
|
|
||||||
DEST_NAME.
|
|
||||||
If access control lists are not available, fchmod the target file to
|
|
||||||
MODE. Also sets the non-permission bits of the destination file
|
|
||||||
(S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
|
|
||||||
System call return value semantics. */
|
|
||||||
|
|
||||||
int
|
|
||||||
copy_acl (const char *src_name, int source_desc, const char *dst_name,
|
|
||||||
int dest_desc, mode_t mode)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
#if USE_ACL && HAVE_ACL_GET_FILE && HAVE_ACL_SET_FILE && HAVE_ACL_FREE
|
|
||||||
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
|
|
||||||
|
|
||||||
acl_t acl;
|
|
||||||
if (HAVE_ACL_GET_FD && source_desc != -1)
|
|
||||||
acl = acl_get_fd (source_desc);
|
|
||||||
else
|
|
||||||
acl = acl_get_file (src_name, ACL_TYPE_ACCESS);
|
|
||||||
if (acl == NULL)
|
|
||||||
{
|
|
||||||
if (ACL_NOT_WELL_SUPPORTED (errno))
|
|
||||||
return set_acl (dst_name, dest_desc, mode);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
error (0, errno, "%s", quote (src_name));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (HAVE_ACL_SET_FD && dest_desc != -1)
|
|
||||||
ret = acl_set_fd (dest_desc, acl);
|
|
||||||
else
|
|
||||||
ret = acl_set_file (dst_name, ACL_TYPE_ACCESS, acl);
|
|
||||||
if (ret != 0)
|
|
||||||
{
|
|
||||||
int saved_errno = errno;
|
|
||||||
|
|
||||||
if (ACL_NOT_WELL_SUPPORTED (errno))
|
|
||||||
{
|
|
||||||
int n = acl_entries (acl);
|
|
||||||
|
|
||||||
acl_free (acl);
|
|
||||||
if (n == 3)
|
|
||||||
{
|
|
||||||
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
|
|
||||||
saved_errno = errno;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
chmod_or_fchmod (dst_name, dest_desc, mode);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
acl_free (acl);
|
|
||||||
chmod_or_fchmod (dst_name, dest_desc, mode);
|
|
||||||
}
|
|
||||||
error (0, saved_errno, _("preserving permissions for %s"),
|
|
||||||
quote (dst_name));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
acl_free (acl);
|
|
||||||
|
|
||||||
if (mode & (S_ISUID | S_ISGID | S_ISVTX))
|
|
||||||
{
|
|
||||||
/* We did not call chmod so far, so the special bits have not yet
|
|
||||||
been set. */
|
|
||||||
|
|
||||||
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
|
|
||||||
{
|
|
||||||
error (0, errno, _("preserving permissions for %s"),
|
|
||||||
quote (dst_name));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (S_ISDIR (mode))
|
|
||||||
{
|
|
||||||
acl = acl_get_file (src_name, ACL_TYPE_DEFAULT);
|
|
||||||
if (acl == NULL)
|
|
||||||
{
|
|
||||||
error (0, errno, "%s", quote (src_name));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl))
|
|
||||||
{
|
|
||||||
error (0, errno, _("preserving permissions for %s"),
|
|
||||||
quote (dst_name));
|
|
||||||
acl_free (acl);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
acl_free (acl);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#else
|
|
||||||
ret = chmod_or_fchmod (dst_name, dest_desc, mode);
|
|
||||||
if (ret != 0)
|
|
||||||
error (0, errno, _("preserving permissions for %s"), quote (dst_name));
|
|
||||||
return ret;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the access control lists of a file. If DESC is a valid file
|
|
||||||
descriptor, use file descriptor operations where available, else use
|
|
||||||
filename based operations on NAME. If access control lists are not
|
|
||||||
available, fchmod the target file to MODE. Also sets the
|
|
||||||
non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX)
|
|
||||||
to those from MODE if any are set. System call return value
|
|
||||||
semantics. */
|
|
||||||
|
|
||||||
int
|
|
||||||
set_acl (char const *name, int desc, mode_t mode)
|
|
||||||
{
|
|
||||||
#if USE_ACL && HAVE_ACL_SET_FILE && HAVE_ACL_FREE
|
|
||||||
/* POSIX 1003.1e draft 17 (abandoned) specific version. */
|
|
||||||
|
|
||||||
/* We must also have have_acl_from_text and acl_delete_def_file.
|
|
||||||
(acl_delete_def_file could be emulated with acl_init followed
|
|
||||||
by acl_set_file, but acl_set_file with an empty acl is
|
|
||||||
unspecified.) */
|
|
||||||
|
|
||||||
# ifndef HAVE_ACL_FROM_TEXT
|
|
||||||
# error Must have acl_from_text (see POSIX 1003.1e draft 17).
|
|
||||||
# endif
|
|
||||||
# ifndef HAVE_ACL_DELETE_DEF_FILE
|
|
||||||
# error Must have acl_delete_def_file (see POSIX 1003.1e draft 17).
|
|
||||||
# endif
|
|
||||||
|
|
||||||
acl_t acl;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (HAVE_ACL_FROM_MODE)
|
|
||||||
{
|
|
||||||
acl = acl_from_mode (mode);
|
|
||||||
if (!acl)
|
|
||||||
{
|
|
||||||
error (0, errno, "%s", quote (name));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
char acl_text[] = "u::---,g::---,o::---";
|
|
||||||
|
|
||||||
if (mode & S_IRUSR) acl_text[ 3] = 'r';
|
|
||||||
if (mode & S_IWUSR) acl_text[ 4] = 'w';
|
|
||||||
if (mode & S_IXUSR) acl_text[ 5] = 'x';
|
|
||||||
if (mode & S_IRGRP) acl_text[10] = 'r';
|
|
||||||
if (mode & S_IWGRP) acl_text[11] = 'w';
|
|
||||||
if (mode & S_IXGRP) acl_text[12] = 'x';
|
|
||||||
if (mode & S_IROTH) acl_text[17] = 'r';
|
|
||||||
if (mode & S_IWOTH) acl_text[18] = 'w';
|
|
||||||
if (mode & S_IXOTH) acl_text[19] = 'x';
|
|
||||||
|
|
||||||
acl = acl_from_text (acl_text);
|
|
||||||
if (!acl)
|
|
||||||
{
|
|
||||||
error (0, errno, "%s", quote (name));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (HAVE_ACL_SET_FD && desc != -1)
|
|
||||||
ret = acl_set_fd (desc, acl);
|
|
||||||
else
|
|
||||||
ret = acl_set_file (name, ACL_TYPE_ACCESS, acl);
|
|
||||||
if (ret != 0)
|
|
||||||
{
|
|
||||||
int saved_errno = errno;
|
|
||||||
acl_free (acl);
|
|
||||||
|
|
||||||
if (ACL_NOT_WELL_SUPPORTED (errno))
|
|
||||||
{
|
|
||||||
if (chmod_or_fchmod (name, desc, mode) != 0)
|
|
||||||
saved_errno = errno;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
error (0, saved_errno, _("setting permissions for %s"), quote (name));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
acl_free (acl);
|
|
||||||
|
|
||||||
if (S_ISDIR (mode) && acl_delete_def_file (name))
|
|
||||||
{
|
|
||||||
error (0, errno, _("setting permissions for %s"), quote (name));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mode & (S_ISUID | S_ISGID | S_ISVTX))
|
|
||||||
{
|
|
||||||
/* We did not call chmod so far, so the special bits have not yet
|
|
||||||
been set. */
|
|
||||||
|
|
||||||
if (chmod_or_fchmod (name, desc, mode))
|
|
||||||
{
|
|
||||||
error (0, errno, _("preserving permissions for %s"), quote (name));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#else
|
|
||||||
int ret = chmod_or_fchmod (name, desc, mode);
|
|
||||||
if (ret)
|
|
||||||
error (0, errno, _("setting permissions for %s"), quote (name));
|
|
||||||
return ret;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
/* acl.c - access control lists
|
/* acl.c - access control lists
|
||||||
|
|
||||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,23 +13,15 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
Written by Paul Eggert. */
|
Written by Paul Eggert. */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#if HAVE_SYS_ACL_H
|
|
||||||
# include <sys/acl.h>
|
|
||||||
#endif
|
|
||||||
#if defined HAVE_ACL && ! defined GETACLCNT && defined ACL_CNT
|
|
||||||
# define GETACLCNT ACL_CNT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int file_has_acl (char const *, struct stat const *);
|
int file_has_acl (char const *, struct stat const *);
|
||||||
int copy_acl (char const *, int, char const *, int, mode_t);
|
int copy_acl (char const *, int, char const *, int, mode_t);
|
||||||
int set_acl (char const *, int, mode_t);
|
int set_acl (char const *, int, mode_t);
|
||||||
|
int qset_acl (char const *, int, mode_t);
|
||||||
int chmod_or_fchmod (char const *, int, mode_t);
|
int chmod_or_fchmod (char const *, int, mode_t);
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/* Return the number of entries in an ACL.
|
/* Return the number of entries in an ACL.
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,8 +13,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
Written by Paul Eggert and Andreas Gruenbacher. */
|
Written by Paul Eggert and Andreas Gruenbacher. */
|
||||||
|
|
||||||
@@ -22,18 +21,55 @@
|
|||||||
|
|
||||||
#include "acl-internal.h"
|
#include "acl-internal.h"
|
||||||
|
|
||||||
/* Return the number of entries in ACL. */
|
/* This file assumes POSIX-draft like ACLs
|
||||||
|
(Linux, FreeBSD, MacOS X, IRIX, Tru64). */
|
||||||
|
|
||||||
|
/* Return the number of entries in ACL.
|
||||||
|
Return -1 and set errno upon failure to determine it. */
|
||||||
|
|
||||||
int
|
int
|
||||||
acl_entries (acl_t acl)
|
acl_entries (acl_t acl)
|
||||||
{
|
{
|
||||||
char *t;
|
int count = 0;
|
||||||
int entries = 0;
|
|
||||||
char *text = acl_to_text (acl, NULL);
|
if (acl != NULL)
|
||||||
if (! text)
|
{
|
||||||
|
#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, MacOS X */
|
||||||
|
# if HAVE_ACL_TYPE_EXTENDED /* MacOS X */
|
||||||
|
/* acl_get_entry returns 0 when it successfully fetches an entry,
|
||||||
|
and -1/EINVAL at the end. */
|
||||||
|
acl_entry_t ace;
|
||||||
|
int got_one;
|
||||||
|
|
||||||
|
for (got_one = acl_get_entry (acl, ACL_FIRST_ENTRY, &ace);
|
||||||
|
got_one >= 0;
|
||||||
|
got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
|
||||||
|
count++;
|
||||||
|
# else /* Linux, FreeBSD */
|
||||||
|
/* acl_get_entry returns 1 when it successfully fetches an entry,
|
||||||
|
and 0 at the end. */
|
||||||
|
acl_entry_t ace;
|
||||||
|
int got_one;
|
||||||
|
|
||||||
|
for (got_one = acl_get_entry (acl, ACL_FIRST_ENTRY, &ace);
|
||||||
|
got_one > 0;
|
||||||
|
got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
|
||||||
|
count++;
|
||||||
|
if (got_one < 0)
|
||||||
return -1;
|
return -1;
|
||||||
for (t = text; *t; t++)
|
# endif
|
||||||
entries += (*t == '\n');
|
#else /* IRIX, Tru64 */
|
||||||
acl_free (text);
|
# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */
|
||||||
return entries;
|
/* Don't use acl_get_entry: it is undocumented. */
|
||||||
|
count = acl->acl_cnt;
|
||||||
|
# endif
|
||||||
|
# if HAVE_ACL_FREE_TEXT /* Tru64 */
|
||||||
|
/* Don't use acl_get_entry: it takes only one argument and does not
|
||||||
|
work. */
|
||||||
|
count = acl->acl_num;
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* alloca.c -- allocate automatically reclaimed memory
|
/* alloca.c -- allocate automatically reclaimed memory
|
||||||
(Mostly) portable public-domain implementation -- D A Gwyn
|
(Mostly) portable public-domain implementation -- D A Gwyn
|
||||||
|
|
||||||
@@ -486,4 +489,4 @@ i00afunc (long address)
|
|||||||
# endif /* CRAY */
|
# endif /* CRAY */
|
||||||
|
|
||||||
# endif /* no alloca */
|
# endif /* no alloca */
|
||||||
#endif /* not GCC version 2 */
|
#endif /* not GCC version 3 */
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* Memory allocation on the stack.
|
/* Memory allocation on the stack.
|
||||||
|
|
||||||
Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004, 2006 Free Software
|
Copyright (C) 1995, 1999, 2001-2004, 2006-2008 Free Software
|
||||||
Foundation, Inc.
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published
|
under the terms of the GNU General Public License as published
|
||||||
by the Free Software Foundation; either version 2, or (at your option)
|
by the Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -20,8 +23,8 @@
|
|||||||
|
|
||||||
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
|
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
|
||||||
means there is a real alloca function. */
|
means there is a real alloca function. */
|
||||||
#ifndef _GNULIB_ALLOCA_H
|
#ifndef _GL_ALLOCA_H
|
||||||
# define _GNULIB_ALLOCA_H
|
#define _GL_ALLOCA_H
|
||||||
|
|
||||||
/* alloca (N) returns a pointer to N bytes of memory
|
/* alloca (N) returns a pointer to N bytes of memory
|
||||||
allocated on the stack, which will last until the function returns.
|
allocated on the stack, which will last until the function returns.
|
||||||
@@ -42,6 +45,8 @@
|
|||||||
# elif defined _MSC_VER
|
# elif defined _MSC_VER
|
||||||
# include <malloc.h>
|
# include <malloc.h>
|
||||||
# define alloca _alloca
|
# define alloca _alloca
|
||||||
|
# elif defined __DECC && defined __VMS
|
||||||
|
# define alloca __ALLOCA
|
||||||
# else
|
# else
|
||||||
# include <stddef.h>
|
# include <stddef.h>
|
||||||
# ifdef __cplusplus
|
# ifdef __cplusplus
|
||||||
@@ -51,4 +56,4 @@ void *alloca (size_t);
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _GNULIB_ALLOCA_H */
|
#endif /* _GL_ALLOCA_H */
|
||||||
+23
-20
@@ -1,12 +1,12 @@
|
|||||||
/* xreadlink.c -- readlink wrapper to return the link name in malloc'd storage
|
/* readlink wrapper to return the link name in malloc'd storage.
|
||||||
|
Unlike xreadlink and xreadlink_with_size, don't ever call exit.
|
||||||
|
|
||||||
Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007 Free Software
|
Copyright (C) 2001, 2003-2007 Free Software Foundation, Inc.
|
||||||
Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -14,15 +14,13 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; see the file COPYING.
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by Jim Meyering <[email protected]> */
|
/* Written by Jim Meyering <[email protected]> */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "xreadlink.h"
|
#include "areadlink.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -47,18 +45,15 @@
|
|||||||
|
|
||||||
#define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX)
|
#define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX)
|
||||||
|
|
||||||
#include "xalloc.h"
|
|
||||||
|
|
||||||
/* Call readlink to get the symbolic link value of FILE.
|
/* Call readlink to get the symbolic link value of FILE.
|
||||||
SIZE is a hint as to how long the link is expected to be;
|
SIZE is a hint as to how long the link is expected to be;
|
||||||
typically it is taken from st_size. It need not be correct.
|
typically it is taken from st_size. It need not be correct.
|
||||||
Return a pointer to that NUL-terminated string in malloc'd storage.
|
Return a pointer to that NUL-terminated string in malloc'd storage.
|
||||||
If readlink fails, return NULL (caller may use errno to diagnose).
|
If readlink fails, malloc fails, or if the link value is longer
|
||||||
If malloc fails, or if the link value is longer than SSIZE_MAX :-),
|
than SSIZE_MAX, return NULL (caller may use errno to diagnose). */
|
||||||
give a diagnostic and exit. */
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
xreadlink_with_size (char const *file, size_t size)
|
areadlink_with_size (char const *file, size_t size)
|
||||||
{
|
{
|
||||||
/* Some buggy file systems report garbage in st_size. Defend
|
/* Some buggy file systems report garbage in st_size. Defend
|
||||||
against them by ignoring outlandish st_size values in the initial
|
against them by ignoring outlandish st_size values in the initial
|
||||||
@@ -74,9 +69,14 @@ xreadlink_with_size (char const *file, size_t size)
|
|||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
char *buffer = xmalloc (buf_size);
|
ssize_t r;
|
||||||
ssize_t r = readlink (file, buffer, buf_size);
|
size_t link_length;
|
||||||
size_t link_length = r;
|
char *buffer = malloc (buf_size);
|
||||||
|
|
||||||
|
if (buffer == NULL)
|
||||||
|
return NULL;
|
||||||
|
r = readlink (file, buffer, buf_size);
|
||||||
|
link_length = r;
|
||||||
|
|
||||||
/* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1
|
/* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1
|
||||||
with errno == ERANGE if the buffer is too small. */
|
with errno == ERANGE if the buffer is too small. */
|
||||||
@@ -100,6 +100,9 @@ xreadlink_with_size (char const *file, size_t size)
|
|||||||
else if (buf_size < MAXSIZE)
|
else if (buf_size < MAXSIZE)
|
||||||
buf_size = MAXSIZE;
|
buf_size = MAXSIZE;
|
||||||
else
|
else
|
||||||
xalloc_die ();
|
{
|
||||||
|
errno = ENOMEM;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
/* Read symbolic links without size limitation.
|
||||||
|
|
||||||
|
Copyright (C) 2001, 2003, 2004, 2007 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 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 <[email protected]> */
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
extern char *areadlink (char const *filename);
|
||||||
|
extern char *areadlink_with_size (char const *filename, size_t size_hint);
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -14,8 +14,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by David MacKenzie <[email protected]>
|
/* Written by David MacKenzie <[email protected]>
|
||||||
Modified by Akim Demaille <demaille@inf.enst.fr> */
|
Modified by Akim Demaille <demaille@inf.enst.fr> */
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004, 2005 Free Software
|
Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004, 2005 Free Software
|
||||||
Foundation, Inc.
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -14,8 +14,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by David MacKenzie <[email protected]>
|
/* Written by David MacKenzie <[email protected]>
|
||||||
Modified by Akim Demaille <demaille@inf.enst.fr> */
|
Modified by Akim Demaille <demaille@inf.enst.fr> */
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
/* Iterate over arguments from argv or --files0-from=FILE
|
||||||
|
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can 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 "argv-iter.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
struct argv_iterator
|
||||||
|
{
|
||||||
|
/* Test FP to determine whether in read-mode or argv-mode. */
|
||||||
|
/* file-mode: fp records position */
|
||||||
|
FILE *fp;
|
||||||
|
size_t item_idx;
|
||||||
|
char *tok;
|
||||||
|
size_t buf_len;
|
||||||
|
|
||||||
|
/* argv-mode: record just argv and current pointer */
|
||||||
|
char **arg_list;
|
||||||
|
char **p;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct argv_iterator *
|
||||||
|
argv_iter_init_argv (char **argv)
|
||||||
|
{
|
||||||
|
struct argv_iterator *ai = malloc (sizeof *ai);
|
||||||
|
if (!ai)
|
||||||
|
return NULL;
|
||||||
|
ai->fp = NULL;
|
||||||
|
ai->arg_list = argv;
|
||||||
|
ai->p = argv;
|
||||||
|
return ai;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize to read from the stream, FP.
|
||||||
|
The input is expected to contain a list of NUL-delimited tokens. */
|
||||||
|
struct argv_iterator *
|
||||||
|
argv_iter_init_stream (FILE *fp)
|
||||||
|
{
|
||||||
|
struct argv_iterator *ai = malloc (sizeof *ai);
|
||||||
|
if (!ai)
|
||||||
|
return NULL;
|
||||||
|
ai->fp = fp;
|
||||||
|
ai->tok = NULL;
|
||||||
|
ai->buf_len = 0;
|
||||||
|
|
||||||
|
ai->item_idx = 0;
|
||||||
|
ai->arg_list = NULL;
|
||||||
|
return ai;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
argv_iter (struct argv_iterator *ai, enum argv_iter_err *err)
|
||||||
|
{
|
||||||
|
if (ai->fp)
|
||||||
|
{
|
||||||
|
ssize_t len = getdelim (&ai->tok, &ai->buf_len, '\0', ai->fp);
|
||||||
|
if (len < 0)
|
||||||
|
{
|
||||||
|
*err = feof (ai->fp) ? AI_ERR_EOF : AI_ERR_READ;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*err = AI_ERR_OK;
|
||||||
|
ai->item_idx++;
|
||||||
|
return ai->tok;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (*(ai->p) == NULL)
|
||||||
|
{
|
||||||
|
*err = AI_ERR_EOF;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*err = AI_ERR_OK;
|
||||||
|
return *(ai->p++);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
argv_iter_n_args (struct argv_iterator const *ai)
|
||||||
|
{
|
||||||
|
return ai->fp ? ai->item_idx : ai->p - ai->arg_list;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
argv_iter_free (struct argv_iterator *ai)
|
||||||
|
{
|
||||||
|
if (ai->fp)
|
||||||
|
free (ai->tok);
|
||||||
|
free (ai);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Local variables:
|
||||||
|
* indent-tabs-mode: nil
|
||||||
|
* End:
|
||||||
|
*/
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/* Iterate over arguments from argv or --files0-from=FILE
|
||||||
|
Copyright (C) 2008-2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can 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/>. */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
struct argv_iterator;
|
||||||
|
enum argv_iter_err;
|
||||||
|
|
||||||
|
#undef _ATTRIBUTE_NONNULL_
|
||||||
|
#if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__
|
||||||
|
# define _ATTRIBUTE_NONNULL_(m) __attribute__ ((__nonnull__ (m)))
|
||||||
|
#else
|
||||||
|
# define _ATTRIBUTE_NONNULL_(m)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum argv_iter_err
|
||||||
|
{
|
||||||
|
AI_ERR_OK = 1,
|
||||||
|
AI_ERR_EOF,
|
||||||
|
AI_ERR_MEM,
|
||||||
|
AI_ERR_READ
|
||||||
|
};
|
||||||
|
|
||||||
|
struct argv_iterator *argv_iter_init_argv (char **argv)
|
||||||
|
_ATTRIBUTE_NONNULL_ (1);
|
||||||
|
struct argv_iterator *argv_iter_init_stream (FILE *fp)
|
||||||
|
_ATTRIBUTE_NONNULL_ (1);
|
||||||
|
char *argv_iter (struct argv_iterator *, enum argv_iter_err *)
|
||||||
|
_ATTRIBUTE_NONNULL_ (1) _ATTRIBUTE_NONNULL_ (2);
|
||||||
|
size_t argv_iter_n_args (struct argv_iterator const *)
|
||||||
|
_ATTRIBUTE_NONNULL_ (1);
|
||||||
|
void argv_iter_free (struct argv_iterator *)
|
||||||
|
_ATTRIBUTE_NONNULL_ (1);
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
/* Convert internet address from internal to printable, presentable format.
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
|
/* A GNU-like <arpa/inet.h>.
|
||||||
|
|
||||||
|
Copyright (C) 2005-2006, 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -15,11 +19,34 @@
|
|||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#ifndef _GL_ARPA_INET_H
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
|
|
||||||
|
/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
|
||||||
|
under MinGW. */
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
#if @HAVE_ARPA_INET_H@
|
||||||
|
|
||||||
|
# if __GNUC__ >= 3
|
||||||
|
@PRAGMA_SYSTEM_HEADER@
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* The include_next requires a split double-inclusion guard. */
|
||||||
|
# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _GL_ARPA_INET_H
|
||||||
|
#define _GL_ARPA_INET_H
|
||||||
|
|
||||||
|
/* The definition of GL_LINK_WARNING is copied here. */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if @GNULIB_INET_NTOP@
|
||||||
|
# if !@HAVE_DECL_INET_NTOP@
|
||||||
/* Converts an internet address from internal format to a printable,
|
/* Converts an internet address from internal format to a printable,
|
||||||
presentable format.
|
presentable format.
|
||||||
AF is an internet address family, such as AF_INET or AF_INET6.
|
AF is an internet address family, such as AF_INET or AF_INET6.
|
||||||
@@ -35,8 +62,32 @@
|
|||||||
|
|
||||||
For more details, see the POSIX:2001 specification
|
For more details, see the POSIX:2001 specification
|
||||||
<http://www.opengroup.org/susv3xsh/inet_ntop.html>. */
|
<http://www.opengroup.org/susv3xsh/inet_ntop.html>. */
|
||||||
|
|
||||||
#if !HAVE_DECL_INET_NTOP
|
|
||||||
extern const char *inet_ntop (int af, const void *restrict src,
|
extern const char *inet_ntop (int af, const void *restrict src,
|
||||||
char *restrict dst, socklen_t cnt);
|
char *restrict dst, socklen_t cnt);
|
||||||
|
# endif
|
||||||
|
#elif defined GNULIB_POSIXCHECK
|
||||||
|
# undef inet_ntop
|
||||||
|
# define inet_ntop(af,src,dst,cnt) \
|
||||||
|
(GL_LINK_WARNING ("inet_ntop is unportable - " \
|
||||||
|
"use gnulib module inet_ntop for portability"), \
|
||||||
|
inet_ntop (af, src, dst, cnt))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if @GNULIB_INET_PTON@
|
||||||
|
# if !@HAVE_DECL_INET_PTON@
|
||||||
|
extern int inet_pton (int af, const char *restrict src, void *restrict dst);
|
||||||
|
# endif
|
||||||
|
#elif defined GNULIB_POSIXCHECK
|
||||||
|
# undef inet_pton
|
||||||
|
# define inet_pton(af,src,dst) \
|
||||||
|
(GL_LINK_WARNING ("inet_pton is unportable - " \
|
||||||
|
"use gnulib module inet_pton for portability"), \
|
||||||
|
inet_pton (af, src, dst))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _GL_ARPA_INET_H */
|
||||||
|
#endif /* _GL_ARPA_INET_H */
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* Formatted output to strings.
|
/* Formatted output to strings.
|
||||||
Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* Formatted output to strings.
|
/* Formatted output to strings.
|
||||||
Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -18,7 +21,11 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
/* Specification. */
|
/* Specification. */
|
||||||
#include "vasprintf.h"
|
#ifdef IN_LIBASPRINTF
|
||||||
|
# include "vasprintf.h"
|
||||||
|
#else
|
||||||
|
# include <stdio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/* Define an at-style functions like fstatat, unlinkat, fchownat, etc.
|
/* Define an at-style functions like fstatat, unlinkat, fchownat, etc.
|
||||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -12,8 +12,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* written by Jim Meyering */
|
/* written by Jim Meyering */
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
|
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
|
||||||
Foundation, Inc.
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -15,9 +15,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; see the file COPYING.
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by Paul Eggert and David MacKenzie.
|
/* Written by Paul Eggert and David MacKenzie.
|
||||||
Some algorithms adapted from GNU Emacs. */
|
Some algorithms adapted from GNU Emacs. */
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
Copyright (C) 1990, 1991, 1992, 1997, 1998, 1999, 2003, 2004 Free
|
Copyright (C) 1990, 1991, 1992, 1997, 1998, 1999, 2003, 2004 Free
|
||||||
Software Foundation, Inc.
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -14,9 +14,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; see the file COPYING.
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#ifndef BACKUPFILE_H_
|
#ifndef BACKUPFILE_H_
|
||||||
# define BACKUPFILE_H_
|
# define BACKUPFILE_H_
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
/* -*- buffer-read-only: t -*- vi: set ro: */
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* base64.c -- Encode binary data using printable characters.
|
/* base64.c -- Encode binary data using printable characters.
|
||||||
Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006, 2007 Free Software
|
Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006 Free Software
|
||||||
Foundation, Inc.
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -452,20 +453,32 @@ decode_4 (char const *restrict in, size_t inlen,
|
|||||||
Initially, CTX must have been initialized via base64_decode_ctx_init.
|
Initially, CTX must have been initialized via base64_decode_ctx_init.
|
||||||
Subsequent calls to this function must reuse whatever state is recorded
|
Subsequent calls to this function must reuse whatever state is recorded
|
||||||
in that buffer. It is necessary for when a quadruple of base64 input
|
in that buffer. It is necessary for when a quadruple of base64 input
|
||||||
bytes spans two input buffers. */
|
bytes spans two input buffers.
|
||||||
|
|
||||||
|
If CTX is NULL then newlines are treated as garbage and the input
|
||||||
|
buffer is processed as a unit. */
|
||||||
|
|
||||||
bool
|
bool
|
||||||
base64_decode (struct base64_decode_context *ctx,
|
base64_decode_ctx (struct base64_decode_context *ctx,
|
||||||
const char *restrict in, size_t inlen,
|
const char *restrict in, size_t inlen,
|
||||||
char *restrict out, size_t *outlen)
|
char *restrict out, size_t *outlen)
|
||||||
{
|
{
|
||||||
size_t outleft = *outlen;
|
size_t outleft = *outlen;
|
||||||
bool flush_ctx = inlen == 0;
|
bool ignore_newlines = ctx != NULL;
|
||||||
|
bool flush_ctx = false;
|
||||||
|
unsigned int ctx_i = 0;
|
||||||
|
|
||||||
|
if (ignore_newlines)
|
||||||
|
{
|
||||||
|
ctx_i = ctx->i;
|
||||||
|
flush_ctx = inlen == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
size_t outleft_save = outleft;
|
size_t outleft_save = outleft;
|
||||||
if (ctx->i == 0 && !flush_ctx)
|
if (ctx_i == 0 && !flush_ctx)
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@@ -485,7 +498,7 @@ base64_decode (struct base64_decode_context *ctx,
|
|||||||
|
|
||||||
/* Handle the common case of 72-byte wrapped lines.
|
/* Handle the common case of 72-byte wrapped lines.
|
||||||
This also handles any other multiple-of-4-byte wrapping. */
|
This also handles any other multiple-of-4-byte wrapping. */
|
||||||
if (inlen && *in == '\n')
|
if (inlen && *in == '\n' && ignore_newlines)
|
||||||
{
|
{
|
||||||
++in;
|
++in;
|
||||||
--inlen;
|
--inlen;
|
||||||
@@ -498,12 +511,17 @@ base64_decode (struct base64_decode_context *ctx,
|
|||||||
|
|
||||||
{
|
{
|
||||||
char const *in_end = in + inlen;
|
char const *in_end = in + inlen;
|
||||||
char const *non_nl = get_4 (ctx, &in, in_end, &inlen);
|
char const *non_nl;
|
||||||
|
|
||||||
|
if (ignore_newlines)
|
||||||
|
non_nl = get_4 (ctx, &in, in_end, &inlen);
|
||||||
|
else
|
||||||
|
non_nl = in; /* Might have nl in this case. */
|
||||||
|
|
||||||
/* If the input is empty or consists solely of newlines (0 non-newlines),
|
/* If the input is empty or consists solely of newlines (0 non-newlines),
|
||||||
then we're done. Likewise if there are fewer than 4 bytes when not
|
then we're done. Likewise if there are fewer than 4 bytes when not
|
||||||
flushing context. */
|
flushing context and not treating newlines as garbage. */
|
||||||
if (inlen == 0 || (inlen < 4 && !flush_ctx))
|
if (inlen == 0 || (inlen < 4 && !flush_ctx && ignore_newlines))
|
||||||
{
|
{
|
||||||
inlen = 0;
|
inlen = 0;
|
||||||
break;
|
break;
|
||||||
@@ -532,7 +550,7 @@ base64_decode (struct base64_decode_context *ctx,
|
|||||||
input was invalid, in which case *OUT is NULL and *OUTLEN is
|
input was invalid, in which case *OUT is NULL and *OUTLEN is
|
||||||
undefined. */
|
undefined. */
|
||||||
bool
|
bool
|
||||||
base64_decode_alloc (struct base64_decode_context *ctx,
|
base64_decode_alloc_ctx (struct base64_decode_context *ctx,
|
||||||
const char *in, size_t inlen, char **out,
|
const char *in, size_t inlen, char **out,
|
||||||
size_t *outlen)
|
size_t *outlen)
|
||||||
{
|
{
|
||||||
@@ -547,7 +565,7 @@ base64_decode_alloc (struct base64_decode_context *ctx,
|
|||||||
if (!*out)
|
if (!*out)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!base64_decode (ctx, in, inlen, *out, &needlen))
|
if (!base64_decode_ctx (ctx, in, inlen, *out, &needlen))
|
||||||
{
|
{
|
||||||
free (*out);
|
free (*out);
|
||||||
*out = NULL;
|
*out = NULL;
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
/* -*- buffer-read-only: t -*- vi: set ro: */
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* base64.h -- Encode binary data using printable characters.
|
/* base64.h -- Encode binary data using printable characters.
|
||||||
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
Written by Simon Josefsson.
|
Written by Simon Josefsson.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -45,12 +46,19 @@ extern void base64_encode (const char *restrict in, size_t inlen,
|
|||||||
extern size_t base64_encode_alloc (const char *in, size_t inlen, char **out);
|
extern size_t base64_encode_alloc (const char *in, size_t inlen, char **out);
|
||||||
|
|
||||||
extern void base64_decode_ctx_init (struct base64_decode_context *ctx);
|
extern void base64_decode_ctx_init (struct base64_decode_context *ctx);
|
||||||
extern bool base64_decode (struct base64_decode_context *ctx,
|
|
||||||
|
extern bool base64_decode_ctx (struct base64_decode_context *ctx,
|
||||||
const char *restrict in, size_t inlen,
|
const char *restrict in, size_t inlen,
|
||||||
char *restrict out, size_t *outlen);
|
char *restrict out, size_t *outlen);
|
||||||
|
|
||||||
extern bool base64_decode_alloc (struct base64_decode_context *ctx,
|
extern bool base64_decode_alloc_ctx (struct base64_decode_context *ctx,
|
||||||
const char *in, size_t inlen,
|
const char *in, size_t inlen,
|
||||||
char **out, size_t *outlen);
|
char **out, size_t *outlen);
|
||||||
|
|
||||||
|
#define base64_decode(in, inlen, out, outlen) \
|
||||||
|
base64_decode_ctx (NULL, in, inlen, out, outlen)
|
||||||
|
|
||||||
|
#define base64_decode_alloc(in, inlen, out, outlen) \
|
||||||
|
base64_decode_alloc_ctx (NULL, in, inlen, out, outlen)
|
||||||
|
|
||||||
#endif /* BASE64_H */
|
#endif /* BASE64_H */
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free
|
Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free
|
||||||
Software Foundation, Inc.
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -14,8 +14,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/* Convert unibyte character to wide character.
|
||||||
|
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||||
|
Written by Bruno Haible <bruno@clisp.org>, 2008.
|
||||||
|
|
||||||
|
This program is free software: you can 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/>. */
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
/* Specification. */
|
||||||
|
#include <wchar.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
wint_t
|
||||||
|
btowc (int c)
|
||||||
|
{
|
||||||
|
if (c != EOF)
|
||||||
|
{
|
||||||
|
char buf[1];
|
||||||
|
wchar_t wc;
|
||||||
|
|
||||||
|
buf[0] = c;
|
||||||
|
if (mbtowc (&wc, buf, 1) >= 0)
|
||||||
|
return wc;
|
||||||
|
}
|
||||||
|
return WEOF;
|
||||||
|
}
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,8 +13,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by Paul Eggert. */
|
/* Written by Paul Eggert. */
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* Character handling in C locale.
|
/* Character handling in C locale.
|
||||||
|
|
||||||
Copyright 2000-2003, 2006 Free Software Foundation, Inc.
|
Copyright 2000-2003, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* Character handling in C locale.
|
/* Character handling in C locale.
|
||||||
|
|
||||||
These functions work like the corresponding functions in <ctype.h>,
|
These functions work like the corresponding functions in <ctype.h>,
|
||||||
@@ -5,11 +8,11 @@
|
|||||||
<ctype.h> functions' behaviour depends on the current locale set via
|
<ctype.h> functions' behaviour depends on the current locale set via
|
||||||
setlocale.
|
setlocale.
|
||||||
|
|
||||||
Copyright (C) 2000-2003, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2000-2003, 2006, 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -103,6 +106,21 @@ extern "C" {
|
|||||||
|
|
||||||
/* Function declarations. */
|
/* Function declarations. */
|
||||||
|
|
||||||
|
/* Unlike the functions in <ctype.h>, which require an argument in the range
|
||||||
|
of the 'unsigned char' type, the functions here operate on values that are
|
||||||
|
in the 'unsigned char' range or in the 'char' range. In other words,
|
||||||
|
when you have a 'char' value, you need to cast it before using it as
|
||||||
|
argument to a <ctype.h> function:
|
||||||
|
|
||||||
|
const char *s = ...;
|
||||||
|
if (isalpha ((unsigned char) *s)) ...
|
||||||
|
|
||||||
|
but you don't need to cast it for the functions defined in this file:
|
||||||
|
|
||||||
|
const char *s = ...;
|
||||||
|
if (c_isalpha (*s)) ...
|
||||||
|
*/
|
||||||
|
|
||||||
extern bool c_isascii (int c); /* not locale dependent */
|
extern bool c_isascii (int c); /* not locale dependent */
|
||||||
|
|
||||||
extern bool c_isalnum (int c);
|
extern bool c_isalnum (int c);
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* Case-insensitive string comparison functions in C locale.
|
/* Case-insensitive string comparison functions in C locale.
|
||||||
Copyright (C) 1995-1996, 2001, 2003, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1995-1996, 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* c-strcasecmp.c -- case insensitive string comparator in C locale
|
/* c-strcasecmp.c -- case insensitive string comparator in C locale
|
||||||
Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc.
|
Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
/* c-strncasecmp.c -- case insensitive string comparator in C locale
|
/* c-strncasecmp.c -- case insensitive string comparator in C locale
|
||||||
Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc.
|
Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/* Convert string to double, using the C locale.
|
/* Convert string to double, using the C locale.
|
||||||
|
|
||||||
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2003, 2004, 2006, 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,8 +13,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by Paul Eggert. */
|
/* Written by Paul Eggert. */
|
||||||
|
|
||||||
@@ -22,10 +21,10 @@
|
|||||||
|
|
||||||
#include "c-strtod.h"
|
#include "c-strtod.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include "xalloc.h"
|
|
||||||
|
|
||||||
#if LONG
|
#if LONG
|
||||||
# define C_STRTOD c_strtold
|
# define C_STRTOD c_strtold
|
||||||
@@ -44,6 +43,25 @@
|
|||||||
# define STRTOD strtod
|
# define STRTOD strtod
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef LC_ALL_MASK
|
||||||
|
|
||||||
|
/* Cache for the C locale object.
|
||||||
|
Marked volatile so that different threads see the same value
|
||||||
|
(avoids locking). */
|
||||||
|
static volatile locale_t c_locale_cache;
|
||||||
|
|
||||||
|
/* Return the C locale object, or (locale_t) 0 with errno set
|
||||||
|
if it cannot be created. */
|
||||||
|
static inline locale_t
|
||||||
|
c_locale (void)
|
||||||
|
{
|
||||||
|
if (!c_locale_cache)
|
||||||
|
c_locale_cache = newlocale (LC_ALL_MASK, "C", (locale_t) 0);
|
||||||
|
return c_locale_cache;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
DOUBLE
|
DOUBLE
|
||||||
C_STRTOD (char const *nptr, char **endptr)
|
C_STRTOD (char const *nptr, char **endptr)
|
||||||
{
|
{
|
||||||
@@ -51,9 +69,15 @@ C_STRTOD (char const *nptr, char **endptr)
|
|||||||
|
|
||||||
#ifdef LC_ALL_MASK
|
#ifdef LC_ALL_MASK
|
||||||
|
|
||||||
locale_t c_locale = newlocale (LC_ALL_MASK, "C", 0);
|
locale_t locale = c_locale ();
|
||||||
r = STRTOD_L (nptr, endptr, c_locale);
|
if (!locale)
|
||||||
freelocale (c_locale);
|
{
|
||||||
|
if (endptr)
|
||||||
|
*endptr = (char *) nptr;
|
||||||
|
return 0; /* errno is set here */
|
||||||
|
}
|
||||||
|
|
||||||
|
r = STRTOD_L (nptr, endptr, locale);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -61,7 +85,13 @@ C_STRTOD (char const *nptr, char **endptr)
|
|||||||
|
|
||||||
if (saved_locale)
|
if (saved_locale)
|
||||||
{
|
{
|
||||||
saved_locale = xstrdup (saved_locale);
|
saved_locale = strdup (saved_locale);
|
||||||
|
if (saved_locale == NULL)
|
||||||
|
{
|
||||||
|
if (endptr)
|
||||||
|
*endptr = (char *) nptr;
|
||||||
|
return 0; /* errno is set here */
|
||||||
|
}
|
||||||
setlocale (LC_NUMERIC, "C");
|
setlocale (LC_NUMERIC, "C");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,8 +99,11 @@ C_STRTOD (char const *nptr, char **endptr)
|
|||||||
|
|
||||||
if (saved_locale)
|
if (saved_locale)
|
||||||
{
|
{
|
||||||
|
int saved_errno = errno;
|
||||||
|
|
||||||
setlocale (LC_NUMERIC, saved_locale);
|
setlocale (LC_NUMERIC, saved_locale);
|
||||||
free (saved_locale);
|
free (saved_locale);
|
||||||
|
errno = saved_errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,2 +1,37 @@
|
|||||||
double c_strtod (char const *, char **);
|
/* Convert string to double, using the C locale.
|
||||||
long double c_strtold (char const *, char **);
|
|
||||||
|
Copyright (C) 2003-2004, 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can 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/>. */
|
||||||
|
|
||||||
|
/* Parse the initial portion of the string pointed to by NPTR as a floating-
|
||||||
|
point number (in decimal or hexadecimal notation), like in the C locale:
|
||||||
|
accepting only the ASCII digits '0'..'9', and only '.' as decimal point
|
||||||
|
character.
|
||||||
|
If ENDPTR is not NULL, set *ENDPTR to point to the first byte beyond the
|
||||||
|
parsed number or to NPTR if the string does not start with a parseable
|
||||||
|
number.
|
||||||
|
Return value:
|
||||||
|
- If successful, return the value as a double or 'long double',
|
||||||
|
respectively, and don't modify errno.
|
||||||
|
- In case of overflow, return ±HUGE_VAL or ±HUGE_VALL, respectively, and
|
||||||
|
set errno to ERANGE.
|
||||||
|
- In case of underflow, return a value very near to 0 and set errno to
|
||||||
|
ERANGE.
|
||||||
|
- If the string does not start with a number at all, return 0 (and recall
|
||||||
|
that if ENDPTR != NULL, *ENDPTR is set to NPTR), and maybe set errno to
|
||||||
|
EINVAL.
|
||||||
|
- In case of other error, return 0 and set errno, for example to ENOMEM. */
|
||||||
|
extern double c_strtod (char const *nptr, char **endptr);
|
||||||
|
extern long double c_strtold (char const *nptr, char **endptr);
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/* calloc() function that is glibc compatible.
|
/* calloc() function that is glibc compatible.
|
||||||
This wrapper function is required at least on Tru64 UNIX 5.1.
|
This wrapper function is required at least on Tru64 UNIX 5.1 and mingw.
|
||||||
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,32 +13,58 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* written by Jim Meyering */
|
/* written by Jim Meyering and Bruno Haible */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#undef calloc
|
/* Only the AC_FUNC_CALLOC macro defines 'calloc' already in config.h. */
|
||||||
|
#ifdef calloc
|
||||||
|
# define NEED_CALLOC_GNU
|
||||||
|
# undef calloc
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Specification. */
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
/* Call the system's calloc below. */
|
||||||
|
#undef calloc
|
||||||
|
|
||||||
/* Allocate and zero-fill an NxS-byte block of memory from the heap.
|
/* Allocate and zero-fill an NxS-byte block of memory from the heap.
|
||||||
If N or S is zero, allocate and zero-fill a 1-byte block. */
|
If N or S is zero, allocate and zero-fill a 1-byte block. */
|
||||||
|
|
||||||
void *
|
void *
|
||||||
rpl_calloc (size_t n, size_t s)
|
rpl_calloc (size_t n, size_t s)
|
||||||
{
|
{
|
||||||
size_t bytes;
|
void *result;
|
||||||
|
|
||||||
|
#ifdef NEED_CALLOC_GNU
|
||||||
if (n == 0 || s == 0)
|
if (n == 0 || s == 0)
|
||||||
return calloc (1, 1);
|
{
|
||||||
|
n = 1;
|
||||||
|
s = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
/* Defend against buggy calloc implementations that mishandle
|
/* Defend against buggy calloc implementations that mishandle
|
||||||
size_t overflow. */
|
size_t overflow. */
|
||||||
bytes = n * s;
|
size_t bytes = n * s;
|
||||||
if (bytes / s != n)
|
if (bytes / s != n)
|
||||||
|
{
|
||||||
|
errno = ENOMEM;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return calloc (n, s);
|
result = calloc (n, s);
|
||||||
|
|
||||||
|
#if !HAVE_CALLOC_POSIX
|
||||||
|
if (result == NULL)
|
||||||
|
errno = ENOMEM;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,28 @@
|
|||||||
/* Host name canonicalization
|
/* Host name canonicalization
|
||||||
|
|
||||||
Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Written by Derek Price <derek@ximbiot.com>.
|
Written by Derek Price <derek@ximbiot.com>.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software: you can redistribute it and/or modify
|
||||||
modify it under the terms of the GNU General Public License as
|
it under the terms of the GNU General Public License as published by
|
||||||
published by the Free Software Foundation; either version 2, or (at
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
your option) any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful, but
|
This program is distributed in the hope that it will be useful,
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "canon-host.h"
|
#include "canon-host.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <netdb.h>
|
||||||
#include "getaddrinfo.h"
|
|
||||||
|
|
||||||
/* Store the last error for the single-threaded version of this function. */
|
/* Store the last error for the single-threaded version of this function. */
|
||||||
static int last_cherror;
|
static int last_cherror;
|
||||||
|
|||||||
@@ -4,19 +4,18 @@
|
|||||||
|
|
||||||
Written by Derek Price <derek@ximbiot.com>
|
Written by Derek Price <derek@ximbiot.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software: you can redistribute it and/or modify
|
||||||
modify it under the terms of the GNU General Public License as
|
it under the terms of the GNU General Public License as published by
|
||||||
published by the Free Software Foundation; either version 2, or (at
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
your option) any later version.
|
any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful, but
|
This program is distributed in the hope that it will be useful,
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#ifndef CANON_HOST_H
|
#ifndef CANON_HOST_H
|
||||||
# define CANON_HOST_H 1
|
# define CANON_HOST_H 1
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/* Return the canonical absolute name of a given file.
|
/* Return the canonical absolute name of a given file.
|
||||||
Copyright (C) 1996-2007 Free Software Foundation, Inc.
|
Copyright (C) 1996-2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -12,9 +12,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; see the file COPYING.
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -34,8 +32,9 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "cycle-check.h"
|
#include "file-set.h"
|
||||||
#include "filenamecat.h"
|
#include "filenamecat.h"
|
||||||
|
#include "hash-triple.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
#include "xgetcwd.h"
|
#include "xgetcwd.h"
|
||||||
|
|
||||||
@@ -47,9 +46,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "pathmax.h"
|
#include "pathmax.h"
|
||||||
#include "xreadlink.h"
|
#include "areadlink.h"
|
||||||
|
|
||||||
#if !HAVE_CANONICALIZE_FILE_NAME
|
#if !(HAVE_CANONICALIZE_FILE_NAME || GNULIB_CANONICALIZE_LGPL)
|
||||||
/* Return the canonical absolute name of file NAME. A canonical name
|
/* Return the canonical absolute name of file NAME. A canonical name
|
||||||
does not contain any `.', `..' components nor any repeated file name
|
does not contain any `.', `..' components nor any repeated file name
|
||||||
separators ('/') or symlinks. All components must exist.
|
separators ('/') or symlinks. All components must exist.
|
||||||
@@ -123,6 +122,30 @@ canonicalize_file_name (const char *name)
|
|||||||
}
|
}
|
||||||
#endif /* !HAVE_CANONICALIZE_FILE_NAME */
|
#endif /* !HAVE_CANONICALIZE_FILE_NAME */
|
||||||
|
|
||||||
|
/* Return true if we've already seen the triple, <FILENAME, dev, ino>.
|
||||||
|
If *HT is not initialized, initialize it. */
|
||||||
|
static bool
|
||||||
|
seen_triple (Hash_table **ht, char const *filename, struct stat const *st)
|
||||||
|
{
|
||||||
|
if (*ht == NULL)
|
||||||
|
{
|
||||||
|
size_t initial_capacity = 7;
|
||||||
|
*ht = hash_initialize (initial_capacity,
|
||||||
|
NULL,
|
||||||
|
triple_hash,
|
||||||
|
triple_compare_ino_str,
|
||||||
|
triple_free);
|
||||||
|
if (*ht == NULL)
|
||||||
|
xalloc_die ();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (seen_file (*ht, filename, st))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
record_file (*ht, filename, st);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* Return the canonical absolute name of file NAME. A canonical name
|
/* Return the canonical absolute name of file NAME. A canonical name
|
||||||
does not contain any `.', `..' components nor any repeated file name
|
does not contain any `.', `..' components nor any repeated file name
|
||||||
separators ('/') or symlinks. Whether components must exist
|
separators ('/') or symlinks. Whether components must exist
|
||||||
@@ -136,7 +159,7 @@ canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode)
|
|||||||
char const *end;
|
char const *end;
|
||||||
char const *rname_limit;
|
char const *rname_limit;
|
||||||
size_t extra_len = 0;
|
size_t extra_len = 0;
|
||||||
struct cycle_check_state cycle_state;
|
Hash_table *ht = NULL;
|
||||||
|
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
{
|
{
|
||||||
@@ -176,7 +199,6 @@ canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode)
|
|||||||
dest = rname + 1;
|
dest = rname + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cycle_check_init (&cycle_state);
|
|
||||||
for (start = end = name; *start; start = end)
|
for (start = end = name; *start; start = end)
|
||||||
{
|
{
|
||||||
/* Skip sequence of multiple file name separators. */
|
/* Skip sequence of multiple file name separators. */
|
||||||
@@ -237,7 +259,11 @@ canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode)
|
|||||||
char *buf;
|
char *buf;
|
||||||
size_t n, len;
|
size_t n, len;
|
||||||
|
|
||||||
if (cycle_check (&cycle_state, &st))
|
/* Detect loops. We cannot use the cycle-check module here,
|
||||||
|
since it's actually possible to encounter the same symlink
|
||||||
|
more than once in a given traversal. However, encountering
|
||||||
|
the same symlink,NAME pair twice does indicate a loop. */
|
||||||
|
if (seen_triple (&ht, name, &st))
|
||||||
{
|
{
|
||||||
__set_errno (ELOOP);
|
__set_errno (ELOOP);
|
||||||
if (can_mode == CAN_MISSING)
|
if (can_mode == CAN_MISSING)
|
||||||
@@ -246,10 +272,10 @@ canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = xreadlink_with_size (rname, st.st_size);
|
buf = areadlink_with_size (rname, st.st_size);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
{
|
{
|
||||||
if (can_mode == CAN_MISSING)
|
if (can_mode == CAN_MISSING && errno != ENOMEM)
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
goto error;
|
goto error;
|
||||||
@@ -298,10 +324,14 @@ canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode)
|
|||||||
*dest = '\0';
|
*dest = '\0';
|
||||||
|
|
||||||
free (extra_buf);
|
free (extra_buf);
|
||||||
|
if (ht)
|
||||||
|
hash_free (ht);
|
||||||
return rname;
|
return rname;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
free (extra_buf);
|
free (extra_buf);
|
||||||
free (rname);
|
free (rname);
|
||||||
|
if (ht)
|
||||||
|
hash_free (ht);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/* Return the canonical absolute name of a given file.
|
/* Return the canonical absolute name of a given file.
|
||||||
Copyright (C) 1996-2007 Free Software Foundation, Inc.
|
Copyright (C) 1996-2007 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -12,9 +12,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; see the file COPYING.
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#ifndef CANONICALIZE_H_
|
#ifndef CANONICALIZE_H_
|
||||||
# define CANONICALIZE_H_
|
# define CANONICALIZE_H_
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
|
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
|
||||||
Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -12,8 +12,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* written by Jim Meyering */
|
/* written by Jim Meyering */
|
||||||
|
|
||||||
@@ -206,7 +205,6 @@ chdir_long (char *dir)
|
|||||||
|
|
||||||
#if TEST_CHDIR
|
#if TEST_CHDIR
|
||||||
|
|
||||||
# include <stdio.h>
|
|
||||||
# include "closeout.h"
|
# include "closeout.h"
|
||||||
# include "error.h"
|
# include "error.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
|
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
|
||||||
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -12,8 +12,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by Jim Meyering. */
|
/* Written by Jim Meyering. */
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
Copyright (C) 1997, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
Copyright (C) 1997, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -14,8 +14,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* written by Jim Meyering */
|
/* written by Jim Meyering */
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
Copyright (C) 1991, 2004, 2005, 2006 Free Software Foundation, Inc.
|
Copyright (C) 1991, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,8 +13,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
The code is taken from glibc/manual/llio.texi */
|
The code is taken from glibc/manual/llio.texi */
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
|
/* Hook for making the close() function extensible.
|
||||||
|
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||||
|
Written by Bruno Haible <bruno@clisp.org>, 2009.
|
||||||
|
|
||||||
|
This program is free software: you can 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
|
||||||
|
Lesser 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/>. */
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
/* Specification. */
|
||||||
|
#include "close-hook.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#undef close
|
||||||
|
|
||||||
|
|
||||||
|
/* Currently, this entire code is only needed for the handling of sockets
|
||||||
|
on native Windows platforms. */
|
||||||
|
#if WINDOWS_SOCKETS
|
||||||
|
|
||||||
|
/* The first and last link in the doubly linked list.
|
||||||
|
Initially the list is empty. */
|
||||||
|
static struct close_hook anchor = { &anchor, &anchor, NULL };
|
||||||
|
|
||||||
|
int
|
||||||
|
execute_close_hooks (int fd, const struct close_hook *remaining_list)
|
||||||
|
{
|
||||||
|
if (remaining_list == &anchor)
|
||||||
|
/* End of list reached. */
|
||||||
|
return close (fd);
|
||||||
|
else
|
||||||
|
return remaining_list->private_fn (fd, remaining_list->private_next);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
execute_all_close_hooks (int fd)
|
||||||
|
{
|
||||||
|
return execute_close_hooks (fd, anchor.private_next);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
register_close_hook (close_hook_fn hook, struct close_hook *link)
|
||||||
|
{
|
||||||
|
if (link->private_next == NULL && link->private_prev == NULL)
|
||||||
|
{
|
||||||
|
/* Add the link to the doubly linked list. */
|
||||||
|
link->private_next = anchor.private_next;
|
||||||
|
link->private_prev = &anchor;
|
||||||
|
link->private_fn = hook;
|
||||||
|
anchor.private_next->private_prev = link;
|
||||||
|
anchor.private_next = link;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* The link is already in use. */
|
||||||
|
if (link->private_fn != hook)
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
unregister_close_hook (struct close_hook *link)
|
||||||
|
{
|
||||||
|
struct close_hook *next = link->private_next;
|
||||||
|
struct close_hook *prev = link->private_prev;
|
||||||
|
|
||||||
|
if (next != NULL && prev != NULL)
|
||||||
|
{
|
||||||
|
/* The link is in use. Remove it from the doubly linked list. */
|
||||||
|
prev->private_next = next;
|
||||||
|
next->private_prev = prev;
|
||||||
|
/* Clear the link, to mark it unused. */
|
||||||
|
link->private_next = NULL;
|
||||||
|
link->private_prev = NULL;
|
||||||
|
link->private_fn = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
#line 1
|
||||||
|
/* Hook for making the close() function extensible.
|
||||||
|
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can 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
|
||||||
|
Lesser 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/>. */
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef CLOSE_HOOK_H
|
||||||
|
#define CLOSE_HOOK_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Currently, this entire code is only needed for the handling of sockets
|
||||||
|
on native Windows platforms. */
|
||||||
|
#if WINDOWS_SOCKETS
|
||||||
|
|
||||||
|
|
||||||
|
/* An element of the list of close hooks.
|
||||||
|
The fields of this structure are considered private. */
|
||||||
|
struct close_hook
|
||||||
|
{
|
||||||
|
/* Doubly linked list. */
|
||||||
|
struct close_hook *private_next;
|
||||||
|
struct close_hook *private_prev;
|
||||||
|
/* Function that treats the types of FD that it knows about and calls
|
||||||
|
execute_close_hooks (FD, REMAINING_LIST) as a fallback. */
|
||||||
|
int (*private_fn) (int fd, const struct close_hook *remaining_list);
|
||||||
|
};
|
||||||
|
|
||||||
|
/* This type of function closes FD, applying special knowledge for the FD
|
||||||
|
types it knows about, and calls execute_close_hooks (FD, REMAINING_LIST)
|
||||||
|
for the other FD types. */
|
||||||
|
typedef int (*close_hook_fn) (int fd, const struct close_hook *remaining_list);
|
||||||
|
|
||||||
|
/* Execute the close hooks in REMAINING_LIST.
|
||||||
|
Return 0 or -1, like close() would do. */
|
||||||
|
extern int execute_close_hooks (int fd, const struct close_hook *remaining_list);
|
||||||
|
|
||||||
|
/* Execute all close hooks.
|
||||||
|
Return 0 or -1, like close() would do. */
|
||||||
|
extern int execute_all_close_hooks (int fd);
|
||||||
|
|
||||||
|
/* Add a function to the list of close hooks.
|
||||||
|
The LINK variable points to a piece of memory which is guaranteed to be
|
||||||
|
accessible until the corresponding call to unregister_close_hook. */
|
||||||
|
extern void register_close_hook (close_hook_fn hook, struct close_hook *link);
|
||||||
|
|
||||||
|
/* Removes a function from the list of close hooks. */
|
||||||
|
extern void unregister_close_hook (struct close_hook *link);
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* CLOSE_HOOK_H */
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
/* Close a stream, with nicer error checking than fclose's.
|
/* Close a stream, with nicer error checking than fclose's.
|
||||||
|
|
||||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006 Free
|
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2007, 2008 Free
|
||||||
Software Foundation, Inc.
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -14,8 +14,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -24,7 +23,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "__fpending.h"
|
#include "fpending.h"
|
||||||
|
|
||||||
#if USE_UNLOCKED_IO
|
#if USE_UNLOCKED_IO
|
||||||
# include "unlocked-io.h"
|
# include "unlocked-io.h"
|
||||||
@@ -34,6 +33,10 @@
|
|||||||
otherwise. A failure might set errno to 0 if the error number
|
otherwise. A failure might set errno to 0 if the error number
|
||||||
cannot be determined.
|
cannot be determined.
|
||||||
|
|
||||||
|
A failure with errno set to EPIPE may or may not indicate an error
|
||||||
|
situation worth signaling to the user. See the documentation of the
|
||||||
|
close_stdout_set_ignore_EPIPE function for details.
|
||||||
|
|
||||||
If a program writes *anything* to STREAM, that program should close
|
If a program writes *anything* to STREAM, that program should close
|
||||||
STREAM and make sure that it succeeds before exiting. Otherwise,
|
STREAM and make sure that it succeeds before exiting. Otherwise,
|
||||||
suppose that you go to the extreme of checking the return status
|
suppose that you go to the extreme of checking the return status
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/* close replacement.
|
||||||
|
Copyright (C) 2008-2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can 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/>. */
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
/* Specification. */
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "close-hook.h"
|
||||||
|
|
||||||
|
/* Override close() to call into other gnulib modules. */
|
||||||
|
|
||||||
|
int
|
||||||
|
rpl_close (int fd)
|
||||||
|
#undef close
|
||||||
|
{
|
||||||
|
#if WINDOWS_SOCKETS
|
||||||
|
int retval = execute_all_close_hooks (fd);
|
||||||
|
#else
|
||||||
|
int retval = close (fd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef FCHDIR_REPLACEMENT
|
||||||
|
if (retval >= 0)
|
||||||
|
_gl_unregister_fd (fd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
/* Close standard input, rewinding seekable stdin if necessary.
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 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/>. */
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
#include "closein.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "gettext.h"
|
||||||
|
#define _(msgid) gettext (msgid)
|
||||||
|
|
||||||
|
#include "close-stream.h"
|
||||||
|
#include "closeout.h"
|
||||||
|
#include "error.h"
|
||||||
|
#include "exitfail.h"
|
||||||
|
#include "freadahead.h"
|
||||||
|
#include "quotearg.h"
|
||||||
|
|
||||||
|
static const char *file_name;
|
||||||
|
|
||||||
|
/* Set the file name to be reported in the event an error is detected
|
||||||
|
on stdin by close_stdin. See also close_stdout_set_file_name, if
|
||||||
|
an error is detected when closing stdout. */
|
||||||
|
void
|
||||||
|
close_stdin_set_file_name (const char *file)
|
||||||
|
{
|
||||||
|
file_name = file;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Close standard input, rewinding any unused input if stdin is
|
||||||
|
seekable. On error, issue a diagnostic and _exit with status
|
||||||
|
'exit_failure'. Then call close_stdout.
|
||||||
|
|
||||||
|
Most programs can get by with close_stdout. close_stdin is only
|
||||||
|
needed when a program wants to guarantee that partially read input
|
||||||
|
from seekable stdin is not consumed, for any subsequent clients.
|
||||||
|
For example, POSIX requires that these two commands behave alike:
|
||||||
|
|
||||||
|
(sed -ne 1q; cat) < file
|
||||||
|
tail -n 1 file
|
||||||
|
|
||||||
|
Since close_stdin is commonly registered via 'atexit', POSIX
|
||||||
|
and the C standard both say that it should not call 'exit',
|
||||||
|
because the behavior is undefined if 'exit' is called more than
|
||||||
|
once. So it calls '_exit' instead of 'exit'. If close_stdin
|
||||||
|
is registered via atexit before other functions are registered,
|
||||||
|
the other functions can act before this _exit is invoked.
|
||||||
|
|
||||||
|
Applications that use close_stdout should flush any streams other
|
||||||
|
than stdin, stdout, and stderr before exiting, since the call to
|
||||||
|
_exit will bypass other buffer flushing. Applications should be
|
||||||
|
flushing and closing other streams anyway, to check for I/O errors.
|
||||||
|
Also, applications should not use tmpfile, since _exit can bypass
|
||||||
|
the removal of these files.
|
||||||
|
|
||||||
|
It's important to detect such failures and exit nonzero because many
|
||||||
|
tools (most notably `make' and other build-management systems) depend
|
||||||
|
on being able to detect failure in other tools via their exit status. */
|
||||||
|
|
||||||
|
void
|
||||||
|
close_stdin (void)
|
||||||
|
{
|
||||||
|
bool fail = false;
|
||||||
|
|
||||||
|
/* There is no need to flush stdin if we can determine quickly that stdin's
|
||||||
|
input buffer is empty; in this case we know that if stdin is seekable,
|
||||||
|
fseeko (stdin, 0, SEEK_CUR) == lseek (0, 0, SEEK_CUR). */
|
||||||
|
if (freadahead (stdin) > 0)
|
||||||
|
{
|
||||||
|
/* Only attempt flush if stdin is seekable, as fflush is entitled to
|
||||||
|
fail on non-seekable streams. */
|
||||||
|
if (fseeko (stdin, 0, SEEK_CUR) == 0 && fflush (stdin) != 0)
|
||||||
|
fail = true;
|
||||||
|
}
|
||||||
|
if (close_stream (stdin) != 0)
|
||||||
|
fail = true;
|
||||||
|
if (fail)
|
||||||
|
{
|
||||||
|
/* Report failure, but defer exit until after closing stdout,
|
||||||
|
since the failure report should still be flushed. */
|
||||||
|
char const *close_error = _("error closing file");
|
||||||
|
if (file_name)
|
||||||
|
error (0, errno, "%s: %s", quotearg_colon (file_name),
|
||||||
|
close_error);
|
||||||
|
else
|
||||||
|
error (0, errno, "%s", close_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
close_stdout ();
|
||||||
|
|
||||||
|
if (fail)
|
||||||
|
_exit (exit_failure);
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/* Close standard input, rewinding seekable stdin if necessary.
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 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/>. */
|
||||||
|
|
||||||
|
#ifndef _GL_CLOSEIN_H
|
||||||
|
# define _GL_CLOSEIN_H 1
|
||||||
|
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
# endif
|
||||||
|
|
||||||
|
void close_stdin_set_file_name (const char *file);
|
||||||
|
void close_stdin (void);
|
||||||
|
|
||||||
|
# ifdef __cplusplus
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
/* Close standard output and standard error, exiting with a diagnostic on error.
|
/* Close standard output and standard error, exiting with a diagnostic on error.
|
||||||
|
|
||||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006 Free
|
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2008 Free
|
||||||
Software Foundation, Inc.
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -14,14 +14,14 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "closeout.h"
|
#include "closeout.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@@ -43,6 +43,43 @@ close_stdout_set_file_name (const char *file)
|
|||||||
file_name = file;
|
file_name = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool ignore_EPIPE /* = false */;
|
||||||
|
|
||||||
|
/* Specify the reaction to an EPIPE error during the closing of stdout:
|
||||||
|
- If ignore = true, it shall be ignored.
|
||||||
|
- If ignore = false, it shall evoke a diagnostic, along with a nonzero
|
||||||
|
exit status.
|
||||||
|
The default is ignore = false.
|
||||||
|
|
||||||
|
This setting matters only if the SIGPIPE signal is ignored (i.e. its
|
||||||
|
handler set to SIG_IGN) or blocked. Only particular programs need to
|
||||||
|
temporarily ignore SIGPIPE. If SIGPIPE is ignored or blocked because
|
||||||
|
it was ignored or blocked in the parent process when it created the
|
||||||
|
child process, it usually is a bug in the parent process: It is bad
|
||||||
|
practice to have SIGPIPE ignored or blocked while creating a child
|
||||||
|
process.
|
||||||
|
|
||||||
|
EPIPE occurs when writing to a pipe or socket that has no readers now,
|
||||||
|
when SIGPIPE is ignored or blocked.
|
||||||
|
|
||||||
|
The ignore = false setting is suitable for a scenario where it is normally
|
||||||
|
guaranteed that the pipe writer terminates before the pipe reader. In
|
||||||
|
this case, an EPIPE is an indication of a premature termination of the
|
||||||
|
pipe reader and should lead to a diagnostic and a nonzero exit status.
|
||||||
|
|
||||||
|
The ignore = true setting is suitable for a scenario where you don't know
|
||||||
|
ahead of time whether the pipe writer or the pipe reader will terminate
|
||||||
|
first. In this case, an EPIPE is an indication that the pipe writer can
|
||||||
|
stop doing useless write() calls; this is what close_stdout does anyway.
|
||||||
|
EPIPE is part of the normal pipe/socket shutdown protocol in this case,
|
||||||
|
and should not lead to a diagnostic message. */
|
||||||
|
|
||||||
|
void
|
||||||
|
close_stdout_set_ignore_EPIPE (bool ignore)
|
||||||
|
{
|
||||||
|
ignore_EPIPE = ignore;
|
||||||
|
}
|
||||||
|
|
||||||
/* Close standard output. On error, issue a diagnostic and _exit
|
/* Close standard output. On error, issue a diagnostic and _exit
|
||||||
with status 'exit_failure'.
|
with status 'exit_failure'.
|
||||||
|
|
||||||
@@ -69,7 +106,8 @@ close_stdout_set_file_name (const char *file)
|
|||||||
void
|
void
|
||||||
close_stdout (void)
|
close_stdout (void)
|
||||||
{
|
{
|
||||||
if (close_stream (stdout) != 0)
|
if (close_stream (stdout) != 0
|
||||||
|
&& !(ignore_EPIPE && errno == EPIPE))
|
||||||
{
|
{
|
||||||
char const *write_error = _("write error");
|
char const *write_error = _("write error");
|
||||||
if (file_name)
|
if (file_name)
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
/* Close standard output and standard error.
|
/* Close standard output and standard error.
|
||||||
|
|
||||||
Copyright (C) 1998, 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
|
Copyright (C) 1998, 2000, 2003, 2004, 2006, 2008 Free Software Foundation,
|
||||||
|
Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,17 +14,19 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#ifndef CLOSEOUT_H
|
#ifndef CLOSEOUT_H
|
||||||
# define CLOSEOUT_H 1
|
# define CLOSEOUT_H 1
|
||||||
|
|
||||||
|
# include <stdbool.h>
|
||||||
|
|
||||||
# ifdef __cplusplus
|
# ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
void close_stdout_set_file_name (const char *file);
|
void close_stdout_set_file_name (const char *file);
|
||||||
|
void close_stdout_set_ignore_EPIPE (bool ignore);
|
||||||
void close_stdout (void);
|
void close_stdout (void);
|
||||||
|
|
||||||
# ifdef __cplusplus
|
# ifdef __cplusplus
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Output a system dependent table of character encoding aliases.
|
# Output a system dependent table of character encoding aliases.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2000-2004, 2006 Free Software Foundation, Inc.
|
# Copyright (C) 2000-2004, 2006-2009 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# the Free Software Foundation; either version 3, or (at your option)
|
||||||
# any later version.
|
# any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
@@ -31,20 +31,20 @@
|
|||||||
#
|
#
|
||||||
# name MIME? used by which systems
|
# name MIME? used by which systems
|
||||||
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin
|
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin
|
||||||
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
|
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
|
||||||
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
|
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
|
||||||
# ISO-8859-3 Y glibc solaris
|
# ISO-8859-3 Y glibc solaris
|
||||||
# ISO-8859-4 Y osf solaris freebsd netbsd darwin
|
# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin
|
||||||
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
|
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
|
||||||
# ISO-8859-6 Y glibc aix hpux solaris
|
# ISO-8859-6 Y glibc aix hpux solaris
|
||||||
# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd darwin
|
# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin
|
||||||
# ISO-8859-8 Y glibc aix hpux osf solaris
|
# ISO-8859-8 Y glibc aix hpux osf solaris
|
||||||
# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
|
# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
|
||||||
# ISO-8859-13 glibc netbsd darwin
|
# ISO-8859-13 glibc netbsd openbsd darwin
|
||||||
# ISO-8859-14 glibc
|
# ISO-8859-14 glibc
|
||||||
# ISO-8859-15 glibc aix osf solaris freebsd darwin
|
# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin
|
||||||
# KOI8-R Y glibc solaris freebsd netbsd darwin
|
# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin
|
||||||
# KOI8-U Y glibc freebsd netbsd darwin
|
# KOI8-U Y glibc freebsd netbsd openbsd darwin
|
||||||
# KOI8-T glibc
|
# KOI8-T glibc
|
||||||
# CP437 dos
|
# CP437 dos
|
||||||
# CP775 dos
|
# CP775 dos
|
||||||
@@ -57,20 +57,21 @@
|
|||||||
# CP862 dos
|
# CP862 dos
|
||||||
# CP864 dos
|
# CP864 dos
|
||||||
# CP865 dos
|
# CP865 dos
|
||||||
# CP866 freebsd netbsd darwin dos
|
# CP866 freebsd netbsd openbsd darwin dos
|
||||||
# CP869 dos
|
# CP869 dos
|
||||||
# CP874 woe32 dos
|
# CP874 woe32 dos
|
||||||
# CP922 aix
|
# CP922 aix
|
||||||
# CP932 aix woe32 dos
|
# CP932 aix woe32 dos
|
||||||
# CP943 aix
|
# CP943 aix
|
||||||
# CP949 osf woe32 dos
|
# CP949 osf darwin woe32 dos
|
||||||
# CP950 woe32 dos
|
# CP950 woe32 dos
|
||||||
# CP1046 aix
|
# CP1046 aix
|
||||||
# CP1124 aix
|
# CP1124 aix
|
||||||
# CP1125 dos
|
# CP1125 dos
|
||||||
# CP1129 aix
|
# CP1129 aix
|
||||||
|
# CP1131 darwin
|
||||||
# CP1250 woe32
|
# CP1250 woe32
|
||||||
# CP1251 glibc solaris netbsd darwin woe32
|
# CP1251 glibc solaris netbsd openbsd darwin woe32
|
||||||
# CP1252 aix woe32
|
# CP1252 aix woe32
|
||||||
# CP1253 woe32
|
# CP1253 woe32
|
||||||
# CP1254 woe32
|
# CP1254 woe32
|
||||||
@@ -82,15 +83,17 @@
|
|||||||
# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin
|
# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin
|
||||||
# EUC-TW glibc aix hpux irix osf solaris netbsd
|
# EUC-TW glibc aix hpux irix osf solaris netbsd
|
||||||
# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin
|
# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin
|
||||||
# BIG5-HKSCS glibc solaris
|
# BIG5-HKSCS glibc solaris darwin
|
||||||
# GBK glibc aix osf solaris woe32 dos
|
# GBK glibc aix osf solaris darwin woe32 dos
|
||||||
# GB18030 glibc solaris netbsd
|
# GB18030 glibc solaris netbsd darwin
|
||||||
# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
|
# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
|
||||||
# JOHAB glibc solaris woe32
|
# JOHAB glibc solaris woe32
|
||||||
# TIS-620 glibc aix hpux osf solaris
|
# TIS-620 glibc aix hpux osf solaris
|
||||||
# VISCII Y glibc
|
# VISCII Y glibc
|
||||||
# TCVN5712-1 glibc
|
# TCVN5712-1 glibc
|
||||||
|
# ARMSCII-8 glibc darwin
|
||||||
# GEORGIAN-PS glibc
|
# GEORGIAN-PS glibc
|
||||||
|
# PT154 glibc
|
||||||
# HP-ROMAN8 hpux
|
# HP-ROMAN8 hpux
|
||||||
# HP-ARABIC8 hpux
|
# HP-ARABIC8 hpux
|
||||||
# HP-GREEK8 hpux
|
# HP-GREEK8 hpux
|
||||||
@@ -397,6 +400,16 @@ case "$os" in
|
|||||||
echo "BIG5 BIG5"
|
echo "BIG5 BIG5"
|
||||||
echo "SJIS SHIFT_JIS"
|
echo "SJIS SHIFT_JIS"
|
||||||
;;
|
;;
|
||||||
|
openbsd*)
|
||||||
|
echo "646 ASCII"
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-4 ISO-8859-4"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-7 ISO-8859-7"
|
||||||
|
echo "ISO8859-13 ISO-8859-13"
|
||||||
|
echo "ISO8859-15 ISO-8859-15"
|
||||||
|
;;
|
||||||
darwin[56]*)
|
darwin[56]*)
|
||||||
# Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
|
# Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
|
||||||
# localcharset.c falls back to using the full locale name
|
# localcharset.c falls back to using the full locale name
|
||||||
@@ -439,7 +452,8 @@ case "$os" in
|
|||||||
echo "ko_KR.EUC EUC-KR"
|
echo "ko_KR.EUC EUC-KR"
|
||||||
;;
|
;;
|
||||||
darwin*)
|
darwin*)
|
||||||
# Darwin 7.5 has nl_langinfo(CODESET), but it is useless:
|
# Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
|
||||||
|
# useless:
|
||||||
# - It returns the empty string when LANG is set to a locale of the
|
# - It returns the empty string when LANG is set to a locale of the
|
||||||
# form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
|
# form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
|
||||||
# LC_CTYPE file.
|
# LC_CTYPE file.
|
||||||
@@ -466,10 +480,40 @@ case "$os" in
|
|||||||
# minimize the use of decomposed Unicode. Unfortunately, through the
|
# minimize the use of decomposed Unicode. Unfortunately, through the
|
||||||
# Darwin file system, decomposed UTF-8 strings are leaked into user
|
# Darwin file system, decomposed UTF-8 strings are leaked into user
|
||||||
# space nevertheless.
|
# space nevertheless.
|
||||||
|
# Then there are also the locales with encodings other than US-ASCII
|
||||||
|
# and UTF-8. These locales can be occasionally useful to users (e.g.
|
||||||
|
# when grepping through ISO-8859-1 encoded text files), when all their
|
||||||
|
# file names are in US-ASCII.
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-4 ISO-8859-4"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-7 ISO-8859-7"
|
||||||
|
echo "ISO8859-9 ISO-8859-9"
|
||||||
|
echo "ISO8859-13 ISO-8859-13"
|
||||||
|
echo "ISO8859-15 ISO-8859-15"
|
||||||
|
echo "KOI8-R KOI8-R"
|
||||||
|
echo "KOI8-U KOI8-U"
|
||||||
|
echo "CP866 CP866"
|
||||||
|
echo "CP949 CP949"
|
||||||
|
echo "CP1131 CP1131"
|
||||||
|
echo "CP1251 CP1251"
|
||||||
|
echo "eucCN GB2312"
|
||||||
|
echo "GB2312 GB2312"
|
||||||
|
echo "eucJP EUC-JP"
|
||||||
|
echo "eucKR EUC-KR"
|
||||||
|
echo "Big5 BIG5"
|
||||||
|
echo "Big5HKSCS BIG5-HKSCS"
|
||||||
|
echo "GBK GBK"
|
||||||
|
echo "GB18030 GB18030"
|
||||||
|
echo "SJIS SHIFT_JIS"
|
||||||
|
echo "ARMSCII-8 ARMSCII-8"
|
||||||
|
echo "PT154 PT154"
|
||||||
|
#echo "ISCII-DEV ?"
|
||||||
echo "* UTF-8"
|
echo "* UTF-8"
|
||||||
;;
|
;;
|
||||||
beos*)
|
beos* | haiku*)
|
||||||
# BeOS has a single locale, and it has UTF-8 encoding.
|
# BeOS and Haiku have a single locale, and it has UTF-8 encoding.
|
||||||
echo "* UTF-8"
|
echo "* UTF-8"
|
||||||
;;
|
;;
|
||||||
msdosdjgpp*)
|
msdosdjgpp*)
|
||||||
|
|||||||
@@ -132,6 +132,12 @@
|
|||||||
/* Define to 1 when using the gnulib fopen-safer module. */
|
/* Define to 1 when using the gnulib fopen-safer module. */
|
||||||
#define GNULIB_FOPEN_SAFER 1
|
#define GNULIB_FOPEN_SAFER 1
|
||||||
|
|
||||||
|
/* Define to 1 when using the gnulib module fts. */
|
||||||
|
#define GNULIB_FTS 1
|
||||||
|
|
||||||
|
/* Define to 1 when using the gnulib module unistr/u8-uctomb. */
|
||||||
|
#define GNULIB_UNISTR_U8_UCTOMB 1
|
||||||
|
|
||||||
/* The concatenation of the strings `GNU ', and PACKAGE. */
|
/* The concatenation of the strings `GNU ', and PACKAGE. */
|
||||||
#define GNU_PACKAGE "GNU coreutils"
|
#define GNU_PACKAGE "GNU coreutils"
|
||||||
|
|
||||||
@@ -1823,9 +1829,6 @@
|
|||||||
/* Define to `int' if <sys/types.h> does not define. */
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
/* #undef pid_t */
|
/* #undef pid_t */
|
||||||
|
|
||||||
/* Define to rpl_putenv if the replacement function should be used. */
|
|
||||||
#define putenv rpl_putenv
|
|
||||||
|
|
||||||
/* Define to rpl_re_comp if the replacement should be used. */
|
/* Define to rpl_re_comp if the replacement should be used. */
|
||||||
/* #undef re_comp rpl_re_comp */
|
/* #undef re_comp rpl_re_comp */
|
||||||
|
|
||||||
@@ -1906,6 +1909,15 @@
|
|||||||
/* Define to rpl_utime if the replacement function should be used. */
|
/* Define to rpl_utime if the replacement function should be used. */
|
||||||
/* #undef utime */
|
/* #undef utime */
|
||||||
|
|
||||||
|
/* Define as a marker that can be attached to function parameter declarations
|
||||||
|
for parameters that are not used. This helps to reduce warnings, such as
|
||||||
|
from GCC -Wunused-parameter. */
|
||||||
|
#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||||
|
# define _UNUSED_PARAMETER_ __attribute__ ((__unused__))
|
||||||
|
#else
|
||||||
|
# define _UNUSED_PARAMETER_
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define as a macro for copying va_list variables. */
|
/* Define as a macro for copying va_list variables. */
|
||||||
#if __GNUC__ < 3
|
#if __GNUC__ < 3
|
||||||
#define va_copy __va_copy
|
#define va_copy __va_copy
|
||||||
|
|||||||
+533
-175
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,553 @@
|
|||||||
|
/* copy-acl.c - copy access control list from one file to another file
|
||||||
|
|
||||||
|
Copyright (C) 2002-2003, 2005-2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can 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, Andreas Grünbacher, and Bruno Haible. */
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
#include "acl.h"
|
||||||
|
|
||||||
|
#include "acl-internal.h"
|
||||||
|
|
||||||
|
#include "gettext.h"
|
||||||
|
#define _(msgid) gettext (msgid)
|
||||||
|
|
||||||
|
|
||||||
|
/* Copy access control lists from one file to another. If SOURCE_DESC is
|
||||||
|
a valid file descriptor, use file descriptor operations, else use
|
||||||
|
filename based operations on SRC_NAME. Likewise for DEST_DESC and
|
||||||
|
DST_NAME.
|
||||||
|
If access control lists are not available, fchmod the target file to
|
||||||
|
MODE. Also sets the non-permission bits of the destination file
|
||||||
|
(S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
|
||||||
|
Return 0 if successful.
|
||||||
|
Return -2 and set errno for an error relating to the source file.
|
||||||
|
Return -1 and set errno for an error relating to the destination file. */
|
||||||
|
|
||||||
|
static int
|
||||||
|
qcopy_acl (const char *src_name, int source_desc, const char *dst_name,
|
||||||
|
int dest_desc, mode_t mode)
|
||||||
|
{
|
||||||
|
#if USE_ACL && HAVE_ACL_GET_FILE
|
||||||
|
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
|
||||||
|
/* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
|
||||||
|
# if MODE_INSIDE_ACL
|
||||||
|
/* Linux, FreeBSD, IRIX, Tru64 */
|
||||||
|
|
||||||
|
acl_t acl;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (HAVE_ACL_GET_FD && source_desc != -1)
|
||||||
|
acl = acl_get_fd (source_desc);
|
||||||
|
else
|
||||||
|
acl = acl_get_file (src_name, ACL_TYPE_ACCESS);
|
||||||
|
if (acl == NULL)
|
||||||
|
{
|
||||||
|
if (ACL_NOT_WELL_SUPPORTED (errno))
|
||||||
|
return qset_acl (dst_name, dest_desc, mode);
|
||||||
|
else
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (HAVE_ACL_SET_FD && dest_desc != -1)
|
||||||
|
ret = acl_set_fd (dest_desc, acl);
|
||||||
|
else
|
||||||
|
ret = acl_set_file (dst_name, ACL_TYPE_ACCESS, acl);
|
||||||
|
if (ret != 0)
|
||||||
|
{
|
||||||
|
int saved_errno = errno;
|
||||||
|
|
||||||
|
if (ACL_NOT_WELL_SUPPORTED (errno) && !acl_access_nontrivial (acl))
|
||||||
|
{
|
||||||
|
acl_free (acl);
|
||||||
|
return chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
acl_free (acl);
|
||||||
|
chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||||
|
errno = saved_errno;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
acl_free (acl);
|
||||||
|
|
||||||
|
if (mode & (S_ISUID | S_ISGID | S_ISVTX))
|
||||||
|
{
|
||||||
|
/* We did not call chmod so far, and either the mode and the ACL are
|
||||||
|
separate or special bits are to be set which don't fit into ACLs. */
|
||||||
|
|
||||||
|
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (S_ISDIR (mode))
|
||||||
|
{
|
||||||
|
acl = acl_get_file (src_name, ACL_TYPE_DEFAULT);
|
||||||
|
if (acl == NULL)
|
||||||
|
return -2;
|
||||||
|
|
||||||
|
if (acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl))
|
||||||
|
{
|
||||||
|
int saved_errno = errno;
|
||||||
|
|
||||||
|
acl_free (acl);
|
||||||
|
errno = saved_errno;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
acl_free (acl);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
# else /* !MODE_INSIDE_ACL */
|
||||||
|
/* MacOS X */
|
||||||
|
|
||||||
|
# if !HAVE_ACL_TYPE_EXTENDED
|
||||||
|
# error Must have ACL_TYPE_EXTENDED
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* On MacOS X, acl_get_file (name, ACL_TYPE_ACCESS)
|
||||||
|
and acl_get_file (name, ACL_TYPE_DEFAULT)
|
||||||
|
always return NULL / EINVAL. You have to use
|
||||||
|
acl_get_file (name, ACL_TYPE_EXTENDED)
|
||||||
|
or acl_get_fd (open (name, ...))
|
||||||
|
to retrieve an ACL.
|
||||||
|
On the other hand,
|
||||||
|
acl_set_file (name, ACL_TYPE_ACCESS, acl)
|
||||||
|
and acl_set_file (name, ACL_TYPE_DEFAULT, acl)
|
||||||
|
have the same effect as
|
||||||
|
acl_set_file (name, ACL_TYPE_EXTENDED, acl):
|
||||||
|
Each of these calls sets the file's ACL. */
|
||||||
|
|
||||||
|
acl_t acl;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (HAVE_ACL_GET_FD && source_desc != -1)
|
||||||
|
acl = acl_get_fd (source_desc);
|
||||||
|
else
|
||||||
|
acl = acl_get_file (src_name, ACL_TYPE_EXTENDED);
|
||||||
|
if (acl == NULL)
|
||||||
|
{
|
||||||
|
if (ACL_NOT_WELL_SUPPORTED (errno))
|
||||||
|
return qset_acl (dst_name, dest_desc, mode);
|
||||||
|
else
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (HAVE_ACL_SET_FD && dest_desc != -1)
|
||||||
|
ret = acl_set_fd (dest_desc, acl);
|
||||||
|
else
|
||||||
|
ret = acl_set_file (dst_name, ACL_TYPE_EXTENDED, acl);
|
||||||
|
if (ret != 0)
|
||||||
|
{
|
||||||
|
int saved_errno = errno;
|
||||||
|
|
||||||
|
if (ACL_NOT_WELL_SUPPORTED (errno) && !acl_extended_nontrivial (acl))
|
||||||
|
{
|
||||||
|
acl_free (acl);
|
||||||
|
return chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
acl_free (acl);
|
||||||
|
chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||||
|
errno = saved_errno;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
acl_free (acl);
|
||||||
|
|
||||||
|
/* Since !MODE_INSIDE_ACL, we have to call chmod explicitly. */
|
||||||
|
return chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif USE_ACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
|
||||||
|
|
||||||
|
# if defined ACL_NO_TRIVIAL
|
||||||
|
/* Solaris 10 (newer version), which has additional API declared in
|
||||||
|
<sys/acl.h> (acl_t) and implemented in libsec (acl_set, acl_trivial,
|
||||||
|
acl_fromtext, ...). */
|
||||||
|
|
||||||
|
int ret;
|
||||||
|
acl_t *aclp = NULL;
|
||||||
|
ret = (source_desc < 0
|
||||||
|
? acl_get (src_name, ACL_NO_TRIVIAL, &aclp)
|
||||||
|
: facl_get (source_desc, ACL_NO_TRIVIAL, &aclp));
|
||||||
|
if (ret != 0 && errno != ENOSYS)
|
||||||
|
return -2;
|
||||||
|
|
||||||
|
ret = qset_acl (dst_name, dest_desc, mode);
|
||||||
|
if (ret != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (aclp)
|
||||||
|
{
|
||||||
|
ret = (dest_desc < 0
|
||||||
|
? acl_set (dst_name, aclp)
|
||||||
|
: facl_set (dest_desc, aclp));
|
||||||
|
if (ret != 0)
|
||||||
|
{
|
||||||
|
int saved_errno = errno;
|
||||||
|
|
||||||
|
acl_free (aclp);
|
||||||
|
errno = saved_errno;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
acl_free (aclp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
# else /* Solaris, Cygwin, general case */
|
||||||
|
|
||||||
|
/* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
|
||||||
|
of Unixware. The acl() call returns the access and default ACL both
|
||||||
|
at once. */
|
||||||
|
# ifdef ACE_GETACL
|
||||||
|
int ace_count;
|
||||||
|
ace_t *ace_entries;
|
||||||
|
# endif
|
||||||
|
int count;
|
||||||
|
aclent_t *entries;
|
||||||
|
int did_chmod;
|
||||||
|
int saved_errno;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
# ifdef ACE_GETACL
|
||||||
|
/* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
|
||||||
|
file systems (whereas the other ones are used in UFS file systems).
|
||||||
|
There is an API
|
||||||
|
pathconf (name, _PC_ACL_ENABLED)
|
||||||
|
fpathconf (desc, _PC_ACL_ENABLED)
|
||||||
|
that allows to determine which of the two kinds of ACLs is supported
|
||||||
|
for the given file. But some file systems may implement this call
|
||||||
|
incorrectly, so better not use it.
|
||||||
|
When fetching the source ACL, we simply fetch both ACL types.
|
||||||
|
When setting the destination ACL, we try either ACL types, assuming
|
||||||
|
that the kernel will translate the ACL from one form to the other.
|
||||||
|
(See in <http://docs.sun.com/app/docs/doc/819-2241/6n4huc7ia?l=en&a=view>
|
||||||
|
the description of ENOTSUP.) */
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
ace_count = (source_desc != -1
|
||||||
|
? facl (source_desc, ACE_GETACLCNT, 0, NULL)
|
||||||
|
: acl (src_name, ACE_GETACLCNT, 0, NULL));
|
||||||
|
|
||||||
|
if (ace_count < 0)
|
||||||
|
{
|
||||||
|
if (errno == ENOSYS || errno == EINVAL)
|
||||||
|
{
|
||||||
|
ace_count = 0;
|
||||||
|
ace_entries = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ace_count == 0)
|
||||||
|
{
|
||||||
|
ace_entries = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ace_entries = (ace_t *) malloc (ace_count * sizeof (ace_t));
|
||||||
|
if (ace_entries == NULL)
|
||||||
|
{
|
||||||
|
errno = ENOMEM;
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((source_desc != -1
|
||||||
|
? facl (source_desc, ACE_GETACL, ace_count, ace_entries)
|
||||||
|
: acl (src_name, ACE_GETACL, ace_count, ace_entries))
|
||||||
|
== ace_count)
|
||||||
|
break;
|
||||||
|
/* Huh? The number of ACL entries changed since the last call.
|
||||||
|
Repeat. */
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
count = (source_desc != -1
|
||||||
|
? facl (source_desc, GETACLCNT, 0, NULL)
|
||||||
|
: acl (src_name, GETACLCNT, 0, NULL));
|
||||||
|
|
||||||
|
if (count < 0)
|
||||||
|
{
|
||||||
|
if (errno == ENOSYS || errno == ENOTSUP)
|
||||||
|
{
|
||||||
|
count = 0;
|
||||||
|
entries = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
entries = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
entries = (aclent_t *) malloc (count * sizeof (aclent_t));
|
||||||
|
if (entries == NULL)
|
||||||
|
{
|
||||||
|
errno = ENOMEM;
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((source_desc != -1
|
||||||
|
? facl (source_desc, GETACL, count, entries)
|
||||||
|
: acl (src_name, GETACL, count, entries))
|
||||||
|
== count)
|
||||||
|
break;
|
||||||
|
/* Huh? The number of ACL entries changed since the last call.
|
||||||
|
Repeat. */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Is there an ACL of either kind? */
|
||||||
|
# ifdef ACE_GETACL
|
||||||
|
if (ace_count == 0)
|
||||||
|
# endif
|
||||||
|
if (count == 0)
|
||||||
|
return qset_acl (dst_name, dest_desc, mode);
|
||||||
|
|
||||||
|
did_chmod = 0; /* set to 1 once the mode bits in 0777 have been set */
|
||||||
|
saved_errno = 0; /* the first non-ignorable error code */
|
||||||
|
|
||||||
|
if (!MODE_INSIDE_ACL)
|
||||||
|
{
|
||||||
|
/* On Cygwin, it is necessary to call chmod before acl, because
|
||||||
|
chmod can change the contents of the ACL (in ways that don't
|
||||||
|
change the allowed accesses, but still visible). */
|
||||||
|
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
|
||||||
|
saved_errno = errno;
|
||||||
|
did_chmod = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If both ace_entries and entries are available, try SETACL before
|
||||||
|
ACE_SETACL, because SETACL cannot fail with ENOTSUP whereas ACE_SETACL
|
||||||
|
can. */
|
||||||
|
|
||||||
|
if (count > 0)
|
||||||
|
{
|
||||||
|
ret = (dest_desc != -1
|
||||||
|
? facl (dest_desc, SETACL, count, entries)
|
||||||
|
: acl (dst_name, SETACL, count, entries));
|
||||||
|
if (ret < 0 && saved_errno == 0)
|
||||||
|
{
|
||||||
|
saved_errno = errno;
|
||||||
|
if (errno == ENOSYS && !acl_nontrivial (count, entries))
|
||||||
|
saved_errno = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
did_chmod = 1;
|
||||||
|
}
|
||||||
|
free (entries);
|
||||||
|
|
||||||
|
# ifdef ACE_GETACL
|
||||||
|
if (ace_count > 0)
|
||||||
|
{
|
||||||
|
ret = (dest_desc != -1
|
||||||
|
? facl (dest_desc, ACE_SETACL, ace_count, ace_entries)
|
||||||
|
: acl (dst_name, ACE_SETACL, ace_count, ace_entries));
|
||||||
|
if (ret < 0 && saved_errno == 0)
|
||||||
|
{
|
||||||
|
saved_errno = errno;
|
||||||
|
if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
|
||||||
|
&& !acl_ace_nontrivial (ace_count, ace_entries))
|
||||||
|
saved_errno = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free (ace_entries);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
if (MODE_INSIDE_ACL
|
||||||
|
&& did_chmod <= ((mode & (S_ISUID | S_ISGID | S_ISVTX)) ? 1 : 0))
|
||||||
|
{
|
||||||
|
/* We did not call chmod so far, and either the mode and the ACL are
|
||||||
|
separate or special bits are to be set which don't fit into ACLs. */
|
||||||
|
|
||||||
|
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
|
||||||
|
{
|
||||||
|
if (saved_errno == 0)
|
||||||
|
saved_errno = errno;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (saved_errno)
|
||||||
|
{
|
||||||
|
errno = saved_errno;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif USE_ACL && HAVE_GETACL /* HP-UX */
|
||||||
|
|
||||||
|
int count;
|
||||||
|
struct acl_entry entries[NACLENTRIES];
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
count = (source_desc != -1
|
||||||
|
? fgetacl (source_desc, 0, NULL)
|
||||||
|
: getacl (src_name, 0, NULL));
|
||||||
|
|
||||||
|
if (count < 0)
|
||||||
|
{
|
||||||
|
if (errno == ENOSYS || errno == EOPNOTSUPP)
|
||||||
|
{
|
||||||
|
count = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (count > NACLENTRIES)
|
||||||
|
/* If NACLENTRIES cannot be trusted, use dynamic memory allocation. */
|
||||||
|
abort ();
|
||||||
|
|
||||||
|
if ((source_desc != -1
|
||||||
|
? fgetacl (source_desc, count, entries)
|
||||||
|
: getacl (src_name, count, entries))
|
||||||
|
== count)
|
||||||
|
break;
|
||||||
|
/* Huh? The number of ACL entries changed since the last call.
|
||||||
|
Repeat. */
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
return qset_acl (dst_name, dest_desc, mode);
|
||||||
|
|
||||||
|
ret = (dest_desc != -1
|
||||||
|
? fsetacl (dest_desc, count, entries)
|
||||||
|
: setacl (dst_name, count, entries));
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
int saved_errno = errno;
|
||||||
|
|
||||||
|
if (errno == ENOSYS || errno == EOPNOTSUPP)
|
||||||
|
{
|
||||||
|
struct stat source_statbuf;
|
||||||
|
|
||||||
|
if ((source_desc != -1
|
||||||
|
? fstat (source_desc, &source_statbuf)
|
||||||
|
: stat (src_name, &source_statbuf)) == 0)
|
||||||
|
{
|
||||||
|
if (!acl_nontrivial (count, entries, &source_statbuf))
|
||||||
|
return chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
saved_errno = errno;
|
||||||
|
}
|
||||||
|
|
||||||
|
chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||||
|
errno = saved_errno;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mode & (S_ISUID | S_ISGID | S_ISVTX))
|
||||||
|
{
|
||||||
|
/* We did not call chmod so far, and either the mode and the ACL are
|
||||||
|
separate or special bits are to be set which don't fit into ACLs. */
|
||||||
|
|
||||||
|
return chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#elif USE_ACL && HAVE_ACLX_GET && 0 /* AIX */
|
||||||
|
|
||||||
|
/* TODO */
|
||||||
|
|
||||||
|
#elif USE_ACL && HAVE_STATACL /* older AIX */
|
||||||
|
|
||||||
|
union { struct acl a; char room[4096]; } u;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if ((source_desc != -1
|
||||||
|
? fstatacl (source_desc, STX_NORMAL, &u.a, sizeof (u))
|
||||||
|
: statacl (src_name, STX_NORMAL, &u.a, sizeof (u)))
|
||||||
|
< 0)
|
||||||
|
return -2;
|
||||||
|
|
||||||
|
ret = (dest_desc != -1
|
||||||
|
? fchacl (dest_desc, &u.a, u.a.acl_len)
|
||||||
|
: chacl (dst_name, &u.a, u.a.acl_len));
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
int saved_errno = errno;
|
||||||
|
|
||||||
|
chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||||
|
errno = saved_errno;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* No need to call chmod_or_fchmod at this point, since the mode bits
|
||||||
|
S_ISUID, S_ISGID, S_ISVTX are also stored in the ACL. */
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
return qset_acl (dst_name, dest_desc, mode);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Copy access control lists from one file to another. If SOURCE_DESC is
|
||||||
|
a valid file descriptor, use file descriptor operations, else use
|
||||||
|
filename based operations on SRC_NAME. Likewise for DEST_DESC and
|
||||||
|
DST_NAME.
|
||||||
|
If access control lists are not available, fchmod the target file to
|
||||||
|
MODE. Also sets the non-permission bits of the destination file
|
||||||
|
(S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
|
||||||
|
Return 0 if successful, otherwise output a diagnostic and return -1. */
|
||||||
|
|
||||||
|
int
|
||||||
|
copy_acl (const char *src_name, int source_desc, const char *dst_name,
|
||||||
|
int dest_desc, mode_t mode)
|
||||||
|
{
|
||||||
|
int ret = qcopy_acl (src_name, source_desc, dst_name, dest_desc, mode);
|
||||||
|
switch (ret)
|
||||||
|
{
|
||||||
|
case -2:
|
||||||
|
error (0, errno, "%s", quote (src_name));
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
case -1:
|
||||||
|
error (0, errno, _("preserving permissions for %s"), quote (dst_name));
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,8 +13,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by Jim Meyering. */
|
/* Written by Jim Meyering. */
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,9 +13,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; see the file COPYING.
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by Jim Meyering */
|
/* Written by Jim Meyering */
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,9 +13,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; see the file COPYING.
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by Jim Meyering */
|
/* Written by Jim Meyering */
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
All this file is a temporary hack, waiting for locales in GNU.
|
All this file is a temporary hack, waiting for locales in GNU.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -18,9 +18,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; see the file COPYING.
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
|
|
||||||
All this file is a temporary hack, waiting for locales in GNU.
|
All this file is a temporary hack, waiting for locales in GNU.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -15,9 +15,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; see the file COPYING.
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
If not, write to the Free Software Foundation,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
extern const char diacrit_base[]; /* characters without diacritics */
|
extern const char diacrit_base[]; /* characters without diacritics */
|
||||||
extern const char diacrit_diac[]; /* diacritic code for each character */
|
extern const char diacrit_diac[]; /* diacritic code for each character */
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/* Change the ownership and mode bits of a directory.
|
/* Change the ownership and mode bits of a directory.
|
||||||
|
|
||||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,8 +13,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by Paul Eggert. */
|
/* Written by Paul Eggert. */
|
||||||
|
|
||||||
@@ -27,8 +26,6 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "lchmod.h"
|
|
||||||
#include "lchown.h"
|
|
||||||
#include "stat-macros.h"
|
#include "stat-macros.h"
|
||||||
|
|
||||||
#ifndef HAVE_FCHMOD
|
#ifndef HAVE_FCHMOD
|
||||||
|
|||||||
@@ -0,0 +1,98 @@
|
|||||||
|
/* A GNU-like <dirent.h>.
|
||||||
|
Copyright (C) 2006-2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can 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/>. */
|
||||||
|
|
||||||
|
#ifndef _GL_DIRENT_H
|
||||||
|
|
||||||
|
#if __GNUC__ >= 3
|
||||||
|
@PRAGMA_SYSTEM_HEADER@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The include_next requires a split double-inclusion guard. */
|
||||||
|
#@INCLUDE_NEXT@ @NEXT_DIRENT_H@
|
||||||
|
|
||||||
|
#ifndef _GL_DIRENT_H
|
||||||
|
#define _GL_DIRENT_H
|
||||||
|
|
||||||
|
/* The definition of GL_LINK_WARNING is copied here. */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Declare overridden functions. */
|
||||||
|
|
||||||
|
#if @REPLACE_FCHDIR@
|
||||||
|
# define opendir rpl_opendir
|
||||||
|
extern DIR * opendir (const char *);
|
||||||
|
# define closedir rpl_closedir
|
||||||
|
extern int closedir (DIR *);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Declare other POSIX functions. */
|
||||||
|
|
||||||
|
#if @GNULIB_DIRFD@
|
||||||
|
# if !@HAVE_DECL_DIRFD@ && !defined dirfd
|
||||||
|
/* Return the file descriptor associated with the given directory stream,
|
||||||
|
or -1 if none exists. */
|
||||||
|
extern int dirfd (DIR const *dir);
|
||||||
|
# endif
|
||||||
|
#elif defined GNULIB_POSIXCHECK
|
||||||
|
# undef dirfd
|
||||||
|
# define dirfd(d) \
|
||||||
|
(GL_LINK_WARNING ("dirfd is unportable - " \
|
||||||
|
"use gnulib module dirfd for portability"), \
|
||||||
|
dirfd (d))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if @GNULIB_SCANDIR@
|
||||||
|
/* Scan the directory DIR, calling FILTER on each directory entry.
|
||||||
|
Entries for which FILTER returns nonzero are individually malloc'd,
|
||||||
|
sorted using qsort with CMP, and collected in a malloc'd array in
|
||||||
|
*NAMELIST. Returns the number of entries selected, or -1 on error. */
|
||||||
|
# if !@HAVE_SCANDIR@
|
||||||
|
extern int scandir (const char *dir, struct dirent ***namelist,
|
||||||
|
int (*filter) (const struct dirent *),
|
||||||
|
int (*cmp) (const struct dirent **, const struct dirent **));
|
||||||
|
# endif
|
||||||
|
#elif defined GNULIB_POSIXCHECK
|
||||||
|
# undef scandir
|
||||||
|
# define scandir(d,n,f,c) \
|
||||||
|
(GL_LINK_WARNING ("scandir is unportable - " \
|
||||||
|
"use gnulib module scandir for portability"), \
|
||||||
|
scandir (d, n, f, c))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if @GNULIB_ALPHASORT@
|
||||||
|
/* Compare two 'struct dirent' entries alphabetically. */
|
||||||
|
# if !@HAVE_ALPHASORT@
|
||||||
|
extern int alphasort (const struct dirent **, const struct dirent **);
|
||||||
|
# endif
|
||||||
|
#elif defined GNULIB_POSIXCHECK
|
||||||
|
# undef alphasort
|
||||||
|
# define alphasort(a,b) \
|
||||||
|
(GL_LINK_WARNING ("alphasort is unportable - " \
|
||||||
|
"use gnulib module alphasort for portability"), \
|
||||||
|
alphasort (a, b))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _GL_DIRENT_H */
|
||||||
|
#endif /* _GL_DIRENT_H */
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
/* dirfd.c -- return the file descriptor associated with an open DIR*
|
/* dirfd.c -- return the file descriptor associated with an open DIR*
|
||||||
|
|
||||||
Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2001, 2006, 2008-2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -13,17 +13,20 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
/* Written by Jim Meyering. */
|
/* Written by Jim Meyering. */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "dirfd.h"
|
#include <dirent.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
dirfd (DIR const *dir_p)
|
dirfd (DIR const *dir_p)
|
||||||
{
|
{
|
||||||
return DIR_TO_FD (dir_p);
|
int fd = DIR_TO_FD (dir_p);
|
||||||
|
if (fd == -1)
|
||||||
|
errno = ENOTSUP;
|
||||||
|
return fd;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
/* Declare dirfd, if necessary.
|
|
||||||
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
Written by Jim Meyering. */
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
#ifndef HAVE_DECL_DIRFD
|
|
||||||
"this configure-time declaration test was not run"
|
|
||||||
#endif
|
|
||||||
#if !HAVE_DECL_DIRFD && !defined dirfd
|
|
||||||
int dirfd (DIR const *);
|
|
||||||
#endif
|
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
|
Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
|
||||||
Foundation, Inc.
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@@ -14,8 +14,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user