mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
582 Commits
FILEUTILS-
...
SH-UTILS-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf197bb14a | ||
|
|
34b63c88da | ||
|
|
2fd73df635 | ||
|
|
31f5c39ace | ||
|
|
aa1ddd2e7d | ||
|
|
fca7b20092 | ||
|
|
a90650cd3a | ||
|
|
03faf39b22 | ||
|
|
acd3390874 | ||
|
|
c263f45884 | ||
|
|
a41b145094 | ||
|
|
661f74698e | ||
|
|
c6b0fefde1 | ||
|
|
2d4fd1ab6e | ||
|
|
c4d7de4d1c | ||
|
|
7942b60d47 | ||
|
|
c6bd79ad34 | ||
|
|
52150ef51d | ||
|
|
071e5e3b25 | ||
|
|
21f7f8fb60 | ||
|
|
1a898f0449 | ||
|
|
ab241ac3be | ||
|
|
d3683509b3 | ||
|
|
ddb8aa8b9f | ||
|
|
73ed5ed51e | ||
|
|
a3d40a9447 | ||
|
|
309c1c3e47 | ||
|
|
72bdac7271 | ||
|
|
f1013a1535 | ||
|
|
e1133c7a28 | ||
|
|
011b92f1c9 | ||
|
|
5aa90a9946 | ||
|
|
c610f47650 | ||
|
|
d9e1e1dbd2 | ||
|
|
b700e5cdfe | ||
|
|
a83332dcd2 | ||
|
|
20d55109b5 | ||
|
|
95fad10ba3 | ||
|
|
e580f2a576 | ||
|
|
0a63562cfa | ||
|
|
55b7281ec2 | ||
|
|
b00705596d | ||
|
|
6507fa63ce | ||
|
|
e074cde09b | ||
|
|
9b6eb98d41 | ||
|
|
72efca1195 | ||
|
|
884af44da8 | ||
|
|
c2a761780e | ||
|
|
2c1ae1f436 | ||
|
|
ed0f130ea1 | ||
|
|
a23b2bb948 | ||
|
|
669034433d | ||
|
|
97df7c4729 | ||
|
|
6206ee75ea | ||
|
|
6b54234726 | ||
|
|
c141f3a34e | ||
|
|
3140984fab | ||
|
|
19c397acdc | ||
|
|
80b5341cb8 | ||
|
|
f2fde491db | ||
|
|
e1c98ab3fb | ||
|
|
be9e62c6e0 | ||
|
|
df9a764cbd | ||
|
|
3684b16708 | ||
|
|
7dad7fd5c6 | ||
|
|
856071f1da | ||
|
|
ff1e216579 | ||
|
|
554b19b9d1 | ||
|
|
98e69d378e | ||
|
|
00c483746f | ||
|
|
7d4bd8f671 | ||
|
|
46b48d2e0e | ||
|
|
87a766e71a | ||
|
|
5d65fd5e99 | ||
|
|
6a4a7cfe00 | ||
|
|
2961a41dc3 | ||
|
|
a0f78c6a82 | ||
|
|
3e5e4aa3ac | ||
|
|
f4d3d21b14 | ||
|
|
6a0899b4b6 | ||
|
|
3d21ae4853 | ||
|
|
6405a85879 | ||
|
|
91aee8ad4d | ||
|
|
3c13ac6c36 | ||
|
|
0605601f99 | ||
|
|
c8fa96131e | ||
|
|
cea745beaa | ||
|
|
647d5e6a70 | ||
|
|
b53fe736bc | ||
|
|
f7fcc8c622 | ||
|
|
be579a52e7 | ||
|
|
c2262fcd90 | ||
|
|
93e3e3a5a8 | ||
|
|
92d235c21a | ||
|
|
900011c7de | ||
|
|
0cb358268d | ||
|
|
e6d69926e6 | ||
|
|
7e3bd1d897 | ||
|
|
cd8042a77c | ||
|
|
44bdb2f05a | ||
|
|
38a059bf64 | ||
|
|
950eba9ba0 | ||
|
|
5fdc4f4666 | ||
|
|
4c69db64f2 | ||
|
|
acd9c429c0 | ||
|
|
e0263e15f1 | ||
|
|
cb58624cef | ||
|
|
c488f85c66 | ||
|
|
aa435d9982 | ||
|
|
624dd54796 | ||
|
|
ef34c8704c | ||
|
|
b0d42f0a5c | ||
|
|
3491fe9797 | ||
|
|
951abbe274 | ||
|
|
392dd7af09 | ||
|
|
9561e02b6a | ||
|
|
e6bf5ecaf8 | ||
|
|
e511c84abe | ||
|
|
cc5b8b2e79 | ||
|
|
56b16d84df | ||
|
|
034fbbd8ac | ||
|
|
a65db32955 | ||
|
|
72d2131b0e | ||
|
|
2edc7371bc | ||
|
|
5e7a7d23f5 | ||
|
|
d0e30069c0 | ||
|
|
9a7f0b1542 | ||
|
|
9a909400ba | ||
|
|
9e60f6cc06 | ||
|
|
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 | ||
|
|
2b8209bca8 | ||
|
|
a98c656b54 | ||
|
|
e43759db0c | ||
|
|
507d0aa278 | ||
|
|
86845e9bfe | ||
|
|
633c0745b9 | ||
|
|
5bea77e1af | ||
|
|
4fef810c37 | ||
|
|
7717354351 | ||
|
|
07ab5fec9a | ||
|
|
8cf07d2253 | ||
|
|
aadde40206 | ||
|
|
aee6c49887 | ||
|
|
8041fd5301 | ||
|
|
7a80c0cacc | ||
|
|
c2f3af37bb | ||
|
|
fe56d629d1 | ||
|
|
6c5f00186d | ||
|
|
27acd938a1 | ||
|
|
dda6c3fdc4 | ||
|
|
9d343b0852 | ||
|
|
36aea8162f | ||
|
|
fb0afad994 | ||
|
|
847ee5a3bd | ||
|
|
649349a300 | ||
|
|
759591ae51 | ||
|
|
bb8bb211a1 | ||
|
|
47322c2a8e | ||
|
|
e86141f400 | ||
|
|
8ebde9b0bb | ||
|
|
47eed28390 | ||
|
|
72bd5150fd | ||
|
|
a8223df329 | ||
|
|
7c0e2db49b | ||
|
|
1f6347114a | ||
|
|
9c1810823d | ||
|
|
f25e10f24d | ||
|
|
9bb4588551 | ||
|
|
678d98c083 | ||
|
|
b0952dd045 | ||
|
|
20552b01be | ||
|
|
1b136ab2e9 | ||
|
|
d682521386 | ||
|
|
fb50c4895a | ||
|
|
29e2ec8676 | ||
|
|
f8845967cf | ||
|
|
a849cac5b5 | ||
|
|
d63f6d17dd | ||
|
|
979ea98a3e | ||
|
|
4dbf0a39a6 | ||
|
|
6a7e32b137 | ||
|
|
63444750ac | ||
|
|
4c1158bac0 | ||
|
|
43b2179550 | ||
|
|
ec940f653c | ||
|
|
7c270275fe | ||
|
|
09ce6f34a1 | ||
|
|
999a14a6a5 | ||
|
|
64a7649926 | ||
|
|
0d96fcf423 | ||
|
|
658207b433 | ||
|
|
1f1f9fe885 | ||
|
|
40e6e7a44e | ||
|
|
77dfc82293 | ||
|
|
5813e98ace | ||
|
|
b8cf92fee6 | ||
|
|
31ef40d60b | ||
|
|
66a4b0e7a3 | ||
|
|
3d9c2a6c35 | ||
|
|
282fa27b51 | ||
|
|
04d0388df4 | ||
|
|
d89210720b | ||
|
|
1347ab3fa2 | ||
|
|
35d44548fb | ||
|
|
269c31af34 | ||
|
|
afc2960851 | ||
|
|
d9aece69b3 | ||
|
|
d31f3e34a6 | ||
|
|
260ff68425 | ||
|
|
ddee3f420c | ||
|
|
8b7a023ff1 | ||
|
|
31c3ae1545 | ||
|
|
55e5a84fed | ||
|
|
35d017aa1d | ||
|
|
99c95d35e9 | ||
|
|
40a4ab97fe | ||
|
|
03062f0904 | ||
|
|
d6181296dd | ||
|
|
e2cc35f086 | ||
|
|
5e3d1430e3 | ||
|
|
9951c9f723 | ||
|
|
2781381e83 | ||
|
|
035e61e595 | ||
|
|
345ed2f0c4 | ||
|
|
c52336c440 | ||
|
|
9936c270a7 | ||
|
|
0c0a8f7180 | ||
|
|
dfd37e9e59 | ||
|
|
58d3cbbc5c | ||
|
|
6b239bb039 | ||
|
|
2e18b62d99 | ||
|
|
7392a5fd49 | ||
|
|
e413127dd4 | ||
|
|
fa183ca836 | ||
|
|
ab4923e01e | ||
|
|
2ffef0cd25 | ||
|
|
80862b8fb4 | ||
|
|
6cf7855da7 | ||
|
|
5d716e440a | ||
|
|
05073cdf67 | ||
|
|
a6ac5e555f | ||
|
|
5c67c91bb1 | ||
|
|
70bf2ee07d | ||
|
|
e40b2aea74 | ||
|
|
980db8d94b | ||
|
|
3f4d9d2baf | ||
|
|
2e35cf88d4 | ||
|
|
3b85a5c102 | ||
|
|
03885c59b5 | ||
|
|
47fe4e2b81 | ||
|
|
afed58448d | ||
|
|
83b7332303 | ||
|
|
b1a7c1d3f6 | ||
|
|
07730c119b | ||
|
|
ce286ec9da | ||
|
|
40f2b94df5 | ||
|
|
e03663fafd | ||
|
|
6d94f760a2 | ||
|
|
10ababf6b2 | ||
|
|
faae41a3ef | ||
|
|
177daedd5e | ||
|
|
aeedb315dd | ||
|
|
93d0c6c472 | ||
|
|
7138e43074 | ||
|
|
84b2bdcb3a | ||
|
|
787ee99d38 | ||
|
|
b8293a0364 | ||
|
|
5e8af70e24 | ||
|
|
d8c942fdef | ||
|
|
715f1c67f9 | ||
|
|
ffb0e90647 | ||
|
|
cf4a419332 | ||
|
|
490bf3d6e9 | ||
|
|
6ce0ab6d40 | ||
|
|
70ac08368a | ||
|
|
26310e4984 | ||
|
|
6b43446a33 | ||
|
|
c3a1a2a912 | ||
|
|
348f0efabe | ||
|
|
5b2acd8d30 | ||
|
|
488aef7301 | ||
|
|
be1784cf31 |
@@ -49,7 +49,6 @@ null_AM_MAKEFLAGS = \
|
||||
|
||||
t=./=test
|
||||
my-distcheck: writable-files po-check
|
||||
|
||||
-rm -rf $(t)
|
||||
mkdir $(t)
|
||||
GZIP=$(GZIP) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
@@ -61,8 +60,8 @@ my-distcheck: writable-files po-check
|
||||
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(MAKE) check \
|
||||
&& rm -rf $(DEPDIR) \
|
||||
&& $(MAKE) distclean
|
||||
&& $(MAKE) distclean \
|
||||
&& rm -rf $(DEPDIR)
|
||||
cd $(t) && mv $(distdir) $(distdir).old \
|
||||
&& $(AMTAR) -zxf ../$(distdir).tar.gz
|
||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||
|
||||
351
THANKS
351
THANKS
@@ -1,108 +1,249 @@
|
||||
This is just a start at listing e-mail addresses of contributors.
|
||||
The rest of the addresses are still in the ChangeLog.
|
||||
|
||||
Achim Blumensath: blume@corona.oche.de
|
||||
aldomel: aldomel@ix.netcom.com
|
||||
Alen Muzinic: zveki@fly.cc.fer.hr
|
||||
Akim Demaille: demaille@inf.enst.fr
|
||||
Alain Magloire: alain@qnx.com
|
||||
Alexey Solovyov: alekso@math.uu.se
|
||||
Andreas Jaeger: jaeger@gnu.org
|
||||
Andreas Schwab: schwab@suse.de
|
||||
Andres Soolo: andres@soolo.matti.ee
|
||||
Andrew Dalke: dalke@bioreason.com
|
||||
Andrew Tridgell: tridge@samba.org
|
||||
Andries Brouwer: Andries.Brouwer@cwi.nl
|
||||
Arne Henrik Juul: arnej@imf.unit.no
|
||||
Bauke Jan Douma: bjdouma@xs4all.nl
|
||||
Bengt Martensson: bengt@mathematik.uni-Bremen.de
|
||||
Bernd Leibing: bernd.leibing@rz.uni-ulm.de
|
||||
Bernhard Rosenkraenzer: bero@redhat.de
|
||||
Bjorn Helgaas: helgaas@rsn.hp.com
|
||||
Bob McCracken: kerouac@ravenet.com
|
||||
Bob Proulx: rwp@fc.hp.com
|
||||
Brendan O'Dea: bod@compusol.com.au
|
||||
Charles Karney: karney@pppl.gov
|
||||
Chip Salzenberg: chip@valinux.com
|
||||
Chris Yeo: cyeo@biking.org
|
||||
Christian von Roques: roques@pond.sub.org
|
||||
Colin Plumb: colin@nyx.net
|
||||
David Godfrey: dave@delta.demon.co.uk
|
||||
Dirk Lattermann: dlatt@t-online.de
|
||||
Don Parsons: dparsons@synapse.kent.edu
|
||||
Eirik Fuller: eirik@netcom.com
|
||||
Eli Zaretskii: eliz@is.elta.co.il
|
||||
Emile LeBlanc: leblanc@math.toronto.edu
|
||||
François Pinard: pinard@iro.umontreal.ca
|
||||
Galen Hazelwood: galenh@micron.net
|
||||
Germano Leichsenring: germano@jedi.cs.kobe-u.ac.jp
|
||||
Göran Uddeborg: goeran@uddeborg.pp.se
|
||||
Greg McGary: gkm@eng.ascend.com
|
||||
Gabor Z. Papp: gzp@gzp.org.hu
|
||||
H. J. Lu: hjl@valinux.com
|
||||
Holger Berger: hberger@ess.nec.de
|
||||
Hugh Daniel: hugh@xanadu.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
|
||||
Jamie Lokier: jamie@imbolc.ucc.ie
|
||||
Janos Farkas: chexum@shadow.banki.hu
|
||||
Jesse Thilo: jgt2@eecs.lehigh.edu
|
||||
Joakim Rosqvist: dvljrt@cs.umu.se
|
||||
Joe Orton: joe@orton.demon.co.uk
|
||||
Johan Danielsson: joda@pdc.kth.se
|
||||
John Bley: jbb6@acpub.duke.edu
|
||||
John Gatewood Ham: zappaman@alphabox.compsci.buu.ac.th
|
||||
John Gotts: jgotts@umich.edu
|
||||
Jürgen Fluk: louis@dachau.marco.de
|
||||
jvogel: jvogel@linkny.com
|
||||
Kalle Olavi Niemitalo: tosi@stekt.oulu.fi
|
||||
Karl Heuer: kwzh@gnu.org
|
||||
Kjetil Torgrim Homme: kjetilho@ifi.uio.no
|
||||
Larry McVoy: lm@sgi.com
|
||||
Lars Hecking: lhecking@nmrc.ucc.ie
|
||||
Lorne Baker: lbaker@nitro.avint.net
|
||||
Marcus Daniels: marcus@sysc.pdx.edu
|
||||
Mark A. Thomas: thommark@access.digex.net
|
||||
Mark Harris: mark@monitor.designacc.com
|
||||
Mark Kettenis: kettenis@phys.uva.nl
|
||||
Martin Mitchell: martin@debian.org
|
||||
Marty Leisner: leisner@sdsp.mc.xerox.com
|
||||
Masami Takikawa: takikawm@CS.ORST.EDU
|
||||
Matthew S. Levine: mslevine@theory.lcs.mit.edu
|
||||
Matthew Swift: swift@alum.mit.edu
|
||||
Matthias Urlichs: smurf@noris.de
|
||||
Michiel Bacchiani: bacchian@raven.bu.edu
|
||||
Michael ???:michael@roka.net
|
||||
Michael Veksler: mveksler@techunix.technion.ac.il
|
||||
Michael Stone: mstone@debian.org
|
||||
Miles Bader: miles@gnu.ai.mit.edu
|
||||
Nelson H. F. Beebe: beebe@math.utah.edu
|
||||
Noel Cragg: noel@red-bean.com
|
||||
Olav Morkrid: olav@funcom.com
|
||||
Per Kristian Hove: perhov@math.ntnu.no
|
||||
Peter Eriksson: peter@ifm.liu.se
|
||||
Peter Moulder: reiter@netspace.net.au
|
||||
Peter Samuelson: psamuels@sampo.creighton.edu
|
||||
Paul Eggert: eggert@twinsun.com
|
||||
Paul Slootman: paul@debian.org
|
||||
Philippe De Muyter: phdm@macqel.be
|
||||
Rainer Orth: ro@TechFak.Uni-Bielefeld.DE
|
||||
Richard Braakman: dark@xs4all.nl
|
||||
Ross Ridge: rridge@calum.csclub.uwaterloo.ca
|
||||
Sami Farin: sfarin@ratol.fi
|
||||
Santiago Vila Doncel: sanvila@unex.es
|
||||
Scott Lurndal: slurn@griffin.engr.sgi.com
|
||||
Stuart Kemp: skemp@peter.bmc.com
|
||||
Thomas Bushnell, n/BSG: thomas@gnu.ai.mit.edu
|
||||
Ton Hospel: thospel@mail.dma.be
|
||||
Torbjorn Lindgren: tl@funcom.no
|
||||
Torsten Landschoff: torsten@pclab.ifg.uni-kiel.de
|
||||
Tony Leneis: tony@plaza.ds.adp.com
|
||||
Ulrich Drepper: drepper@cygnus.com
|
||||
Vin Shelton: acs@alumni.princeton.edu
|
||||
Volker Borchert: bt@teknon.de
|
||||
Wayne Stewart: wstewa@atl.com
|
||||
Wichert Akkerman: wichert@cistron.nl
|
||||
William Bader: william@nscs.fast.net
|
||||
Achim Blumensath blume@corona.oche.de
|
||||
Adam Klein aklein@debian.org
|
||||
Akim Demaille demaille@inf.enst.fr
|
||||
Alain Magloire alain@qnx.com
|
||||
Alberto Accomazzi alberto@cfa0.harvard.edu
|
||||
aldomel aldomel@ix.netcom.com
|
||||
Alen Muzinic zveki@fly.cc.fer.hr
|
||||
Alexey Solovyov alekso@math.uu.se
|
||||
Andre Novaes Cunha Andre.Cunha@br.global-one.net
|
||||
Andreas Jaeger jaeger@gnu.org
|
||||
Andreas Luik luik@isa.de
|
||||
Andreas Schwab schwab@suse.de
|
||||
Andreas Stolcke stolcke@ICSI.Berkeley.EDU
|
||||
Andres Soolo andres@soolo.matti.ee
|
||||
Andrew Dalke dalke@bioreason.com
|
||||
Andrew Tridgell tridge@samba.org
|
||||
Andries Brouwer Andries.Brouwer@cwi.nl
|
||||
Andy Longton alongton@metamark.com
|
||||
Ariel Faigon ariel@cthulhu.engr.sgi.com
|
||||
Arne H. Juul arnej@solan.unit.no
|
||||
Arne Henrik Juul arnej@imf.unit.no
|
||||
Arthur Pool pool@commerce.uq.edu.au
|
||||
Austin Donnelly Austin.Donnelly@cl.cam.ac.uk
|
||||
Bauke Jan Douma bjdouma@xs4all.nl
|
||||
Bengt Martensson bengt@mathematik.uni-Bremen.de
|
||||
Bernd Leibing bernd.leibing@rz.uni-ulm.de
|
||||
Bernhard Rosenkraenzer bero@redhat.de
|
||||
Bill Peters peters@gaffel.as.arizona.edu
|
||||
Bjorn Helgaas helgaas@rsn.hp.com
|
||||
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@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
|
||||
Christian Krackowizer kra1@technodat.co.at
|
||||
Christian von Roques roques@pond.sub.org
|
||||
Chuck Hedrick hedrick@klinzhai.rutgers.edu
|
||||
Clark Morgan cmorgan@aracnet.com
|
||||
Colin Plumb colin@nyx.net
|
||||
Collin Rogowski collin@rogowski.de
|
||||
Dan Hagerty hag@gnu.ai.it.edu
|
||||
Daniel Bergstrom noa@melody.se
|
||||
David Dyck dcd@tc.fluke.COM
|
||||
David Godfrey dave@delta.demon.co.uk
|
||||
Dennis Henriksen opus@flamingo.osrl.dk
|
||||
Derek Clegg dclegg@next.com
|
||||
Dick Streefland dick_streefland@tasking.com
|
||||
Dirk Lattermann dlatt@t-online.de
|
||||
Dirk-Jan Faber djfaber@snow.nl
|
||||
Don Parsons dparsons@synapse.kent.edu
|
||||
Donni Erpel donald@appc11.gsi.de
|
||||
Doug McLaren dougmc@comco.com
|
||||
Dragos Harabor dharabor@us.oracle.com
|
||||
Ed Avis epa98@doc.ic.ac.uk
|
||||
Edzer Pebesma Edzer.Pebesma@rivm.nl
|
||||
Eirik Fuller eirik@netcom.com
|
||||
Eivind eivindt@multinet.no
|
||||
Eli Zaretskii eliz@is.elta.co.il
|
||||
Emile LeBlanc leblanc@math.toronto.edu
|
||||
Eric Backus ericb@lsid.hp.com
|
||||
Eric G. Miller egm2@jps.net
|
||||
Erik Bennett bennett@cvo.oneworld.com
|
||||
Erik Corry erik@kroete2.freinet.de
|
||||
Felix Lee flee@teleport.com
|
||||
Fletcher Mattox fletcher@cs.utexas.edu
|
||||
Florin Iucha fiucha@hsys.mic.ro
|
||||
Frank T Lofaro ftlofaro@snooks.Egr.UNLV.EDU
|
||||
François Pinard pinard@iro.umontreal.ca
|
||||
Fred Fish fnf@ninemoons.com
|
||||
Gabor Z. Papp gzp@gzp.org.hu
|
||||
Galen Hazelwood galenh@micron.net
|
||||
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
|
||||
Holger Berger hberger@ess.nec.de
|
||||
Hugh Daniel hugh@xanadu.com
|
||||
Ian Jackson ijackson@chiark.greenend.org.uk
|
||||
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
|
||||
Jamie Lokier jamie@imbolc.ucc.ie
|
||||
Janos Farkas chexum@shadow.banki.hu
|
||||
Jarkko Hietaniemi jhi@epsilon.hut.fi
|
||||
Jeff Moore jbm@mordor.com
|
||||
Jens Schmidt jms@jsds.hamburg.com
|
||||
Jerome Abela abela@hsc.fr
|
||||
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@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
|
||||
John Kodis kodis@acm.org
|
||||
John Murphy jam@philabs.research.philips.com
|
||||
John Roll john@panic.harvard.edu
|
||||
John Salmon johns@mullet.anu.edu.au
|
||||
John 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
|
||||
Kai-Uwe Rommel rommel@informatik.tu-muenchen.de
|
||||
Kalle Olavi Niemitalo tosi@stekt.oulu.fi
|
||||
Kamal Paul Nigam Kamal_Paul_Nigam@gs35.sp.cs.cmu.edu
|
||||
Karl Heuer kwzh@gnu.org
|
||||
Karsten Thygesen karthy@kom.auc.dk
|
||||
Kaveh R. Ghazi ghazi@caip.rutgers.edu
|
||||
Keith Owens kaos@audio.apana.org.au
|
||||
Ken Pizzini kenp@halcyon.com
|
||||
Kjetil Torgrim Homme kjetilho@ifi.uio.no
|
||||
Kristoffer Rose kris@diku.dk
|
||||
Larry McVoy lm@sgi.com
|
||||
Lars Hecking lhecking@nmrc.ucc.ie
|
||||
Lehti Rami rammer@cs.tut.fi
|
||||
Leonard N. Zubkoff lnz@dandelion.com
|
||||
Lorne Baker lbaker@nitro.avint.net
|
||||
Manas Garg manas@cygsoft.com
|
||||
Manfred Hollstein manfred@s-direktnet.de
|
||||
Marc Boucher marc@mbsi.ca
|
||||
Marc Olzheim marcolz@stack.nl
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
Michael Veksler mveksler@techunix.technion.ac.il
|
||||
Michel Robitaille robitail@IRO.UMontreal.CA
|
||||
Michiel Bacchiani bacchian@raven.bu.edu
|
||||
Miles Bader miles@gnu.ai.mit.edu
|
||||
Minh Tran-Le tranle@intellicorp.com
|
||||
Nelson H. F. Beebe beebe@math.utah.edu
|
||||
Niklas Edmundsson nikke@acc.umu.se
|
||||
Noah Friedman friedman@splode.com
|
||||
Noel Cragg noel@red-bean.com
|
||||
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
|
||||
Peter Samuelson psamuels@sampo.creighton.edu
|
||||
Peter Seebach seebs@taniemarie.solon.com
|
||||
Phil Richards phil.richards@vf.vodafone.co.uk
|
||||
Philippe De Muyter phdm@macqel.be
|
||||
Philippe Schnoebelen Philippe.Schnoebelen@imag.fr
|
||||
Rainer Orth ro@TechFak.Uni-Bielefeld.DE
|
||||
Ralf W. Stephan stephan@tmt.de
|
||||
Ralph Loader loader@maths.ox.ac.uk
|
||||
Raul Miller moth@magenta.com
|
||||
Richard Braakman dark@xs4all.nl
|
||||
Richard J. Rauenzahn rrauenza@hairball.cup.hp.com
|
||||
Richard Sharman rsharman@magmacom.com
|
||||
Rick Sladkey jrs@world.std.com
|
||||
Rik Faith faith@cs.unc.edu
|
||||
Risto Kankkunen kankkune@lingsoft.fi
|
||||
Robert H. de Vries robert@and.nl
|
||||
Rogier Wolff R.E.Wolff@BitWizard.nl
|
||||
Ronald F. Guilmette rfg@netcom.com
|
||||
Ross Alexander r.alexander@auckland.ac.nz
|
||||
Ross Paterson rap@doc.ic.ac.uk
|
||||
Ross Ridge rridge@calum.csclub.uwaterloo.ca
|
||||
Sami Farin sfarin@ratol.fi
|
||||
Samuli Karkkainen Samuli.Karkkainen@hut.fi
|
||||
Sander van Malssen svm@kozmix.ow.nl
|
||||
Santiago Vila Doncel sanvila@unex.es
|
||||
Savochkin Andrey Vladimirovich saw@msu.ru
|
||||
Scott Lurndal slurn@griffin.engr.sgi.com
|
||||
Stephen Gildea gildea@x.org
|
||||
Steve McConnel steve@acadcomp.sil.org
|
||||
Stuart Kemp skemp@peter.bmc.com
|
||||
Tadayoshi Funaba tadf@kt.rim.or.jp
|
||||
Theodore Ts'o tytso@rsts-11.mit.edu
|
||||
Thomas Bushnell thomas@gnu.ai.mit.edu
|
||||
Thomas Quinot thomas@Cuivre.FR.EU.ORG
|
||||
Tim Smithers mouse@dmouse.com.au
|
||||
Tim Waugh twaugh@redhat
|
||||
Tom Quinn trq@dionysos.thphys.ox.ac.uk
|
||||
Ton Hospel thospel@mail.dma.be
|
||||
Tony Leneis tony@plaza.ds.adp.com
|
||||
Tony Robinson ajr@eng.cam.ac.uk
|
||||
Torbjorn Granlund tege@nada.kth.se
|
||||
Torbjorn Lindgren tl@funcom.no
|
||||
Torsten Landschoff torsten@pclab.ifg.uni-kiel.de
|
||||
Ulrich Drepper drepper@gnu.org
|
||||
Urs Thuermann urs@isnogud.escape.de
|
||||
Vin Shelton acs@alumni.princeton.edu
|
||||
Volker Borchert bt@teknon.de
|
||||
Wayne Stewart wstewa@atl.com
|
||||
Wichert Akkerman wichert@cistron.nl
|
||||
Will Edgington wedgingt@acm.org
|
||||
William Bader william@nscs.fast.net
|
||||
William Dowling will@franklin.com
|
||||
William Lewis wiml@omnigroup.com
|
||||
Wolfram Kleff kleff@cs.uni-bonn.de
|
||||
Zvi Har'El rl@math.technion.ac.il
|
||||
Ørn E. Hansen oehansen@daimi.aau.dk
|
||||
|
||||
@@ -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.
|
||||
@@ -31,8 +31,6 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
@@ -57,6 +55,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -71,6 +71,7 @@ CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
FESETROUND_LIBM = @FESETROUND_LIBM@
|
||||
GENCAT = @GENCAT@
|
||||
GETCONF = @GETCONF@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
@@ -85,7 +86,9 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
@@ -98,6 +101,7 @@ 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@
|
||||
@@ -142,7 +146,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
|
||||
|
||||
@@ -266,7 +270,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
|
||||
@@ -300,11 +303,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}
|
||||
|
||||
@@ -6,4 +6,5 @@ getopt1.c
|
||||
md5.h
|
||||
obstack.h
|
||||
regex.h
|
||||
regex.c
|
||||
getpagesize.h
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -184,3 +184,14 @@ p n
|
||||
up
|
||||
p len
|
||||
q
|
||||
complete b user
|
||||
complete b user
|
||||
complete b pars
|
||||
b parse_user_spec
|
||||
r a.b
|
||||
n
|
||||
n
|
||||
p u
|
||||
n
|
||||
p u
|
||||
n
|
||||
|
||||
308
lib/ChangeLog
308
lib/ChangeLog
@@ -1,3 +1,311 @@
|
||||
2000-05-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* long-options.c: Don't include closeout.h.
|
||||
(parse_long_options): Don't call close_stdout for --version.
|
||||
|
||||
2000-05-06 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* strnlen.c: Undefine __strnlen and strnlen.
|
||||
[!weak_alias]: Define __strnlen to strnlen.
|
||||
|
||||
* atexit.c: New file, from libiberty.
|
||||
|
||||
2000-05-06 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* closeout.c (close_stdout_status): Also check for errors on the
|
||||
stderr stream.
|
||||
|
||||
2000-05-05 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
|
||||
instead of xmalloc, xrealloc, path_concat.
|
||||
(locale_charset): Treat empty environment variables as absent.
|
||||
(DIRECTORY_SEPARATOR, ISSLASH): New macros.
|
||||
|
||||
2000-05-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* getopt.c: Update from glibc.
|
||||
* obstack.c: Likewise.
|
||||
* obstack.h: Likewise.
|
||||
* regex.c: Likewise. NB: K&R compiler support is dropped for this file
|
||||
|
||||
* regex.h: Likewise.
|
||||
* strndup.c: Likewise.
|
||||
* strnlen.c: New file, from glibc.
|
||||
|
||||
2000-05-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* full-write.c (full_write): Remove `FIXME' part of comment.
|
||||
|
||||
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/.
|
||||
Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
|
||||
|
||||
* backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
|
||||
not `#if STDC_HEADERS'.
|
||||
Declare malloc if needed.
|
||||
|
||||
* backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
|
||||
now that autoconf always defines the HAVE_DECL_ symbols.
|
||||
* human.c: Likewise.
|
||||
* same.c: Likewise.
|
||||
* strtoumax.c: Likewise.
|
||||
|
||||
* backupfile.c: Arrange for cpp to fail if the configure-time
|
||||
declaration check was not run.
|
||||
* hash.c: Likewise.
|
||||
* human.c: Likewise.
|
||||
* same.c: Likewise.
|
||||
* strtoumax.c: Likewise.
|
||||
|
||||
* userspec.c (parse_user_spec): If there is no `:' but there is a `.',
|
||||
then first look up the entire `.'-containing string as a login name.
|
||||
|
||||
2000-02-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/getdate.y: Handle two-digit years with leading zeros correctly.
|
||||
(textint): New typedef.
|
||||
(parser_control): Member year changed from int to textint.
|
||||
All uses changed.
|
||||
(YYSTYPE): Removed; replaced by %union with int and textint members.
|
||||
(tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
|
||||
tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
|
||||
tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
|
||||
(tSNUMBER, tUNUMBER): Now of type <textintval>.
|
||||
(date, number, to_year): Use width of number in digits, not its value,
|
||||
to determine whether it's a 2-digit year, or a 2-digit time.
|
||||
(yylex): Store number of digits of numeric tokens.
|
||||
Reported by John Kendall.
|
||||
|
||||
(parser_control): Changed from struct parser_control to typedef (for
|
||||
consistency). All uses changed.
|
||||
|
||||
(tID): Removed; not used.
|
||||
(yylex): Return '?' for unknown identifiers, rather than (unused) tID.
|
||||
|
||||
2000-02-14 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
|
||||
adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
|
||||
|
||||
2000-02-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* userspec.c (ISDIGIT): Define it.
|
||||
(isdigit): Remove definition.
|
||||
(is_number): Use ISDIGIT, not isdigit.
|
||||
<libintl.h>: Include.
|
||||
(_ and N_): Define.
|
||||
(parse_user_spec): Mark translatable strings.
|
||||
|
||||
2000-02-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
With these changes, nanosleep.[ch] are finally enough like the other
|
||||
lib/* replacement files to compile on a few more losing systems.
|
||||
|
||||
* nanosleep.h: Don't include config.h.
|
||||
Remove prototype from declaration of nanosleep.
|
||||
(PARAMS): Remove now-unneeded definition.
|
||||
* nanosleep.c: #undef nanosleep.
|
||||
(rpl_nanosleep): Rename from nanosleep.
|
||||
|
||||
2000-02-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
|
||||
rather than with `#if HAVE_UTMPNAME'.
|
||||
|
||||
2000-02-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* readutmp.h (UT_USER): Add parens. From Andreas Schwab.
|
||||
|
||||
2000-01-31 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* nanosleep.h (nanosleep): Guard declaration with
|
||||
`#if ! HAVE_DECL_NANOSLEEP'.
|
||||
Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
|
||||
the declaration in that vendor's sys/timers.h.
|
||||
Reported by Christian Krackowizer.
|
||||
|
||||
* quotearg.c (ISASCII): Add #undef and move definition to follow
|
||||
inclusion of wctype.h to work around solaris2.6 namespace pollution.
|
||||
(ISPRINT): Likewise.
|
||||
Reported by Tom Tromey.
|
||||
|
||||
2000-01-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
|
||||
|
||||
@@ -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 \
|
||||
canon-host.c closeout.c diacrit.c dirname.c exclude.c filemode.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
|
||||
|
||||
265
lib/Makefile.in
265
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.
|
||||
@@ -31,8 +31,6 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
@@ -57,6 +55,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -71,6 +71,7 @@ CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
FESETROUND_LIBM = @FESETROUND_LIBM@
|
||||
GENCAT = @GENCAT@
|
||||
GETCONF = @GETCONF@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
@@ -85,7 +86,11 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
LIB_NANOSLEEP = @LIB_NANOSLEEP@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
@@ -99,6 +104,7 @@ 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@
|
||||
@@ -113,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 \
|
||||
canon-host.c closeout.c diacrit.c dirname.c exclude.c filemode.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@
|
||||
@@ -136,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@
|
||||
@@ -159,14 +172,15 @@ ANSI2KNR = ../src/ansi2knr
|
||||
libfetish_a_AR = $(AR) cru
|
||||
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 \
|
||||
diacrit$U.o dirname$U.o exclude$U.o filemode$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)
|
||||
@@ -176,23 +190,9 @@ 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 \
|
||||
$(DEPDIR)/argmatch$U.Po $(DEPDIR)/atexit.Po $(DEPDIR)/backupfile$U.Po \
|
||||
$(DEPDIR)/basename$U.Po $(DEPDIR)/canon-host$U.Po $(DEPDIR)/chown.Po \
|
||||
$(DEPDIR)/closeout$U.Po $(DEPDIR)/diacrit$U.Po $(DEPDIR)/dirname$U.Po \
|
||||
$(DEPDIR)/dup2.Po $(DEPDIR)/error.Po $(DEPDIR)/euidaccess.Po \
|
||||
@@ -204,38 +204,55 @@ $(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)/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)/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)/strnlen.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)/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 atexit.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 \
|
||||
strnlen.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
|
||||
|
||||
@@ -284,6 +301,8 @@ alloca_.c: alloca.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c
|
||||
argmatch_.c: argmatch.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/argmatch.c; then echo $(srcdir)/argmatch.c; else echo argmatch.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > argmatch_.c
|
||||
atexit_.c: atexit.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/atexit.c; then echo $(srcdir)/atexit.c; else echo atexit.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > atexit_.c
|
||||
backupfile_.c: backupfile.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/backupfile.c; then echo $(srcdir)/backupfile.c; else echo backupfile.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > backupfile_.c
|
||||
basename_.c: basename.c $(ANSI2KNR)
|
||||
@@ -352,6 +371,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)
|
||||
@@ -436,6 +457,8 @@ strncasecmp_.c: strncasecmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strncasecmp.c; then echo $(srcdir)/strncasecmp.c; else echo strncasecmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strncasecmp_.c
|
||||
strndup_.c: strndup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c
|
||||
strnlen_.c: strnlen.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c
|
||||
strpbrk_.c: strpbrk.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strpbrk.c; then echo $(srcdir)/strpbrk.c; else echo strpbrk.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strpbrk_.c
|
||||
strstr_.c: strstr.c $(ANSI2KNR)
|
||||
@@ -452,6 +475,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)
|
||||
@@ -476,24 +501,25 @@ xstrtoumax_.c: xstrtoumax.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrtoumax.c; then echo $(srcdir)/xstrtoumax.c; else echo xstrtoumax.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrtoumax_.c
|
||||
yesno_.c: yesno.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/yesno.c; then echo $(srcdir)/yesno.c; else echo yesno.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > yesno_.c
|
||||
addext_.o alloca_.o argmatch_.o backupfile_.o basename_.o canon-host_.o \
|
||||
chown_.o closeout_.o diacrit_.o dirname_.o dup2_.o error_.o \
|
||||
euidaccess_.o exclude_.o fileblocks_.o filemode_.o fnmatch_.o \
|
||||
addext_.o alloca_.o argmatch_.o atexit_.o backupfile_.o basename_.o \
|
||||
canon-host_.o chown_.o closeout_.o diacrit_.o dirname_.o dup2_.o \
|
||||
error_.o 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 strnlen_.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 \
|
||||
@@ -510,7 +536,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)
|
||||
@@ -534,23 +560,10 @@ 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
|
||||
@AMDEP@include $(DEPDIR)/atexit.Po
|
||||
@AMDEP@include $(DEPDIR)/backupfile$U.Po
|
||||
@AMDEP@include $(DEPDIR)/basename$U.Po
|
||||
@AMDEP@include $(DEPDIR)/canon-host$U.Po
|
||||
@@ -585,6 +598,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
|
||||
@@ -627,6 +641,7 @@ distdir: $(DISTFILES)
|
||||
@AMDEP@include $(DEPDIR)/stripslash$U.Po
|
||||
@AMDEP@include $(DEPDIR)/strncasecmp.Po
|
||||
@AMDEP@include $(DEPDIR)/strndup.Po
|
||||
@AMDEP@include $(DEPDIR)/strnlen.Po
|
||||
@AMDEP@include $(DEPDIR)/strpbrk.Po
|
||||
@AMDEP@include $(DEPDIR)/strstr.Po
|
||||
@AMDEP@include $(DEPDIR)/strtod.Po
|
||||
@@ -635,6 +650,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
|
||||
@@ -663,8 +679,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:
|
||||
@@ -673,7 +704,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:
|
||||
@@ -682,9 +713,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
|
||||
@@ -694,6 +725,7 @@ installdirs:
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
@@ -734,13 +766,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 \
|
||||
@@ -760,6 +793,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.
|
||||
14
lib/atexit.c
Normal file
14
lib/atexit.c
Normal file
@@ -0,0 +1,14 @@
|
||||
/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
|
||||
/* This function is in the public domain. --Mike Stump. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
int
|
||||
atexit(f)
|
||||
void (*f)();
|
||||
{
|
||||
/* If the system doesn't provide a definition for atexit, use on_exit
|
||||
if the system provides that. */
|
||||
on_exit (f, 0);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* backupfile.c -- make Emacs style backup file names
|
||||
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
|
||||
@@ -58,16 +58,24 @@
|
||||
# define CLOSEDIR(d) closedir (d)
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_GETENV
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_GETENV
|
||||
char *getenv ();
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_MALLOC
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_MALLOC
|
||||
char *malloc ();
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *));
|
||||
|
||||
#if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
|
||||
|
||||
@@ -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 @@
|
||||
/* Declaration for error-reporting function
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
|
||||
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
|
||||
70
lib/fatal.c
Normal file
70
lib/fatal.c
Normal file
@@ -0,0 +1,70 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* FIXME: define EXIT_FAILURE */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
|
||||
# if __STDC__
|
||||
# include <stdarg.h>
|
||||
# define VA_START(args, lastarg) va_start(args, lastarg)
|
||||
# else
|
||||
# include <varargs.h>
|
||||
# define VA_START(args, lastarg) va_start(args)
|
||||
# endif
|
||||
#else
|
||||
# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
|
||||
# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS || _LIBC
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#else
|
||||
void exit ();
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# define program_name program_invocation_name
|
||||
#else /* not _LIBC */
|
||||
/* The calling program should define program_name and set it to the
|
||||
name of the executing program. */
|
||||
extern char *program_name;
|
||||
#endif
|
||||
|
||||
#include "fatal.h"
|
||||
|
||||
/* Like error, but always exit with EXIT_FAILURE. */
|
||||
|
||||
void
|
||||
#if defined VA_START && __STDC__
|
||||
fatal (int errnum, const char *message, ...)
|
||||
#else
|
||||
fatal (errnum, message, va_alist)
|
||||
int errnum;
|
||||
char *message;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
#ifdef VA_START
|
||||
va_list args;
|
||||
#endif
|
||||
|
||||
if (error_print_progname)
|
||||
(*error_print_progname) ();
|
||||
else
|
||||
{
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
}
|
||||
|
||||
#ifdef VA_START
|
||||
VA_START (args, message);
|
||||
error (EXIT_FAILURE, errnum, message, args);
|
||||
va_end (args);
|
||||
#else
|
||||
error (EXIT_FAILURE, errnum, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
#endif
|
||||
}
|
||||
68
lib/fatal.h
Normal file
68
lib/fatal.h
Normal file
@@ -0,0 +1,68 @@
|
||||
#include "error.h"
|
||||
|
||||
/* FIXME: this is all from ansidecl. better to simply swipe
|
||||
that file from egcs/include and include it from here. */
|
||||
|
||||
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
|
||||
older preprocessors. Thus we can't define something like this:
|
||||
|
||||
#define HAVE_GCC_VERSION(MAJOR, MINOR) \
|
||||
(__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
|
||||
|
||||
and then test "#if HAVE_GCC_VERSION(2,7)".
|
||||
|
||||
So instead we use the macro below and test it against specific values. */
|
||||
|
||||
/* This macro simplifies testing whether we are using gcc, and if it
|
||||
is of a particular minimum version. (Both major & minor numbers are
|
||||
significant.) This macro will evaluate to 0 if we are not using
|
||||
gcc at all. */
|
||||
#ifndef GCC_VERSION
|
||||
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
#endif /* GCC_VERSION */
|
||||
|
||||
/* Define macros for some gcc attributes. This permits us to use the
|
||||
macros freely, and know that they will come into play for the
|
||||
version of gcc in which they are supported. */
|
||||
|
||||
#if (GCC_VERSION < 2007)
|
||||
# define __attribute__(x)
|
||||
#endif
|
||||
|
||||
/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
|
||||
#ifndef ATTRIBUTE_MALLOC
|
||||
# if (GCC_VERSION >= 2096)
|
||||
# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
|
||||
# else
|
||||
# define ATTRIBUTE_MALLOC
|
||||
# endif /* GNUC >= 2.96 */
|
||||
#endif /* ATTRIBUTE_MALLOC */
|
||||
|
||||
/* Attributes on labels were valid as of gcc 2.93. */
|
||||
#ifndef ATTRIBUTE_UNUSED_LABEL
|
||||
# if (GCC_VERSION >= 2093)
|
||||
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED_LABEL
|
||||
# endif /* GNUC >= 2.93 */
|
||||
#endif /* ATTRIBUTE_UNUSED_LABEL */
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
#endif /* ATTRIBUTE_UNUSED */
|
||||
|
||||
#ifndef ATTRIBUTE_NORETURN
|
||||
# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
||||
#endif /* ATTRIBUTE_NORETURN */
|
||||
|
||||
#ifndef ATTRIBUTE_PRINTF
|
||||
# define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
|
||||
# define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
|
||||
# define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
|
||||
# define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
|
||||
# define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
|
||||
# define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
|
||||
#endif /* ATTRIBUTE_PRINTF */
|
||||
|
||||
extern void fatal (int errnum, const char *format, ...)
|
||||
ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_2;
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* full-write.c -- an interface to write that retries after interrupts
|
||||
Copyright (C) 1993, 1994, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1994, 1997, 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
|
||||
@@ -45,10 +45,11 @@ full_write (int desc, const char *ptr, size_t len)
|
||||
while (len > 0)
|
||||
{
|
||||
int written = write (desc, ptr, len);
|
||||
/* FIXME: write on my slackware Linux 1.2.13 returns zero when
|
||||
/* write on an old Slackware Linux 1.2.13 returns zero when
|
||||
I try to write more data than there is room on a floppy disk.
|
||||
This puts dd into an infinite loop. Reproduce with
|
||||
dd if=/dev/zero of=/dev/fd0. */
|
||||
dd if=/dev/zero of=/dev/fd0. If you have this problem,
|
||||
consider upgrading to a newer kernel. */
|
||||
if (written < 0)
|
||||
{
|
||||
#ifdef EINTR
|
||||
|
||||
192
lib/getdate.y
192
lib/getdate.y
@@ -85,6 +85,14 @@
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
||||
#define HOUR(x) ((x) * 60)
|
||||
|
||||
/* An integer value, and the number of digits in its textual
|
||||
representation. */
|
||||
typedef struct
|
||||
{
|
||||
int value;
|
||||
int digits;
|
||||
} textint;
|
||||
|
||||
/* An entry in the lexical lookup table. */
|
||||
typedef struct
|
||||
@@ -98,7 +106,7 @@ typedef struct
|
||||
enum { MERam, MERpm, MER24 };
|
||||
|
||||
/* Information passed to and from the parser. */
|
||||
struct parser_control
|
||||
typedef struct
|
||||
{
|
||||
/* The input string remaining to be parsed. */
|
||||
const char *input;
|
||||
@@ -119,7 +127,7 @@ struct parser_control
|
||||
int meridian;
|
||||
|
||||
/* Gregorian year, month, day, hour, minutes, and seconds. */
|
||||
int year;
|
||||
textint year;
|
||||
int month;
|
||||
int day;
|
||||
int hour;
|
||||
@@ -144,12 +152,11 @@ struct parser_control
|
||||
|
||||
/* Table of local time zone abbrevations, terminated by a null entry. */
|
||||
table local_time_zone_table[3];
|
||||
};
|
||||
} parser_control;
|
||||
|
||||
#define PC (* (struct parser_control *) parm)
|
||||
#define PC (* (parser_control *) parm)
|
||||
#define YYLEX_PARAM parm
|
||||
#define YYPARSE_PARAM parm
|
||||
#define YYSTYPE int
|
||||
|
||||
static int yyerror ();
|
||||
static int yylex ();
|
||||
@@ -161,10 +168,21 @@ static int yylex ();
|
||||
|
||||
/* This grammar has 13 shift/reduce conflicts. */
|
||||
%expect 13
|
||||
|
||||
%union
|
||||
{
|
||||
int intval;
|
||||
textint textintval;
|
||||
}
|
||||
|
||||
%token tAGO tDAY tDAY_UNIT tDAYZONE tDST tHOUR_UNIT tID
|
||||
%token tLOCAL_ZONE tMERIDIAN tMINUTE_UNIT tMONTH tMONTH_UNIT
|
||||
%token tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE
|
||||
%token tAGO tDST
|
||||
|
||||
%token <intval> tDAY tDAY_UNIT tDAYZONE tHOUR_UNIT tLOCAL_ZONE tMERIDIAN
|
||||
%token <intval> tMINUTE_UNIT tMONTH tMONTH_UNIT tSEC_UNIT tYEAR_UNIT tZONE
|
||||
|
||||
%token <textintval> tSNUMBER tUNUMBER
|
||||
|
||||
%type <intval> o_merid
|
||||
|
||||
%%
|
||||
|
||||
@@ -192,41 +210,41 @@ item:
|
||||
time:
|
||||
tUNUMBER tMERIDIAN
|
||||
{
|
||||
PC.hour = $1;
|
||||
PC.hour = $1.value;
|
||||
PC.minutes = 0;
|
||||
PC.seconds = 0;
|
||||
PC.meridian = $2;
|
||||
}
|
||||
| tUNUMBER ':' tUNUMBER o_merid
|
||||
{
|
||||
PC.hour = $1;
|
||||
PC.minutes = $3;
|
||||
PC.hour = $1.value;
|
||||
PC.minutes = $3.value;
|
||||
PC.seconds = 0;
|
||||
PC.meridian = $4;
|
||||
}
|
||||
| tUNUMBER ':' tUNUMBER tSNUMBER
|
||||
{
|
||||
PC.hour = $1;
|
||||
PC.minutes = $3;
|
||||
PC.hour = $1.value;
|
||||
PC.minutes = $3.value;
|
||||
PC.meridian = MER24;
|
||||
PC.zones_seen++;
|
||||
PC.time_zone = $4 % 100 + ($4 / 100) * 60;
|
||||
PC.time_zone = $4.value % 100 + ($4.value / 100) * 60;
|
||||
}
|
||||
| tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid
|
||||
{
|
||||
PC.hour = $1;
|
||||
PC.minutes = $3;
|
||||
PC.seconds = $5;
|
||||
PC.hour = $1.value;
|
||||
PC.minutes = $3.value;
|
||||
PC.seconds = $5.value;
|
||||
PC.meridian = $6;
|
||||
}
|
||||
| tUNUMBER ':' tUNUMBER ':' tUNUMBER tSNUMBER
|
||||
{
|
||||
PC.hour = $1;
|
||||
PC.minutes = $3;
|
||||
PC.seconds = $5;
|
||||
PC.hour = $1.value;
|
||||
PC.minutes = $3.value;
|
||||
PC.seconds = $5.value;
|
||||
PC.meridian = MER24;
|
||||
PC.zones_seen++;
|
||||
PC.time_zone = $6 % 100 + ($6 / 100) * 60;
|
||||
PC.time_zone = $6.value % 100 + ($6.value / 100) * 60;
|
||||
}
|
||||
;
|
||||
|
||||
@@ -259,7 +277,7 @@ day:
|
||||
}
|
||||
| tUNUMBER tDAY
|
||||
{
|
||||
PC.day_ordinal = $1;
|
||||
PC.day_ordinal = $1.value;
|
||||
PC.day_number = $2;
|
||||
}
|
||||
;
|
||||
@@ -267,25 +285,26 @@ day:
|
||||
date:
|
||||
tUNUMBER '/' tUNUMBER
|
||||
{
|
||||
PC.month = $1;
|
||||
PC.day = $3;
|
||||
PC.month = $1.value;
|
||||
PC.day = $3.value;
|
||||
}
|
||||
| tUNUMBER '/' tUNUMBER '/' tUNUMBER
|
||||
{
|
||||
/* Interpret as YYYY/MM/DD if 1000 <= $1, otherwise as MM/DD/YY.
|
||||
/* Interpret as YYYY/MM/DD if the first value has 4 or more digits,
|
||||
otherwise as MM/DD/YY.
|
||||
The goal in recognizing YYYY/MM/DD is solely to support legacy
|
||||
machine-generated dates like those in an RCS log listing. If
|
||||
you want portability, use the ISO 8601 format. */
|
||||
if (1000 <= $1)
|
||||
if (4 <= $1.digits)
|
||||
{
|
||||
PC.year = $1;
|
||||
PC.month = $3;
|
||||
PC.day = $5;
|
||||
PC.month = $3.value;
|
||||
PC.day = $5.value;
|
||||
}
|
||||
else
|
||||
{
|
||||
PC.month = $1;
|
||||
PC.day = $3;
|
||||
PC.month = $1.value;
|
||||
PC.day = $3.value;
|
||||
PC.year = $5;
|
||||
}
|
||||
}
|
||||
@@ -293,36 +312,37 @@ date:
|
||||
{
|
||||
/* ISO 8601 format. YYYY-MM-DD. */
|
||||
PC.year = $1;
|
||||
PC.month = -$2;
|
||||
PC.day = -$3;
|
||||
PC.month = -$2.value;
|
||||
PC.day = -$3.value;
|
||||
}
|
||||
| tUNUMBER tMONTH tSNUMBER
|
||||
{
|
||||
/* e.g. 17-JUN-1992. */
|
||||
PC.day = $1;
|
||||
PC.day = $1.value;
|
||||
PC.month = $2;
|
||||
PC.year = -$3;
|
||||
PC.year.value = -$3.value;
|
||||
PC.year.digits = $3.digits;
|
||||
}
|
||||
| tMONTH tUNUMBER
|
||||
{
|
||||
PC.month = $1;
|
||||
PC.day = $2;
|
||||
PC.day = $2.value;
|
||||
}
|
||||
| tMONTH tUNUMBER ',' tUNUMBER
|
||||
{
|
||||
PC.month = $1;
|
||||
PC.day = $2;
|
||||
PC.day = $2.value;
|
||||
PC.year = $4;
|
||||
}
|
||||
| tUNUMBER tMONTH
|
||||
{
|
||||
PC.day = $1.value;
|
||||
PC.month = $2;
|
||||
PC.day = $1;
|
||||
}
|
||||
| tUNUMBER tMONTH tUNUMBER
|
||||
{
|
||||
PC.day = $1.value;
|
||||
PC.month = $2;
|
||||
PC.day = $1;
|
||||
PC.year = $3;
|
||||
}
|
||||
;
|
||||
@@ -342,39 +362,39 @@ rel:
|
||||
|
||||
relunit:
|
||||
tUNUMBER tYEAR_UNIT
|
||||
{ PC.rel_year += $1 * $2; }
|
||||
{ PC.rel_year += $1.value * $2; }
|
||||
| tSNUMBER tYEAR_UNIT
|
||||
{ PC.rel_year += $1 * $2; }
|
||||
{ PC.rel_year += $1.value * $2; }
|
||||
| tYEAR_UNIT
|
||||
{ PC.rel_year += $1; }
|
||||
| tUNUMBER tMONTH_UNIT
|
||||
{ PC.rel_month += $1 * $2; }
|
||||
{ PC.rel_month += $1.value * $2; }
|
||||
| tSNUMBER tMONTH_UNIT
|
||||
{ PC.rel_month += $1 * $2; }
|
||||
{ PC.rel_month += $1.value * $2; }
|
||||
| tMONTH_UNIT
|
||||
{ PC.rel_month += $1; }
|
||||
| tUNUMBER tDAY_UNIT
|
||||
{ PC.rel_day += $1 * $2; }
|
||||
{ PC.rel_day += $1.value * $2; }
|
||||
| tSNUMBER tDAY_UNIT
|
||||
{ PC.rel_day += $1 * $2; }
|
||||
{ PC.rel_day += $1.value * $2; }
|
||||
| tDAY_UNIT
|
||||
{ PC.rel_day += $1; }
|
||||
{ PC.rel_day += $1 }
|
||||
| tUNUMBER tHOUR_UNIT
|
||||
{ PC.rel_hour += $1 * $2; }
|
||||
{ PC.rel_hour += $1.value * $2; }
|
||||
| tSNUMBER tHOUR_UNIT
|
||||
{ PC.rel_hour += $1 * $2; }
|
||||
{ PC.rel_hour += $1.value * $2; }
|
||||
| tHOUR_UNIT
|
||||
{ PC.rel_hour += $1; }
|
||||
{ PC.rel_hour += $1 }
|
||||
| tUNUMBER tMINUTE_UNIT
|
||||
{ PC.rel_minutes += $1 * $2; }
|
||||
{ PC.rel_minutes += $1.value * $2; }
|
||||
| tSNUMBER tMINUTE_UNIT
|
||||
{ PC.rel_minutes += $1 * $2; }
|
||||
{ PC.rel_minutes += $1.value * $2; }
|
||||
| tMINUTE_UNIT
|
||||
{ PC.rel_minutes += $1; }
|
||||
{ PC.rel_minutes += $1 }
|
||||
| tUNUMBER tSEC_UNIT
|
||||
{ PC.rel_seconds += $1 * $2; }
|
||||
{ PC.rel_seconds += $1.value * $2; }
|
||||
| tSNUMBER tSEC_UNIT
|
||||
{ PC.rel_seconds += $1 * $2; }
|
||||
{ PC.rel_seconds += $1.value * $2; }
|
||||
| tSEC_UNIT
|
||||
{ PC.rel_seconds += $1; }
|
||||
;
|
||||
@@ -382,29 +402,31 @@ relunit:
|
||||
number:
|
||||
tUNUMBER
|
||||
{
|
||||
if (PC.dates_seen && ! PC.rels_seen && (PC.times_seen || 100 <= $1))
|
||||
if (PC.dates_seen
|
||||
&& ! PC.rels_seen && (PC.times_seen || 2 < $1.digits))
|
||||
PC.year = $1;
|
||||
else
|
||||
{
|
||||
if (10000 < $1)
|
||||
if (4 < $1.digits)
|
||||
{
|
||||
PC.dates_seen++;
|
||||
PC.day = $1 % 100;
|
||||
PC.month = ($1 / 100) % 100;
|
||||
PC.year = $1 / 10000;
|
||||
PC.day = $1.value % 100;
|
||||
PC.month = ($1.value / 100) % 100;
|
||||
PC.year.value = $1.value / 10000;
|
||||
PC.year.digits = $1.digits - 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
PC.times_seen++;
|
||||
if ($1 < 100)
|
||||
if ($1.digits <= 2)
|
||||
{
|
||||
PC.hour = $1;
|
||||
PC.hour = $1.value;
|
||||
PC.minutes = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
PC.hour = $1 / 100;
|
||||
PC.minutes = $1 % 100;
|
||||
PC.hour = $1.value / 100;
|
||||
PC.minutes = $1.value % 100;
|
||||
}
|
||||
PC.seconds = 0;
|
||||
PC.meridian = MER24;
|
||||
@@ -632,23 +654,23 @@ to_hour (int hours, int meridian)
|
||||
}
|
||||
|
||||
static int
|
||||
to_year (int year)
|
||||
to_year (textint textyear)
|
||||
{
|
||||
int year = textyear.value;
|
||||
|
||||
if (year < 0)
|
||||
year = -year;
|
||||
|
||||
/* XPG4 suggests that years 00-68 map to 2000-2068, and
|
||||
years 69-99 map to 1969-1999. */
|
||||
if (year < 69)
|
||||
year += 2000;
|
||||
else if (year < 100)
|
||||
year += 1900;
|
||||
if (textyear.digits == 2)
|
||||
year += year < 69 ? 2000 : 1900;
|
||||
|
||||
return year;
|
||||
}
|
||||
|
||||
static table const *
|
||||
lookup_zone (struct parser_control const *pc, char const *name)
|
||||
lookup_zone (parser_control const *pc, char const *name)
|
||||
{
|
||||
table const *tp;
|
||||
|
||||
@@ -692,7 +714,7 @@ tm_diff (struct tm const *a, struct tm const *b)
|
||||
#endif /* ! HAVE_TM_GMTOFF */
|
||||
|
||||
static table const *
|
||||
lookup_word (struct parser_control const *pc, char *word)
|
||||
lookup_word (parser_control const *pc, char *word)
|
||||
{
|
||||
char *p;
|
||||
char *q;
|
||||
@@ -761,7 +783,7 @@ lookup_word (struct parser_control const *pc, char *word)
|
||||
}
|
||||
|
||||
static int
|
||||
yylex (YYSTYPE *lvalp, struct parser_control *pc)
|
||||
yylex (YYSTYPE *lvalp, parser_control *pc)
|
||||
{
|
||||
unsigned char c;
|
||||
int count;
|
||||
@@ -773,21 +795,30 @@ yylex (YYSTYPE *lvalp, struct parser_control *pc)
|
||||
|
||||
if (ISDIGIT (c) || c == '-' || c == '+')
|
||||
{
|
||||
char const *p;
|
||||
int sign;
|
||||
int value;
|
||||
if (c == '-' || c == '+')
|
||||
{
|
||||
sign = c == '-' ? -1 : 1;
|
||||
if (! ISDIGIT (*++pc->input))
|
||||
c = *++pc->input;
|
||||
if (! ISDIGIT (c))
|
||||
/* skip the '-' sign */
|
||||
continue;
|
||||
}
|
||||
else
|
||||
sign = 0;
|
||||
for (*lvalp = 0; ISDIGIT (c = *pc->input++);)
|
||||
*lvalp = 10 * *lvalp + (c - '0');
|
||||
pc->input--;
|
||||
if (sign < 0)
|
||||
*lvalp = - *lvalp;
|
||||
p = pc->input;
|
||||
value = 0;
|
||||
do
|
||||
{
|
||||
value = 10 * value + c - '0';
|
||||
c = *++p;
|
||||
}
|
||||
while (ISDIGIT (c));
|
||||
lvalp->textintval.value = sign < 0 ? -value : value;
|
||||
lvalp->textintval.digits = p - pc->input;
|
||||
pc->input = p;
|
||||
return sign ? tSNUMBER : tUNUMBER;
|
||||
}
|
||||
|
||||
@@ -808,8 +839,8 @@ yylex (YYSTYPE *lvalp, struct parser_control *pc)
|
||||
*p = '\0';
|
||||
tp = lookup_word (pc, buff);
|
||||
if (! tp)
|
||||
return tID;
|
||||
*lvalp = tp->value;
|
||||
return '?';
|
||||
lvalp->intval = tp->value;
|
||||
return tp->type;
|
||||
}
|
||||
|
||||
@@ -848,13 +879,14 @@ get_date (const char *p, const time_t *now)
|
||||
struct tm *tmp = localtime (&Start);
|
||||
struct tm tm;
|
||||
struct tm tm0;
|
||||
struct parser_control pc;
|
||||
parser_control pc;
|
||||
|
||||
if (! tmp)
|
||||
return -1;
|
||||
|
||||
pc.input = p;
|
||||
pc.year = tmp->tm_year + TM_YEAR_BASE;
|
||||
pc.year.value = tmp->tm_year + TM_YEAR_BASE;
|
||||
pc.year.digits = 4;
|
||||
pc.month = tmp->tm_mon + 1;
|
||||
pc.day = tmp->tm_mday;
|
||||
pc.hour = tmp->tm_hour;
|
||||
|
||||
33
lib/getopt.c
33
lib/getopt.c
@@ -2,7 +2,7 @@
|
||||
NOTE: The canonical source of this file is maintained with the GNU
|
||||
C Library. Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
@@ -515,6 +515,13 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
int *longind;
|
||||
int long_only;
|
||||
{
|
||||
int print_errors = opterr;
|
||||
if (optstring[0] == ':')
|
||||
print_errors = 0;
|
||||
|
||||
if (argc < 1)
|
||||
return -1;
|
||||
|
||||
optarg = NULL;
|
||||
|
||||
if (optind == 0 || !__getopt_initialized)
|
||||
@@ -671,7 +678,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
|
||||
if (ambig && !exact)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
@@ -692,7 +699,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = nameend + 1;
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
@@ -718,7 +725,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = argv[optind++];
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
@@ -745,7 +752,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
if (!long_only || argv[optind][1] == '-'
|
||||
|| my_index (optstring, *nextchar) == NULL)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
if (argv[optind][1] == '-')
|
||||
/* --option */
|
||||
@@ -775,7 +782,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
|
||||
if (temp == NULL || c == ':')
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
if (posixly_correct)
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
@@ -809,7 +816,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
else if (optind == argc)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
fprintf (stderr, _("%s: option requires an argument -- %c\n"),
|
||||
@@ -858,7 +865,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
if (ambig && !exact)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
@@ -876,7 +883,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = nameend + 1;
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr, _("\
|
||||
%s: option `-W %s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
@@ -891,7 +898,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = argv[optind++];
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
@@ -938,12 +945,12 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
else if (optind == argc)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
fprintf (stderr,
|
||||
_("%s: option requires an argument -- %c\n"),
|
||||
argv[0], c);
|
||||
_("%s: option requires an argument -- %c\n"),
|
||||
argv[0], c);
|
||||
}
|
||||
optopt = c;
|
||||
if (optstring[0] == ':')
|
||||
|
||||
@@ -2,34 +2,48 @@
|
||||
|
||||
#ifndef HAVE_GETPAGESIZE
|
||||
|
||||
#ifdef VMS
|
||||
#define getpagesize() 512
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef _SC_PAGESIZE
|
||||
#define getpagesize() sysconf(_SC_PAGESIZE)
|
||||
#else
|
||||
#if !defined getpagesize && defined _SC_PAGESIZE
|
||||
# if !(defined VMS && __VMS_VER < 70000000)
|
||||
# define getpagesize() sysconf (_SC_PAGESIZE)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
#if !defined getpagesize && defined VMS
|
||||
# ifdef __ALPHA
|
||||
# define getpagesize() 8192
|
||||
# else
|
||||
# define getpagesize() 512
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef EXEC_PAGESIZE
|
||||
#define getpagesize() EXEC_PAGESIZE
|
||||
#else
|
||||
#ifdef NBPG
|
||||
#define getpagesize() NBPG * CLSIZE
|
||||
#ifndef CLSIZE
|
||||
#define CLSIZE 1
|
||||
#endif /* no CLSIZE */
|
||||
#else /* no NBPG */
|
||||
#ifdef NBPC
|
||||
#define getpagesize() NBPC
|
||||
#endif /* NBPC */
|
||||
#endif /* no NBPG */
|
||||
#endif /* no EXEC_PAGESIZE */
|
||||
#endif /* no _SC_PAGESIZE */
|
||||
/* 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
|
||||
# define getpagesize() EXEC_PAGESIZE
|
||||
# else
|
||||
# ifdef NBPG
|
||||
# ifndef CLSIZE
|
||||
# define CLSIZE 1
|
||||
# endif
|
||||
# define getpagesize() (NBPG * CLSIZE)
|
||||
# else
|
||||
# ifdef NBPC
|
||||
# define getpagesize() NBPC
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* not HAVE_GETPAGESIZE */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* hash - hashing table processing.
|
||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Written by Jim Meyering, 1992.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -35,9 +35,16 @@ typedef enum {false = 0, true = 1} bool;
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef HAVE_DECL_FREE
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_FREE
|
||||
void free ();
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_MALLOC
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_MALLOC
|
||||
char *malloc ();
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* human.c -- print human readable file size
|
||||
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
|
||||
@@ -44,6 +44,9 @@
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_GETENV
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_GETENV
|
||||
char *getenv ();
|
||||
#endif
|
||||
|
||||
|
||||
228
lib/localcharset.c
Normal file
228
lib/localcharset.c
Normal file
@@ -0,0 +1,228 @@
|
||||
/* 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
|
||||
|
||||
#ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
#endif
|
||||
|
||||
/* 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;
|
||||
const char *dir = LIBDIR;
|
||||
const char *base = "charset.alias";
|
||||
char *file_name;
|
||||
|
||||
/* Concatenate dir and base into freshly allocated file_name. */
|
||||
{
|
||||
size_t dir_len = strlen (dir);
|
||||
size_t base_len = strlen (base);
|
||||
int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
|
||||
file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
|
||||
if (file_name != NULL)
|
||||
{
|
||||
memcpy (file_name, dir, dir_len);
|
||||
if (add_slash)
|
||||
file_name[dir_len] = DIRECTORY_SEPARATOR;
|
||||
memcpy (file_name + dir_len + add_slash, base, base_len + 1);
|
||||
}
|
||||
}
|
||||
|
||||
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 = malloc (res_size + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
res_size += l1 + 1 + l2 + 1;
|
||||
res_ptr = realloc (res_ptr, res_size + 1);
|
||||
}
|
||||
if (res_ptr == NULL)
|
||||
{
|
||||
/* Out of memory. */
|
||||
res_size = 0;
|
||||
break;
|
||||
}
|
||||
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[0] == '\0')
|
||||
{
|
||||
locale = getenv ("LC_ALL");
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
{
|
||||
locale = getenv ("LC_CTYPE");
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
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 && codeset[0] != '\0')
|
||||
{
|
||||
/* 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 @@
|
||||
/* Utility to accept --help and --version options as unobtrusively as possible.
|
||||
Copyright (C) 1993, 1994, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1994, 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
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include "closeout.h"
|
||||
#include "long-options.h"
|
||||
#include "version-etc.h"
|
||||
|
||||
@@ -71,8 +70,6 @@ parse_long_options (int argc,
|
||||
|
||||
case 'v':
|
||||
version_etc (stdout, command_name, package, version, authors);
|
||||
close_stdout (); /* FIXME: output failure exit status
|
||||
should be settable via an arg. */
|
||||
exit (0);
|
||||
|
||||
default:
|
||||
|
||||
@@ -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;
|
||||
|
||||
112
lib/mountlist.c
112
lib/mountlist.c
@@ -1,5 +1,5 @@
|
||||
/* mountlist.c -- return a list of mounted filesystems
|
||||
Copyright (C) 1991, 1992, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1992, 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
|
||||
@@ -85,6 +85,11 @@ extern int errno;
|
||||
# include <sys/fs_types.h>
|
||||
#endif
|
||||
|
||||
#ifdef MOUNTED_NEXT_DEV /* BeOS. */
|
||||
# include <fs_info.h>
|
||||
# include <dirent.h>
|
||||
#endif
|
||||
|
||||
#ifdef MOUNTED_FREAD /* SVR2. */
|
||||
# include <mnttab.h>
|
||||
#endif
|
||||
@@ -413,6 +418,111 @@ read_filesystem_list (int need_fs_type)
|
||||
}
|
||||
#endif /* MOUNTED_GETMNT. */
|
||||
|
||||
#if defined (MOUNTED_NEXT_DEV) /* BeOS */
|
||||
{
|
||||
/* The next_dev() and fs_stat_dev() system calls give the list of
|
||||
all filesystems, including the information returned by statvfs()
|
||||
(fs type, total blocks, free blocks etc.), but without the mount
|
||||
point. But on BeOS all filesystems except / are mounted in the
|
||||
rootfs, directly under /.
|
||||
The directory name of the mount point is often, but not always,
|
||||
identical to the volume name of the device.
|
||||
We therefore get the list of subdirectories of /, and the list
|
||||
of all filesystems, and match the two lists. */
|
||||
|
||||
DIR *dirp;
|
||||
struct rootdir_entry
|
||||
{
|
||||
char *name;
|
||||
dev_t dev;
|
||||
ino_t ino;
|
||||
struct rootdir_entry *next;
|
||||
};
|
||||
struct rootdir_entry *rootdir_list;
|
||||
struct rootdir_entry **rootdir_tail;
|
||||
int32 pos;
|
||||
dev_t dev;
|
||||
fs_info fi;
|
||||
|
||||
/* All volumes are mounted in the rootfs, directly under /. */
|
||||
rootdir_list = NULL;
|
||||
rootdir_tail = &rootdir_list;
|
||||
dirp = opendir ("/");
|
||||
if (dirp)
|
||||
{
|
||||
struct dirent *d;
|
||||
|
||||
while ((d = readdir (dirp)) != NULL)
|
||||
{
|
||||
char *name;
|
||||
struct stat statbuf;
|
||||
|
||||
if (strcmp (d->d_name, "..") == 0)
|
||||
continue;
|
||||
|
||||
if (strcmp (d->d_name, ".") == 0)
|
||||
name = xstrdup ("/");
|
||||
else
|
||||
{
|
||||
name = xmalloc (1 + strlen (d->d_name) + 1);
|
||||
name[0] = '/';
|
||||
strcpy (name + 1, d->d_name);
|
||||
}
|
||||
|
||||
if (stat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode))
|
||||
{
|
||||
struct rootdir_entry *re;
|
||||
|
||||
re = (struct rootdir_entry *) xmalloc (sizeof (struct rootdir_entry));
|
||||
re->name = name;
|
||||
re->dev = statbuf.st_dev;
|
||||
re->ino = statbuf.st_ino;
|
||||
|
||||
/* Add to the linked list. */
|
||||
*rootdir_tail = re;
|
||||
rootdir_tail = &re->next;
|
||||
}
|
||||
else
|
||||
free (name);
|
||||
}
|
||||
closedir (dirp);
|
||||
}
|
||||
*rootdir_tail = NULL;
|
||||
|
||||
for (pos = 0; (dev = next_dev (&pos)) >= 0; )
|
||||
if (fs_stat_dev (dev, &fi) >= 0)
|
||||
{
|
||||
/* Note: fi.dev == dev. */
|
||||
struct rootdir_entry *re;
|
||||
|
||||
for (re = rootdir_list; re; re = re->next)
|
||||
if (re->dev == fi.dev && re->ino == fi.root)
|
||||
break;
|
||||
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me->me_devname = xstrdup (fi.device_name[0] != '\0' ? fi.device_name : fi.fsh_name);
|
||||
me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name);
|
||||
me->me_type = xstrdup (fi.fsh_name);
|
||||
me->me_dev = fi.dev;
|
||||
me->me_dummy = 0;
|
||||
me->me_remote = (fi.flags & B_FS_IS_SHARED) != 0;
|
||||
|
||||
/* Add to the linked list. */
|
||||
*mtail = me;
|
||||
mtail = &me->me_next;
|
||||
}
|
||||
*mtail = NULL;
|
||||
|
||||
while (rootdir_list != NULL)
|
||||
{
|
||||
struct rootdir_entry *re = rootdir_list;
|
||||
rootdir_list = re->next;
|
||||
free (re->name);
|
||||
free (re);
|
||||
}
|
||||
}
|
||||
#endif /* MOUNTED_NEXT_DEV */
|
||||
|
||||
#if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */
|
||||
{
|
||||
int numsys, counter, bufsize;
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
/* written by Jim Meyering */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Undefine nanosleep here so any prototype is not redefined to be a
|
||||
prototype for rpl_nanosleep. (they'd conflict e.g., on alpha-dec-osf3.2) */
|
||||
#undef nanosleep
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
@@ -58,8 +63,8 @@ my_usleep (const struct timespec *ts_delay)
|
||||
/* FIXME: comment */
|
||||
|
||||
int
|
||||
nanosleep (const struct timespec *requested_delay,
|
||||
struct timespec *remaining_delay)
|
||||
rpl_nanosleep (const struct timespec *requested_delay,
|
||||
struct timespec *remaining_delay)
|
||||
{
|
||||
#ifdef SA_NOCLDSTOP
|
||||
struct sigaction oldact, newact;
|
||||
|
||||
@@ -17,17 +17,7 @@
|
||||
#if ! defined NANOSLEEP_H
|
||||
# define NANOSLEEP_H
|
||||
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
/* You must include config.h before including this file. */
|
||||
|
||||
# include <sys/types.h>
|
||||
# if TIME_WITH_SYS_TIME
|
||||
@@ -50,8 +40,10 @@ struct timespec
|
||||
};
|
||||
# endif
|
||||
|
||||
int
|
||||
nanosleep PARAMS ((const struct timespec *requested_delay,
|
||||
struct timespec *remaining_delay));
|
||||
# if ! HAVE_DECL_NANOSLEEP
|
||||
/* Don't specify a prototype here. Some systems (e.g., OSF) declare
|
||||
nanosleep with a conflicting one (const-less first parameter). */
|
||||
int nanosleep ();
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
146
lib/obstack.c
146
lib/obstack.c
@@ -1,5 +1,5 @@
|
||||
/* obstack.c - subroutines used implicitly by object stack macros
|
||||
Copyright (C) 1988,89,90,91,92,93,94,96 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-1994,96,97,98,99 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
@@ -19,6 +19,10 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "obstack.h"
|
||||
|
||||
/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
|
||||
@@ -37,60 +41,62 @@
|
||||
|
||||
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
|
||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
||||
#include <gnu-versions.h>
|
||||
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
||||
#define ELIDE_CODE
|
||||
#endif
|
||||
# include <gnu-versions.h>
|
||||
# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
||||
# define ELIDE_CODE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define POINTER void *
|
||||
#else
|
||||
#define POINTER char *
|
||||
#endif
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# define POINTER void *
|
||||
# else
|
||||
# define POINTER char *
|
||||
# endif
|
||||
|
||||
/* Determine default alignment. */
|
||||
struct fooalign {char x; double d;};
|
||||
#define DEFAULT_ALIGNMENT \
|
||||
# define DEFAULT_ALIGNMENT \
|
||||
((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
|
||||
/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
|
||||
But in fact it might be less smart and round addresses to as much as
|
||||
DEFAULT_ROUNDING. So we prepare for it to do that. */
|
||||
union fooround {long x; double d;};
|
||||
#define DEFAULT_ROUNDING (sizeof (union fooround))
|
||||
# define DEFAULT_ROUNDING (sizeof (union fooround))
|
||||
|
||||
/* When we copy a long block of data, this is the unit to do it with.
|
||||
On some machines, copying successive ints does not work;
|
||||
in such a case, redefine COPYING_UNIT to `long' (if that works)
|
||||
or `char' as a last resort. */
|
||||
#ifndef COPYING_UNIT
|
||||
#define COPYING_UNIT int
|
||||
#endif
|
||||
# ifndef COPYING_UNIT
|
||||
# define COPYING_UNIT int
|
||||
# endif
|
||||
|
||||
|
||||
/* The functions allocating more room by calling `obstack_chunk_alloc'
|
||||
jump to the handler pointed to by `obstack_alloc_failed_handler'.
|
||||
This variable by default points to the internal function
|
||||
This can be set to a user defined function which should either
|
||||
abort gracefully or use longjump - but shouldn't return. This
|
||||
variable by default points to the internal function
|
||||
`print_and_abort'. */
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined (__STDC__) && __STDC__
|
||||
static void print_and_abort (void);
|
||||
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
|
||||
#else
|
||||
# else
|
||||
static void print_and_abort ();
|
||||
void (*obstack_alloc_failed_handler) () = print_and_abort;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* Exit value used when `print_and_abort' is used. */
|
||||
#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifndef EXIT_FAILURE
|
||||
#define EXIT_FAILURE 1
|
||||
#endif
|
||||
# if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
# ifndef EXIT_FAILURE
|
||||
# define EXIT_FAILURE 1
|
||||
# endif
|
||||
int obstack_exit_failure = EXIT_FAILURE;
|
||||
|
||||
/* The non-GNU-C macros copy the obstack into this global variable
|
||||
@@ -104,33 +110,33 @@ struct obstack *_obstack;
|
||||
For free, do not use ?:, since some compilers, like the MIPS compilers,
|
||||
do not allow (expr) ? void : void. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define CALL_CHUNKFUN(h, size) \
|
||||
# if defined (__STDC__) && __STDC__
|
||||
# define CALL_CHUNKFUN(h, size) \
|
||||
(((h) -> use_extra_arg) \
|
||||
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
||||
: (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
|
||||
|
||||
#define CALL_FREEFUN(h, old_chunk) \
|
||||
# define CALL_FREEFUN(h, old_chunk) \
|
||||
do { \
|
||||
if ((h) -> use_extra_arg) \
|
||||
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
||||
else \
|
||||
(*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
|
||||
} while (0)
|
||||
#else
|
||||
#define CALL_CHUNKFUN(h, size) \
|
||||
# else
|
||||
# define CALL_CHUNKFUN(h, size) \
|
||||
(((h) -> use_extra_arg) \
|
||||
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
||||
: (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
|
||||
|
||||
#define CALL_FREEFUN(h, old_chunk) \
|
||||
# define CALL_FREEFUN(h, old_chunk) \
|
||||
do { \
|
||||
if ((h) -> use_extra_arg) \
|
||||
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
||||
else \
|
||||
(*(void (*) ()) (h)->freefun) ((old_chunk)); \
|
||||
} while (0)
|
||||
#endif
|
||||
# endif
|
||||
|
||||
|
||||
/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
|
||||
@@ -138,27 +144,26 @@ struct obstack *_obstack;
|
||||
CHUNKFUN is the function to use to allocate chunks,
|
||||
and FREEFUN the function to free them.
|
||||
|
||||
Return nonzero if successful, zero if out of memory.
|
||||
To recover from an out of memory error,
|
||||
free up some memory, then call this again. */
|
||||
Return nonzero if successful, calls obstack_alloc_failed_handler if
|
||||
allocation fails. */
|
||||
|
||||
int
|
||||
_obstack_begin (h, size, alignment, chunkfun, freefun)
|
||||
struct obstack *h;
|
||||
int size;
|
||||
int alignment;
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined (__STDC__) && __STDC__
|
||||
POINTER (*chunkfun) (long);
|
||||
void (*freefun) (void *);
|
||||
#else
|
||||
# else
|
||||
POINTER (*chunkfun) ();
|
||||
void (*freefun) ();
|
||||
#endif
|
||||
# endif
|
||||
{
|
||||
register struct _obstack_chunk *chunk; /* points to new chunk */
|
||||
|
||||
if (alignment == 0)
|
||||
alignment = DEFAULT_ALIGNMENT;
|
||||
alignment = (int) DEFAULT_ALIGNMENT;
|
||||
if (size == 0)
|
||||
/* Default size is what GNU malloc can fit in a 4096-byte block. */
|
||||
{
|
||||
@@ -176,13 +181,13 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
|
||||
size = 4096 - extra;
|
||||
}
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined (__STDC__) && __STDC__
|
||||
h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
|
||||
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
||||
#else
|
||||
# else
|
||||
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
|
||||
h->freefun = freefun;
|
||||
#endif
|
||||
# endif
|
||||
h->chunk_size = size;
|
||||
h->alignment_mask = alignment - 1;
|
||||
h->use_extra_arg = 0;
|
||||
@@ -205,19 +210,19 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
|
||||
struct obstack *h;
|
||||
int size;
|
||||
int alignment;
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined (__STDC__) && __STDC__
|
||||
POINTER (*chunkfun) (POINTER, long);
|
||||
void (*freefun) (POINTER, POINTER);
|
||||
#else
|
||||
# else
|
||||
POINTER (*chunkfun) ();
|
||||
void (*freefun) ();
|
||||
#endif
|
||||
# endif
|
||||
POINTER arg;
|
||||
{
|
||||
register struct _obstack_chunk *chunk; /* points to new chunk */
|
||||
|
||||
if (alignment == 0)
|
||||
alignment = DEFAULT_ALIGNMENT;
|
||||
alignment = (int) DEFAULT_ALIGNMENT;
|
||||
if (size == 0)
|
||||
/* Default size is what GNU malloc can fit in a 4096-byte block. */
|
||||
{
|
||||
@@ -235,13 +240,13 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
|
||||
size = 4096 - extra;
|
||||
}
|
||||
|
||||
#if defined(__STDC__) && __STDC__
|
||||
# if defined(__STDC__) && __STDC__
|
||||
h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
|
||||
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
||||
#else
|
||||
# else
|
||||
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
|
||||
h->freefun = freefun;
|
||||
#endif
|
||||
# endif
|
||||
h->chunk_size = size;
|
||||
h->alignment_mask = alignment - 1;
|
||||
h->extra_arg = arg;
|
||||
@@ -274,9 +279,9 @@ _obstack_newchunk (h, length)
|
||||
register struct _obstack_chunk *old_chunk = h->chunk;
|
||||
register struct _obstack_chunk *new_chunk;
|
||||
register long new_size;
|
||||
register int obj_size = h->next_free - h->object_base;
|
||||
register int i;
|
||||
int already;
|
||||
register long obj_size = h->next_free - h->object_base;
|
||||
register long i;
|
||||
long already;
|
||||
|
||||
/* Compute size for new chunk. */
|
||||
new_size = (obj_size + length) + (obj_size >> 3) + 100;
|
||||
@@ -330,11 +335,11 @@ _obstack_newchunk (h, length)
|
||||
This is here for debugging.
|
||||
If you use it in a program, you are probably losing. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined (__STDC__) && __STDC__
|
||||
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
|
||||
obstack.h because it is just for debugging. */
|
||||
int _obstack_allocated_p (struct obstack *h, POINTER obj);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
int
|
||||
_obstack_allocated_p (h, obj)
|
||||
@@ -359,7 +364,7 @@ _obstack_allocated_p (h, obj)
|
||||
/* Free objects in obstack H, including OBJ and everything allocate
|
||||
more recently than OBJ. If OBJ is zero, free everything in H. */
|
||||
|
||||
#undef obstack_free
|
||||
# undef obstack_free
|
||||
|
||||
/* This function has two names with identical definitions.
|
||||
This is the first one, called from non-ANSI code. */
|
||||
@@ -445,32 +450,37 @@ _obstack_memory_used (h)
|
||||
}
|
||||
|
||||
/* Define the error handler. */
|
||||
#ifndef _
|
||||
# ifdef HAVE_LIBINTL_H
|
||||
# include <libintl.h>
|
||||
# ifndef _
|
||||
# define _(Str) gettext (Str)
|
||||
# ifndef _
|
||||
# ifdef HAVE_LIBINTL_H
|
||||
# include <libintl.h>
|
||||
# ifndef _
|
||||
# define _(Str) gettext (Str)
|
||||
# endif
|
||||
# else
|
||||
# define _(Str) (Str)
|
||||
# endif
|
||||
# else
|
||||
# define _(Str) (Str)
|
||||
# endif
|
||||
#endif
|
||||
# if defined _LIBC && defined USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fputs(s, f) _IO_fputs (s, f)
|
||||
# endif
|
||||
|
||||
static void
|
||||
print_and_abort ()
|
||||
{
|
||||
fputs (_("memory exhausted\n"), stderr);
|
||||
fputs (_("memory exhausted"), stderr);
|
||||
fputc ('\n', stderr);
|
||||
exit (obstack_exit_failure);
|
||||
}
|
||||
|
||||
#if 0
|
||||
# if 0
|
||||
/* These are now turned off because the applications do not use it
|
||||
and it uses bcopy via obstack_grow, which causes trouble on sysV. */
|
||||
|
||||
/* Now define the functional versions of the obstack macros.
|
||||
Define them to simply use the corresponding macros to do the job. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined (__STDC__) && __STDC__
|
||||
/* These function definitions do not work with non-ANSI preprocessors;
|
||||
they won't pass through the macro names in parentheses. */
|
||||
|
||||
@@ -581,8 +591,8 @@ POINTER (obstack_copy0) (obstack, pointer, length)
|
||||
return obstack_copy0 (obstack, pointer, length);
|
||||
}
|
||||
|
||||
#endif /* __STDC__ */
|
||||
# endif /* __STDC__ */
|
||||
|
||||
#endif /* 0 */
|
||||
# endif /* 0 */
|
||||
|
||||
#endif /* !ELIDE_CODE */
|
||||
|
||||
179
lib/obstack.h
179
lib/obstack.h
@@ -1,5 +1,5 @@
|
||||
/* obstack.h - object stack macros
|
||||
Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988,89,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc.
|
||||
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
@@ -118,45 +118,39 @@ extern "C" {
|
||||
may ignore the byte-within-word field of the pointer. */
|
||||
|
||||
#ifndef __PTR_TO_INT
|
||||
#define __PTR_TO_INT(P) ((P) - (char *) 0)
|
||||
# define __PTR_TO_INT(P) ((P) - (char *) 0)
|
||||
#endif
|
||||
|
||||
#ifndef __INT_TO_PTR
|
||||
#define __INT_TO_PTR(P) ((P) + (char *) 0)
|
||||
# define __INT_TO_PTR(P) ((P) + (char *) 0)
|
||||
#endif
|
||||
|
||||
/* We need the type of the resulting object. In ANSI C it is ptrdiff_t
|
||||
but in traditional C it is usually long. If we are in ANSI C and
|
||||
don't already have ptrdiff_t get it. */
|
||||
/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
|
||||
defined, as with GNU C, use that; that way we don't pollute the
|
||||
namespace with <stddef.h>'s symbols. Otherwise, if <stddef.h> is
|
||||
available, include it and use ptrdiff_t. In traditional C, long is
|
||||
the best that we can do. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__ && ! defined (offsetof)
|
||||
#if defined (__GNUC__) && defined (IN_GCC)
|
||||
/* On Next machine, the system's stddef.h screws up if included
|
||||
after we have defined just ptrdiff_t, so include all of stddef.h.
|
||||
Otherwise, define just ptrdiff_t, which is all we need. */
|
||||
#ifndef __NeXT__
|
||||
#define __need_ptrdiff_t
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define PTR_INT_TYPE ptrdiff_t
|
||||
#ifdef __PTRDIFF_TYPE__
|
||||
# define PTR_INT_TYPE __PTRDIFF_TYPE__
|
||||
#else
|
||||
#define PTR_INT_TYPE long
|
||||
# ifdef HAVE_STDDEF_H
|
||||
# include <stddef.h>
|
||||
# define PTR_INT_TYPE ptrdiff_t
|
||||
# else
|
||||
# define PTR_INT_TYPE long
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (_LIBC) || defined (HAVE_STRING_H)
|
||||
#include <string.h>
|
||||
#define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
|
||||
#if defined _LIBC || defined HAVE_STRING_H
|
||||
# include <string.h>
|
||||
# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
|
||||
#else
|
||||
#ifdef memcpy
|
||||
#define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
|
||||
#else
|
||||
#define _obstack_memcpy(To, From, N) bcopy ((From), (To), (N))
|
||||
#endif
|
||||
# ifdef memcpy
|
||||
# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
|
||||
# else
|
||||
# define _obstack_memcpy(To, From, N) bcopy ((From), (To), (N))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
struct _obstack_chunk /* Lives at front of each chunk. */
|
||||
@@ -175,7 +169,7 @@ struct obstack /* control current object in current chunk */
|
||||
char *chunk_limit; /* address of char after current chunk */
|
||||
PTR_INT_TYPE temp; /* Temporary for some macros. */
|
||||
int alignment_mask; /* Mask of alignment for each object. */
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#if defined __STDC__ && __STDC__
|
||||
/* These prototypes vary based on `use_extra_arg', and we use
|
||||
casts to the prototypeless function type in all assignments,
|
||||
but having prototypes here quiets -Wstrict-prototypes. */
|
||||
@@ -199,7 +193,7 @@ struct obstack /* control current object in current chunk */
|
||||
|
||||
/* Declare the external functions we use; they are in obstack.c. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#if defined __STDC__ && __STDC__
|
||||
extern void _obstack_newchunk (struct obstack *, int);
|
||||
extern void _obstack_free (struct obstack *, void *);
|
||||
extern int _obstack_begin (struct obstack *, int, int,
|
||||
@@ -216,7 +210,7 @@ extern int _obstack_begin_1 ();
|
||||
extern int _obstack_memory_used ();
|
||||
#endif
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#if defined __STDC__ && __STDC__
|
||||
|
||||
/* Do the function-declarations after the structs
|
||||
but before defining the macros. */
|
||||
@@ -262,9 +256,10 @@ int obstack_memory_used (struct obstack *obstack);
|
||||
so we do not declare them. */
|
||||
|
||||
/* Error handler called when `obstack_chunk_alloc' failed to allocate
|
||||
more memory. This can be set to a user defined function. The
|
||||
default action is to print a message and abort. */
|
||||
#if defined (__STDC__) && __STDC__
|
||||
more memory. This can be set to a user defined function which
|
||||
should either abort gracefully or use longjump - but shouldn't
|
||||
return. The default action is to print a message and abort. */
|
||||
#if defined __STDC__ && __STDC__
|
||||
extern void (*obstack_alloc_failed_handler) (void);
|
||||
#else
|
||||
extern void (*obstack_alloc_failed_handler) ();
|
||||
@@ -293,53 +288,53 @@ extern int obstack_exit_failure;
|
||||
|
||||
/* To prevent prototype warnings provide complete argument list in
|
||||
standard C version. */
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#if defined __STDC__ && __STDC__
|
||||
|
||||
#define obstack_init(h) \
|
||||
# define obstack_init(h) \
|
||||
_obstack_begin ((h), 0, 0, \
|
||||
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
|
||||
|
||||
#define obstack_begin(h, size) \
|
||||
# define obstack_begin(h, size) \
|
||||
_obstack_begin ((h), (size), 0, \
|
||||
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
|
||||
|
||||
#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
|
||||
# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
|
||||
_obstack_begin ((h), (size), (alignment), \
|
||||
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
|
||||
|
||||
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
|
||||
# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
|
||||
_obstack_begin_1 ((h), (size), (alignment), \
|
||||
(void *(*) (void *, long)) (chunkfun), \
|
||||
(void (*) (void *, void *)) (freefun), (arg))
|
||||
|
||||
#define obstack_chunkfun(h, newchunkfun) \
|
||||
# define obstack_chunkfun(h, newchunkfun) \
|
||||
((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
|
||||
|
||||
#define obstack_freefun(h, newfreefun) \
|
||||
# define obstack_freefun(h, newfreefun) \
|
||||
((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
|
||||
|
||||
#else
|
||||
|
||||
#define obstack_init(h) \
|
||||
# define obstack_init(h) \
|
||||
_obstack_begin ((h), 0, 0, \
|
||||
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
|
||||
|
||||
#define obstack_begin(h, size) \
|
||||
# define obstack_begin(h, size) \
|
||||
_obstack_begin ((h), (size), 0, \
|
||||
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
|
||||
|
||||
#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
|
||||
# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
|
||||
_obstack_begin ((h), (size), (alignment), \
|
||||
(void *(*) ()) (chunkfun), (void (*) ()) (freefun))
|
||||
|
||||
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
|
||||
# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
|
||||
_obstack_begin_1 ((h), (size), (alignment), \
|
||||
(void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
|
||||
|
||||
#define obstack_chunkfun(h, newchunkfun) \
|
||||
# define obstack_chunkfun(h, newchunkfun) \
|
||||
((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
|
||||
|
||||
#define obstack_freefun(h, newfreefun) \
|
||||
# define obstack_freefun(h, newfreefun) \
|
||||
((h) -> freefun = (void (*)()) (newfreefun))
|
||||
|
||||
#endif
|
||||
@@ -350,30 +345,30 @@ extern int obstack_exit_failure;
|
||||
|
||||
#define obstack_memory_used(h) _obstack_memory_used (h)
|
||||
|
||||
#if defined (__GNUC__) && defined (__STDC__) && __STDC__
|
||||
#if defined __GNUC__ && defined __STDC__ && __STDC__
|
||||
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
|
||||
does not implement __extension__. But that compiler doesn't define
|
||||
__GNUC_MINOR__. */
|
||||
#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
|
||||
#define __extension__
|
||||
#endif
|
||||
# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
|
||||
# define __extension__
|
||||
# endif
|
||||
|
||||
/* For GNU C, if not -traditional,
|
||||
we can define these macros to compute all args only once
|
||||
without using a global variable.
|
||||
Also, we can avoid using the `temp' slot, to make faster code. */
|
||||
|
||||
#define obstack_object_size(OBSTACK) \
|
||||
# define obstack_object_size(OBSTACK) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
(unsigned) (__o->next_free - __o->object_base); })
|
||||
|
||||
#define obstack_room(OBSTACK) \
|
||||
# define obstack_room(OBSTACK) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
(unsigned) (__o->chunk_limit - __o->next_free); })
|
||||
|
||||
#define obstack_make_room(OBSTACK,length) \
|
||||
# define obstack_make_room(OBSTACK,length) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
int __len = (length); \
|
||||
@@ -381,12 +376,12 @@ __extension__ \
|
||||
_obstack_newchunk (__o, __len); \
|
||||
(void) 0; })
|
||||
|
||||
#define obstack_empty_p(OBSTACK) \
|
||||
# define obstack_empty_p(OBSTACK) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
(__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
|
||||
|
||||
#define obstack_grow(OBSTACK,where,length) \
|
||||
# define obstack_grow(OBSTACK,where,length) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
int __len = (length); \
|
||||
@@ -396,7 +391,7 @@ __extension__ \
|
||||
__o->next_free += __len; \
|
||||
(void) 0; })
|
||||
|
||||
#define obstack_grow0(OBSTACK,where,length) \
|
||||
# define obstack_grow0(OBSTACK,where,length) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
int __len = (length); \
|
||||
@@ -407,7 +402,7 @@ __extension__ \
|
||||
*(__o->next_free)++ = 0; \
|
||||
(void) 0; })
|
||||
|
||||
#define obstack_1grow(OBSTACK,datum) \
|
||||
# define obstack_1grow(OBSTACK,datum) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
if (__o->next_free + 1 > __o->chunk_limit) \
|
||||
@@ -419,7 +414,7 @@ __extension__ \
|
||||
and that the data added so far to the current object
|
||||
shares that much alignment. */
|
||||
|
||||
#define obstack_ptr_grow(OBSTACK,datum) \
|
||||
# define obstack_ptr_grow(OBSTACK,datum) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
|
||||
@@ -427,7 +422,7 @@ __extension__ \
|
||||
*((void **)__o->next_free)++ = ((void *)datum); \
|
||||
(void) 0; })
|
||||
|
||||
#define obstack_int_grow(OBSTACK,datum) \
|
||||
# define obstack_int_grow(OBSTACK,datum) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
if (__o->next_free + sizeof (int) > __o->chunk_limit) \
|
||||
@@ -435,10 +430,10 @@ __extension__ \
|
||||
*((int *)__o->next_free)++ = ((int)datum); \
|
||||
(void) 0; })
|
||||
|
||||
#define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
|
||||
#define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
|
||||
# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
|
||||
# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
|
||||
|
||||
#define obstack_blank(OBSTACK,length) \
|
||||
# define obstack_blank(OBSTACK,length) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
int __len = (length); \
|
||||
@@ -447,19 +442,19 @@ __extension__ \
|
||||
__o->next_free += __len; \
|
||||
(void) 0; })
|
||||
|
||||
#define obstack_alloc(OBSTACK,length) \
|
||||
# define obstack_alloc(OBSTACK,length) \
|
||||
__extension__ \
|
||||
({ struct obstack *__h = (OBSTACK); \
|
||||
obstack_blank (__h, (length)); \
|
||||
obstack_finish (__h); })
|
||||
|
||||
#define obstack_copy(OBSTACK,where,length) \
|
||||
# define obstack_copy(OBSTACK,where,length) \
|
||||
__extension__ \
|
||||
({ struct obstack *__h = (OBSTACK); \
|
||||
obstack_grow (__h, (where), (length)); \
|
||||
obstack_finish (__h); })
|
||||
|
||||
#define obstack_copy0(OBSTACK,where,length) \
|
||||
# define obstack_copy0(OBSTACK,where,length) \
|
||||
__extension__ \
|
||||
({ struct obstack *__h = (OBSTACK); \
|
||||
obstack_grow0 (__h, (where), (length)); \
|
||||
@@ -467,7 +462,7 @@ __extension__ \
|
||||
|
||||
/* The local variable is named __o1 to avoid a name conflict
|
||||
when obstack_blank is called. */
|
||||
#define obstack_finish(OBSTACK) \
|
||||
# define obstack_finish(OBSTACK) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o1 = (OBSTACK); \
|
||||
void *value; \
|
||||
@@ -483,23 +478,23 @@ __extension__ \
|
||||
__o1->object_base = __o1->next_free; \
|
||||
value; })
|
||||
|
||||
#define obstack_free(OBSTACK, OBJ) \
|
||||
# define obstack_free(OBSTACK, OBJ) \
|
||||
__extension__ \
|
||||
({ struct obstack *__o = (OBSTACK); \
|
||||
void *__obj = (OBJ); \
|
||||
if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
|
||||
__o->next_free = __o->object_base = __obj; \
|
||||
__o->next_free = __o->object_base = (char *)__obj; \
|
||||
else (obstack_free) (__o, __obj); })
|
||||
|
||||
#else /* not __GNUC__ or not __STDC__ */
|
||||
|
||||
#define obstack_object_size(h) \
|
||||
# define obstack_object_size(h) \
|
||||
(unsigned) ((h)->next_free - (h)->object_base)
|
||||
|
||||
#define obstack_room(h) \
|
||||
# define obstack_room(h) \
|
||||
(unsigned) ((h)->chunk_limit - (h)->next_free)
|
||||
|
||||
#define obstack_empty_p(h) \
|
||||
# define obstack_empty_p(h) \
|
||||
((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0)
|
||||
|
||||
/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
|
||||
@@ -508,19 +503,19 @@ __extension__ \
|
||||
Casting the third operand to void was tried before,
|
||||
but some compilers won't accept it. */
|
||||
|
||||
#define obstack_make_room(h,length) \
|
||||
# define obstack_make_room(h,length) \
|
||||
( (h)->temp = (length), \
|
||||
(((h)->next_free + (h)->temp > (h)->chunk_limit) \
|
||||
? (_obstack_newchunk ((h), (h)->temp), 0) : 0))
|
||||
|
||||
#define obstack_grow(h,where,length) \
|
||||
# define obstack_grow(h,where,length) \
|
||||
( (h)->temp = (length), \
|
||||
(((h)->next_free + (h)->temp > (h)->chunk_limit) \
|
||||
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
|
||||
_obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp), \
|
||||
(h)->next_free += (h)->temp)
|
||||
|
||||
#define obstack_grow0(h,where,length) \
|
||||
# define obstack_grow0(h,where,length) \
|
||||
( (h)->temp = (length), \
|
||||
(((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
|
||||
? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
|
||||
@@ -528,40 +523,40 @@ __extension__ \
|
||||
(h)->next_free += (h)->temp, \
|
||||
*((h)->next_free)++ = 0)
|
||||
|
||||
#define obstack_1grow(h,datum) \
|
||||
# define obstack_1grow(h,datum) \
|
||||
( (((h)->next_free + 1 > (h)->chunk_limit) \
|
||||
? (_obstack_newchunk ((h), 1), 0) : 0), \
|
||||
(*((h)->next_free)++ = (datum)))
|
||||
|
||||
#define obstack_ptr_grow(h,datum) \
|
||||
# define obstack_ptr_grow(h,datum) \
|
||||
( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
|
||||
? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
|
||||
(*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum)))
|
||||
|
||||
#define obstack_int_grow(h,datum) \
|
||||
# define obstack_int_grow(h,datum) \
|
||||
( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
|
||||
? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
|
||||
(*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum)))
|
||||
|
||||
#define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
|
||||
#define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
|
||||
# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
|
||||
# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
|
||||
|
||||
#define obstack_blank(h,length) \
|
||||
# define obstack_blank(h,length) \
|
||||
( (h)->temp = (length), \
|
||||
(((h)->chunk_limit - (h)->next_free < (h)->temp) \
|
||||
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
|
||||
((h)->next_free += (h)->temp))
|
||||
|
||||
#define obstack_alloc(h,length) \
|
||||
# define obstack_alloc(h,length) \
|
||||
(obstack_blank ((h), (length)), obstack_finish ((h)))
|
||||
|
||||
#define obstack_copy(h,where,length) \
|
||||
# define obstack_copy(h,where,length) \
|
||||
(obstack_grow ((h), (where), (length)), obstack_finish ((h)))
|
||||
|
||||
#define obstack_copy0(h,where,length) \
|
||||
# define obstack_copy0(h,where,length) \
|
||||
(obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
|
||||
|
||||
#define obstack_finish(h) \
|
||||
# define obstack_finish(h) \
|
||||
( ((h)->next_free == (h)->object_base \
|
||||
? (((h)->maybe_empty_object = 1), 0) \
|
||||
: 0), \
|
||||
@@ -575,21 +570,21 @@ __extension__ \
|
||||
(h)->object_base = (h)->next_free, \
|
||||
__INT_TO_PTR ((h)->temp))
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define obstack_free(h,obj) \
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define obstack_free(h,obj) \
|
||||
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
|
||||
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
|
||||
? (int) ((h)->next_free = (h)->object_base \
|
||||
= (h)->temp + (char *) (h)->chunk) \
|
||||
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
|
||||
#else
|
||||
#define obstack_free(h,obj) \
|
||||
# else
|
||||
# define obstack_free(h,obj) \
|
||||
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
|
||||
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
|
||||
? (int) ((h)->next_free = (h)->object_base \
|
||||
= (h)->temp + (char *) (h)->chunk) \
|
||||
: (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#endif /* not __GNUC__ or not __STDC__ */
|
||||
|
||||
|
||||
@@ -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). */
|
||||
|
||||
@@ -26,12 +26,6 @@
|
||||
#include <xalloc.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
|
||||
# define ISASCII(c) 1
|
||||
#else
|
||||
# define ISASCII(c) isascii (c)
|
||||
#endif
|
||||
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
@@ -50,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
|
||||
@@ -73,6 +73,17 @@
|
||||
|
||||
#define INT_BITS (sizeof (int) * CHAR_BIT)
|
||||
|
||||
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
|
||||
/* Undefine to protect against the definition in wctype.h of solaris2.6. */
|
||||
# undef ISASCII
|
||||
# define ISASCII(c) 1
|
||||
#else
|
||||
# define ISASCII(c) isascii (c)
|
||||
#endif
|
||||
/* Undefine to protect against the definition in wctype.h of solaris2.6. */
|
||||
#undef ISPRINT
|
||||
#define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||
|
||||
struct quoting_options
|
||||
{
|
||||
/* Basic quoting style. */
|
||||
@@ -261,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>
|
||||
@@ -57,7 +58,7 @@ extract_trimmed_name (const STRUCT_UTMP *ut)
|
||||
the number of entries, and return zero. If there is any error,
|
||||
return non-zero and don't modify the parameters. */
|
||||
|
||||
#if HAVE_UTMPNAME
|
||||
#ifdef UTMP_NAME_FUNCTION
|
||||
|
||||
int
|
||||
read_utmp (const char *filename, int *n_entries, STRUCT_UTMP **utmp_buf)
|
||||
@@ -129,4 +130,4 @@ read_utmp (const char *filename, int *n_entries, STRUCT_UTMP **utmp_buf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* HAVE_UTMPNAME */
|
||||
#endif
|
||||
|
||||
@@ -37,26 +37,33 @@
|
||||
# define SET_UTMP_ENT setutxent
|
||||
# define GET_UTMP_ENT getutxent
|
||||
# define END_UTMP_ENT endutxent
|
||||
# define UTMP_NAME_FUNCTION utmpxname
|
||||
# ifdef HAVE_UTMPXNAME
|
||||
# define UTMP_NAME_FUNCTION utmpxname
|
||||
# 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
|
||||
# define GET_UTMP_ENT getutent
|
||||
# define END_UTMP_ENT endutent
|
||||
# define UTMP_NAME_FUNCTION utmpname
|
||||
# ifdef HAVE_UTMPNAME
|
||||
# define UTMP_NAME_FUNCTION utmpname
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Accessor macro for the member named ut_user or ut_name. */
|
||||
# ifdef HAVE_UTMPX_H
|
||||
|
||||
# if HAVE_STRUCT_UTMPX_UT_USER
|
||||
# define UT_USER(Utmp) Utmp->ut_user
|
||||
# define UT_USER(Utmp) ((Utmp)->ut_user)
|
||||
# endif
|
||||
# if HAVE_STRUCT_UTMPX_UT_NAME
|
||||
# undef UT_USER
|
||||
# define UT_USER(Utmp) Utmp->ut_name
|
||||
# define UT_USER(Utmp) ((Utmp)->ut_name)
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
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:/
|
||||
}
|
||||
666
lib/regex.c
666
lib/regex.c
@@ -2,7 +2,7 @@
|
||||
version 0.12.
|
||||
(Implements POSIX draft P1003.2/D11.2, except for some of the
|
||||
internationalization features.)
|
||||
Copyright (C) 1993, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993-1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
@@ -78,7 +78,12 @@
|
||||
__re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
|
||||
# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
|
||||
|
||||
#define btowc __btowc
|
||||
# define btowc __btowc
|
||||
|
||||
/* We are also using some library internals. */
|
||||
# include <locale/localeinfo.h>
|
||||
# include <locale/elem-hash.h>
|
||||
# include <langinfo.h>
|
||||
#endif
|
||||
|
||||
/* This is for other GNU distributions with internationalized messages. */
|
||||
@@ -164,47 +169,15 @@ char *realloc ();
|
||||
# define SWITCH_ENUM_CAST(x) (x)
|
||||
# endif
|
||||
|
||||
/* How many characters in the character set. */
|
||||
# define CHAR_SET_SIZE 256
|
||||
|
||||
# ifdef SYNTAX_TABLE
|
||||
|
||||
extern char *re_syntax_table;
|
||||
|
||||
# else /* not SYNTAX_TABLE */
|
||||
|
||||
static char re_syntax_table[CHAR_SET_SIZE];
|
||||
|
||||
static void
|
||||
init_syntax_once ()
|
||||
{
|
||||
register int c;
|
||||
static int done = 0;
|
||||
|
||||
if (done)
|
||||
return;
|
||||
|
||||
bzero (re_syntax_table, sizeof re_syntax_table);
|
||||
|
||||
for (c = 'a'; c <= 'z'; c++)
|
||||
re_syntax_table[c] = Sword;
|
||||
|
||||
for (c = 'A'; c <= 'Z'; c++)
|
||||
re_syntax_table[c] = Sword;
|
||||
|
||||
for (c = '0'; c <= '9'; c++)
|
||||
re_syntax_table[c] = Sword;
|
||||
|
||||
re_syntax_table['_'] = Sword;
|
||||
|
||||
done = 1;
|
||||
}
|
||||
|
||||
# endif /* not SYNTAX_TABLE */
|
||||
|
||||
# define SYNTAX(c) re_syntax_table[c]
|
||||
|
||||
#endif /* not emacs */
|
||||
|
||||
#if defined _LIBC || HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#ifndef MB_LEN_MAX
|
||||
# define MB_LEN_MAX 1
|
||||
#endif
|
||||
|
||||
/* Get the interface, including the syntax bits. */
|
||||
#include <regex.h>
|
||||
@@ -276,6 +249,43 @@ init_syntax_once ()
|
||||
# define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
|
||||
#endif
|
||||
|
||||
#ifndef emacs
|
||||
/* How many characters in the character set. */
|
||||
# define CHAR_SET_SIZE 256
|
||||
|
||||
# ifdef SYNTAX_TABLE
|
||||
|
||||
extern char *re_syntax_table;
|
||||
|
||||
# else /* not SYNTAX_TABLE */
|
||||
|
||||
static char re_syntax_table[CHAR_SET_SIZE];
|
||||
|
||||
static void
|
||||
init_syntax_once ()
|
||||
{
|
||||
register int c;
|
||||
static int done = 0;
|
||||
|
||||
if (done)
|
||||
return;
|
||||
bzero (re_syntax_table, sizeof re_syntax_table);
|
||||
|
||||
for (c = 0; c < CHAR_SET_SIZE; ++c)
|
||||
if (ISALNUM (c))
|
||||
re_syntax_table[c] = Sword;
|
||||
|
||||
re_syntax_table['_'] = Sword;
|
||||
|
||||
done = 1;
|
||||
}
|
||||
|
||||
# endif /* not SYNTAX_TABLE */
|
||||
|
||||
# define SYNTAX(c) re_syntax_table[(unsigned char) (c)]
|
||||
|
||||
#endif /* emacs */
|
||||
|
||||
/* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we
|
||||
use `alloca' instead of `malloc'. This is because using malloc in
|
||||
re_search* or re_match* could cause memory leaks when C-g is used in
|
||||
@@ -615,7 +625,7 @@ extract_number_and_incr (destination, source)
|
||||
/* It is useful to test things that ``must'' be true when debugging. */
|
||||
# include <assert.h>
|
||||
|
||||
static int debug = 0;
|
||||
static int debug;
|
||||
|
||||
# define DEBUG_STATEMENT(e) e
|
||||
# define DEBUG_PRINT1(x) if (debug) printf (x)
|
||||
@@ -681,7 +691,11 @@ print_partial_compiled_pattern (start, end)
|
||||
/* Loop over pattern commands. */
|
||||
while (p < pend)
|
||||
{
|
||||
printf ("%d:\t", p - start);
|
||||
#ifdef _LIBC
|
||||
printf ("%t:\t", p - start);
|
||||
#else
|
||||
printf ("%ld:\t", (long int) (p - start));
|
||||
#endif
|
||||
|
||||
switch ((re_opcode_t) *p++)
|
||||
{
|
||||
@@ -771,17 +785,30 @@ print_partial_compiled_pattern (start, end)
|
||||
|
||||
case on_failure_jump:
|
||||
extract_number_and_incr (&mcnt, &p);
|
||||
printf ("/on_failure_jump to %d", p + mcnt - start);
|
||||
#ifdef _LIBC
|
||||
printf ("/on_failure_jump to %t", p + mcnt - start);
|
||||
#else
|
||||
printf ("/on_failure_jump to %ld", (long int) (p + mcnt - start));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case on_failure_keep_string_jump:
|
||||
extract_number_and_incr (&mcnt, &p);
|
||||
printf ("/on_failure_keep_string_jump to %d", p + mcnt - start);
|
||||
#ifdef _LIBC
|
||||
printf ("/on_failure_keep_string_jump to %t", p + mcnt - start);
|
||||
#else
|
||||
printf ("/on_failure_keep_string_jump to %ld",
|
||||
(long int) (p + mcnt - start));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case dummy_failure_jump:
|
||||
extract_number_and_incr (&mcnt, &p);
|
||||
printf ("/dummy_failure_jump to %d", p + mcnt - start);
|
||||
#ifdef _LIBC
|
||||
printf ("/dummy_failure_jump to %t", p + mcnt - start);
|
||||
#else
|
||||
printf ("/dummy_failure_jump to %ld", (long int) (p + mcnt - start));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case push_dummy_failure:
|
||||
@@ -790,29 +817,50 @@ print_partial_compiled_pattern (start, end)
|
||||
|
||||
case maybe_pop_jump:
|
||||
extract_number_and_incr (&mcnt, &p);
|
||||
printf ("/maybe_pop_jump to %d", p + mcnt - start);
|
||||
#ifdef _LIBC
|
||||
printf ("/maybe_pop_jump to %t", p + mcnt - start);
|
||||
#else
|
||||
printf ("/maybe_pop_jump to %ld", (long int) (p + mcnt - start));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case pop_failure_jump:
|
||||
extract_number_and_incr (&mcnt, &p);
|
||||
printf ("/pop_failure_jump to %d", p + mcnt - start);
|
||||
#ifdef _LIBC
|
||||
printf ("/pop_failure_jump to %t", p + mcnt - start);
|
||||
#else
|
||||
printf ("/pop_failure_jump to %ld", (long int) (p + mcnt - start));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case jump_past_alt:
|
||||
extract_number_and_incr (&mcnt, &p);
|
||||
printf ("/jump_past_alt to %d", p + mcnt - start);
|
||||
#ifdef _LIBC
|
||||
printf ("/jump_past_alt to %t", p + mcnt - start);
|
||||
#else
|
||||
printf ("/jump_past_alt to %ld", (long int) (p + mcnt - start));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case jump:
|
||||
extract_number_and_incr (&mcnt, &p);
|
||||
printf ("/jump to %d", p + mcnt - start);
|
||||
#ifdef _LIBC
|
||||
printf ("/jump to %t", p + mcnt - start);
|
||||
#else
|
||||
printf ("/jump to %ld", (long int) (p + mcnt - start));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case succeed_n:
|
||||
extract_number_and_incr (&mcnt, &p);
|
||||
p1 = p + mcnt;
|
||||
extract_number_and_incr (&mcnt2, &p);
|
||||
printf ("/succeed_n to %d, %d times", p1 - start, mcnt2);
|
||||
#ifdef _LIBC
|
||||
printf ("/succeed_n to %t, %d times", p1 - start, mcnt2);
|
||||
#else
|
||||
printf ("/succeed_n to %ld, %d times",
|
||||
(long int) (p1 - start), mcnt2);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case jump_n:
|
||||
@@ -826,7 +874,12 @@ print_partial_compiled_pattern (start, end)
|
||||
extract_number_and_incr (&mcnt, &p);
|
||||
p1 = p + mcnt;
|
||||
extract_number_and_incr (&mcnt2, &p);
|
||||
printf ("/set_number_at location %d to %d", p1 - start, mcnt2);
|
||||
#ifdef _LIBC
|
||||
printf ("/set_number_at location %t to %d", p1 - start, mcnt2);
|
||||
#else
|
||||
printf ("/set_number_at location %ld to %d",
|
||||
(long int) (p1 - start), mcnt2);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case wordbound:
|
||||
@@ -893,7 +946,11 @@ print_partial_compiled_pattern (start, end)
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
printf ("%d:\tend of pattern.\n", p - start);
|
||||
#ifdef _LIBC
|
||||
printf ("%t:\tend of pattern.\n", p - start);
|
||||
#else
|
||||
printf ("%ld:\tend of pattern.\n", (long int) (p - start));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -913,7 +970,11 @@ print_compiled_pattern (bufp)
|
||||
print_fastmap (bufp->fastmap);
|
||||
}
|
||||
|
||||
printf ("re_nsub: %d\t", bufp->re_nsub);
|
||||
#ifdef _LIBC
|
||||
printf ("re_nsub: %Zd\t", bufp->re_nsub);
|
||||
#else
|
||||
printf ("re_nsub: %ld\t", (long int) bufp->re_nsub);
|
||||
#endif
|
||||
printf ("regs_alloc: %d\t", bufp->regs_allocated);
|
||||
printf ("can_be_null: %d\t", bufp->can_be_null);
|
||||
printf ("newline_anchor: %d\n", bufp->newline_anchor);
|
||||
@@ -1013,25 +1074,79 @@ weak_alias (__re_set_syntax, re_set_syntax)
|
||||
POSIX doesn't require that we do anything for REG_NOERROR,
|
||||
but why not be nice? */
|
||||
|
||||
static const char *re_error_msgid[] =
|
||||
static const char re_error_msgid[] =
|
||||
{
|
||||
gettext_noop ("Success"), /* REG_NOERROR */
|
||||
gettext_noop ("No match"), /* REG_NOMATCH */
|
||||
gettext_noop ("Invalid regular expression"), /* REG_BADPAT */
|
||||
gettext_noop ("Invalid collation character"), /* REG_ECOLLATE */
|
||||
gettext_noop ("Invalid character class name"), /* REG_ECTYPE */
|
||||
gettext_noop ("Trailing backslash"), /* REG_EESCAPE */
|
||||
gettext_noop ("Invalid back reference"), /* REG_ESUBREG */
|
||||
gettext_noop ("Unmatched [ or [^"), /* REG_EBRACK */
|
||||
gettext_noop ("Unmatched ( or \\("), /* REG_EPAREN */
|
||||
gettext_noop ("Unmatched \\{"), /* REG_EBRACE */
|
||||
gettext_noop ("Invalid content of \\{\\}"), /* REG_BADBR */
|
||||
gettext_noop ("Invalid range end"), /* REG_ERANGE */
|
||||
gettext_noop ("Memory exhausted"), /* REG_ESPACE */
|
||||
gettext_noop ("Invalid preceding regular expression"), /* REG_BADRPT */
|
||||
gettext_noop ("Premature end of regular expression"), /* REG_EEND */
|
||||
gettext_noop ("Regular expression too big"), /* REG_ESIZE */
|
||||
gettext_noop ("Unmatched ) or \\)"), /* REG_ERPAREN */
|
||||
#define REG_NOERROR_IDX 0
|
||||
gettext_noop ("Success") /* REG_NOERROR */
|
||||
"\0"
|
||||
#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success")
|
||||
gettext_noop ("No match") /* REG_NOMATCH */
|
||||
"\0"
|
||||
#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match")
|
||||
gettext_noop ("Invalid regular expression") /* REG_BADPAT */
|
||||
"\0"
|
||||
#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression")
|
||||
gettext_noop ("Invalid collation character") /* REG_ECOLLATE */
|
||||
"\0"
|
||||
#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character")
|
||||
gettext_noop ("Invalid character class name") /* REG_ECTYPE */
|
||||
"\0"
|
||||
#define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name")
|
||||
gettext_noop ("Trailing backslash") /* REG_EESCAPE */
|
||||
"\0"
|
||||
#define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash")
|
||||
gettext_noop ("Invalid back reference") /* REG_ESUBREG */
|
||||
"\0"
|
||||
#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
|
||||
gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
|
||||
"\0"
|
||||
#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
|
||||
gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
|
||||
"\0"
|
||||
#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
|
||||
gettext_noop ("Unmatched \\{") /* REG_EBRACE */
|
||||
"\0"
|
||||
#define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{")
|
||||
gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */
|
||||
"\0"
|
||||
#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}")
|
||||
gettext_noop ("Invalid range end") /* REG_ERANGE */
|
||||
"\0"
|
||||
#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end")
|
||||
gettext_noop ("Memory exhausted") /* REG_ESPACE */
|
||||
"\0"
|
||||
#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted")
|
||||
gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */
|
||||
"\0"
|
||||
#define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression")
|
||||
gettext_noop ("Premature end of regular expression") /* REG_EEND */
|
||||
"\0"
|
||||
#define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression")
|
||||
gettext_noop ("Regular expression too big") /* REG_ESIZE */
|
||||
"\0"
|
||||
#define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big")
|
||||
gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
|
||||
};
|
||||
|
||||
static const size_t re_error_msgid_idx[] =
|
||||
{
|
||||
REG_NOERROR_IDX,
|
||||
REG_NOMATCH_IDX,
|
||||
REG_BADPAT_IDX,
|
||||
REG_ECOLLATE_IDX,
|
||||
REG_ECTYPE_IDX,
|
||||
REG_EESCAPE_IDX,
|
||||
REG_ESUBREG_IDX,
|
||||
REG_EBRACK_IDX,
|
||||
REG_EPAREN_IDX,
|
||||
REG_EBRACE_IDX,
|
||||
REG_BADBR_IDX,
|
||||
REG_ERANGE_IDX,
|
||||
REG_ESPACE_IDX,
|
||||
REG_BADRPT_IDX,
|
||||
REG_EEND_IDX,
|
||||
REG_ESIZE_IDX,
|
||||
REG_ERPAREN_IDX
|
||||
};
|
||||
|
||||
/* Avoiding alloca during matching, to placate r_alloc. */
|
||||
@@ -1514,7 +1629,8 @@ static boolean at_begline_loc_p _RE_ARGS ((const char *pattern, const char *p,
|
||||
reg_syntax_t syntax));
|
||||
static boolean at_endline_loc_p _RE_ARGS ((const char *p, const char *pend,
|
||||
reg_syntax_t syntax));
|
||||
static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr,
|
||||
static reg_errcode_t compile_range _RE_ARGS ((unsigned int range_start,
|
||||
const char **p_ptr,
|
||||
const char *pend,
|
||||
char *translate,
|
||||
reg_syntax_t syntax,
|
||||
@@ -1712,7 +1828,7 @@ typedef struct
|
||||
{ if (p != pend) \
|
||||
{ \
|
||||
PATFETCH (c); \
|
||||
while (ISDIGIT (c)) \
|
||||
while ('0' <= c && c <= '9') \
|
||||
{ \
|
||||
if (num < 0) \
|
||||
num = 0; \
|
||||
@@ -2118,6 +2234,7 @@ regex_compile (pattern, size, syntax, bufp)
|
||||
case '[':
|
||||
{
|
||||
boolean had_char_class = false;
|
||||
unsigned int range_start = 0xffffffff;
|
||||
|
||||
if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
|
||||
|
||||
@@ -2161,6 +2278,7 @@ regex_compile (pattern, size, syntax, bufp)
|
||||
|
||||
PATFETCH (c1);
|
||||
SET_LIST_BIT (c1);
|
||||
range_start = c1;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2185,8 +2303,10 @@ regex_compile (pattern, size, syntax, bufp)
|
||||
&& *p != ']')
|
||||
{
|
||||
reg_errcode_t ret
|
||||
= compile_range (&p, pend, translate, syntax, b);
|
||||
= compile_range (range_start, &p, pend, translate,
|
||||
syntax, b);
|
||||
if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
|
||||
range_start = 0xffffffff;
|
||||
}
|
||||
|
||||
else if (p[0] == '-' && p[1] != ']')
|
||||
@@ -2196,8 +2316,9 @@ regex_compile (pattern, size, syntax, bufp)
|
||||
/* Move past the `-'. */
|
||||
PATFETCH (c1);
|
||||
|
||||
ret = compile_range (&p, pend, translate, syntax, b);
|
||||
ret = compile_range (c, &p, pend, translate, syntax, b);
|
||||
if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
|
||||
range_start = 0xffffffff;
|
||||
}
|
||||
|
||||
/* See if we're at the beginning of a possible character
|
||||
@@ -2320,13 +2441,289 @@ regex_compile (pattern, size, syntax, bufp)
|
||||
PATUNFETCH;
|
||||
SET_LIST_BIT ('[');
|
||||
SET_LIST_BIT (':');
|
||||
range_start = ':';
|
||||
had_char_class = false;
|
||||
}
|
||||
}
|
||||
else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == '=')
|
||||
{
|
||||
unsigned char str[MB_LEN_MAX + 1];
|
||||
#ifdef _LIBC
|
||||
uint32_t nrules =
|
||||
_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
|
||||
#endif
|
||||
|
||||
PATFETCH (c);
|
||||
c1 = 0;
|
||||
|
||||
/* If pattern is `[[='. */
|
||||
if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
PATFETCH (c);
|
||||
if ((c == '=' && *p == ']') || p == pend)
|
||||
break;
|
||||
if (c1 < MB_LEN_MAX)
|
||||
str[c1++] = c;
|
||||
else
|
||||
/* This is in any case an invalid class name. */
|
||||
str[0] = '\0';
|
||||
}
|
||||
str[c1] = '\0';
|
||||
|
||||
if (c == '=' && *p == ']' && str[0] != '\0')
|
||||
{
|
||||
/* If we have no collation data we use the default
|
||||
collation in which each character is in a class
|
||||
by itself. It also means that ASCII is the
|
||||
character set and therefore we cannot have character
|
||||
with more than one byte in the multibyte
|
||||
representation. */
|
||||
#ifdef _LIBC
|
||||
if (nrules == 0)
|
||||
#endif
|
||||
{
|
||||
if (c1 != 1)
|
||||
FREE_STACK_RETURN (REG_ECOLLATE);
|
||||
|
||||
/* Throw away the ] at the end of the equivalence
|
||||
class. */
|
||||
PATFETCH (c);
|
||||
|
||||
/* Set the bit for the character. */
|
||||
SET_LIST_BIT (str[0]);
|
||||
}
|
||||
#ifdef _LIBC
|
||||
else
|
||||
{
|
||||
/* Try to match the byte sequence in `str' against
|
||||
those known to the collate implementation.
|
||||
First find out whether the bytes in `str' are
|
||||
actually from exactly one character. */
|
||||
const int32_t *table;
|
||||
const unsigned char *weights;
|
||||
const unsigned char *extra;
|
||||
const int32_t *indirect;
|
||||
int32_t idx;
|
||||
const unsigned char *cp = str;
|
||||
int ch;
|
||||
|
||||
/* This #include defines a local function! */
|
||||
# include <locale/weight.h>
|
||||
|
||||
table = (const int32_t *)
|
||||
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
|
||||
weights = (const unsigned char *)
|
||||
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB);
|
||||
extra = (const unsigned char *)
|
||||
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
|
||||
indirect = (const int32_t *)
|
||||
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
|
||||
|
||||
idx = findidx (&cp);
|
||||
if (idx == 0 || cp < str + c1)
|
||||
/* This is no valid character. */
|
||||
FREE_STACK_RETURN (REG_ECOLLATE);
|
||||
|
||||
/* Throw away the ] at the end of the equivalence
|
||||
class. */
|
||||
PATFETCH (c);
|
||||
|
||||
/* Now we have to go throught the whole table
|
||||
and find all characters which have the same
|
||||
first level weight.
|
||||
|
||||
XXX Note that this is not entirely correct.
|
||||
we would have to match multibyte sequences
|
||||
but this is not possible with the current
|
||||
implementation. */
|
||||
for (ch = 1; ch < 256; ++ch)
|
||||
/* XXX This test would have to be changed if we
|
||||
would allow matching multibyte sequences. */
|
||||
if (table[ch] > 0)
|
||||
{
|
||||
int32_t idx2 = table[ch];
|
||||
size_t len = weights[idx2];
|
||||
|
||||
/* Test whether the lenghts match. */
|
||||
if (weights[idx] == len)
|
||||
{
|
||||
/* They do. New compare the bytes of
|
||||
the weight. */
|
||||
size_t cnt = 0;
|
||||
|
||||
while (cnt < len
|
||||
&& (weights[idx + 1 + cnt]
|
||||
== weights[idx2 + 1 + cnt]))
|
||||
++len;
|
||||
|
||||
if (cnt == len)
|
||||
/* They match. Mark the character as
|
||||
acceptable. */
|
||||
SET_LIST_BIT (ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
had_char_class = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
c1++;
|
||||
while (c1--)
|
||||
PATUNFETCH;
|
||||
SET_LIST_BIT ('[');
|
||||
SET_LIST_BIT ('=');
|
||||
range_start = '=';
|
||||
had_char_class = false;
|
||||
}
|
||||
}
|
||||
else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == '.')
|
||||
{
|
||||
unsigned char str[128]; /* Should be large enough. */
|
||||
#ifdef _LIBC
|
||||
uint32_t nrules =
|
||||
_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
|
||||
#endif
|
||||
|
||||
PATFETCH (c);
|
||||
c1 = 0;
|
||||
|
||||
/* If pattern is `[[='. */
|
||||
if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
PATFETCH (c);
|
||||
if ((c == '.' && *p == ']') || p == pend)
|
||||
break;
|
||||
if (c1 < sizeof (str))
|
||||
str[c1++] = c;
|
||||
else
|
||||
/* This is in any case an invalid class name. */
|
||||
str[0] = '\0';
|
||||
}
|
||||
str[c1] = '\0';
|
||||
|
||||
if (c == '.' && *p == ']' && str[0] != '\0')
|
||||
{
|
||||
/* If we have no collation data we use the default
|
||||
collation in which each character is the name
|
||||
for its own class which contains only the one
|
||||
character. It also means that ASCII is the
|
||||
character set and therefore we cannot have character
|
||||
with more than one byte in the multibyte
|
||||
representation. */
|
||||
#ifdef _LIBC
|
||||
if (nrules == 0)
|
||||
#endif
|
||||
{
|
||||
if (c1 != 1)
|
||||
FREE_STACK_RETURN (REG_ECOLLATE);
|
||||
|
||||
/* Throw away the ] at the end of the equivalence
|
||||
class. */
|
||||
PATFETCH (c);
|
||||
|
||||
/* Set the bit for the character. */
|
||||
SET_LIST_BIT (str[0]);
|
||||
range_start = ((const unsigned char *) str)[0];
|
||||
}
|
||||
#ifdef _LIBC
|
||||
else
|
||||
{
|
||||
/* Try to match the byte sequence in `str' against
|
||||
those known to the collate implementation.
|
||||
First find out whether the bytes in `str' are
|
||||
actually from exactly one character. */
|
||||
int32_t table_size;
|
||||
const int32_t *symb_table;
|
||||
const unsigned char *extra;
|
||||
int32_t idx;
|
||||
int32_t elem;
|
||||
int32_t second;
|
||||
int32_t hash;
|
||||
|
||||
table_size =
|
||||
_NL_CURRENT_WORD (LC_COLLATE,
|
||||
_NL_COLLATE_SYMB_HASH_SIZEMB);
|
||||
symb_table = (const int32_t *)
|
||||
_NL_CURRENT (LC_COLLATE,
|
||||
_NL_COLLATE_SYMB_TABLEMB);
|
||||
extra = (const unsigned char *)
|
||||
_NL_CURRENT (LC_COLLATE,
|
||||
_NL_COLLATE_SYMB_EXTRAMB);
|
||||
|
||||
/* Locate the character in the hashing table. */
|
||||
hash = elem_hash (str, c1);
|
||||
|
||||
idx = 0;
|
||||
elem = hash % table_size;
|
||||
second = hash % (table_size - 2);
|
||||
while (symb_table[2 * elem] != 0)
|
||||
{
|
||||
/* First compare the hashing value. */
|
||||
if (symb_table[2 * elem] == hash
|
||||
&& c1 == extra[symb_table[2 * elem + 1]]
|
||||
&& memcmp (str,
|
||||
&extra[symb_table[2 * elem + 1]
|
||||
+ 1],
|
||||
c1) == 0)
|
||||
{
|
||||
/* Yep, this is the entry. */
|
||||
idx = symb_table[2 * elem + 1];
|
||||
idx += 1 + extra[idx];
|
||||
break;
|
||||
}
|
||||
|
||||
/* Next entry. */
|
||||
elem += second;
|
||||
}
|
||||
|
||||
if (symb_table[2 * elem] == 0)
|
||||
/* This is no valid character. */
|
||||
FREE_STACK_RETURN (REG_ECOLLATE);
|
||||
|
||||
/* Throw away the ] at the end of the equivalence
|
||||
class. */
|
||||
PATFETCH (c);
|
||||
|
||||
/* Now add the multibyte character(s) we found
|
||||
to the acceptabed list.
|
||||
|
||||
XXX Note that this is not entirely correct.
|
||||
we would have to match multibyte sequences
|
||||
but this is not possible with the current
|
||||
implementation. Also, we have to match
|
||||
collating symbols, which expand to more than
|
||||
one file, as a whole and not allow the
|
||||
individual bytes. */
|
||||
c1 = extra[idx++];
|
||||
if (c1 == 1)
|
||||
range_start = extra[idx];
|
||||
while (c1-- > 0)
|
||||
SET_LIST_BIT (extra[idx++]);
|
||||
}
|
||||
#endif
|
||||
had_char_class = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
c1++;
|
||||
while (c1--)
|
||||
PATUNFETCH;
|
||||
SET_LIST_BIT ('[');
|
||||
SET_LIST_BIT ('.');
|
||||
range_start = '.';
|
||||
had_char_class = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
had_char_class = false;
|
||||
SET_LIST_BIT (c);
|
||||
range_start = c;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2553,8 +2950,7 @@ regex_compile (pattern, size, syntax, bufp)
|
||||
if (!(syntax & RE_INTERVALS)
|
||||
/* If we're at `\{' and it's not the open-interval
|
||||
operator. */
|
||||
|| ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
|
||||
|| (p - 2 == pattern && p == pend))
|
||||
|| (syntax & RE_NO_BK_BRACES))
|
||||
goto normal_backslash;
|
||||
|
||||
handle_interval:
|
||||
@@ -2568,7 +2964,7 @@ regex_compile (pattern, size, syntax, bufp)
|
||||
|
||||
if (p == pend)
|
||||
{
|
||||
if (syntax & RE_NO_BK_BRACES)
|
||||
if (!(syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
|
||||
goto unfetch_interval;
|
||||
else
|
||||
FREE_STACK_RETURN (REG_EBRACE);
|
||||
@@ -2579,7 +2975,12 @@ regex_compile (pattern, size, syntax, bufp)
|
||||
if (c == ',')
|
||||
{
|
||||
GET_UNSIGNED_NUMBER (upper_bound);
|
||||
if (upper_bound < 0) upper_bound = RE_DUP_MAX;
|
||||
if ((!(syntax & RE_NO_BK_BRACES) && c != '\\')
|
||||
|| ((syntax & RE_NO_BK_BRACES) && c != '}'))
|
||||
FREE_STACK_RETURN (REG_BADBR);
|
||||
|
||||
if (upper_bound < 0)
|
||||
upper_bound = RE_DUP_MAX;
|
||||
}
|
||||
else
|
||||
/* Interval such as `{1}' => match exactly once. */
|
||||
@@ -2588,7 +2989,7 @@ regex_compile (pattern, size, syntax, bufp)
|
||||
if (lower_bound < 0 || upper_bound > RE_DUP_MAX
|
||||
|| lower_bound > upper_bound)
|
||||
{
|
||||
if (syntax & RE_NO_BK_BRACES)
|
||||
if (!(syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
|
||||
goto unfetch_interval;
|
||||
else
|
||||
FREE_STACK_RETURN (REG_BADBR);
|
||||
@@ -2603,7 +3004,7 @@ regex_compile (pattern, size, syntax, bufp)
|
||||
|
||||
if (c != '}')
|
||||
{
|
||||
if (syntax & RE_NO_BK_BRACES)
|
||||
if (!(syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
|
||||
goto unfetch_interval;
|
||||
else
|
||||
FREE_STACK_RETURN (REG_BADBR);
|
||||
@@ -3076,49 +3477,53 @@ group_in_compile_stack (compile_stack, regnum)
|
||||
`regex_compile' itself. */
|
||||
|
||||
static reg_errcode_t
|
||||
compile_range (p_ptr, pend, translate, syntax, b)
|
||||
const char **p_ptr, *pend;
|
||||
RE_TRANSLATE_TYPE translate;
|
||||
reg_syntax_t syntax;
|
||||
unsigned char *b;
|
||||
compile_range (range_start_char, p_ptr, pend, translate, syntax, b)
|
||||
unsigned int range_start_char;
|
||||
const char **p_ptr, *pend;
|
||||
RE_TRANSLATE_TYPE translate;
|
||||
reg_syntax_t syntax;
|
||||
unsigned char *b;
|
||||
{
|
||||
unsigned this_char;
|
||||
|
||||
const char *p = *p_ptr;
|
||||
unsigned int range_start, range_end;
|
||||
reg_errcode_t ret;
|
||||
char range_start[2];
|
||||
char range_end[2];
|
||||
char ch[2];
|
||||
|
||||
if (p == pend)
|
||||
return REG_ERANGE;
|
||||
|
||||
/* Even though the pattern is a signed `char *', we need to fetch
|
||||
with unsigned char *'s; if the high bit of the pattern character
|
||||
is set, the range endpoints will be negative if we fetch using a
|
||||
signed char *.
|
||||
|
||||
We also want to fetch the endpoints without translating them; the
|
||||
/* Fetch the endpoints without translating them; the
|
||||
appropriate translation is done in the bit-setting loop below. */
|
||||
/* The SVR4 compiler on the 3B2 had trouble with unsigned const char *. */
|
||||
range_start = ((const unsigned char *) p)[-2];
|
||||
range_end = ((const unsigned char *) p)[0];
|
||||
range_start[0] = range_start_char;
|
||||
range_start[1] = '\0';
|
||||
range_end[0] = p[0];
|
||||
range_end[1] = '\0';
|
||||
|
||||
/* Have to increment the pointer into the pattern string, so the
|
||||
caller isn't still at the ending character. */
|
||||
(*p_ptr)++;
|
||||
|
||||
/* If the start is after the end, the range is empty. */
|
||||
if (range_start > range_end)
|
||||
return syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
|
||||
/* Report an error if the range is empty and the syntax prohibits this. */
|
||||
ret = syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
|
||||
|
||||
/* Here we see why `this_char' has to be larger than an `unsigned
|
||||
char' -- the range is inclusive, so if `range_end' == 0xff
|
||||
(assuming 8-bit characters), we would otherwise go into an infinite
|
||||
loop, since all characters <= 0xff. */
|
||||
for (this_char = range_start; this_char <= range_end; this_char++)
|
||||
char' -- we would otherwise go into an infinite loop, since all
|
||||
characters <= 0xff. */
|
||||
ch[1] = '\0';
|
||||
for (this_char = 0; this_char <= (unsigned char) -1; ++this_char)
|
||||
{
|
||||
SET_LIST_BIT (TRANSLATE (this_char));
|
||||
ch[0] = this_char;
|
||||
if (strcoll (range_start, ch) <= 0 && strcoll (ch, range_end) <= 0)
|
||||
{
|
||||
SET_LIST_BIT (TRANSLATE (this_char));
|
||||
ret = REG_NOERROR;
|
||||
}
|
||||
}
|
||||
|
||||
return REG_NOERROR;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
|
||||
@@ -3848,7 +4253,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
|
||||
fail_stack_type fail_stack;
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
static unsigned failure_id = 0;
|
||||
static unsigned failure_id;
|
||||
unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
|
||||
#endif
|
||||
|
||||
@@ -4779,26 +5184,15 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
|
||||
}
|
||||
else if ((re_opcode_t) *p2 == charset)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
register unsigned char c
|
||||
= *p2 == (unsigned char) endline ? '\n' : p2[2];
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* We win if the first character of the loop is not part
|
||||
of the charset. */
|
||||
if ((re_opcode_t) p1[3] == exactn
|
||||
&& ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
|
||||
&& (p2[2 + p1[5] / BYTEWIDTH]
|
||||
& (1 << (p1[5] % BYTEWIDTH)))))
|
||||
#else
|
||||
if ((re_opcode_t) p1[3] == exactn
|
||||
&& ! ((int) p2[1] * BYTEWIDTH > (int) p1[4]
|
||||
&& (p2[2 + p1[4] / BYTEWIDTH]
|
||||
& (1 << (p1[4] % BYTEWIDTH)))))
|
||||
#endif
|
||||
{
|
||||
p[-3] = (unsigned char) pop_failure_jump;
|
||||
DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
|
||||
c, p1[5]);
|
||||
&& ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
|
||||
&& (p2[2 + p1[5] / BYTEWIDTH]
|
||||
& (1 << (p1[5] % BYTEWIDTH)))))
|
||||
{
|
||||
p[-3] = (unsigned char) pop_failure_jump;
|
||||
DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
|
||||
}
|
||||
|
||||
else if ((re_opcode_t) p1[3] == charset_not)
|
||||
@@ -5489,7 +5883,7 @@ re_compile_pattern (pattern, length, bufp)
|
||||
|
||||
if (!ret)
|
||||
return NULL;
|
||||
return gettext (re_error_msgid[(int) ret]);
|
||||
return gettext (re_error_msgid + re_error_msgid_idx[(int) ret]);
|
||||
}
|
||||
#ifdef _LIBC
|
||||
weak_alias (__re_compile_pattern, re_compile_pattern)
|
||||
@@ -5526,12 +5920,14 @@ re_comp (s)
|
||||
{
|
||||
re_comp_buf.buffer = (unsigned char *) malloc (200);
|
||||
if (re_comp_buf.buffer == NULL)
|
||||
return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
|
||||
return (char *) gettext (re_error_msgid
|
||||
+ re_error_msgid_idx[(int) REG_ESPACE]);
|
||||
re_comp_buf.allocated = 200;
|
||||
|
||||
re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
|
||||
if (re_comp_buf.fastmap == NULL)
|
||||
return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
|
||||
return (char *) gettext (re_error_msgid
|
||||
+ re_error_msgid_idx[(int) REG_ESPACE]);
|
||||
}
|
||||
|
||||
/* Since `re_exec' always passes NULL for the `regs' argument, we
|
||||
@@ -5546,7 +5942,7 @@ re_comp (s)
|
||||
return NULL;
|
||||
|
||||
/* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
|
||||
return (char *) gettext (re_error_msgid[(int) ret]);
|
||||
return (char *) gettext (re_error_msgid + re_error_msgid_idx[(int) ret]);
|
||||
}
|
||||
|
||||
|
||||
@@ -5666,7 +6062,7 @@ regcomp (preg, pattern, cflags)
|
||||
buffer. */
|
||||
if (re_compile_fastmap (preg) == -2)
|
||||
{
|
||||
/* Some error occured while computing the fastmap, just forget
|
||||
/* Some error occurred while computing the fastmap, just forget
|
||||
about it. */
|
||||
free (preg->fastmap);
|
||||
preg->fastmap = NULL;
|
||||
@@ -5772,15 +6168,15 @@ regerror (errcode, preg, errbuf, errbuf_size)
|
||||
size_t msg_size;
|
||||
|
||||
if (errcode < 0
|
||||
|| errcode >= (int) (sizeof (re_error_msgid)
|
||||
/ sizeof (re_error_msgid[0])))
|
||||
|| errcode >= (int) (sizeof (re_error_msgid_idx)
|
||||
/ sizeof (re_error_msgid_idx[0])))
|
||||
/* Only error codes returned by the rest of the code should be passed
|
||||
to this routine. If we are given anything else, or if other regex
|
||||
code generates an invalid error code, then the program has a bug.
|
||||
Dump core so we can fix it. */
|
||||
abort ();
|
||||
|
||||
msg = gettext (re_error_msgid[errcode]);
|
||||
msg = gettext (re_error_msgid + re_error_msgid_idx[errcode]);
|
||||
|
||||
msg_size = strlen (msg) + 1; /* Includes the null. */
|
||||
|
||||
|
||||
14
lib/regex.h
14
lib/regex.h
@@ -1,6 +1,6 @@
|
||||
/* Definitions for data structures and routines for the regular
|
||||
expression library, version 0.12.
|
||||
Copyright (C) 1985,89,90,91,92,93,95,96,97,98 Free Software Foundation, Inc.
|
||||
Copyright (C) 1985,1989-1993,1995-1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
@@ -221,13 +221,13 @@ extern reg_syntax_t re_syntax_options;
|
||||
(_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
|
||||
|
||||
#define RE_SYNTAX_POSIX_EXTENDED \
|
||||
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
|
||||
| RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
|
||||
| RE_NO_BK_PARENS | RE_NO_BK_VBAR \
|
||||
| RE_UNMATCHED_RIGHT_PAREN_ORD)
|
||||
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
|
||||
| RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
|
||||
| RE_NO_BK_PARENS | RE_NO_BK_VBAR \
|
||||
| RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
|
||||
|
||||
/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS
|
||||
replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */
|
||||
/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is
|
||||
removed and RE_NO_BK_REFS is added. */
|
||||
#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
|
||||
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
|
||||
| RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -50,6 +50,9 @@ extern int errno;
|
||||
#define STREQ(a, b) (strcmp ((a), (b)) == 0)
|
||||
|
||||
#ifndef HAVE_DECL_FREE
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_FREE
|
||||
void free ();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 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.
|
||||
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.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
@@ -24,22 +24,32 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <string.h>
|
||||
#if defined _LIBC || defined STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
#endif
|
||||
|
||||
/* Duplicate S, returning an identical malloc'd string. */
|
||||
#undef __strndup
|
||||
#undef strndup
|
||||
|
||||
#ifndef weak_alias
|
||||
# define __strndup strndup
|
||||
#endif
|
||||
|
||||
char *
|
||||
strndup (const char *s, size_t n)
|
||||
__strndup (const char *s, size_t n)
|
||||
{
|
||||
char *new = malloc (n + 1);
|
||||
size_t len = strnlen (s, n);
|
||||
char *new = malloc (len + 1);
|
||||
|
||||
if (new == NULL)
|
||||
return NULL;
|
||||
|
||||
new[n] = '\0';
|
||||
return (char *) memcpy (new, s, n);
|
||||
new[len] = '\0';
|
||||
return (char *) memcpy (new, s, len);
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__strndup, strndup)
|
||||
#endif
|
||||
|
||||
40
lib/strnlen.c
Normal file
40
lib/strnlen.c
Normal file
@@ -0,0 +1,40 @@
|
||||
/* Find the length of STRING, but scan at most MAXLEN characters.
|
||||
Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#undef __strnlen
|
||||
#undef strnlen
|
||||
|
||||
#ifndef weak_alias
|
||||
# define __strnlen strnlen
|
||||
#endif
|
||||
|
||||
/* Find the length of STRING, but scan at most MAXLEN characters.
|
||||
If no '\0' terminator is found in that many characters, return MAXLEN. */
|
||||
|
||||
size_t
|
||||
__strnlen (const char *string, size_t maxlen)
|
||||
{
|
||||
const char *end = memchr (string, '\0', maxlen);
|
||||
return end ? end - string : maxlen;
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__strnlen, strnlen)
|
||||
#endif
|
||||
@@ -38,10 +38,16 @@
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_STRTOUL
|
||||
unsigned long long strtoul PARAMS ((char const *, char **, int));
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRTOUL
|
||||
unsigned long strtoul PARAMS ((char const *, char **, int));
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_STRTOULL
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG
|
||||
unsigned long long strtoull PARAMS ((char const *, char **, int));
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Compare strings while treating digits characters numerically.
|
||||
Copyright (C) 1997, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jean-Francois Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
|
||||
Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
|
||||
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
|
||||
@@ -1,5 +1,5 @@
|
||||
/* userspec.c -- Parse a user and group string.
|
||||
Copyright (C) 1989-1992, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989-1992, 1997, 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
|
||||
@@ -57,6 +57,14 @@ char *alloca ();
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
#define N_(Text) Text
|
||||
|
||||
#ifndef _POSIX_VERSION
|
||||
struct passwd *getpwnam ();
|
||||
struct group *getgrnam ();
|
||||
@@ -83,7 +91,15 @@ struct group *getgrgid ();
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define isdigit(c) ((c) >= '0' && (c) <= '9')
|
||||
/* ISDIGIT differs from isdigit, as follows:
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
- It's typically faster.
|
||||
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless
|
||||
it's important to use the locale's definition of `digit' even when the
|
||||
host does not conform to Posix. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
#ifndef strdup
|
||||
char *strdup ();
|
||||
@@ -96,7 +112,7 @@ static int
|
||||
is_number (const char *str)
|
||||
{
|
||||
for (; *str; str++)
|
||||
if (!isdigit (*str))
|
||||
if (!ISDIGIT (*str))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
@@ -104,8 +120,12 @@ is_number (const char *str)
|
||||
/* Extract from NAME, which has the form "[user][:.][group]",
|
||||
a USERNAME, UID U, GROUPNAME, and GID G.
|
||||
Either user or group, or both, must be present.
|
||||
If the group is omitted but the ":" or "." separator is given,
|
||||
If the group is omitted but the ":" separator is given,
|
||||
use the given user's login group.
|
||||
If SPEC_ARG contains a `:', then use that as the separator, ignoring
|
||||
any `.'s. If there is no `:', but there is a `.', then first look
|
||||
up SPEC_ARG as a login name. If that look-up fails, then try again
|
||||
interpreting the `.' as a separator.
|
||||
|
||||
USERNAME and GROUPNAME will be in newly malloc'd memory.
|
||||
Either one might be NULL instead, indicating that it was not
|
||||
@@ -117,13 +137,22 @@ const char *
|
||||
parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
|
||||
char **username_arg, char **groupname_arg)
|
||||
{
|
||||
static const char *tired = "virtual memory exhausted";
|
||||
static const char *E_no_memory = N_("virtual memory exhausted");
|
||||
static const char *E_invalid_user = N_("invalid user");
|
||||
static const char *E_invalid_group = N_("invalid group");
|
||||
static const char *E_bad_spec =
|
||||
N_("cannot get the login group of a numeric UID");
|
||||
static const char *E_cannot_omit_both =
|
||||
N_("cannot omit both user and group");
|
||||
|
||||
const char *error_msg;
|
||||
char *spec; /* A copy we can write on. */
|
||||
struct passwd *pwd;
|
||||
struct group *grp;
|
||||
char *g, *u, *separator;
|
||||
char *groupname;
|
||||
int maybe_retry = 0;
|
||||
char *dot = NULL;
|
||||
|
||||
error_msg = NULL;
|
||||
*username_arg = *groupname_arg = NULL;
|
||||
@@ -131,10 +160,24 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
|
||||
|
||||
V_STRDUP (spec, spec_arg);
|
||||
|
||||
/* Find the separator if there is one. */
|
||||
/* Find the POSIX `:' separator if there is one. */
|
||||
separator = strchr (spec, ':');
|
||||
|
||||
/* If there is no colon, then see if there's a `.'. */
|
||||
if (separator == NULL)
|
||||
separator = strchr (spec, '.');
|
||||
{
|
||||
dot = strchr (spec, '.');
|
||||
/* If there's no colon but there is a `.', then first look up the
|
||||
whole spec, in case it's an OWNER name that includes a dot.
|
||||
If that fails, then we'll try again, but interpreting the `.'
|
||||
as a separator. */
|
||||
/* FIXME: accepting `.' as the separator is contrary to POSIX.
|
||||
someday we should drop support for this. */
|
||||
if (dot)
|
||||
maybe_retry = 1;
|
||||
}
|
||||
|
||||
retry:
|
||||
|
||||
/* Replace separator with a NUL. */
|
||||
if (separator != NULL)
|
||||
@@ -149,7 +192,7 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
|
||||
: separator + 1);
|
||||
|
||||
if (u == NULL && g == NULL)
|
||||
return "can not omit both user and group";
|
||||
return _(E_cannot_omit_both);
|
||||
|
||||
#ifdef __DJGPP__
|
||||
/* Pretend that we are the user U whose group is G. This makes
|
||||
@@ -167,15 +210,18 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
|
||||
{
|
||||
|
||||
if (!is_number (u))
|
||||
error_msg = "invalid user";
|
||||
error_msg = _(E_invalid_user);
|
||||
else
|
||||
{
|
||||
int use_login_group;
|
||||
use_login_group = (separator != NULL && g == NULL);
|
||||
if (use_login_group)
|
||||
error_msg = "cannot get the login group of a numeric UID";
|
||||
error_msg = _(E_bad_spec);
|
||||
else
|
||||
*uid = atoi (u);
|
||||
{
|
||||
/* FIXME: don't use atoi! */
|
||||
*uid = atoi (u);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -213,9 +259,12 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
|
||||
if (grp == NULL)
|
||||
{
|
||||
if (!is_number (g))
|
||||
error_msg = "invalid group";
|
||||
error_msg = _(E_invalid_group);
|
||||
else
|
||||
*gid = atoi (g);
|
||||
{
|
||||
/* FIXME: don't use atoi! */
|
||||
*gid = atoi (g);
|
||||
}
|
||||
}
|
||||
else
|
||||
*gid = grp->gr_gid;
|
||||
@@ -231,7 +280,7 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
|
||||
{
|
||||
*username_arg = strdup (u);
|
||||
if (*username_arg == NULL)
|
||||
error_msg = tired;
|
||||
error_msg = _(E_no_memory);
|
||||
}
|
||||
|
||||
if (groupname != NULL && error_msg == NULL)
|
||||
@@ -244,11 +293,19 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
|
||||
free (*username_arg);
|
||||
*username_arg = NULL;
|
||||
}
|
||||
error_msg = tired;
|
||||
error_msg = _(E_no_memory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (error_msg && maybe_retry)
|
||||
{
|
||||
maybe_retry = 0;
|
||||
separator = dot;
|
||||
error_msg = NULL;
|
||||
goto retry;
|
||||
}
|
||||
|
||||
return error_msg;
|
||||
}
|
||||
|
||||
|
||||
226
m4/ChangeLog
226
m4/ChangeLog
@@ -1,3 +1,219 @@
|
||||
2000-05-06 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
|
||||
(AC_REPLACE_FUNCS): Add strnlen.
|
||||
|
||||
* rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
|
||||
* jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
|
||||
|
||||
* nanosleep.m4: (jm_FUNC_NANOSLEEP): Save and restore LIBS around
|
||||
AC_SEARCH_LIBS call for nanosleep.
|
||||
(LIB_NANOSLEEP): Set and AC_SUBST.
|
||||
|
||||
2000-05-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
|
||||
be 500, instead of _GNU_SOURCE to be 1, to work around glibc
|
||||
2.1.3 bug. This avoids a clash when files like regex.c define
|
||||
_GNU_SOURCE.
|
||||
|
||||
2000-05-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Save and restore LIBS around AC_SEARCH_LIBS
|
||||
call for clock_gettime.
|
||||
(LIB_CLOCK_GETTIME): Set and AC_SUBST.
|
||||
|
||||
* search-libs.m4: Update from autoconf.
|
||||
|
||||
su doesn't work on Solaris2.6.
|
||||
* lib-check.m4: When checking for struct spwd.sp_pwdp, also include
|
||||
<shadow.h>. Reported by Dragos Harabor.
|
||||
|
||||
2000-05-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* check-decl.m4 (AC_CHECK_DECLS): Add strndup.
|
||||
|
||||
2000-05-02 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
|
||||
this is needed to make ftello visible (e.g. glibc 2.1.3). Use
|
||||
compile-time test, rather than inspecting host and OS, to
|
||||
decide whether to define _LARGEFILE_SOURCE.
|
||||
|
||||
2000-05-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
|
||||
|
||||
* ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
|
||||
Based on a patch from Bruno Haible.
|
||||
|
||||
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.
|
||||
|
||||
2000-02-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
|
||||
in place of my hack.
|
||||
|
||||
2000-02-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
|
||||
gnu_nanosleep to rpl_nanosleep.
|
||||
|
||||
2000-02-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
|
||||
struct spwd, rather than in struct passwd. Reported by Gaël Quéri.
|
||||
|
||||
2000-02-08 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
|
||||
`[' and `]' and remove uses of `changequote'.
|
||||
(AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
|
||||
(AC_SYS_LARGEFILE): Likewise.
|
||||
* gettext.m4 (AM_GNU_GETTEXT): Likewise.
|
||||
* strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
|
||||
of changequote.
|
||||
* regex.m4 (jm_INCLUDED_REGEX): Likewise.
|
||||
* readdir.m4 (jm_FUNC_READDIR): Likewise
|
||||
* memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
|
||||
* getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
|
||||
|
||||
2000-02-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4: (jm_CHECK_ALL_TYPES): Require most macros.
|
||||
Remove explicit use of AC_HEADER_TIME. It is required by
|
||||
jm_CHECK_TYPE_STRUCT_TIMESPEC. Using AC_HEADER_TIME and
|
||||
`AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
|
||||
in autoconf whereby the expansion of the latter ended up preceding
|
||||
the expansion of its prerequisite, AC_HEADER_TIME.
|
||||
Reported by Volker Borchert.
|
||||
|
||||
2000-02-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
|
||||
|
||||
2000-02-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
|
||||
definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
|
||||
Reported by Eli Zaretskii.
|
||||
|
||||
2000-01-31 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
|
||||
functions. Add the time.h and sys/time.h headers along with the
|
||||
AC_REQUIRE'ment of AC_HEADER_TIME.
|
||||
|
||||
2000-01-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* lib-check.m4: Clean up some kludgy old shadow password tests.
|
||||
@@ -111,13 +327,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>
|
||||
|
||||
@@ -180,7 +396,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.
|
||||
|
||||
@@ -253,7 +469,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 \
|
||||
@@ -47,6 +48,7 @@ putenv.m4 \
|
||||
readdir.m4 \
|
||||
realloc.m4 \
|
||||
regex.m4 \
|
||||
rmdir-errno.m4 \
|
||||
search-libs.m4 \
|
||||
st_dm_mode.m4 \
|
||||
st_mtim.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.
|
||||
@@ -31,8 +31,6 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
@@ -57,6 +55,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
@@ -71,6 +71,7 @@ CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
FESETROUND_LIBM = @FESETROUND_LIBM@
|
||||
GENCAT = @GENCAT@
|
||||
GETCONF = @GETCONF@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
@@ -85,7 +86,11 @@ INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
LIB_NANOSLEEP = @LIB_NANOSLEEP@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
@@ -99,6 +104,7 @@ 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@
|
||||
@@ -115,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 \
|
||||
@@ -129,6 +135,7 @@ getloadavg.m4 \
|
||||
gettext.m4 \
|
||||
glibc.m4 \
|
||||
group-member.m4 \
|
||||
iconv.m4 \
|
||||
inttypes_h.m4 \
|
||||
isc-posix.m4 \
|
||||
jm-glibc-io.m4 \
|
||||
@@ -154,6 +161,7 @@ putenv.m4 \
|
||||
readdir.m4 \
|
||||
realloc.m4 \
|
||||
regex.m4 \
|
||||
rmdir-errno.m4 \
|
||||
search-libs.m4 \
|
||||
st_dm_mode.m4 \
|
||||
st_mtim.m4 \
|
||||
@@ -185,7 +193,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
|
||||
|
||||
@@ -199,11 +207,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,7 +1,7 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
AC_DEFUN(jm_AFS,
|
||||
AC_CHECKING(for AFS)
|
||||
AC_MSG_CHECKING(for AFS)
|
||||
test -d /afs \
|
||||
&& AC_DEFINE(AFS, 1, [Define if you have the Andrew File System.])
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 6
|
||||
#serial 11
|
||||
|
||||
dnl This is just a wrapper function to encapsulate this kludge.
|
||||
dnl Putting it in a separate file like this helps share it between
|
||||
@@ -6,6 +6,7 @@ dnl different packages.
|
||||
AC_DEFUN(jm_CHECK_DECLS,
|
||||
[
|
||||
AC_REQUIRE([_jm_DECL_HEADERS])
|
||||
AC_REQUIRE([AC_HEADER_TIME])
|
||||
headers='
|
||||
#include <stdio.h>
|
||||
#if HAVE_STRING_H
|
||||
@@ -24,27 +25,41 @@ AC_DEFUN(jm_CHECK_DECLS,
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_UTMPX_H
|
||||
# include <utmp.h>
|
||||
#endif
|
||||
'
|
||||
|
||||
if test x = y; then
|
||||
dnl This code is deliberately never run via ./configure.
|
||||
dnl FIXME: this is a gross hack to make autoheader put entries
|
||||
dnl for each of these symbols in the config.h.in.
|
||||
dnl Otherwise, I'd have to update acconfig.h every time I change
|
||||
dnl this list of functions.
|
||||
AC_DEFINE(HAVE_DECL_FREE, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_LSEEK, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_MALLOC, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_MEMCHR, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_REALLOC, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_STPCPY, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_STRSTR, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_STRTOUL, 1, [Define if this function is declared.])
|
||||
AC_DEFINE(HAVE_DECL_STRTOULL, 1, [Define if this function is declared.])
|
||||
fi
|
||||
|
||||
jm_CHECK_DECLARATIONS($headers, free lseek malloc \
|
||||
memchr realloc stpcpy strstr strtoul strtoull)
|
||||
AC_CHECK_DECLS((
|
||||
free,
|
||||
getenv,
|
||||
geteuid,
|
||||
getlogin,
|
||||
getutent,
|
||||
lseek,
|
||||
malloc,
|
||||
memchr,
|
||||
nanosleep,
|
||||
realloc,
|
||||
stpcpy,
|
||||
strndup,
|
||||
strstr,
|
||||
strtoul,
|
||||
strtoull,
|
||||
ttyname), , , $headers)
|
||||
])
|
||||
|
||||
dnl FIXME: when autoconf has support for it.
|
||||
@@ -52,5 +67,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)
|
||||
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 1
|
||||
#serial 2
|
||||
|
||||
# From fileutils/configure.in
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
AC_DEFUN(jm_FILE_SYSTEM_USAGE,
|
||||
[
|
||||
|
||||
AC_CHECKING(how to get filesystem space usage)
|
||||
AC_MSG_CHECKING(how to get filesystem space usage)
|
||||
ac_fsusage_space=no
|
||||
|
||||
# Perform only the link test since it seems there are no variants of the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 4
|
||||
#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
|
||||
@@ -103,9 +103,7 @@ AC_SUBST(NEED_SETGID)dnl
|
||||
|
||||
if test $ac_cv_func_getloadavg_setgid = yes; then
|
||||
AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem,
|
||||
changequote(<<, >>)dnl
|
||||
<<
|
||||
# On Solaris, /dev/kmem is a symlink. Get info on the real file.
|
||||
[ # On Solaris, /dev/kmem is a symlink. Get info on the real file.
|
||||
ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
|
||||
# If we got an error (system does not support symlinks), try without -L.
|
||||
test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
|
||||
@@ -113,8 +111,7 @@ changequote(<<, >>)dnl
|
||||
| sed -ne 's/[ ][ ]*/ /g;
|
||||
s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
|
||||
/ /s/.* //;p;'`
|
||||
>>
|
||||
changequote([, ])dnl
|
||||
]
|
||||
)
|
||||
KMEM_GROUP=$ac_cv_group_kmem
|
||||
fi
|
||||
|
||||
@@ -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 107
|
||||
# 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"
|
||||
@@ -303,16 +303,14 @@ strdup __argz_count __argz_stringify __argz_next])
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po/Makefile.
|
||||
test -d po || mkdir po
|
||||
changequote(, )dnl
|
||||
case "$srcdir" in
|
||||
.)
|
||||
posrcprefix="../" ;;
|
||||
/* | [A-Za-z]:*)
|
||||
/* | [[A-Za-z]]:*)
|
||||
posrcprefix="$srcdir/" ;;
|
||||
*)
|
||||
posrcprefix="../$srcdir/" ;;
|
||||
esac
|
||||
changequote([, ])dnl
|
||||
rm -f po/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||
|
||||
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 12
|
||||
#serial 17
|
||||
|
||||
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 \
|
||||
@@ -69,6 +70,7 @@ AC_DEFUN(jm_MACROS,
|
||||
AC_REQUIRE([jm_PREREQ])
|
||||
|
||||
AC_REQUIRE([jm_FUNC_LCHOWN])
|
||||
AC_REQUIRE([fetish_FUNC_RMDIR_NOTEMPTY])
|
||||
AC_REQUIRE([jm_FUNC_CHOWN])
|
||||
AC_REQUIRE([jm_FUNC_MKTIME])
|
||||
AC_REQUIRE([jm_FUNC_LSTAT])
|
||||
@@ -106,6 +108,8 @@ AC_DEFUN(jm_MACROS,
|
||||
AC_REPLACE_FUNCS(stime strcspn stpcpy strstr strtol strtoul)
|
||||
AC_REPLACE_FUNCS(strpbrk)
|
||||
AC_REPLACE_FUNCS(euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp)
|
||||
AC_REPLACE_FUNCS(atexit)
|
||||
AC_REPLACE_FUNCS(strnlen)
|
||||
|
||||
dnl used by e.g. intl/*domain.c and lib/canon-host.c
|
||||
AC_REPLACE_FUNCS(strdup)
|
||||
@@ -127,8 +131,16 @@ AC_DEFUN(jm_MACROS,
|
||||
# used by sleep and shred
|
||||
# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
||||
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
||||
AC_SEARCH_LIBS(clock_gettime, [rt posix4])
|
||||
AC_CHECK_FUNCS(clock_gettime)
|
||||
|
||||
# Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
|
||||
# programs in the package would end up linked with that potentially-shared
|
||||
# library, inducing unnecessary run-time overhead.
|
||||
fetish_saved_libs=$LIBS
|
||||
AC_SEARCH_LIBS(clock_gettime, [rt posix4],
|
||||
[LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
|
||||
AC_SUBST(LIB_CLOCK_GETTIME)
|
||||
AC_CHECK_FUNCS(clock_gettime)
|
||||
LIBS=$fetish_saved_libs
|
||||
AC_CHECK_FUNCS(gettimeofday)
|
||||
|
||||
AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
|
||||
@@ -175,6 +187,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,35 +203,54 @@ 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_C_BIGENDIAN
|
||||
AC_PROG_CC_STDC
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_LONG_DOUBLE
|
||||
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_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_MEMBERS((struct stat.st_blksize))
|
||||
AC_STRUCT_ST_BLOCKS
|
||||
AC_REQUIRE([AC_HEADER_DIRENT])
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
AC_CHECK_MEMBERS((struct stat.st_blksize),,,[$ac_includes_default
|
||||
#include <sys/stat.h>
|
||||
])
|
||||
AC_REQUIRE([AC_STRUCT_ST_BLOCKS])
|
||||
|
||||
AC_STRUCT_TM
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TIMEZONE
|
||||
AC_HEADER_STAT
|
||||
AC_STRUCT_ST_MTIM_NSEC
|
||||
AC_STRUCT_ST_DM_MODE
|
||||
AC_REQUIRE([AC_STRUCT_TM])
|
||||
AC_REQUIRE([AC_STRUCT_TIMEZONE])
|
||||
AC_REQUIRE([AC_HEADER_STAT])
|
||||
AC_REQUIRE([AC_STRUCT_ST_MTIM_NSEC])
|
||||
AC_REQUIRE([AC_STRUCT_ST_DM_MODE])
|
||||
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_TIMESPEC])
|
||||
|
||||
AC_TYPE_GETGROUPS
|
||||
AC_TYPE_MODE_T
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_SIGNAL
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_UID_T
|
||||
AC_REQUIRE([AC_TYPE_GETGROUPS])
|
||||
AC_REQUIRE([AC_TYPE_MODE_T])
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])
|
||||
AC_REQUIRE([AC_TYPE_PID_T])
|
||||
AC_REQUIRE([AC_TYPE_SIGNAL])
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])
|
||||
AC_REQUIRE([AC_TYPE_UID_T])
|
||||
AC_CHECK_TYPE(ino_t, unsigned long)
|
||||
|
||||
dnl This relies on the fact that autoconf 2.14a's implementation of
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 7
|
||||
#serial 11
|
||||
|
||||
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.
|
||||
@@ -20,19 +20,19 @@ AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
|
||||
ifelse($1, CFLAGS,
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
|
||||
changequote(, )dnl
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
changequote([, ])dnl
|
||||
[ hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)]
|
||||
if test "$GCC" = yes; then
|
||||
ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
|
||||
fi
|
||||
;;
|
||||
# IRIX 6.2 and later require cc -n32.
|
||||
changequote(, )dnl
|
||||
irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
|
||||
changequote([, ])dnl
|
||||
# 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
|
||||
@@ -61,17 +61,15 @@ dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAUL
|
||||
AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
|
||||
[AC_CACHE_CHECK([for $1], $2,
|
||||
[$2=no
|
||||
changequote(, )dnl
|
||||
$4
|
||||
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
||||
case "$ac_flag" in
|
||||
-D$1)
|
||||
$2=1 ;;
|
||||
-D$1=*)
|
||||
$2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
|
||||
$2=`expr " $ac_flag" : '[[^=]]*=\(.*\)'` ;;
|
||||
esac
|
||||
done
|
||||
changequote([, ])dnl
|
||||
])
|
||||
if test "[$]$2" != no; then
|
||||
AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
|
||||
@@ -106,24 +104,31 @@ AC_DEFUN(AC_SYS_LARGEFILE,
|
||||
[Number of bits in a file offset, on hosts where this is settable.],
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 and later
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
[ hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)]
|
||||
ac_cv_sys_file_offset_bits=64 ;;
|
||||
esac])
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
|
||||
ac_cv_sys_largefile_source,
|
||||
[Define to make fseeko etc. visible, on some hosts.],
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 and later
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
ac_cv_sys_largefile_source=1 ;;
|
||||
esac])
|
||||
[Define to make ftello visible on some hosts (e.g. HP-UX 10.20).],
|
||||
[AC_TRY_COMPILE([#include <stdio.h>], [return !ftello;], ,
|
||||
[AC_TRY_COMPILE([#define _LARGEFILE_SOURCE 1
|
||||
#include <stdio.h>], [return !ftello;],
|
||||
ac_cv_sys_largefile_source=1)])])
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
|
||||
ac_cv_sys_large_files,
|
||||
[Define for large files, on AIX-style hosts.],
|
||||
[case "$host_os" in
|
||||
# AIX 4.2 and later
|
||||
aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
|
||||
[ aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)]
|
||||
ac_cv_sys_large_files=1 ;;
|
||||
esac])
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_XOPEN_SOURCE,
|
||||
ac_cv_sys_xopen_source,
|
||||
[Define to make ftello visible on some hosts (e.g. glibc 2.1.3).],
|
||||
[AC_TRY_COMPILE([#include <stdio.h>], [return !ftello;], ,
|
||||
[AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
|
||||
#include <stdio.h>],
|
||||
[return !ftello;],
|
||||
ac_cv_sys_xopen_source=500)])])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 2
|
||||
#serial 3
|
||||
|
||||
dnl Misc lib-related macros for fileutils, sh-utils, textutils.
|
||||
|
||||
@@ -39,13 +39,20 @@ 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])
|
||||
|
||||
AC_CHECK_HEADERS(shadow.h)
|
||||
|
||||
# Requirements for su.c.
|
||||
AC_CHECK_MEMBERS((struct passwd.sp_pwdp))
|
||||
shadow_includes="\
|
||||
$ac_includes_default
|
||||
#if HAVE_SHADOW_H
|
||||
# include <shadow.h>
|
||||
#endif
|
||||
"
|
||||
AC_CHECK_MEMBERS((struct spwd.sp_pwdp),,,[$shadow_includes])
|
||||
AC_CHECK_FUNCS(getspnam)
|
||||
AC_CHECK_HEADERS(shadow.h)
|
||||
|
||||
# SCO-ODT-3.0 is reported to need -lufc for crypt.
|
||||
# NetBSD needs -lcrypt for crypt.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 3
|
||||
#serial 4
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl
|
||||
@@ -180,8 +180,6 @@ if test -z "$ac_list_mounted_fs"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# FIXME: add a test for netbsd-1.1 here
|
||||
|
||||
if test -z "$ac_list_mounted_fs"; then
|
||||
# Ultrix
|
||||
AC_MSG_CHECKING([for getmnt function])
|
||||
@@ -200,6 +198,27 @@ if test -z "$ac_list_mounted_fs"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$ac_list_mounted_fs"; then
|
||||
# BeOS
|
||||
AC_CHECK_FUNCS(next_dev fs_stat_dev)
|
||||
AC_CHECK_HEADERS(fs_info.h)
|
||||
AC_MSG_CHECKING([for BEOS mounted file system support functions])
|
||||
if test $ac_cv_header_fs_info_h = yes \
|
||||
&& test $ac_cv_func_next_dev = yes \
|
||||
&& test $ac_cv_func_fs_stat_dev = yes; then
|
||||
fu_result=yes
|
||||
else
|
||||
fu_result=no
|
||||
fi
|
||||
AC_MSG_RESULT($fu_result)
|
||||
if test $fu_result = yes; then
|
||||
ac_list_mounted_fs=found
|
||||
AC_DEFINE(MOUNTED_NEXT_DEV, 1,
|
||||
[Define if there are functions named next_dev and fs_stat_dev for
|
||||
reading the list of mounted filesystems. (BeOS)])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$ac_list_mounted_fs"; then
|
||||
# SVR2
|
||||
AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab])
|
||||
|
||||
11
m4/memcmp.m4
11
m4/memcmp.m4
@@ -1,13 +1,12 @@
|
||||
#serial 3
|
||||
#serial 4
|
||||
|
||||
dnl A replacement for autoconf's AC_FUNC_MEMCMP that detects
|
||||
dnl the losing memcmp on some x86 Next systems.
|
||||
AC_DEFUN(jm_AC_FUNC_MEMCMP,
|
||||
[AC_CACHE_CHECK([for working memcmp], jm_cv_func_memcmp_working,
|
||||
[AC_TRY_RUN(
|
||||
changequote(<<, >>)dnl
|
||||
<<
|
||||
main()
|
||||
[int
|
||||
main ()
|
||||
{
|
||||
/* Some versions of memcmp are not 8-bit clean. */
|
||||
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
|
||||
@@ -32,9 +31,7 @@ main()
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
}
|
||||
>>,
|
||||
changequote([, ])dnl
|
||||
}],
|
||||
jm_cv_func_memcmp_working=yes,
|
||||
jm_cv_func_memcmp_working=no,
|
||||
jm_cv_func_memcmp_working=no)])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 4
|
||||
#serial 6
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Check for the nanosleep function.
|
||||
@@ -7,9 +7,12 @@ dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_NANOSLEEP,
|
||||
[
|
||||
nanosleep_save_libs=$LIBS
|
||||
|
||||
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
|
||||
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
||||
AC_SEARCH_LIBS(nanosleep, [rt posix4])
|
||||
AC_SEARCH_LIBS(nanosleep, [rt posix4], [LIB_NANOSLEEP=$ac_cv_search_nanosleep])
|
||||
AC_SUBST(LIB_NANOSLEEP)
|
||||
|
||||
AC_CACHE_CHECK([whether nanosleep works],
|
||||
jm_cv_func_nanosleep_works,
|
||||
@@ -44,7 +47,9 @@ AC_DEFUN(jm_FUNC_NANOSLEEP,
|
||||
if test $jm_cv_func_nanosleep_works = no; then
|
||||
AC_SUBST(LIBOBJS)
|
||||
LIBOBJS="$LIBOBJS nanosleep.$ac_objext"
|
||||
AC_DEFINE_UNQUOTED(nanosleep, gnu_nanosleep,
|
||||
[Define to gnu_nanosleep if the replacement function should be used.])
|
||||
AC_DEFINE_UNQUOTED(nanosleep, rpl_nanosleep,
|
||||
[Define to rpl_nanosleep if the replacement function should be used.])
|
||||
fi
|
||||
|
||||
LIBS=$nanosleep_save_libs
|
||||
])
|
||||
|
||||
12
m4/prereq.m4
12
m4/prereq.m4
@@ -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
|
||||
@@ -17,7 +18,7 @@ AC_DEFUN(jm_PREREQ_ADDEXT,
|
||||
[
|
||||
dnl For addext.c.
|
||||
AC_SYS_LONG_FILE_NAMES
|
||||
AC_CHECK_FUNC(pathconf)
|
||||
AC_CHECK_FUNCS(pathconf)
|
||||
AC_CHECK_HEADERS(limits.h string.h unistd.h)
|
||||
])
|
||||
|
||||
@@ -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)
|
||||
@@ -50,6 +57,7 @@ AC_DEFUN(jm_PREREQ_READUTMP,
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(string.h utmpx.h sys/param.h)
|
||||
AC_CHECK_FUNCS(utmpname)
|
||||
AC_CHECK_FUNCS(utmpxname)
|
||||
AM_C_PROTOTYPES
|
||||
|
||||
utmp_includes="\
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 2
|
||||
#serial 3
|
||||
|
||||
dnl SunOS's readdir is broken in such a way that rm.c has to add extra code
|
||||
dnl to test whether a NULL return value really means there are no more files
|
||||
@@ -23,9 +23,7 @@ AC_CACHE_CHECK([for working readdir], jm_cv_func_working_readdir,
|
||||
ac_clean_files="$ac_clean_files conf-dir"
|
||||
|
||||
AC_TRY_RUN(
|
||||
changequote(<<, >>)dnl
|
||||
<<
|
||||
# include <stdio.h>
|
||||
[# include <stdio.h>
|
||||
# include <sys/types.h>
|
||||
# if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
@@ -119,9 +117,7 @@ AC_CACHE_CHECK([for working readdir], jm_cv_func_working_readdir,
|
||||
create_300_file_dir (dir);
|
||||
remove_dir (dir);
|
||||
exit (0);
|
||||
}
|
||||
>>,
|
||||
changequote([, ])dnl
|
||||
}],
|
||||
jm_cv_func_working_readdir=yes,
|
||||
jm_cv_func_working_readdir=no,
|
||||
jm_cv_func_working_readdir=no)])
|
||||
|
||||
22
m4/regex.m4
22
m4/regex.m4
@@ -1,4 +1,4 @@
|
||||
#serial 5
|
||||
#serial 7
|
||||
|
||||
dnl Initially derived from code in GNU grep.
|
||||
dnl Mostly written by Jim Meyering.
|
||||
@@ -16,14 +16,12 @@ 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(
|
||||
changequote(<<, >>)dnl
|
||||
<<
|
||||
#include <stdio.h>
|
||||
[#include <stdio.h>
|
||||
#include <regex.h>
|
||||
int
|
||||
main ()
|
||||
@@ -35,11 +33,15 @@ 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);
|
||||
}
|
||||
>>,
|
||||
changequote([, ])dnl
|
||||
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,
|
||||
jm_cv_func_working_re_compile_pattern=no,
|
||||
dnl When crosscompiling, assume it's broken.
|
||||
|
||||
43
m4/rmdir-errno.m4
Normal file
43
m4/rmdir-errno.m4
Normal file
@@ -0,0 +1,43 @@
|
||||
#serial 1
|
||||
|
||||
# When rmdir fails because the specified directory is not empty, it sets
|
||||
# errno to some value, usually ENOTEMPTY. However, on some AIX systems,
|
||||
# ENOTEMPTY is mistakenly defined to be EEXIST. To work around this, and
|
||||
# in general, to avoid depending on the use of any particular symbol, this
|
||||
# test runs a test to determine the actual numeric value.
|
||||
AC_DEFUN(fetish_FUNC_RMDIR_NOTEMPTY,
|
||||
[dnl
|
||||
AC_CACHE_CHECK([for rmdir-not-empty errno value],
|
||||
fetish_cv_func_rmdir_errno_not_empty,
|
||||
[
|
||||
# Arrange for deletion of the temporary directory this test creates.
|
||||
ac_clean_files="$ac_clean_files confdir2"
|
||||
mkdir confdir2; : > confdir2/file
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
int main ()
|
||||
{
|
||||
FILE *s;
|
||||
int val;
|
||||
rmdir ("confdir2");
|
||||
val = errno;
|
||||
s = fopen ("confdir2/file", "w");
|
||||
fprintf (s, "%d\n", val);
|
||||
exit (0);
|
||||
}
|
||||
],
|
||||
fetish_cv_func_rmdir_errno_not_empty=`cat confdir2/file`,
|
||||
fetish_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4',
|
||||
fetish_cv_func_rmdir_errno_not_empty=ENOTEMPTY
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
AC_DEFINE_UNQUOTED([RMDIR_ERRNO_NOT_EMPTY],
|
||||
$fetish_cv_func_rmdir_errno_not_empty,
|
||||
[the value to which errno is set when rmdir fails on a nonempty directory])
|
||||
])
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 3
|
||||
#serial 4
|
||||
|
||||
dnl A replacement for autoconf's macro by the same name. This version
|
||||
dnl uses `ac_lib' rather than `i' for the loop variable, but more importantly
|
||||
@@ -8,33 +8,31 @@ dnl the `none required' case.
|
||||
dnl I hope it's only temporary while we wait for that version to be fixed.
|
||||
undefine([AC_SEARCH_LIBS])
|
||||
|
||||
dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND
|
||||
dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
|
||||
dnl Search for a library defining FUNC, if it's not already available.
|
||||
|
||||
# AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [OTHER-LIBRARIES])
|
||||
# --------------------------------------------------------
|
||||
# Search for a library defining FUNC, if it's not already available.
|
||||
AC_DEFUN(AC_SEARCH_LIBS,
|
||||
[
|
||||
AC_PREREQ([2.13])
|
||||
AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
|
||||
[
|
||||
ac_func_search_save_LIBS="$LIBS"
|
||||
ac_cv_search_$1="no"
|
||||
AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
|
||||
if test "$ac_cv_search_$1" = "no"; then
|
||||
ac_func_search_save_LIBS=$LIBS
|
||||
ac_cv_search_$1=no
|
||||
AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1='none required'])
|
||||
if test "$ac_cv_search_$1" = no; then
|
||||
for ac_lib in $2; do
|
||||
LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS"
|
||||
AC_TRY_LINK_FUNC([$1],
|
||||
[ac_cv_search_$1="-l$ac_lib"
|
||||
break])
|
||||
AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="-l$ac_lib"; break])
|
||||
done
|
||||
fi
|
||||
LIBS="$ac_func_search_save_LIBS"
|
||||
LIBS=$ac_func_search_save_LIBS
|
||||
])
|
||||
|
||||
if test "$ac_cv_search_$1" = "no"; then :
|
||||
if test "$ac_cv_search_$1" = no; then :
|
||||
$4
|
||||
else
|
||||
if test "$ac_cv_search_$1" = "none required"; then :
|
||||
if test "$ac_cv_search_$1" = 'none required'; then :
|
||||
$4
|
||||
else
|
||||
LIBS="$ac_cv_search_$1 $LIBS"
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#serial 8
|
||||
#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)
|
||||
@@ -36,8 +37,7 @@ AC_DEFUN(jm_FUNC_GNU_STRFTIME,
|
||||
AC_CHECK_HEADERS(sys/time.h)
|
||||
AC_CACHE_CHECK([for working GNU strftime], jm_cv_func_working_gnu_strftime,
|
||||
[AC_TRY_RUN(
|
||||
changequote(<<, >>)dnl
|
||||
<< /* Ulrich Drepper provided parts of the test program. */
|
||||
[ /* Ulrich Drepper provided parts of the test program. */
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
@@ -77,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");
|
||||
@@ -134,9 +139,7 @@ main ()
|
||||
CMP ("%z", "+0000"); /* GNU */
|
||||
|
||||
exit (n_fail ? 1 : 0);
|
||||
}
|
||||
>>,
|
||||
changequote([, ])dnl
|
||||
}],
|
||||
jm_cv_func_working_gnu_strftime=yes,
|
||||
jm_cv_func_working_gnu_strftime=no,
|
||||
dnl When crosscompiling, assume strftime is missing or broken.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
chgrp \- change group ownership
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
dircolors \- color setup for ls
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/du.x
2
man/du.x
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
du \- estimate file space usage
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
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
|
||||
2
man/ln.x
2
man/ln.x
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
ln \- make links between files
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/ls.x
2
man/ls.x
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
ls \- list directory contents
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
mkdir \- make directories
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
mkfifo \- make FIFOs (named pipes)
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
mknod \- make block or character special files
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/mv.x
2
man/mv.x
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
mv \- move (rename) files
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
rmdir \- remove empty directories
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
shred \- delete a file securely, first overwriting it to hide its contents
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
sync \- flush filesystem buffers
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
touch \- change file timestamps
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" 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,4 +1,4 @@
|
||||
[NAME]
|
||||
vdir \- list directory contents
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,3 +1,285 @@
|
||||
2000-05-06 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/Makefile.am (shred_LDADD): Add @LIB_CLOCK_GETTIME@.
|
||||
|
||||
* src/rmdir.c (EEXIST): Remove now-unused definition.
|
||||
(ENOTEMPTY): Likewise.
|
||||
(errno_rmdir_non_empty): Rewrite to use RMDIR_ERRNO_NOT_EMPTY,
|
||||
which is determined by the autoconf test in m4/rmdir-errno.m4..
|
||||
|
||||
2000-05-03 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
Don't fail when running `make check' with non-`C' locale.
|
||||
* tests/cp/symlink-slash: During ls, set LANGUAGE (for GNU gettext)
|
||||
and LC_ALL (for systems which look at LC_MESSAGES).
|
||||
* tests/rm/r-2: Define LC_ALL instead of LANG, in case the user has
|
||||
LC_CTYPE or LC_ALL set. Define it and LANGUAGE before the first use
|
||||
of sort.
|
||||
|
||||
2000-05-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
With a recent glibc, _GNU_SOURCE, and -O, strndup may be a macro.
|
||||
* src/sys2.h (!HAVE_DECL_STRNDUP): Declare strndup.
|
||||
* src/dircolors.c: Remove declaration of strndup.
|
||||
Reported by Bruno Haible.
|
||||
|
||||
2000-05-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/rm.c (usage): Add the answer to `How do I remove a file named -f?'
|
||||
|
||||
2000-05-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/install.c (change_attributes): Don't even attempt the chmod
|
||||
if the chown fails. Before, when a non-root user ran `install -m 4755
|
||||
-o nobody FILE DEST', DEST would set-uid not to `nobody' but rather to
|
||||
the ID of the installing user. Reported by Marc Olzheim.
|
||||
|
||||
2000-04-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/touch.c (O_NOCTTY): Define if not defined already.
|
||||
(touch): Add O_NOCTTY to the flags passed to open.
|
||||
|
||||
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.
|
||||
|
||||
* src/sys2.h: Guard declaration of strtoull also with
|
||||
`&& HAVE_UNSIGNED_LONG_LONG'.
|
||||
|
||||
* src/sys2.h: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL...'
|
||||
now that autoconf always defines the HAVE_DECL_ symbols.
|
||||
|
||||
* src/install.c (install_file_to_path): Always use install_file_in_file.
|
||||
Based on a patch from Adam Klein via Michael Stone.
|
||||
|
||||
* tests/install/Makefile.am (TESTS): Add create-leading.
|
||||
* tests/install/create-leading: New file.
|
||||
|
||||
* tests/install/basic-1: Clean up.
|
||||
* tests/install/Makefile.am (TESTS_ENVIRONMENT): Add PATH. Remove cruft.
|
||||
|
||||
2000-02-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Tranform the generated src/Makefile.in file so it falls back on
|
||||
using /bin/rm when necessary. The old rule didn't always work.
|
||||
This is necessary only on certain losing systems, and because this
|
||||
package builds an `rm' executable and some people put `.' too
|
||||
early in their PATH.
|
||||
* Makefile.am (DISTCLEANFILES): Remove .deps and `FIXME' comment.
|
||||
(EXTRA_DIST): Add .kludge-stamp.
|
||||
(.kludge-stamp): New rule.
|
||||
* src/Makefile.am (AUTOMAKE): Remove definition.
|
||||
(Makefile.in): Remove dependency on automake-wrap script.
|
||||
(EXTRA_DIST): Remove automake-wrap.
|
||||
* src/automake-wrap: Remove file.
|
||||
|
||||
* tests/rm/r-2: Don't make the success of the test depend on the
|
||||
order in which directory entries are processed.
|
||||
Reported by Andreas Schwab.
|
||||
|
||||
2000-02-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* po/POTFILES.in: Add lib/userspec.c.
|
||||
|
||||
* doc/fileutils.texi (chown invocation): Deprecate use of `.'.
|
||||
|
||||
* src/chown.c (usage): Mention only `:', and not `.' as the separator,
|
||||
since POSIX allows only the former.
|
||||
Prompted by a report from Manas Garg.
|
||||
|
||||
2000-02-11 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/df.c (main): Count the stat'able arguments.
|
||||
Print the header line only if there is at least one valid argument.
|
||||
Reported by Andy Longton <alongton@metamark.com>
|
||||
|
||||
2000-02-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Make du work when invoked from an unreadable directory.
|
||||
|
||||
* src/du.c (pop_dir): New function.
|
||||
(count_entry): Factor out common code (pop_dir), and call the new
|
||||
function instead.
|
||||
Move declaration of global, `stat_buf' into this function.
|
||||
(du_files): Don't stat `.' or call save_cwd, since count_entry
|
||||
never returns with a changed working directory.
|
||||
|
||||
2000-02-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/mv/mv-special-1: Use $null and $dir in place of literals
|
||||
in `here' script.
|
||||
Exit 77 if we can't set up the framework (Volker Borchert reported
|
||||
that this test would fail because mknod failed when run on SunOS4.1.4
|
||||
using NFS-mounted disk from an OpenBSD system).
|
||||
|
||||
2000-02-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/copy.c (copy_internal): Don't allow mv to move a directory onto
|
||||
a non-directory. Reported by Brian Kimball via Michael Stone.
|
||||
|
||||
2000-02-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/mv/Makefile.am (TESTS): Add dir-file.
|
||||
(TESTS_ENVIRONMENT): Remove vestiges of old tests.
|
||||
* tests/mv/dir-file: New file.
|
||||
|
||||
2000-02-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/touch/Makefile.am (TESTS): Add fifo.
|
||||
* tests/touch/fifo (fail): New file.
|
||||
|
||||
2000-02-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/touch.c (O_NDELAY): Define to 0 if not defined.
|
||||
(O_NONBLOCK): Define to O_NDELAY if not defined.
|
||||
(touch): Open with O_NONBLOCK, so one can touch a fifo without hanging.
|
||||
Reported by Eric G. Miller via Michael Stone.
|
||||
|
||||
* man/*.x: Change ." to .\".
|
||||
Reported by Andreas Schwab and Brendan O'Dea.
|
||||
|
||||
2000-01-31 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* man/Makefile.maint (ginstall_filter): Define.
|
||||
($(man_MANS)): Use it here so that the install.1 man page refers
|
||||
to `install', not `ginstall'. Reported by Andreas Schwab.
|
||||
|
||||
2000-01-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0p.
|
||||
|
||||
@@ -1,4 +1,27 @@
|
||||
Changes in release 4.1:
|
||||
[4.0s]
|
||||
* install no longer performs chmod if chown fails (see ChangeLog for example)
|
||||
[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
|
||||
This is at the expense of always looking up the entire USER.GROUP string
|
||||
as a login name first, and only then (upon failure) interpreting the `.'
|
||||
as a separator and looking up `USER'. To avoid the extra getpwnam call,
|
||||
always use the POSIX-mandated `:' character as the separator.
|
||||
* `du some-other-dir' no longer fails if it can't open the current directory
|
||||
* `mv DIR EXISTING-FILE' no longer removes EXISTING-FILE. Now it gets an error
|
||||
as POSIX says it must.
|
||||
* touch no longer hangs on fifos
|
||||
[4.0p]
|
||||
* various tools: quote multibyte characters correctly in diagnostics
|
||||
* mv: portability fix for alpha
|
||||
@@ -15,7 +38,7 @@ Changes in release 4.1:
|
||||
[4.0m]
|
||||
* mv accepts new option: --strip-trailing-slashes (soon, many other
|
||||
programs will, too)
|
||||
* df no longer hangs when there is inaccessible mount point unrelated to PATH
|
||||
* df no longer hangs when there is an inaccessible mount point unrelated to PATH
|
||||
* rmdir --verbose no longer prints extra, bogus diagnosic upon failure
|
||||
* fix df bug that made it print bogus values in the `Use%' column.
|
||||
* touch -d once again parses dates with `hh:mm ZONE' time zone info.
|
||||
@@ -50,6 +73,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,7 +1,220 @@
|
||||
2000-05-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0i.
|
||||
|
||||
2000-05-07 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0h.
|
||||
|
||||
* src/basename.c: Include "closeout.h".
|
||||
(main): Call atexit with close_stdout.
|
||||
* src/chroot.c: Likewise.
|
||||
* src/dirname.c: Likewise.
|
||||
* src/echo.c: Likewise.
|
||||
* src/env.c: Likewise.
|
||||
* src/expr.c: Likewise.
|
||||
* src/factor.c: Likewise.
|
||||
* src/hostid.c: Likewise.
|
||||
* src/hostname.c: Likewise.
|
||||
* src/id.c: Likewise.
|
||||
* src/logname.c: Likewise.
|
||||
* src/nice.c: Likewise.
|
||||
* src/pathchk.c: Likewise.
|
||||
* src/pinky.c: Likewise.
|
||||
* src/printf.c: Likewise.
|
||||
* src/pwd.c: Likewise.
|
||||
* src/seq.c: Likewise.
|
||||
* src/stty.c: Likewise.
|
||||
* src/su.c: Likewise.
|
||||
* src/test.c: Likewise.
|
||||
* src/uname.c: Likewise.
|
||||
* src/uptime.c: Likewise.
|
||||
* src/users.c: Likewise.
|
||||
* src/who.c: Likewise.
|
||||
* src/whoami.c: Likewise.
|
||||
* src/tee.c: Likewise. Remove explicit close_stdout.
|
||||
|
||||
* src/yes.c Include "closeout.h".
|
||||
(usage): Call close_stdout just before exit.
|
||||
* src/sleep.c: Likewise.
|
||||
* src/true.c: Likewise.
|
||||
* src/date.c (usage): Call close_stdout_status.
|
||||
* src/printenv.c (usage): Likewise.
|
||||
|
||||
* tests/date/Test.pm ($Test::env{'rfc822-1'}): Add TZ=UTC0.
|
||||
|
||||
2000-05-06 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/Makefile.am (sleep_LDADD): Add @LIB_CLOCK_GETTIME@ and
|
||||
@LIB_NANOSLEEP@.
|
||||
|
||||
* src/tty.c (main): Warn about arguments, don't fail.
|
||||
(usage): Call close_stdout_status from here as well as from main.
|
||||
|
||||
2000-05-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Exit nonzero upon write failure.
|
||||
* src/printf.c: Include "closeout.h".
|
||||
(main): Call close_stdout.
|
||||
Reported by Ian Jackson via Michael Stone.
|
||||
|
||||
2000-05-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (my-distcheck): Remove spurious blank line.
|
||||
Remove $(DEPDIR) *after* making distclean, not before.
|
||||
|
||||
2000-04-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/yes.c: Detect and terminate upon write failure.
|
||||
|
||||
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.
|
||||
From John Kendall.
|
||||
|
||||
2000-02-15 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* man/Makefile.maint ($(man_MANS)): Remove $@-t1.
|
||||
|
||||
2000-02-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/Fetish.pm (run_tests): Discard stderr.
|
||||
Reverse diff args, so `expected' is last, as in mk-script.
|
||||
|
||||
2000-02-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/mk-script: Invoke `diff' when differences are found.
|
||||
* tests/Fetish.pm (run_tests): Likewise.
|
||||
|
||||
2000-02-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/su.c (correct_password): Correct HAVE_STRUCT_* name in #if guard
|
||||
to go along with corrected autoconf test: Reported by Gaël Quéri.
|
||||
|
||||
2000-02-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0f.
|
||||
|
||||
* src/who.c: Use UT_USER in place of hard-coded `->ut_name' here, too.
|
||||
* src/pinky.c: Likewise.
|
||||
Reported by Tom Tromey and Andreas Schwab.
|
||||
* src/uptime.c (print_uptime): Likewise.
|
||||
* src/users.c (list_entries_users): Likewise.
|
||||
|
||||
2000-01-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0e.
|
||||
|
||||
* src/su.c (correct_password): Guard with `HAVE_GETSPNAM &&
|
||||
HAVE_STRUCT_PASSWD_SP_PWDP', rather than just `#ifdef HAVE_SHADOW_H'.
|
||||
|
||||
* po/POTFILES.in: Add lib/makepath.c, lib/obstack.c, lib/rpmatch.c,
|
||||
and lib/same.c.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user