mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
301 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
721b2cb881 | ||
|
|
b958bd6f2b | ||
|
|
8e3be9e25c | ||
|
|
d6254a86bf | ||
|
|
cf251ff75b | ||
|
|
f79c0f977e | ||
|
|
16d019fb86 | ||
|
|
8d8135769a | ||
|
|
8b37ad9c5b | ||
|
|
c249f854de | ||
|
|
4954d34c14 | ||
|
|
e9c9e0f9e5 | ||
|
|
01a1964a1c | ||
|
|
063bdf481b | ||
|
|
cc9a042dfd | ||
|
|
a105fb3c17 | ||
|
|
c0e74f9b48 | ||
|
|
f5e968f6cd | ||
|
|
fa3bb4033b | ||
|
|
455d9ad4ed | ||
|
|
375abb3590 | ||
|
|
a3e7716e04 | ||
|
|
c500f8c996 | ||
|
|
a3029aba6b | ||
|
|
56b185d9b3 | ||
|
|
5bb0a21123 | ||
|
|
8a6dd8bf13 | ||
|
|
758eab108f | ||
|
|
862b31c48a | ||
|
|
30eb4cf648 | ||
|
|
29f4f9a5ac | ||
|
|
d3057155d5 | ||
|
|
8735a6823f | ||
|
|
d89bb4e01a | ||
|
|
0cd61ad840 | ||
|
|
5aeb94aeb4 | ||
|
|
2f4177fa6b | ||
|
|
eddd846acb | ||
|
|
84013f9573 | ||
|
|
98f5206a61 | ||
|
|
58be6ceff4 | ||
|
|
97a6cf3999 | ||
|
|
40f30dc54b | ||
|
|
833f309376 | ||
|
|
72b3b743fe | ||
|
|
0952a8a7bc | ||
|
|
be7efadaf2 | ||
|
|
d2caf6a98c | ||
|
|
c2981f6507 | ||
|
|
14aece6661 | ||
|
|
eddd7f971f | ||
|
|
df85b33ee3 | ||
|
|
d37e7835f9 | ||
|
|
d6df2d8561 | ||
|
|
db01eaed39 | ||
|
|
a423a1374f | ||
|
|
56dc5651a4 | ||
|
|
c559eefb84 | ||
|
|
517e8a6bc2 | ||
|
|
88a6b99b8d | ||
|
|
125de05913 | ||
|
|
496e09185a | ||
|
|
757de7fe90 | ||
|
|
bb53ccc5e9 | ||
|
|
9fc7c63a5a | ||
|
|
10acebe2cb | ||
|
|
d02b8ea082 | ||
|
|
a71d7cdd14 | ||
|
|
2e469b088b | ||
|
|
d5066f22eb | ||
|
|
9ac210f6a7 | ||
|
|
a3c2775889 | ||
|
|
7ae95c0ff8 | ||
|
|
12ec89c0e3 | ||
|
|
6157486144 | ||
|
|
4add54834d | ||
|
|
f03b3e48ea | ||
|
|
50a68130a3 | ||
|
|
088ab165c7 | ||
|
|
b08487e513 | ||
|
|
29d6a0aa75 | ||
|
|
85846c1ba1 | ||
|
|
42b1404b54 | ||
|
|
9516237211 | ||
|
|
b518fdab61 | ||
|
|
290fd86565 | ||
|
|
b6d1fca450 | ||
|
|
844f0224f0 | ||
|
|
e3d82c6734 | ||
|
|
d219e87e72 | ||
|
|
545a2cbc66 | ||
|
|
e6701bae6d | ||
|
|
0145667581 | ||
|
|
a641eab06a | ||
|
|
7beb8ac8aa | ||
|
|
8debb843b6 | ||
|
|
c908124639 | ||
|
|
5c7059a33a | ||
|
|
6c60fb0a7a | ||
|
|
650ea2e0b4 | ||
|
|
ca59fb27c2 | ||
|
|
19aa1f8a25 | ||
|
|
4cfab8f932 | ||
|
|
edcc5eb997 | ||
|
|
437a783072 | ||
|
|
9a16820c87 | ||
|
|
6b0a7a91d4 | ||
|
|
4259b70042 | ||
|
|
5cb8c8c0a0 | ||
|
|
043d1c865c | ||
|
|
9394a8280f | ||
|
|
c846dbf402 | ||
|
|
826dcda9c4 | ||
|
|
31ecd03e51 | ||
|
|
0fcc2606dd | ||
|
|
bea19ce09c | ||
|
|
4208ee3490 | ||
|
|
f7cfce8952 | ||
|
|
ff9b9b202c | ||
|
|
594b06988b | ||
|
|
faf92299a0 | ||
|
|
98dd4a3867 | ||
|
|
8661f4d615 | ||
|
|
7354c6077f | ||
|
|
48c6dffe80 | ||
|
|
cc7186a919 | ||
|
|
5c1001fdc5 | ||
|
|
6803a71d89 | ||
|
|
534deab287 | ||
|
|
b9db9921b8 | ||
|
|
c36284c505 | ||
|
|
a1eb481256 | ||
|
|
26bcc7757c | ||
|
|
6dd8936868 | ||
|
|
32ff553652 | ||
|
|
7fc37fe5ec | ||
|
|
655b4e6409 | ||
|
|
0fe3b0fe41 | ||
|
|
92f6a5cd8e | ||
|
|
dfddef17ac | ||
|
|
d10be8f4db | ||
|
|
1461770971 | ||
|
|
1f665cff54 | ||
|
|
e287f40259 | ||
|
|
af404ff8ce | ||
|
|
1ce828da28 | ||
|
|
073977f69f | ||
|
|
5ca6863e97 | ||
|
|
afe1e8e126 | ||
|
|
5641f6257f | ||
|
|
ce3986e75a | ||
|
|
f4d87ce11c | ||
|
|
8ecf5893e6 | ||
|
|
321402c5a8 | ||
|
|
3ce4615d65 | ||
|
|
0d5a8f6bb7 | ||
|
|
dda6851673 | ||
|
|
3feb52cde7 | ||
|
|
096f314e1d | ||
|
|
f22bce320b | ||
|
|
527fd8d7d2 | ||
|
|
f016b20824 | ||
|
|
251caade33 | ||
|
|
7d06f9cd1e | ||
|
|
e23fcf2db0 | ||
|
|
b217f05541 | ||
|
|
8c0a8b888f | ||
|
|
b896219d87 | ||
|
|
eb42da51bb | ||
|
|
d808469d48 | ||
|
|
a0fc5566dd | ||
|
|
e0ca9372fc | ||
|
|
a8bc6aee1c | ||
|
|
355fad3e85 | ||
|
|
b1a90bfff4 | ||
|
|
100cfd502c | ||
|
|
fc6d3b5995 | ||
|
|
5cb40b6726 | ||
|
|
784f0940b8 | ||
|
|
3cb1bf80e0 | ||
|
|
137c01c9a8 | ||
|
|
4433751d7a | ||
|
|
a13954f7a6 | ||
|
|
98b6b3780b | ||
|
|
11f11947b5 | ||
|
|
01c42af175 | ||
|
|
00a6ef7e2e | ||
|
|
03bc0dd04d | ||
|
|
4587e728aa | ||
|
|
40847a559f | ||
|
|
4c1d48cbfc | ||
|
|
2b195e22bd | ||
|
|
eb31b32e80 | ||
|
|
83a446e62a | ||
|
|
fb190362cc | ||
|
|
d21d0a4c04 | ||
|
|
5e62fc320b | ||
|
|
7386ed8bd1 | ||
|
|
ff9b51c885 | ||
|
|
85f656db4c | ||
|
|
63229c0a0d | ||
|
|
10cec9669d | ||
|
|
9370e7d2a8 | ||
|
|
3b89449b19 | ||
|
|
010641f8b7 | ||
|
|
527dcb236a | ||
|
|
55746a425e | ||
|
|
41d063607c | ||
|
|
113a192da5 | ||
|
|
293d7ffa73 | ||
|
|
a63b8f03f4 | ||
|
|
ff1b77a70a | ||
|
|
7157c29ee8 | ||
|
|
45b3b0a96d | ||
|
|
b65f84bf94 | ||
|
|
9ebf9199a4 | ||
|
|
a688ad3b57 | ||
|
|
57bb2e656e | ||
|
|
12ad88f5c1 | ||
|
|
8f717f92aa | ||
|
|
fac78c4d0c | ||
|
|
0d672bf048 | ||
|
|
b7d59be6a4 | ||
|
|
7206cd3b01 | ||
|
|
aca3853e18 | ||
|
|
93be9a66d7 | ||
|
|
edaeb62db6 | ||
|
|
e89ea03496 | ||
|
|
cd740223b3 | ||
|
|
a82d3db454 | ||
|
|
cea52734ee | ||
|
|
b52c000d3b | ||
|
|
31d214cd3a | ||
|
|
54d12f7edd | ||
|
|
f600c4d144 | ||
|
|
049ca98c74 | ||
|
|
7b2d50e3af | ||
|
|
e099a4b5ed | ||
|
|
29d3ba4a7b | ||
|
|
28334dafe4 | ||
|
|
45758bf193 | ||
|
|
8cad33941c | ||
|
|
fd6c956d13 | ||
|
|
bb72a58753 | ||
|
|
be7c99efe2 | ||
|
|
1999eb9197 | ||
|
|
8221bfd7cc | ||
|
|
1a8f8ca40c | ||
|
|
634dad84ba | ||
|
|
871812bcec | ||
|
|
14b2e25723 | ||
|
|
2f8ecdbb34 | ||
|
|
26963dfc15 | ||
|
|
449de5e30c | ||
|
|
aa077d5438 | ||
|
|
1a371e5119 | ||
|
|
c1fcde2307 | ||
|
|
e219c94cdf | ||
|
|
fdd07a7508 | ||
|
|
2c43f8c612 | ||
|
|
8e1e6d357a | ||
|
|
8b8685ef31 | ||
|
|
326489aecd | ||
|
|
d2b51acd38 | ||
|
|
b9a2465910 | ||
|
|
c82129a317 | ||
|
|
68773fe3f1 | ||
|
|
b1307f5aff | ||
|
|
3af9591bb8 | ||
|
|
169f13cd05 | ||
|
|
18341ac6a9 | ||
|
|
b79b91615f | ||
|
|
cae99570f4 | ||
|
|
00ede118ac | ||
|
|
62bef312ad | ||
|
|
e1bf326a99 | ||
|
|
ddfcfb0da3 | ||
|
|
5624900715 | ||
|
|
de85b5f902 | ||
|
|
d38bf8ccf7 | ||
|
|
b451be06d5 | ||
|
|
8d1e103424 | ||
|
|
77ec117299 | ||
|
|
ce4a63537c | ||
|
|
578156186d | ||
|
|
e2915cc17d | ||
|
|
edd988b3cc | ||
|
|
296fe5d782 | ||
|
|
13b113c1f3 | ||
|
|
883cd6c62d | ||
|
|
172290c201 | ||
|
|
1679d72fee | ||
|
|
317732f3d9 | ||
|
|
fc1d2abff1 | ||
|
|
8078034c5b | ||
|
|
747c6d4b60 | ||
|
|
d29f838428 | ||
|
|
464232e6bb | ||
|
|
76d10c457c | ||
|
|
6631abaa8b | ||
|
|
4507236cbe |
18
THANKS
18
THANKS
@@ -34,11 +34,12 @@ Bob McCracken kerouac@ravenet.com
|
||||
Bob Proulx rwp@fc.hp.com
|
||||
Brendan O'Dea bod@compusol.com.au
|
||||
Brian Kimball bfk@footbag.org
|
||||
Bruno Haible haible@ilog.fr
|
||||
Bruno Haible haible@clisp.cons.org
|
||||
Carl Johnson carlj@cjlinux.home.org
|
||||
Carl Lowenstein cdl@mpl.UCSD.EDU
|
||||
Carlos Canau Carlos.Canau@relay.puug.pt
|
||||
Charles Karney karney@pppl.gov
|
||||
Charles Randall crandall@matchlogic.com
|
||||
Chip Salzenberg chip@valinux.com
|
||||
Chris Yeo cyeo@biking.org
|
||||
Christi Alice Scarborough christi@chiark.greenend.org.uk
|
||||
@@ -82,9 +83,11 @@ Gary Anderson ganderson@clark.net
|
||||
Gaël Quéri gqueri@mail.dotcom.fr
|
||||
Geoff Odhner geoff@franklin.com
|
||||
Germano Leichsenring germano@jedi.cs.kobe-u.ac.jp
|
||||
GOTO Masanori gotom@debian.or.jp
|
||||
Greg McGary gkm@gnu.org
|
||||
Greg Troxel gdt@bbn.com
|
||||
Greg Wooledge gawooledge@sherwin.com
|
||||
Gregory Leblanc gleblanc@cu-portland.edu>
|
||||
Göran Uddeborg goeran@uddeborg.pp.se
|
||||
H. J. Lu hjl@valinux.com
|
||||
Hans Verkuil hans@wyst.hobby.nl
|
||||
@@ -92,11 +95,11 @@ Holger Berger hberger@ess.nec.de
|
||||
Hugh Daniel hugh@xanadu.com
|
||||
Ian Lance Taylor ian@cygnus.com
|
||||
Ian Turner vectro@pipeline.com
|
||||
James james@albion.glarp.com
|
||||
James Antill jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
||||
James Sneeringer jvs@ocslink.com
|
||||
James Tanis jtt@soscorp.com
|
||||
James Youngman james+usenet@free-lunch.demon.co.uk
|
||||
James james@albion.glarp.com
|
||||
Jamie Lokier jamie@imbolc.ucc.ie
|
||||
Janos Farkas chexum@shadow.banki.hu
|
||||
Jarkko Hietaniemi jhi@epsilon.hut.fi
|
||||
@@ -107,10 +110,11 @@ Jesse Thilo jgt2@eecs.lehigh.edu
|
||||
Jim Blandy jimb@cyclic.com
|
||||
Jim Dennis jimd@starshine.org
|
||||
Joakim Rosqvist dvljrt@cs.umu.se
|
||||
Jochen Hein jochen.hein@delphi.central.de
|
||||
Jochen Hein jochen@jochen.org
|
||||
Joe Orton joe@orton.demon.co.uk
|
||||
Johan Danielsson joda@pdc.kth.se
|
||||
John Bley jbb6@acpub.duke.edu
|
||||
John David Anglin dave.anglin@nrc.ca
|
||||
John Gatewood Ham zappaman@alphabox.compsci.buu.ac.th
|
||||
John Gotts jgotts@umich.edu
|
||||
John Kendall kendall@capps.com
|
||||
@@ -119,6 +123,7 @@ John Murphy jam@philabs.research.philips.com
|
||||
John Roll john@panic.harvard.edu
|
||||
John Salmon johns@mullet.anu.edu.au
|
||||
John Summerfield summer@OS2.ami.com.au
|
||||
Joost van Baal joostvb@xs4all.nl
|
||||
Joseph S. Myers jsm28@cam.ac.uk
|
||||
jvogel jvogel@linkny.com
|
||||
Jürgen Fluk louis@dachau.marco.de
|
||||
@@ -140,6 +145,7 @@ Lorne Baker lbaker@nitro.avint.net
|
||||
Manas Garg manas@cygsoft.com
|
||||
Manfred Hollstein manfred@s-direktnet.de
|
||||
Marc Boucher marc@mbsi.ca
|
||||
Marco Franzen Marco.Franzen@Thyron.com
|
||||
Marcus Daniels marcus@ee.pdx.edu
|
||||
Mark A. Thomas thommark@access.digex.net
|
||||
Mark Harris mark@monitor.designacc.com
|
||||
@@ -147,11 +153,13 @@ Mark Hewitt mhewitt@armature.com
|
||||
Mark Kettenis kettenis@phys.uva.nl
|
||||
Mark W. Eichin eichin@cygnus.com
|
||||
Markus Demleitner msdemlei@auriga.ari.uni-heidelberg.de
|
||||
Martin martin@dresden.nacamar.de
|
||||
Martin Hippe martin.hippe@schlund.de
|
||||
Martin Mitchell martin@debian.org
|
||||
Martin P.J. Zinser zinser@decus.de
|
||||
Martin martin@dresden.nacamar.de
|
||||
Marty Leisner leisner@sdsp.mc.xerox.com
|
||||
Masami Takikawa takikawm@CS.ORST.EDU
|
||||
Mate Wierdl mw@moni.msci.memphis.edu
|
||||
Matej Vela mvela@public.srce.hr
|
||||
Matthew Braun matthew@ans.net
|
||||
Matthew S. Levine mslevine@theory.lcs.mit.edu
|
||||
@@ -159,6 +167,7 @@ Matthew Swift swift@alum.mit.edu
|
||||
Matthias Urlichs smurf@noris.de
|
||||
Meelis Roos mroos@tartu.cyber.ee
|
||||
Michael ??? michael@roka.net
|
||||
Michael Deutschmann michael@talamasca.ocis.net
|
||||
Michael Hasselberg mikelh@zonta.ping.de
|
||||
Michael Stone mstone@debian.org
|
||||
Michael Stutz stutz@dsl.org
|
||||
@@ -175,6 +184,7 @@ Olav Morkrid olav@funcom.com
|
||||
Paul Eggert eggert@twinsun.com
|
||||
Paul Nevai nevai@ops.mps.ohio-state.edu
|
||||
Paul Slootman paul@debian.org
|
||||
Per Cederqvist ceder@lysator.liu.se
|
||||
Per Kristian Hove perhov@math.ntnu.no
|
||||
Peter Eriksson peter@ifm.liu.se
|
||||
Peter Moulder reiter@netspace.net.au
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAN = @MAN@
|
||||
@@ -145,7 +148,7 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits doc/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@@ -269,7 +272,6 @@ dist-info: $(INFO_DEPS)
|
||||
d=$(srcdir); \
|
||||
for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done; \
|
||||
done
|
||||
@@ -303,11 +305,12 @@ distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||
|
||||
@@ -113,13 +113,13 @@ specified differently, depending on whether the month is specified
|
||||
numerically or literally. All these strings specify the same calendar date:
|
||||
|
||||
@example
|
||||
1970-09-17 # ISO 8601.
|
||||
70-9-17 # Assume 19xx for 69 through 99, 20xx for 00 through 68.
|
||||
70-09-17 # Leading zeros are ignored.
|
||||
9/17/72 # Common U.S. writing.
|
||||
1972-09-24 # ISO 8601.
|
||||
72-9-24 # Assume 19xx for 69 through 99, 20xx for 00 through 68.
|
||||
72-09-24 # Leading zeros are ignored.
|
||||
9/24/72 # Common U.S. writing.
|
||||
24 September 1972
|
||||
24 Sept 72 # September has a special abbreviation.
|
||||
24 Sep 72 # Three-letter abbreviations always allowed.
|
||||
24 Sept 72 # September has a special abbreviation.
|
||||
24 Sep 72 # Three-letter abbreviations always allowed.
|
||||
Sep 24, 1972
|
||||
24-sep-72
|
||||
24sep72
|
||||
@@ -129,8 +129,8 @@ The year can also be omitted. In this case, the last specified year is
|
||||
used, or the current year if none. For example:
|
||||
|
||||
@example
|
||||
9/17
|
||||
sep 17
|
||||
9/24
|
||||
sep 24
|
||||
@end example
|
||||
|
||||
Here are the rules.
|
||||
|
||||
@@ -34,6 +34,7 @@ START-INFO-DIR-ENTRY
|
||||
* factor: (sh-utils)factor invocation. Print prime factors
|
||||
* false: (sh-utils)false invocation. Do nothing, unsuccessfully.
|
||||
* groups: (sh-utils)groups invocation. Print group names a user is in.
|
||||
* hostid: (sh-utils)hostid invocation. Print numeric host identifier.
|
||||
* hostname: (sh-utils)hostname invocation. Print or set system name.
|
||||
* id: (sh-utils)id invocation. Print real/effective uid/gid.
|
||||
* logname: (sh-utils)logname invocation. Print current login name.
|
||||
@@ -320,6 +321,21 @@ the @var{format} string.
|
||||
and @samp{\xhhh} as a hexadecimal number (if @var{hhh} is 1 to 3 hex
|
||||
digits) specifying a character to print.
|
||||
|
||||
@kindex \uhhhh
|
||||
@kindex \Uhhhhhhhh
|
||||
@code{printf} interprets two character syntaxes introduced in ISO C 99:
|
||||
@samp{\u} for 16-bit Unicode characters, specified as 4 hex digits
|
||||
@var{hhhh}, and @samp{\U} for 32-bit Unicode characters, specified as 8 hex
|
||||
digits @var{hhhhhhhh}. @code{printf} outputs the Unicode characters
|
||||
according to the LC_CTYPE part of the current locale, i.e. depending
|
||||
on the values of the environment variables @code{LC_ALL}, @code{LC_CTYPE},
|
||||
@code{LANG}.
|
||||
|
||||
The processing of @samp{\u} and @samp{\U} requires a full-featured
|
||||
@code{iconv} facility. It is activated on systems with glibc 2.2 (or newer),
|
||||
or when @code{libiconv} is installed prior to the sh-utils. Otherwise the
|
||||
use of @samp{\u} and @samp{\U} will give an error message.
|
||||
|
||||
@kindex \c
|
||||
An additional escape, @samp{\c}, causes @code{printf} to produce no
|
||||
further output.
|
||||
@@ -327,6 +343,40 @@ further output.
|
||||
The only options are a lone @samp{--help} or
|
||||
@samp{--version}. @xref{Common options}.
|
||||
|
||||
The Unicode character syntaxes are useful for writing strings in a locale
|
||||
independent way. For example, a string containing the Euro currency symbol
|
||||
|
||||
@example
|
||||
$ /usr/local/bin/printf '\u20AC 14.95'
|
||||
@end example
|
||||
|
||||
will be output correctly in all locales supporting the Euro symbol
|
||||
(ISO-8859-15, UTF-8, and others). Similarly, a Chinese string
|
||||
|
||||
@example
|
||||
$ /usr/local/bin/printf '\u4e2d\u6587'
|
||||
@end example
|
||||
|
||||
will be output correctly in all chinese locales (GB2312, BIG5, UTF-8, etc).
|
||||
|
||||
Note that in these examples, the full pathname of @code{printf} has been
|
||||
given, to distinguish it from the GNU bash builtin function @code{printf}.
|
||||
|
||||
For larger strings, you don't need to look up the hexadecimal code values of
|
||||
each character one by one. ASCII characters mixed with \u escape sequences
|
||||
is also known as the JAVA source file encoding. You can use GNU recode 3.5c
|
||||
(or newer) to convert strings to this encoding. Here is how to convert a
|
||||
piece of text into a shell script which will output this text in a locale
|
||||
independent way:
|
||||
|
||||
@smallexample
|
||||
$ LC_CTYPE=zh_CN.big5 /usr/local/bin/printf \
|
||||
'\u4e2d\u6587\n' > sample.txt
|
||||
$ recode BIG5..JAVA < sample.txt \
|
||||
| sed -e "s|^|/usr/local/bin/printf '|" -e "s|$|\\\\n'|" \
|
||||
> sample.sh
|
||||
@end smallexample
|
||||
|
||||
|
||||
@node yes invocation
|
||||
@section @code{yes}: Print a string until interrupted
|
||||
@@ -1571,8 +1621,8 @@ Same as:
|
||||
@example
|
||||
cread -ignbrk brkint -inlcr -igncr icrnl -ixoff -iuclc -ixany
|
||||
imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel
|
||||
nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl
|
||||
-noflsh -xcase -tostop -echoprt echoctl echoke
|
||||
nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok
|
||||
-echonl -noflsh -xcase -tostop -echoprt echoctl echoke
|
||||
@end example
|
||||
@noindent and also sets all special characters to their default values.
|
||||
|
||||
@@ -1588,8 +1638,8 @@ May be negated. If negated, same as @code{raw}.
|
||||
Same as:
|
||||
@example
|
||||
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
|
||||
-icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig -icanon
|
||||
-xcase min 1 time 0
|
||||
-icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig
|
||||
-icanon -xcase min 1 time 0
|
||||
@end example
|
||||
@noindent May be negated. If negated, same as @code{cooked}.
|
||||
|
||||
@@ -2131,6 +2181,7 @@ information.
|
||||
* date invocation:: Print or set system date and time.
|
||||
* uname invocation:: Print system information.
|
||||
* hostname invocation:: Print or set system name.
|
||||
* hostid invocation:: Print numeric host identifier.
|
||||
@end menu
|
||||
|
||||
|
||||
@@ -2665,7 +2716,6 @@ Print the operating system version.
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
@node hostname invocation
|
||||
@section @code{hostname}: Print or set system name
|
||||
|
||||
@@ -2688,6 +2738,29 @@ The only options are @samp{--help} and @samp{--version}. @xref{Common
|
||||
options}.
|
||||
|
||||
|
||||
@node hostid invocation
|
||||
@section @code{hostid}: Print numeric host identifier.
|
||||
|
||||
@pindex hostid
|
||||
@cindex printing the host identifier
|
||||
|
||||
@code{hostid} prints the numeric identifier of the current host
|
||||
in hexadecimal. This command accepts no arguments.
|
||||
The only options are @samp{--help} and @samp{--version}.
|
||||
@xref{Common options}.
|
||||
|
||||
For example, here's what it prints on one system I use:
|
||||
|
||||
@example
|
||||
$ hostid
|
||||
1bac013d
|
||||
@end example
|
||||
|
||||
On that system, the 32-bit quantity happens to be closely
|
||||
related to the system's Internet address, but that isn't always
|
||||
the case.
|
||||
|
||||
|
||||
@node Modified command invocation
|
||||
@chapter Modified command invocation
|
||||
|
||||
@@ -2734,6 +2807,34 @@ variable or @code{/bin/sh} if not set, invoked with the @samp{-i} option.
|
||||
The only options are @samp{--help} and @samp{--version}. @xref{Common
|
||||
options}.
|
||||
|
||||
Here are a few tips to help avoid common problems in using chroot.
|
||||
To start with a simple example, make @var{command} refer to a statically
|
||||
linked binary. If you were to use a dynamically linked executable, then
|
||||
you'd have to arrange to have the shared libraries in the right place under
|
||||
your new root directory.
|
||||
|
||||
For example, if you create a statically linked `ls' executable,
|
||||
and put it in /tmp/empty, you can run this command as root:
|
||||
|
||||
@example
|
||||
$ chroot /tmp/empty /ls -Rl /
|
||||
@end example
|
||||
|
||||
Then you'll see output like this:
|
||||
|
||||
@example
|
||||
/:
|
||||
total 1023
|
||||
-rwxr-xr-x 1 0 0 1041745 Aug 16 11:17 ls
|
||||
@end example
|
||||
|
||||
If you want to use a dynamically linked executable, say @code{bash},
|
||||
then first run @samp{ldd bash} to see what shared objects it needs.
|
||||
Then, in addition to copying the actual binary, also copy the listed
|
||||
files to the required positions under your intended new root directory.
|
||||
Finally, if the executable requires any other files (e.g., data, state,
|
||||
device files), copy them into place, too.
|
||||
|
||||
|
||||
@node env invocation
|
||||
@section @code{env}: Run a command in a modified environment
|
||||
@@ -3100,12 +3201,13 @@ options}.
|
||||
|
||||
The algorithm it uses is not very sophisticated, so for some inputs
|
||||
@code{factor} runs for a long time. The hardest numbers to factor are
|
||||
the products of large primes. Factoring the square of the largest 32-bit
|
||||
prime number takes over 10 minutes of CPU time on a 400MHz Pentium II.
|
||||
the products of large primes. Factoring the product of the two largest 32-bit
|
||||
prime numbers takes over 10 minutes of CPU time on a 400MHz Pentium II.
|
||||
|
||||
@example
|
||||
$ factor `echo '4294967291^2'|bc`
|
||||
18446744030759878681: 4294967291 4294967291
|
||||
$ p=`echo '4294967279 * 4294967291'|bc`
|
||||
$ factor $p
|
||||
18446743979220271189: 4294967279 4294967291
|
||||
@end example
|
||||
|
||||
In contrast, @code{factor} factors the largest 64-bit number in just
|
||||
@@ -3126,13 +3228,13 @@ $ factor `echo '2^64-1'|bc`
|
||||
@code{seq} prints a sequence of numbers to standard output. Synopses:
|
||||
|
||||
@example
|
||||
seq [@var{option}]@dots{} [@var{first} [@var{step}]] @var{last}@dots{}
|
||||
seq [@var{option}]@dots{} [@var{first} [@var{increment}]] @var{last}@dots{}
|
||||
@end example
|
||||
|
||||
@code{seq} prints the numbers from @var{first} to @var{last} by
|
||||
@var{step}. By default, @var{first} and @var{step} are both 1, and each
|
||||
number is printed on its own line. All numbers can be reals, not just
|
||||
integers.
|
||||
@var{increment}. By default, @var{first} and @var{increment} are both 1,
|
||||
and each number is printed on its own line. All numbers can be reals,
|
||||
not just integers.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@@ -3220,6 +3322,35 @@ FFFFFFFF
|
||||
100000000
|
||||
@end example
|
||||
|
||||
Be careful when using @code{seq} with a fractional @var{increment},
|
||||
otherwise you may see surprising results. Most people would expect to
|
||||
see @code{0.3} printed as the last number in this example:
|
||||
|
||||
@example
|
||||
$ seq -s' ' 0 .1 .3
|
||||
0 0.1 0.2
|
||||
@end example
|
||||
|
||||
But doesn't happen on most systems because @code{seq} is implemented using
|
||||
binary floating point arithmetic (via the C @code{double} type) -- which
|
||||
means some decimal numbers like @code{.1} cannot be represented exactly.
|
||||
That in turn means some nonintuitive conditions like @code{.1 * 3 > .3}
|
||||
will end up being true.
|
||||
|
||||
To work around that in the above example, use a slightly larger number as
|
||||
the @var{last} value:
|
||||
|
||||
@example
|
||||
$ seq -s' ' 0 .1 .31
|
||||
0 0.1 0.2 0.3
|
||||
@end example
|
||||
|
||||
In general, when using an @var{increment} with a fractional part, where
|
||||
(@var{last} - @var{first}) / @var{increment} is (mathematically) a whole
|
||||
number, specify a slightly larger (or smaller, if @var{increment} is negative)
|
||||
value for @var{last} to ensure that @var{last} is the final value printed
|
||||
by seq.
|
||||
|
||||
@node Index
|
||||
@unnumbered Index
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@c %**end of header
|
||||
|
||||
@include version.texi
|
||||
@include constants.texi
|
||||
|
||||
@c Define new indices.
|
||||
@defcodeindex op
|
||||
@@ -248,14 +249,13 @@ overall process.
|
||||
|
||||
@cindex common options
|
||||
|
||||
Certain options are available in all these programs. Rather than
|
||||
Certain options are available in all of these programs. Rather than
|
||||
writing identical descriptions for each of the programs, they are
|
||||
described here. (In fact, every GNU program accepts (or should accept)
|
||||
these options.)
|
||||
|
||||
A few of these programs take arbitrary strings as arguments. In those
|
||||
cases, @samp{--help} and @samp{--version} are taken as these options
|
||||
only if there is one and exactly one command line argument.
|
||||
Some of these programs recognize the @samp{--help} and @samp{--version}
|
||||
options only when one of them is the sole command line argument.
|
||||
|
||||
@table @samp
|
||||
|
||||
@@ -1546,26 +1546,16 @@ terminate until long after the real writer has terminated.
|
||||
Note that @samp{--pid} cannot be supported on some systems; @code{tail}
|
||||
will print a warning if this is the case.
|
||||
|
||||
@itemx --max-consecutive-size-changes=@var{n}
|
||||
@opindex --max-consecutive-size-changes
|
||||
This option is meaningful only when following by name.
|
||||
Use it to control how long @code{tail} follows the descriptor of a file
|
||||
that continues growing at a rapid pace even after it is deleted or renamed.
|
||||
After detecting @var{n} consecutive size changes for a file,
|
||||
@code{open}/@code{fstat} the file to determine if that file name is
|
||||
still associated with the same device/inode-number pair as before.
|
||||
See the output of @code{tail --help} for the default value.
|
||||
|
||||
@itemx --max-unchanged-stats=@var{n}
|
||||
@opindex --max-unchanged-stats
|
||||
When tailing a file by name, if there have been this many consecutive
|
||||
When tailing a file by name, if there have been @var{n} (default
|
||||
N=@value{DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS}) consecutive
|
||||
iterations for which the size has remained the same, then
|
||||
@code{open}/@code{fstat} the file to determine if that file name is
|
||||
still associated with the same device/inode-number pair as before.
|
||||
When following a log file that is rotated, this is approximately the
|
||||
number of seconds between when tail prints the last pre-rotation lines
|
||||
and when it prints the lines that have accumulated in the new log file.
|
||||
See the output of @code{tail --help} for the default value.
|
||||
This option is meaningful only when following by name.
|
||||
|
||||
@itemx -n @var{n}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
.deps
|
||||
Makefile
|
||||
charset.alias
|
||||
getdate.c
|
||||
getdate.tab.c
|
||||
lstat.c
|
||||
ref-add.sed
|
||||
ref-del.sed
|
||||
safe-lstat.c
|
||||
safe-lstat.h
|
||||
safe-stat.c
|
||||
|
||||
175
lib/ChangeLog
175
lib/ChangeLog
@@ -1,3 +1,178 @@
|
||||
2000-04-29 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* path-concat.c: Declare strdup only if it's not defined.
|
||||
* canon-host.c: Likewise.
|
||||
|
||||
2000-04-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
|
||||
redefinition warning on some systems (HPUX). Otherwise, regex.h is
|
||||
included first, then limits.h is included by locale.h by libintl.h.
|
||||
From John David Anglin.
|
||||
|
||||
2000-04-25 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* makepath.c (S_IRWXUGO): Define.
|
||||
(make_path): Always perform explicit chmod if MODE specifies any
|
||||
of the `special' permission bits. Prompted by a bug report against
|
||||
install from Mate Wierdl and Joost van Baal.
|
||||
|
||||
2000-04-18 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* README: New file.
|
||||
|
||||
* getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
|
||||
getpagesize. For BeOS. Based on a patch from Bruno Haible.
|
||||
|
||||
2000-04-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* strftime.c (my_strftime) [strftime]: Declare strftime here, since
|
||||
the definition of it to rpl_strftime also defined-away the system's
|
||||
declaration.
|
||||
|
||||
2000-04-15 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Use `C' to denote so-called `contiguous' files, the same way
|
||||
that tar does.
|
||||
* filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
|
||||
(ftypelet): Use S_ISCTG.
|
||||
From Michael Deutschmann.
|
||||
|
||||
2000-04-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
|
||||
|
||||
2000-04-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
|
||||
names don't conflict. Reported by Eli Zaretskii.
|
||||
|
||||
2000-03-28 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
|
||||
bug. Deal with the different error behavior of Irix iconv.
|
||||
|
||||
2000-04-07 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
|
||||
to work around system header problems on AIX 3.2.5. From Bruno Haible.
|
||||
|
||||
2000-04-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Portability tweaks required for ultrix4.3.
|
||||
* readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
|
||||
* readutmp.c: Include sys/types.h before sys/stat.h.
|
||||
* canon-host.c: Declare strdup.
|
||||
* path-concat.c: Likewise.
|
||||
From John David Anglin.
|
||||
|
||||
2000-04-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Be more DOS 8.3-friendly.
|
||||
* ref-add.sin: Renamed from ref-add.sed.in.
|
||||
* ref-del.sin: Renamed from ref-del.sed.in.
|
||||
* Makefile.am: Reflect renaming.
|
||||
Reported by Eli Zaretskii.
|
||||
|
||||
Use a temporary file name that won't clash with `charset.alias'
|
||||
in the DOS 8.3 name space.
|
||||
* Makefile.am (charset_tmp): Define.
|
||||
(install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
|
||||
(uninstall-local): Likewise.
|
||||
Reported by Eli Zaretskii.
|
||||
|
||||
2000-03-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* time/strftime.c (my_strftime): Make sure we call the system
|
||||
strftime, not ourselves, when invoking the underlying strftime.
|
||||
|
||||
2000-03-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
|
||||
(charset_alias): Define.
|
||||
(install-exec-local): Factor out common code.
|
||||
(uninstall-local): Split lines longer than 80.
|
||||
(ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
|
||||
(SUFFIXES): Define.
|
||||
(.sed.in.sed): New rule. Don't redirect directly to $@.
|
||||
(CLEANFILES): Add ref-add.sed and ref-del.sed.
|
||||
|
||||
2000-03-19 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Output a line containing "Packages using this file".
|
||||
* ref-add.sed.in, ref-del.sed.in: New files.
|
||||
* Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
|
||||
ref-del.sed): New rules.
|
||||
|
||||
2000-03-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
|
||||
Otherwise, include <strings.h>
|
||||
|
||||
2000-03-17 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* unicodeio.c (utf8_wctomb): New function.
|
||||
(print_unicode_char): Pass the Unicode character to iconv in UTF-8
|
||||
format instead of in UCS-4 with platform dependent endianness.
|
||||
|
||||
2000-03-07 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/savedir.c (savedir): Work even if directory size is
|
||||
negative; this can happen with some screwy NFS configurations.
|
||||
|
||||
2000-03-06 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* localcharset.c (get_charset_aliases): Don't try to free file_name
|
||||
if it's NULL (because we ran out of memory). From Bruno Haible.
|
||||
|
||||
2000-03-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* localcharset.c ("path-concat.h"): Include.
|
||||
(get_charset_aliases): Use path_concat instead of ANSI string
|
||||
concatenation.
|
||||
|
||||
* unicodeio.h (PARAMS): Define.
|
||||
Use it to guard prototype.
|
||||
|
||||
2000-03-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (install-exec-local): Create $(libdir) before installing
|
||||
into it.
|
||||
(uninstall-local): Uncomment this rule so `make distcheck' works
|
||||
once again.
|
||||
|
||||
* unicodeio.c (<errno.h>): Include it.
|
||||
(errno): Declare if not defined.
|
||||
|
||||
* localcharset.c: Add Bruno's comment justifying use of volatile.
|
||||
|
||||
* config.charset: New version, incorporating remarks from a linux
|
||||
i18n mailing list. From Bruno Haible.
|
||||
|
||||
2000-03-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Add config.charset.
|
||||
|
||||
2000-03-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* localcharset.c: Guard some #includes with `#if HAVE_...'.
|
||||
* unicodeio.c: Likewise.
|
||||
|
||||
2000-02-02 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: New file.
|
||||
* localcharset.c: New file.
|
||||
* unicodeio.h, unicodeio.c: New files.
|
||||
* Makefile.am (DEFS): Add -DLIBDIR=...
|
||||
(libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
|
||||
(noinst_HEADERS): Add unicodeio.h.
|
||||
(all-local, install-exec-local, charset.alias): New targets.
|
||||
|
||||
2000-02-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/quotearg.c (ALERT_CHAR): New macro.
|
||||
(quotearg_buffer_restyled): Use it.
|
||||
|
||||
2000-02-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
|
||||
|
||||
@@ -5,16 +5,18 @@ AUTOMAKE_OPTIONS = ../src/ansi2knr
|
||||
noinst_LIBRARIES = libfetish.a
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
|
||||
libfetish_a_SOURCES = \
|
||||
getdate.y posixtm.c addext.c argmatch.c backupfile.c basename.c \
|
||||
canon-host.c closeout.c dirname.c exclude.c filemode.c diacrit.c \
|
||||
full-write.c getopt.c getopt1.c getugroups.c hard-locale.c hash.c \
|
||||
human.c idcache.c isdir.c linebuffer.c long-options.c makepath.c \
|
||||
md5.c memcasecmp.c memcoll.c modechange.c path-concat.c \
|
||||
human.c idcache.c isdir.c linebuffer.c localcharset.c long-options.c \
|
||||
makepath.c md5.c memcasecmp.c memcoll.c modechange.c path-concat.c \
|
||||
quotearg.c readtokens.c readutmp.c safe-read.c same.c save-cwd.c \
|
||||
savedir.c stripslash.c userspec.c version-etc.c xgetcwd.c xgethostname.c \
|
||||
xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c xstrtoumax.c yesno.c
|
||||
savedir.c stripslash.c unicodeio.c userspec.c version-etc.c xgetcwd.c \
|
||||
xgethostname.c xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c \
|
||||
xstrtoumax.c yesno.c
|
||||
|
||||
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
|
||||
@@ -27,13 +29,13 @@ noinst_HEADERS = \
|
||||
makepath.h modechange.h mountlist.h nanosleep.h obstack.h \
|
||||
path-concat.h pathmax.h posixtm.h quotearg.h readtokens.h \
|
||||
readutmp.h regex.h safe-read.h same.h save-cwd.h savedir.h \
|
||||
strverscmp.h version-etc.h xalloc.h xstrtod.h xstrtol.h
|
||||
strverscmp.h unicodeio.h version-etc.h xalloc.h xstrtod.h xstrtol.h
|
||||
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
DISTCLEANFILES = lstat.c stat.c
|
||||
|
||||
EXTRA_DIST = xstat.in
|
||||
EXTRA_DIST = xstat.in config.charset ref-add.sin ref-del.sin
|
||||
lstat.c: xstat.in
|
||||
sed \
|
||||
-e '/@IGNORE@/d' \
|
||||
@@ -51,3 +53,45 @@ stat.c: xstat.in
|
||||
-e '/@BEGIN_LSTAT_ONLY@/,/@END_LSTAT_ONLY@/d' \
|
||||
$(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
# The following is needed in order to install a simple file in $(libdir)
|
||||
# which is shared with other installed packages. We use a list of referencing
|
||||
# packages so that "make uninstall" will remove the file if and only if it
|
||||
# is not used by another installed package.
|
||||
|
||||
all-local: charset.alias ref-add.sed ref-del.sed
|
||||
|
||||
charset_alias = $(DESTDIR)$(libdir)/charset.alias
|
||||
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
|
||||
install-exec-local: all-local
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
test -f $(charset_alias) \
|
||||
&& orig=$(charset_alias) \
|
||||
|| orig=charset.alias; \
|
||||
sed -f ref-add.sed $$orig > $(charset_tmp)
|
||||
$(INSTALL_DATA) $(charset_tmp) $(charset_alias)
|
||||
rm -f $(charset_tmp)
|
||||
|
||||
uninstall-local: all-local
|
||||
if test -f $(charset_alias); then \
|
||||
sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
|
||||
if grep '^# Packages using this file: $$' $(charset_tmp) \
|
||||
> /dev/null; then \
|
||||
rm -f $(charset_alias); \
|
||||
else \
|
||||
$(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
|
||||
fi; \
|
||||
rm -f $(charset_tmp); \
|
||||
fi
|
||||
|
||||
charset.alias: config.charset
|
||||
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
SUFFIXES = .sed .sin
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
CLEANFILES = charset.alias ref-add.sed ref-del.sed
|
||||
|
||||
233
lib/Makefile.in
233
lib/Makefile.in
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -116,16 +119,18 @@ AUTOMAKE_OPTIONS = ../src/ansi2knr
|
||||
noinst_LIBRARIES = libfetish.a
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
|
||||
libfetish_a_SOURCES = \
|
||||
getdate.y posixtm.c addext.c argmatch.c backupfile.c basename.c \
|
||||
canon-host.c closeout.c dirname.c exclude.c filemode.c diacrit.c \
|
||||
full-write.c getopt.c getopt1.c getugroups.c hard-locale.c hash.c \
|
||||
human.c idcache.c isdir.c linebuffer.c long-options.c makepath.c \
|
||||
md5.c memcasecmp.c memcoll.c modechange.c path-concat.c \
|
||||
human.c idcache.c isdir.c linebuffer.c localcharset.c long-options.c \
|
||||
makepath.c md5.c memcasecmp.c memcoll.c modechange.c path-concat.c \
|
||||
quotearg.c readtokens.c readutmp.c safe-read.c same.c save-cwd.c \
|
||||
savedir.c stripslash.c userspec.c version-etc.c xgetcwd.c xgethostname.c \
|
||||
xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c xstrtoumax.c yesno.c
|
||||
savedir.c stripslash.c unicodeio.c userspec.c version-etc.c xgetcwd.c \
|
||||
xgethostname.c xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c \
|
||||
xstrtoumax.c yesno.c
|
||||
|
||||
|
||||
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
@@ -139,22 +144,27 @@ noinst_HEADERS = \
|
||||
makepath.h modechange.h mountlist.h nanosleep.h obstack.h \
|
||||
path-concat.h pathmax.h posixtm.h quotearg.h readtokens.h \
|
||||
readutmp.h regex.h safe-read.h same.h save-cwd.h savedir.h \
|
||||
strverscmp.h version-etc.h xalloc.h xstrtod.h xstrtol.h
|
||||
strverscmp.h unicodeio.h version-etc.h xalloc.h xstrtod.h xstrtol.h
|
||||
|
||||
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
DISTCLEANFILES = lstat.c stat.c
|
||||
|
||||
EXTRA_DIST = xstat.in
|
||||
EXTRA_DIST = xstat.in config.charset ref-add.sin ref-del.sin
|
||||
|
||||
charset_alias = $(DESTDIR)$(libdir)/charset.alias
|
||||
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
|
||||
|
||||
SUFFIXES = .sed .sin
|
||||
|
||||
CLEANFILES = charset.alias ref-add.sed ref-del.sed
|
||||
subdir = lib
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
@@ -164,12 +174,13 @@ am_libfetish_a_OBJECTS = getdate$U.o posixtm$U.o addext$U.o \
|
||||
argmatch$U.o backupfile$U.o basename$U.o canon-host$U.o closeout$U.o \
|
||||
dirname$U.o exclude$U.o filemode$U.o diacrit$U.o full-write$U.o \
|
||||
getopt$U.o getopt1$U.o getugroups$U.o hard-locale$U.o hash$U.o \
|
||||
human$U.o idcache$U.o isdir$U.o linebuffer$U.o long-options$U.o \
|
||||
makepath$U.o md5$U.o memcasecmp$U.o memcoll$U.o modechange$U.o \
|
||||
path-concat$U.o quotearg$U.o readtokens$U.o readutmp$U.o safe-read$U.o \
|
||||
same$U.o save-cwd$U.o savedir$U.o stripslash$U.o userspec$U.o \
|
||||
version-etc$U.o xgetcwd$U.o xgethostname$U.o xmalloc$U.o xstrdup$U.o \
|
||||
xstrtod$U.o xstrtol$U.o xstrtoul$U.o xstrtoumax$U.o yesno$U.o
|
||||
human$U.o idcache$U.o isdir$U.o linebuffer$U.o localcharset$U.o \
|
||||
long-options$U.o makepath$U.o md5$U.o memcasecmp$U.o memcoll$U.o \
|
||||
modechange$U.o path-concat$U.o quotearg$U.o readtokens$U.o readutmp$U.o \
|
||||
safe-read$U.o same$U.o save-cwd$U.o savedir$U.o stripslash$U.o \
|
||||
unicodeio$U.o userspec$U.o version-etc$U.o xgetcwd$U.o xgethostname$U.o \
|
||||
xmalloc$U.o xstrdup$U.o xstrtod$U.o xstrtol$U.o xstrtoul$U.o \
|
||||
xstrtoumax$U.o yesno$U.o
|
||||
libfetish_a_OBJECTS = $(am_libfetish_a_OBJECTS)
|
||||
AR = ar
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
@@ -179,20 +190,6 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_SOURCES = $(libfetish_a_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
|
||||
DIST_COMMON = $(noinst_HEADERS) ChangeLog Makefile.am Makefile.in TODO \
|
||||
alloca.c chown.c dup2.c error.c error.h euidaccess.c fileblocks.c \
|
||||
fnmatch.c fsusage.c ftruncate.c getdate.c getgroups.c gethostname.c \
|
||||
getline.c getloadavg.c getusershell.c group-member.c lchown.c malloc.c \
|
||||
memchr.c memcmp.c memcpy.c memmove.c memset.c mkdir.c mktime.c \
|
||||
mountlist.c nanosleep.c obstack.c obstack.h putenv.c realloc.c regex.c \
|
||||
rmdir.c rpmatch.c stime.c stpcpy.c strcasecmp.c strcspn.c strdup.c \
|
||||
strftime.c strncasecmp.c strndup.c strpbrk.c strstr.c strtod.c strtol.c \
|
||||
strtoul.c strtoull.c strtoumax.c strverscmp.c utime.c
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
GZIP_ENV = --best
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
DEP_FILES = @AMDEP@ $(DEPDIR)/addext$U.Po $(DEPDIR)/alloca.Po \
|
||||
$(DEPDIR)/argmatch$U.Po $(DEPDIR)/backupfile$U.Po \
|
||||
@@ -207,38 +204,54 @@ $(DEPDIR)/getopt$U.Po $(DEPDIR)/getopt1$U.Po $(DEPDIR)/getugroups$U.Po \
|
||||
$(DEPDIR)/getusershell.Po $(DEPDIR)/group-member.Po \
|
||||
$(DEPDIR)/hard-locale$U.Po $(DEPDIR)/hash$U.Po $(DEPDIR)/human$U.Po \
|
||||
$(DEPDIR)/idcache$U.Po $(DEPDIR)/isdir$U.Po $(DEPDIR)/lchown.Po \
|
||||
$(DEPDIR)/linebuffer$U.Po $(DEPDIR)/long-options$U.Po \
|
||||
$(DEPDIR)/lstat.Po $(DEPDIR)/makepath$U.Po $(DEPDIR)/malloc.Po \
|
||||
$(DEPDIR)/md5$U.Po $(DEPDIR)/memcasecmp$U.Po $(DEPDIR)/memchr.Po \
|
||||
$(DEPDIR)/memcmp.Po $(DEPDIR)/memcoll$U.Po $(DEPDIR)/memcpy.Po \
|
||||
$(DEPDIR)/memmove.Po $(DEPDIR)/memset.Po $(DEPDIR)/mkdir.Po \
|
||||
$(DEPDIR)/mktime.Po $(DEPDIR)/modechange$U.Po $(DEPDIR)/mountlist.Po \
|
||||
$(DEPDIR)/nanosleep.Po $(DEPDIR)/obstack.Po $(DEPDIR)/path-concat$U.Po \
|
||||
$(DEPDIR)/posixtm$U.Po $(DEPDIR)/putenv.Po $(DEPDIR)/quotearg$U.Po \
|
||||
$(DEPDIR)/readtokens$U.Po $(DEPDIR)/readutmp$U.Po $(DEPDIR)/realloc.Po \
|
||||
$(DEPDIR)/regex.Po $(DEPDIR)/rmdir.Po $(DEPDIR)/rpmatch.Po \
|
||||
$(DEPDIR)/safe-read$U.Po $(DEPDIR)/same$U.Po $(DEPDIR)/save-cwd$U.Po \
|
||||
$(DEPDIR)/savedir$U.Po $(DEPDIR)/stat.Po $(DEPDIR)/stime.Po \
|
||||
$(DEPDIR)/stpcpy.Po $(DEPDIR)/strcasecmp.Po $(DEPDIR)/strcspn.Po \
|
||||
$(DEPDIR)/strdup.Po $(DEPDIR)/strftime.Po $(DEPDIR)/stripslash$U.Po \
|
||||
$(DEPDIR)/linebuffer$U.Po $(DEPDIR)/localcharset$U.Po \
|
||||
$(DEPDIR)/long-options$U.Po $(DEPDIR)/lstat.Po $(DEPDIR)/makepath$U.Po \
|
||||
$(DEPDIR)/malloc.Po $(DEPDIR)/md5$U.Po $(DEPDIR)/memcasecmp$U.Po \
|
||||
$(DEPDIR)/memchr.Po $(DEPDIR)/memcmp.Po $(DEPDIR)/memcoll$U.Po \
|
||||
$(DEPDIR)/memcpy.Po $(DEPDIR)/memmove.Po $(DEPDIR)/memset.Po \
|
||||
$(DEPDIR)/mkdir.Po $(DEPDIR)/mktime.Po $(DEPDIR)/modechange$U.Po \
|
||||
$(DEPDIR)/mountlist.Po $(DEPDIR)/nanosleep.Po $(DEPDIR)/obstack.Po \
|
||||
$(DEPDIR)/path-concat$U.Po $(DEPDIR)/posixtm$U.Po $(DEPDIR)/putenv.Po \
|
||||
$(DEPDIR)/quotearg$U.Po $(DEPDIR)/readtokens$U.Po \
|
||||
$(DEPDIR)/readutmp$U.Po $(DEPDIR)/realloc.Po $(DEPDIR)/regex.Po \
|
||||
$(DEPDIR)/rmdir.Po $(DEPDIR)/rpmatch.Po $(DEPDIR)/safe-read$U.Po \
|
||||
$(DEPDIR)/same$U.Po $(DEPDIR)/save-cwd$U.Po $(DEPDIR)/savedir$U.Po \
|
||||
$(DEPDIR)/stat.Po $(DEPDIR)/stime.Po $(DEPDIR)/stpcpy.Po \
|
||||
$(DEPDIR)/strcasecmp.Po $(DEPDIR)/strcspn.Po $(DEPDIR)/strdup.Po \
|
||||
$(DEPDIR)/strftime.Po $(DEPDIR)/stripslash$U.Po \
|
||||
$(DEPDIR)/strncasecmp.Po $(DEPDIR)/strndup.Po $(DEPDIR)/strpbrk.Po \
|
||||
$(DEPDIR)/strstr.Po $(DEPDIR)/strtod.Po $(DEPDIR)/strtol.Po \
|
||||
$(DEPDIR)/strtoul.Po $(DEPDIR)/strtoull.Po $(DEPDIR)/strtoumax.Po \
|
||||
$(DEPDIR)/strverscmp.Po $(DEPDIR)/userspec$U.Po $(DEPDIR)/utime.Po \
|
||||
$(DEPDIR)/version-etc$U.Po $(DEPDIR)/xgetcwd$U.Po \
|
||||
$(DEPDIR)/xgethostname$U.Po $(DEPDIR)/xmalloc$U.Po \
|
||||
$(DEPDIR)/xstrdup$U.Po $(DEPDIR)/xstrtod$U.Po $(DEPDIR)/xstrtol$U.Po \
|
||||
$(DEPDIR)/xstrtoul$U.Po $(DEPDIR)/xstrtoumax$U.Po $(DEPDIR)/yesno$U.Po
|
||||
$(DEPDIR)/strverscmp.Po $(DEPDIR)/unicodeio$U.Po \
|
||||
$(DEPDIR)/userspec$U.Po $(DEPDIR)/utime.Po $(DEPDIR)/version-etc$U.Po \
|
||||
$(DEPDIR)/xgetcwd$U.Po $(DEPDIR)/xgethostname$U.Po \
|
||||
$(DEPDIR)/xmalloc$U.Po $(DEPDIR)/xstrdup$U.Po $(DEPDIR)/xstrtod$U.Po \
|
||||
$(DEPDIR)/xstrtol$U.Po $(DEPDIR)/xstrtoul$U.Po \
|
||||
$(DEPDIR)/xstrtoumax$U.Po $(DEPDIR)/yesno$U.Po
|
||||
DIST_COMMON = README $(noinst_HEADERS) ChangeLog Makefile.am \
|
||||
Makefile.in TODO alloca.c chown.c dup2.c error.c error.h euidaccess.c \
|
||||
fileblocks.c fnmatch.c fsusage.c ftruncate.c getdate.c getgroups.c \
|
||||
gethostname.c getline.c getloadavg.c getusershell.c group-member.c \
|
||||
lchown.c malloc.c memchr.c memcmp.c memcpy.c memmove.c memset.c mkdir.c \
|
||||
mktime.c mountlist.c nanosleep.c obstack.c obstack.h putenv.c realloc.c \
|
||||
regex.c rmdir.c rpmatch.c stime.c stpcpy.c strcasecmp.c strcspn.c \
|
||||
strdup.c strftime.c strncasecmp.c strndup.c strpbrk.c strstr.c strtod.c \
|
||||
strtol.c strtoul.c strtoull.c strtoumax.c strverscmp.c utime.c
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(libfetish_a_SOURCES)
|
||||
OBJECTS = $(am_libfetish_a_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .y
|
||||
.SUFFIXES: .c .o .sed .sin .y
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits lib/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@@ -355,6 +368,8 @@ lchown_.c: lchown.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lchown.c; then echo $(srcdir)/lchown.c; else echo lchown.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lchown_.c
|
||||
linebuffer_.c: linebuffer.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/linebuffer.c; then echo $(srcdir)/linebuffer.c; else echo linebuffer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > linebuffer_.c
|
||||
localcharset_.c: localcharset.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/localcharset.c; then echo $(srcdir)/localcharset.c; else echo localcharset.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > localcharset_.c
|
||||
long-options_.c: long-options.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/long-options.c; then echo $(srcdir)/long-options.c; else echo long-options.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > long-options_.c
|
||||
lstat_.c: lstat.c $(ANSI2KNR)
|
||||
@@ -455,6 +470,8 @@ strtoumax_.c: strtoumax.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strtoumax.c; then echo $(srcdir)/strtoumax.c; else echo strtoumax.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strtoumax_.c
|
||||
strverscmp_.c: strverscmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strverscmp.c; then echo $(srcdir)/strverscmp.c; else echo strverscmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strverscmp_.c
|
||||
unicodeio_.c: unicodeio.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/unicodeio.c; then echo $(srcdir)/unicodeio.c; else echo unicodeio.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > unicodeio_.c
|
||||
userspec_.c: userspec.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/userspec.c; then echo $(srcdir)/userspec.c; else echo userspec.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > userspec_.c
|
||||
utime_.c: utime.c $(ANSI2KNR)
|
||||
@@ -485,18 +502,19 @@ euidaccess_.o exclude_.o fileblocks_.o filemode_.o fnmatch_.o \
|
||||
fsusage_.o ftruncate_.o full-write_.o getdate_.o getgroups_.o \
|
||||
gethostname_.o getline_.o getloadavg_.o getopt_.o getopt1_.o \
|
||||
getugroups_.o getusershell_.o group-member_.o hard-locale_.o hash_.o \
|
||||
human_.o idcache_.o isdir_.o lchown_.o linebuffer_.o long-options_.o \
|
||||
lstat_.o makepath_.o malloc_.o md5_.o memcasecmp_.o memchr_.o memcmp_.o \
|
||||
memcoll_.o memcpy_.o memmove_.o memset_.o mkdir_.o mktime_.o \
|
||||
modechange_.o mountlist_.o nanosleep_.o obstack_.o path-concat_.o \
|
||||
posixtm_.o putenv_.o quotearg_.o readtokens_.o readutmp_.o realloc_.o \
|
||||
regex_.o rmdir_.o rpmatch_.o safe-read_.o same_.o save-cwd_.o \
|
||||
savedir_.o stat_.o stime_.o stpcpy_.o strcasecmp_.o strcspn_.o \
|
||||
strdup_.o strftime_.o stripslash_.o strncasecmp_.o strndup_.o \
|
||||
strpbrk_.o strstr_.o strtod_.o strtol_.o strtoul_.o strtoull_.o \
|
||||
strtoumax_.o strverscmp_.o userspec_.o utime_.o version-etc_.o \
|
||||
xgetcwd_.o xgethostname_.o xmalloc_.o xstrdup_.o xstrtod_.o xstrtol_.o \
|
||||
xstrtoul_.o xstrtoumax_.o yesno_.o : $(ANSI2KNR)
|
||||
human_.o idcache_.o isdir_.o lchown_.o linebuffer_.o localcharset_.o \
|
||||
long-options_.o lstat_.o makepath_.o malloc_.o md5_.o memcasecmp_.o \
|
||||
memchr_.o memcmp_.o memcoll_.o memcpy_.o memmove_.o memset_.o mkdir_.o \
|
||||
mktime_.o modechange_.o mountlist_.o nanosleep_.o obstack_.o \
|
||||
path-concat_.o posixtm_.o putenv_.o quotearg_.o readtokens_.o \
|
||||
readutmp_.o realloc_.o regex_.o rmdir_.o rpmatch_.o safe-read_.o \
|
||||
same_.o save-cwd_.o savedir_.o stat_.o stime_.o stpcpy_.o strcasecmp_.o \
|
||||
strcspn_.o strdup_.o strftime_.o stripslash_.o strncasecmp_.o \
|
||||
strndup_.o strpbrk_.o strstr_.o strtod_.o strtol_.o strtoul_.o \
|
||||
strtoull_.o strtoumax_.o strverscmp_.o unicodeio_.o userspec_.o \
|
||||
utime_.o version-etc_.o xgetcwd_.o xgethostname_.o xmalloc_.o \
|
||||
xstrdup_.o xstrtod_.o xstrtol_.o xstrtoul_.o xstrtoumax_.o yesno_.o : \
|
||||
$(ANSI2KNR)
|
||||
.y.c:
|
||||
$(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
|
||||
if test -f y.tab.h; then \
|
||||
@@ -513,7 +531,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -f$$here/ID $$unique $(LISP)
|
||||
mkid -fID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
@@ -537,20 +555,6 @@ distclean-tags:
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
@AMDEP@include $(DEPDIR)/addext$U.Po
|
||||
@AMDEP@include $(DEPDIR)/alloca.Po
|
||||
@AMDEP@include $(DEPDIR)/argmatch$U.Po
|
||||
@@ -588,6 +592,7 @@ distdir: $(DISTFILES)
|
||||
@AMDEP@include $(DEPDIR)/isdir$U.Po
|
||||
@AMDEP@include $(DEPDIR)/lchown.Po
|
||||
@AMDEP@include $(DEPDIR)/linebuffer$U.Po
|
||||
@AMDEP@include $(DEPDIR)/localcharset$U.Po
|
||||
@AMDEP@include $(DEPDIR)/long-options$U.Po
|
||||
@AMDEP@include $(DEPDIR)/lstat.Po
|
||||
@AMDEP@include $(DEPDIR)/makepath$U.Po
|
||||
@@ -638,6 +643,7 @@ distdir: $(DISTFILES)
|
||||
@AMDEP@include $(DEPDIR)/strtoull.Po
|
||||
@AMDEP@include $(DEPDIR)/strtoumax.Po
|
||||
@AMDEP@include $(DEPDIR)/strverscmp.Po
|
||||
@AMDEP@include $(DEPDIR)/unicodeio$U.Po
|
||||
@AMDEP@include $(DEPDIR)/userspec$U.Po
|
||||
@AMDEP@include $(DEPDIR)/utime.Po
|
||||
@AMDEP@include $(DEPDIR)/version-etc$U.Po
|
||||
@@ -666,8 +672,23 @@ maintainer-clean-depend:
|
||||
@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(COMPILE) -c -o $@ $<
|
||||
$(COMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -676,7 +697,7 @@ check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec-am: install-exec-local
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
@@ -685,9 +706,9 @@ install-data: install-data-am
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am:
|
||||
uninstall-am: uninstall-local
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LIBRARIES) $(HEADERS)
|
||||
all-am: Makefile $(LIBRARIES) $(HEADERS) all-local
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
@@ -697,6 +718,7 @@ installdirs:
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
@@ -737,13 +759,14 @@ clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile mostlyclean-kr distclean-kr clean-kr \
|
||||
maintainer-clean-kr tags mostlyclean-tags distclean-tags clean-tags \
|
||||
maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
|
||||
clean-depend maintainer-clean-depend info-am info dvi-am dvi check \
|
||||
check-am installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
maintainer-clean-tags mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-local install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-local uninstall-am uninstall all-local all-redirect all-am \
|
||||
all install-strip installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
|
||||
lstat.c: xstat.in
|
||||
sed \
|
||||
@@ -763,6 +786,40 @@ stat.c: xstat.in
|
||||
$(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
# The following is needed in order to install a simple file in $(libdir)
|
||||
# which is shared with other installed packages. We use a list of referencing
|
||||
# packages so that "make uninstall" will remove the file if and only if it
|
||||
# is not used by another installed package.
|
||||
|
||||
all-local: charset.alias ref-add.sed ref-del.sed
|
||||
install-exec-local: all-local
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
test -f $(charset_alias) \
|
||||
&& orig=$(charset_alias) \
|
||||
|| orig=charset.alias; \
|
||||
sed -f ref-add.sed $$orig > $(charset_tmp)
|
||||
$(INSTALL_DATA) $(charset_tmp) $(charset_alias)
|
||||
rm -f $(charset_tmp)
|
||||
|
||||
uninstall-local: all-local
|
||||
if test -f $(charset_alias); then \
|
||||
sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
|
||||
if grep '^# Packages using this file: $$' $(charset_tmp) \
|
||||
> /dev/null; then \
|
||||
rm -f $(charset_alias); \
|
||||
else \
|
||||
$(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
|
||||
fi; \
|
||||
rm -f $(charset_tmp); \
|
||||
fi
|
||||
|
||||
charset.alias: config.charset
|
||||
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
|
||||
mv t-$@ $@
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
6
lib/README
Normal file
6
lib/README
Normal file
@@ -0,0 +1,6 @@
|
||||
The files in this directory are shared between the fileutils, sh-utils,
|
||||
and textutils packages. Not all files are used by each package.
|
||||
The autoconf tests required for these files are in ../m4.
|
||||
|
||||
The library name, fetish, is a permutation of the first two
|
||||
letters of each of the package names: FIleutils, TExtutils, SH-utils.
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Host name canonicalization
|
||||
|
||||
Copyright (C) 1995, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifndef strdup
|
||||
char *strdup ();
|
||||
#endif
|
||||
void free ();
|
||||
|
||||
/* Returns the canonical hostname associated with HOST (allocated in a static
|
||||
|
||||
182
lib/config.charset
Executable file
182
lib/config.charset
Executable file
@@ -0,0 +1,182 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent table of character encoding aliases.
|
||||
#
|
||||
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
# by the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# USA.
|
||||
#
|
||||
# The table consists of lines of the form
|
||||
# ALIAS CANONICAL
|
||||
#
|
||||
# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
|
||||
# ALIAS is compared in a case sensitive way.
|
||||
#
|
||||
# CANONICAL is the GNU canonical name for this character encoding.
|
||||
# It must be an encoding supported by libiconv. Support by GNU libc is
|
||||
# also desirable. CANONICAL is case insensitive. Usually an upper case
|
||||
# MIME charset name is preferred.
|
||||
# The current list of GNU canonical charset names is as follows.
|
||||
#
|
||||
# name used by which systems a MIME name?
|
||||
# ASCII glibc solaris
|
||||
# ISO-8859-1 glibc aix hpux irix osf solaris yes
|
||||
# ISO-8859-2 glibc aix hpux irix solaris yes
|
||||
# ISO-8859-4 solaris yes
|
||||
# ISO-8859-5 glibc aix hpux irix solaris yes
|
||||
# ISO-8859-6 aix hpux solaris yes
|
||||
# ISO-8859-7 glibc aix hpux irix osf solaris yes
|
||||
# ISO-8859-8 glibc aix hpux solaris yes
|
||||
# ISO-8859-9 glibc aix hpux irix osf solaris yes
|
||||
# ISO-8859-13 glibc
|
||||
# ISO-8859-15 aix solaris
|
||||
# KOI8-R glibc solaris yes
|
||||
# KOI8-U glibc yes
|
||||
# CP850 aix osf
|
||||
# CP856 aix
|
||||
# CP922 aix
|
||||
# CP932 aix
|
||||
# CP943 aix
|
||||
# CP1046 aix
|
||||
# CP1124 aix
|
||||
# CP1129 aix
|
||||
# CP1252 aix
|
||||
# EUC-CN aix hpux solaris
|
||||
# EUC-JP aix hpux solaris yes
|
||||
# EUC-KR aix hpux solaris yes
|
||||
# EUC-TW aix hpux solaris
|
||||
# BIG5 aix hpux solaris yes
|
||||
# GBK aix
|
||||
# SJIS hpux solaris
|
||||
# TIS-620 aix hpux solaris
|
||||
# HP-ROMAN8 hpux
|
||||
# HP-ARABIC8 hpux
|
||||
# HP-GREEK8 hpux
|
||||
# HP-HEBREW8 hpux
|
||||
# HP-TURKISH8 hpux
|
||||
# HP-KANA8 hpux
|
||||
# UTF-8 glibc aix hpux solaris yes
|
||||
#
|
||||
# Note: Names which are not marked as being a MIME name should not be used in
|
||||
# Internet protocols for information interchange (mail, news, etc.).
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
|
||||
host="$1"
|
||||
os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
|
||||
echo "# This file contains a table of character encoding aliases,"
|
||||
echo "# suitable for operating system '${os}'."
|
||||
echo "# It was automatically generated from config.charset."
|
||||
# List of references, updated during installation:
|
||||
echo "# Packages using this file: "
|
||||
case "$os" in
|
||||
linux* | *-gnu*)
|
||||
# With glibc we don't need any canonicalization, because glibc
|
||||
# supports all GNU canonical names directly.
|
||||
echo "ANSI_X3.4-1968 ASCII" # this is a nop
|
||||
echo "ISO_646.IRV:1983 ASCII" # this is a nop
|
||||
echo "BALTIC ISO-8859-13" # in glibc-2.2 or newer, this is a nop
|
||||
;;
|
||||
aix*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-6 ISO-8859-6"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-8 ISO-8859-8"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "IBM-850 CP850"
|
||||
echo "IBM-856 CP856"
|
||||
echo "IBM-921 ISO-8859-13"
|
||||
echo "IBM-922 CP922"
|
||||
echo "IBM-932 CP932"
|
||||
echo "IBM-943 CP943"
|
||||
echo "IBM-1046 CP1046"
|
||||
echo "IBM-1124 CP1124"
|
||||
echo "IBM-1129 CP1129"
|
||||
echo "IBM-1252 CP1252"
|
||||
echo "IBM-eucCN EUC-CN"
|
||||
echo "IBM-eucJP EUC-JP"
|
||||
echo "IBM-eucKR EUC-KR"
|
||||
echo "IBM-eucTW EUC-TW"
|
||||
echo "big5 BIG5"
|
||||
echo "GBK GBK"
|
||||
echo "TIS-620 TIS-620"
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
hpux*)
|
||||
echo "iso88591 ISO-8859-1"
|
||||
echo "iso88592 ISO-8859-2"
|
||||
echo "iso88595 ISO-8859-5"
|
||||
echo "iso88596 ISO-8859-6"
|
||||
echo "iso88597 ISO-8859-7"
|
||||
echo "iso88598 ISO-8859-8"
|
||||
echo "iso88599 ISO-8859-9"
|
||||
echo "roman8 HP-ROMAN8"
|
||||
echo "arabic8 HP-ARABIC8"
|
||||
echo "greek8 HP-GREEK8"
|
||||
echo "hebrew8 HP-HEBREW8"
|
||||
echo "turkish8 HP-TURKISH8"
|
||||
echo "kana8 HP-KANA8"
|
||||
echo "tis620 TIS-620"
|
||||
echo "big5 BIG5"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
echo "hp15CN EUC-CN"
|
||||
#echo "ccdc ?" # what is this?
|
||||
echo "SJIS SJIS"
|
||||
echo "utf8 UTF-8"
|
||||
;;
|
||||
irix*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
;;
|
||||
osf*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "cp850 CP850"
|
||||
;;
|
||||
solaris*)
|
||||
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-6 ISO-8859-6"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-8 ISO-8859-8"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "koi8-r KOI8-R"
|
||||
echo "BIG5 BIG5"
|
||||
echo "gb2312 EUC-CN"
|
||||
echo "cns11643 EUC-TW"
|
||||
echo "5601 EUC-KR"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "PCK SJIS"
|
||||
echo "TIS620.2533 TIS-620"
|
||||
#echo "sun_eu_greek ?" # what is this?
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
esac
|
||||
@@ -1,5 +1,5 @@
|
||||
/* filemode.c -- make a string describing file modes
|
||||
Copyright (C) 1985, 1990, 1993, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1985, 1990, 1993, 1998-2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -14,7 +14,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
@@ -80,37 +80,42 @@
|
||||
# undef S_ISSOCK
|
||||
#endif /* STAT_MACROS_BROKEN. */
|
||||
|
||||
#if !defined(S_ISBLK) && defined(S_IFBLK)
|
||||
#if !defined S_ISBLK && defined S_IFBLK
|
||||
# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
|
||||
#endif
|
||||
#if !defined(S_ISCHR) && defined(S_IFCHR)
|
||||
#if !defined S_ISCHR && defined S_IFCHR
|
||||
# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
||||
#endif
|
||||
#if !defined(S_ISDIR) && defined(S_IFDIR)
|
||||
#if !defined S_ISDIR && defined S_IFDIR
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
#if !defined(S_ISREG) && defined(S_IFREG)
|
||||
#if !defined S_ISREG && defined S_IFREG
|
||||
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
#if !defined(S_ISFIFO) && defined(S_IFIFO)
|
||||
#if !defined S_ISFIFO && defined S_IFIFO
|
||||
# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
||||
#endif
|
||||
#if !defined(S_ISLNK) && defined(S_IFLNK)
|
||||
#if !defined S_ISLNK && defined S_IFLNK
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
#endif
|
||||
#if !defined(S_ISSOCK) && defined(S_IFSOCK)
|
||||
#if !defined S_ISSOCK && defined S_IFSOCK
|
||||
# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
|
||||
#endif
|
||||
#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
|
||||
#if !defined S_ISMPB && defined S_IFMPB /* V7 */
|
||||
# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
|
||||
# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
|
||||
#endif
|
||||
#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
|
||||
#if !defined S_ISNWK && defined S_IFNWK /* HP/UX */
|
||||
# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
|
||||
#endif
|
||||
#if !defined(S_ISDOOR) && defined(S_IFDOOR) /* Solaris 2.5 and up */
|
||||
#if !defined S_ISDOOR && defined S_IFDOOR /* Solaris 2.5 and up */
|
||||
# define S_ISDOOR(m) (((m) & S_IFMT) == S_IFDOOR)
|
||||
#endif
|
||||
#if !defined S_ISCTG && defined S_IFCTG /* MassComp */
|
||||
# define S_ISCTG(m) (((m) & S_IFMT) == S_IFCTG)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Set the 's' and 't' flags in file attributes string CHARS,
|
||||
according to the file mode BITS. */
|
||||
@@ -156,11 +161,13 @@ setst (mode_t bits, char *chars)
|
||||
'D' for doors
|
||||
'b' for block special files
|
||||
'c' for character special files
|
||||
'n' for network special files
|
||||
'm' for multiplexor files
|
||||
'M' for an off-line (regular) file
|
||||
'l' for symbolic links
|
||||
's' for sockets
|
||||
'p' for fifos
|
||||
'C' for contigous data files
|
||||
'-' for regular files
|
||||
'?' for any other file type. */
|
||||
|
||||
@@ -201,6 +208,10 @@ ftypelet (mode_t bits)
|
||||
if (S_ISDOOR (bits))
|
||||
return 'D';
|
||||
#endif
|
||||
#ifdef S_ISCTG
|
||||
if (S_ISCTG (bits))
|
||||
return 'C';
|
||||
#endif
|
||||
|
||||
/* The following two tests are for Cray DMF (Data Migration
|
||||
Facility), which is a HSM file system. A migrated file has a
|
||||
|
||||
@@ -20,6 +20,14 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* This is for BeOS. */
|
||||
#if !defined getpagesize && HAVE_OS_H
|
||||
# include <OS.h>
|
||||
# if defined B_PAGE_SIZE
|
||||
# define getpagesize() B_PAGE_SIZE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef getpagesize
|
||||
# include <sys/param.h>
|
||||
# ifdef EXEC_PAGESIZE
|
||||
|
||||
202
lib/localcharset.c
Normal file
202
lib/localcharset.c
Normal file
@@ -0,0 +1,202 @@
|
||||
/* Determine a canonical name for the current locale's character encoding.
|
||||
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* Written by Bruno Haible <haible@clisp.cons.org>. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDDEF_H
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LANGINFO_CODESET
|
||||
# include <langinfo.h>
|
||||
#else
|
||||
# if HAVE_SETLOCALE
|
||||
# include <locale.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "path-concat.h"
|
||||
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
|
||||
/* The following static variable is declared 'volatile' to avoid a
|
||||
possible multithread problem in the function get_charset_aliases. If we
|
||||
are running in a threaded environment, and if two threads initialize
|
||||
'charset_aliases' simultaneously, both will produce the same value,
|
||||
and everything will be ok if the two assignments to 'charset_aliases'
|
||||
are atomic. But I don't know what will happen if the two assignments mix. */
|
||||
/* Pointer to the contents of the charset.alias file, if it has already been
|
||||
read, else NULL. Its format is:
|
||||
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
|
||||
static char * volatile charset_aliases;
|
||||
|
||||
/* Return a pointer to the contents of the charset.alias file. */
|
||||
static const char *
|
||||
get_charset_aliases ()
|
||||
{
|
||||
char *cp;
|
||||
|
||||
cp = charset_aliases;
|
||||
if (cp == NULL)
|
||||
{
|
||||
FILE *fp;
|
||||
char *file_name = path_concat (LIBDIR, "charset.alias", NULL);
|
||||
|
||||
if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
|
||||
/* Out of memory or file not found, treat it as empty. */
|
||||
cp = "";
|
||||
else
|
||||
{
|
||||
/* Parse the file's contents. */
|
||||
int c;
|
||||
char buf1[50+1];
|
||||
char buf2[50+1];
|
||||
char *res_ptr = NULL;
|
||||
size_t res_size = 0;
|
||||
size_t l1, l2;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
c = getc (fp);
|
||||
if (c == EOF)
|
||||
break;
|
||||
if (c == '\n' || c == ' ' || c == '\t')
|
||||
continue;
|
||||
if (c == '#')
|
||||
{
|
||||
/* Skip comment, to end of line. */
|
||||
do
|
||||
c = getc (fp);
|
||||
while (!(c == EOF || c == '\n'));
|
||||
if (c == EOF)
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
ungetc (c, fp);
|
||||
if (fscanf(fp, "%50s %50s", buf1, buf2) < 2)
|
||||
break;
|
||||
l1 = strlen (buf1);
|
||||
l2 = strlen (buf2);
|
||||
if (res_size == 0)
|
||||
{
|
||||
res_size = l1 + 1 + l2 + 1;
|
||||
res_ptr = xmalloc (res_size + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
res_size += l1 + 1 + l2 + 1;
|
||||
res_ptr = xrealloc (res_ptr, res_size + 1);
|
||||
}
|
||||
strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
|
||||
strcpy (res_ptr + res_size - (l2 + 1), buf2);
|
||||
}
|
||||
fclose (fp);
|
||||
if (res_size == 0)
|
||||
cp = "";
|
||||
else
|
||||
{
|
||||
*(res_ptr + res_size) = '\0';
|
||||
cp = res_ptr;
|
||||
}
|
||||
}
|
||||
|
||||
charset_aliases = cp;
|
||||
if (file_name != NULL)
|
||||
free (file_name);
|
||||
}
|
||||
|
||||
return cp;
|
||||
}
|
||||
|
||||
/* Determine the current locale's character encoding, and canonicalize it
|
||||
into one of the canonical names listed in config.charset.
|
||||
The result must not be freed; it is statically allocated.
|
||||
If the canonical name cannot be determined, the result is a non-canonical
|
||||
name or NULL. */
|
||||
|
||||
#ifdef STATIC
|
||||
STATIC
|
||||
#endif
|
||||
const char *
|
||||
locale_charset ()
|
||||
{
|
||||
const char *codeset;
|
||||
const char *aliases;
|
||||
|
||||
#if HAVE_LANGINFO_CODESET
|
||||
|
||||
/* Most systems support nl_langinfo (CODESET) nowadays. */
|
||||
codeset = nl_langinfo (CODESET);
|
||||
|
||||
#else
|
||||
|
||||
/* On old systems which lack it, use setlocale and getenv. */
|
||||
const char *locale = NULL;
|
||||
|
||||
# if HAVE_SETLOCALE
|
||||
locale = setlocale (LC_CTYPE, NULL);
|
||||
# endif
|
||||
if (locale == NULL)
|
||||
{
|
||||
locale = getenv ("LC_ALL");
|
||||
if (locale == NULL)
|
||||
{
|
||||
locale = getenv ("LC_CTYPE");
|
||||
if (locale == NULL)
|
||||
locale = getenv ("LANG");
|
||||
}
|
||||
}
|
||||
|
||||
/* On some old systems, one used to set locale = "iso8859_1". On others,
|
||||
you set it to "language_COUNTRY.charset". In any case, we resolve it
|
||||
through the charset.alias file. */
|
||||
codeset = locale;
|
||||
|
||||
#endif
|
||||
|
||||
if (codeset != NULL)
|
||||
{
|
||||
/* Resolve alias. */
|
||||
for (aliases = get_charset_aliases ();
|
||||
*aliases != '\0';
|
||||
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
|
||||
if (!strcmp (codeset, aliases))
|
||||
{
|
||||
codeset = aliases + strlen (aliases) + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return codeset;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* makepath.c -- Ensure that a directory path exists.
|
||||
Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -50,6 +50,10 @@ char *alloca ();
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifndef S_IRWXUGO
|
||||
# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
@@ -380,13 +384,18 @@ make_path (const char *argpath,
|
||||
error (0, errno, _("cannot chown %s"), dirpath);
|
||||
retval = 1;
|
||||
}
|
||||
/* chown may have turned off some permission bits we wanted. */
|
||||
if ((mode & (S_ISUID | S_ISGID | S_ISVTX))
|
||||
&& chmod (basename_dir, mode))
|
||||
{
|
||||
error (0, errno, _("cannot chmod %s"), dirpath);
|
||||
retval = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* The above chown may have turned off some permission bits in MODE.
|
||||
Another reason we may have to use chmod here is that mkdir(2) is
|
||||
required to honor only the file permission bits. In particular,
|
||||
it need not honor the `special' bits, so if MODE includes any
|
||||
special bits, set them here. */
|
||||
if ((mode & ~S_IRWXUGO)
|
||||
&& chmod (basename_dir, mode))
|
||||
{
|
||||
error (0, errno, _("cannot chmod %s"), dirpath);
|
||||
retval = 1;
|
||||
}
|
||||
|
||||
CLEANUP_CWD;
|
||||
|
||||
@@ -64,7 +64,7 @@ my_usleep (const struct timespec *ts_delay)
|
||||
|
||||
int
|
||||
rpl_nanosleep (const struct timespec *requested_delay,
|
||||
struct timespec *remaining_delay)
|
||||
struct timespec *remaining_delay)
|
||||
{
|
||||
#ifdef SA_NOCLDSTOP
|
||||
struct sigaction oldact, newact;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* path-concat.c -- concatenate two arbitrary pathnames
|
||||
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -32,6 +32,9 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
char *malloc ();
|
||||
#ifndef strdup
|
||||
char *strdup ();
|
||||
#endif
|
||||
|
||||
#ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1994, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1994, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C
|
||||
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
@@ -17,14 +17,16 @@
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Include errno.h *after* sys/types.h to work around header problems
|
||||
on AIX 3.2.5. */
|
||||
#include <errno.h>
|
||||
|
||||
/* Don't include stdlib.h because some (e.g., Solaris 2.7) declare putenv
|
||||
with a non-const argument. That would conflict with the declaration of
|
||||
rpl_putenv below (due to the #define putenv rpl_putenv from config.h). */
|
||||
|
||||
@@ -44,6 +44,12 @@
|
||||
# define UCHAR_MAX ((unsigned char) -1)
|
||||
#endif
|
||||
|
||||
#if HAVE_C_BACKSLASH_A
|
||||
# define ALERT_CHAR '\a'
|
||||
#else
|
||||
# define ALERT_CHAR '\7'
|
||||
#endif
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
@@ -266,9 +272,7 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
|
||||
}
|
||||
break;
|
||||
|
||||
#if HAVE_C_BACKSLASH_A
|
||||
case '\a': esc = 'a'; goto c_escape;
|
||||
#endif
|
||||
case ALERT_CHAR: esc = 'a'; goto c_escape;
|
||||
case '\b': esc = 'b'; goto c_escape;
|
||||
case '\f': esc = 'f'; goto c_escape;
|
||||
case '\n': esc = 'n'; goto c_and_shell_escape;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
|
||||
# include <string.h>
|
||||
@@ -129,4 +130,4 @@ read_utmp (const char *filename, int *n_entries, STRUCT_UTMP **utmp_buf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* HAVE_UTMPNAME */
|
||||
#endif
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
# endif
|
||||
# else
|
||||
# include <utmp.h>
|
||||
# if !HAVE_DECL_GETUTENT
|
||||
struct utmp *getutent();
|
||||
# endif
|
||||
# define UTMP_STRUCT_NAME utmp
|
||||
# define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_time)
|
||||
# define SET_UTMP_ENT setutent
|
||||
|
||||
31
lib/ref-add.sin
Normal file
31
lib/ref-add.sin
Normal file
@@ -0,0 +1,31 @@
|
||||
# Add this package to a list of references stored in a text file.
|
||||
#
|
||||
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
# by the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# USA.
|
||||
#
|
||||
# Written by Bruno Haible <haible@clisp.cons.org>.
|
||||
#
|
||||
/^# Packages using this file: / {
|
||||
s/# Packages using this file://
|
||||
ta
|
||||
:a
|
||||
s/ @PACKAGE@ / @PACKAGE@ /
|
||||
tb
|
||||
s/ $/ @PACKAGE@ /
|
||||
:b
|
||||
s/^/# Packages using this file:/
|
||||
}
|
||||
26
lib/ref-del.sin
Normal file
26
lib/ref-del.sin
Normal file
@@ -0,0 +1,26 @@
|
||||
# Remove this package from a list of references stored in a text file.
|
||||
#
|
||||
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
# by the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
# USA.
|
||||
#
|
||||
# Written by Bruno Haible <haible@clisp.cons.org>.
|
||||
#
|
||||
/^# Packages using this file: / {
|
||||
s/# Packages using this file://
|
||||
s/ @PACKAGE@ / /
|
||||
s/^/# Packages using this file:/
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Determine whether string value is affirmation or negative response
|
||||
according to current locale's data.
|
||||
Copyright (C) 1996, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -31,6 +31,9 @@
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <sys/types.h>
|
||||
# if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
# endif
|
||||
# include <regex.h>
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
|
||||
@@ -89,7 +89,8 @@ savedir (const char *dir, off_t name_size)
|
||||
|
||||
/* Be sure name_size is at least `1' so there's room for
|
||||
the final NUL byte. */
|
||||
name_size += !name_size;
|
||||
if (name_size <= 0)
|
||||
name_size = 1;
|
||||
|
||||
name_space = (char *) malloc (name_size);
|
||||
if (name_space == NULL)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
@@ -817,6 +817,14 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
char *u = ufmt;
|
||||
char ubuf[1024]; /* enough for any single format in practice */
|
||||
size_t len;
|
||||
/* Make sure we're calling the actual underlying strftime.
|
||||
In some cases, config.h contains something like
|
||||
"#define strftime rpl_strftime". */
|
||||
# ifdef strftime
|
||||
# undef strftime
|
||||
size_t strftime ();
|
||||
# endif
|
||||
|
||||
*u++ = '%';
|
||||
if (modifier != 0)
|
||||
*u++ = modifier;
|
||||
|
||||
200
lib/unicodeio.c
Normal file
200
lib/unicodeio.c
Normal file
@@ -0,0 +1,200 @@
|
||||
/* Unicode character output to streams with locale dependent encoding.
|
||||
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* Written by Bruno Haible <haible@clisp.cons.org>. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDDEF_H
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#if HAVE_ICONV
|
||||
# include <iconv.h>
|
||||
#endif
|
||||
|
||||
#include <error.h>
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
|
||||
#include "unicodeio.h"
|
||||
|
||||
/* When we pass a Unicode character to iconv(), we must pass it in a
|
||||
suitable encoding. The standardized Unicode encodings are
|
||||
UTF-8, UCS-2, UCS-4, UTF-16, UTF-16BE, UTF-16LE, UTF-7.
|
||||
UCS-2 supports only characters up to \U0000FFFF.
|
||||
UTF-16 and variants support only characters up to \U0010FFFF.
|
||||
UTF-7 is way too complex and not supported by glibc-2.1.
|
||||
UCS-4 specification leaves doubts about endianness and byte order
|
||||
mark. glibc currently interprets it as big endian without byte order
|
||||
mark, but this is not backed by an RFC.
|
||||
So we use UTF-8. It supports characters up to \U7FFFFFFF and is
|
||||
unambiguously defined. */
|
||||
|
||||
/* Stores the UTF-8 representation of the Unicode character wc in r[0..5].
|
||||
Returns the number of bytes stored, or -1 if wc is out of range. */
|
||||
static int
|
||||
utf8_wctomb (unsigned char *r, unsigned int wc)
|
||||
{
|
||||
int count;
|
||||
|
||||
if (wc < 0x80)
|
||||
count = 1;
|
||||
else if (wc < 0x800)
|
||||
count = 2;
|
||||
else if (wc < 0x10000)
|
||||
count = 3;
|
||||
else if (wc < 0x200000)
|
||||
count = 4;
|
||||
else if (wc < 0x4000000)
|
||||
count = 5;
|
||||
else if (wc <= 0x7fffffff)
|
||||
count = 6;
|
||||
else
|
||||
return -1;
|
||||
|
||||
switch (count)
|
||||
{
|
||||
/* Note: code falls through cases! */
|
||||
case 6: r[5] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x4000000;
|
||||
case 5: r[4] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x200000;
|
||||
case 4: r[3] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x10000;
|
||||
case 3: r[2] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x800;
|
||||
case 2: r[1] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0xc0;
|
||||
case 1: r[0] = wc;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/* Luckily, the encoding's name is platform independent. */
|
||||
#define UTF8_NAME "UTF-8"
|
||||
|
||||
/* Outputs the Unicode character CODE to the output stream STREAM.
|
||||
Assumes that the locale doesn't change between two calls. */
|
||||
void
|
||||
print_unicode_char (FILE *stream, unsigned int code)
|
||||
{
|
||||
static int initialized;
|
||||
static int is_utf8;
|
||||
#if HAVE_ICONV
|
||||
static iconv_t utf8_to_local;
|
||||
#endif
|
||||
|
||||
char inbuf[6];
|
||||
int count;
|
||||
|
||||
if (!initialized)
|
||||
{
|
||||
extern const char *locale_charset (void);
|
||||
const char *charset = locale_charset ();
|
||||
|
||||
is_utf8 = (charset != NULL && !strcmp (charset, UTF8_NAME));
|
||||
#if HAVE_ICONV
|
||||
if (!is_utf8)
|
||||
{
|
||||
utf8_to_local = (charset != NULL
|
||||
? iconv_open (charset, UTF8_NAME)
|
||||
: (iconv_t)(-1));
|
||||
if (utf8_to_local == (iconv_t)(-1))
|
||||
{
|
||||
/* For an unknown encoding, assume ASCII. */
|
||||
utf8_to_local = iconv_open ("ASCII", UTF8_NAME);
|
||||
if (utf8_to_local == (iconv_t)(-1))
|
||||
error (1, 0,
|
||||
_("cannot output U+%04X: iconv function not usable"),
|
||||
code);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
initialized = 1;
|
||||
}
|
||||
|
||||
/* Convert the character to UTF-8. */
|
||||
count = utf8_wctomb ((unsigned char *) inbuf, code);
|
||||
if (count < 0)
|
||||
error (1, 0, _("U+%04X: character out of range"), code);
|
||||
|
||||
if (is_utf8)
|
||||
{
|
||||
fwrite (inbuf, 1, count, stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if HAVE_ICONV
|
||||
char outbuf[25];
|
||||
const char *inptr;
|
||||
size_t inbytesleft;
|
||||
char *outptr;
|
||||
size_t outbytesleft;
|
||||
size_t res;
|
||||
|
||||
inptr = inbuf;
|
||||
inbytesleft = count;
|
||||
outptr = outbuf;
|
||||
outbytesleft = sizeof (outbuf);
|
||||
|
||||
/* Convert the character from UTF-8 to the locale's charset. */
|
||||
res = iconv (utf8_to_local, &inptr, &inbytesleft, &outptr, &outbytesleft);
|
||||
if (inbytesleft > 0 || res == (size_t)(-1)
|
||||
/* Irix iconv() inserts a NUL byte if it cannot convert. */
|
||||
# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi)
|
||||
|| (res > 0 && code != 0 && outptr - outbuf == 1 && *outbuf == '\0')
|
||||
# endif
|
||||
)
|
||||
error (1, res == (size_t)(-1) ? errno : 0,
|
||||
_("cannot convert U+%04X to local character set"), code);
|
||||
|
||||
/* Avoid glibc-2.1 bug and Solaris 2.7 bug. */
|
||||
# if defined _LIBICONV_VERSION \
|
||||
|| !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
|
||||
|
||||
/* Get back to the initial shift state. */
|
||||
res = iconv (utf8_to_local, NULL, NULL, &outptr, &outbytesleft);
|
||||
if (res == (size_t)(-1))
|
||||
error (1, errno, _("cannot convert U+%04X to local character set"),
|
||||
code);
|
||||
# endif
|
||||
|
||||
fwrite (outbuf, 1, outptr - outbuf, stream);
|
||||
#else
|
||||
error (1, 0, _("cannot output U+%04X: iconv function not available"),
|
||||
code);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
17
lib/unicodeio.h
Normal file
17
lib/unicodeio.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef UNICODEIO_H
|
||||
# define UNICODEIO_H
|
||||
|
||||
# include <stdio.h>
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Outputs the Unicode character CODE to the output stream STREAM. */
|
||||
extern void print_unicode_char PARAMS((FILE *stream, unsigned int code));
|
||||
|
||||
#endif
|
||||
118
m4/ChangeLog
118
m4/ChangeLog
@@ -1,3 +1,111 @@
|
||||
2000-04-18 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
|
||||
(jm_PREREQ): Use it.
|
||||
|
||||
2000-04-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Get it right :-)
|
||||
* jm-macros.m4: (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
|
||||
actual #define via AH_VERBATIM. Don't need separate AC_DEFINE.
|
||||
Suggestion from Akim Demaille.
|
||||
|
||||
2000-04-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4: (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg form
|
||||
of AC_DEFINE. Otherwise, the #ifndef in AH_VERBATIM gets clobbered.
|
||||
|
||||
2000-04-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new AH_VERBATIM
|
||||
to insert required #ifndef into config.h.in.
|
||||
Suggestion from Akim Demaille.
|
||||
|
||||
2000-04-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
|
||||
`AC_CHECK_HEADER' to check for locale.h. Thanks to a report from
|
||||
Christian Krackowizer.
|
||||
|
||||
More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
|
||||
* jm-macros.m4 (_GNU_SOURCE): Define.
|
||||
(AC_SYS_LARGEFILE): Require.
|
||||
(AM_C_PROTOTYPES): Require.
|
||||
|
||||
2000-04-05 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
|
||||
IRIX if the installer said otherwise.
|
||||
|
||||
2000-04-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Portability tweaks required for ultrix4.3.
|
||||
* check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
|
||||
(jm_CHECK_DECLS): Add getutent to the list of functions.
|
||||
(_jm_DECL_HEADERS): Add utmpx.h.
|
||||
From John David Anglin.
|
||||
|
||||
* strftime.m4: Back out the 2000-04-02 change.
|
||||
Instead of that change, simply undefine putenv in the test program.
|
||||
|
||||
2000-04-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* gettext.m4: Fix typo in comment.
|
||||
|
||||
* codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
|
||||
textutils/configure.in). Suggestion from Paul Eggert.
|
||||
(AC_CHECK_FUNCS): Add nl_langinfo. (also from textutils/configure.in)
|
||||
|
||||
2000-04-02 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
|
||||
variable in the shell rather than using putenv, which isn't
|
||||
portable. This avoids the configure-time inter-test dependency
|
||||
on the potentially-renamed putenv function.
|
||||
|
||||
2000-03-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
|
||||
before checking struct stat.st_blksize, so that
|
||||
HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
|
||||
|
||||
2000-03-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
|
||||
since strftime.c uses HAVE_STRFTIME to decide whether to use
|
||||
the underlying strftime.
|
||||
|
||||
2000-03-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* lib-check.m4: Look for getspnam in -lgen, too.
|
||||
From Marco Franzen.
|
||||
|
||||
2000-02-02 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* codeset.m4: New file.
|
||||
* iconv.m4: New file.
|
||||
* jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
|
||||
|
||||
2000-03-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
|
||||
for lib/localcharset.c.
|
||||
|
||||
2000-03-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
|
||||
|
||||
2000-03-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* timespec.m4: Require AC_HEADER_TIME before the cache check so
|
||||
the messages come out on separate lines.
|
||||
|
||||
* jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
|
||||
rather than jm_CHECK_DECLARATIONS.
|
||||
* decl.m4: Remove now-unused file.
|
||||
|
||||
* check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and geteuid.
|
||||
|
||||
2000-02-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* check-decl.m4: Add getenv to the list.
|
||||
@@ -170,13 +278,13 @@
|
||||
2000-01-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Quote multibyte characters correctly.
|
||||
* m4/c-bs-a.m4: New file.
|
||||
* m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
|
||||
* c-bs-a.m4: New file.
|
||||
* prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
|
||||
(jm_PREREQ): Use it.
|
||||
|
||||
2000-01-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/uintmax_t.m4: Port to autoconf 2.13.
|
||||
* uintmax_t.m4: Port to autoconf 2.13.
|
||||
|
||||
2000-01-08 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
@@ -239,7 +347,7 @@
|
||||
|
||||
1999-11-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
|
||||
* largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
|
||||
problem with the QNX 4.25 shell, which doesn't propagate exit
|
||||
status of failed commands inside shell assignments.
|
||||
|
||||
@@ -312,7 +420,7 @@
|
||||
|
||||
1999-08-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
|
||||
* largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
|
||||
in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
|
||||
|
||||
1999-08-05 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
@@ -8,9 +8,9 @@ bison.m4 \
|
||||
c-bs-a.m4 \
|
||||
check-decl.m4 \
|
||||
chown.m4 \
|
||||
codeset.m4 \
|
||||
d-ino.m4 \
|
||||
d-type.m4 \
|
||||
decl.m4 \
|
||||
error.m4 \
|
||||
fnmatch.m4 \
|
||||
fstypename.m4 \
|
||||
@@ -22,6 +22,7 @@ getloadavg.m4 \
|
||||
gettext.m4 \
|
||||
glibc.m4 \
|
||||
group-member.m4 \
|
||||
iconv.m4 \
|
||||
inttypes_h.m4 \
|
||||
isc-posix.m4 \
|
||||
jm-glibc-io.m4 \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -118,9 +121,9 @@ bison.m4 \
|
||||
c-bs-a.m4 \
|
||||
check-decl.m4 \
|
||||
chown.m4 \
|
||||
codeset.m4 \
|
||||
d-ino.m4 \
|
||||
d-type.m4 \
|
||||
decl.m4 \
|
||||
error.m4 \
|
||||
fnmatch.m4 \
|
||||
fstypename.m4 \
|
||||
@@ -132,6 +135,7 @@ getloadavg.m4 \
|
||||
gettext.m4 \
|
||||
glibc.m4 \
|
||||
group-member.m4 \
|
||||
iconv.m4 \
|
||||
inttypes_h.m4 \
|
||||
isc-posix.m4 \
|
||||
jm-glibc-io.m4 \
|
||||
@@ -188,7 +192,7 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits m4/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@@ -202,11 +206,12 @@ distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
The files in this directory are shared between the fileutils, sh-utils,
|
||||
and textutils packages.
|
||||
|
||||
These files are used by a program called aclocal (part of the GNU automake
|
||||
package). aclocal uses these files to create aclocal.m4 which is in turn
|
||||
used by autoconf to create the configure script at the the top level in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 8
|
||||
#serial 10
|
||||
|
||||
dnl This is just a wrapper function to encapsulate this kludge.
|
||||
dnl Putting it in a separate file like this helps share it between
|
||||
@@ -37,11 +37,28 @@ AC_DEFUN(jm_CHECK_DECLS,
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_UTMPX_H
|
||||
# include <utmp.h>
|
||||
#endif
|
||||
'
|
||||
|
||||
AC_CHECK_DECLS((free, getenv, lseek, malloc, memchr, nanosleep,
|
||||
realloc, stpcpy, strstr, strtoul, strtoull),
|
||||
, , $headers)
|
||||
AC_CHECK_DECLS((
|
||||
free,
|
||||
getenv,
|
||||
geteuid,
|
||||
getlogin,
|
||||
getutent,
|
||||
lseek,
|
||||
malloc,
|
||||
memchr,
|
||||
nanosleep,
|
||||
realloc,
|
||||
stpcpy,
|
||||
strstr,
|
||||
strtoul,
|
||||
strtoull,
|
||||
ttyname), , , $headers)
|
||||
])
|
||||
|
||||
dnl FIXME: when autoconf has support for it.
|
||||
@@ -49,5 +66,6 @@ dnl This is a little helper so we can require these header checks.
|
||||
AC_DEFUN(_jm_DECL_HEADERS,
|
||||
[
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h sys/time.h)
|
||||
AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h sys/time.h \
|
||||
utmpx.h)
|
||||
])
|
||||
|
||||
20
m4/codeset.m4
Normal file
20
m4/codeset.m4
Normal file
@@ -0,0 +1,20 @@
|
||||
#serial 2
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN(jm_LANGINFO_CODESET,
|
||||
[
|
||||
AC_CHECK_HEADERS(langinfo.h)
|
||||
AC_CHECK_FUNCS(nl_langinfo)
|
||||
|
||||
AC_CACHE_CHECK([for nl_langinfo and CODESET], jm_cv_langinfo_codeset,
|
||||
[AC_TRY_LINK([#include <langinfo.h>],
|
||||
[char* cs = nl_langinfo(CODESET);],
|
||||
jm_cv_langinfo_codeset=yes,
|
||||
jm_cv_langinfo_codeset=no)
|
||||
])
|
||||
if test $jm_cv_langinfo_codeset = yes; then
|
||||
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
|
||||
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
|
||||
fi
|
||||
])
|
||||
37
m4/decl.m4
37
m4/decl.m4
@@ -1,37 +0,0 @@
|
||||
#serial 5
|
||||
|
||||
AC_DEFUN(jm_CHECK_DECLARATION,
|
||||
[
|
||||
AC_MSG_CHECKING([whether $1 is declared])
|
||||
AC_CACHE_VAL(jm_cv_func_decl_$1,
|
||||
[AC_TRY_COMPILE($2,
|
||||
[
|
||||
#ifndef $1
|
||||
char *(*pfn) = (char *(*)) $1
|
||||
#endif
|
||||
],
|
||||
eval "jm_cv_func_decl_$1=yes",
|
||||
eval "jm_cv_func_decl_$1=no")])
|
||||
|
||||
if eval "test \"`echo '$jm_cv_func_decl_'$1`\" = yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$4], , , [$4
|
||||
])dnl
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl jm_CHECK_DECLARATIONS(INCLUDES, FUNCTION... [, ACTION-IF-DECLARED
|
||||
dnl [, ACTION-IF-NOT-DECLARED]])
|
||||
AC_DEFUN(jm_CHECK_DECLARATIONS,
|
||||
[
|
||||
for jm_func in $2
|
||||
do
|
||||
jm_CHECK_DECLARATION($jm_func, $1,
|
||||
[
|
||||
jm_tr_func=HAVE_DECL_`echo $jm_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
|
||||
AC_DEFINE_UNQUOTED($jm_tr_func) $3], $4)dnl
|
||||
done
|
||||
])
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 5
|
||||
#serial 6
|
||||
|
||||
AC_DEFUN(AM_FUNC_GETLOADAVG,
|
||||
[ac_have_func=no # yes means we've found a way to get the load average.
|
||||
@@ -47,7 +47,7 @@ else
|
||||
[ac_have_func=yes; AC_DEFINE(DGUX, 1, [FIXME])
|
||||
AC_CHECK_LIB(dgc, dg_sys_info)])
|
||||
|
||||
AC_CHECK_HEADER(locale.h)
|
||||
AC_CHECK_HEADERS(locale.h)
|
||||
AC_CHECK_FUNCS(setlocale)
|
||||
|
||||
# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 108
|
||||
# serial 109
|
||||
|
||||
AC_PREREQ(2.13) dnl Minimum Autoconf version required.
|
||||
|
||||
@@ -286,7 +286,7 @@ strdup __argz_count __argz_stringify __argz_next])
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||
dnl Try to locate is.
|
||||
dnl Try to locate it.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
|
||||
39
m4/iconv.m4
Normal file
39
m4/iconv.m4
Normal file
@@ -0,0 +1,39 @@
|
||||
#serial 1
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN(jm_ICONV,
|
||||
[
|
||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||
dnl those with the standalone portable libiconv installed).
|
||||
AC_CACHE_CHECK(for iconv, jm_cv_func_iconv, [
|
||||
jm_cv_func_iconv="no, consider installing libiconv"
|
||||
jm_cv_lib_iconv=no
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);],
|
||||
jm_cv_func_iconv=yes)
|
||||
if test "$jm_cv_func_iconv" != yes; then
|
||||
jm_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -liconv"
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);],
|
||||
jm_cv_lib_iconv=yes
|
||||
jm_cv_func_iconv=yes)
|
||||
LIBS="$jm_save_LIBS"
|
||||
fi
|
||||
])
|
||||
if test "$jm_cv_func_iconv" = yes; then
|
||||
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
||||
fi
|
||||
LIBICONV=
|
||||
if test "$jm_cv_lib_iconv" = yes; then
|
||||
LIBICONV="-liconv"
|
||||
fi
|
||||
AC_SUBST(LIBICONV)
|
||||
])
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 2
|
||||
#serial 3
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl
|
||||
@@ -16,10 +16,10 @@ AC_DEFUN(jm_FUNC_GLIBC_UNLOCKED_IO,
|
||||
# Otherwise, we'd get the Solaris5.5.1 functions that are not
|
||||
# declared, and that have been removed from Solaris5.6. The resulting
|
||||
# 5.5.1 binaries would not run on 5.6 due to shared library differences.
|
||||
jm_CHECK_DECLARATIONS([#include <stdio.h>
|
||||
], $jm_io_func,
|
||||
jm_declared=yes,
|
||||
jm_declared=no)
|
||||
AC_CHECK_DECLS(($jm_io_func),
|
||||
jm_declared=yes,
|
||||
jm_declared=no,
|
||||
[#include <stdio.h>])
|
||||
if test $jm_declared = yes; then
|
||||
AC_CHECK_FUNCS($jm_io_func)
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 13
|
||||
#serial 16
|
||||
|
||||
dnl Misc type-related macros for fileutils, sh-utils, textutils.
|
||||
|
||||
@@ -31,6 +31,7 @@ AC_DEFUN(jm_MACROS,
|
||||
netdb.h \
|
||||
paths.h \
|
||||
stdlib.h \
|
||||
stddef.h \
|
||||
string.h \
|
||||
sys/acl.h \
|
||||
sys/filsys.h \
|
||||
@@ -175,6 +176,10 @@ AC_DEFUN(jm_MACROS,
|
||||
AC_SUBST(POW_LIBM)
|
||||
test $am_cv_func_strtod_needs_libm = yes && POW_LIBM=-lm
|
||||
|
||||
jm_LANGINFO_CODESET
|
||||
|
||||
jm_ICONV
|
||||
|
||||
# These tests are for df.
|
||||
jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no])
|
||||
jm_FSTYPENAME
|
||||
@@ -187,18 +192,38 @@ AC_DEFUN(jm_MACROS,
|
||||
|
||||
])
|
||||
|
||||
# This macro must be invoked before any tests that run the compiler.
|
||||
AC_DEFUN(jm_CHECK_ALL_TYPES,
|
||||
[
|
||||
# Emit this code into config.h.in.
|
||||
# The ifndef is to avoid redefinition warnings.
|
||||
AH_VERBATIM([_GNU_SOURCE], [#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE
|
||||
#endif])
|
||||
|
||||
dnl This test must come as early as possible after the compiler configuration
|
||||
dnl tests, because the choice of the file model can (in principle) affect
|
||||
dnl whether functions and headers are available, whether they work, etc.
|
||||
AC_REQUIRE([AC_SYS_LARGEFILE])
|
||||
|
||||
dnl This test must precede tests of compiler characteristics like
|
||||
dnl that for the inline keyword, since it may change the degree to
|
||||
dnl which the compiler supports such features.
|
||||
AC_REQUIRE([AM_C_PROTOTYPES])
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_REQUIRE([AC_C_BIGENDIAN])
|
||||
AC_REQUIRE([AC_PROG_CC_STDC])
|
||||
AC_REQUIRE([AC_C_CONST])
|
||||
AC_REQUIRE([AC_C_VOLATILE])
|
||||
AC_REQUIRE([AC_C_INLINE])
|
||||
AC_REQUIRE([AC_C_LONG_DOUBLE])
|
||||
|
||||
AC_REQUIRE([AC_HEADER_DIRENT])
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
AC_CHECK_MEMBERS((struct stat.st_blksize))
|
||||
AC_CHECK_MEMBERS((struct stat.st_blksize),,,[$ac_includes_default
|
||||
#include <sys/stat.h>
|
||||
])
|
||||
AC_REQUIRE([AC_STRUCT_ST_BLOCKS])
|
||||
|
||||
AC_REQUIRE([AC_STRUCT_TM])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 8
|
||||
#serial 9
|
||||
|
||||
dnl By default, many hosts won't let programs access large files;
|
||||
dnl one must use special compiler options to get large-file access to work.
|
||||
@@ -25,10 +25,14 @@ AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
|
||||
ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
|
||||
fi
|
||||
;;
|
||||
# IRIX 6.2 and later require cc -n32.
|
||||
# IRIX 6.2 and later do not support large files by default,
|
||||
# so use the -n32 ABI unless the installer said otherwise.
|
||||
[ irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)]
|
||||
if test "$GCC" != yes; then
|
||||
ac_cv_sys_largefile_CFLAGS=-n32
|
||||
case "$CC $CFLAGS " in
|
||||
*' -o32 '*|*' -n32 '*|*' -64 '*) ;;
|
||||
*) ac_cv_sys_largefile_CFLAGS=-n32 ;;
|
||||
esac
|
||||
fi
|
||||
esac
|
||||
if test "$ac_cv_sys_largefile_CFLAGS" != no; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 2
|
||||
#serial 3
|
||||
|
||||
dnl Misc lib-related macros for fileutils, sh-utils, textutils.
|
||||
|
||||
@@ -39,8 +39,8 @@ AC_DEFUN(jm_LIB_CHECK,
|
||||
AC_SEARCH_LIBS(yp_match, [sun ypsec])
|
||||
|
||||
# SysV needs -lsec, older versions of Linux need -lshadow for
|
||||
# shadow passwords.
|
||||
AC_SEARCH_LIBS(getspnam, [shadow sec])
|
||||
# shadow passwords. UnixWare 7 needs -lgen.
|
||||
AC_SEARCH_LIBS(getspnam, [shadow sec gen])
|
||||
|
||||
# Requirements for su.c.
|
||||
AC_CHECK_MEMBERS((struct spwd.sp_pwdp))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 5
|
||||
#serial 6
|
||||
|
||||
dnl These are the prerequisite macros for files in the lib/
|
||||
dnl directories of the fileutils, sh-utils, and textutils packages.
|
||||
@@ -8,6 +8,7 @@ AC_DEFUN(jm_PREREQ,
|
||||
jm_PREREQ_ADDEXT
|
||||
jm_PREREQ_CANON_HOST
|
||||
jm_PREREQ_ERROR
|
||||
jm_PREREQ_GETPAGESIZE
|
||||
jm_PREREQ_QUOTEARG
|
||||
jm_PREREQ_READUTMP
|
||||
jm_PREREQ_REGEX
|
||||
@@ -36,6 +37,12 @@ AC_DEFUN(jm_PREREQ_CANON_HOST,
|
||||
netinet/in.h arpa/inet.h)
|
||||
])
|
||||
|
||||
AC_DEFUN(jm_PREREQ_GETPAGESIZE,
|
||||
[
|
||||
AC_CHECK_FUNCS(getpagesize)
|
||||
AC_CHECK_HEADERS(OS.h unistd.h)
|
||||
])
|
||||
|
||||
AC_DEFUN(jm_PREREQ_QUOTEARG,
|
||||
[
|
||||
AC_CHECK_FUNCS(isascii mbrtowc)
|
||||
|
||||
14
m4/regex.m4
14
m4/regex.m4
@@ -1,4 +1,4 @@
|
||||
#serial 6
|
||||
#serial 7
|
||||
|
||||
dnl Initially derived from code in GNU grep.
|
||||
dnl Mostly written by Jim Meyering.
|
||||
@@ -16,8 +16,8 @@ AC_DEFUN(jm_INCLUDED_REGEX,
|
||||
# However, if the system regex support is good enough that it passes the
|
||||
# the following run test, then default to *not* using the included regex.c.
|
||||
# If cross compiling, assume the test would fail and use the included
|
||||
# regex.c. The failing regular expression is from `Spencer ere test #75'
|
||||
# in grep-2.3.
|
||||
# regex.c. The first failing regular expression is from `Spencer ere
|
||||
# test #75' in grep-2.3.
|
||||
AC_CACHE_CHECK([for working re_compile_pattern],
|
||||
jm_cv_func_working_re_compile_pattern,
|
||||
AC_TRY_RUN(
|
||||
@@ -33,7 +33,13 @@ AC_DEFUN(jm_INCLUDED_REGEX,
|
||||
three right ones below. Otherwise autoconf-2.14 chokes. */
|
||||
s = re_compile_pattern ("a[[:]:]]b\n", 9, ®ex);
|
||||
/* This should fail with _Invalid character class name_ error. */
|
||||
exit (s ? 0 : 1);
|
||||
if (!s)
|
||||
exit (1);
|
||||
|
||||
/* This should succeed, but doesn't for e.g. glibc-2.1.3. */
|
||||
s = re_compile_pattern ("{1", 2, ®ex);
|
||||
|
||||
exit (s ? 1 : 0);
|
||||
}
|
||||
],
|
||||
jm_cv_func_working_re_compile_pattern=yes,
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#serial 9
|
||||
#serial 13
|
||||
|
||||
dnl This macro is intended to be used solely in this file.
|
||||
dnl These are the prerequisite macros for GNU's strftime.c replacement.
|
||||
AC_DEFUN(_jm_STRFTIME_PREREQS,
|
||||
[
|
||||
dnl strftime.c uses localtime_r if it exists. Check for it.
|
||||
AC_CHECK_FUNCS(localtime_r)
|
||||
dnl strftime.c uses localtime_r and the underyling system strftime
|
||||
dnl if they exist.
|
||||
AC_CHECK_FUNCS(localtime_r strftime)
|
||||
|
||||
AC_CHECK_HEADERS(limits.h)
|
||||
AC_CHECK_FUNCS(bcopy tzset mempcpy memcpy memset)
|
||||
@@ -76,6 +77,11 @@ main ()
|
||||
time_t t = 738367; /* Fri Jan 9 13:06:07 1970 */
|
||||
tm = gmtime (&t);
|
||||
|
||||
/* Undefine this in case the configure-time putenv test has defined it
|
||||
to something else. The use we make of this function here doesn't
|
||||
require the added functionality of the replacement one. */
|
||||
#undef putenv
|
||||
|
||||
/* This is necessary to make strftime give consistent zone strings and
|
||||
e.g., seconds since the epoch (%s). */
|
||||
putenv ("TZ=GMT0");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 3
|
||||
#serial 4
|
||||
|
||||
dnl From Jim Meyering
|
||||
|
||||
@@ -7,8 +7,8 @@ dnl in time.h or sys/time.h.
|
||||
|
||||
AC_DEFUN(jm_CHECK_TYPE_STRUCT_TIMESPEC,
|
||||
[
|
||||
AC_REQUIRE([AC_HEADER_TIME])
|
||||
AC_CACHE_CHECK([for struct timespec], fu_cv_sys_struct_timespec,
|
||||
AC_REQUIRE([AC_HEADER_TIME])
|
||||
[AC_TRY_COMPILE(
|
||||
[
|
||||
# if TIME_WITH_SYS_TIME
|
||||
|
||||
4
man/factor.x
Normal file
4
man/factor.x
Normal file
@@ -0,0 +1,4 @@
|
||||
[NAME]
|
||||
factor \- factor numbers
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
4
man/uptime.x
Normal file
4
man/uptime.x
Normal file
@@ -0,0 +1,4 @@
|
||||
[NAME]
|
||||
uptime \- tell how long the system has been running
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
@@ -1,3 +1,139 @@
|
||||
2000-04-29 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0r.
|
||||
|
||||
* src/cp.c [LSTAT_FOLLOWS_SLASHED_SYMLINK] (lstat): Define to rpl_lstat.
|
||||
|
||||
2000-04-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Clean up.
|
||||
* tests/mkdir/Makefile.am (TESTS_ENVIRONMENT): Set PATH, not MKDIR.
|
||||
* tests/mkdir/p-1: Use mkdir, not $MKDIR.
|
||||
* tests/mkdir/p-2: Likewise.
|
||||
|
||||
* configure.in (AC_OUTPUT): Add tests/du/Makefile.
|
||||
* tests/Makefile.am (SUBDIRS): Add du.
|
||||
* tests/du: New directory.
|
||||
* tests/du/two-args: New test.
|
||||
|
||||
* tests/mkdir/special-1: New test.
|
||||
* tests/mkdir/Makefile.am (TESTS): Add special-1.
|
||||
|
||||
2000-04-25 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/du.c (pop_dir): Remove through_symlink arg; use null cwd
|
||||
for that purpose instead.
|
||||
(count_entry): Also save the directory if we're saving more
|
||||
than one level.
|
||||
Fix file descriptor and memory leak when chdir fails.
|
||||
|
||||
2000-04-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/mkdir.c: Rename global: s/path_mode/create_parents/.
|
||||
(main): No longer perform explicit chmod when creating
|
||||
parent directories, since make_path now does the chmod.
|
||||
|
||||
2000-04-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/chown.c: New option: --from=CURRENT_OWNER:CURRENT_GROUP.
|
||||
(enum) [FROM_OPTION]: New member.
|
||||
(long_options): New getopt spec.
|
||||
(change_file_owner): Add old_user, old_group parameters. Use them.
|
||||
(change_dir_owner): Likewise.
|
||||
(usage): Describe.
|
||||
(main): New case.
|
||||
From Andries Brouwer.
|
||||
* doc/fileutils.texi (invoking chown): Document it.
|
||||
|
||||
2000-04-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/cp.c: New option: --strip-trailing-slashes.
|
||||
(enum) [STRIP_TRAILING_SLASHES_OPTION]: New member.
|
||||
(remove_trailing_slashes): New global.
|
||||
(long_opts): New getopt spec.
|
||||
(usage): Describe.
|
||||
(do_copy): Strip trailing slashes on SOURCE names only if the new
|
||||
option has been specified.
|
||||
(main): New case.
|
||||
|
||||
* tests/cp/symlink-slash: New test for the change in behavior.
|
||||
* tests/cp/Makefile.am (TESTS): Add symlink-slash.
|
||||
|
||||
* doc/fileutils.texi (Trailing slashes): Factor out discussion on
|
||||
trailing slashes into its own node.
|
||||
Cross reference from cp and mv.
|
||||
|
||||
2000-04-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/touch.c (touch): Add O_NOCTTY to the list of open-time flags.
|
||||
|
||||
2000-04-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Move some code into m4/.
|
||||
* configure.in (_GNU_SOURCE): Don't define here.
|
||||
(AC_SYS_LARGEFILE): Don't use here.
|
||||
(AM_C_PROTOTYPES): Don't use here.
|
||||
* acconfig.h: Remove now-unused file.
|
||||
|
||||
2000-04-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* doc/fileutils.texi (cp invocation): Mention that there is an
|
||||
application for cp's --sparse=never option. From Martin Hippe.
|
||||
(cp invocation): Describe how --backup and --force
|
||||
can be useful together.
|
||||
|
||||
2000-03-10 Alan Iwi <iwi@atm.ox.ac.uk>
|
||||
|
||||
* src/ls.c: Add support for "ln=target" in the LS_COLORS variable,
|
||||
to colorize links as for the file/directory pointed to.
|
||||
* src/dircolors.hin: Add a few words of documentation of the above.
|
||||
|
||||
2000-04-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/cp.c (usage): Document that while the --backup option takes an
|
||||
optional argument, the -b option accepts none.
|
||||
(main): Use `backup type' in call to xget_version, not the
|
||||
now-deprecated `--version-control'.
|
||||
* src/install.c: Likewise.
|
||||
* src/ln.c: Likewise.
|
||||
* src/mv.c: Likewise.
|
||||
|
||||
2000-03-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Merge from textutils.
|
||||
* src/system.h: (O_BINARY, O_TEXT): Define if necessary.
|
||||
(SET_BINARY, SET_BINARY2): Define.
|
||||
(DEV_BSIZE): Define to BBSIZE if appropriate.
|
||||
|
||||
2000-03-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/mv/mv-special-1: Make the message more like that in the
|
||||
similar touch and shred tests.
|
||||
* tests/touch/fifo: Accommodate SunOS-NFS-mounting-OpenBSD mkfifo
|
||||
bug and `exit 77' if the fifo cannot be created.
|
||||
Report and suggestion from Volker Borchert.
|
||||
|
||||
2000-03-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* po/Makefile.in.in (dist distdir): Don't use `ln' (which was just a
|
||||
space optimization anyway) to populate $(distdir). Otherwise, the dist
|
||||
rules that change permissions would end up affecting the master sources.
|
||||
|
||||
2000-03-01 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/df.c (show_point): Ignore shortcuts based on path
|
||||
prefixes that are loop file system mount points, since they
|
||||
yield undesirable output.
|
||||
|
||||
2000-02-29 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/ls.c (decode_switches): Remove `e' from getopt_long's list of
|
||||
option characters. Reported by John Summerfield.
|
||||
|
||||
2000-02-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/install/basic-1: Use ginstall, not install.
|
||||
|
||||
2000-02-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0q.
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
Changes in release 4.1:
|
||||
[4.0r]
|
||||
* `du dir/subdir1 dir/subdir2' no longer fails
|
||||
* chown accepts new option: --from=CURRENT_OWNER:CURRENT_GROUP
|
||||
* cp accepts new option: --strip-trailing-slashes
|
||||
* install --directory (-d) may now be used to set special bits
|
||||
e.g., `install -m a=rwx,o+t -d DIR' now honors the `o+t' part
|
||||
* cp, mv, ln, install: document that while the --backup option takes an
|
||||
optional argument, the -b option accepts none
|
||||
* `ls -e' fails with a more useful diagnostic
|
||||
* df produces better output for loop file system mount points
|
||||
[4.0q]
|
||||
* install -D bug is fixed
|
||||
* chown now works properly when the specified login name contains a period
|
||||
@@ -61,6 +71,7 @@ Changes in release 4.1:
|
||||
* cp, install, ln, mv: deprecate the --version-control option. Use --backup's
|
||||
new optional argument instead. The old option still works, but now evokes a
|
||||
warning.
|
||||
* cp, install, ln, mv: the --backup option now accepts an optional argument
|
||||
* cp, install, ln, mv: accept new option: --target-directory=DIR
|
||||
* chgrp: accept new option, --dereference. --no-dereference is now the default.
|
||||
* New ls option --quoting-style=locale acts like --quoting-style=c, except
|
||||
|
||||
@@ -1,3 +1,110 @@
|
||||
2000-04-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/seq.c: Shorten `#ifdef HAVE_...' to `#if HAVE_...' and
|
||||
remove unnecessary uses of `defined' (aesthetics).
|
||||
|
||||
2000-04-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Move some code into m4/.
|
||||
* configure.in (_GNU_SOURCE): Don't define here.
|
||||
(AC_SYS_LARGEFILE): Don't use here.
|
||||
(AM_C_PROTOTYPES): Don't use here.
|
||||
(AC_DEFINE): Use 3-arg form.
|
||||
* acconfig.h: Remove now-unused file.
|
||||
|
||||
2000-04-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.in (ALL_LINGUAS): Add Estonian (et).
|
||||
|
||||
2000-04-01 Jochen Hein <jochen@jochen.org>
|
||||
|
||||
* src/date.c: Use the "C" locale when using --rfc-822 (-R), as
|
||||
required by rfc822. Before, in the de_DE locale, date would
|
||||
print the German weekday and month abbreviations.
|
||||
|
||||
* tests/date/Test.pm: Add test for rfc822 format and foreign
|
||||
locale settings.
|
||||
|
||||
2000-04-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* man/Makefile.am (man_MANS): Add uptime.1.
|
||||
* man/uptime.x: New file.
|
||||
|
||||
* man/Makefile.am (man_MANS): Add factor.1.
|
||||
* man/factor.x: New file.
|
||||
|
||||
* tests/seq/basic: Split a long line and tweak for font-lock mode.
|
||||
* tests/factor/basic: Likewise.
|
||||
* tests/basename/basic: Likewise.
|
||||
|
||||
2000-03-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/date.c: Include <langinfo.h> if it exists.
|
||||
(DATE_FMT_LANGINFO): New macro.
|
||||
(show_date): Use it to get the locale-specific default format for
|
||||
"date" if it exists.
|
||||
|
||||
2000-03-19 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0g.
|
||||
|
||||
* doc/sh-utils.texi (chroot invocation): Include a couple tips and
|
||||
a simple example.
|
||||
|
||||
* doc/getdate.texi (Calendar date item): Fix typos.
|
||||
From Per Cederqvist.
|
||||
|
||||
2000-03-18 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/uptime.c (print_uptime): Use `buf' only if fgets succeeds.
|
||||
|
||||
2000-03-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Merge from textutils.
|
||||
* src/system.h: (O_BINARY, O_TEXT): Define if necessary.
|
||||
(SET_BINARY, SET_BINARY2): Define.
|
||||
(DEV_BSIZE): Define to BBSIZE if appropriate.
|
||||
|
||||
2000-03-11 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/date/Test.pm: Set the default TZ value to UTC0, not UTC.
|
||||
The latter didn't have any effect on alphaev56-dec-osf4.0f.
|
||||
|
||||
Final merge with fileutils.
|
||||
* src/system.h: Use standard `#if TIME_WITH_SYS_TIME...' block
|
||||
rather than `#if TM_IN_SYS_TIME' one.
|
||||
|
||||
2000-02-02 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* printf.c: Include "unicodeio.h".
|
||||
(usage): Mention \u and \U directives. \x outputs a byte, not a
|
||||
character.
|
||||
(print_esc): Implement \u and \U.
|
||||
* Makefile.am (printf_LDADD): Add @LIBICONV@.
|
||||
|
||||
2000-03-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Make it so stty's rprnt attribute works on HPUX 10.20.
|
||||
* src/stty.c [CREPRINT && !CRPRNT] (CRPRNT): Define.
|
||||
(control_info): Recognize HPUX's CREPRINT.
|
||||
|
||||
2000-03-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* doc/sh-utils.texi (printf invocation): Describe new unicode syntax.
|
||||
From Bruno Haible.
|
||||
|
||||
Unify with fileutils/src/system.h.
|
||||
* src/system.h (ST_NBLOCKS): Sync with recent changes in fileutils.
|
||||
[!_POSIX_VERSION]: Remove declarations of getlogin, ttyname, geteuid.
|
||||
* src/sys2.h: Declare them here, if needed.
|
||||
|
||||
2000-03-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Include GNUmakefile.
|
||||
|
||||
* src/seq.c (get_width_format): Fix portability problem with
|
||||
`-0' vs. `0'.
|
||||
|
||||
2000-02-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/date/Test.pm (datevtime-1): New test.
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
Changes in release 2.1
|
||||
[2.0h]
|
||||
* date --rfc-822 now always emits day and month names from the `C' locale
|
||||
* portability tweaks for Solaris8, Ultrix, and DOS
|
||||
[2.0g]
|
||||
* date now handles two-digit years with leading zeros correctly.
|
||||
* printf interprets unicode, \uNNNN \UNNNNNNNN, on systems with the
|
||||
required support; from Bruno Haible.
|
||||
* stty's rprnt attribute now works on HPUX 10.20
|
||||
* seq's --equal-width option works more portably
|
||||
[2.0f]
|
||||
* fix build problems with ut_name vs. ut_user
|
||||
[2.0e]
|
||||
|
||||
@@ -1,3 +1,112 @@
|
||||
2000-04-17 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* src/system.h [__BEOS__]: Ignore O_BINARY and O_TEXT.
|
||||
|
||||
2000-04-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/tail.c: Prepare to remove option: --max-consecutive-size-changes.
|
||||
Doesn't seem useful.
|
||||
(usage): Remove description.
|
||||
* doc/textutils.texi (tail invocation): Remove description.
|
||||
|
||||
2000-04-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/tail.c (usage): Tweak --help output. Suggestions from Karl Berry.
|
||||
|
||||
Move some macros into m4/.
|
||||
* configure.in (_GNU_SOURCE): Don't define here.
|
||||
(AC_SYS_LARGEFILE): Don't use here.
|
||||
(AM_C_PROTOTYPES): Don't use here.
|
||||
* acconfig.h: Remove now-unused file.
|
||||
|
||||
2000-04-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* doc/textutils.texi: Include constants.texi.
|
||||
(tail invocation): Use `@value's instead of referring to the
|
||||
output of `tail --help' for defaults.
|
||||
* doc/Makefile.am (constants.texi): New rule.
|
||||
(EXTRA_DIST): Add constants.texi.
|
||||
(MAINTAINERCLEANFILES): Add it here, too.
|
||||
(textutils.dvi, textutils.info): Depend on constants.texi.
|
||||
|
||||
* src/tail.c (usage): Clarify descriptions of the --max-* options.
|
||||
From Karl Berry.
|
||||
|
||||
2000-04-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.in (AC_CHECK_HEADERS): Remove langinfo.h. Now it's in m4/.
|
||||
(AC_CHECK_FUNCS): Remove nl_langinfo. Now it's in m4/.
|
||||
|
||||
2000-03-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.in (ALL_LINGUAS): Add Slovenian (sl).
|
||||
|
||||
2000-03-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Merge from fileutils.
|
||||
* src/system.h "pathmax.h": Include.
|
||||
<sys/time.h>: Include if appropriate.
|
||||
<time.h>: Likewise.
|
||||
<sys/mkdev.h>: Likewise.
|
||||
<sys/sysmacros.h>: Likewise.
|
||||
<utime.h>: Likewise.
|
||||
(major, minor, makedev): Define if needed.
|
||||
(struct utimbuf): Declare if missing.
|
||||
(ST_BLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE): Define.
|
||||
|
||||
* src/cksum.c (usage): Correct --help output.
|
||||
Prompted by a report from Gregory Leblanc.
|
||||
|
||||
2000-03-05 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (struct buffer.newline_free): New member.
|
||||
(initbuf, findlines): Set it.
|
||||
(fillbuf): Do not double the size of a full buffer to append a newline
|
||||
unless the buffer is known to be newline free.
|
||||
|
||||
2000-03-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0e.
|
||||
|
||||
2000-03-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Don't get failed assertion for `tail -f directory'.
|
||||
* src/tail.c: Revert most of 1999-10-20 change. Instead, ...
|
||||
(IS_TAILABLE_FILE_TYPE): Define to produce similar result.
|
||||
(recheck): Use it here.
|
||||
(tail_file): Use it here.
|
||||
Reported by François Pinard.
|
||||
|
||||
Once we encounter a file that is not of IS_TAILABLE_FILE_TYPE,
|
||||
marke it as such and ignore it forever after.
|
||||
* src/tail.c (struct File_spec): New member.
|
||||
(recheck): Initialize new member.
|
||||
(tail_file): Likewise.
|
||||
(tail_forever): Skip the file if it's marked as ignorable.
|
||||
|
||||
2000-03-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/sort.c (fillbuf): Move declaration of local, cc, into scope of
|
||||
`while' loop where it's used.
|
||||
|
||||
2000-03-02 Paul Eggert <eggert@set.twinsun.com>
|
||||
|
||||
Big performance improvement when sorting many small files,
|
||||
building on a suggestion by Charles Randall.
|
||||
|
||||
* src/sort.c (fillbuf): Skip memmove if it would be a no-op,
|
||||
as many memmove implementations are slow in that case.
|
||||
Don't examine leftover bytes for eolchar, since they may be left
|
||||
over from a previous file, and we want to read from this file.
|
||||
|
||||
(sort): At end of file, if there is more input and buffer room,
|
||||
concatenate the next input file.
|
||||
|
||||
2000-02-29 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/join.c (make_blank): Add an explicit cast to `unsigned char *'
|
||||
to placate HPUX's C compiler. Reported by Bob Proulx.
|
||||
|
||||
2000-01-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0d.
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
Changes in release 2.1
|
||||
[2.0e]
|
||||
* `tail -f directory' no longer gets a failed assertion
|
||||
* sort: big performance improvement when sorting many small files;
|
||||
from Charles Randall
|
||||
* configure and portability changes in m4/ and lib/
|
||||
[2.0d]
|
||||
* preliminary sort performance improvements
|
||||
|
||||
112
src/chown.c
112
src/chown.c
@@ -79,6 +79,7 @@ enum Verbosity
|
||||
};
|
||||
|
||||
static int change_dir_owner PARAMS ((const char *dir, uid_t user, gid_t group,
|
||||
uid_t old_user, gid_t old_group,
|
||||
const struct stat *statp));
|
||||
|
||||
/* The name the program was run with. */
|
||||
@@ -112,7 +113,8 @@ static char *reference_file;
|
||||
enum
|
||||
{
|
||||
REFERENCE_FILE_OPTION = CHAR_MAX + 1,
|
||||
DEREFERENCE_OPTION
|
||||
DEREFERENCE_OPTION,
|
||||
FROM_OPTION
|
||||
};
|
||||
|
||||
static struct option const long_options[] =
|
||||
@@ -120,6 +122,7 @@ static struct option const long_options[] =
|
||||
{"recursive", no_argument, 0, 'R'},
|
||||
{"changes", no_argument, 0, 'c'},
|
||||
{"dereference", no_argument, 0, DEREFERENCE_OPTION},
|
||||
{"from", required_argument, 0, FROM_OPTION},
|
||||
{"no-dereference", no_argument, 0, 'h'},
|
||||
{"quiet", no_argument, 0, 'f'},
|
||||
{"silent", no_argument, 0, 'f'},
|
||||
@@ -166,12 +169,14 @@ describe_change (const char *file, enum Change_status changed)
|
||||
printf ("%s\n", username);
|
||||
}
|
||||
|
||||
/* Change the ownership of FILE to UID USER and GID GROUP.
|
||||
/* Change the ownership of FILE to UID USER and GID GROUP
|
||||
provided it presently has UID OLDUSER and GID OLDGROUP.
|
||||
If it is a directory and -R is given, recurse.
|
||||
Return 0 if successful, 1 if errors occurred. */
|
||||
|
||||
static int
|
||||
change_file_owner (int cmdline_arg, const char *file, uid_t user, gid_t group)
|
||||
change_file_owner (int cmdline_arg, const char *file, uid_t user, gid_t group,
|
||||
uid_t old_user, gid_t old_group)
|
||||
{
|
||||
struct stat file_stats;
|
||||
uid_t newuser;
|
||||
@@ -185,51 +190,58 @@ change_file_owner (int cmdline_arg, const char *file, uid_t user, gid_t group)
|
||||
return 1;
|
||||
}
|
||||
|
||||
newuser = user == (uid_t) -1 ? file_stats.st_uid : user;
|
||||
newgroup = group == (gid_t) -1 ? file_stats.st_gid : group;
|
||||
if (newuser != file_stats.st_uid || newgroup != file_stats.st_gid)
|
||||
if ((old_user == (uid_t) -1 || file_stats.st_uid == old_user) &&
|
||||
(old_group == (gid_t) -1 || file_stats.st_gid == old_group))
|
||||
{
|
||||
int fail;
|
||||
int symlink_changed = 1;
|
||||
|
||||
if (S_ISLNK (file_stats.st_mode) && change_symlinks)
|
||||
newuser = user == (uid_t) -1 ? file_stats.st_uid : user;
|
||||
newgroup = group == (gid_t) -1 ? file_stats.st_gid : group;
|
||||
if (newuser != file_stats.st_uid || newgroup != file_stats.st_gid)
|
||||
{
|
||||
fail = lchown (file, newuser, newgroup);
|
||||
int fail;
|
||||
int symlink_changed = 1;
|
||||
|
||||
/* Ignore the failure if it's due to lack of support (ENOSYS)
|
||||
and this is not a command line argument. */
|
||||
if (!cmdline_arg && fail && errno == ENOSYS)
|
||||
if (S_ISLNK (file_stats.st_mode) && change_symlinks)
|
||||
{
|
||||
fail = 0;
|
||||
symlink_changed = 0;
|
||||
fail = lchown (file, newuser, newgroup);
|
||||
|
||||
/* Ignore the failure if it's due to lack of support (ENOSYS)
|
||||
and this is not a command line argument. */
|
||||
if (!cmdline_arg && fail && errno == ENOSYS)
|
||||
{
|
||||
fail = 0;
|
||||
symlink_changed = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fail = chown (file, newuser, newgroup);
|
||||
}
|
||||
|
||||
if (verbosity == V_high || (verbosity == V_changes_only && !fail))
|
||||
{
|
||||
enum Change_status ch_status = (! symlink_changed
|
||||
? CH_NOT_APPLIED
|
||||
: (fail
|
||||
? CH_FAILED : CH_SUCCEEDED));
|
||||
describe_change (file, ch_status);
|
||||
}
|
||||
|
||||
if (fail)
|
||||
{
|
||||
if (force_silent == 0)
|
||||
error (0, errno, "%s", file);
|
||||
errors = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (verbosity == V_high)
|
||||
{
|
||||
fail = chown (file, newuser, newgroup);
|
||||
describe_change (file, CH_NO_CHANGE_REQUESTED);
|
||||
}
|
||||
|
||||
if (verbosity == V_high || (verbosity == V_changes_only && !fail))
|
||||
{
|
||||
enum Change_status ch_status = (! symlink_changed ? CH_NOT_APPLIED
|
||||
: (fail ? CH_FAILED : CH_SUCCEEDED));
|
||||
describe_change (file, ch_status);
|
||||
}
|
||||
|
||||
if (fail)
|
||||
{
|
||||
if (force_silent == 0)
|
||||
error (0, errno, "%s", file);
|
||||
errors = 1;
|
||||
}
|
||||
}
|
||||
else if (verbosity == V_high)
|
||||
{
|
||||
describe_change (file, CH_NO_CHANGE_REQUESTED);
|
||||
}
|
||||
|
||||
if (recurse && S_ISDIR (file_stats.st_mode))
|
||||
errors |= change_dir_owner (file, user, group, &file_stats);
|
||||
errors |= change_dir_owner (file, user, group,
|
||||
old_user, old_group, &file_stats);
|
||||
return errors;
|
||||
}
|
||||
|
||||
@@ -240,6 +252,7 @@ change_file_owner (int cmdline_arg, const char *file, uid_t user, gid_t group)
|
||||
|
||||
static int
|
||||
change_dir_owner (const char *dir, uid_t user, gid_t group,
|
||||
uid_t old_user, gid_t old_group,
|
||||
const struct stat *statp)
|
||||
{
|
||||
char *name_space, *namep;
|
||||
@@ -279,7 +292,7 @@ change_dir_owner (const char *dir, uid_t user, gid_t group,
|
||||
path = xrealloc (path, pathlength);
|
||||
}
|
||||
strcpy (path + dirlength, namep);
|
||||
errors |= change_file_owner (0, path, user, group);
|
||||
errors |= change_file_owner (0, path, user, group, old_user, old_group);
|
||||
}
|
||||
free (path);
|
||||
free (name_space);
|
||||
@@ -309,6 +322,11 @@ Change the owner and/or group of each FILE to OWNER and/or GROUP.\n\
|
||||
-h, --no-dereference affect symbolic links instead of any referenced file\n\
|
||||
(available only on systems that can change the\n\
|
||||
ownership of a symlink)\n\
|
||||
--from=CURRENT_OWNER:CURRENT_GROUP\n\
|
||||
change the owner and/or group of each file only if\n\
|
||||
its current owner and/or group match those specified\n\
|
||||
here. Either may be omitted, in which case a match\n\
|
||||
is not required for the omitted attribute.\n\
|
||||
-f, --silent, --quiet suppress most error messages\n\
|
||||
--reference=RFILE use RFILE's owner and group rather than\n\
|
||||
the specified OWNER:GROUP values\n\
|
||||
@@ -318,7 +336,8 @@ Change the owner and/or group of each FILE to OWNER and/or GROUP.\n\
|
||||
--version output version information and exit\n\
|
||||
\n\
|
||||
Owner is unchanged if missing. Group is unchanged if missing, but changed\n\
|
||||
to login group if implied by a `:'.\n\
|
||||
to login group if implied by a `:'. OWNER and GROUP may be numeric as well\n\
|
||||
as symbolic.\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
|
||||
close_stdout ();
|
||||
@@ -331,6 +350,9 @@ main (int argc, char **argv)
|
||||
{
|
||||
uid_t user = (uid_t) -1; /* New uid; -1 if not to be changed. */
|
||||
gid_t group = (uid_t) -1; /* New gid; -1 if not to be changed. */
|
||||
uid_t old_user = (uid_t) -1; /* Old uid; -1 if unrestricted. */
|
||||
gid_t old_group = (uid_t) -1; /* Old gid; -1 if unrestricted. */
|
||||
|
||||
int errors = 0;
|
||||
int optc;
|
||||
|
||||
@@ -353,6 +375,15 @@ main (int argc, char **argv)
|
||||
case DEREFERENCE_OPTION:
|
||||
change_symlinks = 0;
|
||||
break;
|
||||
case FROM_OPTION:
|
||||
{
|
||||
char *u_dummy, *g_dummy;
|
||||
const char *e = parse_user_spec (argv[optind], &old_user, &old_group,
|
||||
&u_dummy, &g_dummy);
|
||||
if (e)
|
||||
error (1, 0, "%s: %s", argv[optind], e);
|
||||
break;
|
||||
}
|
||||
case 'R':
|
||||
recurse = 1;
|
||||
break;
|
||||
@@ -406,7 +437,8 @@ main (int argc, char **argv)
|
||||
for (; optind < argc; ++optind)
|
||||
{
|
||||
strip_trailing_slashes (argv[optind]);
|
||||
errors |= change_file_owner (1, argv[optind], user, group);
|
||||
errors |= change_file_owner (1, argv[optind], user, group,
|
||||
old_user, old_group);
|
||||
}
|
||||
|
||||
if (verbosity != V_off)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* cksum -- calculate and print POSIX.2 checksums and sizes of files
|
||||
Copyright (C) 92, 1995-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 92, 1995-2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -267,9 +267,10 @@ usage (int status)
|
||||
else
|
||||
{
|
||||
printf (_("\
|
||||
Usage: %s [OPTION]... [FILE]...\n\
|
||||
Usage: %s [FILE]...\n\
|
||||
or: %s [OPTION]\n\
|
||||
"),
|
||||
program_name);
|
||||
program_name, program_name);
|
||||
printf (_("\
|
||||
Print CRC checksum and byte counts of each FILE.\n\
|
||||
\n\
|
||||
|
||||
35
src/cp.c
35
src/cp.c
@@ -1,5 +1,5 @@
|
||||
/* cp.c -- file copying (main routines)
|
||||
Copyright (C) 89, 90, 91, 1995-1999 Free Software Foundation.
|
||||
Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -60,12 +60,22 @@ struct dir_attr
|
||||
enum
|
||||
{
|
||||
TARGET_DIRECTORY_OPTION = CHAR_MAX + 1,
|
||||
SPARSE_OPTION
|
||||
SPARSE_OPTION,
|
||||
STRIP_TRAILING_SLASHES_OPTION
|
||||
};
|
||||
|
||||
int stat ();
|
||||
int lstat ();
|
||||
|
||||
/* Arrange to make lstat calls go through the wrapper function
|
||||
on systems with an lstat function that does not dereference symlinks
|
||||
that are specified with a trailing slash. */
|
||||
#if ! LSTAT_FOLLOWS_SLASHED_SYMLINK
|
||||
int rpl_lstat PARAMS((const char *, struct stat *));
|
||||
# undef lstat
|
||||
# define lstat rpl_lstat
|
||||
#endif
|
||||
|
||||
void strip_trailing_slashes ();
|
||||
|
||||
/* Initial number of entries in each hash table entry's table of inodes. */
|
||||
@@ -81,6 +91,9 @@ char *program_name;
|
||||
as its destination instead of the usual "e_dir/e_file." */
|
||||
static int flag_path = 0;
|
||||
|
||||
/* Remove any trailing slashes from each SOURCE argument. */
|
||||
static int remove_trailing_slashes;
|
||||
|
||||
static char const *const sparse_type_string[] =
|
||||
{
|
||||
"never", "auto", "always", 0
|
||||
@@ -108,6 +121,7 @@ static struct option const long_opts[] =
|
||||
{"path", no_argument, NULL, 'P'},
|
||||
{"preserve", no_argument, NULL, 'p'},
|
||||
{"recursive", no_argument, NULL, 'R'},
|
||||
{"strip-trailing-slash", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION},
|
||||
{"suffix", required_argument, NULL, 'S'},
|
||||
{"symbolic-link", no_argument, NULL, 's'},
|
||||
{"target-directory", required_argument, NULL, TARGET_DIRECTORY_OPTION},
|
||||
@@ -137,7 +151,8 @@ Usage: %s [OPTION]... SOURCE DEST\n\
|
||||
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
|
||||
\n\
|
||||
-a, --archive same as -dpR\n\
|
||||
-b, --backup[=CONTROL] make a backup of each existing destination file\n\
|
||||
--backup[=CONTROL] make a backup of each existing destination file\n\
|
||||
-b like --backup but does not accept an argument\n\
|
||||
-d, --no-dereference preserve links\n\
|
||||
-f, --force remove existing destinations, never prompt\n\
|
||||
-i, --interactive prompt before overwrite\n\
|
||||
@@ -149,6 +164,8 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
|
||||
special files like FIFOs or /dev/zero\n\
|
||||
--sparse=WHEN control creation of sparse files\n\
|
||||
-R, --recursive copy directories recursively\n\
|
||||
--strip-trailing-slashes remove any trailing slashes from each SOURCE\n\
|
||||
argument\n\
|
||||
-s, --symbolic-link make symbolic links instead of copying\n\
|
||||
-S, --suffix=SUFFIX override the usual backup suffix\n\
|
||||
--target-directory=DIRECTORY move all SOURCE arguments into DIRECTORY\n\
|
||||
@@ -485,7 +502,8 @@ do_copy (int n_files, char **file, const char *target_directory,
|
||||
char *arg_in_concat = NULL;
|
||||
char *arg = file[i];
|
||||
|
||||
strip_trailing_slashes (arg);
|
||||
if (remove_trailing_slashes)
|
||||
strip_trailing_slashes (arg);
|
||||
|
||||
if (flag_path)
|
||||
{
|
||||
@@ -597,7 +615,8 @@ do_copy (int n_files, char **file, const char *target_directory,
|
||||
|
||||
tmp_source = (char *) alloca (strlen (source) + 1);
|
||||
strcpy (tmp_source, source);
|
||||
strip_trailing_slashes (tmp_source);
|
||||
if (remove_trailing_slashes)
|
||||
strip_trailing_slashes (tmp_source);
|
||||
source_base = base_name (tmp_source);
|
||||
|
||||
new_dest = (char *) alloca (strlen (dest)
|
||||
@@ -745,6 +764,10 @@ main (int argc, char **argv)
|
||||
x.copy_as_regular = 0;
|
||||
break;
|
||||
|
||||
case STRIP_TRAILING_SLASHES_OPTION:
|
||||
remove_trailing_slashes = 1;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
#ifdef S_ISLNK
|
||||
x.symbolic_link = 1;
|
||||
@@ -793,7 +816,7 @@ main (int argc, char **argv)
|
||||
simple_backup_suffix = xstrdup (backup_suffix_string);
|
||||
|
||||
x.backup_type = (make_backups
|
||||
? xget_version (_("--version-control"),
|
||||
? xget_version (_("backup type"),
|
||||
version_control_string)
|
||||
: none);
|
||||
|
||||
|
||||
30
src/date.c
30
src/date.c
@@ -21,6 +21,9 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
#if HAVE_LANGINFO_H
|
||||
# include <langinfo.h>
|
||||
#endif
|
||||
|
||||
#include "system.h"
|
||||
#include "argmatch.h"
|
||||
@@ -106,6 +109,12 @@ static struct option const long_options[] =
|
||||
#define MAYBE_SET_TZ_UTC0 \
|
||||
do { if (universal_time) set_tz (TZ_UTC0); } while (0)
|
||||
|
||||
#ifdef _DATE_FMT
|
||||
# define DATE_FMT_LANGINFO() nl_langinfo (_DATE_FMT)
|
||||
#else
|
||||
# define DATE_FMT_LANGINFO() ""
|
||||
#endif
|
||||
|
||||
void
|
||||
usage (int status)
|
||||
{
|
||||
@@ -490,13 +499,17 @@ show_date (const char *format, time_t when)
|
||||
in the RFC format to %Z; this gives, however, an invalid
|
||||
RFC time format outside the continental United States and GMT. */
|
||||
|
||||
format = (rfc_format
|
||||
? (universal_time
|
||||
? "%a, %_d %b %Y %H:%M:%S GMT"
|
||||
: "%a, %_d %b %Y %H:%M:%S %z")
|
||||
: (iso_8601_format
|
||||
? iso_format_string[iso_8601_format][universal_time]
|
||||
: "%a %b %e %H:%M:%S %Z %Y"));
|
||||
if (rfc_format)
|
||||
format = (universal_time
|
||||
? "%a, %_d %b %Y %H:%M:%S GMT"
|
||||
: "%a, %_d %b %Y %H:%M:%S %z");
|
||||
else if (iso_8601_format)
|
||||
format = iso_format_string[iso_8601_format][universal_time];
|
||||
else
|
||||
{
|
||||
char *date_fmt = DATE_FMT_LANGINFO ();
|
||||
format = *date_fmt ? date_fmt : "%a %b %e %H:%M:%S %Z %Y";
|
||||
}
|
||||
}
|
||||
else if (*format == '\0')
|
||||
{
|
||||
@@ -504,6 +517,9 @@ show_date (const char *format, time_t when)
|
||||
return;
|
||||
}
|
||||
|
||||
if (rfc_format)
|
||||
setlocale (LC_ALL, "C");
|
||||
|
||||
do
|
||||
{
|
||||
out_length += 200;
|
||||
|
||||
4
src/df.c
4
src/df.c
@@ -507,7 +507,7 @@ show_point (const char *point, const struct stat *statp)
|
||||
{
|
||||
for (me = mount_list; me; me = me->me_next)
|
||||
{
|
||||
if (STREQ (me->me_mountdir, point))
|
||||
if (STREQ (me->me_mountdir, point) && !STREQ (me->me_type, "lofs"))
|
||||
{
|
||||
/* Prefer non-dummy entries. */
|
||||
if (! me->me_dummy)
|
||||
@@ -599,7 +599,7 @@ show_point (const char *point, const struct stat *statp)
|
||||
}
|
||||
}
|
||||
|
||||
if (best_match)
|
||||
if (best_match && !STREQ (best_match->me_type, "lofs"))
|
||||
{
|
||||
me = best_match;
|
||||
goto show_me;
|
||||
|
||||
@@ -37,7 +37,8 @@ TERM vt100
|
||||
NORMAL 00 # global default, although everything should be something.
|
||||
FILE 00 # normal file
|
||||
DIR 01;34 # directory
|
||||
LINK 01;36 # symbolic link
|
||||
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
|
||||
# numerical value, the color is as for the file pointed to.)
|
||||
FIFO 40;33 # pipe
|
||||
SOCK 01;35 # socket
|
||||
DOOR 01;35 # door
|
||||
|
||||
39
src/du.c
39
src/du.c
@@ -455,14 +455,14 @@ hash_insert (ino_t ino, dev_t dev)
|
||||
}
|
||||
|
||||
/* Restore the previous working directory or exit.
|
||||
If THROUGH_SYMLINK is non-zero, simply call `chdir ("..")'. Otherwise,
|
||||
If CWD is null, simply call `chdir ("..")'. Otherwise,
|
||||
use CWD and free it. CURR_DIR_NAME is the name of the current directory
|
||||
and is used solely in failure diagnostics. */
|
||||
|
||||
static void
|
||||
pop_dir (int through_symlink, struct saved_cwd *cwd, const char *curr_dir_name)
|
||||
pop_dir (struct saved_cwd *cwd, const char *curr_dir_name)
|
||||
{
|
||||
if (through_symlink)
|
||||
if (cwd)
|
||||
{
|
||||
if (restore_cwd (cwd, "..", curr_dir_name))
|
||||
exit (1);
|
||||
@@ -513,8 +513,8 @@ count_entry (const char *ent, int top, dev_t last_dev, int depth)
|
||||
dev_t dir_dev;
|
||||
char *name_space;
|
||||
char *namep;
|
||||
struct saved_cwd cwd;
|
||||
int through_symlink;
|
||||
struct saved_cwd *cwd;
|
||||
struct saved_cwd cwd_buf;
|
||||
struct stat e_buf;
|
||||
|
||||
dir_dev = stat_buf.st_dev;
|
||||
@@ -525,18 +525,27 @@ count_entry (const char *ent, int top, dev_t last_dev, int depth)
|
||||
#ifndef S_ISLNK
|
||||
# define S_ISLNK(s) 0
|
||||
#endif
|
||||
/* If we're dereferencing symlinks and we're about to chdir through
|
||||
a symlink, remember the current directory so we can return to it
|
||||
later. In other cases, chdir ("..") works fine. */
|
||||
through_symlink = (xstat == stat
|
||||
&& lstat (ent, &e_buf) == 0
|
||||
&& S_ISLNK (e_buf.st_mode));
|
||||
if (through_symlink && save_cwd (&cwd))
|
||||
exit (1);
|
||||
/* If we're traversing more than one level, or if we're
|
||||
dereferencing symlinks and we're about to chdir through a
|
||||
symlink, remember the current directory so we can return to
|
||||
it later. In other cases, chdir ("..") works fine. */
|
||||
if (strchr (ent, '/')
|
||||
|| (xstat == stat
|
||||
&& lstat (ent, &e_buf) == 0
|
||||
&& S_ISLNK (e_buf.st_mode)))
|
||||
{
|
||||
if (save_cwd (&cwd_buf))
|
||||
exit (1);
|
||||
cwd = &cwd_buf;
|
||||
}
|
||||
else
|
||||
cwd = NULL;
|
||||
|
||||
if (chdir (ent) < 0)
|
||||
{
|
||||
error (0, errno, _("cannot change to directory %s"), path->text);
|
||||
if (cwd)
|
||||
free_cwd (cwd);
|
||||
exit_status = 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -548,7 +557,7 @@ count_entry (const char *ent, int top, dev_t last_dev, int depth)
|
||||
if (errno)
|
||||
{
|
||||
error (0, errno, "%s", path->text);
|
||||
pop_dir (through_symlink, &cwd, path->text);
|
||||
pop_dir (cwd, path->text);
|
||||
exit_status = 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -572,7 +581,7 @@ count_entry (const char *ent, int top, dev_t last_dev, int depth)
|
||||
}
|
||||
|
||||
free (name_space);
|
||||
pop_dir (through_symlink, &cwd, path->text);
|
||||
pop_dir (cwd, path->text);
|
||||
|
||||
str_trunc (path, pathlen - 1); /* Remove the "/" we added. */
|
||||
if (depth <= max_depth || top)
|
||||
|
||||
@@ -313,7 +313,7 @@ main (int argc, char **argv)
|
||||
_("the strip option may not be used when installing a directory"));
|
||||
|
||||
if (make_backups)
|
||||
x.backup_type = xget_version ("--version-control", version_control_string);
|
||||
x.backup_type = xget_version ("backup type", version_control_string);
|
||||
|
||||
n_files = argc - optind;
|
||||
file = argv + optind;
|
||||
@@ -641,7 +641,8 @@ In the first two formats, copy SOURCE to DEST or multiple SOURCE(s) to\n\
|
||||
the existing DIRECTORY, while setting permission modes and owner/group.\n\
|
||||
In the third format, create all components of the given DIRECTORY(ies).\n\
|
||||
\n\
|
||||
-b, --backup[=CONTROL] make a backup of each existing destination file\n\
|
||||
--backup[=CONTROL] make a backup of each existing destination file\n\
|
||||
-b like --backup but does not accept an argument\n\
|
||||
-c (ignored)\n\
|
||||
-d, --directory treat all arguments as directory names; create all\n\
|
||||
components of the specified directories\n\
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* join - join lines of two files on a common field
|
||||
Copyright (C) 91, 1995-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 91, 1995-2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -708,11 +708,12 @@ void
|
||||
make_blank (struct line *blank, int count)
|
||||
{
|
||||
int i;
|
||||
char *buffer;
|
||||
unsigned char *buffer;
|
||||
struct field *fields;
|
||||
blank->nfields = count;
|
||||
blank->buf.size = blank->buf.length = count + 1;
|
||||
blank->buf.buffer = buffer = xmalloc (blank->buf.size);
|
||||
blank->buf.buffer = xmalloc (blank->buf.size);
|
||||
buffer = (unsigned char *) blank->buf.buffer;
|
||||
blank->fields = fields =
|
||||
(struct field *) xmalloc (sizeof (struct field) * count);
|
||||
for (i = 0; i < count; i++)
|
||||
|
||||
5
src/ln.c
5
src/ln.c
@@ -345,7 +345,8 @@ than one TARGET, the last argument must be a directory; create links\n\
|
||||
in DIRECTORY to each TARGET. Create hard links by default, symbolic\n\
|
||||
links with --symbolic. When creating hard links, each TARGET must exist.\n\
|
||||
\n\
|
||||
-b, --backup[=CONTROL] make a backup of each existing destination file\n\
|
||||
--backup[=CONTROL] make a backup of each existing destination file\n\
|
||||
-b like --backup but does not accept an argument\n\
|
||||
-d, -F, --directory hard link directories (super-user only)\n\
|
||||
-f, --force remove existing destination files\n\
|
||||
-n, --no-dereference treat destination that is a symlink to a\n\
|
||||
@@ -515,7 +516,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
|
||||
backup_type = (make_backups
|
||||
? xget_version (_("--version-control"), version_control_string)
|
||||
? xget_version (_("backup type"), version_control_string)
|
||||
: none);
|
||||
|
||||
if (target_directory_specified || n_files > 2)
|
||||
|
||||
25
src/ls.c
25
src/ls.c
@@ -1,5 +1,5 @@
|
||||
/* `dir', `vdir' and `ls' directory listing programs for GNU.
|
||||
Copyright (C) 85, 88, 90, 91, 1995-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 85, 88, 90, 91, 1995-2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -297,6 +297,19 @@ static int nfiles;
|
||||
|
||||
static int files_index;
|
||||
|
||||
/* When nonzero, in a color listing, color each symlink name according to the
|
||||
type of file it points to. Otherwise, color them according to the `ln'
|
||||
directive in LS_COLORS. Dangling (orphan) symlinks are treated specially,
|
||||
regardless. This is set when `ln=target' appears in LS_COLORS. */
|
||||
|
||||
static int color_symlink_as_referent;
|
||||
|
||||
/* mode of appropriate file for colorization */
|
||||
#define FILE_OR_LINK_MODE(File) \
|
||||
((color_symlink_as_referent && (File)->linkok) \
|
||||
? (File)->linkmode : (File)->stat.st_mode)
|
||||
|
||||
|
||||
/* Record of one pending directory waiting to be listed. */
|
||||
|
||||
struct pending
|
||||
@@ -981,7 +994,7 @@ decode_switches (int argc, char **argv)
|
||||
}
|
||||
|
||||
while ((c = getopt_long (argc, argv,
|
||||
"abcdefghiklmnopqrstuvw:xABCDFGHI:LNQRST:UX1",
|
||||
"abcdfghiklmnopqrstuvw:xABCDFGHI:LNQRST:UX1",
|
||||
long_options, NULL)) != -1)
|
||||
{
|
||||
switch (c)
|
||||
@@ -1588,6 +1601,10 @@ parse_ls_color (void)
|
||||
}
|
||||
print_with_color = 0;
|
||||
}
|
||||
|
||||
if (color_indicator[C_LINK].len == 6
|
||||
&& !strncmp (color_indicator[C_LINK].string, "target", 6))
|
||||
color_symlink_as_referent = 1;
|
||||
}
|
||||
|
||||
/* Request that the directory named `name' have its contents listed later.
|
||||
@@ -2383,7 +2400,7 @@ print_long_format (const struct fileinfo *f)
|
||||
|
||||
DIRED_INDENT ();
|
||||
DIRED_FPUTS (buf, stdout, p - buf);
|
||||
print_name_with_quoting (f->name, f->stat.st_mode, f->linkok,
|
||||
print_name_with_quoting (f->name, FILE_OR_LINK_MODE (f), f->linkok,
|
||||
&dired_obstack);
|
||||
|
||||
if (f->filetype == symbolic_link)
|
||||
@@ -2482,7 +2499,7 @@ print_file_name_and_frills (const struct fileinfo *f)
|
||||
human_readable ((uintmax_t) ST_NBLOCKS (f->stat), buf,
|
||||
ST_NBLOCKSIZE, output_block_size));
|
||||
|
||||
print_name_with_quoting (f->name, f->stat.st_mode, f->linkok, NULL);
|
||||
print_name_with_quoting (f->name, FILE_OR_LINK_MODE (f), f->linkok, NULL);
|
||||
|
||||
if (indicator_style != none)
|
||||
print_type_indicator (f->stat.st_mode);
|
||||
|
||||
31
src/mkdir.c
31
src/mkdir.c
@@ -1,5 +1,5 @@
|
||||
/* mkdir -- make directories
|
||||
Copyright (C) 90, 1995-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 90, 1995-2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -40,7 +40,7 @@
|
||||
char *program_name;
|
||||
|
||||
/* If nonzero, ensure that all parents of the specified directory exist. */
|
||||
static int path_mode;
|
||||
static int create_parents;
|
||||
|
||||
static struct option const longopts[] =
|
||||
{
|
||||
@@ -91,7 +91,7 @@ main (int argc, char **argv)
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
path_mode = 0;
|
||||
create_parents = 0;
|
||||
|
||||
while ((optc = getopt_long (argc, argv, "pm:", longopts, NULL)) != -1)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ main (int argc, char **argv)
|
||||
case 0: /* Long option. */
|
||||
break;
|
||||
case 'p':
|
||||
path_mode = 1;
|
||||
create_parents = 1;
|
||||
break;
|
||||
case 'm':
|
||||
symbolic_mode = optarg;
|
||||
@@ -136,7 +136,7 @@ main (int argc, char **argv)
|
||||
for (; optind < argc; ++optind)
|
||||
{
|
||||
int fail = 0;
|
||||
if (path_mode)
|
||||
if (create_parents)
|
||||
{
|
||||
fail = make_path (argv[optind], newmode, parent_mode,
|
||||
-1, -1, 1, verbose_fmt_string);
|
||||
@@ -148,18 +148,17 @@ main (int argc, char **argv)
|
||||
error (0, errno, _("cannot create directory `%s'"), argv[optind]);
|
||||
else if (verbose_fmt_string)
|
||||
error (0, 0, verbose_fmt_string, argv[optind]);
|
||||
}
|
||||
|
||||
/* FIXME: move this functionality into make_path. */
|
||||
/* mkdir(2) is required to honor only the file permission bits.
|
||||
In particular, it needn't do anything about `special' bits,
|
||||
so if any were set in newmode, apply them with chmod. */
|
||||
if (fail == 0 && (newmode & ~S_IRWXUGO))
|
||||
{
|
||||
fail = chmod (argv[optind], newmode);
|
||||
if (fail)
|
||||
error (0, errno, _("cannot set permissions of directory `%s'"),
|
||||
argv[optind]);
|
||||
/* mkdir(2) is required to honor only the file permission bits.
|
||||
In particular, it needn't do anything about `special' bits,
|
||||
so if any were set in newmode, apply them with chmod. */
|
||||
if (fail == 0 && (newmode & ~S_IRWXUGO))
|
||||
{
|
||||
fail = chmod (argv[optind], newmode);
|
||||
if (fail)
|
||||
error (0, errno, _("cannot set permissions of directory `%s'"),
|
||||
argv[optind]);
|
||||
}
|
||||
}
|
||||
|
||||
errors |= fail;
|
||||
|
||||
6
src/mv.c
6
src/mv.c
@@ -83,6 +83,7 @@ int yesno ();
|
||||
/* The name this program was run with. */
|
||||
char *program_name;
|
||||
|
||||
/* Remove any trailing slashes from each SOURCE argument. */
|
||||
static int remove_trailing_slashes;
|
||||
|
||||
static struct option const long_options[] =
|
||||
@@ -353,7 +354,8 @@ Usage: %s [OPTION]... SOURCE DEST\n\
|
||||
printf (_("\
|
||||
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\
|
||||
\n\
|
||||
-b, --backup[=CONTROL] make backup before removal\n\
|
||||
--backup[=CONTROL] make a backup of each existing destination file\n\
|
||||
-b like --backup but does not accept an argument\n\
|
||||
-f, --force remove existing destinations, never prompt\n\
|
||||
-i, --interactive prompt before overwrite\n\
|
||||
--strip-trailing-slashes remove any trailing slashes from each SOURCE\n\
|
||||
@@ -506,7 +508,7 @@ main (int argc, char **argv)
|
||||
simple_backup_suffix = xstrdup (backup_suffix_string);
|
||||
|
||||
x.backup_type = (make_backups
|
||||
? xget_version (_("--version-control"),
|
||||
? xget_version (_("backup type"),
|
||||
version_control_string)
|
||||
: none);
|
||||
|
||||
|
||||
37
src/printf.c
37
src/printf.c
@@ -1,5 +1,5 @@
|
||||
/* printf - format and print data
|
||||
Copyright (C) 1990-1998, Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2000, Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -33,6 +33,8 @@
|
||||
\v = vertical tab
|
||||
\0ooo = octal number (ooo is 0 to 3 digits)
|
||||
\xhhh = hexadecimal number (hhh is 1 to 3 digits)
|
||||
\uhhhh = 16-bit Unicode character (hhhh is 4 digits)
|
||||
\Uhhhhhhhh = 32-bit Unicode character (hhhhhhhh is 8 digits)
|
||||
|
||||
Additional directive:
|
||||
|
||||
@@ -51,6 +53,7 @@
|
||||
#include "system.h"
|
||||
#include "long-options.h"
|
||||
#include "error.h"
|
||||
#include "unicodeio.h"
|
||||
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
#define PROGRAM_NAME "printf"
|
||||
@@ -115,8 +118,10 @@ FORMAT controls the output as in C printf. Interpreted sequences are:\n\
|
||||
\\r carriage return\n\
|
||||
\\t horizontal tab\n\
|
||||
\\v vertical tab\n\
|
||||
\\xNNN character with hexadecimal value NNN (1 to 3 digits)\n\
|
||||
\\xNNN byte with hexadecimal value NNN (1 to 3 digits)\n\
|
||||
\n\
|
||||
\\uNNNN character with hexadecimal value NNNN (4 digits)\n\
|
||||
\\UNNNNNNNN character with hexadecimal value NNNNNNNN (8 digits)\n\
|
||||
%%%% a single %%\n\
|
||||
%%b ARGUMENT as a string with `\\' escapes interpreted\n\
|
||||
\n\
|
||||
@@ -246,6 +251,34 @@ print_esc (const char *escstart)
|
||||
}
|
||||
else if (strchr ("\"\\abcfnrtv", *p))
|
||||
print_esc_char (*p++);
|
||||
else if (!posixly_correct && (*p == 'u' || *p == 'U'))
|
||||
{
|
||||
char esc_char = *p;
|
||||
unsigned int uni_value;
|
||||
|
||||
uni_value = 0;
|
||||
for (esc_length = (esc_char == 'u' ? 4 : 8), ++p;
|
||||
esc_length > 0;
|
||||
--esc_length, ++p)
|
||||
{
|
||||
if (!ISXDIGIT (*p))
|
||||
error (1, 0, _("missing hexadecimal number in escape"));
|
||||
uni_value = uni_value * 16 + hextobin (*p);
|
||||
}
|
||||
|
||||
/* A universal character name shall not specify a character short
|
||||
identifier in the range 00000000 through 00000020, 0000007F through
|
||||
0000009F, or 0000D800 through 0000DFFF inclusive. A universal
|
||||
character name shall not designate a character in the required
|
||||
character set. */
|
||||
if ((uni_value >= 0x00 && uni_value <= 0x9f
|
||||
&& uni_value != 0x24 && uni_value != 0x40 && uni_value != 0x60)
|
||||
|| (uni_value >= 0xd800 && uni_value <= 0xdfff))
|
||||
error (1, 0, _("invalid universal character name \\%c%0*x"),
|
||||
esc_char, (esc_char == 'u' ? 4 : 8), uni_value);
|
||||
|
||||
print_unicode_char (stdout, uni_value);
|
||||
}
|
||||
else
|
||||
error (1, 0, _("\\%c: invalid escape"), *p);
|
||||
return p - escstart - 1;
|
||||
|
||||
11
src/seq.c
11
src/seq.c
@@ -226,7 +226,7 @@ the increment must be positive"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined (HAVE_RINT) && defined (HAVE_MODF) && defined (HAVE_FLOOR)
|
||||
#if HAVE_RINT && HAVE_MODF && HAVE_FLOOR
|
||||
|
||||
/* Return a printf-style format string with which all selected numbers
|
||||
will format to strings of the same width. */
|
||||
@@ -260,10 +260,13 @@ get_width_format ()
|
||||
|
||||
if (min_val < 0.0)
|
||||
{
|
||||
sprintf (buffer, "%g", rint (min_val));
|
||||
double int_min_val = rint (min_val);
|
||||
sprintf (buffer, "%g", int_min_val);
|
||||
if (buffer[strspn (buffer, "-0123456789")] != '\0')
|
||||
return "%g";
|
||||
width2 = strlen (buffer);
|
||||
/* On some systems, `seq -w -.1 .1 .1' results in buffer being `-0'.
|
||||
On others, it is just `0'. The former results in better output. */
|
||||
width2 = (int_min_val == 0 ? 2 : strlen (buffer));
|
||||
|
||||
width1 = width1 > width2 ? width1 : width2;
|
||||
}
|
||||
@@ -341,7 +344,7 @@ main (int argc, char **argv)
|
||||
step_is_set = 0;
|
||||
|
||||
/* Figure out the locale's idea of a decimal point. */
|
||||
#ifdef HAVE_LOCALECONV
|
||||
#if HAVE_LOCALECONV
|
||||
{
|
||||
struct lconv *locale;
|
||||
|
||||
|
||||
38
src/sort.c
38
src/sort.c
@@ -127,7 +127,9 @@ struct buffer
|
||||
char *buf; /* Dynamically allocated buffer. */
|
||||
int used; /* Number of bytes used. */
|
||||
int alloc; /* Number of bytes allocated. */
|
||||
int left; /* Number of bytes left after line parsing. */
|
||||
int left; /* Number of bytes left from previous reads. */
|
||||
int newline_free; /* Number of left bytes that are known
|
||||
to be newline-free. */
|
||||
};
|
||||
|
||||
struct keyfield
|
||||
@@ -534,7 +536,7 @@ initbuf (struct buffer *buf, int alloc)
|
||||
{
|
||||
buf->alloc = alloc;
|
||||
buf->buf = xmalloc (buf->alloc);
|
||||
buf->used = buf->left = 0;
|
||||
buf->used = buf->left = buf->newline_free = 0;
|
||||
}
|
||||
|
||||
/* Fill BUF reading from FP, moving buf->left bytes from the end
|
||||
@@ -545,13 +547,15 @@ initbuf (struct buffer *buf, int alloc)
|
||||
static int
|
||||
fillbuf (struct buffer *buf, FILE *fp)
|
||||
{
|
||||
int cc;
|
||||
|
||||
memmove (buf->buf, buf->buf + buf->used - buf->left, buf->left);
|
||||
cc = buf->used = buf->left;
|
||||
|
||||
while (!feof (fp) && !memchr (buf->buf + buf->used - cc, eolchar, cc))
|
||||
if (buf->used != buf->left)
|
||||
{
|
||||
memmove (buf->buf, buf->buf + buf->used - buf->left, buf->left);
|
||||
buf->used = buf->left;
|
||||
}
|
||||
|
||||
while (!feof (fp))
|
||||
{
|
||||
int cc;
|
||||
if (buf->used == buf->alloc)
|
||||
{
|
||||
buf->alloc *= 2;
|
||||
@@ -565,12 +569,19 @@ fillbuf (struct buffer *buf, FILE *fp)
|
||||
exit (SORT_FAILURE);
|
||||
}
|
||||
buf->used += cc;
|
||||
if (memchr (buf->buf + buf->used - cc, eolchar, cc))
|
||||
break;
|
||||
}
|
||||
|
||||
if (feof (fp) && buf->used && buf->buf[buf->used - 1] != eolchar)
|
||||
{
|
||||
if (buf->used == buf->alloc)
|
||||
{
|
||||
/* If the buffer isn't parsed yet, don't increase the buffer
|
||||
size to append a newline, as this won't be needed unless
|
||||
the buffer turns out to be newline-free. */
|
||||
if (buf->newline_free != buf->used)
|
||||
return buf->used;
|
||||
buf->alloc *= 2;
|
||||
buf->buf = xrealloc (buf->buf, buf->alloc);
|
||||
}
|
||||
@@ -791,7 +802,7 @@ findlines (struct buffer *buf, struct lines *lines)
|
||||
beg = ptr + 1;
|
||||
}
|
||||
|
||||
buf->left = lim - beg;
|
||||
buf->newline_free = buf->left = lim - beg;
|
||||
}
|
||||
|
||||
/* Compare strings A and B containing decimal fractions < 1. Each string
|
||||
@@ -1678,6 +1689,15 @@ sort (char **files, int nfiles, FILE *ofp, const char *output_file)
|
||||
fp = xfopen (*files++, "r");
|
||||
while (fillbuf (&buf, fp))
|
||||
{
|
||||
if (nfiles && buf.used != buf.alloc && feof (fp))
|
||||
{
|
||||
/* End of file, but there is more input and buffer room.
|
||||
Concatenate the next input file; this is faster in
|
||||
the usual case. */
|
||||
buf.left = buf.used;
|
||||
break;
|
||||
}
|
||||
|
||||
findlines (&buf, &lines);
|
||||
if (ntmp < lines.used)
|
||||
{
|
||||
|
||||
@@ -134,6 +134,9 @@
|
||||
#if defined(VREPRINT) && !defined(CRPRNT)
|
||||
# define CRPRNT Control ('r')
|
||||
#endif
|
||||
#if defined(CREPRINT) && !defined(CRPRNT)
|
||||
# define CRPRNT Control ('r')
|
||||
#endif
|
||||
#if defined(VWERASE) && !defined(CWERASE)
|
||||
# define CWERASE Control ('w')
|
||||
#endif
|
||||
@@ -379,6 +382,10 @@ static struct control_info control_info[] =
|
||||
#endif
|
||||
#ifdef VREPRINT
|
||||
{"rprnt", CRPRNT, VREPRINT},
|
||||
#else
|
||||
# ifdef CREPRINT /* HPUX 10.20 needs this */
|
||||
{"rprnt", CRPRNT, CREPRINT},
|
||||
# endif
|
||||
#endif
|
||||
#ifdef VWERASE
|
||||
{"werase", CWERASE, VWERASE},
|
||||
|
||||
12
src/sys2.h
12
src/sys2.h
@@ -305,6 +305,18 @@ unsigned long strtoul ();
|
||||
unsigned long long strtoull ();
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_GETLOGIN
|
||||
char *getlogin ();
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_TTYNAME
|
||||
char *ttyname ();
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_GETEUID
|
||||
uid_t geteuid ();
|
||||
#endif
|
||||
|
||||
#include "xalloc.h"
|
||||
|
||||
#if ! defined HAVE_MEMPCPY && ! defined mempcpy
|
||||
|
||||
52
src/system.h
52
src/system.h
@@ -1,5 +1,5 @@
|
||||
/* system-dependent definitions for fileutils, textutils, and sh-utils packages.
|
||||
Copyright (C) 1989, 1991-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989, 1991-2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -152,6 +152,42 @@ extern int errno;
|
||||
# define R_OK 4
|
||||
#endif
|
||||
|
||||
/* For systems that distinguish between text and binary I/O.
|
||||
O_BINARY is usually declared in fcntl.h */
|
||||
#if !defined O_BINARY && defined _O_BINARY
|
||||
/* For MSC-compatible compilers. */
|
||||
# define O_BINARY _O_BINARY
|
||||
# define O_TEXT _O_TEXT
|
||||
#endif
|
||||
|
||||
#ifdef __BEOS__
|
||||
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
|
||||
# undef O_BINARY
|
||||
# undef O_TEXT
|
||||
#endif
|
||||
|
||||
#if O_BINARY
|
||||
# ifndef __DJGPP__
|
||||
# define setmode _setmode
|
||||
# define fileno(_fp) _fileno (_fp)
|
||||
# endif /* not DJGPP */
|
||||
# define SET_BINARY(_f) do {if (!isatty(_f)) setmode (_f, O_BINARY);} while (0)
|
||||
# define SET_BINARY2(_f1, _f2) \
|
||||
do { \
|
||||
if (!isatty (_f1)) \
|
||||
{ \
|
||||
setmode (_f1, O_BINARY); \
|
||||
if (!isatty (_f2)) \
|
||||
setmode (_f2, O_BINARY); \
|
||||
} \
|
||||
} while(0)
|
||||
#else
|
||||
# define SET_BINARY(f) (void)0
|
||||
# define SET_BINARY2(f1,f2) (void)0
|
||||
# define O_BINARY 0
|
||||
# define O_TEXT 0
|
||||
#endif /* O_BINARY */
|
||||
|
||||
#if HAVE_DIRENT_H
|
||||
# include <dirent.h>
|
||||
# define NLENGTH(direct) (strlen((direct)->d_name))
|
||||
@@ -178,13 +214,15 @@ extern int errno;
|
||||
|
||||
/* Get or fake the disk device blocksize.
|
||||
Usually defined by sys/param.h (if at all). */
|
||||
#if !defined DEV_BSIZE && defined BSIZE
|
||||
# define DEV_BSIZE BSIZE
|
||||
#endif
|
||||
#if !defined DEV_BSIZE && defined BBSIZE /* SGI */
|
||||
# define DEV_BSIZE BBSIZE
|
||||
#endif
|
||||
#ifndef DEV_BSIZE
|
||||
# ifdef BSIZE
|
||||
# define DEV_BSIZE BSIZE
|
||||
# else /* !BSIZE */
|
||||
# define DEV_BSIZE 4096
|
||||
# endif /* !BSIZE */
|
||||
#endif /* !DEV_BSIZE */
|
||||
# define DEV_BSIZE 4096
|
||||
#endif
|
||||
|
||||
/* Extract or fake data from a `struct stat'.
|
||||
ST_BLKSIZE: Preferred I/O blocksize for the file, in bytes.
|
||||
|
||||
57
src/tail.c
57
src/tail.c
@@ -1,5 +1,5 @@
|
||||
/* tail -- output the last part of file(s)
|
||||
Copyright (C) 89, 90, 91, 1995-1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989, 90, 91, 1995-2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -84,6 +84,10 @@ enum Follow_mode
|
||||
Follow_descriptor = 2
|
||||
};
|
||||
|
||||
/* The types of files for which tail works. */
|
||||
#define IS_TAILABLE_FILE_TYPE(Mode) \
|
||||
(S_ISREG (Mode) || S_ISFIFO (Mode) || S_ISCHR (Mode))
|
||||
|
||||
static char const *const follow_mode_string[] =
|
||||
{
|
||||
"descriptor", "name", 0
|
||||
@@ -109,14 +113,19 @@ struct File_spec
|
||||
dev_t dev;
|
||||
ino_t ino;
|
||||
|
||||
/* The specified name initially referred to a directory or some other
|
||||
type for which tail isn't meaningful. Unlike for a permission problem
|
||||
(tailable, below) once this is set, the name is not checked ever again. */
|
||||
int ignore;
|
||||
|
||||
/* See description of DEFAULT_MAX_N_... below. */
|
||||
unsigned int n_unchanged_stats;
|
||||
|
||||
/* See description of DEFAULT_MAX_N_... below. */
|
||||
unsigned int n_consecutive_size_changes;
|
||||
|
||||
/* A file is tailable if it is a regular file or a fifo and it is
|
||||
readable. */
|
||||
/* A file is tailable if it exists, is readable, and is of type
|
||||
IS_TAILABLE_FILE_TYPE. */
|
||||
int tailable;
|
||||
|
||||
/* The value of errno seen last time we checked this file. */
|
||||
@@ -192,7 +201,11 @@ enum
|
||||
{
|
||||
RETRY_OPTION = CHAR_MAX + 1,
|
||||
MAX_UNCHANGED_STATS_OPTION,
|
||||
|
||||
/* FIXME: remove this in 2001, unless someone can show a good
|
||||
reason to keep it. */
|
||||
MAX_CONSECUTIVE_SIZE_CHANGES_OPTION,
|
||||
|
||||
PID_OPTION,
|
||||
LONG_FOLLOW_OPTION,
|
||||
};
|
||||
@@ -244,13 +257,15 @@ With no FILE, or when FILE is -, read standard input.\n\
|
||||
-f, --follow, and --follow=descriptor are\n\
|
||||
equivalent\n\
|
||||
-n, --lines=N output the last N lines, instead of the last %d\n\
|
||||
--max-unchanged-stats=N see the texinfo documentation\n\
|
||||
(the default is %d)\n\
|
||||
--max-consecutive-size-changes=N see the texinfo documentation\n\
|
||||
(the default is %d)\n\
|
||||
--max-unchanged-stats=N\n\
|
||||
with --follow=name, reopen a FILE which has not\n\
|
||||
changed size after N (default %d) iterations\n\
|
||||
to see if it has been unlinked or renamed\n\
|
||||
(this is the usual case of rotated log files)\n
|
||||
--pid=PID with -f, terminate after process ID, PID dies\n\
|
||||
-q, --quiet, --silent never output headers giving file names\n\
|
||||
-s, --sleep-interval=S with -f, sleep S seconds between iterations\n\
|
||||
-s, --sleep-interval=S with -f, each iteration lasts approximately S\n\
|
||||
(default 1) seconds\n\
|
||||
-v, --verbose always output headers giving file names\n\
|
||||
--help display this help and exit\n\
|
||||
--version output version information and exit\n\
|
||||
@@ -273,8 +288,7 @@ recreated by some other program.\n\
|
||||
\n\
|
||||
"),
|
||||
DEFAULT_N_LINES, DEFAULT_N_LINES,
|
||||
DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS,
|
||||
DEFAULT_MAX_N_CONSECUTIVE_SIZE_CHANGES
|
||||
DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS
|
||||
);
|
||||
puts (_("\nReport bugs to <bug-textutils@gnu.org>."));
|
||||
}
|
||||
@@ -748,6 +762,15 @@ recheck (struct File_spec *f)
|
||||
error (0, errno, "%s", pretty_name (f));
|
||||
}
|
||||
}
|
||||
else if (!IS_TAILABLE_FILE_TYPE (new_stats.st_mode))
|
||||
{
|
||||
fail = 1;
|
||||
f->errnum = -1;
|
||||
error (0, 0, _("`%s' has been replaced with an untailable file;\
|
||||
giving up on this name"),
|
||||
pretty_name (f));
|
||||
f->ignore = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
f->errnum = 0;
|
||||
@@ -811,6 +834,7 @@ recheck (struct File_spec *f)
|
||||
f->ino = new_stats.st_ino;
|
||||
f->n_unchanged_stats = 0;
|
||||
f->n_consecutive_size_changes = 0;
|
||||
f->ignore = 0;
|
||||
/* FIXME: check lseek return value */
|
||||
lseek (f->fd, f->size, SEEK_SET);
|
||||
}
|
||||
@@ -857,6 +881,9 @@ tail_forever (struct File_spec *f, int nfiles)
|
||||
{
|
||||
struct stat stats;
|
||||
|
||||
if (f[i].ignore)
|
||||
continue;
|
||||
|
||||
if (f[i].fd < 0)
|
||||
{
|
||||
recheck (&f[i]);
|
||||
@@ -1133,6 +1160,15 @@ tail_file (struct File_spec *f, off_t n_units)
|
||||
f->errnum = errno;
|
||||
error (0, errno, "%s", pretty_name (f));
|
||||
}
|
||||
else if (!IS_TAILABLE_FILE_TYPE (stats.st_mode))
|
||||
{
|
||||
error (0, 0, _("%s: cannot follow end of this type of file;\
|
||||
giving up on this name"),
|
||||
pretty_name (f));
|
||||
errors = 1;
|
||||
f->errnum = -1;
|
||||
f->ignore = 1;
|
||||
}
|
||||
|
||||
if (errors)
|
||||
{
|
||||
@@ -1147,6 +1183,7 @@ tail_file (struct File_spec *f, off_t n_units)
|
||||
f->ino = stats.st_ino;
|
||||
f->n_unchanged_stats = 0;
|
||||
f->n_consecutive_size_changes = 0;
|
||||
f->ignore = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
3
src/tr.c
3
src/tr.c
@@ -891,7 +891,8 @@ find_bracketed_repeat (const struct E_string *es, size_t start_idx,
|
||||
++digit_str;
|
||||
--digit_str_len;
|
||||
}
|
||||
if (xstrtoul (digit_str, &d_end, base, &tmp_ulong, NULL) != LONGINT_OK
|
||||
if (xstrtoul (digit_str, &d_end, base, &tmp_ulong, NULL)
|
||||
!= LONGINT_OK
|
||||
|| BEGIN_STATE < tmp_ulong
|
||||
|| d_end - digit_str != digit_str_len)
|
||||
{
|
||||
|
||||
18
src/uptime.c
18
src/uptime.c
@@ -63,14 +63,16 @@ print_uptime (int n, const STRUCT_UTMP *this)
|
||||
{
|
||||
char buf[BUFSIZ];
|
||||
int res;
|
||||
fgets (buf, BUFSIZ, fp);
|
||||
|
||||
/* The following sscanf must use the C locale. */
|
||||
setlocale (LC_NUMERIC, "C");
|
||||
res = sscanf (buf, "%lf", &upsecs);
|
||||
setlocale (LC_NUMERIC, "");
|
||||
if (res == 1)
|
||||
uptime = (time_t) upsecs;
|
||||
char *b = fgets (buf, BUFSIZ, fp);
|
||||
if (b == buf)
|
||||
{
|
||||
/* The following sscanf must use the C locale. */
|
||||
setlocale (LC_NUMERIC, "C");
|
||||
res = sscanf (buf, "%lf", &upsecs);
|
||||
setlocale (LC_NUMERIC, "");
|
||||
if (res == 1)
|
||||
uptime = (time_t) upsecs;
|
||||
}
|
||||
|
||||
fclose (fp);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -138,27 +141,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/basename/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -210,6 +199,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -265,7 +269,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#!/bin/sh
|
||||
# This is really a -*-perl-*- script
|
||||
# -*-perl-*-
|
||||
|
||||
: ${PERL=perl}
|
||||
: ${srcdir=.}
|
||||
|
||||
case "$PERL" in
|
||||
*'missing perl')
|
||||
echo 1>&2 "$0: configure didn't find a usable version of Perl,"
|
||||
"so can't run this test"
|
||||
# '
|
||||
exit 77
|
||||
;;
|
||||
*missing\ perl)
|
||||
echo 1>&2 "$0: configure didn't find a usable version of Perl," \
|
||||
"so can't run this test"
|
||||
exit 77
|
||||
;;
|
||||
esac
|
||||
|
||||
exec $PERL -w -I$srcdir/.. -MFetish -- - << \EOF
|
||||
d=$srcdir/..
|
||||
exec $PERL -w -I$d -MFetish -- - << \EOF
|
||||
require 5.003;
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -134,27 +137,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/chmod/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -206,6 +195,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -261,7 +265,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
@@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = 1.1 gnits
|
||||
|
||||
TESTS = \
|
||||
backup-1 no-deref-link1 no-deref-link2 no-deref-link3 backup-is-src \
|
||||
same-file cp-mv-backup
|
||||
same-file cp-mv-backup symlink-slash
|
||||
EXTRA_DIST = $(TESTS)
|
||||
TESTS_ENVIRONMENT = \
|
||||
PATH=`pwd`/../../src:$$PATH
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -115,7 +118,7 @@ AUTOMAKE_OPTIONS = 1.1 gnits
|
||||
|
||||
TESTS = \
|
||||
backup-1 no-deref-link1 no-deref-link2 no-deref-link3 backup-is-src \
|
||||
same-file cp-mv-backup
|
||||
same-file cp-mv-backup symlink-slash
|
||||
|
||||
EXTRA_DIST = $(TESTS)
|
||||
TESTS_ENVIRONMENT = \
|
||||
@@ -137,27 +140,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/cp/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -209,6 +198,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -264,7 +268,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
38
tests/cp/symlink-slash
Executable file
38
tests/cp/symlink-slash
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
# Make sure that cp -dR dereferences a symlink arg if its name is
|
||||
# written with a trailing slash.
|
||||
|
||||
if test "$VERBOSE" = yes; then
|
||||
set -x
|
||||
cp --version
|
||||
fi
|
||||
|
||||
tmp=t-cpsymsl.$$
|
||||
|
||||
framework_failure=0
|
||||
mkdir $tmp || framework_failure=1
|
||||
cd $tmp || framework_failure=1
|
||||
|
||||
mkdir dir || framework_failure=1
|
||||
ln -s dir symlink || framework_failure=1
|
||||
|
||||
if test $framework_failure = 1; then
|
||||
echo 'failure in testing framework'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fail=0
|
||||
cp -dR symlink/ s || fail=1
|
||||
set `ls -l s`
|
||||
|
||||
# Prior to fileutils-4.0q, the following would have output ...`s -> dir'
|
||||
# because the trailing slash was removed unconditionally (now you have to
|
||||
# use the new --strip-trailing-slash option) causing cp to reproduce the
|
||||
# symlink. Now, the trailing slash is interpreted by the stat library
|
||||
# call and so cp ends up dereferencing the symlink and copying the directory.
|
||||
test "$*" = 'total 0' && : || fail=1
|
||||
|
||||
cd ..
|
||||
rm -rf $tmp
|
||||
|
||||
exit $fail
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -162,27 +165,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/cut/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -234,6 +223,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -291,7 +295,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
@@ -9,7 +9,8 @@ W92-3.X millen-1.X rel-0.X rel-1a.X rel-1b.X rel-2a.X rel-2b.X rel-2c.X \
|
||||
rel-2d.X rel-2e.X rel-2f.X rel-2g.X rel-3a.X next-s.X next-m.X next-h.X \
|
||||
next-d.X next-w.X next-mo.X next-y.X utc-0.X utc-0a.X utc-1.I utc-1.X \
|
||||
utc-1a.I utc-1a.X date2sec-0.X date2sec-0a.X date2sec-1.X sec2date-0.X \
|
||||
this-m.X this-h.X this-w.X this-mo.X this-y.X risks-1.X regress-1.X
|
||||
this-m.X this-h.X this-w.X this-mo.X this-y.X risks-1.X regress-1.X \
|
||||
datevtime-1.X rfc822-1.X
|
||||
run_gen = 1.O 1.E 2.O 2.E 3.O 3.E 4.O 4.E 5.O 5.E 6.O 6.E 7.O 7.E 8.O 8.E 9.O \
|
||||
9.E leap-1.O leap-1.E U95-1.O U95-1.E U95-2.O U95-2.E U95-3.O U95-3.E U92-1.O \
|
||||
U92-1.E U92-2.O U92-2.E U92-3.O U92-3.E V92-1.O V92-1.E V92-2.O V92-2.E \
|
||||
@@ -22,7 +23,8 @@ next-w.E next-mo.O next-mo.E next-y.O next-y.E utc-0.O utc-0.E utc-0a.O \
|
||||
utc-0a.E utc-1.O utc-1.E utc-1a.O utc-1a.E date2sec-0.O date2sec-0.E \
|
||||
date2sec-0a.O date2sec-0a.E date2sec-1.O date2sec-1.E sec2date-0.O \
|
||||
sec2date-0.E this-m.O this-m.E this-h.O this-h.E this-w.O this-w.E this-mo.O \
|
||||
this-mo.E this-y.O this-y.E risks-1.O risks-1.E regress-1.O regress-1.E
|
||||
this-mo.E this-y.O this-y.E risks-1.O risks-1.E regress-1.O regress-1.E \
|
||||
datevtime-1.O datevtime-1.E rfc822-1.O rfc822-1.E
|
||||
##test-files-end
|
||||
|
||||
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -119,7 +122,8 @@ W92-3.X millen-1.X rel-0.X rel-1a.X rel-1b.X rel-2a.X rel-2b.X rel-2c.X \
|
||||
rel-2d.X rel-2e.X rel-2f.X rel-2g.X rel-3a.X next-s.X next-m.X next-h.X \
|
||||
next-d.X next-w.X next-mo.X next-y.X utc-0.X utc-0a.X utc-1.I utc-1.X \
|
||||
utc-1a.I utc-1a.X date2sec-0.X date2sec-0a.X date2sec-1.X sec2date-0.X \
|
||||
this-m.X this-h.X this-w.X this-mo.X this-y.X risks-1.X regress-1.X
|
||||
this-m.X this-h.X this-w.X this-mo.X this-y.X risks-1.X regress-1.X \
|
||||
datevtime-1.X rfc822-1.X
|
||||
|
||||
run_gen = 1.O 1.E 2.O 2.E 3.O 3.E 4.O 4.E 5.O 5.E 6.O 6.E 7.O 7.E 8.O 8.E 9.O \
|
||||
9.E leap-1.O leap-1.E U95-1.O U95-1.E U95-2.O U95-2.E U95-3.O U95-3.E U92-1.O \
|
||||
@@ -133,7 +137,8 @@ next-w.E next-mo.O next-mo.E next-y.O next-y.E utc-0.O utc-0.E utc-0a.O \
|
||||
utc-0a.E utc-1.O utc-1.E utc-1a.O utc-1a.E date2sec-0.O date2sec-0.E \
|
||||
date2sec-0a.O date2sec-0a.E date2sec-1.O date2sec-1.E sec2date-0.O \
|
||||
sec2date-0.E this-m.O this-m.E this-h.O this-h.E this-w.O this-w.E this-mo.O \
|
||||
this-mo.E this-y.O this-y.E risks-1.O risks-1.E regress-1.O regress-1.E
|
||||
this-mo.E this-y.O this-y.E risks-1.O risks-1.E regress-1.O regress-1.E \
|
||||
datevtime-1.O datevtime-1.E rfc822-1.O rfc822-1.E
|
||||
|
||||
|
||||
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
|
||||
@@ -166,27 +171,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/date/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -238,6 +229,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -295,7 +301,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
@@ -5,8 +5,8 @@ use strict;
|
||||
|
||||
# For each test...
|
||||
# Export LANG=C so that the locale-dependent strings match.
|
||||
# Export TZ=UTC so that zone-dependent strings match.
|
||||
$Test::env_default = ['LANG=C TZ=UTC'];
|
||||
# Export TZ=UTC0 so that zone-dependent strings match.
|
||||
$Test::env_default = ['LANG=C TZ=UTC0'];
|
||||
|
||||
sub test_vector
|
||||
{
|
||||
@@ -118,6 +118,9 @@ sub test_vector
|
||||
|
||||
['datevtime-1', "-d 000909 $fmt", {}, "2000-09-09 00:00:00", 0],
|
||||
|
||||
# test for RFC-822 conformance
|
||||
['rfc822-1', "-R -d '$d1'", {}, "Sun, 19 Jan 1997 09:17:48 +0100", 0],
|
||||
|
||||
# FIXME: add a lot more...
|
||||
);
|
||||
|
||||
@@ -142,6 +145,8 @@ sub test_vector
|
||||
|
||||
$Test::env{'date2sec-0'} = ['TZ=UTC+2'];
|
||||
|
||||
$Test::env{'rfc822-1'} = ['LC_ALL=de_DE'];
|
||||
|
||||
return @tv;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -138,27 +141,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/dd/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -210,6 +199,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -265,7 +269,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -138,27 +141,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/dircolors/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -210,6 +199,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -265,7 +269,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
1
tests/du/.cvsignore
Normal file
1
tests/du/.cvsignore
Normal file
@@ -0,0 +1 @@
|
||||
Makefile
|
||||
7
tests/du/Makefile.am
Normal file
7
tests/du/Makefile.am
Normal file
@@ -0,0 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
|
||||
AUTOMAKE_OPTIONS = 1.4 gnits
|
||||
|
||||
TESTS = two-args
|
||||
EXTRA_DIST = $(TESTS)
|
||||
TESTS_ENVIRONMENT = \
|
||||
PATH=`pwd`/../../src:$$PATH
|
||||
278
tests/du/Makefile.in
Normal file
278
tests/du/Makefile.in
Normal file
@@ -0,0 +1,278 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ../..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_FLAG =
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
FESETROUND_LIBM = @FESETROUND_LIBM@
|
||||
GENCAT = @GENCAT@
|
||||
GETCONF = @GETCONF@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
GT_NO = @GT_NO@
|
||||
GT_YES = @GT_YES@
|
||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
POW_LIBM = @POW_LIBM@
|
||||
RANLIB = @RANLIB@
|
||||
SQRT_LIBM = @SQRT_LIBM@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
install_sh = @install_sh@
|
||||
l = @l@
|
||||
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 gnits
|
||||
|
||||
TESTS = two-args
|
||||
EXTRA_DIST = $(TESTS)
|
||||
TESTS_ENVIRONMENT = \
|
||||
PATH=`pwd`/../../src:$$PATH
|
||||
|
||||
subdir = tests/du
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/du/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
for tst in $(TESTS); do \
|
||||
if test -f ./$$tst; then dir=./; \
|
||||
elif test -f $$tst; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*" $$tst "*) \
|
||||
xpass=`expr $$xpass + 1`; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "XPASS: $$tst"; \
|
||||
;; \
|
||||
*) \
|
||||
echo "PASS: $$tst"; \
|
||||
;; \
|
||||
esac; \
|
||||
elif test $$? -ne 77; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*" $$tst "*) \
|
||||
xfail=`expr $$xfail + 1`; \
|
||||
echo "XFAIL: $$tst"; \
|
||||
;; \
|
||||
*) \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "FAIL: $$tst"; \
|
||||
;; \
|
||||
esac; \
|
||||
fi; \
|
||||
done; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
if test "$$xfail" -eq 0; then \
|
||||
banner="All $$all tests passed"; \
|
||||
else \
|
||||
banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
|
||||
fi; \
|
||||
else \
|
||||
if test "$$xpass" -eq 0; then \
|
||||
banner="$$failed of $$all tests failed"; \
|
||||
else \
|
||||
banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am:
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
-rm -f Makefile.in
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
19
tests/du/two-args
Executable file
19
tests/du/two-args
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# Make sure `du d/1 d/2' works.
|
||||
# That command failed with du from fileutils-4.0q.
|
||||
|
||||
if test "$VERBOSE" = yes; then
|
||||
set -x
|
||||
du --version
|
||||
fi
|
||||
|
||||
tmp=du2-$$
|
||||
trap 'status=$?; rm -rf $tmp && exit $status' 0
|
||||
trap 'exit $?' 1 2 13 15
|
||||
|
||||
mkdir -p $tmp/1 $tmp/2
|
||||
|
||||
test -d $tmp || fail=1
|
||||
du $tmp/1 $tmp/2 > /dev/null || fail=1
|
||||
|
||||
exit $fail
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -138,27 +141,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/factor/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -210,6 +199,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -265,7 +269,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
#!/bin/sh
|
||||
# -*-perl-*-
|
||||
|
||||
: ${PERL=perl}
|
||||
: ${srcdir=.}
|
||||
|
||||
case "$PERL" in
|
||||
*'missing perl')
|
||||
echo 1>&2 "$0: configure didn't find a usable version of Perl, so can't run this test"
|
||||
exit 77
|
||||
;;
|
||||
echo 1>&2 "$0: configure didn't find a usable version of Perl," \
|
||||
"so can't run this test"
|
||||
exit 77
|
||||
;;
|
||||
esac
|
||||
|
||||
exec $PERL -w -I$srcdir/.. -MFetish -- - << \EOF
|
||||
d=$srcdir/..
|
||||
exec $PERL -w -I$d -MFetish -- - << \EOF
|
||||
require 5.003;
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -157,27 +160,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/head/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -229,6 +218,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -286,7 +290,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -134,27 +137,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/install/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -206,6 +195,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -261,7 +265,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
@@ -15,7 +15,7 @@ if test $framework_failure = 1; then
|
||||
fi
|
||||
|
||||
fail=0
|
||||
install $file $dir || fail=1
|
||||
ginstall $file $dir || fail=1
|
||||
# Make sure the source file still exists.
|
||||
test -f $file || fail=1
|
||||
# Make sure the dest file has been created.
|
||||
@@ -23,7 +23,7 @@ test -f $dir/$file || fail=1
|
||||
|
||||
# This test would fail with 3.16s when using versions of strip that
|
||||
# don't work on read-only files (the one from binutils works fine).
|
||||
install -s -c -m 555 ../../src/dd $dir || fail=1
|
||||
ginstall -s -c -m 555 ../../src/dd $dir || fail=1
|
||||
# Make sure the dest file has been created.
|
||||
test -f $dir/dd || fail=1
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -57,6 +57,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -86,6 +88,7 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@@ -162,27 +165,13 @@ all: all-redirect
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/join/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
@@ -234,6 +223,21 @@ check-TESTS: $(TESTS)
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -291,7 +295,7 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir check-TESTS info-am info dvi-am dvi check check-am \
|
||||
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user