mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
841 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
441c8ebc90 | ||
|
|
272a1b3903 | ||
|
|
5efe3f8221 | ||
|
|
d5c938e2ba | ||
|
|
b5dfcc1d0d | ||
|
|
54a31f6d9a | ||
|
|
a0edaedbf3 | ||
|
|
39458c8430 | ||
|
|
7d0b66769a | ||
|
|
120506c26d | ||
|
|
4f32d876d8 | ||
|
|
5693cbd8fe | ||
|
|
eda3639e19 | ||
|
|
a6b45f1ed4 | ||
|
|
40ab0a7c72 | ||
|
|
b4713a2899 | ||
|
|
1109bcd1f7 | ||
|
|
b461b366d2 | ||
|
|
e4c013c0f4 | ||
|
|
3eecca631b | ||
|
|
123a296dd2 | ||
|
|
90830646f1 | ||
|
|
285eeddfd5 | ||
|
|
bc87c668c4 | ||
|
|
ab8e35d397 | ||
|
|
8effe1d8af | ||
|
|
db425e487a | ||
|
|
f2176e82ad | ||
|
|
d61aba00f0 | ||
|
|
83c37b47f8 | ||
|
|
48606016b8 | ||
|
|
7c4f69a2fa | ||
|
|
c42926bf1e | ||
|
|
8329b522c0 | ||
|
|
15c5a31fb5 | ||
|
|
cad299f354 | ||
|
|
ca08290d8b | ||
|
|
5ef577f0e7 | ||
|
|
803a3441b1 | ||
|
|
497560dfe9 | ||
|
|
f24368a67a | ||
|
|
fad1b46e08 | ||
|
|
32a2c6f6d9 | ||
|
|
58354c9643 | ||
|
|
252d2d236c | ||
|
|
1307f23068 | ||
|
|
69c63039b9 | ||
|
|
9aecd7ec8a | ||
|
|
46a8f2d4f5 | ||
|
|
a3c0bb50f3 | ||
|
|
37ffd45ac8 | ||
|
|
016d23cb89 | ||
|
|
d51ca19934 | ||
|
|
12237951e6 | ||
|
|
19add5a9f2 | ||
|
|
39935bf2f5 | ||
|
|
19332b9ce5 | ||
|
|
be823d745c | ||
|
|
4f78b3f40f | ||
|
|
c8f1cbc602 | ||
|
|
7e815d32f3 | ||
|
|
959a2409fe | ||
|
|
6599007a62 | ||
|
|
21f65c951c | ||
|
|
354996bc09 | ||
|
|
a29f991b84 | ||
|
|
64521cfa9a | ||
|
|
1b0d576996 | ||
|
|
b5125cf5f0 | ||
|
|
e5e207df7c | ||
|
|
d68aa4125b | ||
|
|
ba53da9675 | ||
|
|
8e34468f61 | ||
|
|
32a804c941 | ||
|
|
adde093823 | ||
|
|
d24393e12d | ||
|
|
f328802261 | ||
|
|
4e85b8c0c8 | ||
|
|
6f7b4ca60a | ||
|
|
ae90f9f16e | ||
|
|
6d7db642c3 | ||
|
|
d4bac14488 | ||
|
|
1d2f905052 | ||
|
|
eabefdb575 | ||
|
|
cb88f838b9 | ||
|
|
a79673ff2a | ||
|
|
6568f37384 | ||
|
|
96f7791a8b | ||
|
|
0f46c3a0aa | ||
|
|
326b48f041 | ||
|
|
6f7e60b1f4 | ||
|
|
761fec62a5 | ||
|
|
8db77b8978 | ||
|
|
9c557c0a27 | ||
|
|
d111de83e5 | ||
|
|
e1584f504f | ||
|
|
1dae2a560a | ||
|
|
208b8da666 | ||
|
|
7c6b61d57d | ||
|
|
63861fc012 | ||
|
|
53cca5451c | ||
|
|
4927015380 | ||
|
|
e96ddb3907 | ||
|
|
b8760e0f09 | ||
|
|
f37e7c032a | ||
|
|
112cba9a8b | ||
|
|
ff443fffa3 | ||
|
|
5b9ea05b6a | ||
|
|
c9ed2d4e4b | ||
|
|
6b31ccecb8 | ||
|
|
b34abb6f44 | ||
|
|
b194aad646 | ||
|
|
d574f4a249 | ||
|
|
f5f030cd09 | ||
|
|
d4e2672d7c | ||
|
|
a61ffc8c12 | ||
|
|
6b46572468 | ||
|
|
317a34daf8 | ||
|
|
aacb015d41 | ||
|
|
0dca45f310 | ||
|
|
d743e47970 | ||
|
|
477fd9c12e | ||
|
|
14031cbf92 | ||
|
|
f928e16280 | ||
|
|
35ded2ce44 | ||
|
|
116f76d19c | ||
|
|
b269489ba1 | ||
|
|
5624c49daf | ||
|
|
32f2b4d3ca | ||
|
|
4720108b1c | ||
|
|
a42c0ab2e7 | ||
|
|
79977fa157 | ||
|
|
755af34510 | ||
|
|
d5cf04bd31 | ||
|
|
0efd253b5d | ||
|
|
d52a2f1542 | ||
|
|
e2e3a9a41c | ||
|
|
864de4b741 | ||
|
|
ba2eb10a80 | ||
|
|
77723f8252 | ||
|
|
d495468b37 | ||
|
|
33f0fe8094 | ||
|
|
c7eab83c3e | ||
|
|
3a7b7b002d | ||
|
|
42d3f8ff68 | ||
|
|
3bfb395872 | ||
|
|
e496ebd4f9 | ||
|
|
c2374d61cd | ||
|
|
859428bfaa | ||
|
|
4ad6473e4f | ||
|
|
6d2bd321e8 | ||
|
|
6d43a16e3f | ||
|
|
51ceee4577 | ||
|
|
3ac852c895 | ||
|
|
c2ff181eca | ||
|
|
83ca2782f9 | ||
|
|
0a2917372d | ||
|
|
133f79583f | ||
|
|
c540aafa3f | ||
|
|
b30d80a586 | ||
|
|
5c01750b43 | ||
|
|
05731b4717 | ||
|
|
138fd919b8 | ||
|
|
59aca01693 | ||
|
|
12e8f82540 | ||
|
|
2ec0b8355c | ||
|
|
bc92090949 | ||
|
|
b358b98f1c | ||
|
|
b50457c5b3 | ||
|
|
47dfac7b19 | ||
|
|
8f85628841 | ||
|
|
2ada37fa94 | ||
|
|
aae3b8e336 | ||
|
|
fb864a8db7 | ||
|
|
89d9530643 | ||
|
|
4c8f617f70 | ||
|
|
3cdc49b0ee | ||
|
|
d85a6aa4a5 | ||
|
|
b01dd9232d | ||
|
|
6e036c0593 | ||
|
|
307fbc8ae6 | ||
|
|
28b3b79f30 | ||
|
|
0c2dd1fe07 | ||
|
|
d294e440c3 | ||
|
|
bcf7749785 | ||
|
|
9e6e479047 | ||
|
|
8b2c8b091c | ||
|
|
161d3c8d76 | ||
|
|
3914dba415 | ||
|
|
5fe0d2293d | ||
|
|
3dade24681 | ||
|
|
f0a5712f74 | ||
|
|
2b04698566 | ||
|
|
0bf9e8687d | ||
|
|
2b5eb31b81 | ||
|
|
efa6493662 | ||
|
|
35e65fbf15 | ||
|
|
8c9de91ad1 | ||
|
|
03f3bf246b | ||
|
|
a46ae031d3 | ||
|
|
f9b9a990c4 | ||
|
|
04dd482b80 | ||
|
|
95857d75da | ||
|
|
e0418912ff | ||
|
|
8ea48114d3 | ||
|
|
8a615a4bf7 | ||
|
|
ff85d09b52 | ||
|
|
a44ae437d1 | ||
|
|
8a75477940 | ||
|
|
970d452fbb | ||
|
|
4246f6ed52 | ||
|
|
91c698cb2f | ||
|
|
5fdac01e0c | ||
|
|
09c6cc9f9c | ||
|
|
42cd1376ed | ||
|
|
dfbef7497d | ||
|
|
d5ebb3b6fa | ||
|
|
5ff2043ef2 | ||
|
|
b289f42fdf | ||
|
|
de4077cbe3 | ||
|
|
33a46de4ad | ||
|
|
cad207ec23 | ||
|
|
8b384adc97 | ||
|
|
6cf1fd0c87 | ||
|
|
38a0ec7565 | ||
|
|
cee8853f77 | ||
|
|
3ed2170b64 | ||
|
|
30b2b9caaf | ||
|
|
cc0274b020 | ||
|
|
5acac69fde | ||
|
|
432d98178d | ||
|
|
b605919f56 | ||
|
|
08c0001e89 | ||
|
|
6d6f7c4ab0 | ||
|
|
ee1dffc94c | ||
|
|
1c0e2e41d0 | ||
|
|
4f1ec3fd54 | ||
|
|
9341d1f804 | ||
|
|
0b958357b0 | ||
|
|
4545986b08 | ||
|
|
62b9c742e9 | ||
|
|
91dea2139e | ||
|
|
719c0b709c | ||
|
|
ff72da8ce0 | ||
|
|
8ccf7c033d | ||
|
|
cd40ac8029 | ||
|
|
a5edf93f28 | ||
|
|
9ce9757db1 | ||
|
|
2e17bffdb5 | ||
|
|
4d599fe1f9 | ||
|
|
acd0f0af4b | ||
|
|
392f0ff40c | ||
|
|
6bcd4b08ba | ||
|
|
1844eee69a | ||
|
|
83563c918a | ||
|
|
dc9d2eaaa0 | ||
|
|
588e9f6a69 | ||
|
|
d14b702016 | ||
|
|
0e733fb3db | ||
|
|
0d6c9af250 | ||
|
|
9253fdd9a2 | ||
|
|
11fb977675 | ||
|
|
b8735ae4a0 | ||
|
|
0e79eb8a57 | ||
|
|
c75911b034 | ||
|
|
b669dfeb11 | ||
|
|
d2bebfab0e | ||
|
|
40959940d9 | ||
|
|
417a6cd6f5 | ||
|
|
aa85d5d6c7 | ||
|
|
738b7eb8e4 | ||
|
|
19fbe90711 | ||
|
|
07cc4078f1 | ||
|
|
e75cbaa337 | ||
|
|
65fccc2340 | ||
|
|
92bbc5bbaf | ||
|
|
e07c146aa1 | ||
|
|
e7c3673528 | ||
|
|
2a7d10a766 | ||
|
|
c393a4fa20 | ||
|
|
383db808ef | ||
|
|
b9baae93b4 | ||
|
|
068f2224f9 | ||
|
|
208b95e198 | ||
|
|
3ceea0946b | ||
|
|
edbfa74a8a | ||
|
|
de678f9321 | ||
|
|
633fbb7c66 | ||
|
|
4a6f13aa2f | ||
|
|
954603b708 | ||
|
|
f6b3325690 | ||
|
|
44c64b7810 | ||
|
|
507ecb8d3e | ||
|
|
bf7a41befb | ||
|
|
3c5cd2319b | ||
|
|
351f9f7436 | ||
|
|
450f30c5da | ||
|
|
9de1b71bda | ||
|
|
218d2a739c | ||
|
|
45840e899f | ||
|
|
60f6a7d72f | ||
|
|
a647c23ca2 | ||
|
|
6a9dbd3e33 | ||
|
|
98a799ac0a | ||
|
|
e7ae9459f9 | ||
|
|
43596a06a3 | ||
|
|
0ba7b84893 | ||
|
|
70e17d65dd | ||
|
|
82f74da190 | ||
|
|
0db39dc64d | ||
|
|
465e39e101 | ||
|
|
18944fe439 | ||
|
|
84faaa2188 | ||
|
|
474db3e6a4 | ||
|
|
3784619db7 | ||
|
|
f1d7d48ebb | ||
|
|
2c8b39745b | ||
|
|
aac3c83ed0 | ||
|
|
1e0d9f6c44 | ||
|
|
a15096482c | ||
|
|
1e006fb1ea | ||
|
|
0bf3b0e892 | ||
|
|
fcd7666d6e | ||
|
|
01b2facd29 | ||
|
|
ded8e8e6f4 | ||
|
|
404585e739 | ||
|
|
6118590130 | ||
|
|
c6fdfa80ff | ||
|
|
f43ec51105 | ||
|
|
fbb7e6632b | ||
|
|
8f92b22d98 | ||
|
|
563aaa8d0b | ||
|
|
611702a917 | ||
|
|
6926a9ca67 | ||
|
|
2ebe20a54b | ||
|
|
51fd72e0ea | ||
|
|
501a8e54b9 | ||
|
|
481fd54919 | ||
|
|
01d33d71dc | ||
|
|
c8023d768a | ||
|
|
63c87fccb3 | ||
|
|
8408a9a92a | ||
|
|
91d8522cbe | ||
|
|
a5dbfa1756 | ||
|
|
fcf3830db0 | ||
|
|
361f358a64 | ||
|
|
b97f30e0a1 | ||
|
|
352b014540 | ||
|
|
ef07d7b020 | ||
|
|
01170d044a | ||
|
|
a4fa7bc1f0 | ||
|
|
eaf4e73506 | ||
|
|
2861487e31 | ||
|
|
2e637905f9 | ||
|
|
353c4cbcd4 | ||
|
|
20bbe4ed6b | ||
|
|
199e0abbe0 | ||
|
|
3bb7c314bd | ||
|
|
ec8405327c | ||
|
|
9d8449fbeb | ||
|
|
e53217d245 | ||
|
|
2e2f4032ef | ||
|
|
46e8766586 | ||
|
|
9a687b646b | ||
|
|
81c26ff410 | ||
|
|
5b06e5f698 | ||
|
|
43cab34a90 | ||
|
|
dab683385b | ||
|
|
941f333849 | ||
|
|
c2d5a2ac32 | ||
|
|
5084ad7014 | ||
|
|
5dc10e1e85 | ||
|
|
06b486287f | ||
|
|
54978a766d | ||
|
|
8b0170befa | ||
|
|
510f263a2c | ||
|
|
9f818bb79f | ||
|
|
6d1208ecf2 | ||
|
|
271dade11d | ||
|
|
864b4ae3a1 | ||
|
|
da5cbe5ef8 | ||
|
|
e5818cca68 | ||
|
|
4a57eac20d | ||
|
|
47158d0de8 | ||
|
|
2aad14c59a | ||
|
|
ccda0b0c8b | ||
|
|
4f23b932ed | ||
|
|
62ce772497 | ||
|
|
7304b6fa17 | ||
|
|
ad5d1a84fe | ||
|
|
04c93a0e13 | ||
|
|
46cab6debc | ||
|
|
4b048826c7 | ||
|
|
53a32e5fe4 | ||
|
|
71bf6b1420 | ||
|
|
009bf56df8 | ||
|
|
75edcde81a | ||
|
|
e86ab6d4d2 | ||
|
|
4c89642c83 | ||
|
|
88a30ac10e | ||
|
|
52f5243a92 | ||
|
|
1bc914b7de | ||
|
|
8c34e76480 | ||
|
|
4a4a7de6a2 | ||
|
|
c3078fa05a | ||
|
|
0ab9c4a0fa | ||
|
|
dba7483095 | ||
|
|
bf1245e2f3 | ||
|
|
e53732b471 | ||
|
|
ebe74e183e | ||
|
|
4ad5932cda | ||
|
|
095fcca5a5 | ||
|
|
1f9186195f | ||
|
|
5594c4570e | ||
|
|
86b58740ce | ||
|
|
fcd082a280 | ||
|
|
38c68676ac | ||
|
|
e606dacc98 | ||
|
|
6b6141eb01 | ||
|
|
885d681dff | ||
|
|
0dd2834cd2 | ||
|
|
72944b4c69 | ||
|
|
4e8485f525 | ||
|
|
9362cd7fa7 | ||
|
|
c9f1c50085 | ||
|
|
ab74875511 | ||
|
|
afb5da4098 | ||
|
|
bfa07fbaaa | ||
|
|
749de53b9d | ||
|
|
fadd323677 | ||
|
|
db417f264e | ||
|
|
ba2b74806e | ||
|
|
ddfb52fb2f | ||
|
|
7665d4286a | ||
|
|
1b9d382b97 | ||
|
|
efc545bd54 | ||
|
|
95fa743ec4 | ||
|
|
a50b49d429 | ||
|
|
38f8cadb9c | ||
|
|
e46a15ec9c | ||
|
|
1ab36ba392 | ||
|
|
e4ac725a11 | ||
|
|
1df8b738db | ||
|
|
f8fd2a622b | ||
|
|
4fcd535089 | ||
|
|
7d70fd68c5 | ||
|
|
e587321214 | ||
|
|
364c12825c | ||
|
|
c7b2637d88 | ||
|
|
55dab17c42 | ||
|
|
fab4d80dfb | ||
|
|
75247be90c | ||
|
|
92359d2df0 | ||
|
|
e2ceb48225 | ||
|
|
dadd6992a2 | ||
|
|
23dbc2747d | ||
|
|
8f3b0f9c1f | ||
|
|
7651fac5e3 | ||
|
|
6fcc182f3f | ||
|
|
c86a6cc089 | ||
|
|
b438bad2a8 | ||
|
|
5bd6b069d9 | ||
|
|
5c6ae386f4 | ||
|
|
8f4221ebd2 | ||
|
|
aade1ba993 | ||
|
|
9a00ec8821 | ||
|
|
d4b2b56f61 | ||
|
|
48450c549f | ||
|
|
4b9b4b374d | ||
|
|
9992038455 | ||
|
|
b09ee97a1a | ||
|
|
13f017568f | ||
|
|
39beb31640 | ||
|
|
56e1e5d825 | ||
|
|
c3e009a84a | ||
|
|
c358b6fe16 | ||
|
|
4f821757d2 | ||
|
|
b121f086e8 | ||
|
|
85ad1d09c1 | ||
|
|
0625941fb3 | ||
|
|
dc7b620a31 | ||
|
|
e83a04a9d7 | ||
|
|
5413c2bbae | ||
|
|
c6ba6cc22e | ||
|
|
ad54994c9b | ||
|
|
88e00a1d3b | ||
|
|
227971e576 | ||
|
|
5d51fc8a5b | ||
|
|
5f62a53f9c | ||
|
|
01d63f13e8 | ||
|
|
00a770a30e | ||
|
|
6fb0b1d366 | ||
|
|
a9335b4704 | ||
|
|
98e8b5e058 | ||
|
|
5c0abf663a | ||
|
|
3a5e722af0 | ||
|
|
1aa55ac277 | ||
|
|
56a5857660 | ||
|
|
f775835533 | ||
|
|
9d52ad8c28 | ||
|
|
3b7798ab52 | ||
|
|
6fc0245123 | ||
|
|
40b700eadb | ||
|
|
80d799b8a2 | ||
|
|
2a1e8507f4 | ||
|
|
aeec25d170 | ||
|
|
038a9b42a6 | ||
|
|
25227196a8 | ||
|
|
b20134e12c | ||
|
|
949f3a3c76 | ||
|
|
26532ef1f2 | ||
|
|
4641ffbefa | ||
|
|
eb66adf96f | ||
|
|
4421b1a969 | ||
|
|
8566426512 | ||
|
|
0035f73f02 | ||
|
|
5352c4a62b | ||
|
|
320da0f8a8 | ||
|
|
d7b1b67638 | ||
|
|
17adb8367a | ||
|
|
e55a05cecf | ||
|
|
8f59417689 | ||
|
|
216fe27e16 | ||
|
|
1a056dabfd | ||
|
|
a12ea0b255 | ||
|
|
ab2a67a331 | ||
|
|
3c95527a01 | ||
|
|
5b5557e3a3 | ||
|
|
92f900fdf3 | ||
|
|
6a0019aa78 | ||
|
|
4fd6d22880 | ||
|
|
c2173890f0 | ||
|
|
2c199e6990 | ||
|
|
9eb8322209 | ||
|
|
888d3d38d9 | ||
|
|
a6a4c372c0 | ||
|
|
74de8e29a8 | ||
|
|
e2cad9b457 | ||
|
|
9153514495 | ||
|
|
f01fcb05a9 | ||
|
|
9b652d0790 | ||
|
|
8a7f744635 | ||
|
|
ddc5610b88 | ||
|
|
ea67851e7e | ||
|
|
cc43b4e784 | ||
|
|
f6d13ddf6d | ||
|
|
b037820eb4 | ||
|
|
7afaa765d3 | ||
|
|
8eb2464d3e | ||
|
|
007103be2e | ||
|
|
dfd12de6b9 | ||
|
|
13f9aa90fa | ||
|
|
49f700b61c | ||
|
|
f4c0d12cb0 | ||
|
|
6c1a29f06f | ||
|
|
2de1d40446 | ||
|
|
0919600481 | ||
|
|
3de521ebf9 | ||
|
|
9f763671c0 | ||
|
|
06dacc0d6d | ||
|
|
a228d68c33 | ||
|
|
b99914ff5b | ||
|
|
4a389e1d0b | ||
|
|
0b65f598c8 | ||
|
|
12844e5674 | ||
|
|
0dedf7cad1 | ||
|
|
6476197bcb | ||
|
|
883159c855 | ||
|
|
8a3a1ce11f | ||
|
|
de261015e8 | ||
|
|
f197628cb2 | ||
|
|
96242be0c1 | ||
|
|
61ba51a61e | ||
|
|
f8fdfad624 | ||
|
|
b8dcf7b6e4 | ||
|
|
d16d49b67a | ||
|
|
ad06bb9c5a | ||
|
|
ef4ee07f31 | ||
|
|
00d70feed3 | ||
|
|
78986d419d | ||
|
|
a8916294ec | ||
|
|
95623ba86e | ||
|
|
75fa058191 | ||
|
|
8670b14045 | ||
|
|
1048ef4240 | ||
|
|
f53eda1b81 | ||
|
|
8a79d3d630 | ||
|
|
0a8019497e | ||
|
|
832fdc2a2e | ||
|
|
997f9e72d2 | ||
|
|
beaff195ed | ||
|
|
f1ce5dbf0e | ||
|
|
28e9fb4f73 | ||
|
|
3a6d6ae776 | ||
|
|
57d138d144 | ||
|
|
21c8705b3c | ||
|
|
f4fbb39dfd | ||
|
|
8b4a10178b | ||
|
|
6754f257e0 | ||
|
|
986b5eca57 | ||
|
|
cf09ab79a3 | ||
|
|
e3ea089119 | ||
|
|
87c13cce86 | ||
|
|
c48100ccf1 | ||
|
|
34bd9f31cc | ||
|
|
75fc3fd6a0 | ||
|
|
cbbdaf78f8 | ||
|
|
57c1158f02 | ||
|
|
61d5480f00 | ||
|
|
b9c9a002d8 | ||
|
|
46c548cab4 | ||
|
|
1867521304 | ||
|
|
3b0e09ef8c | ||
|
|
35cad8ae05 | ||
|
|
478239f404 | ||
|
|
c4ff976e20 | ||
|
|
1e97469e5a | ||
|
|
52c96899dc | ||
|
|
cfed14f3cc | ||
|
|
d500b3f1e6 | ||
|
|
63f2e7dba0 | ||
|
|
7747a57abc | ||
|
|
7f5d536dc3 | ||
|
|
3ee2423ea2 | ||
|
|
171d577cd1 | ||
|
|
c49747c6f8 | ||
|
|
a7c15d1cbd | ||
|
|
4ed5c260a3 | ||
|
|
ee0dc0c2ce | ||
|
|
4f6fe96afe | ||
|
|
e25854fbd7 | ||
|
|
0ce4463dfa | ||
|
|
2729b8b6fe | ||
|
|
7a672ec046 | ||
|
|
07b1707f8e | ||
|
|
a9477ed058 | ||
|
|
c8e2fca40c | ||
|
|
5bc75bf6a0 | ||
|
|
713c7903b9 | ||
|
|
84ddd12f18 | ||
|
|
7968d80a80 | ||
|
|
882edccbd6 | ||
|
|
67fa85dc34 | ||
|
|
5ac1c72305 | ||
|
|
8cfd51fbe5 | ||
|
|
0553d6683a | ||
|
|
412c38a757 | ||
|
|
110e377d26 | ||
|
|
241673725e | ||
|
|
b45a0ca42e | ||
|
|
fa4150ded7 | ||
|
|
a68a1cdd7f | ||
|
|
034fcf16e3 | ||
|
|
a3c951764e | ||
|
|
eafe3a6878 | ||
|
|
4c91ec1e02 | ||
|
|
2abc1e61f2 | ||
|
|
5b0f78ffc1 | ||
|
|
52c0030080 | ||
|
|
d548a76009 | ||
|
|
a06b5aaf21 | ||
|
|
d446eecbf5 | ||
|
|
4247ffb57c | ||
|
|
e52152349f | ||
|
|
8e004296ce | ||
|
|
4bcefa6248 | ||
|
|
d8b7cd1983 | ||
|
|
edfc78a913 | ||
|
|
4fc74c6897 | ||
|
|
1cc2dc28d0 | ||
|
|
4e8c9bb52d | ||
|
|
1d96791cf1 | ||
|
|
a71727efbd | ||
|
|
089e298e0c | ||
|
|
22de99d217 | ||
|
|
06a1e47a5c | ||
|
|
06e65c2c68 | ||
|
|
8051312432 | ||
|
|
9a94899976 | ||
|
|
79b611f24e | ||
|
|
f543e3d9f5 | ||
|
|
2c97f3f75b | ||
|
|
304665f224 | ||
|
|
4c4b16d783 | ||
|
|
07cb5b4b7d | ||
|
|
2a2d8eaf10 | ||
|
|
0c48a61ea4 | ||
|
|
aa9d23e551 | ||
|
|
e86f0c1699 | ||
|
|
5efadd5e0f | ||
|
|
7e4874c0d8 | ||
|
|
533c50216e | ||
|
|
b694daa08f | ||
|
|
c2f1bf1c95 | ||
|
|
d882eab2f2 | ||
|
|
c4b4c0a76d | ||
|
|
be897d7f42 | ||
|
|
de6a08aca7 | ||
|
|
cd4d79b1c3 | ||
|
|
b7fcd8d3ed | ||
|
|
b62edfd3f9 | ||
|
|
d5fdbeda89 | ||
|
|
d730a311aa | ||
|
|
a20d798296 | ||
|
|
0a94599ed5 | ||
|
|
d769c32623 | ||
|
|
bc076eac2f | ||
|
|
df80970dd5 | ||
|
|
a526befb04 | ||
|
|
dd199731fd | ||
|
|
cfaec94084 | ||
|
|
d93d0c0ff4 | ||
|
|
37bcb6853c | ||
|
|
3cd987830d | ||
|
|
0893227b13 | ||
|
|
31df60a180 | ||
|
|
930cda9304 | ||
|
|
e96ac732f5 | ||
|
|
9f70372581 | ||
|
|
ab69f41a76 | ||
|
|
eaae702647 | ||
|
|
3bd3492b1c | ||
|
|
1fd5c0ae41 | ||
|
|
58b92bbeb2 | ||
|
|
9def4be367 | ||
|
|
2b64c3929a | ||
|
|
aa32168619 | ||
|
|
0bf873ccfb | ||
|
|
6eb5e28e87 | ||
|
|
3bb4efc2af | ||
|
|
31af887efe | ||
|
|
bfcaedcedd | ||
|
|
1038acbd8a | ||
|
|
2033d5e885 | ||
|
|
d5d5c4fc68 | ||
|
|
6c93bdeeaa | ||
|
|
eaff43d5a8 | ||
|
|
912a810f6f | ||
|
|
2ab3a2f245 | ||
|
|
48f3410d03 | ||
|
|
95790ad375 | ||
|
|
179105b117 | ||
|
|
3d98688378 | ||
|
|
45c0089f12 | ||
|
|
d85d39bf4c | ||
|
|
00e065355d | ||
|
|
7b81263498 | ||
|
|
dd395a2657 | ||
|
|
ec21878690 | ||
|
|
7bf4cb61b4 | ||
|
|
f64c368593 | ||
|
|
6d73fdb3ef | ||
|
|
bac1785a6e | ||
|
|
c1b5a21a84 | ||
|
|
b6ac9a3aa5 | ||
|
|
d45d424ce1 | ||
|
|
322b0d2280 | ||
|
|
641cba7b3d | ||
|
|
83aa79e26a | ||
|
|
97cab1d39b | ||
|
|
31c3844239 | ||
|
|
e02387ea57 | ||
|
|
ef6c004648 | ||
|
|
6a5f07163f | ||
|
|
7f3e23a189 | ||
|
|
357066c663 | ||
|
|
1b2123bba3 | ||
|
|
9419ec8854 | ||
|
|
ab828ae6a1 | ||
|
|
d4fa961a32 | ||
|
|
56dada99d4 | ||
|
|
33a6eab7e6 | ||
|
|
160c7ab28e | ||
|
|
25b57f0014 | ||
|
|
435c2829f8 | ||
|
|
f05ad08d19 | ||
|
|
c3e1712629 | ||
|
|
934c4134ce | ||
|
|
519a36594e | ||
|
|
c04eed33c4 | ||
|
|
78d8a32a1a | ||
|
|
a69132e717 | ||
|
|
4bd5187248 | ||
|
|
242dabb942 | ||
|
|
60334e21a8 | ||
|
|
40989ab484 | ||
|
|
6c69e2f2cb | ||
|
|
587d16d350 | ||
|
|
b5de6ff485 | ||
|
|
ce5034feeb | ||
|
|
3ca2ab6ef4 | ||
|
|
2869e1b2ff | ||
|
|
08f905aca2 | ||
|
|
c54ba76168 | ||
|
|
5d425f8eed | ||
|
|
3ae1676b87 | ||
|
|
e2f9e5953d | ||
|
|
436b00ec6b | ||
|
|
a7641fc8e8 | ||
|
|
7eb9262da9 | ||
|
|
4752938d28 | ||
|
|
ee3967b289 | ||
|
|
808df43193 | ||
|
|
4130480d65 | ||
|
|
943a698901 | ||
|
|
8fd978c223 | ||
|
|
2aed952a5c | ||
|
|
e0ffc9e569 | ||
|
|
e3b9de9e2f | ||
|
|
0622704dce | ||
|
|
4cfe78b8a0 | ||
|
|
25c05ae140 | ||
|
|
6617d20345 | ||
|
|
c573813515 | ||
|
|
dd72f39b52 | ||
|
|
4795aa1810 | ||
|
|
84b0d3667b | ||
|
|
c05a53c48b | ||
|
|
a32e0227fe | ||
|
|
b71a48487c | ||
|
|
ba2c242694 | ||
|
|
36662095bd | ||
|
|
d1938da255 | ||
|
|
445828c958 | ||
|
|
f193c70c6b | ||
|
|
b2c3d60092 | ||
|
|
fed16f65ae | ||
|
|
fc6073d633 | ||
|
|
e46be69e86 | ||
|
|
5e1898fc01 | ||
|
|
c8c1fb97a3 | ||
|
|
4d4896eef3 | ||
|
|
22ad36e73c | ||
|
|
d8981ba19e | ||
|
|
82e0908b2c | ||
|
|
c9f8890396 | ||
|
|
48d174d271 | ||
|
|
bceb83d0a2 | ||
|
|
0a32c8d910 | ||
|
|
d8286cccd9 | ||
|
|
1c2b9c575a |
@@ -1 +1 @@
|
||||
4.5.12
|
||||
5.0
|
||||
|
||||
817
ChangeLog
817
ChangeLog
@@ -1,3 +1,820 @@
|
||||
2003-07-15 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Version 5.0.1.
|
||||
|
||||
* Makefile.maint (%.asc): Remove target first, so gpg doesn't
|
||||
prompt us about it.
|
||||
|
||||
* announce-gen (print_changelog_deltas): Relax tests for matching
|
||||
version-number line in NEWS.
|
||||
Change the .sig suffix to .asc here, too.
|
||||
|
||||
2003-07-14 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.maint (%.asc): Renamed from %.sig.
|
||||
Generate and use ascii-armored signatures.
|
||||
Use gpg's -o option.
|
||||
|
||||
2003-07-13 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/nohup.c (NOHUP_FAILURE, NOHUP_FOUND_BUT_CANNOT_INVOKE): Define.
|
||||
(main): Use them.
|
||||
|
||||
* Makefile.maint (syntax-check): Move each individual check into
|
||||
its own target.
|
||||
(syntax-check-rules): This is the list of syntax-check targets.
|
||||
(sc_unmarked_diagnostics, sc_cast_of_argument_to_free):
|
||||
(sc_cast_of_x_alloc_return_value, sc_space_tab):
|
||||
(sc_error_exit_success, sc_xalloc_h_in_src): New targets.
|
||||
|
||||
2003-07-12 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* configure.ac: Remove uses of OPTIONAL_BIN_ZCRIPTS and last
|
||||
traces of the nohup script.
|
||||
|
||||
* src/Makefile.am (bin_SCRIPTS): Remove use of just-removed
|
||||
$(OPTIONAL_BIN_ZCRIPTS).
|
||||
|
||||
* src/Makefile.am (localedir.h): Put the `2>&1' after the redirect
|
||||
target, not before the `>'.
|
||||
|
||||
* src/remove.c (remove_dir): Give a diagnostic upon failed save_cwd,
|
||||
now that that function no longer calls `error'.
|
||||
|
||||
* src/df.c (find_mount_point): Emit a diagnostic for each
|
||||
failed syscall, rather than relying on caller to do that.
|
||||
The caller couldn't do a good job, anyhow -- too many different
|
||||
ways to fail (each with a different referent).
|
||||
Give a diagnostic upon failed save_cwd, now that that function
|
||||
no longer calls `error'.
|
||||
(show_point): Don't diagnose find_mount_point's errors, now that
|
||||
it handles them itself.
|
||||
|
||||
* src/df.c (find_mount_point): Don't let free clobber errno upon
|
||||
failed chdir.
|
||||
|
||||
* src/sys2.h: Remove alloca-related block.
|
||||
* src/system.h: Include <alloca.h> here, instead.
|
||||
|
||||
It appears that the `#pragma alloca' included via "system.h" is
|
||||
adequate, since join.c uses alloca, yet lacked an in-file #pragma.
|
||||
* src/copy.c, src/cp.c, src/df.c, src/install.c, src/ln.c:
|
||||
* src/ls.c, src/mv.c, src/remove.c: Remove `#pragma alloca'.
|
||||
|
||||
* src/chown-core.c (change_file_owner): Do not restore any special
|
||||
permission bits (e.g., set-user-ID, set-group-ID) that are reset
|
||||
by chown(2) on some systems. Suggestion and insistence :-) from
|
||||
Michael Stone.
|
||||
|
||||
* tests/input-tty: Also check `test -t 1'.
|
||||
This is necessary on linux-2.4.21. Otherwise, the stty/basic-1
|
||||
test would block when run in the background.
|
||||
|
||||
2003-07-11 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/sample-test: Also fail if cat-to-create-expected-output
|
||||
fails. Otherwise, if both `exp' and `out' were to end up empty
|
||||
because of e.g., a full disk, they would mistakenly compare equal.
|
||||
|
||||
* src/nohup.c: New file. Rewrite of nohup.sh in C.
|
||||
This solves a portability problem: on at least Solaris systems,
|
||||
when nohup.sh used the vendor /bin/sh, it would exit with status
|
||||
of `1' rather than the required 126 or 127 upon failure to exec
|
||||
the specified program.
|
||||
|
||||
* src/Makefile.am (EXTRA_SCRIPTS): Remove definition.
|
||||
(bin_PROGRAMS): Add nohup.
|
||||
(EXTRA_DIST): Remove nohup.sh.
|
||||
(all_programs): Remove use of $(EXTRA_SCRIPTS).
|
||||
* src/nohup.sh: Remove file.
|
||||
* man/Makefile.am (nohup.1): Depend on nohup.c, rather than nohup.sh.
|
||||
|
||||
* tests/misc/nohup: Tests for the above.
|
||||
* tests/misc/Makefile.am (TESTS): Add nohup.
|
||||
|
||||
* src/head.c (diagnose_copy_fd_failure): New function, renamed from
|
||||
the macro, COPY_FD_DIAGNOSE.
|
||||
(diagnose_copy_fd_failure): Enclose diagnostic in _(...).
|
||||
(head_file): Likewise.
|
||||
|
||||
* src/date.c: Include "quote.h".
|
||||
(batch_convert): Use the quote function rather than using literal `...'
|
||||
in a diagnostic.
|
||||
|
||||
* src/setuidgid.c (main): Enclose diagnostic in _(...).
|
||||
* src/fmt.c (main): Likewise.
|
||||
* src/mknod.c (main): Likewise.
|
||||
* src/tac.c (tac_seekable): Likewise.
|
||||
* src/yes.c (main): Likewise.
|
||||
* src/od.c (main): Likewise.
|
||||
* src/install.c (change_attributes): Likewise.
|
||||
|
||||
2003-07-10 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/head.c (usage): Use 1024*1024 in place of 1048576.
|
||||
* src/tail.c (usage): Likewise.
|
||||
|
||||
* tests/rm/fail-2eperm: Now that we have setuidgid, use it in
|
||||
place of the kludge in this test. Suggestion from Paul Jarc.
|
||||
|
||||
* src/Makefile.am (noinst_PROGRAMS): Define to setuidgid.
|
||||
* src/setuidgid.c: New program, solely for testing (not installed).
|
||||
|
||||
* src/chown-core.c (change_file_owner): Don't leak file descriptors
|
||||
when dereferencing symlinks.
|
||||
|
||||
2003-07-09 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/du/slash: New file/test for today's lib/ftw.c fix.
|
||||
* tests/du/Makefile.am (TESTS): Add slash
|
||||
|
||||
* src/tail.c (xlseek): Avoid warning about ``return without value
|
||||
from function returning non-void''.
|
||||
|
||||
2003-07-08 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* man/help2man: Update to version 1.29.
|
||||
|
||||
* man/help2man: Add END handler to close STDOUT and check for errors.
|
||||
|
||||
2003-06-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Add support for a "[" that conforms to the GNU coding standards,
|
||||
i.e., that does not depend on its name.
|
||||
* src/lbracket.c: New file.
|
||||
* README: Add "[".
|
||||
* man/Makefile.am (programs): Ignore "[", since it doesn't have
|
||||
a separate man page.
|
||||
* src/Makefile.am (bin_PROGRAMS): Add "[".
|
||||
(__SOURCES): New var.
|
||||
* src/test.c (LBRACKET): Define to 0 if not defined.
|
||||
(main): Use LBRACKET rather than argv[0].
|
||||
|
||||
* src/test.c (one_argument): Do not check for -t if POSIXLY_CORRECT.
|
||||
Reported by Paul Jarc and Dan Jacobson.
|
||||
|
||||
* src/test.c (main): Do not recognize --help or --version if
|
||||
POSIXLY_CORRECT, when invoked as "test". Handle "[ ]" correctly.
|
||||
Do not bother testing that margv[margc] is non-null.
|
||||
|
||||
2003-07-04 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/who.c (print_line): Rewrite to use asprintf, in order to be
|
||||
able to avoid emitting trailing spaces. Reported by Dan Jacobson.
|
||||
|
||||
* tests/misc/head-elide-tail: Add tests of head's new --lines=-N
|
||||
option, and perform the +1600 invocations of head IFF the envvar
|
||||
RUN_EXPENSIVE_TESTS is set.
|
||||
|
||||
2003-07-03 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/cp.c (do_copy): Give a better diagnostic when failing due
|
||||
to nonexistent destination directory. Reported by Dmitry Rutsky.
|
||||
See http://bugs.debian.org/199730 for details.
|
||||
|
||||
2003-06-27 Jim Meyering <jim@meyering.net>
|
||||
|
||||
split's --verbose option did nothing [broken in 4.5.10 and 5.0]
|
||||
* src/split.c (longopts): Use `1', not `0' as the value for
|
||||
for &verbose. Reported by Keith Thompson.
|
||||
|
||||
Test for the above fix.
|
||||
* tests/misc/split-a: Also use --verbose and compare stderr
|
||||
output with what we'd expect.
|
||||
|
||||
2003-06-20 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/copy.c (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
|
||||
Use `error_t' (rather than int) as type for local `err'.
|
||||
From Alfred M. Szmidt.
|
||||
|
||||
2003-06-19 Marcus Brinkmann <marcus@gnu.org>
|
||||
|
||||
* src/copy.c (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
|
||||
Fix author preservation code.
|
||||
|
||||
2003-06-19 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/ln.c (ENABLE_HARD_LINK_TO_SYMLINK_WARNING): Define to 0.
|
||||
(do_link): Don't warn about hard link to symlink.
|
||||
|
||||
2003-06-18 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/cut.c: Include "getdelim2.h", not "getstr.h".
|
||||
Reflect renaming: getstr -> getdelim2.
|
||||
|
||||
* src/comm.c, src/join.c, src/nl.c, src/uniq.c: Reflect renaming:
|
||||
readline -> readlinebuffer.
|
||||
|
||||
2003-06-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
* src/readlink.c: Include <sys/types.h> before system.h (because
|
||||
the latter includes <sys/stat.h>). Required on Ultrix 4.3.
|
||||
|
||||
2003-06-17 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/system.h (initialize_main): Define.
|
||||
Use it in every `main'. Applied via this:
|
||||
p='initialize_main (&argc, &argv);'
|
||||
perl -ni -e '/program_name.=.argv.0/ and print " '"$p"'\n"; print' \
|
||||
$(grep -l program_name.=.argv.0 *.c)
|
||||
test.c uses margc/margv, so I made the change manually for that file.
|
||||
Based on a patch from Bernard Giroud.
|
||||
|
||||
2003-06-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
Fix for build failure on Ultrix 4.3.
|
||||
* src/stat.c: Include sys/statvfs.h in preference to sys/vfs.h.
|
||||
Include sys/param.h and sys/mount.h on ultrix.
|
||||
|
||||
2003-06-16 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/touch.c (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Remove
|
||||
definitions.
|
||||
* src/system.h (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Define
|
||||
them here instead, but with one change: define EISDIR to -1, not 0.
|
||||
|
||||
* src/cat.c (cat): Remove `#ifndef ENOSYS', now that it's
|
||||
guaranteed to be defined.
|
||||
* src/system.h (ENOSYS, ENOTSUP): Define to -1 if not defined.
|
||||
|
||||
* README: Mention the CVS repository.
|
||||
Encourage addition of test cases.
|
||||
|
||||
2003-06-12 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/touch.c (touch): Call close only if necessary.
|
||||
From Bruno Haible.
|
||||
|
||||
* src/wc.c (usage): Correct wording: wc prints counts in the order
|
||||
`newline, word, byte'. Reported by Keith M. Briggs.
|
||||
* man/wc.x: Fix it here, too. And change `lines' to `newlines'.
|
||||
|
||||
2003-06-10 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/date/Test.pm: Add a test for the new format, e.g., May-23-2003.
|
||||
|
||||
2003-06-07 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.maint (syntax-check): Add commented-out (over-aggressive)
|
||||
rule.
|
||||
|
||||
2003-06-06 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/extract-magic (main): Avoid newer 3-arg form of open,
|
||||
so this script works also with e.g., perl5.005_03.
|
||||
Patch by John David Anglin.
|
||||
|
||||
2003-06-04 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/system.h: Include <stdbool.h> unconditionally.
|
||||
|
||||
2003-06-04 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* man/Makefile.am (check-programs-vs-x): Rename target
|
||||
from check-programs-vs-1. Adjust rule to check for the
|
||||
primary (.x) file, not the generated one (.1).
|
||||
|
||||
2003-06-03 Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
|
||||
|
||||
* man/kill.x: New file.
|
||||
* man/Makefile.am (dist_man_MANS): Add kill.1.
|
||||
(kill.1): New rule.
|
||||
|
||||
2003-06-04 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Ensure that the .x file for a new program is never forgotten again.
|
||||
* man/Makefile.am (programs): Define.
|
||||
(check-programs-vs-1): New phony target.
|
||||
(check-local): Depend on it.
|
||||
|
||||
2003-06-03 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Avoid unnecessary copying of environment.
|
||||
* src/env.c (main): Rather than clearing the environment and --
|
||||
unless told to ignore environment -- copying all settings from
|
||||
the saved, original environment, clear the environment only when
|
||||
that is requested. Suggested by Jens Elkner.
|
||||
|
||||
2003-06-02 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/system.h: Always include <string.h>, since we assume C89.
|
||||
Include <limits.h> without checking for HAVE_LIMITS_H.
|
||||
|
||||
* src/test.c [!TEST_STANDALONE]: Remove #if-0'd block.
|
||||
(STREQ, S_IXUGO): Remove redundant (in system.h) definitions.
|
||||
|
||||
2003-06-01 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Avoid a race condition in `tail -f' described by Ken Raeburn in
|
||||
http://mail.gnu.org/archive/html/bug-textutils/2003-05/msg00007.html
|
||||
* src/tail.c (file_lines): Add new parameter, *read_pos, and set it.
|
||||
(pipe_lines, pipe_bytes, start_bytes, start_lines): Likewise.
|
||||
(tail_bytes, tail_lines, tail): Likewise.
|
||||
(tail_file): Use the new `read_pos' value as the size,
|
||||
rather than stats.st_size from the fstat call.
|
||||
|
||||
2003-05-28 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/extract-magic: Allow expansion of `$file' in the here-
|
||||
document corresponding to the comment at the top of fs.h.
|
||||
|
||||
2003-05-26 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/stat.c: Fix portability problem on FreeBSD5.0: don't include
|
||||
<sys/statvfs.h> on systems without HAVE_STRUCT_STATVFS_F_BASETYPE.
|
||||
Use #if/#elif/... cascade so we get only one set of include files.
|
||||
Reported by Nelson Beebe.
|
||||
|
||||
2003-05-24 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/md5sum.c (split_3): Accept the BSD format only when in MD5 mode.
|
||||
* tests/sha1sum/basic-1: Make sure `sha1sum --check' doesn't
|
||||
accept the BSD format.
|
||||
|
||||
2003-03-28 Joe Orton <jorton@redhat.com>
|
||||
|
||||
* src/md5sum.c (bsd_split_3): New function.
|
||||
(split_3): Detect checksums from BSD 'md5' command and handle them
|
||||
using bsd_split_3.
|
||||
|
||||
* tests/md5sum/basic-1: New tests for --check exit status, and for
|
||||
BSD-style checksum files.
|
||||
|
||||
2003-05-21 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/head.c (elide_tail_lines_pipe): Fix a thinko.
|
||||
This sort of thing is why it'd be *Really Good* to factor
|
||||
out the common code used here and in tail.c.
|
||||
|
||||
2003-05-14 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/head.c (usage): Document new feature: --bytes=-N and --lines=-N.
|
||||
|
||||
* tests/du/slink: Skip this test if `.' is on an XFS file system.
|
||||
|
||||
* tests/du/fd-leak: New file. Test for the bug in du that
|
||||
was fixed by the 2003-05-12 change to lib/ftw.c.
|
||||
* tests/du/Makefile.am (TESTS): Add fd-leak.
|
||||
|
||||
* src/head.c (AUTHORS): Enclose string in N_(...), now that it
|
||||
includes a translatable word, `and'.
|
||||
|
||||
* src/dd.c (usage): Don't use `,' as the thousands separator
|
||||
in e.g. 1,000,000 and 1,048,576. Instead, do this:
|
||||
`SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
|
||||
* src/df.c (usage): Likewise.
|
||||
* src/du.c (usage): Likewise.
|
||||
* src/ls.c (usage): Likewise.
|
||||
|
||||
* Makefile.maint (syntax-check): Add another check.
|
||||
|
||||
2003-05-13 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Fix uniq to conform to POSIX, which requires that "uniq -d -u"
|
||||
must output nothing. Problem reported by Josh Hyman.
|
||||
|
||||
* src/uniq.c (enum output_mode, mode): Remove, replacing with:
|
||||
(output_unique, output_first_repeated, output_later_repeated):
|
||||
New vars. All uses of "mode" changed to use these variables,
|
||||
which are not mutually exclusive as "mode" was.
|
||||
(writeline): New arg "match", used to control whether to
|
||||
obey output_first_repeated or output_later_repeated.
|
||||
All callers changed.
|
||||
(check_file, main): Adjust to above changes.
|
||||
|
||||
* tests/uniq/Test.pm: Test that 'uniq -d -u' outputs nothing.
|
||||
|
||||
2003-05-14 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/rm/rm3: Use tr's \n notation rather than \012.
|
||||
This package can afford to do that, since its tests are guaranteed use
|
||||
GNU tr, which has accepted the more modern notation for 10 years.
|
||||
* tests/rm/rm5: Likewise.
|
||||
* tests/cp/same-file: Likewise.
|
||||
* tests/stty/row-col-1: Likewise.
|
||||
* tests/stty/basic-1: Likewise.
|
||||
* tests/rm/deep-1: Likewise.
|
||||
* tests/mv/part-symlink: Likewise.
|
||||
* tests/mkdir/perm: Likewise.
|
||||
* tests/misc/nice: Likewise.
|
||||
|
||||
2003-05-13 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/copy.c (struct F_triple) [name]: Remove const attribute.
|
||||
(triple_free): Don't apply cast to argument of free.
|
||||
(seen_file): Add cast here instead.
|
||||
|
||||
* src/cp-hash.c (struct Src_to_dest) [name]: Remove const attribute.
|
||||
(src_to_dest_free): Don't apply cast to argument of free.
|
||||
|
||||
* src/sort.c (zaptemp): Don't apply cast to argument of free.
|
||||
* src/pr.c (init_fps, init_store_cols): Likewise.
|
||||
* src/join.c (delseq, freeline): Likewise.
|
||||
* src/expr.c (OLD): Likewise.
|
||||
* src/sort.c (sort): Likewise.
|
||||
* src/head.c (elide_tail_lines_pipe): Likewise.
|
||||
|
||||
* src/tail.c: Include "quote.h".
|
||||
Use quote in diagnostics. Change many error format strings
|
||||
from just `%s' to e.g., `error reading %s'.
|
||||
(pipe_lines): Change type of parameter, n_lines, to uintmax_t.
|
||||
Rewrite newline-counting loop to use memchr.
|
||||
|
||||
* src/head.c (elide_tail_lines_pipe): Use `if', not assert.
|
||||
Now that assert is no longer used, don't include <assert.h>.
|
||||
|
||||
2003-05-12 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/head.c: Include <assert.h>.
|
||||
(AUTHORS): Add my name.
|
||||
(elide_tail_lines_pipe): New function.
|
||||
|
||||
2003-05-10 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.maint (syntax-check): Check for `error (EXIT_SUCCESS,'.
|
||||
|
||||
* src/readlink.c (main): Set program_name before first use.
|
||||
Remove that (redundant) first use.
|
||||
Don't exit successfully just because --verbose was specified.
|
||||
Pass 0, not EXIT_SUCCESS, as first argument to error; when that
|
||||
parameter is 0, error does not exit.
|
||||
|
||||
* src/uname.c (main): When failing due to too many arguments, also say
|
||||
that, rather than just "Try `uname --help' for more information.".
|
||||
* src/comm.c (main): Likewise, but for too few arguments.
|
||||
* src/logname.c: Include error.h.
|
||||
(main): Say why we're failing.
|
||||
|
||||
* src/uniq.c (main): Don't segfault when argc < optind.
|
||||
* src/who.c (main): Handle argc < optind.
|
||||
* src/df.c (main): Likewise.
|
||||
* src/install.c (main): Likewise.
|
||||
* src/mv.c (main): Likewise.
|
||||
* src/pwd.c (main): Likewise.
|
||||
* src/tty.c (main): Likewise.
|
||||
* src/chroot.c (main): Likewise.
|
||||
* src/hostname.c: Likewise.
|
||||
* src/du.c (main): Likewise.
|
||||
* src/expand.c (main): Likewise.
|
||||
* src/env.c (main): Likewise.
|
||||
* src/unexpand.c (main): Likewise.
|
||||
* src/printenv.c (main): Likewise.
|
||||
* src/sync.c (main): Handle argc == 0.
|
||||
* src/expr.c (main): Likewise.
|
||||
* src/printf.c (main): Likewise.
|
||||
* src/basename.c (main): Likewise.
|
||||
* src/ln.c (main): Test for `missing argument' before computing n_files.
|
||||
* src/tail.c (main): Test for the case of no arguments before
|
||||
computing n_files.
|
||||
|
||||
* src/kill.c (send_signals): Don't check command line arguments here.
|
||||
(main): Check them here instead. Handle argc < optind.
|
||||
|
||||
* src/logname.c (main): Use error, rather than fprintf, for the sake
|
||||
of consistency.
|
||||
|
||||
* src/rm.c (main): Don't overrun array bound if argc is 0.
|
||||
|
||||
2003-05-09 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/sort.c (main): Don't overrun array bound if argc is 0.
|
||||
That would happen when invoked via: execl ("/usr/bin/sort", NULL);
|
||||
Reported by Wartan Hachaturow.
|
||||
|
||||
2003-05-07 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Implement support so that `head --lines=-N' works on seekable files.
|
||||
* src/head.c (enum Copy_fd_status): Define.
|
||||
(COPY_FD_DIAGNOSE): New macro.
|
||||
(elide_tail_lines_seekable): New funtion.
|
||||
(elide_tail_lines_file): Call it here.
|
||||
|
||||
2003-05-06 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/sys2.h (CHAR_BIT): Remove duplicate definition.
|
||||
|
||||
2003-05-04 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/head/Test.pm: Remove tests of --bytes=-N; using that framework
|
||||
caused the addition of thousands of small files to the tar archive.
|
||||
* tests/misc/head-elide-tail: New file. Add them here instead.
|
||||
* tests/misc/Makefile.am (TESTS): Add head-elide-tail.
|
||||
|
||||
2003-05-04 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/remove.c (HAVE_WORKING_READDIR): Define to 0 if not defined.
|
||||
(IF_READDIR_NEEDS_REWINDDIR): Remove.
|
||||
(remove_cwd_entries): Rewrite to avoid IF_READDIR_NEEDS_REWINDDIR,
|
||||
which was a bit weird because it couldn't be emulated by a function.
|
||||
|
||||
2003-05-03 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Extend head to accept --lines=-N (--bytes=-N) and to print all
|
||||
but the N lines (bytes) at the end of the file.
|
||||
* src/head.c: Include full-write.h, full-read.h, inttostr.h, quote.h.
|
||||
Use quote() in diagnostics, rather than literal `' marks.
|
||||
(copy_fd, elide_tail_bytes_pipe, elide_tail_bytes_file):
|
||||
New functions.
|
||||
(elide_tail_lines_pipe, elide_tail_lines_file): New functions.
|
||||
(head_file): Reorganize so as to call head from only one place.
|
||||
(main): Likewise, for head_file.
|
||||
Handle new, undocumented option, --presume-input-pipe.
|
||||
Handle negative line and byte counts.
|
||||
* tests/head/Test.pm: Add lots of tests to exercise --bytes=-N.
|
||||
|
||||
* tests/du/8gb: Skip test if the file system of `.' doesn't support
|
||||
sparse files -- otherwise it'd create a file of size 8GB.
|
||||
|
||||
2003-05-02 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/fmt.c (usage): Don't mention obsolescent -WIDTH option.
|
||||
Instead explain about `-' and standard input.
|
||||
(main): Give a proper diagnostic for e.g., `fmt -c -72'.
|
||||
Reported by Keith Thompson.
|
||||
* tests/fmt/basic: Add test for the above fix.
|
||||
|
||||
* src/fmt.c: Include "quote.h".
|
||||
Use quote() in diagnostics, rather than literal `' marks.
|
||||
(main): Exit nonzero when unable to open an input file.
|
||||
* tests/fmt/basic: Add test for the above fix.
|
||||
|
||||
* src/fmt.c (main): Diagnose invalid suffix on obsolescent width
|
||||
specifications like `-72x'.
|
||||
* tests/fmt/basic: Add test for the above fix.
|
||||
|
||||
Work around nasty readdir bug on Darwin6.5.
|
||||
* src/remove.c (IF_READDIR_NEEDS_REWINDDIR): Define.
|
||||
[! HAVE_WORKING_READDIR] (remove_cwd_entries): If readdir has just
|
||||
returned NULL and there has been at least one successful unlink or
|
||||
rmdir call since the opendir or previous rewinddir, then call
|
||||
rewinddir and reiterate the loop.
|
||||
|
||||
Factor out common code.
|
||||
* src/remove.c (readdir_ignoring_dotdirs): New function.
|
||||
(is_empty_dir): Use it here.
|
||||
(remove_cwd_entries): Use it here.
|
||||
|
||||
2003-05-01 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/rm/r-3: Create 500 rather than just 300 files.
|
||||
There's a bug in Darwin6.5's readdir that shows up only with
|
||||
338 or more files.
|
||||
Fix a bug in this test: `cd $pwd' (not to `..'), now that $tmp
|
||||
has two components.
|
||||
|
||||
* src/tail.c:
|
||||
Change type of n_units, n_bytes, n_lines to be `uintmax_t'.
|
||||
(dump_remainder): Move two declarations `down' into the scope
|
||||
where they are used.
|
||||
(xlseek): Return the resulting offset.
|
||||
(file_lines): Rename parameter, file_length, to end_pos.
|
||||
(pipe_lines): Don't coerce safe_read return value to `int'.
|
||||
Adapt tests accordingly.
|
||||
(pipe_bytes) [struct charbuffer] (nbytes): Change type from `int'
|
||||
to `unsigned int'.
|
||||
Change type of `total_bytes' from `int' to `size_t',
|
||||
since the former wouldn't always be wide enough.
|
||||
Don't coerce safe_read return value to `int',
|
||||
and adapt tests accordingly.
|
||||
Now that testing for a read error no longer involves
|
||||
using `tmp', handle that case *after* freeing `tmp'.
|
||||
(start_bytes): Clean up.
|
||||
(tail_bytes): Now that `n_bytes' may be larger than
|
||||
OFF_T_MAX, test for that condition and, if it's true, don't
|
||||
use lseek optimizations.
|
||||
(parse_options): Don't fail just because N_UNITS is larger than
|
||||
the maximum size of a file -- tail may be applied to an input
|
||||
stream (e.g., a pipe) with more data than that.
|
||||
|
||||
* Makefile.maint (syntax-check): Rename from alloc-check.
|
||||
Also check for SPACE-TAB sequences.
|
||||
Also check for malloc/calloc/realloc casts.
|
||||
|
||||
2003-05-01 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/tail.c (start_lines): Rewrite to use memchr. Clean up.
|
||||
|
||||
2003-04-28 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/misc/tty-eof: Send two tokens, not just one, so we don't
|
||||
make the now-more-picky tsort fail.
|
||||
|
||||
2003-04-24 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/tsort.c (tsort): Remove unnecessary test of have_read_stdin.
|
||||
(main): Minor syntactic clean-up.
|
||||
|
||||
* src/tsort.c (tsort): Fail if the input contains an odd number of
|
||||
tokens. Reported by junkio@cox.net.
|
||||
|
||||
* tests/tsort/basic-1: Test for the above fix.
|
||||
|
||||
2003-04-21 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/misc/printf: Add tests for the printf fixes below.
|
||||
|
||||
* Makefile.cfg (cvs_files): Add $(srcdir)/config/depcomp to the list.
|
||||
|
||||
2003-04-20 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Fix printf POSIX compatibility bug reported by Ben Harris in
|
||||
<http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>.
|
||||
* doc/coreutils.texi (printf invocation): It's \NNN in the format,
|
||||
\0NNN in the %b operand.
|
||||
* src/printf.c (usage): Likewise.
|
||||
(print_esc): New arg OCTAL0 to specify whether \0NNN or \NNN
|
||||
is desired. All uses changed. Behave like Bash printf if %b
|
||||
operand uses \NNN where the initial N is not 0.
|
||||
|
||||
2003-04-17 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/stty.c: Remove uses of PROTOTYPE macro.
|
||||
|
||||
2003-04-15 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.maint: Remove (or replace-with-TAB(s) to retain alignment)
|
||||
each sequence of spaces before a TAB character.
|
||||
|
||||
2003-04-13 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/remove.c (is_empty_dir): Don't closedir (NULL).
|
||||
|
||||
2003-04-12 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Giving nl an invalid STYLE argument (in --header-numbering=STYLE (-h),
|
||||
--body-numbering=STYLE (-b), or --footer-numbering=STYLE (-f)) or
|
||||
FORMAT (--number-format=FORMAT (-n)) would not give a useful diagnostic.
|
||||
* src/nl.c (main): Fix those problems and remove literal quote marks
|
||||
(e.g., "`%s'") from format string; instead use "%s" in each format
|
||||
string and `quote (optarg)' as the corresponding argument.
|
||||
Also, diagnose all invalid command line options before failing.
|
||||
|
||||
* src/nl.c (proc_text): Fix a bug that would make nl output extra
|
||||
newlines in some cases. Details here: http://bugs.debian.org/177256.
|
||||
This bug was introduced on 2001-11-10 for textutils-2.0.17.
|
||||
* tests/misc/nl: Add test for the above-fixed bug.
|
||||
|
||||
* tests/misc/readlink: New file. Test the --canonicalize option.
|
||||
* tests/misc/Makefile.am (TESTS): Add readlink.
|
||||
|
||||
2003-04-11 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Clean up.
|
||||
* src/chown.c, src/cp.c, src/dircolors.hin, src/du.c, src/ln.c:
|
||||
* src/mkfifo.c, src/ptx.c, src/spline.c, src/stty.c, src/tail.c:
|
||||
* src/test.c, src/unexpand.c: Remove (or replace-with-TAB(s) to
|
||||
retain alignment) each sequence of spaces before a TAB character.
|
||||
|
||||
* src/ls.c: Include <stdlib.h> unconditionally.
|
||||
|
||||
* Makefile.maint (xalloc-check): Rename from header-check.
|
||||
|
||||
* src/yes.c: Include error.h after system.h, not before.
|
||||
|
||||
Clean up.
|
||||
* src/copy.c, src/cp-hash.c, src/cp.c, src/csplit.c, src/cut.c:
|
||||
* src/date.c, src/df.c, src/du.c, src/expand.c, src/expr.c, src/id.c:
|
||||
* src/join.c, src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c:
|
||||
* src/ptx.c, src/sort.c, src/split.c, src/su.c, src/tail.c, src/tee.c:
|
||||
* src/tr.c: * src/unexpand.c, src/users.c:
|
||||
Remove anachronistic casts of xmalloc, xrealloc, and xcalloc
|
||||
return values and of xrealloc's first argument.
|
||||
Fix the former with this:
|
||||
perl -pi -e 's/\([^(]*?\*\) *(x(m|c|re)alloc)\b/$1/'
|
||||
|
||||
2003-04-10 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/stty.c (wrapf): Declare with format attribute.
|
||||
|
||||
The S_MAGIC_... names shouldn't be maintained in two places (prior
|
||||
to this change, one would have to keep stat.c and fs.h in sync).
|
||||
This change makes it so those names and the corresponding
|
||||
hexadecimal constants all reside in stat.c. fs.h is now generated.
|
||||
* src/Makefile.am (fs.h): New rule to generate fs.h from stat.c.
|
||||
(BUILT_SOURCES): Add fs.h, now that it's generated.
|
||||
(EXTRA_DIST): Add extract-magic.
|
||||
* src/extract-magic: New script to extract fs.h definitions from stat.c.
|
||||
* src/stat.c (human_fstype) [__linux__]: Append each hex constant from
|
||||
fs.h in a comment after the corresponding `case S_MAGIC_...:' statement.
|
||||
|
||||
* tests/tail-2/big-4gb: Skip this test (don't fail) if creating a
|
||||
file with nominal length > 4GB fails. Reported by Michael Deutschmann.
|
||||
|
||||
* man/unexpand.x: Add `SEE ALSO' reference to expand.
|
||||
* man/expand.x: Add `SEE ALSO' reference to unexpand.
|
||||
Suggestion from Dan Jacobson.
|
||||
|
||||
2003-04-10 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
|
||||
|
||||
* src/fs.h (S_MAGIC_DEVPTS): New magic for Linux's devpts.
|
||||
* src/stat.c (human_fstype): Handle Linux's devpts.
|
||||
|
||||
2003-04-09 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/split.c (line_bytes_split): Arg is of type size_t, since
|
||||
that's all that is supported for now.
|
||||
(main): Check for overflow in obsolescent line count option.
|
||||
|
||||
2003-04-09 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/misc/split-fail: Add a new test for the above fix.
|
||||
|
||||
* src/split.c (bytes_split): Use size_t temporary (rather than
|
||||
uintmax_t original) in remaining computations. From Paul Eggert.
|
||||
|
||||
Handle command line option arguments larger than 2^31.
|
||||
This allows e.g., splitting into files of size 2GB and larger,
|
||||
and running split --lines=N with N=2^31 or more.
|
||||
But for --line-bytes=N, the restriction that N <= SIZE_MAX
|
||||
remains (for now), due to the way it is implemented.
|
||||
|
||||
* src/split.c: Include "inttostr.h".
|
||||
(bytes_split, lines_split, line_bytes_split, main):
|
||||
Use uintmax_t, not size_t, for file sizes.
|
||||
(main): Give a better diagnostic for option arguments == 0.
|
||||
Use umaxtostr to print file sizes.
|
||||
Reported by Luke Hassell.
|
||||
|
||||
2003-04-08 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/rm.c (usage): Mention that --directory (-d) works only
|
||||
on some systems. Suggestion from Samuel Tardieu.
|
||||
|
||||
* tests/basename/basic: Run $PERL to see if it is available,
|
||||
rather than testing its value.
|
||||
* tests/sum/sysv, tests/tsort/basic-1, tests/unexpand/basic-1:
|
||||
* tests/basename/basic, tests/dd/skip-seek, tests/dircolors/simple:
|
||||
* tests/expr/basic, tests/factor/basic, tests/fmt/basic:
|
||||
* tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1:
|
||||
* tests/misc/sort, tests/misc/tty-eof, tests/mv/i-1:
|
||||
* tests/rm/empty-name, tests/rm/fail-eperm, tests/rm/unreadable:
|
||||
* tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec:
|
||||
* tests/sum/basic-1, tests/seq/basic: Likewise.
|
||||
|
||||
* tests/misc/Makefile.am (TESTS): Add split-fail.
|
||||
* tests/misc/split-fail: New file.
|
||||
|
||||
* src/split.c: Rename local variables: nchars -> n_bytes.
|
||||
(lines_split): Rename local, nlines -> n_lines.
|
||||
(main): Rename local variable: s/accum/n_units/.
|
||||
(main): Use STDIN_FILENO, not literal `0'.
|
||||
|
||||
2003-04-07 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/stat.c: Add #include directives for Ultrix 4.4.
|
||||
Based on a suggested change from Bert Deknuydt.
|
||||
|
||||
2003-04-06 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.maint (makefile-check): New rule.
|
||||
(local-check): Add it.
|
||||
|
||||
2003-04-05 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.am (nearly all of them):
|
||||
Use $(VAR) rather than @VAR@, now that we can rely on automake to
|
||||
emit a definition for each substituted variable.
|
||||
* tests/Makefile.am.in: Likewise.
|
||||
|
||||
* tests/rm/rm5: Add a comment explaining why this test fails when
|
||||
using Tru64's broken sed.
|
||||
* tests/rm/rm3: Likewise.
|
||||
|
||||
Make `kill -t' output signal descriptions (not `?') on Tru64.
|
||||
* src/kill.c (sys_siglist): Also check for __sys_siglist.
|
||||
Patch by Tony Leneis.
|
||||
* configure.ac: Also check for declaration of __sys_siglist.
|
||||
Required for Tru64 4.0D, 4.0F, and 5.1.
|
||||
Reported by Tony Leneis.
|
||||
|
||||
2003-04-04 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/Makefile.am (PERL): Remove unnecessary definition.
|
||||
|
||||
Because of inappropriate (but POSIX-mandated) behavior of rename,
|
||||
`mv a b' would not remove `a' in some unusual cases. Work around
|
||||
this by unlinking `a' when necessary.
|
||||
|
||||
* src/copy.c (same_file_ok): Add an output parameter.
|
||||
Set it in the offending case.
|
||||
(copy_internal): When necessary, unlink SRC_PATH and inform caller.
|
||||
Reported by Ed Avis.
|
||||
* tests/mv/hard-4: New test for the above.
|
||||
* tests/mv/Makefile.am (TESTS): Add hard-4.
|
||||
|
||||
Clean up rules for automatically generated sources:
|
||||
* src/Makefile.am (dircolors.h, wheel-size.h, wheel.h, false.c):
|
||||
Make each generated file be read-only.
|
||||
Add each file name to BUILT_SOURCES separately.
|
||||
(MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
|
||||
|
||||
Put LOCALEDIR macro definition in new file: localedir.h.
|
||||
* src/Makefile.am (DEFS): Remove definition.
|
||||
(localedir.h): New rule.
|
||||
(BUILT_SOURCES, DISTCLEANFILES): Add localedir.h.
|
||||
* src/system.h: Include "localedir.h".
|
||||
|
||||
2003-04-02 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Version 5.0.
|
||||
|
||||
@@ -20,6 +20,7 @@ wget_files = \
|
||||
|
||||
cvs_files = \
|
||||
$(srcdir)/config/elisp-comp \
|
||||
$(srcdir)/config/depcomp \
|
||||
$(srcdir)/config/mdate-sh \
|
||||
$(srcdir)/config/missing \
|
||||
$(srcdir)/config/install-sh \
|
||||
|
||||
24
Makefile.in
24
Makefile.in
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.7.3 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.7.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
@@ -38,6 +38,7 @@ POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
@@ -64,6 +65,7 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
HAVE__BOOL = @HAVE__BOOL@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
@@ -91,7 +93,6 @@ MSGMERGE = @MSGMERGE@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
@@ -107,6 +108,7 @@ SEQ_LIBM = @SEQ_LIBM@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SQRT_LIBM = @SQRT_LIBM@
|
||||
STDBOOL_H = @STDBOOL_H@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_NLS = @USE_NLS@
|
||||
@@ -213,7 +215,7 @@ $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
$(ACLOCAL_M4): configure.ac m4/acl.m4 m4/afs.m4 m4/assert.m4 m4/bison.m4 m4/boottime.m4 m4/c-stack.m4 m4/canonicalize.m4 m4/check-decl.m4 m4/chown.m4 m4/codeset.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirfd.m4 m4/dos.m4 m4/error.m4 m4/fpending.m4 m4/fstypename.m4 m4/fsusage.m4 m4/ftruncate.m4 m4/ftw.m4 m4/getcwd-path-max.m4 m4/getcwd.m4 m4/getgroups.m4 m4/getline.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc.m4 m4/glibc21.m4 m4/group-member.m4 m4/host-os.m4 m4/iconv.m4 m4/intdiv0.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/isc-posix.m4 m4/jm-glibc-io.m4 m4/jm-macros.m4 m4/jm-mktime.m4 m4/jm-winsz1.m4 m4/jm-winsz2.m4 m4/lchown.m4 m4/lcmessage.m4 m4/lib-check.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/link-follow.m4 m4/longlong.m4 m4/ls-mntd-fs.m4 m4/lstat.m4 m4/mbrtowc.m4 m4/mbswidth.m4 m4/memcmp.m4 m4/mkdir-slash.m4 m4/mkstemp.m4 m4/nanosleep.m4 m4/onceonly.m4 m4/open-max.m4 m4/perl.m4 m4/prereq.m4 m4/progtest.m4 m4/putenv.m4 m4/regex.m4 m4/rename.m4 m4/restrict.m4 m4/rmdir-errno.m4 m4/search-libs.m4 m4/st_dm_mode.m4 m4/st_mtim.m4 m4/stat.m4 m4/stdbool.m4 m4/strftime.m4 m4/timespec.m4 m4/unlink-busy.m4 m4/uptime.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes.m4 m4/xstrtoimax.m4 m4/xstrtoumax.m4
|
||||
$(ACLOCAL_M4): configure.ac m4/acl.m4 m4/afs.m4 m4/alloca.m4 m4/assert.m4 m4/bison.m4 m4/boottime.m4 m4/c-stack.m4 m4/canonicalize.m4 m4/check-decl.m4 m4/chown.m4 m4/codeset.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirfd.m4 m4/dos.m4 m4/error.m4 m4/fpending.m4 m4/fstypename.m4 m4/fsusage.m4 m4/ftruncate.m4 m4/ftw.m4 m4/getcwd-path-max.m4 m4/getcwd.m4 m4/getgroups.m4 m4/getline.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc.m4 m4/glibc21.m4 m4/group-member.m4 m4/host-os.m4 m4/human.m4 m4/iconv.m4 m4/intdiv0.m4 m4/intmax_t.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/inttypes_h.m4 m4/isc-posix.m4 m4/jm-glibc-io.m4 m4/jm-macros.m4 m4/jm-mktime.m4 m4/jm-winsz1.m4 m4/jm-winsz2.m4 m4/lchown.m4 m4/lcmessage.m4 m4/lib-check.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/link-follow.m4 m4/longdouble.m4 m4/longlong.m4 m4/ls-mntd-fs.m4 m4/lstat.m4 m4/mbrtowc.m4 m4/mbswidth.m4 m4/memcmp.m4 m4/mkdir-slash.m4 m4/mkstemp.m4 m4/mktime.m4 m4/nanosleep.m4 m4/onceonly.m4 m4/open-max.m4 m4/perl.m4 m4/prereq.m4 m4/progtest.m4 m4/putenv.m4 m4/readdir.m4 m4/regex.m4 m4/rename.m4 m4/restrict.m4 m4/rmdir-errno.m4 m4/search-libs.m4 m4/signed.m4 m4/st_dm_mode.m4 m4/st_mtim.m4 m4/stat.m4 m4/stdbool.m4 m4/stdint_h.m4 m4/strftime.m4 m4/timespec.m4 m4/tm_gmtoff.m4 m4/tzset.m4 m4/uintmax_t.m4 m4/unlink-busy.m4 m4/uptime.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes.m4 m4/vasnprintf.m4 m4/vasprintf.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/xstrtoimax.m4 m4/xstrtoumax.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.h: stamp-h1
|
||||
@@ -314,9 +316,15 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if (etags --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
test -f $$subdir/TAGS && \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
|
||||
@@ -472,7 +480,7 @@ distcheck: dist
|
||||
@echo "$(distdir).tar.gz is ready for distribution" | \
|
||||
sed 'h;s/./=/g;p;x;p;x'
|
||||
distuninstallcheck:
|
||||
cd $(distuninstallcheck_dir) \
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
@@ -481,11 +489,11 @@ distuninstallcheck:
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
if test '$(srcdir)' = . ; then \
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
@@ -547,7 +555,7 @@ installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf autom4te.cache
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*-Makefile-*-
|
||||
# This Makefile fragment is shared between fileutils, sh-utils, textutils,
|
||||
# This Makefile fragment is shared between the coreutils,
|
||||
# CPPI, Bison, and Autoconf.
|
||||
|
||||
## Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
@@ -19,6 +19,8 @@
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
## 02111-1307, USA.
|
||||
|
||||
ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
|
||||
# Do not save the original name or timestamp in the .tar.gz file.
|
||||
GZIP_ENV = '--no-name --best'
|
||||
|
||||
@@ -50,14 +52,74 @@ release_archive_dir ?= ../release
|
||||
# new ChangeLog entries.
|
||||
local-check = \
|
||||
po-check copyright-check writable-files m4-check author_mark_check \
|
||||
changelog-check strftime-check header-check makefile_path_separator_check
|
||||
changelog-check strftime-check syntax-check makefile_path_separator_check \
|
||||
makefile-check
|
||||
.PHONY: $(local-check)
|
||||
|
||||
# Make sure C source files in src/ don't include xalloc.h directly,
|
||||
# since they all already include it via sys2.h.
|
||||
# It's not a big deal -- just aesthetics.
|
||||
header-check:
|
||||
if test -f $(srcdir)/src/sys2.h; then \
|
||||
.PHONY: $(syntax-check-rules)
|
||||
syntax-check-rules = \
|
||||
sc_unmarked_diagnostics \
|
||||
sc_cast_of_argument_to_free \
|
||||
sc_cast_of_x_alloc_return_value \
|
||||
sc_space_tab \
|
||||
sc_error_exit_success \
|
||||
sc_xalloc_h_in_src
|
||||
|
||||
syntax-check: $(syntax-check-rules)
|
||||
# @grep -E '# *include <(limits|std(def|arg|bool))\.h>' \
|
||||
# $$(find -type f -name '*.[chly]') && \
|
||||
# { echo '$(ME): found conditional include' 1>&2; \
|
||||
# exit 1; } || :
|
||||
|
||||
# grep -E '^# *include <(string|stdlib)\.h>' \
|
||||
# $(srcdir)/{lib,src}/*.[chy] && \
|
||||
# { echo '$(ME): FIXME' 1>&2; \
|
||||
# exit 1; } || :
|
||||
# FIXME: don't allow `#include .strings\.h' anywhere
|
||||
|
||||
# Look for diagnostics that aren't marked for translation.
|
||||
# This won't find any for which error's format string is on a separate line.
|
||||
sc_unmarked_diagnostics:
|
||||
@grep --exclude=$(srcdir)/src/shred.c -E \
|
||||
'\<error \([^"]*"[^"]*[a-z]{3}' $(srcdir)/{lib,src}/*.c \
|
||||
| grep -v '_(' && \
|
||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_cast_of_argument_to_free:
|
||||
@grep -E '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \
|
||||
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_cast_of_x_alloc_return_value:
|
||||
@grep -E --exclude=$(srcdir)/lib/regex.c \
|
||||
'\*\) *x(m|c|re)alloc\>' $(srcdir)/{lib,src}/*.[chy] && \
|
||||
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_space_tab:
|
||||
@grep -E '[ ] ' --exclude=$(srcdir)/lib/regex.c \
|
||||
$(srcdir)/{lib,src}/*.[chly] \
|
||||
$(find -name Makefile.am) && \
|
||||
{ echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
|
||||
1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Using EXIT_SUCCESS as the first argument to error is misleading,
|
||||
# since when that parameter is 0, error does not exit. Use `0' instead.
|
||||
sc_error_exit_success:
|
||||
@grep -F 'error (EXIT_SUCCESS,' \
|
||||
$$(find -type f -name '*.[chly]') && \
|
||||
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# xalloc.h is included via system.h, so should not be included
|
||||
# directly by any file in src/.
|
||||
sc_xalloc_h_in_src:
|
||||
@if test -f $(srcdir)/src/sys2.h; then \
|
||||
if grep 'xalloc\.h' $(srcdir)/src/*.c; then \
|
||||
exit 1; \
|
||||
fi; \
|
||||
@@ -78,6 +140,13 @@ strftime-check:
|
||||
rm -f $@-src $@-info; \
|
||||
fi
|
||||
|
||||
# Ensure that we use only the standard $(VAR) notation,
|
||||
# not @...@ in Makefile.am, now that we can rely on automake
|
||||
# to emit a definition for each substituted variable.
|
||||
makefile-check:
|
||||
grep -E '@[A-Z_]+@' `find . -name Makefile.am` \
|
||||
&& { echo 'Makefile.maint: use $(...), not @...@' 1>&2; exit 1; } || :
|
||||
|
||||
changelog-check:
|
||||
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||
:; \
|
||||
@@ -162,10 +231,10 @@ cvs-tag-check:
|
||||
else :; fi
|
||||
|
||||
cvs-diff-check:
|
||||
if $(CVS) diff >cvs-diffs; then \
|
||||
rm cvs-diffs; \
|
||||
else \
|
||||
echo "Some files are locally modified:" 1>&2; \
|
||||
if $(CVS) diff >cvs-diffs; then \
|
||||
rm cvs-diffs; \
|
||||
else \
|
||||
echo "Some files are locally modified:" 1>&2; \
|
||||
cat cvs-diffs; \
|
||||
exit 1; \
|
||||
fi
|
||||
@@ -241,9 +310,10 @@ rel-check:
|
||||
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
|
||||
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
|
||||
|
||||
signatures ?= $(distdir).tar.bz2.sig $(distdir).tar.gz.sig
|
||||
%.sig: %
|
||||
gpg --detach-sign $<
|
||||
signatures ?= $(distdir).tar.bz2.asc $(distdir).tar.gz.asc
|
||||
%.asc: %
|
||||
rm -f $@
|
||||
gpg --armor --detach-sign -o $@ $<
|
||||
|
||||
rel-files = $(xd-delta) $(distdir).tar.bz2 $(distdir).tar.gz $(signatures)
|
||||
announcement: NEWS ChangeLog $(rel-files) $(signatures)
|
||||
|
||||
71
NEWS
71
NEWS
@@ -1,5 +1,72 @@
|
||||
[5.0]
|
||||
* false --help now exits nonzero
|
||||
GNU coreutils NEWS -*- outline -*-
|
||||
* Major changes in release 5.0.1:
|
||||
|
||||
** New programs
|
||||
- new program: `[' (much like `test')
|
||||
|
||||
** New features
|
||||
- head now accepts --lines=-N (--bytes=-N) to print all but the
|
||||
N lines (bytes) at the end of the file
|
||||
- md5sum --check now accepts the output of the BSD md5sum program, e.g.,
|
||||
MD5 (f) = d41d8cd98f00b204e9800998ecf8427e
|
||||
- date -d DATE can now parse a DATE string like May-23-2003
|
||||
- chown: `.' is no longer recognized as a separator in the OWNER:GROUP
|
||||
specifier on POSIX 1003.1-2001 systems. If chown *was not* compiled
|
||||
on such a system, then it still accepts `.', by default. If chown
|
||||
was compiled on a POSIX 1003.1-2001 system, then you may enable the
|
||||
old behavior by setting _POSIX2_VERSION=199209 in your environment.
|
||||
- chown no longer tries to preserve set-user-ID and set-group-ID bits;
|
||||
on some systems, the chown syscall resets those bits, and previous
|
||||
versions of the chown command would call chmod to restore the original,
|
||||
pre-chown(2) settings, but that behavior is problematic.
|
||||
1) There was a window whereby a malicious user, M, could subvert a
|
||||
chown command run by some other user and operating on files in a
|
||||
directory where M has write access.
|
||||
2) Before (and even now, on systems with chown(2) that doesn't reset
|
||||
those bits), an unwary admin. could use chown unwittingly to create e.g.,
|
||||
a set-user-ID root copy of /bin/sh.
|
||||
|
||||
** Bug fixes
|
||||
- chown --dereference no longer leaks a file descriptor per symlink processed
|
||||
- `du /' once again prints the `/' on the last line
|
||||
- split's --verbose option works once again [broken in 4.5.10 and 5.0]
|
||||
- tail -f is no longer subject to a race condition that could make it
|
||||
delay displaying the last part of a file that had stopped growing. That
|
||||
bug could also make tail -f give an unwarranted `file truncated' warning.
|
||||
- du no longer runs out of file descriptors unnecessarily
|
||||
- df and `readlink --canonicalize' no longer corrupt the heap on
|
||||
non-glibc, non-solaris systems
|
||||
- `env -u UNSET_VARIABLE' no longer dumps core on non-glibc systems
|
||||
- readlink's --canonicalize option now works on systems like Solaris that
|
||||
lack the canonicalize_file_name function but do have resolvepath.
|
||||
- mv now removes `a' in this example on all systems: touch a; ln a b; mv a b
|
||||
This behavior is contrary to POSIX (which requires that the mv command do
|
||||
nothing and exit successfully), but I suspect POSIX will change.
|
||||
- date's %r format directive now honors locale settings
|
||||
- date's `-' (no-pad) format flag now affects the space-padded-by-default
|
||||
conversion specifiers, %e, %k, %l
|
||||
- fmt now diagnoses invalid obsolescent width specifications like `-72x'
|
||||
- fmt now exits nonzero when unable to open an input file
|
||||
- tsort now fails when given an odd number of input tokens,
|
||||
as required by POSIX. Before, it would act as if the final token
|
||||
appeared one additional time.
|
||||
|
||||
** Fewer arbitrary limitations
|
||||
- tail's byte and line counts are no longer limited to OFF_T_MAX.
|
||||
Now the limit is UINTMAX_MAX (usually 2^64).
|
||||
- split can now handle --bytes=N and --lines=N with N=2^31 or more.
|
||||
|
||||
** Portability
|
||||
- `kill -t' now prints signal descriptions (rather than `?') on systems
|
||||
like Tru64 with __sys_siglist but no strsignal function.
|
||||
- stat.c now compiles on Ultrix systems
|
||||
- sleep now works on AIX systems that lack support for clock_gettime
|
||||
- rm now works around Darwin6.5's broken readdir function
|
||||
Before `rm -rf DIR' would fail to remove all files in DIR
|
||||
if there were more than 338.
|
||||
|
||||
* Major changes in release 5.0:
|
||||
- false --help now exits nonzero
|
||||
|
||||
[4.5.12]
|
||||
* printf no longer treats \x specially when POSIXLY_CORRECT is set
|
||||
|
||||
17
README
17
README
@@ -7,7 +7,7 @@ arbitrary limits.
|
||||
|
||||
The programs that can be built with this package are:
|
||||
|
||||
basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd
|
||||
[ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd
|
||||
df dir dircolors dirname du echo env expand expr factor false fmt fold
|
||||
ginstall groups head hostid hostname id join kill link ln logname ls
|
||||
md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
|
||||
@@ -73,9 +73,6 @@ Here is one possible patch to correct the problem.
|
||||
-#ifndef __STDC_32_MODE__
|
||||
+#ifndef __LP64__
|
||||
|
||||
I've heard that stat.c doesn't compile on Ultrix 4.3.
|
||||
Does anyone with access to such a system want to investigate?
|
||||
|
||||
On some systems, some of the tests fail when run as root. All failures
|
||||
I've seen appear to be due to problems in the testing framework, not
|
||||
in the tools themselves. I'll address that for the next release by
|
||||
@@ -90,11 +87,17 @@ If you see a problem that you've already reported, feel free to re-report
|
||||
it -- it won't bother me to get a reminder. Besides, the more messages I
|
||||
get regarding a particular problem the sooner it'll be fixed -- usually.
|
||||
If you sent a complete patch and, after a couple weeks you haven't
|
||||
received any acknowledgement please ping us. A complete patch includes
|
||||
received any acknowledgement, please ping us. A complete patch includes
|
||||
a well-written ChangeLog entry, unified (diff -u format) diffs relative
|
||||
to the most recent test release, an explanation for why the patch is
|
||||
to the most recent test release (or, better, relative to the latest
|
||||
sources in the CVS repository), an explanation for why the patch is
|
||||
necessary or useful, and if at all possible, enough information to
|
||||
reproduce whatever problem prompted it.
|
||||
reproduce whatever problem prompted it. Plus, you'll earn lots of
|
||||
karma if you include a test case to exercise any bug(s) you fix.
|
||||
Instructions for checking out the latest source via CVS are here:
|
||||
|
||||
http://savannah.gnu.org/cvs/?group=coreutils
|
||||
|
||||
|
||||
If your patch adds a new feature, please try to get some sort of consensus
|
||||
that it is a worthwhile change. One way to do that is to send mail to
|
||||
|
||||
22
THANKS
22
THANKS
@@ -33,6 +33,7 @@ Andrew Burgess aab@cichlid.com
|
||||
Andrew Dalke dalke@bioreason.com
|
||||
Andrew Pham andpha@us.ibm.com
|
||||
Andrew Tridgell tridge@samba.org
|
||||
Andrey Borzenkov arvidjaar@mail.ru
|
||||
Andries Brouwer Andries.Brouwer@cwi.nl
|
||||
Andy Longton alongton@metamark.com
|
||||
Antonio Rendas ajrendas@yahoo.com
|
||||
@@ -47,11 +48,15 @@ Austin Donnelly Austin.Donnelly@cl.cam.ac.uk
|
||||
Axel Kittenberger Anshil@gmx.net
|
||||
Bauke Jan Douma bjdouma@xs4all.nl
|
||||
Ben Elliston bje@air.net.au
|
||||
Ben Harris bjh21@netbsd.org
|
||||
Bengt Martensson bengt@mathematik.uni-Bremen.de
|
||||
Bernard Giroud bernard.giroud@creditlyonnais.ch
|
||||
Bernd Leibing bernd.leibing@rz.uni-ulm.de
|
||||
Bernd Melchers melchers@cis.fu-berlin.de
|
||||
Bernhard Baehr bernhard.baehr@gmx.de
|
||||
Bernhard Gabler bernhard@uni-koblenz.de
|
||||
Bernhard Rosenkraenzer bero@redhat.de
|
||||
Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be
|
||||
Bill Peters peters@gaffel.as.arizona.edu
|
||||
Bjorn Helgaas helgaas@rsn.hp.com
|
||||
Bob McCracken kerouac@ravenet.com
|
||||
@@ -60,6 +65,7 @@ Branden Robinson branden@necrotic.deadbeast.net
|
||||
Brendan O'Dea bod@compusol.com.au
|
||||
Brian Kimball bfk@footbag.org
|
||||
Brian Youmans 3diff@gnu.org
|
||||
Bruce Korb bkorb@veritas.com
|
||||
Bruno Haible haible@clisp.cons.org
|
||||
Carl Johnson carlj@cjlinux.home.org
|
||||
Carl Lowenstein cdl@mpl.UCSD.EDU
|
||||
@@ -69,6 +75,7 @@ Charles Randall crandall@matchlogic.com
|
||||
Chip Salzenberg chip@valinux.com
|
||||
Chris Faylor cgf@cygnus.com
|
||||
Chris J. Bednar cjb@AdvancedDataSolutions.com
|
||||
Chris Lesniewski ctl@mit.edu
|
||||
Chris Sylvain csylvain@umm.edu
|
||||
Chris Yeo cyeo@biking.org
|
||||
Christi Alice Scarborough christi@chiark.greenend.org.uk
|
||||
@@ -91,6 +98,7 @@ Darren Salt ds@youmustbejoking.demon.co.uk
|
||||
Dave Beckett dajobe@dajobe.org
|
||||
David Dyck dcd@tc.fluke.COM
|
||||
David Eisner cradle@umd.edu
|
||||
David Flynn dav@chess.plus.com
|
||||
David Godfrey dave@delta.demon.co.uk
|
||||
David Luyer david_luyer@pacific.net.au
|
||||
Deepak Goel deego@gnufans.org
|
||||
@@ -99,6 +107,7 @@ Derek Clegg dclegg@next.com
|
||||
Dick Streefland dick_streefland@tasking.com
|
||||
Dirk Lattermann dlatt@t-online.de
|
||||
Dirk-Jan Faber djfaber@snow.nl
|
||||
Dmitry Rutsky rutsky@school.ioffe.rssi.ru
|
||||
Dmitry V. Levin ldv@altlinux.org
|
||||
Don Parsons dparsons@synapse.kent.edu
|
||||
Donni Erpel donald@appc11.gsi.de
|
||||
@@ -175,8 +184,10 @@ Jarkko Hietaniemi jhi@epsilon.hut.fi
|
||||
Jean Charles Delepine delepine@u-picardie.fr
|
||||
Jeff Moore jbm@mordor.com
|
||||
Jeff Sheinberg jeffsh@localnet.com
|
||||
Jens Elkner elkner@imsgroup.de
|
||||
Jens Schmidt jms@jsds.hamburg.com
|
||||
Jerome Abela abela@hsc.fr
|
||||
Jérôme Zago bug-coreutils-ml@agt-the-walker.net
|
||||
Jesse Thilo jgt2@eecs.lehigh.edu
|
||||
Jie Xu xuj@iag.net
|
||||
Jim Blandy jimb@cyclic.com
|
||||
@@ -211,8 +222,9 @@ Karl Heuer kwzh@gnu.org
|
||||
Karl-Michael Schneider schneide@phil.uni-passau.de
|
||||
Karsten Thygesen karthy@kom.auc.dk
|
||||
Kaveh R. Ghazi ghazi@caip.rutgers.edu
|
||||
Keith M. Briggs keith.briggs@bt.com
|
||||
Keith Owens kaos@audio.apana.org.au
|
||||
Keith Thompson kst@sdsc.edu
|
||||
Keith Thompson kst@cts.com
|
||||
Ken Pizzini kenp@halcyon.com
|
||||
Kristin E Thomas kristint@us.ibm.com
|
||||
Kjetil Torgrim Homme kjetilho@ifi.uio.no
|
||||
@@ -223,6 +235,7 @@ Lehti Rami rammer@cs.tut.fi
|
||||
Leonard N. Zubkoff lnz@dandelion.com
|
||||
Leonardo Milano lmilano@udel.edu
|
||||
Lorne Baker lbaker@nitro.avint.net
|
||||
Luke Hassell lukehassell@yahoo.com
|
||||
M. P. Suzuki mpsuzuki@hiroshima-u.ac.jp
|
||||
Maciej Kwapulinski pikpok@univ.gda.pl
|
||||
Manas Garg manas@cygsoft.com
|
||||
@@ -261,6 +274,7 @@ Matthew S. Levine mslevine@theory.lcs.mit.edu
|
||||
Matthew Smith matts@bluesguitar.org
|
||||
Matthew Swift swift@alum.mit.edu
|
||||
Matthias Urlichs smurf@noris.de
|
||||
Matti Aarnio matti.aarnio@zmailer.org
|
||||
Mattias Wadenstein maswan@acc.umu.se
|
||||
Meelis Roos mroos@tartu.cyber.ee
|
||||
Michael ??? michael@roka.net
|
||||
@@ -294,6 +308,7 @@ Nick Lawes nlawes@silverplatter.com
|
||||
Niklas Edmundsson nikke@acc.umu.se
|
||||
Noah Friedman friedman@splode.com
|
||||
Noel Cragg noel@red-bean.com
|
||||
Olatunji Oluwabukunmi Ruwase tjruwase@stanford.edu
|
||||
Olav Morkrid olav@funcom.com
|
||||
Ole Laursen olau@hardworking.dk
|
||||
Oliver Kiddle okiddle@yahoo.co.uk
|
||||
@@ -335,6 +350,7 @@ Rick Sladkey jrs@world.std.com
|
||||
Rik Faith faith@cs.unc.edu
|
||||
Risto Kankkunen kankkune@lingsoft.fi
|
||||
Robert H. de Vries robert@and.nl
|
||||
Robert Millan zeratul2@wanadoo.es
|
||||
Rogier Wolff R.E.Wolff@BitWizard.nl
|
||||
Roland Huebner ro-huebner@gmx.de
|
||||
Roland Turner raz@raz.cx
|
||||
@@ -343,6 +359,7 @@ 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
|
||||
Samuel Tardieu sam@rfc1149.net
|
||||
Samuli Karkkainen Samuli.Karkkainen@hut.fi
|
||||
Sander van Malssen svm@kozmix.ow.nl
|
||||
Santiago Vila Doncel sanvila@unex.es
|
||||
@@ -359,6 +376,7 @@ Stephen Gildea gildea@stop.mail-abuse.org
|
||||
Stephen Smoogen smooge@mindspring.com
|
||||
Steve McConnel steve@acadcomp.sil.org
|
||||
Steven G. Johnson stevenj@alum.mit.edu
|
||||
Steven Mocking ufo@quicknet.nl
|
||||
Steven P Watson steven@magelico.net
|
||||
Stuart Kemp skemp@peter.bmc.com
|
||||
Tadayoshi Funaba tadf@kt.rim.or.jp
|
||||
@@ -368,6 +386,7 @@ Thomas Bushnell thomas@gnu.ai.mit.edu
|
||||
Thomas Goerlich thomas@schnappmatik.de
|
||||
Thomas Quinot thomas@Cuivre.FR.EU.ORG
|
||||
Tim J. Robbins tjr@FreeBSD.org
|
||||
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
|
||||
Tim Smithers mouse@dmouse.com.au
|
||||
Tim Waugh twaugh@redhat
|
||||
Todd A. Jacobs tjacobs@codegnome.org
|
||||
@@ -386,6 +405,7 @@ Uwe H. Steinfeld usteinfeld@gmx.net
|
||||
Vesselin Atanasov vesselin@bgnet.bg
|
||||
Vin Shelton acs@alumni.princeton.edu
|
||||
Volker Borchert bt@teknon.de
|
||||
Wartan Hachaturow wart@tepkom.ru
|
||||
Wayne Stewart wstewa@atl.com
|
||||
Wenjun Zheng zwj@yahoo.com
|
||||
Werner Almesberger Werner.Almesberger@epfl.ch
|
||||
|
||||
55
TODO
55
TODO
@@ -23,10 +23,6 @@ And once that's done, add an exclusion so that `cp --link'
|
||||
no longer incurs the overhead of saving src. dev/ino and dest. filename
|
||||
in the hash table.
|
||||
|
||||
Apply suggestion from Paul Jarc to use something along the
|
||||
lines of http://cr.yp.to/daemontools/setuidgid.html to avoid
|
||||
kludges (as in tests/rm/fail-2eperm) when running tests as root.
|
||||
|
||||
See if we can be consistent about where --verbose sends its output:
|
||||
These all send --verbose output to stdout:
|
||||
head, tail, rm, cp, mv, ln, chmod, chown, chgrp, install, ln
|
||||
@@ -37,14 +33,9 @@ See if we can be consistent about where --verbose sends its output:
|
||||
Write an autoconf test to work around build failure in HPUX's 64-bit mode.
|
||||
See notes in README -- and remove them once there's a work-around.
|
||||
|
||||
after 5.0, change doc strings (like df, ls, etc) not to use `,'
|
||||
as thousands separator in e.g. 1,000,000. Instead, do this:
|
||||
|
||||
SIZE may be (or may be an integer optionally followed by) one of following:
|
||||
kB 1000, K 1024, MB 1000*1000, M 1024*1024 and so on for G, T, P, E, Z, Y.
|
||||
|
||||
Integrate use of sendfile, suggested here:
|
||||
http://mail.gnu.org/archive/html/bug-fileutils/2003-03/msg00030.html
|
||||
I don't plan to do that, since a few tests demonstrate no significant benefit.
|
||||
|
||||
Should printf '\0123' print "\n3"?
|
||||
per report from TAKAI Kousuke on Mar 27
|
||||
@@ -54,8 +45,6 @@ printf: consider adapting builtins/printf.def from bash
|
||||
|
||||
df: add `--total' option, suggested here http://bugs.debian.org/186007
|
||||
|
||||
Martin Michlmayr's patch to provide ls with `--sort directory' option
|
||||
|
||||
seq: give better diagnostics for invalid formats:
|
||||
e.g. no or too many % directives
|
||||
seq: consider allowing format string to contain no %-directives
|
||||
@@ -64,16 +53,36 @@ dd: consider adding an option to suppress `bytes/block read/written'
|
||||
output to stderr. Suggested here:
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045
|
||||
|
||||
nl: fix this bug:
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177256
|
||||
# printf 'a\n\n'|nl|cat -A
|
||||
1^Ia$
|
||||
$
|
||||
$
|
||||
|
||||
m4: rename all macros that start with AC_ to start with another prefix
|
||||
|
||||
Consider using an autoconf test and rename wrapper to make mv work
|
||||
properly (by unlinking a) in cases like this:
|
||||
: > a; ln a b; mv a b
|
||||
Reported by Ed Avis: http://article.gmane.org/gmane.comp.gnu.fileutils.bugs/686
|
||||
resolve RH report on cp -a forwarded by Tim Waugh
|
||||
|
||||
Martin Michlmayr's patch to provide ls with `--sort directory' option
|
||||
|
||||
Remove uses of PROTOTYPES
|
||||
|
||||
tail: don't use xlseek; it *exits*.
|
||||
Instead, maybe use a macro and return nonzero.
|
||||
|
||||
add mktemp? Suggested by Nelson Beebe
|
||||
|
||||
Now that AC_FUNC_LSTAT and AC_FUNC_STAT are in autoconf,
|
||||
remove m4/stat.m4 and m4/lstat.m4.
|
||||
|
||||
df: alignment problem of `Used' heading with e.g., -mP
|
||||
|
||||
tr: support nontrivial equivalence classes, e.g. [=e=] with LC_COLLATE=fr_FR
|
||||
|
||||
fix tail -f to work with named pipes; reported by Ian D. Allen
|
||||
|
||||
lib/strftime.c: Since %N is the only format that we need but that
|
||||
glibc's strftime doesn't support, consider using a wrapper that
|
||||
would expand /%(-_)?\d*N/ to the desired string and then pass the
|
||||
resulting string to glibc's strftime.
|
||||
|
||||
chown-core.c: warn when operating on set-UID or set-GID regular file
|
||||
|
||||
sort: Compress temporary files when doing large external sort/merges.
|
||||
This improves performance when you can compress/uncompress faster than
|
||||
you can read/write, which is common in these days of fast CPUs.
|
||||
suggestion from Charles Randall on 2001-08-10
|
||||
|
||||
1253
aclocal.m4
vendored
1253
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
15
announce-gen
15
announce-gen
@@ -6,7 +6,7 @@ use Getopt::Long;
|
||||
use Digest::MD5;
|
||||
use Digest::SHA1;
|
||||
|
||||
(my $VERSION = '$Revision: 1.13 $ ') =~ tr/[0-9].//cd;
|
||||
(my $VERSION = '$Revision: 1.16 $ ') =~ tr/[0-9].//cd;
|
||||
(my $ME = $0) =~ s|.*/||;
|
||||
|
||||
my %valid_release_types = map {$_ => 1} qw (alpha beta major);
|
||||
@@ -252,8 +252,8 @@ EOF
|
||||
print "\nHere are GPG detached signatures:\n";
|
||||
foreach my $url (@url_dir_list)
|
||||
{
|
||||
print " $url/$tgz.sig\n";
|
||||
print " $url/$tbz.sig\n";
|
||||
print " $url/$tgz.asc\n";
|
||||
print " $url/$tbz.asc\n";
|
||||
}
|
||||
|
||||
# FIXME: clean up upon interrupt or die
|
||||
@@ -303,7 +303,10 @@ EOF
|
||||
{
|
||||
if ( ! $in_items)
|
||||
{
|
||||
$line =~ /^[^ *].*\Q$curr_version\E/o
|
||||
# Match lines like this one:
|
||||
# * Major changes in release 5.0.1:
|
||||
# but not any other line that starts with a space, *, or -.
|
||||
$line =~ /^(\* Major changes.*|[^ *-].*)\Q$curr_version\E/o
|
||||
or next;
|
||||
$in_items = 1;
|
||||
print $line;
|
||||
@@ -313,7 +316,7 @@ EOF
|
||||
# Be careful that this regexp cannot match version numbers
|
||||
# in NEWS items -- they might well say `introduced in 4.5.5',
|
||||
# and we don't want that to match.
|
||||
$line =~ /^[^ *].*\Q$prev_version\E/o
|
||||
$line =~ /^(\* Major changes.*|[^ *-].*)\Q$prev_version\E/o
|
||||
and last;
|
||||
print $line;
|
||||
}
|
||||
@@ -321,7 +324,7 @@ EOF
|
||||
close NEWS;
|
||||
|
||||
$in_items
|
||||
or die "$ME: $news_file: no matching lines\n";
|
||||
or die "$ME: $news_file: no matching lines for `$curr_version'\n";
|
||||
}
|
||||
|
||||
$release_type eq 'major'
|
||||
|
||||
71
config.hin
71
config.hin
@@ -323,6 +323,10 @@
|
||||
don't. */
|
||||
#undef HAVE_DECL___FPENDING
|
||||
|
||||
/* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL___SYS_SIGLIST
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
@@ -459,9 +463,16 @@
|
||||
/* Define to 1 if you have the `initgroups' function. */
|
||||
#undef HAVE_INITGROUPS
|
||||
|
||||
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
|
||||
#undef HAVE_INTMAX_T
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
|
||||
declares uintmax_t. */
|
||||
#undef HAVE_INTTYPES_H_WITH_UINTMAX
|
||||
|
||||
/* Define to 1 if you have the `isascii' function. */
|
||||
#undef HAVE_ISASCII
|
||||
|
||||
@@ -513,8 +524,7 @@
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* Define to 1 if long double works and has more range or precision than
|
||||
double. */
|
||||
/* Define if you have the 'long double' type. */
|
||||
#undef HAVE_LONG_DOUBLE
|
||||
|
||||
/* Define to 1 if you support file names longer than 14 characters. */
|
||||
@@ -607,6 +617,12 @@
|
||||
/* Define to 1 if you have the `next_dev' function. */
|
||||
#undef HAVE_NEXT_DEV
|
||||
|
||||
/* Define to 1 if you have the <nfs/nfs_clnt.h> header file. */
|
||||
#undef HAVE_NFS_NFS_CLNT_H
|
||||
|
||||
/* Define to 1 if you have the <nfs/vfs.h> header file. */
|
||||
#undef HAVE_NFS_VFS_H
|
||||
|
||||
/* Define to 1 if you have the <nlist.h> header file. */
|
||||
#undef HAVE_NLIST_H
|
||||
|
||||
@@ -631,6 +647,9 @@
|
||||
/* Define to 1 if you have the `pstat_getstatic' function. */
|
||||
#undef HAVE_PSTAT_GETSTATIC
|
||||
|
||||
/* Define to 1 if the system has the type `ptrdiff_t'. */
|
||||
#undef HAVE_PTRDIFF_T
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
@@ -656,6 +675,9 @@
|
||||
/* Define to 1 if you have the `rpmatch' function. */
|
||||
#undef HAVE_RPMATCH
|
||||
|
||||
/* Define to 1 if you have run the test for working tzset. */
|
||||
#undef HAVE_RUN_TZSET_TEST
|
||||
|
||||
/* Define to 1 if you have the `sethostname' function. */
|
||||
#undef HAVE_SETHOSTNAME
|
||||
|
||||
@@ -674,6 +696,9 @@
|
||||
/* Define to 1 if you have the `sig2str' function. */
|
||||
#undef HAVE_SIG2STR
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the `sqrt' function. */
|
||||
#undef HAVE_SQRT
|
||||
|
||||
@@ -694,6 +719,10 @@
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
|
||||
uintmax_t. */
|
||||
#undef HAVE_STDINT_H_WITH_UINTMAX
|
||||
|
||||
/* Define to 1 if you have the <stdio_ext.h> header file. */
|
||||
#undef HAVE_STDIO_EXT_H
|
||||
|
||||
@@ -1019,6 +1048,9 @@
|
||||
/* Define to 1 if you have the `tzset' function. */
|
||||
#undef HAVE_TZSET
|
||||
|
||||
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
|
||||
#undef HAVE_UINTMAX_T
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#undef HAVE_UNAME
|
||||
|
||||
@@ -1058,12 +1090,21 @@
|
||||
/* Define to 1 if you have the <values.h> header file. */
|
||||
#undef HAVE_VALUES_H
|
||||
|
||||
/* Define to 1 if you have the `vasnprintf' function. */
|
||||
#undef HAVE_VASNPRINTF
|
||||
|
||||
/* Define to 1 if you have the `vasprintf' function. */
|
||||
#undef HAVE_VASPRINTF
|
||||
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#undef HAVE_WCHAR_H
|
||||
|
||||
/* Define if you have the 'wchar_t' type. */
|
||||
#undef HAVE_WCHAR_T
|
||||
|
||||
/* Define to 1 if you have the `wcrtomb' function. */
|
||||
#undef HAVE_WCRTOMB
|
||||
|
||||
@@ -1073,9 +1114,18 @@
|
||||
/* Define to 1 if you have the `wcwidth' function. */
|
||||
#undef HAVE_WCWIDTH
|
||||
|
||||
/* Define if you have the 'wint_t' type. */
|
||||
#undef HAVE_WINT_T
|
||||
|
||||
/* Define to 1 if you have the `wmempcpy' function. */
|
||||
#undef HAVE_WMEMPCPY
|
||||
|
||||
/* Define if readdir is found to work properly in some unusual cases. */
|
||||
#undef HAVE_WORKING_READDIR
|
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */
|
||||
#undef HAVE__BOOL
|
||||
|
||||
/* Define to 1 if you have the external variable, _system_configuration with a
|
||||
member named physmem. */
|
||||
#undef HAVE__SYSTEM_CONFIGURATION
|
||||
@@ -1275,6 +1325,9 @@
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
#undef TM_IN_SYS_TIME
|
||||
|
||||
/* Define if tzset clobbers localtime's static buffer. */
|
||||
#undef TZSET_CLOBBERS_LOCALTIME_BUFFER
|
||||
|
||||
/* Define to 1 for Encore UMAX. */
|
||||
#undef UMAX
|
||||
|
||||
@@ -1350,6 +1403,9 @@
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef gid_t
|
||||
|
||||
/* Define to rpl_gmtime if the replacement function should be used. */
|
||||
#undef gmtime
|
||||
|
||||
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
||||
if it is not supported. */
|
||||
#undef inline
|
||||
@@ -1357,7 +1413,7 @@
|
||||
/* Define to `unsigned long' if <sys/types.h> does not define. */
|
||||
#undef ino_t
|
||||
|
||||
/* Define to widest signed type if <inttypes.h> doesn't define. */
|
||||
/* Define to long or long long if <stdint.h> and <inttypes.h> don't define. */
|
||||
#undef intmax_t
|
||||
|
||||
/* Define to rpl_localtime if the replacement function should be used. */
|
||||
@@ -1412,16 +1468,23 @@
|
||||
supported. Do not define if restrict is supported directly. */
|
||||
#undef restrict
|
||||
|
||||
/* Define to empty if the C compiler doesn't support this keyword. */
|
||||
#undef signed
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef ssize_t
|
||||
|
||||
/* Define to rpl_tzset if the wrapper function should be used. */
|
||||
#undef tzset
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef uid_t
|
||||
|
||||
/* Define to widest unsigned type if <inttypes.h> doesn't define. */
|
||||
/* Define to unsigned long or unsigned long long if <stdint.h> and
|
||||
<inttypes.h> don't define. */
|
||||
#undef uintmax_t
|
||||
|
||||
/* Define to empty if the keyword `volatile' does not work. Warning: valid
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2003-04-21 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* depcomp: New version, now that this file is now on the list
|
||||
in ../Makefile.cfg.
|
||||
|
||||
2003-01-12 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Lots of syntactic clean-up, mostly from Karl Berry.
|
||||
|
||||
31
config/config.guess
vendored
31
config/config.guess
vendored
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2003-02-22'
|
||||
timestamp='2003-07-02'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -106,6 +106,7 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
dummy=$tmp/dummy ;
|
||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
@@ -282,6 +283,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit 0 ;;
|
||||
Alpha*:OpenVMS:*:*)
|
||||
echo alpha-hp-vms
|
||||
exit 0 ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# Should we change UNAME_MACHINE based on the output of uname instead
|
||||
@@ -320,6 +324,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
NILE*:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
DRS?6000:unix:4.0:6*)
|
||||
echo sparc-icl-nx6
|
||||
exit 0 ;;
|
||||
DRS?6000:UNIX_SV:4.2*:7*)
|
||||
case `/usr/bin/uname -p` in
|
||||
sparc) echo sparc-icl-nx7 && exit 0 ;;
|
||||
@@ -744,7 +751,7 @@ EOF
|
||||
*:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
*:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
|
||||
# Determine whether the default compiler uses glibc.
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
@@ -756,7 +763,10 @@ EOF
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
|
||||
# GNU/FreeBSD systems have a "k" prefix to indicate we are using
|
||||
# FreeBSD's kernel, but not the complete OS.
|
||||
case ${LIBC} in gnu) kernel_only='k' ;; esac
|
||||
echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
@@ -767,8 +777,8 @@ EOF
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
x86:Interix*:3*)
|
||||
echo i586-pc-interix3
|
||||
x86:Interix*:[34]*)
|
||||
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
||||
exit 0 ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
@@ -797,6 +807,9 @@ EOF
|
||||
arm*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
cris:Linux:*:*)
|
||||
echo cris-axis-linux-gnu
|
||||
exit 0 ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
@@ -875,6 +888,9 @@ EOF
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
exit 0 ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
@@ -1033,7 +1049,7 @@ EOF
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
@@ -1189,6 +1205,9 @@ EOF
|
||||
*:ITS:*:*)
|
||||
echo pdp10-unknown-its
|
||||
exit 0 ;;
|
||||
SEI:*:*:SEIUX)
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
|
||||
39
config/config.sub
vendored
39
config/config.sub
vendored
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2003-02-22'
|
||||
timestamp='2003-07-04'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -118,7 +118,7 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -229,7 +229,7 @@ case $basic_machine in
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| clipper \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
@@ -261,7 +261,7 @@ case $basic_machine in
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| tahoe | thumb | tic80 | tron \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale | xstormy16 | xtensa \
|
||||
@@ -373,6 +373,9 @@ case $basic_machine in
|
||||
basic_machine=a29k-none
|
||||
os=-bsd
|
||||
;;
|
||||
amd64)
|
||||
basic_machine=x86_64-pc
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
@@ -768,18 +771,24 @@ case $basic_machine in
|
||||
pentiumpro | p6 | 6x86 | athlon | athlon_*)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
pentiumii | pentium2 | pentiumiii | pentium3)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentium4)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium4-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
@@ -838,6 +847,10 @@ case $basic_machine in
|
||||
sb1el)
|
||||
basic_machine=mipsisa64sb1el-unknown
|
||||
;;
|
||||
sei)
|
||||
basic_machine=mips-sei
|
||||
os=-seiux
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
@@ -845,6 +858,9 @@ case $basic_machine in
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparclite-wrs | simso-wrs)
|
||||
basic_machine=sparclite-wrs
|
||||
os=-vxworks
|
||||
@@ -919,10 +935,6 @@ case $basic_machine in
|
||||
basic_machine=t90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic4x | c4x*)
|
||||
basic_machine=tic4x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
@@ -1116,7 +1128,7 @@ case $os in
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
@@ -1128,7 +1140,7 @@ case $os in
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix*)
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1274,6 +1286,9 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999, 2000, 2003 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
|
||||
@@ -206,6 +206,44 @@ aix)
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
@@ -240,8 +278,8 @@ tru64)
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
@@ -265,9 +303,7 @@ dashmstdout)
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'. We will use -o /dev/null later,
|
||||
# however we can't do the remplacement now because
|
||||
# `-o $object' might simply not be used
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
@@ -287,7 +323,11 @@ dashmstdout)
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
@@ -306,6 +346,13 @@ dashXmstdout)
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
@@ -318,7 +365,9 @@ makedepend)
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
-*)
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
|
||||
@@ -1,21 +1,38 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
# This originally came from X11R5 (mit/util/scripts/install.sh).
|
||||
|
||||
scriptversion=2003-01-17.15
|
||||
scriptversion=2003-06-13.21
|
||||
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
# (FSF changes in the public domain.)
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
@@ -213,8 +230,8 @@ else
|
||||
test -z "$dstfile" && dstfile=`basename "$dst"`
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
rmtmp=$dstdir/#rm.$$#
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
# Public domain.
|
||||
|
||||
scriptversion=2003-06-14.23
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||
|
||||
Create each directory DIR (with mode MODE, if specified), including all
|
||||
leading file name components.
|
||||
"
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage" 1>&2
|
||||
echo "$usage"
|
||||
exit 0
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
@@ -23,6 +29,10 @@ while test $# -gt 0 ; do
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit 0
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
@@ -84,17 +94,17 @@ do
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -107,5 +117,8 @@ exit $errstatus
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{2003-03-22.08}
|
||||
\def\texinfoversion{2003-05-04.08}
|
||||
%
|
||||
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
|
||||
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
@@ -34,12 +34,12 @@
|
||||
% ftp://tug.org/tex/texinfo.tex
|
||||
% (and all CTAN mirrors, see http://www.ctan.org),
|
||||
% and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
|
||||
%
|
||||
%
|
||||
% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
|
||||
%
|
||||
%
|
||||
% The texinfo.tex in any given Texinfo distribution could well be out
|
||||
% of date, so if that's what you're using, please check.
|
||||
%
|
||||
%
|
||||
% Send bug reports to bug-texinfo@gnu.org. Please include including a
|
||||
% complete document in each bug report with which we can reproduce the
|
||||
% problem. Patches are, of course, greatly appreciated.
|
||||
@@ -55,7 +55,7 @@
|
||||
% The extra TeX runs get the cross-reference information correct.
|
||||
% Sometimes one run after texindex suffices, and sometimes you need more
|
||||
% than two; texi2dvi does it as many times as necessary.
|
||||
%
|
||||
%
|
||||
% It is possible to adapt texinfo.tex for other languages, to some
|
||||
% extent. You can get the existing language-specific files from the
|
||||
% full Texinfo distribution.
|
||||
@@ -88,6 +88,7 @@
|
||||
\let\ptexgtr=>
|
||||
\let\ptexhat=^
|
||||
\let\ptexi=\i
|
||||
\let\ptexindent=\indent
|
||||
\let\ptexlbrace=\{
|
||||
\let\ptexless=<
|
||||
\let\ptexplus=+
|
||||
@@ -204,7 +205,7 @@
|
||||
|
||||
% add check for \lastpenalty to plain's definitions. If the last thing
|
||||
% we did was a \nobreak, we don't want to insert more space.
|
||||
%
|
||||
%
|
||||
\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
|
||||
\removelastskip\penalty-50\smallskip\fi\fi}
|
||||
\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
|
||||
@@ -569,7 +570,7 @@
|
||||
% explicit \vfill so that the extra space is at the bottom. The
|
||||
% threshold for doing this is if the group is more than \vfilllimit
|
||||
% percent of a page (\vfilllimit can be changed inside of @tex).
|
||||
%
|
||||
%
|
||||
\newbox\groupbox
|
||||
\def\vfilllimit{0.7}
|
||||
%
|
||||
@@ -775,10 +776,10 @@ where each line of input produces a line of output.}
|
||||
% @inmargin{TEXT [, RIGHT-TEXT]}
|
||||
% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
|
||||
% else use TEXT for both).
|
||||
%
|
||||
%
|
||||
\def\inmargin#1{\parseinmargin #1,,\finish}
|
||||
\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
|
||||
\setbox0 = \hbox{\ignorespaces #2}%
|
||||
\setbox0 = \hbox{\ignorespaces #2}%
|
||||
\ifdim\wd0 > 0pt
|
||||
\def\lefttext{#1}% have both texts
|
||||
\def\righttext{#2}%
|
||||
@@ -847,8 +848,9 @@ where each line of input produces a line of output.}
|
||||
|
||||
% @paragraphindent NCHARS
|
||||
% We'll use ems for NCHARS, close enough.
|
||||
% We cannot implement @paragraphindent asis, though.
|
||||
%
|
||||
% NCHARS can also be the word `asis' or `none'.
|
||||
% We cannot feasibly implement @paragraphindent asis, though.
|
||||
%
|
||||
\def\asisword{asis} % no translation, these are keywords
|
||||
\def\noneword{none}
|
||||
%
|
||||
@@ -883,6 +885,53 @@ where each line of input produces a line of output.}
|
||||
\fi
|
||||
}
|
||||
|
||||
% @firstparagraphindent WORD
|
||||
% If WORD is `none', then suppress indentation of the first paragraph
|
||||
% after a section heading. If WORD is `insert', then do indentat such
|
||||
% paragraphs.
|
||||
%
|
||||
% The paragraph indentation is suppressed or not by calling
|
||||
% \suppressfirstparagraphindent, which the sectioning commands do. We
|
||||
% switch the definition of this back and forth according to WORD. By
|
||||
% default, we suppress indentation.
|
||||
%
|
||||
\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
|
||||
\newdimen\currentparindent
|
||||
%
|
||||
\def\insertword{insert}
|
||||
%
|
||||
\def\firstparagraphindent{\parsearg\dofirstparagraphindent}
|
||||
\def\dofirstparagraphindent#1{%
|
||||
\def\temp{#1}%
|
||||
\ifx\temp\noneword
|
||||
\let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
|
||||
\else\ifx\temp\insertword
|
||||
\let\suppressfirstparagraphindent = \relax
|
||||
\else
|
||||
\errhelp = \EMsimple
|
||||
\errmessage{Unknown @firstparagraphindent option `\temp'}%
|
||||
\fi\fi
|
||||
}
|
||||
|
||||
% Here is how we actually suppress indentation. Redefine \everypar to
|
||||
% \kern backwards by \parindent, and then reset itself to empty.
|
||||
%
|
||||
% We also make \indent itself not actually do anything until the next
|
||||
% paragraph.
|
||||
%
|
||||
\gdef\dosuppressfirstparagraphindent{%
|
||||
\gdef\indent{%
|
||||
\global\let\indent=\ptexindent
|
||||
\global\everypar = {}%
|
||||
}%
|
||||
\global\everypar = {%
|
||||
\kern-\parindent
|
||||
\global\let\indent=\ptexindent
|
||||
\global\everypar = {}%
|
||||
}%
|
||||
}%
|
||||
|
||||
|
||||
% @asis just yields its argument. Used with @table, for example.
|
||||
%
|
||||
\def\asis#1{#1}
|
||||
@@ -891,14 +940,14 @@ where each line of input produces a line of output.}
|
||||
% We don't use $'s directly in the definition of \math because we need
|
||||
% to set catcodes according to plain TeX first, to allow for subscripts,
|
||||
% superscripts, special math chars, etc.
|
||||
%
|
||||
%
|
||||
\let\implicitmath = $%$ font-lock fix
|
||||
%
|
||||
% One complication: _ usually means subscripts, but it could also mean
|
||||
% an actual _ character, as in @math{@var{some_variable} + 1}. So make
|
||||
% _ within @math be active (mathcode "8000), and distinguish by seeing
|
||||
% if the current family is \slfam, which is what @var uses.
|
||||
%
|
||||
%
|
||||
{\catcode\underChar = \active
|
||||
\gdef\mathunderscore{%
|
||||
\catcode\underChar=\active
|
||||
@@ -909,7 +958,7 @@ where each line of input produces a line of output.}
|
||||
% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
|
||||
% this is not advertised and we don't care. Texinfo does not
|
||||
% otherwise define @\.
|
||||
%
|
||||
%
|
||||
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
|
||||
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
|
||||
%
|
||||
@@ -924,7 +973,7 @@ where each line of input produces a line of output.}
|
||||
% Some active characters (such as <) are spaced differently in math.
|
||||
% We have to reset their definitions in case the @math was an
|
||||
% argument to a command which set the catcodes (such as @item or @section).
|
||||
%
|
||||
%
|
||||
{
|
||||
\catcode`^ = \active
|
||||
\catcode`< = \active
|
||||
@@ -1050,8 +1099,8 @@ where each line of input produces a line of output.}
|
||||
\def\pdfmakeoutlines{{%
|
||||
\openin 1 \jobname.toc
|
||||
\ifeof 1\else\begingroup
|
||||
\closein 1
|
||||
% Thanh's hack / proper braces in bookmarks
|
||||
\closein 1
|
||||
% Thanh's hack / proper braces in bookmarks
|
||||
\edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
|
||||
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
|
||||
%
|
||||
@@ -1080,7 +1129,7 @@ where each line of input produces a line of output.}
|
||||
\let\unnumbsubsubsecentry = \subsubsecentry
|
||||
%
|
||||
% Make special characters normal for writing to the pdf file.
|
||||
%
|
||||
%
|
||||
\indexnofonts
|
||||
\let\tt=\relax
|
||||
\turnoffactive
|
||||
@@ -1095,7 +1144,7 @@ where each line of input produces a line of output.}
|
||||
\let\nextmakelinks=\makelinks
|
||||
\ifnum\lnkcount>0,\fi
|
||||
\picknum{#1}%
|
||||
\startlink attr{/Border [0 0 0]}
|
||||
\startlink attr{/Border [0 0 0]}
|
||||
goto name{\pdfmkpgn{\the\pgn}}%
|
||||
\linkcolor #1%
|
||||
\advance\lnkcount by 1%
|
||||
@@ -1150,7 +1199,7 @@ where each line of input produces a line of output.}
|
||||
\ifx\first0\adn0
|
||||
\else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
|
||||
\else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
|
||||
\else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
|
||||
\else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
|
||||
\else
|
||||
\ifnum0=\countA\else\makelink\fi
|
||||
\ifx\first.\let\next=\done\else
|
||||
@@ -1404,12 +1453,12 @@ where each line of input produces a line of output.}
|
||||
% 8.5x11=90+ smallbook=80 a4=90+ a5=77
|
||||
% For me, subjectively, the few extra characters that fit aren't worth
|
||||
% the additional smallness of 8pt. So I'm making the default 9pt.
|
||||
%
|
||||
%
|
||||
% By the way, for comparison, here's what fits with @example (10pt):
|
||||
% 8.5x11=71 smallbook=60 a4=75 a5=58
|
||||
%
|
||||
%
|
||||
% I wish we used A4 paper on this side of the Atlantic.
|
||||
%
|
||||
%
|
||||
% --karl, 24jan03.
|
||||
|
||||
|
||||
@@ -1435,7 +1484,8 @@ where each line of input produces a line of output.}
|
||||
|
||||
% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
|
||||
% unless the following character is such as not to need one.
|
||||
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
|
||||
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
|
||||
\ptexslash\fi\fi\fi}
|
||||
\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
|
||||
\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
|
||||
|
||||
@@ -1458,7 +1508,7 @@ where each line of input produces a line of output.}
|
||||
% Set sfcode to normal for the chars that usually have another value.
|
||||
% Can't use plain's \frenchspacing because it uses the `\x notation, and
|
||||
% sometimes \x has an active definition that messes things up.
|
||||
%
|
||||
%
|
||||
\catcode`@=11
|
||||
\def\frenchspacing{%
|
||||
\sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
|
||||
@@ -1567,7 +1617,7 @@ where each line of input produces a line of output.}
|
||||
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
|
||||
\else
|
||||
\errhelp = \EMsimple
|
||||
\errmessage{Unknown @kbdinputstyle `\arg'}%
|
||||
\errmessage{Unknown @kbdinputstyle option `\arg'}%
|
||||
\fi\fi\fi
|
||||
}
|
||||
\def\worddistinct{distinct}
|
||||
@@ -1618,7 +1668,7 @@ where each line of input produces a line of output.}
|
||||
|
||||
% rms does not like angle brackets --karl, 17may97.
|
||||
% So now @email is just like @uref, unless we are pdf.
|
||||
%
|
||||
%
|
||||
%\def\email#1{\angleleft{\tt #1}\angleright}
|
||||
\ifpdf
|
||||
\def\email#1{\doemail#1,,\finish}
|
||||
@@ -1667,7 +1717,7 @@ where each line of input produces a line of output.}
|
||||
% we'd have to redo the font mechanism to change the \scriptstyle and
|
||||
% \scriptscriptstyle font sizes to make it look right in headings.
|
||||
% Adapted from the plain.tex definition of \copyright.
|
||||
%
|
||||
%
|
||||
\def\registeredsymbol{%
|
||||
$^{{\ooalign{\hfil\raise.07ex\hbox{$\scriptstyle\rm R$}\hfil\crcr\Orb}}%
|
||||
}$%
|
||||
@@ -2085,18 +2135,21 @@ where each line of input produces a line of output.}
|
||||
\itemizey {#1}{\Eitemize}
|
||||
}
|
||||
|
||||
\def\itemizey #1#2{%
|
||||
\aboveenvbreak %
|
||||
\itemmax=\itemindent %
|
||||
\advance \itemmax by -\itemmargin %
|
||||
\advance \leftskip by \itemindent %
|
||||
\exdentamount=\itemindent
|
||||
\parindent = 0pt %
|
||||
\parskip = \smallskipamount %
|
||||
\ifdim \parskip=0pt \parskip=2pt \fi%
|
||||
\def#2{\endgraf\afterenvbreak\endgroup}%
|
||||
\def\itemcontents{#1}%
|
||||
\let\item=\itemizeitem}
|
||||
\def\itemizey#1#2{%
|
||||
\aboveenvbreak
|
||||
\itemmax=\itemindent
|
||||
\advance\itemmax by -\itemmargin
|
||||
\advance\leftskip by \itemindent
|
||||
\exdentamount=\itemindent
|
||||
\parindent=0pt
|
||||
\parskip=\smallskipamount
|
||||
\ifdim\parskip=0pt \parskip=2pt \fi
|
||||
\def#2{\endgraf\afterenvbreak\endgroup}%
|
||||
\def\itemcontents{#1}%
|
||||
% @itemize with no arg is equivalent to @itemize @bullet.
|
||||
\ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
|
||||
\let\item=\itemizeitem
|
||||
}
|
||||
|
||||
% \splitoff TOKENS\endmark defines \first to be the first token in
|
||||
% TOKENS, and \rest to be the remainder.
|
||||
@@ -2507,12 +2560,12 @@ width0pt\relax} \fi
|
||||
% @deffn ...
|
||||
% @end deffn
|
||||
% @end ignore
|
||||
%
|
||||
%
|
||||
% The @end deffn is going to get expanded, because we're trying to allow
|
||||
% nested conditionals. But we don't want to expand the actual @deffn,
|
||||
% since it might be syntactically correct and intended to be ignored.
|
||||
% Since \end checks for \relax, using \empty does not cause an error.
|
||||
%
|
||||
%
|
||||
\def\ignoremorecommands{%
|
||||
\let\defcodeindex = \relax
|
||||
\let\defcv = \empty
|
||||
@@ -2917,10 +2970,10 @@ width0pt\relax} \fi
|
||||
|
||||
% @synindex foo bar makes index foo feed into index bar.
|
||||
% Do this instead of @defindex foo if you don't want it as a separate index.
|
||||
%
|
||||
%
|
||||
% @syncodeindex foo bar similar, but put all entries made for index foo
|
||||
% inside @code.
|
||||
%
|
||||
%
|
||||
\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
|
||||
\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
|
||||
|
||||
@@ -2962,13 +3015,13 @@ width0pt\relax} \fi
|
||||
% Take care of Texinfo commands that can appear in an index entry.
|
||||
% Since there are some commands we want to expand, and others we don't,
|
||||
% we have to laboriously prevent expansion for those that we don't.
|
||||
%
|
||||
%
|
||||
\def\indexdummies{%
|
||||
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
|
||||
\def\ {\realbackslash\space }%
|
||||
% Need these in case \tex is in effect and \{ is a \delimiter again.
|
||||
% But can't use \lbracecmd and \rbracecmd because texindex assumes
|
||||
% braces and backslashes are used only as delimiters.
|
||||
% braces and backslashes are used only as delimiters.
|
||||
\let\{ = \mylbrace
|
||||
\let\} = \myrbrace
|
||||
%
|
||||
@@ -2977,14 +3030,14 @@ width0pt\relax} \fi
|
||||
% words, not control letters, because the \space would be incorrect
|
||||
% for control characters, but is needed to separate the control word
|
||||
% from whatever follows.
|
||||
%
|
||||
%
|
||||
% For control letters, we have \definedummyletter, which omits the
|
||||
% space.
|
||||
%
|
||||
%
|
||||
% These can be used both for control words that take an argument and
|
||||
% those that do not. If it is followed by {arg} in the input, then
|
||||
% that will dutifully get written to the index (or wherever).
|
||||
%
|
||||
%
|
||||
\def\definedummyword##1{%
|
||||
\expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
|
||||
}%
|
||||
@@ -2997,9 +3050,9 @@ width0pt\relax} \fi
|
||||
}
|
||||
|
||||
% For the aux file, @ is the escape character. So we want to redefine
|
||||
% everything using @ instead of \realbackslash. When everything uses
|
||||
% everything using @ instead of \realbackslash. When everything uses
|
||||
% @, this will be simpler.
|
||||
%
|
||||
%
|
||||
\def\atdummies{%
|
||||
\def\@{@@}%
|
||||
\def\ {@ }%
|
||||
@@ -3020,7 +3073,7 @@ width0pt\relax} \fi
|
||||
|
||||
% Called from \indexdummies and \atdummies. \definedummyword and
|
||||
% \definedummyletter must be defined first.
|
||||
%
|
||||
%
|
||||
\def\commondummies{%
|
||||
%
|
||||
\normalturnoffactive
|
||||
@@ -3340,6 +3393,7 @@ width0pt\relax} \fi
|
||||
%
|
||||
\smallfonts \rm
|
||||
\tolerance = 9500
|
||||
\everypar = {}% don't want the \kern\-parindent from indentation suppression.
|
||||
\indexbreaks
|
||||
%
|
||||
% See if the index file exists and is nonempty.
|
||||
@@ -3583,7 +3637,7 @@ width0pt\relax} \fi
|
||||
\wd0=\hsize \wd2=\hsize
|
||||
\hbox to\pagewidth{\box0\hfil\box2}%
|
||||
}
|
||||
%
|
||||
%
|
||||
% All done with double columns.
|
||||
\def\enddoublecolumns{%
|
||||
\output = {%
|
||||
@@ -3721,6 +3775,7 @@ width0pt\relax} \fi
|
||||
\numberedsubsubseczzz{#2}
|
||||
\fi
|
||||
\fi
|
||||
\suppressfirstparagraphindent
|
||||
}
|
||||
|
||||
% like \numhead, but chooses appendix heading levels
|
||||
@@ -3740,6 +3795,7 @@ width0pt\relax} \fi
|
||||
\appendixsubsubseczzz{#2}
|
||||
\fi
|
||||
\fi
|
||||
\suppressfirstparagraphindent
|
||||
}
|
||||
|
||||
% like \numhead, but chooses numberless heading levels
|
||||
@@ -3759,6 +3815,7 @@ width0pt\relax} \fi
|
||||
\unnumberedsubsubseczzz{#2}
|
||||
\fi
|
||||
\fi
|
||||
\suppressfirstparagraphindent
|
||||
}
|
||||
|
||||
% @chapter, @appendix, @unnumbered.
|
||||
@@ -4371,7 +4428,7 @@ width0pt\relax} \fi
|
||||
% @foo ... @end foo.
|
||||
|
||||
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
|
||||
%
|
||||
%
|
||||
% Since these characters are used in examples, it should be an even number of
|
||||
% \tt widths. Each \tt character is 1en, so two makes it 1em.
|
||||
%
|
||||
@@ -4383,7 +4440,7 @@ width0pt\relax} \fi
|
||||
|
||||
% The @error{} command.
|
||||
% Adapted from the TeXbook's \boxit.
|
||||
%
|
||||
%
|
||||
\newbox\errorbox
|
||||
%
|
||||
{\tentt \global\dimen0 = 3em}% Width of the box.
|
||||
@@ -4430,6 +4487,7 @@ width0pt\relax} \fi
|
||||
\let\equiv=\ptexequiv
|
||||
\let\!=\ptexexclam
|
||||
\let\i=\ptexi
|
||||
\let\indent=\ptexindent
|
||||
\let\{=\ptexlbrace
|
||||
\let\+=\tabalign
|
||||
\let\}=\ptexrbrace
|
||||
@@ -4683,7 +4741,7 @@ width0pt\relax} \fi
|
||||
|
||||
|
||||
% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
|
||||
% If we want to allow any <char> as delimiter,
|
||||
% If we want to allow any <char> as delimiter,
|
||||
% we need the curly braces so that makeinfo sees the @verb command, eg:
|
||||
% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
|
||||
%
|
||||
@@ -4761,8 +4819,8 @@ width0pt\relax} \fi
|
||||
\everypar{\starttabbox}%
|
||||
}
|
||||
|
||||
% Do the @verb magic: verbatim text is quoted by unique
|
||||
% delimiter characters. Before first delimiter expect a
|
||||
% Do the @verb magic: verbatim text is quoted by unique
|
||||
% delimiter characters. Before first delimiter expect a
|
||||
% right brace, after last delimiter expect closing brace:
|
||||
%
|
||||
% \def\doverb'{'<char>#1<char>'}'{#1}
|
||||
@@ -4781,7 +4839,7 @@ width0pt\relax} \fi
|
||||
%
|
||||
% \def\doverbatim#1@end verbatim{#1}
|
||||
%
|
||||
% For Texinfo it's a lot easier than for LaTeX,
|
||||
% For Texinfo it's a lot easier than for LaTeX,
|
||||
% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
|
||||
% we need not redefine '\', '{' and '}'.
|
||||
%
|
||||
@@ -4848,14 +4906,14 @@ width0pt\relax} \fi
|
||||
% @copying ... @end copying.
|
||||
% Save the text away for @insertcopying later. Many commands won't be
|
||||
% allowed in this context, but that's ok.
|
||||
%
|
||||
%
|
||||
% We save the uninterpreted tokens, rather than creating a box.
|
||||
% Saving the text in a box would be much easier, but then all the
|
||||
% typesetting commands (@smallbook, font changes, etc.) have to be done
|
||||
% beforehand -- and a) we want @copying to be done first in the source
|
||||
% file; b) letting users define the frontmatter in as flexible order as
|
||||
% possible is very desirable.
|
||||
%
|
||||
%
|
||||
\def\copying{\begingroup
|
||||
% Define a command to swallow text until we reach `@end copying'.
|
||||
% \ is the escape char in this texinfo.tex file, so it is the
|
||||
@@ -4878,15 +4936,15 @@ width0pt\relax} \fi
|
||||
% end-of-line to be a \par, as would happen with the normal active
|
||||
% definition of ^^M. On the third hand, two ^^M's in a row should still
|
||||
% generate a \par.
|
||||
%
|
||||
%
|
||||
% Our approach is to make ^^M insert a space and a penalty1 normally;
|
||||
% then it can also check if \lastpenalty=1. If it does, then manually
|
||||
% do \par.
|
||||
%
|
||||
%
|
||||
% This messes up the normal definitions of @c[omment], so we redefine
|
||||
% it. Similarly for @ignore. (These commands are used in the gcc
|
||||
% manual for man page generation.)
|
||||
%
|
||||
%
|
||||
% Seems pretty fragile, most line-oriented commands will presumably
|
||||
% fail, but for the limited use of getting the copying text (which
|
||||
% should be quite simple) inserted, we can hope it's ok.
|
||||
@@ -4927,7 +4985,7 @@ width0pt\relax} \fi
|
||||
\newcount\parencount
|
||||
|
||||
% We want ()&[] to print specially on the defun line.
|
||||
%
|
||||
%
|
||||
\def\activeparens{%
|
||||
\catcode`\(=\active \catcode`\)=\active
|
||||
\catcode`\&=\active
|
||||
@@ -5030,7 +5088,7 @@ width0pt\relax} \fi
|
||||
% #1 is the \E... control sequence to end the definition (which we define).
|
||||
% #2 is the \...x control sequence (which our caller defines).
|
||||
% #3 is the control sequence to process the header, such as \defunheader.
|
||||
%
|
||||
%
|
||||
\def\parsebodycommon#1#2#3{%
|
||||
\begingroup\inENV
|
||||
% If there are two @def commands in a row, we'll have a \nobreak,
|
||||
@@ -5053,7 +5111,7 @@ width0pt\relax} \fi
|
||||
}
|
||||
|
||||
% Common part of the \...x definitions.
|
||||
%
|
||||
%
|
||||
\def\defxbodycommon{%
|
||||
% As with \parsebodycommon above, allow line break if we have multiple
|
||||
% x headers in a row. It's not a great place, though.
|
||||
@@ -5104,7 +5162,7 @@ width0pt\relax} \fi
|
||||
% to account for this both in the \...x definition and in parsing the
|
||||
% input at hand. Thus also need a control sequence (passed as #5) for
|
||||
% the \E... definition to assign the category name to.
|
||||
%
|
||||
%
|
||||
\def\deftypeopparsebody#1#2#3#4#5 #6 {%
|
||||
\parsebodycommon{#1}{#2}{#3}%
|
||||
\def#2##1 ##2 ##3 {\def#4{##1}%
|
||||
@@ -5209,7 +5267,7 @@ width0pt\relax} \fi
|
||||
}
|
||||
|
||||
% This expands the args and terminates the paragraph they comprise.
|
||||
%
|
||||
%
|
||||
\def\defunargs#1{\functionparens \sl
|
||||
% Expand, preventing hyphenation at `-' chars.
|
||||
% Note that groups don't affect changes in \hyphenchar.
|
||||
@@ -5471,7 +5529,7 @@ width0pt\relax} \fi
|
||||
|
||||
% These definitions are used if you use @defunx (etc.)
|
||||
% anywhere other than immediately after a @defun or @defunx.
|
||||
%
|
||||
%
|
||||
\def\defcvx#1 {\errmessage{@defcvx in invalid context}}
|
||||
\def\deffnx#1 {\errmessage{@deffnx in invalid context}}
|
||||
\def\defivarx#1 {\errmessage{@defivarx in invalid context}}
|
||||
@@ -5643,7 +5701,7 @@ width0pt\relax} \fi
|
||||
|
||||
% Called by \do from \dounmacro on each macro. The idea is to omit any
|
||||
% macro definitions that have been changed to \relax.
|
||||
%
|
||||
%
|
||||
\def\unmacrodo#1{%
|
||||
\ifx#1\relax
|
||||
% remove this
|
||||
@@ -5838,14 +5896,14 @@ width0pt\relax} \fi
|
||||
% anchor), namely NAME-title (the corresponding @chapter/etc. name),
|
||||
% NAME-pg (the page number), and NAME-snt (section number and type).
|
||||
% Called from \foonoderef.
|
||||
%
|
||||
%
|
||||
% We have to set \indexdummies so commands such as @code in a section
|
||||
% title aren't expanded. It would be nicer not to expand the titles in
|
||||
% the first place, but there's so many layers that that is hard to do.
|
||||
%
|
||||
% Likewise, use \turnoffactive so that punctuation chars such as underscore
|
||||
% and backslash work in node names.
|
||||
%
|
||||
%
|
||||
\def\setref#1#2{{%
|
||||
\atdummies
|
||||
\pdfmkdest{#1}%
|
||||
@@ -5944,7 +6002,7 @@ width0pt\relax} \fi
|
||||
% output. It's a separate macro only so it can be changed more easily,
|
||||
% since not square brackets don't work in some documents. Particularly
|
||||
% one that Bob is working on :).
|
||||
%
|
||||
%
|
||||
\def\xrefprintnodename#1{[#1]}
|
||||
|
||||
% \dosetq is called from \setref to do the actual \write (\iflinks).
|
||||
@@ -5961,7 +6019,7 @@ width0pt\relax} \fi
|
||||
\def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}}
|
||||
|
||||
% Things to be expanded by \internalsetq.
|
||||
%
|
||||
%
|
||||
\def\Ypagenumber{\folio}
|
||||
\def\Ytitle{\thissection}
|
||||
\def\Ynothing{}
|
||||
@@ -6146,13 +6204,14 @@ width0pt\relax} \fi
|
||||
%
|
||||
% Auto-number footnotes. Otherwise like plain.
|
||||
\gdef\footnote{%
|
||||
\let\indent=\ptexindent
|
||||
\global\advance\footnoteno by \@ne
|
||||
\edef\thisfootno{$^{\the\footnoteno}$}%
|
||||
%
|
||||
% In case the footnote comes at the end of a sentence, preserve the
|
||||
% extra spacing after we do the footnote number.
|
||||
\let\@sf\empty
|
||||
\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
|
||||
\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
|
||||
%
|
||||
% Remove inadvertent blank space before typesetting the footnote number.
|
||||
\unskip
|
||||
@@ -6293,7 +6352,7 @@ width0pt\relax} \fi
|
||||
\nobreak\bigskip
|
||||
% Usually we'll have text after the image which will insert
|
||||
% \parskip glue, so insert it here too to equalize the space
|
||||
% above and below.
|
||||
% above and below.
|
||||
\nobreak\vskip\parskip
|
||||
\nobreak
|
||||
\line\bgroup\hss
|
||||
@@ -6381,7 +6440,7 @@ should work if nowhere else does.}
|
||||
% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
|
||||
% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
|
||||
% physical page width.
|
||||
%
|
||||
%
|
||||
% We also call \setleading{\textleading}, so the caller should define
|
||||
% \textleading. The caller should also set \parskip.
|
||||
%
|
||||
@@ -6449,7 +6508,7 @@ should work if nowhere else does.}
|
||||
\parskip = 3pt plus 2pt minus 1pt
|
||||
\textleading = 13.2pt
|
||||
%
|
||||
% Double-side printing via postscript on Laserjet 4050
|
||||
% Double-side printing via postscript on Laserjet 4050
|
||||
% prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
|
||||
% To change the settings for a different printer or situation, adjust
|
||||
% \normaloffset until the front-side and back-side texts align. Then
|
||||
@@ -6490,7 +6549,7 @@ should work if nowhere else does.}
|
||||
\tableindent = 12mm
|
||||
}}
|
||||
|
||||
% A specific text layout, 24x15cm overall, intended for A4 paper.
|
||||
% A specific text layout, 24x15cm overall, intended for A4 paper.
|
||||
\def\afourlatex{{\globaldefs = 1
|
||||
\afourpaper
|
||||
\internalpagesizes{237mm}{150mm}%
|
||||
@@ -6666,7 +6725,7 @@ should work if nowhere else does.}
|
||||
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
|
||||
% the literal character `\'. (Thus, \ is not expandable when this is in
|
||||
% effect.)
|
||||
%
|
||||
%
|
||||
@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}
|
||||
|
||||
% Make _ and + \other characters, temporarily.
|
||||
@@ -6695,7 +6754,7 @@ should work if nowhere else does.}
|
||||
% Say @foo, not \foo, in error messages.
|
||||
@escapechar = `@@
|
||||
|
||||
% These look ok in all fonts, so just make them not special.
|
||||
% These look ok in all fonts, so just make them not special.
|
||||
@catcode`@& = @other
|
||||
@catcode`@# = @other
|
||||
@catcode`@% = @other
|
||||
|
||||
10
configure.ac
10
configure.ac
@@ -1,5 +1,5 @@
|
||||
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
|
||||
AC_INIT([GNU coreutils],[5.0],[bug-coreutils@gnu.org])
|
||||
AC_INIT([GNU coreutils],[5.0.1],[bug-coreutils@gnu.org])
|
||||
AC_CONFIG_SRCDIR(src/ls.c)
|
||||
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
@@ -127,8 +127,7 @@ AC_CACHE_VAL(utils_cv_func_setpriority,
|
||||
AC_MSG_RESULT($utils_cv_func_setpriority)
|
||||
if test $utils_cv_func_setpriority = yes; then
|
||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS nice\$(EXEEXT)"
|
||||
OPTIONAL_BIN_ZCRIPTS="$OPTIONAL_BIN_ZCRIPTS nohup"
|
||||
MAN="$MAN nice.1 nohup.1"
|
||||
MAN="$MAN nice.1"
|
||||
else
|
||||
AC_MSG_CHECKING(for nice function)
|
||||
AC_CACHE_VAL(utils_cv_func_nice,
|
||||
@@ -139,8 +138,7 @@ else
|
||||
if test $utils_cv_func_nice = yes; then
|
||||
AC_DEFINE(NICE_PRIORITY, 1, [FIXME])
|
||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS nice\$(EXEEXT)"
|
||||
OPTIONAL_BIN_ZCRIPTS="$OPTIONAL_BIN_ZCRIPTS nohup"
|
||||
MAN="$MAN nice.1 nohup.1"
|
||||
MAN="$MAN nice.1"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -250,7 +248,7 @@ if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no && \
|
||||
fi
|
||||
|
||||
# For src/kill.c.
|
||||
AC_CHECK_DECLS([strsignal, strtoimax, sys_siglist, _sys_siglist])
|
||||
AC_CHECK_DECLS([strsignal, strtoimax, sys_siglist, _sys_siglist, __sys_siglist])
|
||||
|
||||
jm_LIB_CHECK
|
||||
|
||||
|
||||
@@ -1,3 +1,82 @@
|
||||
2003-07-14 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* doc/coreutils.texi (uname invocation): Explain the POSIX
|
||||
terminology behind uname -m and uname -s.
|
||||
|
||||
2003-07-13 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* coreutils.texi (chown invocation): Warn that chown
|
||||
now clears set-user-ID and set-group-ID bits on some systems.
|
||||
From Bob Proulx.
|
||||
(nohup invocation): Tell what happens when stdout is not a terminal.
|
||||
Based on a suggestion from Steven Mocking.
|
||||
|
||||
2003-07-10 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* coreutils.texi (Standards conformance): Mention that uses like
|
||||
`tail -1' and `head -1', like `sort +1', are non conforming.
|
||||
(chown invocation): Say that using `.' as a separator may not work.
|
||||
|
||||
2003-06-25 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* coreutils.texi (Time directives) [%s]: Add a cross reference
|
||||
to the related examples.
|
||||
(Examples of date): Add an @anchor here, along with a few more examples.
|
||||
Suggestion from Dan Jacobson.
|
||||
|
||||
2003-06-12 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* coreutils.texi (wc invocation): Tweak wording: wc prints counts in
|
||||
the order `newline, word, byte'. Suggestion from Keith M. Briggs.
|
||||
Also change `lines' to `newlines'.
|
||||
|
||||
2003-05-14 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* coreutils.texi (head invocation): Document --bytes=-N and --lines=-N.
|
||||
|
||||
2003-05-13 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (uniq invocation, squeezing, The uniq command):
|
||||
Use "repeated" rather than "duplicate" to describe adjacent
|
||||
duplicates; this simplifies the description and makes it more
|
||||
consistent with POSIX.
|
||||
(uniq invocation): Make it clear that -d and -u suppress the
|
||||
output of lines, rather than cause some lines to be output.
|
||||
Mention what happens if a line lacks enough fields or characters.
|
||||
|
||||
2003-05-13 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* coreutils.texi (true invocation): Mention that it is possible to
|
||||
make true --help or true --version (in non-POSIX mode) exit nonzero.
|
||||
Suggestion from Paul Eggert.
|
||||
|
||||
2003-05-10 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* coreutils.texi (Exit status): Remove `uniq' from the list.
|
||||
It uses standard exit codes.
|
||||
(More details about version sort): Note that strverscmp, and hence
|
||||
`ls -v', does not use LC_COLLATE. Reported by From: Andrey Borzenkov.
|
||||
|
||||
2003-04-21 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Fix printf POSIX compatibility bug reported by Ben Harris in
|
||||
<http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>.
|
||||
* doc/coreutils.texi (printf invocation): It's \NNN in the format,
|
||||
\0NNN in the %b operand.
|
||||
|
||||
2003-04-10 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.am (check-texinfo): Check for uses of non-zero.
|
||||
I prefer to spell it `nonzero'.
|
||||
|
||||
* coreutils.texi (readlink invocation): Tweak description a little.
|
||||
|
||||
2003-04-04 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.am (constants.texi): Rename target (thus enabling it),
|
||||
now that fileutils, textutils, and sh-utils have been merged.
|
||||
(MAINTAINERCLEANFILES): Define.
|
||||
|
||||
2003-04-02 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* coreutils.texi (false invocation): Note that false exits
|
||||
|
||||
@@ -13,17 +13,13 @@ EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
|
||||
# old systems.
|
||||
MAKEINFO = makeinfo --no-split
|
||||
|
||||
# Remove `DISABLED_' when fileutils, textutils, and sh-utils have
|
||||
# all been merged into one package.
|
||||
DISABLED_constants.texi: $(top_srcdir)/src/tail.c
|
||||
constants.texi: $(top_srcdir)/src/tail.c
|
||||
LC_ALL=C \
|
||||
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
|
||||
$(top_srcdir)/src/tail.c > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
# Uncomment this when fileutils, textutils, and sh-utils have
|
||||
# all been merged into one package.
|
||||
# MAINTAINERCLEANFILES = constants.texi
|
||||
MAINTAINERCLEANFILES = constants.texi
|
||||
|
||||
$(DVIS): $(EXTRA_DIST)
|
||||
$(INFO_DEPS): $(EXTRA_DIST)
|
||||
@@ -32,6 +28,7 @@ $(INFO_DEPS): $(EXTRA_DIST)
|
||||
check-texinfo:
|
||||
fail=0; \
|
||||
grep timezone $(srcdir)/*.texi && fail=1; \
|
||||
grep non-zero $(srcdir)/*.texi && fail=1; \
|
||||
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
|
||||
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
|
||||
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.7.3 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.7.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
@@ -38,6 +38,7 @@ POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
@@ -64,6 +65,7 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
HAVE__BOOL = @HAVE__BOOL@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
@@ -100,7 +102,6 @@ MSGMERGE = @MSGMERGE@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
@@ -116,6 +117,7 @@ SEQ_LIBM = @SEQ_LIBM@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SQRT_LIBM = @SQRT_LIBM@
|
||||
STDBOOL_H = @STDBOOL_H@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_NLS = @USE_NLS@
|
||||
@@ -160,6 +162,8 @@ target_alias = @target_alias@
|
||||
info_TEXINFOS = coreutils.texi
|
||||
|
||||
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
|
||||
|
||||
MAINTAINERCLEANFILES = constants.texi
|
||||
subdir = doc
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
@@ -319,7 +323,6 @@ all-am: Makefile $(INFO_DEPS)
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
@@ -344,6 +347,7 @@ distclean-generic:
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
@@ -426,18 +430,12 @@ uninstall-am: uninstall-info-am
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
# Remove `DISABLED_' when fileutils, textutils, and sh-utils have
|
||||
# all been merged into one package.
|
||||
DISABLED_constants.texi: $(top_srcdir)/src/tail.c
|
||||
constants.texi: $(top_srcdir)/src/tail.c
|
||||
LC_ALL=C \
|
||||
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
|
||||
$(top_srcdir)/src/tail.c > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
# Uncomment this when fileutils, textutils, and sh-utils have
|
||||
# all been merged into one package.
|
||||
# MAINTAINERCLEANFILES = constants.texi
|
||||
|
||||
$(DVIS): $(EXTRA_DIST)
|
||||
$(INFO_DEPS): $(EXTRA_DIST)
|
||||
|
||||
@@ -445,6 +443,7 @@ $(INFO_DEPS): $(EXTRA_DIST)
|
||||
check-texinfo:
|
||||
fail=0; \
|
||||
grep timezone $(srcdir)/*.texi && fail=1; \
|
||||
grep non-zero $(srcdir)/*.texi && fail=1; \
|
||||
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
|
||||
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
|
||||
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
* unlink: (coreutils)unlink invocation. Removal via unlink(2).
|
||||
* users: (coreutils)users invocation. Print current user names.
|
||||
* vdir: (coreutils)vdir invocation. List directories verbosely.
|
||||
* wc: (coreutils)wc invocation. Byte, word, and line counts.
|
||||
* wc: (coreutils)wc invocation. Line, word, and byte counts.
|
||||
* who: (coreutils)who invocation. Print who is logged in.
|
||||
* whoami: (coreutils)whoami invocation. Print effective user id.
|
||||
* yes: (coreutils)yes invocation. Print a string indefinitely.
|
||||
@@ -225,7 +225,7 @@ Output of parts of files
|
||||
|
||||
Summarizing files
|
||||
|
||||
* wc invocation:: Print byte, word, and line counts.
|
||||
* wc invocation:: Print newline, word, and byte counts.
|
||||
* sum invocation:: Print checksum and block counts.
|
||||
* cksum invocation:: Print CRC checksum and byte counts.
|
||||
* md5sum invocation:: Print or check message-digests.
|
||||
@@ -564,8 +564,7 @@ other exit status values and a few associate different
|
||||
meanings with the values @samp{0} and @samp{1}.
|
||||
Here are some of the exceptions:
|
||||
@command{expr}, @command{false}, @command{nohup}, @command{printenv},
|
||||
@command{sort}, @command{test}, @command{true}, @command{tty},
|
||||
@command{uniq}.
|
||||
@command{sort}, @command{test}, @command{true}, @command{tty}.
|
||||
|
||||
|
||||
@node Backup options
|
||||
@@ -922,7 +921,8 @@ the year and month the standard was adopted. Two values are currently
|
||||
supported for @env{_POSIX2_VERSION}: @samp{199209} stands for
|
||||
@acronym{POSIX} 1003.2-1992, and @samp{200112} stands for @acronym{POSIX}
|
||||
1003.1-2001. For example, if you are running older software that
|
||||
assumes an older version of @acronym{POSIX} and uses @samp{sort +1}, you
|
||||
assumes an older version of @acronym{POSIX} and uses @samp{sort +1},
|
||||
@samp{head -1}, or @samp{tail +1}, you
|
||||
can work around the compatibility problems by setting
|
||||
@samp{_POSIX2_VERSION=199209} in your environment.
|
||||
|
||||
@@ -2079,19 +2079,23 @@ The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
|
||||
@item -c @var{bytes}
|
||||
@itemx --bytes=@var{bytes}
|
||||
@item -c @var{n}
|
||||
@itemx --bytes=@var{n}
|
||||
@opindex -c
|
||||
@opindex --bytes
|
||||
Print the first @var{bytes} bytes, instead of initial lines. Appending
|
||||
@samp{b} multiplies @var{bytes} by 512, @samp{k} by 1024, and @samp{m}
|
||||
Print the first @var{n} bytes, instead of initial lines. Appending
|
||||
@samp{b} multiplies @var{n} by 512, @samp{k} by 1024, and @samp{m}
|
||||
by 1048576.
|
||||
However, if @var{n} starts with a @samp{-},
|
||||
print all but the last @var{n} bytes of each file.
|
||||
|
||||
@itemx -n @var{n}
|
||||
@itemx --lines=@var{n}
|
||||
@opindex -n
|
||||
@opindex --lines
|
||||
Output the first @var{n} lines.
|
||||
However, if @var{n} starts with a @samp{-},
|
||||
print all but the last @var{n} lines of each file.
|
||||
|
||||
@item -q
|
||||
@itemx --quiet
|
||||
@@ -2503,7 +2507,7 @@ These commands generate just a few numbers representing entire
|
||||
contents of files.
|
||||
|
||||
@menu
|
||||
* wc invocation:: Print byte, word, and line counts.
|
||||
* wc invocation:: Print newline, word, and byte counts.
|
||||
* sum invocation:: Print checksum and block counts.
|
||||
* cksum invocation:: Print CRC checksum and byte counts.
|
||||
* md5sum invocation:: Print or check message-digests.
|
||||
@@ -2511,7 +2515,7 @@ contents of files.
|
||||
|
||||
|
||||
@node wc invocation
|
||||
@section @command{wc}: Print byte, word, and line counts
|
||||
@section @command{wc}: Print newline, word, and byte counts
|
||||
|
||||
@pindex wc
|
||||
@cindex byte count
|
||||
@@ -3272,12 +3276,12 @@ standard input if nothing is given or for an @var{input} name of
|
||||
uniq [@var{option}]@dots{} [@var{input} [@var{output}]]
|
||||
@end example
|
||||
|
||||
By default, @command{uniq} prints the unique lines in a sorted file, i.e.,
|
||||
discards all but one of identical successive lines. Optionally, it can
|
||||
instead show only lines that appear exactly once, or lines that appear
|
||||
more than once.
|
||||
By default, @command{uniq} prints its input lines, except that
|
||||
it discards all but the first of adjacent repeated lines, so that
|
||||
no output lines are repeated. Optionally, it can instead discard
|
||||
lines that are not repeated, or all repeated lines.
|
||||
|
||||
The input need not be sorted, but duplicate input lines are detected
|
||||
The input need not be sorted, but repeated input lines are detected
|
||||
only if they are adjacent. If you want to discard non-adjacent
|
||||
duplicate lines, perhaps you want to use @code{sort -u}.
|
||||
|
||||
@@ -3296,7 +3300,8 @@ The program accepts the following options. Also see @ref{Common options}.
|
||||
@itemx --skip-fields=@var{n}
|
||||
@opindex -f
|
||||
@opindex --skip-fields
|
||||
Skip @var{n} fields on each line before checking for uniqueness. Fields
|
||||
Skip @var{n} fields on each line before checking for uniqueness. Use
|
||||
a null string for comparison if a line has fewer than @var{n} fields. Fields
|
||||
are sequences of non-space non-tab characters that are separated from
|
||||
each other by at least one space or tab.
|
||||
|
||||
@@ -3308,7 +3313,8 @@ does not allow this; use @option{-f @var{n}} instead.
|
||||
@itemx --skip-chars=@var{n}
|
||||
@opindex -s
|
||||
@opindex --skip-chars
|
||||
Skip @var{n} characters before checking for uniqueness. If you use both
|
||||
Skip @var{n} characters before checking for uniqueness. Use a null string
|
||||
for comparison if a line has fewer than @var{n} characters. If you use both
|
||||
the field and character skipping options, fields are skipped over first.
|
||||
|
||||
On older systems, @command{uniq} supports an obsolete option
|
||||
@@ -3331,31 +3337,34 @@ Ignore differences in case when comparing lines.
|
||||
@itemx --repeated
|
||||
@opindex -d
|
||||
@opindex --repeated
|
||||
@cindex duplicate lines, outputting
|
||||
Print one copy of each duplicate line.
|
||||
@cindex repeated lines, outputting
|
||||
Discard lines that are not repeated. When used by itself, this option
|
||||
causes @command{uniq} to print the first copy of each repeated line,
|
||||
and nothing else.
|
||||
|
||||
@item -D
|
||||
@itemx --all-repeated[=@var{delimit-method}]
|
||||
@opindex -D
|
||||
@opindex --all-repeated
|
||||
@cindex all duplicate lines, outputting
|
||||
Print all copies of each duplicate line.
|
||||
@cindex all repeated lines, outputting
|
||||
Do not discard the second and subsequent repeated input lines,
|
||||
but discard lines that are not repeated.
|
||||
This option is useful mainly in conjunction with other options e.g.,
|
||||
to ignore case or to compare only selected fields.
|
||||
The optional @var{delimit-method} tells how to delimit
|
||||
groups of duplicate lines, and must be one of the following:
|
||||
groups of repeated lines, and must be one of the following:
|
||||
|
||||
@table @samp
|
||||
|
||||
@item none
|
||||
Do not delimit groups of duplicate lines.
|
||||
Do not delimit groups of repeated lines.
|
||||
This is equivalent to @option{--all-repeated} (@option{-D}).
|
||||
|
||||
@item prepend
|
||||
Output a newline before each group of duplicate lines.
|
||||
Output a newline before each group of repeated lines.
|
||||
|
||||
@item separate
|
||||
Separate groups of duplicate lines with a single newline.
|
||||
Separate groups of repeated lines with a single newline.
|
||||
This is the same as using @samp{prepend}, except that
|
||||
there is no newline before the first group, and hence
|
||||
may be better suited for output direct to users.
|
||||
@@ -3374,13 +3383,14 @@ This is a @sc{gnu} extension.
|
||||
@opindex -u
|
||||
@opindex --unique
|
||||
@cindex unique lines, outputting
|
||||
Print non-duplicate lines.
|
||||
Discard the first repeated line. When used by itself, this option
|
||||
causes @command{uniq} to print unique lines, and nothing else.
|
||||
|
||||
@item -w @var{n}
|
||||
@itemx --check-chars=@var{n}
|
||||
@opindex -w
|
||||
@opindex --check-chars
|
||||
Compare @var{n} characters on each line (after skipping any specified
|
||||
Compare at most @var{n} characters on each line (after skipping any specified
|
||||
fields and characters). By default the entire rest of the lines are
|
||||
compared.
|
||||
|
||||
@@ -4650,13 +4660,13 @@ tr -s '\n'
|
||||
|
||||
@item
|
||||
Find doubled occurrences of words in a document.
|
||||
For example, people often write ``the the'' with the duplicated words
|
||||
For example, people often write ``the the'' with the repeated words
|
||||
separated by a newline. The bourne shell script below works first
|
||||
by converting each sequence of punctuation and blank characters to a
|
||||
single newline. That puts each ``word'' on a line by itself.
|
||||
Next it maps all uppercase characters to lower case, and finally it
|
||||
runs @command{uniq} with the @option{-d} option to print out only the words
|
||||
that were adjacent duplicates.
|
||||
that were repeated.
|
||||
|
||||
@example
|
||||
#!/bin/sh
|
||||
@@ -4987,6 +4997,8 @@ except @samp{..}, and the third ignores names that start with @samp{#}.
|
||||
@cindex symbolic links, dereferencing
|
||||
When showing file information for a symbolic link, show information
|
||||
for the file the link references rather than the link itself.
|
||||
However, even with this option, @command{ls} still prints the name
|
||||
of the link itself, not the name of the file that the link points to.
|
||||
|
||||
@item -R
|
||||
@itemx --recursive
|
||||
@@ -5293,6 +5305,11 @@ were specified before the @option{-f}).
|
||||
Reverse whatever the sorting method is---e.g., list files in reverse
|
||||
alphabetical order, youngest first, smallest first, or whatever.
|
||||
|
||||
@itemx --sort=directory
|
||||
@opindex --sort
|
||||
@opindex directories@r{, sorting files by}
|
||||
Show directories first, then other files.
|
||||
|
||||
@item -S
|
||||
@itemx --sort=size
|
||||
@opindex -S
|
||||
@@ -5382,6 +5399,12 @@ fractional one:
|
||||
abc-1.01a.tgz abc-1.012b.tgz
|
||||
@end example
|
||||
|
||||
This functionality is implemented using the @code{strverscmp} function.
|
||||
@xref{String/Array Comparison, , , libc, The GNU C Library Reference Manual}.
|
||||
One result of that implementation decision is that @code{ls -v} does not
|
||||
use the locale category, @env{LC_COLLATE}. As a result, non-numeric prefixes
|
||||
are sorted as if @env{LC_COLLATE} were set to @code{C}.
|
||||
|
||||
@node General output formatting
|
||||
@subsection General output formatting
|
||||
|
||||
@@ -7289,14 +7312,14 @@ of departure. @xref{File permissions}.
|
||||
|
||||
@command{readlink} outputs the value of the given symbolic link.
|
||||
If @command{readlink} is invoked with an argument other than the pathname
|
||||
of a symbolic link, it exits with a non-zero exit code.
|
||||
of a symbolic link, it produces no output and exits with a nonzero exit code.
|
||||
|
||||
@item Canonicalize mode
|
||||
|
||||
@command{readlink} outputs the absolute name of the given file which contains
|
||||
no `.', `..' components nor any repeated path separators (`/') or symlinks.
|
||||
In any of the path components is missing or unavailable,
|
||||
it exits with a non-zero exit code.
|
||||
In any path component is missing or unavailable,
|
||||
it produces no output and exits with a nonzero exit code.
|
||||
|
||||
@end table
|
||||
|
||||
@@ -7492,11 +7515,25 @@ is omitted, only the group of the files is changed; in this case,
|
||||
|
||||
@end table
|
||||
|
||||
You may use @samp{.} in place of the @samp{:} separator. This is a
|
||||
@sc{gnu} extension for compatibility with older scripts.
|
||||
Some older scripts may still use @samp{.} in place of the @samp{:} separator.
|
||||
@acronym{POSIX} 1003.1-2001 (@pxref{Standards conformance}) does not allow that,
|
||||
but you may be able to work around the compatibility problems by setting
|
||||
@samp{_POSIX2_VERSION=199209} in your environment.
|
||||
New scripts should avoid the use of @samp{.} because @sc{gnu} @command{chown}
|
||||
may fail if @var{owner} contains @samp{.} characters.
|
||||
|
||||
Warning: The @command{chown} command may clear the set-user-ID or
|
||||
set-group-ID bits on some systems. The @command{chown} command is
|
||||
dependent upon the policy and functionality of the underlying system
|
||||
which may make system-dependent file mode modifications outside the
|
||||
control of the @command{chown} command. On some systems (e.g., Linux)
|
||||
the @command{chown} command clears the set-UID and set-GID bits because
|
||||
the underlying, system @code{chown} function clears them. On other
|
||||
systems (e.g., HP-UX and Solaris) the @command{chown} command does not
|
||||
affect those bits when operated as the superuser. On systems which allow
|
||||
non-privileged use of chown those bits are always cleared by the system.
|
||||
When in doubt, check the underlying system behavior.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
@@ -8470,13 +8507,14 @@ all of the given @var{argument}s.
|
||||
|
||||
@command{printf} has one additional directive, @samp{%b}, which prints its
|
||||
argument string with @samp{\} escapes interpreted in the same way as in
|
||||
the @var{format} string.
|
||||
the @var{format} string, except that octal escapes are of the form
|
||||
@samp{\0@var{ooo}} where @var{ooo} is 0 to 3 octal digits.
|
||||
|
||||
@kindex \@var{ooo}
|
||||
@kindex \x@var{hh}
|
||||
|
||||
@command{printf} interprets @samp{\@var{ooo}} in @var{format} as an octal number
|
||||
(if @var{ooo} is 0 to 3 octal digits) specifying a character to print,
|
||||
(if @var{ooo} is 1 to 3 octal digits) specifying a character to print,
|
||||
and @samp{\x@var{hh}} as a hexadecimal number (if @var{hh} is 1 to 2 hex
|
||||
digits) specifying a character to print.
|
||||
|
||||
@@ -8622,6 +8660,19 @@ options. However, that is contrary to @acronym{POSIX}, so when the environment
|
||||
variable @env{POSIXLY_CORRECT} is set, @command{true} ignores @emph{all}
|
||||
command line arguments, including @option{--help} and @option{--version}.
|
||||
|
||||
Note, however, that it is possible to cause @command{true}
|
||||
to exit with nonzero status: when invoked in non-@acronym{POSIX} mode,
|
||||
with the @option{--help} or @option{--version} option, and with standard
|
||||
output already closed or redirected to a file that evokes an I/O error.
|
||||
For example, using a Bourne-compatible shell:
|
||||
|
||||
@example
|
||||
$ ./true --version >&-
|
||||
./true: write error: Bad file number
|
||||
$ ./true --version > /dev/full
|
||||
./true: write error: No space left on device
|
||||
@end example
|
||||
|
||||
This version of @command{true} is implemented as a C program, and is thus
|
||||
more secure and faster than a shell script implementation, and may safely
|
||||
be used as a dummy shell for the purpose of disabling accounts.
|
||||
@@ -10436,6 +10487,7 @@ GNU extension).
|
||||
Note that this value is the number of seconds between the epoch
|
||||
and the current date as defined by the localtime system call.
|
||||
It isn't changed by the @option{--date} option.
|
||||
For examples, @xref{%s-examples}.
|
||||
@item %S
|
||||
second (00@dots{}60). The range is [00@dots{}60], and not [00@dots{}59],
|
||||
in order to accommodate the occasional positive leap second.
|
||||
@@ -10794,6 +10846,7 @@ use @samp{date --rfc}. I just did and saw this:
|
||||
Mon, 25 Mar 1996 23:34:17 -0600
|
||||
@end example
|
||||
|
||||
@anchor{%s-examples}
|
||||
@item
|
||||
To convert a date string to the number of seconds since the epoch
|
||||
(which is 1970-01-01 00:00:00 UTC), use the @option{--date} option with
|
||||
@@ -10830,6 +10883,17 @@ date --date='2000-01-01 UTC' +%s
|
||||
946684800
|
||||
@end example
|
||||
|
||||
An alternative is to use the @option{--utc} (@option{-u}) option.
|
||||
Then you may omit @samp{UTC} from the date string. Although this
|
||||
produces the same result for @samp{%s} and many other format sequences,
|
||||
with a time zone offset different from zero, it would give a different
|
||||
result for zone-dependent formats like @samp{%z}.
|
||||
|
||||
@example
|
||||
date -u --date=2000-01-01 +%s
|
||||
946684800
|
||||
@end example
|
||||
|
||||
To convert such an unwieldy number of seconds back to
|
||||
a more readable form, use a command like this:
|
||||
|
||||
@@ -10839,6 +10903,13 @@ date -d '1970-01-01 UTC 946684800 seconds' +"%Y-%m-%d %T %z"
|
||||
1999-12-31 19:00:00 -0500
|
||||
@end smallexample
|
||||
|
||||
Often it is better to output UTC-relative date and time:
|
||||
|
||||
@smallexample
|
||||
date -u -d '1970-01-01 946684800 seconds' +"%Y-%m-%d %T %z"
|
||||
2000-01-01 00:00:00 +0000
|
||||
@end smallexample
|
||||
|
||||
@end itemize
|
||||
|
||||
|
||||
@@ -10901,7 +10972,8 @@ Print the hardware platform name
|
||||
@cindex machine type
|
||||
@cindex hardware class
|
||||
@cindex hardware type
|
||||
Print the machine hardware name (sometimes called the hardware class).
|
||||
Print the machine hardware name (sometimes called the hardware class
|
||||
or hardware type).
|
||||
|
||||
@item -n
|
||||
@itemx --nodename
|
||||
@@ -10942,6 +11014,14 @@ Print the kernel release.
|
||||
@cindex kernel name
|
||||
@cindex name of kernel
|
||||
Print the kernel name.
|
||||
@acronym{POSIX} 1003.1-2001 (@pxref{Standards conformance}) calls this
|
||||
``the implementation of the operating system'', because the
|
||||
@acronym{POSIX} specification itself has no notion of ``kernel''.
|
||||
The kernel name might be the same as the operating system name printed
|
||||
by the @option{-o} or @option{--operating-system} option, but it might
|
||||
differ. Some operating systems (e.g., FreeBSD, HP-UX) have the same
|
||||
name as their underlying kernels; others (e.g., GNU/Linux, Solaris)
|
||||
do not.
|
||||
|
||||
@item -v
|
||||
@itemx --kernel-version
|
||||
@@ -11196,6 +11276,8 @@ If standard output is a terminal, it is redirected so that it is appended
|
||||
to the file @file{nohup.out}; if that cannot be written to, it is appended
|
||||
to the file @file{$HOME/nohup.out}. If that cannot be written to, the
|
||||
command is not run.
|
||||
If standard output is not a terminal, then the standard output of
|
||||
@var{command} will be the same as that of @command{nohup}.
|
||||
|
||||
If @command{nohup} creates either @file{nohup.out} or
|
||||
@file{$HOME/nohup.out}, it creates it with no ``group'' or ``other''
|
||||
@@ -12029,8 +12111,8 @@ Finally (at least for now), we'll look at the @command{uniq} program. When
|
||||
sorting data, you will often end up with duplicate lines, lines that
|
||||
are identical. Usually, all you need is one instance of each line.
|
||||
This is where @command{uniq} comes in. The @command{uniq} program reads its
|
||||
standard input, which it expects to be sorted. It only prints out one
|
||||
copy of each duplicated line. It does have several options. Later on,
|
||||
standard input. It prints only one
|
||||
copy of each repeated line. It does have several options. Later on,
|
||||
we'll use the @option{-c} option, which prints each unique line, preceded
|
||||
by a count of the number of times that line occurred in the input.
|
||||
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
error.h
|
||||
fnmatch.h
|
||||
fts.c
|
||||
fts_.h
|
||||
getopt.c
|
||||
getopt.h
|
||||
getopt1.c
|
||||
getpagesize.h
|
||||
md5.h
|
||||
obstack.h
|
||||
printf-args.h
|
||||
printf-parse.h
|
||||
regex.c
|
||||
regex.h
|
||||
fts_.h
|
||||
fts.c
|
||||
vasnprintf.h
|
||||
vasprintf.h
|
||||
|
||||
366
lib/ChangeLog
366
lib/ChangeLog
@@ -1,3 +1,369 @@
|
||||
2003-07-14 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* save-cwd.h: Add copyright.
|
||||
|
||||
2003-07-13 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* xgethostname.c: Include <stdlib.h> for declaration of free.
|
||||
(xgethostname): Return NULL, rather than exiting, upon any
|
||||
non-malloc/realloc error.
|
||||
|
||||
2003-07-12 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.am (BUILT_SOURCES): Use `BUILT_SOURCES += $(STDBOOL_H)'
|
||||
rather than `all-local: $(STDBOOL_H)'. The latter didn't force
|
||||
creation of stdbool.h before most other targets.
|
||||
Likewise for $(ALLOCA_H).
|
||||
|
||||
Don't emit diagnostics. Let callers do that.
|
||||
* save-cwd.c: Don't include "error.h".
|
||||
(save_cwd): Don't call error. Ensure that errno is valid
|
||||
when returning nonzero.
|
||||
|
||||
* obstack.h: Update from gnulib.
|
||||
|
||||
* makepath.c (make_path): Enclose diagnostic in _(...).
|
||||
|
||||
2003-07-10 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* userspec.c: Include "posixver.h".
|
||||
(parse_user_spec): Accept `.' as a separator only
|
||||
in pre-POSIX-200112 mode.
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES): Add these:
|
||||
printf-args.h, printf-parse.h, vasprintf.h, vasnprintf.h.
|
||||
|
||||
Now that a program (`who') uses asprintf, we need all of these:
|
||||
* asnprintf.c, asprintf.c, printf-args.c, printf-args.h, printf-parse.c:
|
||||
* printf-parse.h, vasnprintf.c, vasnprintf.h, vasprintf.c, vasprintf.h:
|
||||
New files, from gnulib.
|
||||
|
||||
* alloca_.h, getpass.c, memrchr.c, obstack.h, posixver.c,
|
||||
strftime.c, strnlen.c, strverscmp.c: Switch from LGPL to GPL.
|
||||
|
||||
2003-07-09 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* mktime.c: Update from gnulib.
|
||||
FIXME: but still need to adjust m4/mktime.c so that this fixed
|
||||
version is used when needed.
|
||||
|
||||
Fix the bug that would make `du /' omit the `/' on the last line.
|
||||
E.g., `du --exclude '[^/]*' -x /' would print only "4\t\n" for me.
|
||||
* ftw.c (ftw_dir): Don't clobber the leading `/'.
|
||||
Reported by Chris Lesniewski as http://bugs.debian.org/200542.
|
||||
|
||||
2003-07-04 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Update from gnulib.
|
||||
* xreadlink.c: Include <sys/types.h> unconditionally, instead of
|
||||
having it depend on HAVE_SYS_TYPES_H.
|
||||
|
||||
2003-06-18 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* inttostr.h (PARAMS): Remove. All uses removed.
|
||||
|
||||
Merge in change from gnulib.
|
||||
* makepath.c: Remove block of alloca-related code in favor
|
||||
of an unconditional `#include <alloca.h>'.
|
||||
|
||||
* xalloc.h: Include <stddef.h>.
|
||||
Remove unnecessary parentheses.
|
||||
Use `1990-2000' notation in Copyright line until Emacs'
|
||||
copyright-update function learns how to handle a comma-separated
|
||||
list of years that spans a line boundary.
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES): Add getdelim2.c and getdelim2.h.
|
||||
|
||||
* getline.c (getdelim2): Move this function into its own file.
|
||||
* getdelim2.c: Extracted from getline.c.
|
||||
|
||||
* linebuffer.c, linebuffer.h: Update from gnulib.
|
||||
|
||||
* getdelim2.c, getdelim2.h: New files.
|
||||
* getstr.c, getstr.h: Remove files.
|
||||
|
||||
* same.h: Update from gnulib.
|
||||
* xstrtol.h: Update from gnulib.
|
||||
|
||||
2003-06-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Assume C89, so PARAMS isn't needed.
|
||||
* backupfile.h (PARAMS): Remove. All uses removed.
|
||||
* closeout.h, dirname.h, filemode.h, fsusage.h, getdate.h, getline.h,
|
||||
group-member.h, hard-locale.h, hash.h, linebuffer.h, long-options.h,
|
||||
makepath.h, memcasecmp.h, memcoll.h, modechange.h, mountlist.h,
|
||||
path-concat.h, physmem.h, posixtm.h, quote.h, readutmp.h, same.h,
|
||||
save-cwd.h, savedir.h, stdio-safer.h, strtoimax.c, strverscmp.h,
|
||||
unistd-safer.h, version-etc.h, xalloc.h, xreadlink.h, xstrtod.h,
|
||||
xstrtol.h: Likewise.
|
||||
* filemode.h, hard-locale.h, memcoll.h, modechange.h, physmem.h, same.h,
|
||||
* strverscmp.h: Do not include config.h; no longer needed.
|
||||
Anyway, config.h should always be included before any other file.
|
||||
|
||||
2003-06-17 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* getline.c: Update from gnulib.
|
||||
|
||||
Merge in changes from gnulib.
|
||||
* hash.c: Include <stdbool.h> unconditionally.
|
||||
Include <limits.h>.
|
||||
(CHAR_BIT): Don't define.
|
||||
|
||||
2003-06-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
* acl.c: Include <sys/types.h> before <sys/stat.h>.
|
||||
Required on Ultrix 4.3.
|
||||
|
||||
2003-05-20 Derek Price <derek@ximbiot.com>
|
||||
|
||||
* stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is necessary.
|
||||
|
||||
2003-06-10 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* getdate.y: Also accept dates of the form May-23-2003.
|
||||
Suggestion from Karl Berry.
|
||||
|
||||
2003-06-09 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* gettimeofday.c: Also undefine gmtime.
|
||||
(rpl_gmtime): New function. Suggestion from Paul Eggert.
|
||||
|
||||
2003-06-08 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* getline.h: Update from gnulib.
|
||||
|
||||
Clean up, as part of merge with emacs version of strftime.c.
|
||||
* strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
|
||||
Remove function, now that we can rely on a working tzset function.
|
||||
[!_LIBC]: Ensure that the required autoconf test has been run.
|
||||
* gettimeofday.c: Also undef tzset.
|
||||
(rpl_tzset): New function, for use by new macro, gl_FUNC_TZSET_CLOBBER.
|
||||
|
||||
2003-06-07 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* readtokens.h: Add copyright notice.
|
||||
Include <stdio.h>.
|
||||
Remove definition and uses of __P.
|
||||
|
||||
* readtokens.c: Put `Free Software Foundation, Inc.' in place of
|
||||
my name in the copyright comment.
|
||||
(init_tokenbuffer): Remove unnecessary parentheses around malloc.
|
||||
|
||||
Update from gnulib.
|
||||
* getdate.y: Include alloca.h unconditionally.
|
||||
* xmemcoll.h: Include <stddef.h>.
|
||||
|
||||
* Makefile.am (MOSTLYCLEANFILES): Add alloca.h and alloca.ht.
|
||||
(MOSTLYCLEANFILES): Add stdbool.ht.
|
||||
|
||||
* human.c: Include <stdio.h>, once again, for declaration of sprintf.
|
||||
|
||||
Update from gnulib.
|
||||
* tempname.c: Include <stddef.h> unconditionally.
|
||||
Include <inttypes.h> as an alternative to <stdint.h>.
|
||||
* strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
|
||||
* xstrtol.h: Likewise.
|
||||
* xstrtoimax.c: Likewise.
|
||||
* xstrtoumax.c: Likewise.
|
||||
|
||||
Update from gnulib.
|
||||
* strcasecmp.c: Include <stddef.h>, not <sys/types.h>.
|
||||
* savedir.c: Include <stddef.h>.
|
||||
(NULL): Don't define, since <stddef.h> does that.
|
||||
|
||||
2003-06-06 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Update from gnulib.
|
||||
* rpmatch.c: Include <limits.h> without checking for HAVE_LIMITS_H.
|
||||
Include <stddefs.h> unconditionally.
|
||||
(NULL): Don't define, since <stddef.h> does that.
|
||||
* rename.c: #undef rename before defining rpl_rename.
|
||||
[HAVE_CONFIG_H]: Guard inclusion of config.h.
|
||||
* putenv.c: Include <stddef.h> rather than <sys/types.h>,
|
||||
as we merely need size_t.
|
||||
* realloc.c: Likewise.
|
||||
* quote.c: Don't include <stddef.h> or <sys/types.h>; not needed.
|
||||
* modechange.c: Include <stddef.h>.
|
||||
(NULL): Don't define, since <stddef.h> does that.
|
||||
* memcoll.h: Include <stddef.h>, to get size_t.
|
||||
* memcoll.c: Include "memcoll.h", which gets us size_t and checks
|
||||
our interface, instead of including <sys/types.h>
|
||||
(memcoll): Fall back on a simple algorithm using
|
||||
memcmp if strcoll doesn't work.
|
||||
* memcasecmp.h: Include <stddef.h>.
|
||||
* memcasecmp.c: Don't include <sys/types.h>.
|
||||
|
||||
From gnulib.
|
||||
* alloca_.h: New file.
|
||||
* Makefile.am (EXTRA_DIST): Add alloca_.h.
|
||||
(all-local $(lib_OBJECTS)): Depend on $(ALLOCA_H).
|
||||
(alloca.h): New rule.
|
||||
|
||||
* addext.c: Update from gnulib.
|
||||
* backupfile.c: Likewise.
|
||||
* config.charset: Likewise.
|
||||
* dirname.h: Likewise.
|
||||
* fsusage.c: Likewise.
|
||||
* userspec.c: Likewise.
|
||||
* xreadlink.c: Likewise.
|
||||
* xstrtol.c: Likewise.
|
||||
* __fpending.h: Likewise.
|
||||
|
||||
* md5.c: Include <string.h> and <stdlib.h> unconditionally.
|
||||
(memcpy): Remove definition.
|
||||
|
||||
* posixtm.c: Include <stdbool.h> unconditionally.
|
||||
|
||||
2003-06-05 Jim Meyering <jim@meyering.net>
|
||||
|
||||
From gnulib.
|
||||
* mktime.c: Assume freestanding C89 or better.
|
||||
(HAVE_LIMITS_H): Remove. Assume it's 1.
|
||||
(__P): Remove; not used.
|
||||
(CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
|
||||
(mktime, not_equal_tm, print_tm, check_result,
|
||||
main): Use prototypes. Use const * where appropriate.
|
||||
(main): Fix typo in testing code that uncovered by above changes.
|
||||
(Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
|
||||
|
||||
2003-06-04 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Merge human.c etc. from gnulib.
|
||||
* exclude.c, human.c, human.h: Merge from gnulib.
|
||||
* cycle-check.c, cycle-check.h, src/system.h:
|
||||
Include <stdbool.h> unconditionally.
|
||||
|
||||
2003-06-02 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* stdbool.hin: New file. From gnulib.
|
||||
* Makefile.am (MOSTLYCLEANFILES): Initialize.
|
||||
(stdbool.h): New rule.
|
||||
(all-local $(lib_OBJECTS)): Depend on $(STDBOOL_H)
|
||||
(MOSTLYCLEANFILES): Add stdbool.h.
|
||||
(EXTRA_DIST): Add stdbool.h.
|
||||
|
||||
2003-05-30 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* addext.c: Update from gnulib.
|
||||
* mktime.c: Likewise.
|
||||
|
||||
2003-05-29 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Make the %r format directive honor any locale setting.
|
||||
* strftime.c: (my_strftime) [!defined _NL_CURRENT && HAVE_STRFTIME]:
|
||||
Use underlying_strftime for %r.
|
||||
|
||||
2003-05-15 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* getopt.h: Remove a space before a TAB.
|
||||
|
||||
2003-05-13 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* setenv.c (setenv): Don't apply cast to argument of free.
|
||||
* putenv.c (rpl_putenv): Likewise.
|
||||
* alloca.c (alloca): Likewise.
|
||||
|
||||
2003-05-12 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* ftw.c (ftw_startup): Always call free_cwd after restore_cwd.
|
||||
Reported by Matti Aarnio as
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90563.
|
||||
Forwarded by Tim Waugh.
|
||||
|
||||
* strftime.c (my_strftime): Let the `-' (no-pad) flag affect
|
||||
the space-padded-by-default conversion specifiers, %e, %k, %l.
|
||||
|
||||
2003-05-07 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* xnanosleep.c (timespec_subtract): Don't modify the 2nd arg.
|
||||
Work even if X-Y overflows when subtracting. Make explicit the
|
||||
assumption that tv_nsec must be in range.
|
||||
(clock_get_realtime): Remove. All callers changed to invoke gettime,
|
||||
for simplicity.
|
||||
(xnanosleep): Check for gettime failure every time.
|
||||
|
||||
2003-05-06 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* xnanosleep.c (clock_get_realtime): Use gettime.c's gettime function,
|
||||
rather than an inferior, open-coded version that would fail on
|
||||
AIX systems due to clock_gettime failing with errno == ENOSYS.
|
||||
Reported by Jérôme Zago.
|
||||
|
||||
2003-05-05 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Avoid array overrun.
|
||||
* ftw.c (nftw_arr): Update to reflect complete list of members.
|
||||
(ftw_arr): Likewise
|
||||
Reported by Olatunji Oluwabukunmi Ruwase.
|
||||
|
||||
Make it less likely that the above can happen again.
|
||||
* ftw.c (struct dummy): Ensure that at least the number of
|
||||
initializers matches the number of members in the corresponding enum.
|
||||
* ftw_.h (enum Ftw_option): Name this previously-anonymous enum.
|
||||
(enum Ftw_option) [FTW_N_MEMBERS]: New member.
|
||||
|
||||
2003-05-04 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* setenv.c (__set_errno, LOCK, UNLOCK): Define.
|
||||
(unsetenv): Update from GNU libc.
|
||||
Ifdef-out this function, since the only caller
|
||||
is putenv.c and that file now has its own copy.
|
||||
|
||||
This avoids a core dump on systems without GNU putenv,
|
||||
when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
|
||||
* putenv.c (__set_errno, LOCK, UNLOCK): Define.
|
||||
(unsetenv): New static function, from GNU libc.
|
||||
(rpl_putenv): Use it.
|
||||
|
||||
2003-05-02 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* canonicalize.c (canonicalize_file_name) [!HAVE_RESOLVEPATH]:
|
||||
A memory-allocation error could result in heap corruption. Fix it
|
||||
by also updating `dest' when rpath may be changed by xrealloc.
|
||||
|
||||
2003-04-15 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* getloadavg.c: Remove (or replace-with-TAB(s) to retain alignment)
|
||||
each sequence of spaces before a TAB character.
|
||||
* md5.c, getopt.c, getopt.h, obstack.h, strftime.c: Likewise.
|
||||
|
||||
2003-04-11 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
|
||||
|
||||
* canonicalize.c, exclude.c, getgroups.c, getusershell.c:
|
||||
* group-member.c, idcache.c, mountlist.c, readtokens.c, readutmp.c:
|
||||
* bumpalloc.h: Remove anachronistic casts of xmalloc, xrealloc,
|
||||
and xcalloc return values.
|
||||
|
||||
* xalloc.h (PARAMS): Remove definitions and uses.
|
||||
(XMALLOC, XCALLOC, XREALLOC): Remove unnecessary casts.
|
||||
|
||||
* xmalloc.c: Remove use of PARAMS.
|
||||
|
||||
2003-04-10 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* canonicalize.c (canonicalize_file_name) [HAVE_RESOLVEPATH]: Remove
|
||||
stray semicolon that caused `readlink --canonical RELATIVE_NAME' to
|
||||
fail on e.g., Solaris systems. Reported by Bruce Korb.
|
||||
(canonicalize_file_name): Return NULL immediately if resolvepath fails.
|
||||
Otherwise, `readlink --canonical /no-such-file' would exhaust
|
||||
virtual memory on some systems (e.g. Solaris).
|
||||
(canonicalize_file_name): Always free `extra_buf' before returning.
|
||||
(canonicalize_file_name): NUL-terminate the result.
|
||||
|
||||
2003-04-05 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.am (DEFS): Use += notation rather than `DEFS = ... @DEFS@'.
|
||||
Use $(VAR) rather than @VAR@, now that we can rely on automake to
|
||||
emit a definition for each substituted variable.
|
||||
|
||||
2003-03-26 Richard Dawe <rich@phekda.freeserve.co.uk>
|
||||
|
||||
* dirname.c [TEST_DIRNAME]: Update build instructions for test.
|
||||
Add test-cases for DOS filenames. Declare program_name.
|
||||
(main): Set up program_name.
|
||||
|
||||
2003-03-22 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* strftime.c (widen): Cast alloca return value to proper type.
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
noinst_LIBRARIES = libfetish.a
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir)
|
||||
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
DEFS += -DLIBDIR=\"$(libdir)\"
|
||||
|
||||
## Put relatively complex files at the beginning of the list so
|
||||
## that parallel compiles finish a tiny bit sooner. I don't see
|
||||
@@ -63,9 +63,9 @@ libfetish_a_SOURCES = \
|
||||
ftw_.h \
|
||||
full-read.c full-read.h \
|
||||
full-write.c full-write.h \
|
||||
getdelim2.c getdelim2.h \
|
||||
getline.h \
|
||||
getpagesize.h \
|
||||
getstr.c getstr.h \
|
||||
gettime.c \
|
||||
gettext.h \
|
||||
getugroups.c \
|
||||
@@ -129,12 +129,19 @@ libfetish_a_SOURCES = \
|
||||
xstrtoumax.c \
|
||||
yesno.c
|
||||
|
||||
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfetish_a_SOURCES += \
|
||||
printf-args.h \
|
||||
printf-parse.h \
|
||||
vasprintf.h \
|
||||
vasnprintf.h
|
||||
|
||||
libfetish_a_LIBADD = $(LIBOBJS) $(ALLOCA)
|
||||
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
|
||||
|
||||
|
||||
BUILT_SOURCES = getdate.c
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
MOSTLYCLEANFILES =
|
||||
|
||||
EXTRA_DIST = config.charset ref-add.sin ref-del.sin \
|
||||
fnmatch_loop.c inttostr.c inttostr.h
|
||||
@@ -180,9 +187,26 @@ charset.alias: config.charset
|
||||
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
BUILT_SOURCES += $(STDBOOL_H)
|
||||
EXTRA_DIST += stdbool.hin
|
||||
MOSTLYCLEANFILES += stdbool.h stdbool.ht
|
||||
# Create stdbool.h on systems that lack a working one.
|
||||
stdbool.h: stdbool.hin
|
||||
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool.hin > $@t
|
||||
mv $@t $@
|
||||
|
||||
BUILT_SOURCES += $(ALLOCA_H)
|
||||
EXTRA_DIST += alloca_.h
|
||||
MOSTLYCLEANFILES += alloca.h alloca.ht
|
||||
# Create an <alloca.h> when the system
|
||||
# doesn't have one that works with the given compiler.
|
||||
alloca.h: alloca_.h
|
||||
cp $(srcdir)/alloca_.h $@t
|
||||
mv $@t $@
|
||||
|
||||
SUFFIXES = .sed .sin
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
|
||||
sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
CLEANFILES = charset.alias ref-add.sed ref-del.sed
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.7.3 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.7.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
@@ -41,6 +41,7 @@ POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
@@ -54,7 +55,7 @@ CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
DEFS = @DEFS@ -DLIBDIR=\"$(libdir)\"
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
ECHO_C = @ECHO_C@
|
||||
@@ -67,6 +68,7 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
HAVE__BOOL = @HAVE__BOOL@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
@@ -94,7 +96,6 @@ MSGMERGE = @MSGMERGE@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
@@ -110,6 +111,7 @@ SEQ_LIBM = @SEQ_LIBM@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SQRT_LIBM = @SQRT_LIBM@
|
||||
STDBOOL_H = @STDBOOL_H@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_NLS = @USE_NLS@
|
||||
@@ -191,9 +193,9 @@ libfetish_a_SOURCES = \
|
||||
ftw_.h \
|
||||
full-read.c full-read.h \
|
||||
full-write.c full-write.h \
|
||||
getdelim2.c getdelim2.h \
|
||||
getline.h \
|
||||
getpagesize.h \
|
||||
getstr.c getstr.h \
|
||||
gettime.c \
|
||||
gettext.h \
|
||||
getugroups.c \
|
||||
@@ -255,18 +257,24 @@ libfetish_a_SOURCES = \
|
||||
xstrtoul.c \
|
||||
xstrtoimax.c \
|
||||
xstrtoumax.c \
|
||||
yesno.c
|
||||
yesno.c\
|
||||
\
|
||||
printf-args.h \
|
||||
printf-parse.h \
|
||||
vasprintf.h \
|
||||
vasnprintf.h
|
||||
|
||||
|
||||
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfetish_a_LIBADD = $(LIBOBJS) $(ALLOCA)
|
||||
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
|
||||
|
||||
BUILT_SOURCES = getdate.c
|
||||
BUILT_SOURCES = getdate.c $(STDBOOL_H) $(ALLOCA_H)
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
MOSTLYCLEANFILES = stdbool.h stdbool.ht alloca.h alloca.ht
|
||||
|
||||
EXTRA_DIST = config.charset ref-add.sin ref-del.sin \
|
||||
fnmatch_loop.c inttostr.c inttostr.h
|
||||
|
||||
fnmatch_loop.c inttostr.c inttostr.h\
|
||||
stdbool.hin alloca_.h
|
||||
|
||||
charset_alias = $(DESTDIR)$(libdir)/charset.alias
|
||||
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
|
||||
@@ -292,7 +300,7 @@ am_libfetish_a_OBJECTS = acl.$(OBJEXT) getdate.$(OBJEXT) \
|
||||
dirname.$(OBJEXT) dup-safer.$(OBJEXT) exclude.$(OBJEXT) \
|
||||
exitfail.$(OBJEXT) filemode.$(OBJEXT) file-type.$(OBJEXT) \
|
||||
fopen-safer.$(OBJEXT) full-read.$(OBJEXT) full-write.$(OBJEXT) \
|
||||
getstr.$(OBJEXT) gettime.$(OBJEXT) getugroups.$(OBJEXT) \
|
||||
getdelim2.$(OBJEXT) gettime.$(OBJEXT) getugroups.$(OBJEXT) \
|
||||
hard-locale.$(OBJEXT) human.$(OBJEXT) idcache.$(OBJEXT) \
|
||||
isdir.$(OBJEXT) imaxtostr.$(OBJEXT) linebuffer.$(OBJEXT) \
|
||||
localcharset.$(OBJEXT) long-options.$(OBJEXT) \
|
||||
@@ -315,6 +323,7 @@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/__fpending.Po $(DEPDIR)/alloca.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/asnprintf.Po $(DEPDIR)/asprintf.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/atexit.Po $(DEPDIR)/canonicalize.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/chown.Po $(DEPDIR)/dirfd.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/dup2.Po $(DEPDIR)/error.Po \
|
||||
@@ -334,7 +343,8 @@ am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@ $(DEPDIR)/memset.Po $(DEPDIR)/mkdir.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/mkstemp.Po $(DEPDIR)/mktime.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/mountlist.Po $(DEPDIR)/nanosleep.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/obstack.Po $(DEPDIR)/putenv.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/obstack.Po $(DEPDIR)/printf-args.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/printf-parse.Po $(DEPDIR)/putenv.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/raise.Po $(DEPDIR)/readlink-stub.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/readutmp.Po $(DEPDIR)/realloc.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/regex.Po $(DEPDIR)/rename.Po \
|
||||
@@ -350,6 +360,7 @@ am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@ $(DEPDIR)/strtoull.Po $(DEPDIR)/strtoumax.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/strverscmp.Po $(DEPDIR)/tempname.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/tsearch.Po $(DEPDIR)/utime.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/vasnprintf.Po $(DEPDIR)/vasprintf.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/acl.Po ./$(DEPDIR)/addext.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/argmatch.Po ./$(DEPDIR)/backupfile.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/basename.Po ./$(DEPDIR)/canon-host.Po \
|
||||
@@ -359,8 +370,8 @@ am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/exitfail.Po ./$(DEPDIR)/file-type.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/filemode.Po ./$(DEPDIR)/fopen-safer.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/full-read.Po ./$(DEPDIR)/full-write.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/getdate.Po ./$(DEPDIR)/getopt.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/getstr.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/getdate.Po ./$(DEPDIR)/getdelim2.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/getopt.Po ./$(DEPDIR)/getopt1.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/gettime.Po ./$(DEPDIR)/getugroups.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/hard-locale.Po ./$(DEPDIR)/hash-pjw.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/hash.Po ./$(DEPDIR)/human.Po \
|
||||
@@ -395,19 +406,21 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
|
||||
DIST_SOURCES = $(libfetish_a_SOURCES)
|
||||
DIST_COMMON = README ChangeLog Makefile.am Makefile.in TODO \
|
||||
__fpending.c alloca.c atexit.c canonicalize.c chown.c dirfd.c \
|
||||
dup2.c error.c error.h euidaccess.c fchdir-stub.c fchown-stub.c \
|
||||
fileblocks.c fnmatch.c fsusage.c ftruncate.c ftw.c getcwd.c \
|
||||
getdate.c getgroups.c gethostname.c getline.c getloadavg.c \
|
||||
getpass.c gettimeofday.c getusershell.c group-member.c lchown.c \
|
||||
lstat-stub.c lstat.c malloc.c memchr.c memcmp.c memcpy.c \
|
||||
memmove.c memrchr.c memset.c mkdir.c mkstemp.c mktime.c \
|
||||
mountlist.c nanosleep.c obstack.c obstack.h putenv.c raise.c \
|
||||
readlink-stub.c readutmp.c realloc.c regex.c rename.c rmdir.c \
|
||||
rpmatch.c sig2str.c stat.c stpcpy.c strcasecmp.c strcspn.c \
|
||||
strdup.c strncasecmp.c strndup.c strnlen.c strpbrk.c strstr.c \
|
||||
strtod.c strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \
|
||||
strtoumax.c strverscmp.c tempname.c tsearch.c utime.c
|
||||
__fpending.c alloca.c asnprintf.c asprintf.c atexit.c \
|
||||
canonicalize.c chown.c dirfd.c dup2.c error.c error.h \
|
||||
euidaccess.c fchdir-stub.c fchown-stub.c fileblocks.c fnmatch.c \
|
||||
fsusage.c ftruncate.c ftw.c getcwd.c getdate.c getgroups.c \
|
||||
gethostname.c getline.c getloadavg.c getpass.c gettimeofday.c \
|
||||
getusershell.c group-member.c lchown.c lstat-stub.c lstat.c \
|
||||
malloc.c memchr.c memcmp.c memcpy.c memmove.c memrchr.c \
|
||||
memset.c mkdir.c mkstemp.c mktime.c mountlist.c nanosleep.c \
|
||||
obstack.c obstack.h printf-args.c printf-parse.c putenv.c \
|
||||
raise.c readlink-stub.c readutmp.c realloc.c regex.c rename.c \
|
||||
rmdir.c rpmatch.c sig2str.c stat.c stpcpy.c strcasecmp.c \
|
||||
strcspn.c strdup.c strncasecmp.c strndup.c strnlen.c strpbrk.c \
|
||||
strstr.c strtod.c strtoimax.c strtol.c strtoll.c strtoul.c \
|
||||
strtoull.c strtoumax.c strverscmp.c tempname.c tsearch.c \
|
||||
utime.c vasnprintf.c vasprintf.c
|
||||
SOURCES = $(libfetish_a_SOURCES)
|
||||
|
||||
all: $(BUILT_SOURCES)
|
||||
@@ -438,6 +451,8 @@ distclean-compile:
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/__fpending.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/asnprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/asprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atexit.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/canonicalize.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/chown.Po@am__quote@
|
||||
@@ -477,6 +492,8 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mountlist.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/nanosleep.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/printf-args.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/printf-parse.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/putenv.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/raise.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/readlink-stub.Po@am__quote@
|
||||
@@ -508,6 +525,8 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tempname.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tsearch.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/utime.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vasnprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vasprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addext.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@
|
||||
@@ -527,9 +546,9 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdate.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim2.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getstr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getugroups.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.Po@am__quote@
|
||||
@@ -589,7 +608,7 @@ distclean-depend:
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@@ -600,7 +619,7 @@ distclean-depend:
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@@ -610,8 +629,6 @@ distclean-depend:
|
||||
|
||||
.y.c:
|
||||
$(YACCCOMPILE) `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@
|
||||
rm -f y.tab.c
|
||||
if test -f y.tab.h; then \
|
||||
to=`echo "$*_H" | sed \
|
||||
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
|
||||
@@ -627,6 +644,8 @@ distclean-depend:
|
||||
if test -f y.output; then \
|
||||
mv y.output $*.output; \
|
||||
fi
|
||||
sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@
|
||||
rm -f y.tab.c
|
||||
uninstall-info-am:
|
||||
|
||||
ETAGS = etags
|
||||
@@ -720,8 +739,8 @@ check: $(BUILT_SOURCES)
|
||||
all-am: Makefile $(LIBRARIES) all-local
|
||||
|
||||
installdirs:
|
||||
|
||||
install: install-am
|
||||
install: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
@@ -736,6 +755,7 @@ install-strip:
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
@@ -845,8 +865,17 @@ uninstall-local: all-local
|
||||
charset.alias: config.charset
|
||||
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
|
||||
mv t-$@ $@
|
||||
# Create stdbool.h on systems that lack a working one.
|
||||
stdbool.h: stdbool.hin
|
||||
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool.hin > $@t
|
||||
mv $@t $@
|
||||
# Create an <alloca.h> when the system
|
||||
# doesn't have one that works with the given compiler.
|
||||
alloca.h: alloca_.h
|
||||
cp $(srcdir)/alloca_.h $@t
|
||||
mv $@t $@
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
|
||||
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.
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if HAVE_STDIO_EXT_H
|
||||
# include <stdio_ext.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef HAVE_DECL___FPENDING
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* acl.c - access control lists
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003 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
|
||||
@@ -22,6 +22,7 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifndef S_ISLNK
|
||||
# define S_ISLNK(Mode) 0
|
||||
|
||||
16
lib/addext.c
16
lib/addext.c
@@ -1,5 +1,7 @@
|
||||
/* addext.c -- add an extension to a file name
|
||||
Copyright 1990, 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1990, 1997, 1998, 1999, 2001, 2003 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -29,14 +31,12 @@
|
||||
# define HAVE_LONG_FILE_NAMES 0
|
||||
#endif
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#ifndef _POSIX_NAME_MAX
|
||||
# define _POSIX_NAME_MAX 14
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
@@ -83,7 +83,11 @@ addext (char *filename, char const *ext, int e)
|
||||
*s = c;
|
||||
}
|
||||
if (0 <= name_max || errno == 0)
|
||||
slen_max = name_max == (long) (size_t) name_max ? name_max : -1;
|
||||
{
|
||||
long size = slen_max = name_max;
|
||||
if (name_max != size)
|
||||
slen_max = -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ alloca (size)
|
||||
{
|
||||
register header *np = hp->h.next;
|
||||
|
||||
free ((pointer) hp); /* Collect garbage. */
|
||||
free (hp); /* Collect garbage. */
|
||||
|
||||
hp = np; /* -> next header. */
|
||||
}
|
||||
|
||||
68
lib/alloca_.h
Normal file
68
lib/alloca_.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/* Memory allocation on the stack.
|
||||
Copyright (C) 1995, 1999, 2001-2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* When this file is included, it may be preceded only by preprocessor
|
||||
declarations. Thanks to AIX. Therefore we include it right after
|
||||
"config.h", not later. */
|
||||
|
||||
#ifndef _ALLOCA_H
|
||||
# define _ALLOCA_H
|
||||
|
||||
/* alloca(N) returns a pointer (void* or char*) to N bytes of memory
|
||||
allocated on the stack, and which will last until the function returns.
|
||||
Use of alloca should be avoided:
|
||||
- inside arguments of function calls - undefined behaviour,
|
||||
- in inline functions - the allocation may actually last until the
|
||||
calling function returns,
|
||||
- for huge N (say, N >= 65536) - you never know how large (or small)
|
||||
the stack is, and when the stack cannot fulfill the memory allocation
|
||||
request, the program just crashes.
|
||||
*/
|
||||
|
||||
# ifdef __GNUC__
|
||||
# ifndef alloca
|
||||
# define alloca __builtin_alloca
|
||||
# endif
|
||||
# else
|
||||
# ifdef _MSC_VER
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
# else
|
||||
# if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
# pragma alloca
|
||||
# else
|
||||
# ifdef __hpux /* This section must match that of bison generated files. */
|
||||
# ifdef __cplusplus
|
||||
extern "C" void *alloca (unsigned int);
|
||||
# else /* not __cplusplus */
|
||||
extern void *alloca ();
|
||||
# endif /* not __cplusplus */
|
||||
# else /* not __hpux */
|
||||
# ifndef alloca
|
||||
extern char *alloca ();
|
||||
# endif
|
||||
# endif /* __hpux */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif /* _ALLOCA_H */
|
||||
38
lib/asnprintf.c
Normal file
38
lib/asnprintf.c
Normal file
@@ -0,0 +1,38 @@
|
||||
/* Formatted output to strings.
|
||||
Copyright (C) 1999, 2002 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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Specification. */
|
||||
#include "vasnprintf.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
char *
|
||||
asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
char *result;
|
||||
|
||||
va_start (args, format);
|
||||
result = vasnprintf (resultbuf, lengthp, format, args);
|
||||
va_end (args);
|
||||
return result;
|
||||
}
|
||||
38
lib/asprintf.c
Normal file
38
lib/asprintf.c
Normal file
@@ -0,0 +1,38 @@
|
||||
/* Formatted output to strings.
|
||||
Copyright (C) 1999, 2002 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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Specification. */
|
||||
#include "vasprintf.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
int
|
||||
asprintf (char **resultp, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
int result;
|
||||
|
||||
va_start (args, format);
|
||||
result = vasprintf (resultp, format, args);
|
||||
va_end (args);
|
||||
return result;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
/* backupfile.c -- make Emacs style backup file names
|
||||
Copyright (C) 1990,91,92,93,94,95,96,97,98,99,2000, 2001, 2002 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||
1999, 2000, 2001, 2002, 2003 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
|
||||
@@ -24,8 +25,8 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
@@ -80,12 +81,8 @@ char *malloc ();
|
||||
# define HAVE_DIR 0
|
||||
#endif
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
#endif
|
||||
#include <limits.h>
|
||||
|
||||
/* Upper bound on the string length of an integer converted to string.
|
||||
302 / 1000 is ceil (log10 (2.0)). Subtract 1 for the sign bit;
|
||||
add 1 for integer division truncation; add 1 more for a minus sign. */
|
||||
@@ -114,8 +111,8 @@ char *malloc ();
|
||||
to numbered) backup file name. */
|
||||
const char *simple_backup_suffix = "~";
|
||||
|
||||
static int max_backup_version PARAMS ((const char *, const char *));
|
||||
static int version_number PARAMS ((const char *, const char *, size_t));
|
||||
static int max_backup_version (const char *, const char *);
|
||||
static int version_number (const char *, const char *, size_t);
|
||||
|
||||
/* Return the name of the new backup file for file FILE,
|
||||
allocated with malloc. Return 0 if out of memory.
|
||||
|
||||
@@ -44,17 +44,9 @@ enum backup_type
|
||||
|
||||
extern char const *simple_backup_suffix;
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
char *find_backup_file_name PARAMS ((char const *, enum backup_type));
|
||||
enum backup_type get_version PARAMS ((char const *context, char const *arg));
|
||||
enum backup_type xget_version PARAMS ((char const *context, char const *arg));
|
||||
void addext PARAMS ((char *, char const *, int));
|
||||
char *find_backup_file_name (char const *, enum backup_type);
|
||||
enum backup_type get_version (char const *context, char const *arg);
|
||||
enum backup_type xget_version (char const *context, char const *arg);
|
||||
void addext (char *, char const *, int);
|
||||
|
||||
#endif /* ! BACKUPFILE_H_ */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* BUMP_ALLOC macro - increase table allocation by one element.
|
||||
Copyright (C) 1990, 1991, 1993, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1991, 1993, 1998, 2000, 2003 Free Software Foundation, Inc.
|
||||
François Pinard <pinard@iro.umontreal.ca>, 1990.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -54,9 +54,9 @@
|
||||
if (((Count) & (~(~0 << (Exponent)))) == 0) \
|
||||
{ \
|
||||
if ((Count) == 0) \
|
||||
(Table) = (Type *) xmalloc ((1 << (Exponent)) * (Size)); \
|
||||
(Table) = xmalloc ((1 << (Exponent)) * (Size)); \
|
||||
else \
|
||||
(Table) = (Type *) \
|
||||
(Table) = \
|
||||
xrealloc ((Table), ((Count) + (1 << (Exponent))) * (Size)); \
|
||||
} \
|
||||
} \
|
||||
|
||||
@@ -130,7 +130,7 @@ canonicalize_file_name (const char *name)
|
||||
{
|
||||
char *wd;
|
||||
|
||||
if (!(wd = xgetcwd ()));
|
||||
if (!(wd = xgetcwd ()))
|
||||
return NULL;
|
||||
|
||||
extra_buf = path_concat (wd, name, NULL);
|
||||
@@ -147,18 +147,22 @@ canonicalize_file_name (const char *name)
|
||||
resolved_size = 2 * resolved_size + 1;
|
||||
resolved = xmalloc (resolved_size);
|
||||
resolved_len = resolvepath (name, resolved, resolved_size);
|
||||
if (resolved_len < 0)
|
||||
{
|
||||
free (resolved);
|
||||
free (extra_buf);
|
||||
return NULL;
|
||||
}
|
||||
if (resolved_len < resolved_size)
|
||||
break;
|
||||
free (resolved);
|
||||
}
|
||||
|
||||
if (resolved_len < 0)
|
||||
{
|
||||
free (resolved);
|
||||
resolved = NULL;
|
||||
}
|
||||
|
||||
free (extra_buf);
|
||||
|
||||
/* NUL-terminate the resulting name. */
|
||||
resolved[resolved_len] = '\0';
|
||||
|
||||
return resolved;
|
||||
|
||||
#else /* !HAVE_RESOLVEPATH */
|
||||
@@ -169,9 +173,11 @@ canonicalize_file_name (const char *name)
|
||||
if (!rpath)
|
||||
return NULL;
|
||||
dest = strchr (rpath, '\0');
|
||||
if (dest < rpath + PATH_MAX)
|
||||
if (dest - rpath < PATH_MAX)
|
||||
{
|
||||
rpath = xrealloc (rpath, PATH_MAX);
|
||||
char *p = xrealloc (rpath, PATH_MAX);
|
||||
dest = p + (dest - rpath);
|
||||
rpath = p;
|
||||
rpath_limit = rpath + PATH_MAX;
|
||||
}
|
||||
else
|
||||
@@ -223,7 +229,7 @@ canonicalize_file_name (const char *name)
|
||||
new_size += end - start + 1;
|
||||
else
|
||||
new_size += PATH_MAX;
|
||||
rpath = (char *) xrealloc (rpath, new_size);
|
||||
rpath = xrealloc (rpath, new_size);
|
||||
rpath_limit = rpath + new_size;
|
||||
|
||||
dest = rpath + dest_offset;
|
||||
|
||||
@@ -1,17 +1,27 @@
|
||||
/* Close standard output.
|
||||
|
||||
Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef CLOSEOUT_H
|
||||
# define CLOSEOUT_H 1
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
void close_stdout_set_status PARAMS ((int status));
|
||||
void close_stdout_set_file_name PARAMS ((const char *file));
|
||||
void close_stdout PARAMS ((void));
|
||||
void close_stdout_status PARAMS ((int status));
|
||||
void close_stdout_set_status (int status);
|
||||
void close_stdout_set_file_name (const char *file);
|
||||
void close_stdout (void);
|
||||
void close_stdout_status (int status);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent table of character encoding aliases.
|
||||
#
|
||||
# Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000-2003 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
|
||||
@@ -71,7 +71,7 @@
|
||||
# CP1125 dos
|
||||
# CP1129 aix
|
||||
# CP1250 woe32
|
||||
# CP1251 glibc woe32
|
||||
# CP1251 glibc solaris woe32
|
||||
# CP1252 aix woe32
|
||||
# CP1253 woe32
|
||||
# CP1254 woe32
|
||||
@@ -231,6 +231,7 @@ case "$os" in
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "koi8-r KOI8-R"
|
||||
echo "ansi-1251 CP1251"
|
||||
echo "BIG5 BIG5"
|
||||
echo "Big5-HKSCS BIG5-HKSCS"
|
||||
echo "gb2312 GB2312"
|
||||
|
||||
@@ -28,11 +28,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
typedef enum {false = 0, true = 1} bool;
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "cycle-check.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
@@ -10,11 +10,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
typedef enum {false = 0, true = 1} bool;
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
|
||||
so that the proper identifiers are all declared. */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* dirname.c -- return all but the last element in a path
|
||||
Copyright 1990, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright 1990, 1998, 2000, 2001, 2003 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
|
||||
@@ -67,9 +67,13 @@ dir_name (char const *path)
|
||||
|
||||
Run the test like this (expect no output):
|
||||
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall \
|
||||
basename.c dirname.c xmalloc.c
|
||||
basename.c dirname.c xmalloc.c error.c
|
||||
sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
|
||||
|
||||
If it's been built on a DOS or Windows platforms, run another test like
|
||||
this (again, expect no output):
|
||||
sed -n '/^BEGIN-DOS-DATA$/,/^END-DOS-DATA$/p' dirname.c|grep -v DATA|./a.out
|
||||
|
||||
BEGIN-DATA
|
||||
foo//// .
|
||||
bar/foo//// bar
|
||||
@@ -79,16 +83,28 @@ foo/ .
|
||||
a .
|
||||
END-DATA
|
||||
|
||||
BEGIN-DOS-DATA
|
||||
c:///// c:/
|
||||
c:/ c:/
|
||||
c:/. c:/
|
||||
c:foo c:.
|
||||
c:foo/bar c:foo
|
||||
END-DOS-DATA
|
||||
|
||||
*/
|
||||
|
||||
# define MAX_BUFF_LEN 1024
|
||||
# include <stdio.h>
|
||||
|
||||
char *program_name;
|
||||
|
||||
int
|
||||
main ()
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
char buff[MAX_BUFF_LEN + 1];
|
||||
|
||||
program_name = argv[0];
|
||||
|
||||
buff[MAX_BUFF_LEN] = 0;
|
||||
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
|
||||
{
|
||||
|
||||
@@ -17,13 +17,7 @@
|
||||
#ifndef DIRNAME_H_
|
||||
# define DIRNAME_H_ 1
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
# include <stddef.h>
|
||||
|
||||
# ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
@@ -37,11 +31,11 @@
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
# endif
|
||||
|
||||
char *base_name PARAMS ((char const *path));
|
||||
char *dir_name PARAMS ((char const *path));
|
||||
size_t base_len PARAMS ((char const *path));
|
||||
size_t dir_len PARAMS ((char const *path));
|
||||
char *base_name (char const *path);
|
||||
char *dir_name (char const *path);
|
||||
size_t base_len (char const *path);
|
||||
size_t dir_len (char const *path);
|
||||
|
||||
int strip_trailing_slashes PARAMS ((char *path));
|
||||
int strip_trailing_slashes (char *path);
|
||||
|
||||
#endif /* not DIRNAME_H_ */
|
||||
|
||||
@@ -24,20 +24,14 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
typedef enum {false = 0, true = 1} bool;
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
@@ -104,11 +98,10 @@ struct exclude
|
||||
struct exclude *
|
||||
new_exclude (void)
|
||||
{
|
||||
struct exclude *ex = (struct exclude *) xmalloc (sizeof *ex);
|
||||
struct exclude *ex = xmalloc (sizeof *ex);
|
||||
ex->exclude_count = 0;
|
||||
ex->exclude_alloc = (1 << 6); /* This must be a power of 2. */
|
||||
ex->exclude = (struct patopts *) xmalloc (ex->exclude_alloc
|
||||
* sizeof ex->exclude[0]);
|
||||
ex->exclude = xmalloc (ex->exclude_alloc * sizeof ex->exclude[0]);
|
||||
return ex;
|
||||
}
|
||||
|
||||
@@ -206,8 +199,7 @@ add_exclude (struct exclude *ex, char const *pattern, int options)
|
||||
if (! (0 < s && s <= SIZE_MAX / sizeof ex->exclude[0]))
|
||||
xalloc_die ();
|
||||
ex->exclude_alloc = s;
|
||||
ex->exclude = (struct patopts *) xrealloc (ex->exclude,
|
||||
s * sizeof ex->exclude[0]);
|
||||
ex->exclude = xrealloc (ex->exclude, s * sizeof ex->exclude[0]);
|
||||
}
|
||||
|
||||
patopts = &ex->exclude[ex->exclude_count++];
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
#ifndef FILEMODE_H_
|
||||
/* Make a string describing file modes.
|
||||
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef FILEMODE_H_
|
||||
|
||||
# include <sys/types.h>
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
void mode_string PARAMS ((mode_t mode, char *str));
|
||||
void mode_string (mode_t mode, char *str);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* fsusage.c -- return space usage of mounted filesystems
|
||||
Copyright (C) 1991, 1992, 1996, 1998, 1999, 2002, 2003 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Copyright (C) 1991, 1992, 1996, 1998, 1999, 2002, 2003 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -35,12 +36,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include "fsusage.h"
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
#endif
|
||||
#include <limits.h>
|
||||
|
||||
#if HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
|
||||
@@ -31,15 +31,6 @@ struct fs_usage
|
||||
uintmax_t fsu_ffree; /* Free file nodes. */
|
||||
};
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
int get_fs_usage PARAMS ((const char *path, const char *disk,
|
||||
struct fs_usage *fsp));
|
||||
int get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1063,7 +1063,7 @@ fts_sort(sp, head, nitems)
|
||||
|
||||
sp->fts_nitems = nitems + 40;
|
||||
if ((a = realloc(sp->fts_array,
|
||||
(size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
|
||||
(size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
|
||||
free(sp->fts_array);
|
||||
sp->fts_array = NULL;
|
||||
sp->fts_nitems = 0;
|
||||
|
||||
23
lib/ftw.c
23
lib/ftw.c
@@ -224,12 +224,25 @@ struct ftw_data
|
||||
as `ftw', map each flag to the subset of values used by `ftw'. */
|
||||
static const int nftw_arr[] =
|
||||
{
|
||||
FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_SL, FTW_DP, FTW_SLN
|
||||
/* Extract with:
|
||||
perl -ne '/^ (FTW_\w+)\b[^=]*$/ and print "$1, "' ftw_.h; echo */
|
||||
FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_DCH, FTW_DCHP, FTW_DPRE, FTW_SL, FTW_DP, FTW_SLN
|
||||
};
|
||||
|
||||
static const int ftw_arr[] =
|
||||
{
|
||||
FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_F, FTW_D, FTW_NS
|
||||
/* Generate with:
|
||||
perl -ne '/^ (FTW_\w+)\b[^=]*$/ and print "$1, "' ftw_.h \
|
||||
| sed 's/_SL/_F/;s/_DP\>/_D/;s/_SLN/_NS/'; echo */
|
||||
FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_DCH, FTW_DCHP, FTW_DPRE, FTW_F, FTW_D, FTW_NS
|
||||
};
|
||||
|
||||
/* Ensure that each of the above arrays has the number of
|
||||
initializers corresponding to enum Ftw_option. */
|
||||
struct dummy
|
||||
{
|
||||
int p1 [sizeof nftw_arr / sizeof nftw_arr[0] == FTW_N_MEMBERS ? 1 : -1];
|
||||
int p2 [sizeof nftw_arr / sizeof ftw_arr[0] == FTW_N_MEMBERS ? 1 : -1];
|
||||
};
|
||||
|
||||
|
||||
@@ -592,8 +605,9 @@ ftw_dir (struct ftw_data *data, struct FTW_STAT *st)
|
||||
__set_errno (save_err);
|
||||
}
|
||||
|
||||
/* Prepare the return, revert the `struct FTW' information. */
|
||||
data->dirbuf[data->ftw.base - 1] = '\0';
|
||||
/* Prepare the return, revert the `struct FTW' information.
|
||||
If ftw.base is 1, be careful to preserve the `/'. */
|
||||
data->dirbuf[data->ftw.base == 1 ? 1 : data->ftw.base - 1] = '\0';
|
||||
--data->ftw.level;
|
||||
data->ftw.base = previous_base;
|
||||
|
||||
@@ -800,6 +814,7 @@ ftw_startup (const char *dir, int is_nftw, NFTW_FUNC_T func, int descriptors,
|
||||
save_err = errno;
|
||||
result = -1;
|
||||
}
|
||||
free_cwd (&cwd);
|
||||
|
||||
__set_errno (save_err);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ __BEGIN_DECLS
|
||||
|
||||
/* Values for the FLAG argument to the user function passed to `ftw'
|
||||
and 'nftw'. */
|
||||
enum
|
||||
enum Ftw_option
|
||||
{
|
||||
FTW_F, /* Regular file. */
|
||||
# define FTW_F FTW_F
|
||||
@@ -89,10 +89,13 @@ enum
|
||||
/* These flags are only passed from the `nftw' function. */
|
||||
FTW_DP, /* Directory, all subdirs have been visited. */
|
||||
# define FTW_DP FTW_DP
|
||||
FTW_SLN /* Symbolic link naming non-existing file. */
|
||||
FTW_SLN, /* Symbolic link naming non-existing file. */
|
||||
# define FTW_SLN FTW_SLN
|
||||
|
||||
# endif /* extended X/Open */
|
||||
|
||||
FTW_N_MEMBERS
|
||||
# define FTW_N_MEMBERS FTW_N_MEMBERS
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Parse a string into an internal time stamp.
|
||||
|
||||
Copyright (C) 1995, 1997, 1998, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -18,14 +20,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef vms
|
||||
# include <types.h>
|
||||
# include <time.h>
|
||||
@@ -43,4 +37,4 @@
|
||||
# endif
|
||||
#endif /* defined (vms) */
|
||||
|
||||
time_t get_date PARAMS ((const char *p, const time_t *now));
|
||||
time_t get_date (const char *p, const time_t *now);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
%{
|
||||
/* Parse a string into an internal time stamp.
|
||||
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -27,11 +27,10 @@
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# ifdef HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <alloca.h>
|
||||
|
||||
/* Since the code of getdate.y is not included in the Emacs executable
|
||||
itself, there is no need to #define static in this file. Even if
|
||||
the code were included in the Emacs executable, it probably
|
||||
@@ -322,6 +321,14 @@ date:
|
||||
PC.year.value = -$3.value;
|
||||
PC.year.digits = $3.digits;
|
||||
}
|
||||
| tMONTH tSNUMBER tSNUMBER
|
||||
{
|
||||
/* e.g. JUN-17-1992. */
|
||||
PC.month = $1;
|
||||
PC.day = -$2.value;
|
||||
PC.year.value = -$3.value;
|
||||
PC.year.digits = $3.digits;
|
||||
}
|
||||
| tMONTH tUNUMBER
|
||||
{
|
||||
PC.month = $1;
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/* getstr.c -- core function for GNU C library getline replacement function
|
||||
/* getdelim2.c -- a variant of getdelim
|
||||
|
||||
Copyright (C) 1993, 1996-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, 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. */
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Jan Brittenson, bson@gnu.ai.mit.edu. */
|
||||
|
||||
@@ -22,14 +22,9 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "getdelim2.h"
|
||||
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
char *malloc (), *realloc ();
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "unlocked-io.h"
|
||||
|
||||
@@ -44,8 +39,8 @@ char *malloc (), *realloc ();
|
||||
read (not including the NUL terminator), or -1 on error or EOF. */
|
||||
|
||||
int
|
||||
getstr (char **lineptr, size_t *n, FILE *stream, int delim1, int delim2,
|
||||
size_t offset)
|
||||
getdelim2 (char **lineptr, size_t *n, FILE *stream, int delim1, int delim2,
|
||||
size_t offset)
|
||||
{
|
||||
size_t nchars_avail; /* Allocated but unused chars in *LINEPTR. */
|
||||
char *read_pos; /* Where we're reading into *LINEPTR. */
|
||||
10
lib/getdelim2.h
Normal file
10
lib/getdelim2.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef GETDELIM2_H_
|
||||
# define GETDELIM2_H_ 1
|
||||
|
||||
# include <stddef.h>
|
||||
# include <stdio.h>
|
||||
|
||||
int getdelim2 (char **lineptr, size_t *n, FILE *stream, int delim1, int delim2,
|
||||
size_t offset);
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
/* provide consistent interface to getgroups for systems that don't allow N==0
|
||||
Copyright (C) 1996, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1999, 2003 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
|
||||
@@ -43,7 +43,7 @@ getgroups (size_t n, GETGROUPS_T *group)
|
||||
gbuf = NULL;
|
||||
while (1)
|
||||
{
|
||||
gbuf = (GETGROUPS_T *) xrealloc (gbuf, n * sizeof (GETGROUPS_T));
|
||||
gbuf = xrealloc (gbuf, n * sizeof (GETGROUPS_T));
|
||||
n_groups = getgroups (n, gbuf);
|
||||
if (n_groups < n)
|
||||
break;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
/* getline.c -- Replacement for GNU C library function getline
|
||||
|
||||
Copyright (C) 1993, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, 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. */
|
||||
|
||||
/* Written by Jan Brittenson, bson@gnu.ai.mit.edu. */
|
||||
|
||||
@@ -22,14 +23,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "getline.h"
|
||||
#include "getdelim2.h"
|
||||
|
||||
/* The `getdelim' function is only declared if the following symbol
|
||||
is defined. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined __GNU_LIBRARY__ && HAVE_GETDELIM
|
||||
|
||||
@@ -41,17 +45,15 @@ getline (char **lineptr, size_t *n, FILE *stream)
|
||||
|
||||
#else /* ! have getdelim */
|
||||
|
||||
# include "getstr.h"
|
||||
|
||||
int
|
||||
getline (char **lineptr, size_t *n, FILE *stream)
|
||||
{
|
||||
return getstr (lineptr, n, stream, '\n', 0, 0);
|
||||
return getdelim2 (lineptr, n, stream, '\n', 0, 0);
|
||||
}
|
||||
|
||||
int
|
||||
getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream)
|
||||
{
|
||||
return getstr (lineptr, n, stream, delimiter, 0, 0);
|
||||
return getdelim2 (lineptr, n, stream, delimiter, 0, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1997, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1997, 1999, 2000-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -17,22 +17,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#ifndef GETLINE_H_
|
||||
# define GETLINE_H_ 1
|
||||
|
||||
# include <stddef.h>
|
||||
# include <stdio.h>
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* glibc2 has these functions declared in <stdio.h>. Avoid redeclarations. */
|
||||
# if __GLIBC__ < 2
|
||||
int
|
||||
getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
|
||||
|
||||
int
|
||||
getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream));
|
||||
int getline (char **_lineptr, size_t *_n, FILE *_stream);
|
||||
|
||||
int getdelim (char **_lineptr, size_t *_n, int _delimiter, FILE *_stream);
|
||||
|
||||
# endif
|
||||
|
||||
#endif /* not GETLINE_H_ */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Get the system load averages.
|
||||
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997, 2003
|
||||
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
|
||||
@@ -62,7 +62,7 @@
|
||||
VMS
|
||||
WINDOWS32 No-op for Windows95/NT.
|
||||
__linux__ Linux: assumes /proc filesystem mounted.
|
||||
Support from Michael K. Johnson.
|
||||
Support from Michael K. Johnson.
|
||||
__NetBSD__ NetBSD: assumes /kern filesystem mounted.
|
||||
|
||||
In addition, to avoid nesting many #ifdefs, we internally set
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"Keep this file name-space clean" means, talk to drepper@gnu.org
|
||||
before changing it!
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002
|
||||
Free Software Foundation, Inc.
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -77,7 +77,7 @@ extern int optopt;
|
||||
The field `has_arg' is:
|
||||
no_argument (or 0) if the option does not take an argument,
|
||||
required_argument (or 1) if the option requires an argument,
|
||||
optional_argument (or 2) if the option takes an optional argument.
|
||||
optional_argument (or 2) if the option takes an optional argument.
|
||||
|
||||
If the field `flag' is not NULL, it points to a variable that is set
|
||||
to the value given in the field `val' when the option is found, but
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
/* Copyright (C) 1992,93,94,95,96,97,98,99,2000, 2001 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.
|
||||
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.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
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 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. */
|
||||
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>
|
||||
|
||||
19
lib/getstr.h
19
lib/getstr.h
@@ -1,19 +0,0 @@
|
||||
#ifndef GETSTR_H_
|
||||
# define GETSTR_H_ 1
|
||||
|
||||
# include <stdio.h>
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
int
|
||||
getstr PARAMS ((char **lineptr, size_t *n, FILE *stream,
|
||||
int delim1, int delim2,
|
||||
size_t offset));
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,8 @@
|
||||
/* Work around the bug in some systems whereby gettimeofday clobbers the
|
||||
static buffer that localtime uses for it's return value. The gettimeofday
|
||||
function from Mac OS X 10.0.4, i.e. Darwin 1.3.7 has this problem.
|
||||
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
The tzset replacement is necessary for at least Solaris 2.5, 2.5.1, and 2.6.
|
||||
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -21,10 +22,12 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Disable the definitions of gettimeofday and localtime (from config.h)
|
||||
/* Disable the definitions of these functions (from config.h)
|
||||
so we can use the library versions here. */
|
||||
#undef gettimeofday
|
||||
#undef gmtime
|
||||
#undef localtime
|
||||
#undef tzset
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -60,6 +63,18 @@ rpl_localtime (const time_t *timep)
|
||||
return tm;
|
||||
}
|
||||
|
||||
/* Same as above, since gmtime and localtime use the same buffer. */
|
||||
struct tm *
|
||||
rpl_gmtime (const time_t *timep)
|
||||
{
|
||||
struct tm *tm = gmtime (timep);
|
||||
|
||||
if (! localtime_buffer_addr)
|
||||
localtime_buffer_addr = tm;
|
||||
|
||||
return tm;
|
||||
}
|
||||
|
||||
/* This is a wrapper for gettimeofday. It is used only on systems for which
|
||||
gettimeofday clobbers the static buffer used for localtime's result.
|
||||
|
||||
@@ -84,3 +99,23 @@ rpl_gettimeofday (struct timeval *tv, struct timezone *tz)
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* This is a wrapper for tzset. It is used only on systems for which
|
||||
tzset may clobber the static buffer used for localtime's result.
|
||||
Save and restore the contents of the buffer used for localtime's
|
||||
result around the call to tzset. */
|
||||
void
|
||||
rpl_tzset (void)
|
||||
{
|
||||
struct tm save;
|
||||
|
||||
if (! localtime_buffer_addr)
|
||||
{
|
||||
time_t t = 0;
|
||||
localtime_buffer_addr = localtime (&t);
|
||||
}
|
||||
|
||||
save = *localtime_buffer_addr;
|
||||
tzset ();
|
||||
*localtime_buffer_addr = save;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* getusershell.c -- Return names of valid user shells.
|
||||
Copyright (C) 1991, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1997, 2000, 2001, 2003 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
|
||||
@@ -153,7 +153,7 @@ readname (name, size, stream)
|
||||
if (*name == NULL)
|
||||
{
|
||||
*size = 10;
|
||||
*name = (char *) xmalloc (*size);
|
||||
*name = xmalloc (*size);
|
||||
}
|
||||
|
||||
/* Skip blank space. */
|
||||
@@ -166,7 +166,7 @@ readname (name, size, stream)
|
||||
while (name_index >= *size)
|
||||
{
|
||||
*size *= 2;
|
||||
*name = (char *) xrealloc (*name, *size);
|
||||
*name = xrealloc (*name, *size);
|
||||
}
|
||||
c = getc (stream);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* group-member.c -- determine whether group id is in calling user's group list
|
||||
Copyright (C) 1994, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994, 1997, 1998, 2003 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
|
||||
@@ -67,8 +67,7 @@ get_group_info (void)
|
||||
while (n_groups == n_group_slots)
|
||||
{
|
||||
n_group_slots += 64;
|
||||
group = (GETGROUPS_T *) xrealloc (group,
|
||||
n_group_slots * sizeof (GETGROUPS_T));
|
||||
group = xrealloc (group, n_group_slots * sizeof (GETGROUPS_T));
|
||||
n_groups = getgroups (n_group_slots, group);
|
||||
}
|
||||
|
||||
@@ -79,7 +78,7 @@ get_group_info (void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gi = (struct group_info *) xmalloc (sizeof (*gi));
|
||||
gi = xmalloc (sizeof (*gi));
|
||||
gi->n_groups = n_groups;
|
||||
gi->group = group;
|
||||
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
#ifndef GROUP_MEMBER_H_
|
||||
# define GROUP_MEMBER_H_ 1
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
int
|
||||
group_member PARAMS ((gid_t));
|
||||
int group_member (gid_t);
|
||||
|
||||
#endif /* GROUP_MEMBER_H_ */
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
#ifndef HARD_LOCALE_H_
|
||||
# define HARD_LOCALE_H_ 1
|
||||
|
||||
# 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
|
||||
|
||||
int hard_locale PARAMS ((int));
|
||||
int hard_locale (int);
|
||||
|
||||
#endif /* HARD_LOCALE_H_ */
|
||||
|
||||
16
lib/hash.c
16
lib/hash.c
@@ -1,5 +1,8 @@
|
||||
/* hash - hashing table processing.
|
||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Written by Jim Meyering, 1992.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -27,11 +30,9 @@
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
typedef enum {false = 0, true = 1} bool;
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -403,9 +404,6 @@ hash_do_for_each (const Hash_table *table, Hash_processor processor,
|
||||
unsigned
|
||||
hash_string (const char *string, unsigned n_buckets)
|
||||
{
|
||||
# ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
# endif
|
||||
# define ROTATE_LEFT(Value, Shift) \
|
||||
((Value) << (Shift) | (Value) >> ((sizeof (unsigned) * CHAR_BIT) - (Shift)))
|
||||
# define HASH_ONE_CHAR(Value, Byte) \
|
||||
|
||||
58
lib/hash.h
58
lib/hash.h
@@ -24,18 +24,10 @@
|
||||
#ifndef HASH_H_
|
||||
# define HASH_H_
|
||||
|
||||
# ifndef PARAMS
|
||||
# if PROTOTYPES || __STDC__
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
typedef unsigned (*Hash_hasher) PARAMS ((const void *, unsigned));
|
||||
typedef bool (*Hash_comparator) PARAMS ((const void *, const void *));
|
||||
typedef void (*Hash_data_freer) PARAMS ((void *));
|
||||
typedef bool (*Hash_processor) PARAMS ((void *, void *));
|
||||
typedef unsigned (*Hash_hasher) (const void *, unsigned);
|
||||
typedef bool (*Hash_comparator) (const void *, const void *);
|
||||
typedef void (*Hash_data_freer) (void *);
|
||||
typedef bool (*Hash_processor) (void *, void *);
|
||||
|
||||
struct hash_entry
|
||||
{
|
||||
@@ -62,32 +54,32 @@ struct hash_table;
|
||||
typedef struct hash_table Hash_table;
|
||||
|
||||
/* Information and lookup. */
|
||||
unsigned hash_get_n_buckets PARAMS ((const Hash_table *));
|
||||
unsigned hash_get_n_buckets_used PARAMS ((const Hash_table *));
|
||||
unsigned hash_get_n_entries PARAMS ((const Hash_table *));
|
||||
unsigned hash_get_max_bucket_length PARAMS ((const Hash_table *));
|
||||
bool hash_table_ok PARAMS ((const Hash_table *));
|
||||
void hash_print_statistics PARAMS ((const Hash_table *, FILE *));
|
||||
void *hash_lookup PARAMS ((const Hash_table *, const void *));
|
||||
unsigned hash_get_n_buckets (const Hash_table *);
|
||||
unsigned hash_get_n_buckets_used (const Hash_table *);
|
||||
unsigned hash_get_n_entries (const Hash_table *);
|
||||
unsigned hash_get_max_bucket_length (const Hash_table *);
|
||||
bool hash_table_ok (const Hash_table *);
|
||||
void hash_print_statistics (const Hash_table *, FILE *);
|
||||
void *hash_lookup (const Hash_table *, const void *);
|
||||
|
||||
/* Walking. */
|
||||
void *hash_get_first PARAMS ((const Hash_table *));
|
||||
void *hash_get_next PARAMS ((const Hash_table *, const void *));
|
||||
unsigned hash_get_entries PARAMS ((const Hash_table *, void **, unsigned));
|
||||
unsigned hash_do_for_each PARAMS ((const Hash_table *, Hash_processor, void *));
|
||||
void *hash_get_first (const Hash_table *);
|
||||
void *hash_get_next (const Hash_table *, const void *);
|
||||
unsigned hash_get_entries (const Hash_table *, void **, unsigned);
|
||||
unsigned hash_do_for_each (const Hash_table *, Hash_processor, void *);
|
||||
|
||||
/* Allocation and clean-up. */
|
||||
unsigned hash_string PARAMS ((const char *, unsigned));
|
||||
void hash_reset_tuning PARAMS ((Hash_tuning *));
|
||||
Hash_table *hash_initialize PARAMS ((unsigned, const Hash_tuning *,
|
||||
Hash_hasher, Hash_comparator,
|
||||
Hash_data_freer));
|
||||
void hash_clear PARAMS ((Hash_table *));
|
||||
void hash_free PARAMS ((Hash_table *));
|
||||
unsigned hash_string (const char *, unsigned);
|
||||
void hash_reset_tuning (Hash_tuning *);
|
||||
Hash_table *hash_initialize (unsigned, const Hash_tuning *,
|
||||
Hash_hasher, Hash_comparator,
|
||||
Hash_data_freer);
|
||||
void hash_clear (Hash_table *);
|
||||
void hash_free (Hash_table *);
|
||||
|
||||
/* Insertion and deletion. */
|
||||
bool hash_rehash PARAMS ((Hash_table *, unsigned));
|
||||
void *hash_insert PARAMS ((Hash_table *, const void *));
|
||||
void *hash_delete PARAMS ((Hash_table *, const void *));
|
||||
bool hash_rehash (Hash_table *, unsigned);
|
||||
void *hash_insert (Hash_table *, const void *);
|
||||
void *hash_delete (Hash_table *, const void *);
|
||||
|
||||
#endif
|
||||
|
||||
28
lib/human.c
28
lib/human.c
@@ -1,6 +1,6 @@
|
||||
/* human.c -- print human readable file size
|
||||
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -17,27 +17,14 @@
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Originally contributed by lm@sgi.com;
|
||||
--si, output block size selection, large file support,
|
||||
and grouping added by eggert@twinsun.com. */
|
||||
/* Written by Paul Eggert and Larry McVoy. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
typedef enum {false = 0, true = 1} bool;
|
||||
#endif
|
||||
#include "human.h"
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#else
|
||||
# if HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
@@ -45,8 +32,6 @@ typedef enum {false = 0, true = 1} bool;
|
||||
# define UINTMAX_MAX ((uintmax_t) -1)
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#if HAVE_LOCALE_H && HAVE_LOCALECONV
|
||||
# include <locale.h>
|
||||
#endif
|
||||
@@ -70,17 +55,14 @@ char *getenv ();
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <gettext.h>
|
||||
#define _(text) gettext (text)
|
||||
#include "gettext.h"
|
||||
#define _(msgid) gettext (msgid)
|
||||
|
||||
#include <argmatch.h>
|
||||
#include <error.h>
|
||||
#include <xstrtol.h>
|
||||
|
||||
#include "human.h"
|
||||
|
||||
/* The maximum length of a suffix like "KiB". */
|
||||
#define HUMAN_READABLE_SUFFIX_LENGTH_MAX 3
|
||||
|
||||
|
||||
54
lib/human.h
54
lib/human.h
@@ -1,29 +1,41 @@
|
||||
/* human.h -- print human readable file size
|
||||
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Paul Eggert and Larry McVoy. */
|
||||
|
||||
#ifndef HUMAN_H_
|
||||
# define HUMAN_H_ 1
|
||||
|
||||
/* Before including this file, you need something like the following:
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
# include <limits.h>
|
||||
# include <stdbool.h>
|
||||
|
||||
#if HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
typedef enum {false = 0, true = 1} bool;
|
||||
#endif
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#else
|
||||
# if HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
so that the proper identifiers are all declared. */
|
||||
# if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
# else
|
||||
# if HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* A conservative bound on the maximum length of a human-readable string.
|
||||
The output can be the square of the largest uintmax_t, so double
|
||||
|
||||
@@ -77,7 +77,7 @@ getuser (uid_t uid)
|
||||
return tail->name;
|
||||
|
||||
pwent = getpwuid (uid);
|
||||
tail = (struct userid *) xmalloc (sizeof (struct userid));
|
||||
tail = xmalloc (sizeof (struct userid));
|
||||
tail->id.u = uid;
|
||||
tail->name = pwent ? xstrdup (pwent->pw_name) : NULL;
|
||||
|
||||
@@ -119,7 +119,7 @@ getuidbyname (const char *user)
|
||||
}
|
||||
#endif
|
||||
|
||||
tail = (struct userid *) xmalloc (sizeof (struct userid));
|
||||
tail = xmalloc (sizeof (struct userid));
|
||||
tail->name = xstrdup (user);
|
||||
|
||||
/* Add to the head of the list, so most recently used is first. */
|
||||
@@ -153,7 +153,7 @@ getgroup (gid_t gid)
|
||||
return tail->name;
|
||||
|
||||
grent = getgrgid (gid);
|
||||
tail = (struct userid *) xmalloc (sizeof (struct userid));
|
||||
tail = xmalloc (sizeof (struct userid));
|
||||
tail->id.g = gid;
|
||||
tail->name = grent ? xstrdup (grent->gr_name) : NULL;
|
||||
|
||||
@@ -195,7 +195,7 @@ getgidbyname (const char *group)
|
||||
}
|
||||
#endif
|
||||
|
||||
tail = (struct userid *) xmalloc (sizeof (struct userid));
|
||||
tail = xmalloc (sizeof (struct userid));
|
||||
tail->name = xstrdup (group);
|
||||
|
||||
/* Add to the head of the list, so most recently used is first. */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* inttostr.h -- convert integers to printable strings
|
||||
|
||||
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001, 2002, 2003 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,14 +44,6 @@
|
||||
|
||||
#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || defined __STDC__
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
char *offtostr PARAMS ((off_t, char *));
|
||||
char *imaxtostr PARAMS ((intmax_t, char *));
|
||||
char *umaxtostr PARAMS ((uintmax_t, char *));
|
||||
char *offtostr (off_t, char *);
|
||||
char *imaxtostr (intmax_t, char *);
|
||||
char *umaxtostr (uintmax_t, char *);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* linebuffer.c -- read arbitrarily long lines
|
||||
Copyright (C) 1986, 1991, 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1986, 1991, 1998, 1999, 2001, 2003 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -47,7 +49,7 @@ initbuffer (struct linebuffer *linebuffer)
|
||||
Return NULL upon error, or when STREAM is empty.
|
||||
Otherwise, return LINEBUFFER. */
|
||||
struct linebuffer *
|
||||
readline (struct linebuffer *linebuffer, FILE *stream)
|
||||
readlinebuffer (struct linebuffer *linebuffer, FILE *stream)
|
||||
{
|
||||
int c;
|
||||
char *buffer = linebuffer->buffer;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* linebuffer.h -- declarations for reading arbitrarily long lines
|
||||
Copyright (C) 1986, 1991, 1998, 1999 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1986, 1991, 1998, 1999, 2002, 2003 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -18,6 +20,8 @@
|
||||
#if !defined LINEBUFFER_H
|
||||
# define LINEBUFFER_H
|
||||
|
||||
# include <stdio.h>
|
||||
|
||||
/* A `struct linebuffer' holds a line of text. */
|
||||
|
||||
struct linebuffer
|
||||
@@ -27,25 +31,16 @@ struct linebuffer
|
||||
char *buffer;
|
||||
};
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Initialize linebuffer LINEBUFFER for use. */
|
||||
void initbuffer PARAMS ((struct linebuffer *linebuffer));
|
||||
void initbuffer (struct linebuffer *linebuffer);
|
||||
|
||||
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
|
||||
Keep the newline; append a newline if it's the last line of a file
|
||||
that ends in a non-newline character. Do not null terminate.
|
||||
Return LINEBUFFER, except at end of file return 0. */
|
||||
struct linebuffer *readline PARAMS ((struct linebuffer *linebuffer,
|
||||
FILE *stream));
|
||||
struct linebuffer *readlinebuffer (struct linebuffer *linebuffer, FILE *stream);
|
||||
|
||||
/* Free linebuffer LINEBUFFER and its data, all allocated with malloc. */
|
||||
void freebuffer PARAMS ((struct linebuffer *));
|
||||
void freebuffer (struct linebuffer *);
|
||||
|
||||
#endif /* LINEBUFFER_H */
|
||||
|
||||
@@ -17,19 +17,10 @@
|
||||
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
void
|
||||
parse_long_options PARAMS ((int _argc,
|
||||
char **_argv,
|
||||
const char *_command_name,
|
||||
const char *_package,
|
||||
const char *_version,
|
||||
const char *_authors,
|
||||
void (*_usage) (int)));
|
||||
void parse_long_options (int _argc,
|
||||
char **_argv,
|
||||
const char *_command_name,
|
||||
const char *_package,
|
||||
const char *_version,
|
||||
const char *_authors,
|
||||
void (*_usage) (int));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* makepath.c -- Ensure that a directory path exists.
|
||||
Copyright (C) 1990, 1997, 1998, 1999, 2000, 2002, 2003 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Copyright (C) 1990, 1997, 1998, 1999, 2000, 2002, 2003 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
|
||||
@@ -22,19 +23,7 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
#else
|
||||
# if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
# pragma alloca
|
||||
# else
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#include <alloca.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
@@ -99,7 +88,6 @@ extern int errno;
|
||||
|
||||
#define WX_USR (S_IWUSR | S_IXUSR)
|
||||
|
||||
/* Include this before libintl.h so we get our definition of PARAMS. */
|
||||
#include "makepath.h"
|
||||
|
||||
#include "gettext.h"
|
||||
@@ -404,7 +392,7 @@ make_path (const char *argpath,
|
||||
*(p->dirname_end) = '\0';
|
||||
if (chmod (dirpath, parent_mode))
|
||||
{
|
||||
error (0, errno, "cannot change permissions of %s",
|
||||
error (0, errno, _("cannot change permissions of %s"),
|
||||
quote (dirpath));
|
||||
retval = 1;
|
||||
}
|
||||
|
||||
@@ -1,22 +1,12 @@
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
int make_path (const char *_argpath,
|
||||
int _mode,
|
||||
int _parent_mode,
|
||||
uid_t _owner,
|
||||
gid_t _group,
|
||||
int _preserve_existing,
|
||||
const char *_verbose_fmt_string);
|
||||
|
||||
int
|
||||
make_path PARAMS ((const char *_argpath,
|
||||
int _mode,
|
||||
int _parent_mode,
|
||||
uid_t _owner,
|
||||
gid_t _group,
|
||||
int _preserve_existing,
|
||||
const char *_verbose_fmt_string));
|
||||
|
||||
int
|
||||
make_dir PARAMS ((const char *dir,
|
||||
const char *dirpath,
|
||||
mode_t mode,
|
||||
int *created_dir_p));
|
||||
int make_dir (const char *dir,
|
||||
const char *dirpath,
|
||||
mode_t mode,
|
||||
int *created_dir_p);
|
||||
|
||||
12
lib/md5.c
12
lib/md5.c
@@ -26,14 +26,8 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if STDC_HEADERS || defined _LIBC
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#else
|
||||
# ifndef HAVE_MEMCPY
|
||||
# define memcpy(d, s, n) bcopy ((s), (d), (n))
|
||||
# endif
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "md5.h"
|
||||
#include "unlocked-io.h"
|
||||
@@ -396,7 +390,7 @@ md5_process_block (buffer, len, ctx)
|
||||
argument specifying the function to use. */
|
||||
#undef OP
|
||||
#define OP(f, a, b, c, d, k, s, T) \
|
||||
do \
|
||||
do \
|
||||
{ \
|
||||
a += f (b, c, d) + correct_words[k] + T; \
|
||||
a = rol (a, s); \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Case-insensitive buffer comparator.
|
||||
Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 2000, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -21,7 +21,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
|
||||
int
|
||||
memcasecmp PARAMS ((const void *vs1, const void *vs2, size_t n));
|
||||
int memcasecmp (const void *vs1, const void *vs2, size_t n);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Locale-specific memory comparison.
|
||||
Copyright 1999, 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -21,26 +21,29 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "memcoll.h"
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
/* Compare S1 (with length S1LEN) and S2 (with length S2LEN) according
|
||||
to the LC_COLLATE locale. S1 and S2 do not overlap, and are not
|
||||
adjacent. Temporarily modify the bytes after S1 and S2, but
|
||||
restore their original contents before returning. Set errno to an
|
||||
adjacent. Perhaps temporarily modify the bytes after S1 and S2,
|
||||
but restore their original contents before returning. Set errno to an
|
||||
error number if there is an error, and to zero otherwise. */
|
||||
int
|
||||
memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
|
||||
{
|
||||
int diff;
|
||||
|
||||
#if HAVE_STRCOLL
|
||||
|
||||
char n1 = s1[s1len];
|
||||
char n2 = s2[s2len];
|
||||
|
||||
@@ -75,5 +78,13 @@ memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
|
||||
s1[s1len - 1] = n1;
|
||||
s2[s2len - 1] = n2;
|
||||
|
||||
#else
|
||||
|
||||
diff = memcmp (s1, s2, s1len < s2len ? s1len : s2len);
|
||||
if (! diff)
|
||||
diff = s1len < s2len ? -1 : s1len != s2len;
|
||||
|
||||
#endif
|
||||
|
||||
return diff;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,8 @@
|
||||
#ifndef MEMCOLL_H_
|
||||
# define MEMCOLL_H_ 1
|
||||
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
# include <stddef.h>
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
int memcoll PARAMS ((char *, size_t, char *, size_t));
|
||||
int memcoll (char *, size_t, char *, size_t);
|
||||
|
||||
#endif /* MEMCOLL_H_ */
|
||||
|
||||
@@ -6,20 +6,19 @@
|
||||
adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
|
||||
and implemented by Roland McGrath (roland@ai.mit.edu).
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
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 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. */
|
||||
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>
|
||||
|
||||
460
lib/mktime.c
460
lib/mktime.c
@@ -1,22 +1,21 @@
|
||||
/* Convert a `struct tm' to a time_t value.
|
||||
Copyright (C) 1993-1999, 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993-1999, 2002, 2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Paul Eggert (eggert@twinsun.com).
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, 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.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
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 Lesser General Public
|
||||
License along with the GNU C Library; 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. */
|
||||
|
||||
/* Define this to have a standalone program to test this implementation of
|
||||
mktime. */
|
||||
@@ -27,7 +26,6 @@
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# define HAVE_LIMITS_H 1
|
||||
# define STDC_HEADERS 1
|
||||
#endif
|
||||
|
||||
@@ -41,9 +39,7 @@
|
||||
#include <sys/types.h> /* Some systems define `time_t' here. */
|
||||
#include <time.h>
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
|
||||
#if DEBUG
|
||||
# include <stdio.h>
|
||||
@@ -55,18 +51,6 @@
|
||||
# define mktime my_mktime
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef __P
|
||||
# if defined __GNUC__ || (defined __STDC__ && __STDC__)
|
||||
# define __P(args) args
|
||||
# else
|
||||
# define __P(args) ()
|
||||
# endif /* GCC. */
|
||||
#endif /* Not __P. */
|
||||
|
||||
#ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
#endif
|
||||
|
||||
/* The extra casts work around common compiler bugs. */
|
||||
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
|
||||
/* The outer cast is needed to work around a bug in Cray C 5.0.3.0.
|
||||
@@ -75,29 +59,39 @@
|
||||
? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0))
|
||||
#define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t)))
|
||||
|
||||
#ifndef INT_MIN
|
||||
# define INT_MIN TYPE_MINIMUM (int)
|
||||
#endif
|
||||
#ifndef INT_MAX
|
||||
# define INT_MAX TYPE_MAXIMUM (int)
|
||||
#endif
|
||||
|
||||
#ifndef TIME_T_MIN
|
||||
# define TIME_T_MIN TYPE_MINIMUM (time_t)
|
||||
#endif
|
||||
#ifndef TIME_T_MAX
|
||||
# define TIME_T_MAX TYPE_MAXIMUM (time_t)
|
||||
#endif
|
||||
#define TIME_T_MIDPOINT (((TIME_T_MIN + TIME_T_MAX) >> 1) + 1)
|
||||
|
||||
/* Verify a requirement at compile-time (unlike assert, which is runtime). */
|
||||
#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
|
||||
|
||||
verify (time_t_is_integer, (time_t) 0.5 == 0);
|
||||
verify (twos_complement_arithmetic, -1 == ~1 + 1);
|
||||
verify (right_shift_propagates_sign, -1 >> 1 == -1);
|
||||
/* The code also assumes that signed integer overflow silently wraps
|
||||
around, but this assumption can't be stated without causing a
|
||||
diagnostic on some hosts. */
|
||||
|
||||
#define TM_YEAR_BASE 1900
|
||||
#define EPOCH_YEAR 1970
|
||||
#define TM_YEAR_BASE 1900
|
||||
verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0);
|
||||
|
||||
#ifndef __isleap
|
||||
/* Nonzero if YEAR is a leap year (every 4 years,
|
||||
except every 100th isn't, and every 400th is). */
|
||||
# define __isleap(year) \
|
||||
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
|
||||
#endif
|
||||
/* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */
|
||||
static inline int
|
||||
leapyear (int year)
|
||||
{
|
||||
/* Don't add YEAR to TM_YEAR_BASE, as that might overflow.
|
||||
Also, work even if YEAR is negative. */
|
||||
return
|
||||
((year & 3) == 0
|
||||
&& (year % 100 != 0
|
||||
|| ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3)));
|
||||
}
|
||||
|
||||
/* How many days come before each month (0-12). */
|
||||
#ifndef _LIBC
|
||||
@@ -129,40 +123,74 @@ my_mktime_localtime_r (const time_t *t, struct tm *tp)
|
||||
}
|
||||
#endif /* ! _LIBC */
|
||||
|
||||
/* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) -
|
||||
(YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks
|
||||
were not adjusted between the time stamps.
|
||||
|
||||
/* Yield the difference between (YEAR-YDAY HOUR:MIN:SEC) and (*TP),
|
||||
measured in seconds, ignoring leap seconds.
|
||||
YEAR uses the same numbering as TM->tm_year.
|
||||
All values are in range, except possibly YEAR.
|
||||
If TP is null, return a nonzero value.
|
||||
If overflow occurs, yield the low order bits of the correct answer. */
|
||||
static time_t
|
||||
ydhms_tm_diff (int year, int yday, int hour, int min, int sec,
|
||||
const struct tm *tp)
|
||||
The YEAR values uses the same numbering as TP->tm_year. Values
|
||||
need not be in the usual range. However, YEAR1 must not be less
|
||||
than 2 * INT_MIN or greater than 2 * INT_MAX.
|
||||
|
||||
The result may overflow. It is the caller's responsibility to
|
||||
detect overflow. */
|
||||
|
||||
static inline time_t
|
||||
ydhms_diff (long int year1, long int yday1, int hour1, int min1, int sec1,
|
||||
int year0, int yday0, int hour0, int min0, int sec0)
|
||||
{
|
||||
if (!tp)
|
||||
return 1;
|
||||
else
|
||||
verify (C99_integer_division, -1 / 2 == 0);
|
||||
verify (long_int_year_and_yday_are_wide_enough,
|
||||
INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
|
||||
|
||||
/* Compute intervening leap days correctly even if year is negative.
|
||||
Take care to avoid integer overflow here. */
|
||||
int a4 = (year1 >> 2) + (TM_YEAR_BASE >> 2) - ! (year1 & 3);
|
||||
int b4 = (year0 >> 2) + (TM_YEAR_BASE >> 2) - ! (year0 & 3);
|
||||
int a100 = a4 / 25 - (a4 % 25 < 0);
|
||||
int b100 = b4 / 25 - (b4 % 25 < 0);
|
||||
int a400 = a100 >> 2;
|
||||
int b400 = b100 >> 2;
|
||||
int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
|
||||
|
||||
/* Compute the desired time in time_t precision. Overflow might
|
||||
occur here. */
|
||||
time_t tyear1 = year1;
|
||||
time_t years = tyear1 - year0;
|
||||
time_t days = 365 * years + yday1 - yday0 + intervening_leap_days;
|
||||
time_t hours = 24 * days + hour1 - hour0;
|
||||
time_t minutes = 60 * hours + min1 - min0;
|
||||
time_t seconds = 60 * minutes + sec1 - sec0;
|
||||
return seconds;
|
||||
}
|
||||
|
||||
|
||||
/* Return a time_t value corresponding to (YEAR-YDAY HOUR:MIN:SEC),
|
||||
assuming that *T corresponds to *TP and that no clock adjustments
|
||||
occurred between *TP and the desired time.
|
||||
If TP is null, return a value not equal to *T; this avoids false matches.
|
||||
If overflow occurs, yield the minimal or maximal value, except do not
|
||||
yield a value equal to *T. */
|
||||
static time_t
|
||||
guess_time_tm (long int year, long int yday, int hour, int min, int sec,
|
||||
const time_t *t, const struct tm *tp)
|
||||
{
|
||||
if (tp)
|
||||
{
|
||||
/* Compute intervening leap days correctly even if year is negative.
|
||||
Take care to avoid int overflow. time_t overflow is OK, since
|
||||
only the low order bits of the correct time_t answer are needed.
|
||||
Don't convert to time_t until after all divisions are done, since
|
||||
time_t might be unsigned. */
|
||||
int a4 = (year >> 2) + (TM_YEAR_BASE >> 2) - ! (year & 3);
|
||||
int b4 = (tp->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (tp->tm_year & 3);
|
||||
int a100 = a4 / 25 - (a4 % 25 < 0);
|
||||
int b100 = b4 / 25 - (b4 % 25 < 0);
|
||||
int a400 = a100 >> 2;
|
||||
int b400 = b100 >> 2;
|
||||
int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
|
||||
time_t years = year - (time_t) tp->tm_year;
|
||||
time_t days = (365 * years + intervening_leap_days
|
||||
+ (yday - tp->tm_yday));
|
||||
return (60 * (60 * (24 * days + (hour - tp->tm_hour))
|
||||
+ (min - tp->tm_min))
|
||||
+ (sec - tp->tm_sec));
|
||||
time_t d = ydhms_diff (year, yday, hour, min, sec,
|
||||
tp->tm_year, tp->tm_yday,
|
||||
tp->tm_hour, tp->tm_min, tp->tm_sec);
|
||||
time_t t1 = *t + d;
|
||||
if ((t1 < *t) == (TYPE_SIGNED (time_t) ? d < 0 : TIME_T_MAX / 2 < d))
|
||||
return t1;
|
||||
}
|
||||
|
||||
/* Overflow occurred one way or another. Return the nearest result
|
||||
that is actually in range, except don't report a zero difference
|
||||
if the actual difference is nonzero, as that would cause a false
|
||||
match. */
|
||||
return (*t < TIME_T_MIDPOINT
|
||||
? TIME_T_MIN + (*t == TIME_T_MIN)
|
||||
: TIME_T_MAX - (*t == TIME_T_MAX));
|
||||
}
|
||||
|
||||
/* Use CONVERT to convert *T to a broken down time in *TP.
|
||||
@@ -224,7 +252,7 @@ __mktime_internal (struct tm *tp,
|
||||
struct tm *(*convert) (const time_t *, struct tm *),
|
||||
time_t *offset)
|
||||
{
|
||||
time_t t, dt, t0, t1, t2;
|
||||
time_t t, gt, t0, t1, t2;
|
||||
struct tm tm;
|
||||
|
||||
/* The maximum number of probes (calls to CONVERT) should be enough
|
||||
@@ -250,7 +278,8 @@ __mktime_internal (struct tm *tp,
|
||||
int mon_remainder = mon % 12;
|
||||
int negative_mon_remainder = mon_remainder < 0;
|
||||
int mon_years = mon / 12 - negative_mon_remainder;
|
||||
int year = year_requested + mon_years;
|
||||
long int lyear_requested = year_requested;
|
||||
long int year = lyear_requested + mon_years;
|
||||
|
||||
/* The other values need not be in range:
|
||||
the remaining code handles minor overflows correctly,
|
||||
@@ -259,38 +288,95 @@ __mktime_internal (struct tm *tp,
|
||||
|
||||
/* Calculate day of year from year, month, and day of month.
|
||||
The result need not be in range. */
|
||||
int yday = ((__mon_yday[__isleap (year + TM_YEAR_BASE)]
|
||||
[mon_remainder + 12 * negative_mon_remainder])
|
||||
+ mday - 1);
|
||||
int mon_yday = ((__mon_yday[leapyear (year)]
|
||||
[mon_remainder + 12 * negative_mon_remainder])
|
||||
- 1);
|
||||
long int lmday = mday;
|
||||
long int yday = mon_yday + lmday;
|
||||
|
||||
time_t guessed_offset = *offset;
|
||||
|
||||
int sec_requested = sec;
|
||||
|
||||
/* Only years after 1970 are defined.
|
||||
If year is 69, it might still be representable due to
|
||||
timezone differences. */
|
||||
if (year < 69)
|
||||
return -1;
|
||||
if (LEAP_SECONDS_POSSIBLE)
|
||||
{
|
||||
/* Handle out-of-range seconds specially,
|
||||
since ydhms_tm_diff assumes every minute has 60 seconds. */
|
||||
if (sec < 0)
|
||||
sec = 0;
|
||||
if (59 < sec)
|
||||
sec = 59;
|
||||
}
|
||||
|
||||
#if LEAP_SECONDS_POSSIBLE
|
||||
/* Handle out-of-range seconds specially,
|
||||
since ydhms_tm_diff assumes every minute has 60 seconds. */
|
||||
if (sec < 0)
|
||||
sec = 0;
|
||||
if (59 < sec)
|
||||
sec = 59;
|
||||
#endif
|
||||
/* Invert CONVERT by probing. First assume the same offset as last
|
||||
time. */
|
||||
|
||||
/* Invert CONVERT by probing. First assume the same offset as last time.
|
||||
Then repeatedly use the error to improve the guess. */
|
||||
t0 = ydhms_diff (year, yday, hour, min, sec,
|
||||
EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset);
|
||||
|
||||
tm.tm_year = EPOCH_YEAR - TM_YEAR_BASE;
|
||||
tm.tm_yday = tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
|
||||
t0 = ydhms_tm_diff (year, yday, hour, min, sec, &tm);
|
||||
if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3)
|
||||
{
|
||||
/* time_t isn't large enough to rule out overflows, so check
|
||||
for major overflows. A gross check suffices, since if t0
|
||||
has overflowed, it is off by a multiple of TIME_T_MAX -
|
||||
TIME_T_MIN + 1. So ignore any component of the difference
|
||||
that is bounded by a small value. */
|
||||
|
||||
for (t = t1 = t2 = t0 + *offset, dst2 = 0;
|
||||
(dt = ydhms_tm_diff (year, yday, hour, min, sec,
|
||||
ranged_convert (convert, &t, &tm)));
|
||||
t1 = t2, t2 = t, t += dt, dst2 = tm.tm_isdst != 0)
|
||||
/* Approximate log base 2 of the number of time units per
|
||||
biennium. A biennium is 2 years; use this unit instead of
|
||||
years to avoid integer overflow. For example, 2 average
|
||||
Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds,
|
||||
which is 63113904 seconds, and rint (log2 (63113904)) is
|
||||
26. */
|
||||
int ALOG2_SECONDS_PER_BIENNIUM = 26;
|
||||
int ALOG2_MINUTES_PER_BIENNIUM = 20;
|
||||
int ALOG2_HOURS_PER_BIENNIUM = 14;
|
||||
int ALOG2_DAYS_PER_BIENNIUM = 10;
|
||||
int LOG2_YEARS_PER_BIENNIUM = 1;
|
||||
|
||||
int approx_requested_biennia =
|
||||
((year_requested >> LOG2_YEARS_PER_BIENNIUM)
|
||||
- ((EPOCH_YEAR - TM_YEAR_BASE) >> LOG2_YEARS_PER_BIENNIUM)
|
||||
+ (mday >> ALOG2_DAYS_PER_BIENNIUM)
|
||||
+ (hour >> ALOG2_HOURS_PER_BIENNIUM)
|
||||
+ (min >> ALOG2_MINUTES_PER_BIENNIUM)
|
||||
+ (LEAP_SECONDS_POSSIBLE ? 0 : sec >> ALOG2_SECONDS_PER_BIENNIUM));
|
||||
|
||||
int approx_biennia = t0 >> ALOG2_SECONDS_PER_BIENNIUM;
|
||||
int diff = approx_biennia - approx_requested_biennia;
|
||||
int abs_diff = diff < 0 ? - diff : diff;
|
||||
|
||||
/* IRIX 4.0.5 cc miscaculates TIME_T_MIN / 3: it erroneously
|
||||
gives a positive value of 715827882. Setting a variable
|
||||
first then doing math on it seems to work.
|
||||
(ghazi@caip.rutgers.edu) */
|
||||
time_t time_t_max = TIME_T_MAX;
|
||||
time_t time_t_min = TIME_T_MIN;
|
||||
time_t overflow_threshold =
|
||||
(time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM;
|
||||
|
||||
if (overflow_threshold < abs_diff)
|
||||
{
|
||||
/* Overflow occurred. Try repairing it; this might work if
|
||||
the time zone offset is enough to undo the overflow. */
|
||||
time_t repaired_t0 = -1 - t0;
|
||||
approx_biennia = repaired_t0 >> ALOG2_SECONDS_PER_BIENNIUM;
|
||||
diff = approx_biennia - approx_requested_biennia;
|
||||
abs_diff = diff < 0 ? - diff : diff;
|
||||
if (overflow_threshold < abs_diff)
|
||||
return -1;
|
||||
guessed_offset += repaired_t0 - t0;
|
||||
t0 = repaired_t0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Repeatedly use the error to improve the guess. */
|
||||
|
||||
for (t = t1 = t2 = t0, dst2 = 0;
|
||||
(gt = guess_time_tm (year, yday, hour, min, sec, &t,
|
||||
ranged_convert (convert, &t, &tm)),
|
||||
t != gt);
|
||||
t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0)
|
||||
if (t == t1 && t != t2
|
||||
&& (tm.tm_isdst < 0
|
||||
|| (isdst < 0
|
||||
@@ -298,91 +384,83 @@ __mktime_internal (struct tm *tp,
|
||||
: (isdst != 0) != (tm.tm_isdst != 0))))
|
||||
/* We can't possibly find a match, as we are oscillating
|
||||
between two values. The requested time probably falls
|
||||
within a spring-forward gap of size DT. Follow the common
|
||||
practice in this case, which is to return a time that is DT
|
||||
within a spring-forward gap of size GT - T. Follow the common
|
||||
practice in this case, which is to return a time that is GT - T
|
||||
away from the requested time, preferring a time whose
|
||||
tm_isdst differs from the requested value. (If no tm_isdst
|
||||
was requested and only one of the two values has a nonzero
|
||||
tm_isdst, prefer that value.) In practice, this is more
|
||||
useful than returning -1. */
|
||||
break;
|
||||
goto offset_found;
|
||||
else if (--remaining_probes == 0)
|
||||
return -1;
|
||||
|
||||
/* If we have a match, check whether tm.tm_isdst has the requested
|
||||
/* We have a match. Check whether tm.tm_isdst has the requested
|
||||
value, if any. */
|
||||
if (dt == 0 && isdst != tm.tm_isdst && 0 <= isdst && 0 <= tm.tm_isdst)
|
||||
if (isdst != tm.tm_isdst && 0 <= isdst && 0 <= tm.tm_isdst)
|
||||
{
|
||||
/* tm.tm_isdst has the wrong value. Look for a neighboring
|
||||
time with the right value, and use its UTC offset.
|
||||
Heuristic: probe the previous three calendar quarters (approximately),
|
||||
looking for the desired isdst. This isn't perfect,
|
||||
but it's good enough in practice. */
|
||||
int quarter = 7889238; /* seconds per average 1/4 Gregorian year */
|
||||
int i;
|
||||
|
||||
/* If we're too close to the time_t limit, look in future quarters. */
|
||||
if (t < TIME_T_MIN + 3 * quarter)
|
||||
quarter = -quarter;
|
||||
Heuristic: probe the adjacent timestamps in both directions,
|
||||
looking for the desired isdst. This should work for all real
|
||||
time zone histories in the tz database. */
|
||||
|
||||
for (i = 1; i <= 3; i++)
|
||||
{
|
||||
time_t ot = t - i * quarter;
|
||||
struct tm otm;
|
||||
ranged_convert (convert, &ot, &otm);
|
||||
if (otm.tm_isdst == isdst)
|
||||
{
|
||||
/* We found the desired tm_isdst.
|
||||
Extrapolate back to the desired time. */
|
||||
t = ot + ydhms_tm_diff (year, yday, hour, min, sec, &otm);
|
||||
ranged_convert (convert, &t, &tm);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Distance between probes when looking for a DST boundary. In
|
||||
tzdata2003a, the shortest period of DST is 601200 seconds
|
||||
(e.g., America/Recife starting 2000-10-08 01:00), and the
|
||||
shortest period of non-DST surrounded by DST is 694800
|
||||
seconds (Africa/Tunis starting 1943-04-17 01:00). Use the
|
||||
minimum of these two values, so we don't miss these short
|
||||
periods when probing. */
|
||||
int stride = 601200;
|
||||
|
||||
/* The longest period of DST in tzdata2003a is 536454000 seconds
|
||||
(e.g., America/Jujuy starting 1946-10-01 01:00). The longest
|
||||
period of non-DST is much longer, but it makes no real sense
|
||||
to search for more than a year of non-DST, so use the DST
|
||||
max. */
|
||||
int duration_max = 536454000;
|
||||
|
||||
/* Search in both directions, so the maximum distance is half
|
||||
the duration; add the stride to avoid off-by-1 problems. */
|
||||
int delta_bound = duration_max / 2 + stride;
|
||||
|
||||
int delta, direction;
|
||||
|
||||
for (delta = stride; delta < delta_bound; delta += stride)
|
||||
for (direction = -1; direction <= 1; direction += 2)
|
||||
{
|
||||
time_t ot = t + delta * direction;
|
||||
if ((ot < t) == (direction < 0))
|
||||
{
|
||||
struct tm otm;
|
||||
ranged_convert (convert, &ot, &otm);
|
||||
if (otm.tm_isdst == isdst)
|
||||
{
|
||||
/* We found the desired tm_isdst.
|
||||
Extrapolate back to the desired time. */
|
||||
t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm);
|
||||
ranged_convert (convert, &t, &tm);
|
||||
goto offset_found;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*offset = t - t0;
|
||||
offset_found:
|
||||
*offset = guessed_offset + t - t0;
|
||||
|
||||
#if LEAP_SECONDS_POSSIBLE
|
||||
if (sec_requested != tm.tm_sec)
|
||||
if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec)
|
||||
{
|
||||
/* Adjust time to reflect the tm_sec requested, not the normalized value.
|
||||
Also, repair any damage from a false match due to a leap second. */
|
||||
t += sec_requested - sec + (sec == 0 && tm.tm_sec == 60);
|
||||
if (! (*convert) (&t, &tm))
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3)
|
||||
{
|
||||
/* time_t isn't large enough to rule out overflows in ydhms_tm_diff,
|
||||
so check for major overflows. A gross check suffices,
|
||||
since if t has overflowed, it is off by a multiple of
|
||||
TIME_T_MAX - TIME_T_MIN + 1. So ignore any component of
|
||||
the difference that is bounded by a small value. */
|
||||
|
||||
double dyear = (double) year_requested + mon_years - tm.tm_year;
|
||||
double dday = 366 * dyear + mday;
|
||||
double dsec = 60 * (60 * (24 * dday + hour) + min) + sec_requested;
|
||||
|
||||
/* On Irix4.0.5 cc, dividing TIME_T_MIN by 3 does not produce
|
||||
correct results, ie., it erroneously gives a positive value
|
||||
of 715827882. Setting a variable first then doing math on it
|
||||
seems to work. (ghazi@caip.rutgers.edu) */
|
||||
|
||||
const time_t time_t_max = TIME_T_MAX;
|
||||
const time_t time_t_min = TIME_T_MIN;
|
||||
|
||||
if (time_t_max / 3 - time_t_min / 3 < (dsec < 0 ? - dsec : dsec))
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (year == 69)
|
||||
{
|
||||
/* If year was 69, need to check whether the time was representable
|
||||
or not. */
|
||||
if (t < 0 || t > 2 * 24 * 60 * 60)
|
||||
int sec_adjustment = (sec == 0 && tm.tm_sec == 60) - sec;
|
||||
t1 = t + sec_requested;
|
||||
t2 = t1 + sec_adjustment;
|
||||
if (((t1 < t) != (sec_requested < 0))
|
||||
| ((t2 < t1) != (sec_adjustment < 0))
|
||||
| ! (*convert) (&t, &tm))
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -391,12 +469,15 @@ __mktime_internal (struct tm *tp,
|
||||
}
|
||||
|
||||
|
||||
/* FIXME: This should use a signed type wide enough to hold any UTC
|
||||
offset in seconds. 'int' should be good enough for GNU code. We
|
||||
can't fix this unilaterally though, as other modules invoke
|
||||
__mktime_internal. */
|
||||
static time_t localtime_offset;
|
||||
|
||||
/* Convert *TP to a time_t value. */
|
||||
time_t
|
||||
mktime (tp)
|
||||
struct tm *tp;
|
||||
mktime (struct tm *tp)
|
||||
{
|
||||
#ifdef _LIBC
|
||||
/* POSIX.1 8.1.1 requires that whenever mktime() is called, the
|
||||
@@ -420,9 +501,7 @@ libc_hidden_weak (timelocal)
|
||||
#if DEBUG
|
||||
|
||||
static int
|
||||
not_equal_tm (a, b)
|
||||
struct tm *a;
|
||||
struct tm *b;
|
||||
not_equal_tm (const struct tm *a, const struct tm *b)
|
||||
{
|
||||
return ((a->tm_sec ^ b->tm_sec)
|
||||
| (a->tm_min ^ b->tm_min)
|
||||
@@ -436,8 +515,7 @@ not_equal_tm (a, b)
|
||||
}
|
||||
|
||||
static void
|
||||
print_tm (tp)
|
||||
struct tm *tp;
|
||||
print_tm (const struct tm *tp)
|
||||
{
|
||||
if (tp)
|
||||
printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d",
|
||||
@@ -449,19 +527,15 @@ print_tm (tp)
|
||||
}
|
||||
|
||||
static int
|
||||
check_result (tk, tmk, tl, lt)
|
||||
time_t tk;
|
||||
struct tm tmk;
|
||||
time_t tl;
|
||||
struct tm *lt;
|
||||
check_result (time_t tk, struct tm tmk, time_t tl, const struct tm *lt)
|
||||
{
|
||||
if (tk != tl || !lt || not_equal_tm (&tmk, lt))
|
||||
{
|
||||
printf ("mktime (");
|
||||
print_tm (&tmk);
|
||||
printf (")\nyields (");
|
||||
print_tm (lt);
|
||||
printf (") == %ld, should be %ld\n", (long) tl, (long) tk);
|
||||
printf (")\nyields (");
|
||||
print_tm (&tmk);
|
||||
printf (") == %ld, should be %ld\n", (long int) tk, (long int) tl);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -469,14 +543,12 @@ check_result (tk, tmk, tl, lt)
|
||||
}
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int status = 0;
|
||||
struct tm tm, tmk, tml;
|
||||
struct tm *lt;
|
||||
time_t tk, tl;
|
||||
time_t tk, tl, tl1;
|
||||
char trailer;
|
||||
|
||||
if ((argc == 3 || argc == 4)
|
||||
@@ -498,7 +570,7 @@ main (argc, argv)
|
||||
tml = *lt;
|
||||
lt = &tml;
|
||||
}
|
||||
printf ("mktime returns %ld == ", (long) tl);
|
||||
printf ("mktime returns %ld == ", (long int) tl);
|
||||
print_tm (&tmk);
|
||||
printf ("\n");
|
||||
status = check_result (tl, tmk, tl, lt);
|
||||
@@ -510,23 +582,26 @@ main (argc, argv)
|
||||
time_t to = atol (argv[3]);
|
||||
|
||||
if (argc == 4)
|
||||
for (tl = from; tl <= to; tl += by)
|
||||
for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
|
||||
{
|
||||
lt = localtime (&tl);
|
||||
if (lt)
|
||||
{
|
||||
tmk = tml = *lt;
|
||||
tk = mktime (&tmk);
|
||||
status |= check_result (tk, tmk, tl, tml);
|
||||
status |= check_result (tk, tmk, tl, &tml);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("localtime (%ld) yields 0\n", (long) tl);
|
||||
printf ("localtime (%ld) yields 0\n", (long int) tl);
|
||||
status = 1;
|
||||
}
|
||||
tl1 = tl + by;
|
||||
if ((tl1 < tl) != (by < 0))
|
||||
break;
|
||||
}
|
||||
else
|
||||
for (tl = from; tl <= to; tl += by)
|
||||
for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
|
||||
{
|
||||
/* Null benchmark. */
|
||||
lt = localtime (&tl);
|
||||
@@ -534,13 +609,16 @@ main (argc, argv)
|
||||
{
|
||||
tmk = tml = *lt;
|
||||
tk = tl;
|
||||
status |= check_result (tk, tmk, tl, tml);
|
||||
status |= check_result (tk, tmk, tl, &tml);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("localtime (%ld) yields 0\n", (long) tl);
|
||||
printf ("localtime (%ld) yields 0\n", (long int) tl);
|
||||
status = 1;
|
||||
}
|
||||
tl1 = tl + by;
|
||||
if ((tl1 < tl) != (by < 0))
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -557,6 +635,6 @@ main (argc, argv)
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
compile-command: "gcc -DDEBUG -DHAVE_LIMITS_H -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime"
|
||||
compile-command: "gcc -DDEBUG -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime"
|
||||
End:
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* modechange.c -- file mode manipulation
|
||||
Copyright (C) 1989, 1990, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1989, 1990, 1997, 1998, 1999, 2001, 2003 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 +33,7 @@
|
||||
#include "modechange.h"
|
||||
#include <sys/stat.h>
|
||||
#include "xstrtol.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
@@ -38,10 +41,6 @@
|
||||
char *malloc ();
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
# define NULL 0
|
||||
#endif
|
||||
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
|
||||
@@ -20,10 +20,6 @@
|
||||
#if ! defined MODECHANGE_H_
|
||||
# define MODECHANGE_H_
|
||||
|
||||
# if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# endif
|
||||
|
||||
# include <sys/types.h>
|
||||
|
||||
/* Affect the execute bits only if at least one execute bit is set already,
|
||||
@@ -55,17 +51,9 @@ struct mode_change
|
||||
# define MODE_MEMORY_EXHAUSTED (struct mode_change *) 1
|
||||
# define MODE_BAD_REFERENCE (struct mode_change *) 2
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
struct mode_change *mode_compile PARAMS ((const char *, unsigned));
|
||||
struct mode_change *mode_create_from_ref PARAMS ((const char *));
|
||||
mode_t mode_adjust PARAMS ((mode_t, const struct mode_change *));
|
||||
void mode_free PARAMS ((struct mode_change *));
|
||||
struct mode_change *mode_compile (const char *, unsigned);
|
||||
struct mode_change *mode_create_from_ref (const char *);
|
||||
mode_t mode_adjust (mode_t, const struct mode_change *);
|
||||
void mode_free (struct mode_change *);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -322,21 +322,21 @@ read_filesystem_list (int need_fs_type)
|
||||
remove. Specifically, automount create normal NFS mounts.
|
||||
*/
|
||||
|
||||
if(listmntent(&mntlist, KMTAB, NULL, NULL) < 0)
|
||||
if (listmntent (&mntlist, KMTAB, NULL, NULL) < 0)
|
||||
return NULL;
|
||||
for (p = mntlist; p; p = p->next) {
|
||||
mnt = p->ment;
|
||||
me = (struct mount_entry*) xmalloc(sizeof (struct mount_entry));
|
||||
me->me_devname = xstrdup(mnt->mnt_fsname);
|
||||
me->me_mountdir = xstrdup(mnt->mnt_dir);
|
||||
me->me_type = xstrdup(mnt->mnt_type);
|
||||
me = xmalloc (sizeof (struct mount_entry));
|
||||
me->me_devname = xstrdup (mnt->mnt_fsname);
|
||||
me->me_mountdir = xstrdup (mnt->mnt_dir);
|
||||
me->me_type = xstrdup (mnt->mnt_type);
|
||||
me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
|
||||
me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
|
||||
me->me_dev = -1;
|
||||
*mtail = me;
|
||||
mtail = &me->me_next;
|
||||
}
|
||||
freemntlist(mntlist);
|
||||
freemntlist (mntlist);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -353,7 +353,7 @@ read_filesystem_list (int need_fs_type)
|
||||
|
||||
while ((mnt = getmntent (fp)))
|
||||
{
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me = xmalloc (sizeof (struct mount_entry));
|
||||
me->me_devname = xstrdup (mnt->mnt_fsname);
|
||||
me->me_mountdir = xstrdup (mnt->mnt_dir);
|
||||
me->me_type = xstrdup (mnt->mnt_type);
|
||||
@@ -392,7 +392,7 @@ read_filesystem_list (int need_fs_type)
|
||||
{
|
||||
char *fs_type = fsp_to_string (fsp);
|
||||
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me = xmalloc (sizeof (struct mount_entry));
|
||||
me->me_devname = xstrdup (fsp->f_mntfromname);
|
||||
me->me_mountdir = xstrdup (fsp->f_mntonname);
|
||||
me->me_type = fs_type;
|
||||
@@ -417,7 +417,7 @@ read_filesystem_list (int need_fs_type)
|
||||
0 < (val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY,
|
||||
(char *) 0)))
|
||||
{
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me = xmalloc (sizeof (struct mount_entry));
|
||||
me->me_devname = xstrdup (fsd.fd_req.devname);
|
||||
me->me_mountdir = xstrdup (fsd.fd_req.path);
|
||||
me->me_type = gt_names[fsd.fd_req.fstype];
|
||||
@@ -489,7 +489,7 @@ read_filesystem_list (int need_fs_type)
|
||||
{
|
||||
struct rootdir_entry *re;
|
||||
|
||||
re = (struct rootdir_entry *) xmalloc (sizeof (struct rootdir_entry));
|
||||
re = xmalloc (sizeof (struct rootdir_entry));
|
||||
re->name = name;
|
||||
re->dev = statbuf.st_dev;
|
||||
re->ino = statbuf.st_ino;
|
||||
@@ -515,7 +515,7 @@ read_filesystem_list (int need_fs_type)
|
||||
if (re->dev == fi.dev && re->ino == fi.root)
|
||||
break;
|
||||
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me = 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);
|
||||
@@ -549,7 +549,7 @@ read_filesystem_list (int need_fs_type)
|
||||
return (NULL);
|
||||
|
||||
bufsize = (1 + numsys) * sizeof (struct statfs);
|
||||
stats = (struct statfs *)xmalloc (bufsize);
|
||||
stats = xmalloc (bufsize);
|
||||
numsys = getfsstat (stats, bufsize, MNT_WAIT);
|
||||
|
||||
if (numsys < 0)
|
||||
@@ -560,7 +560,7 @@ read_filesystem_list (int need_fs_type)
|
||||
|
||||
for (counter = 0; counter < numsys; counter++)
|
||||
{
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me = xmalloc (sizeof (struct mount_entry));
|
||||
me->me_devname = xstrdup (stats[counter].f_mntfromname);
|
||||
me->me_mountdir = xstrdup (stats[counter].f_mntonname);
|
||||
me->me_type = xstrdup (FS_TYPE (stats[counter]));
|
||||
@@ -589,7 +589,7 @@ read_filesystem_list (int need_fs_type)
|
||||
|
||||
while (fread (&mnt, sizeof mnt, 1, fp) > 0)
|
||||
{
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me = xmalloc (sizeof (struct mount_entry));
|
||||
# ifdef GETFSTYP /* SVR3. */
|
||||
me->me_devname = xstrdup (mnt.mt_dev);
|
||||
# else
|
||||
@@ -634,12 +634,12 @@ read_filesystem_list (int need_fs_type)
|
||||
|
||||
#ifdef MOUNTED_GETMNTTBL /* DolphinOS goes it's own way */
|
||||
{
|
||||
struct mntent **mnttbl=getmnttbl(),**ent;
|
||||
struct mntent **mnttbl = getmnttbl (), **ent;
|
||||
for (ent=mnttbl;*ent;ent++)
|
||||
{
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me = xmalloc (sizeof (struct mount_entry));
|
||||
me->me_devname = xstrdup ( (*ent)->mt_resource);
|
||||
me->me_mountdir = xstrdup( (*ent)->mt_directory);
|
||||
me->me_mountdir = xstrdup ( (*ent)->mt_directory);
|
||||
me->me_type = xstrdup ((*ent)->mt_fstype);
|
||||
me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
|
||||
me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
|
||||
@@ -649,7 +649,7 @@ read_filesystem_list (int need_fs_type)
|
||||
*mtail = me;
|
||||
mtail = &me->me_next;
|
||||
}
|
||||
endmnttbl();
|
||||
endmnttbl ();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -698,7 +698,7 @@ read_filesystem_list (int need_fs_type)
|
||||
{
|
||||
while ((ret = getmntent (fp, &mnt)) == 0)
|
||||
{
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me = xmalloc (sizeof (struct mount_entry));
|
||||
me->me_devname = xstrdup (mnt.mnt_special);
|
||||
me->me_mountdir = xstrdup (mnt.mnt_mountp);
|
||||
me->me_type = xstrdup (mnt.mnt_fstype);
|
||||
@@ -755,7 +755,7 @@ read_filesystem_list (int need_fs_type)
|
||||
char *options, *ignore;
|
||||
|
||||
vmp = (struct vmount *) thisent;
|
||||
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
|
||||
me = xmalloc (sizeof (struct mount_entry));
|
||||
if (vmp->vmt_flags & MNT_REMOTE)
|
||||
{
|
||||
char *host, *path;
|
||||
|
||||
@@ -27,15 +27,7 @@ struct mount_entry
|
||||
struct mount_entry *me_next;
|
||||
};
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
struct mount_entry *read_filesystem_list PARAMS ((int need_fs_type));
|
||||
struct mount_entry *read_filesystem_list (int need_fs_type);
|
||||
|
||||
#ifndef ME_DUMMY
|
||||
# define ME_DUMMY(Fs_name, Fs_type) \
|
||||
|
||||
@@ -7,20 +7,19 @@
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
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
|
||||
Library General Public License for more details.
|
||||
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 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. */
|
||||
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. */
|
||||
|
||||
/* Summary:
|
||||
|
||||
@@ -123,12 +122,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __INT_TO_PTR
|
||||
#if defined __STDC__ && __STDC__
|
||||
# define __INT_TO_PTR(P) ((void *) ((P) + (char *) 0))
|
||||
#else
|
||||
# define __INT_TO_PTR(P) ((P) + (char *) 0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
@@ -297,17 +292,17 @@ extern int obstack_exit_failure;
|
||||
|
||||
# define obstack_init(h) \
|
||||
_obstack_begin ((h), 0, 0, \
|
||||
(void *(*) (long)) obstack_chunk_alloc, \
|
||||
(void *(*) (long)) obstack_chunk_alloc, \
|
||||
(void (*) (void *)) obstack_chunk_free)
|
||||
|
||||
# define obstack_begin(h, size) \
|
||||
_obstack_begin ((h), (size), 0, \
|
||||
(void *(*) (long)) obstack_chunk_alloc, \
|
||||
(void *(*) (long)) obstack_chunk_alloc, \
|
||||
(void (*) (void *)) obstack_chunk_free)
|
||||
|
||||
# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
|
||||
_obstack_begin ((h), (size), (alignment), \
|
||||
(void *(*) (long)) (chunkfun), \
|
||||
(void *(*) (long)) (chunkfun), \
|
||||
(void (*) (void *)) (freefun))
|
||||
|
||||
# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
|
||||
@@ -325,7 +320,7 @@ extern int obstack_exit_failure;
|
||||
|
||||
# define obstack_init(h) \
|
||||
_obstack_begin ((h), 0, 0, \
|
||||
(void *(*) ()) obstack_chunk_alloc, \
|
||||
(void *(*) ()) obstack_chunk_alloc, \
|
||||
(void (*) ()) obstack_chunk_free)
|
||||
|
||||
# define obstack_begin(h, size) \
|
||||
@@ -335,12 +330,12 @@ extern int obstack_exit_failure;
|
||||
|
||||
# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
|
||||
_obstack_begin ((h), (size), (alignment), \
|
||||
(void *(*) ()) (chunkfun), \
|
||||
(void *(*) ()) (chunkfun), \
|
||||
(void (*) ()) (freefun))
|
||||
|
||||
# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
|
||||
_obstack_begin_1 ((h), (size), (alignment), \
|
||||
(void *(*) ()) (chunkfun), \
|
||||
(void *(*) ()) (chunkfun), \
|
||||
(void (*) ()) (freefun), (arg))
|
||||
|
||||
# define obstack_chunkfun(h, newchunkfun) \
|
||||
@@ -477,7 +472,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; \
|
||||
@@ -574,7 +569,7 @@ __extension__ \
|
||||
# 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), \
|
||||
@@ -586,7 +581,7 @@ __extension__ \
|
||||
> (h)->chunk_limit - (char *) (h)->chunk) \
|
||||
? ((h)->next_free = (h)->chunk_limit) : 0), \
|
||||
(h)->object_base = (h)->next_free, \
|
||||
__INT_TO_PTR ((h)->temp))
|
||||
(void *) __INT_TO_PTR ((h)->temp))
|
||||
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define obstack_free(h,obj) \
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
#if ! defined PATH_CONCAT_H_
|
||||
# define PATH_CONCAT_H_
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
char *
|
||||
path_concat PARAMS ((const char *dir, const char *base, char **base_in_result));
|
||||
char *path_concat (const char *dir, const char *base, char **base_in_result);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
#ifndef PHYSMEM_H_
|
||||
# define PHYSMEM_H_ 1
|
||||
|
||||
# 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
|
||||
|
||||
double physmem_total PARAMS ((void));
|
||||
double physmem_available PARAMS ((void));
|
||||
double physmem_total (void);
|
||||
double physmem_available (void);
|
||||
|
||||
#endif /* PHYSMEM_H_ */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Parse dates for touch and date.
|
||||
Copyright (C) 1989, 1990, 1991, 1998, 2000-2002 Free Software Foundation Inc.
|
||||
Copyright (C) 1989, 1990, 1991, 1998, 2000-2003 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
|
||||
@@ -22,11 +22,7 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
typedef enum {false = 0, true = 1} bool;
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#if HAVE_STDLIB_H
|
||||
|
||||
@@ -7,15 +7,6 @@
|
||||
# define PDS_CENTURY 4
|
||||
# define PDS_SECONDS 8
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
bool
|
||||
posixtime PARAMS ((time_t *p, const char *s, unsigned int syntax_bits));
|
||||
bool posixtime (time_t *p, const char *s, unsigned int syntax_bits);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,20 +2,19 @@
|
||||
|
||||
Copyright (C) 2002 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)
|
||||
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
|
||||
Library General Public License for more details.
|
||||
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 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. */
|
||||
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. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
119
lib/printf-args.c
Normal file
119
lib/printf-args.c
Normal file
@@ -0,0 +1,119 @@
|
||||
/* Decomposed printf argument list.
|
||||
Copyright (C) 1999, 2002-2003 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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Specification. */
|
||||
#include "printf-args.h"
|
||||
|
||||
#ifdef STATIC
|
||||
STATIC
|
||||
#endif
|
||||
int
|
||||
printf_fetchargs (va_list args, arguments *a)
|
||||
{
|
||||
unsigned int i;
|
||||
argument *ap;
|
||||
|
||||
for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
|
||||
switch (ap->type)
|
||||
{
|
||||
case TYPE_SCHAR:
|
||||
ap->a.a_schar = va_arg (args, /*signed char*/ int);
|
||||
break;
|
||||
case TYPE_UCHAR:
|
||||
ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
|
||||
break;
|
||||
case TYPE_SHORT:
|
||||
ap->a.a_short = va_arg (args, /*short*/ int);
|
||||
break;
|
||||
case TYPE_USHORT:
|
||||
ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
|
||||
break;
|
||||
case TYPE_INT:
|
||||
ap->a.a_int = va_arg (args, int);
|
||||
break;
|
||||
case TYPE_UINT:
|
||||
ap->a.a_uint = va_arg (args, unsigned int);
|
||||
break;
|
||||
case TYPE_LONGINT:
|
||||
ap->a.a_longint = va_arg (args, long int);
|
||||
break;
|
||||
case TYPE_ULONGINT:
|
||||
ap->a.a_ulongint = va_arg (args, unsigned long int);
|
||||
break;
|
||||
#ifdef HAVE_LONG_LONG
|
||||
case TYPE_LONGLONGINT:
|
||||
ap->a.a_longlongint = va_arg (args, long long int);
|
||||
break;
|
||||
case TYPE_ULONGLONGINT:
|
||||
ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
|
||||
break;
|
||||
#endif
|
||||
case TYPE_DOUBLE:
|
||||
ap->a.a_double = va_arg (args, double);
|
||||
break;
|
||||
#ifdef HAVE_LONG_DOUBLE
|
||||
case TYPE_LONGDOUBLE:
|
||||
ap->a.a_longdouble = va_arg (args, long double);
|
||||
break;
|
||||
#endif
|
||||
case TYPE_CHAR:
|
||||
ap->a.a_char = va_arg (args, int);
|
||||
break;
|
||||
#ifdef HAVE_WINT_T
|
||||
case TYPE_WIDE_CHAR:
|
||||
ap->a.a_wide_char = va_arg (args, wint_t);
|
||||
break;
|
||||
#endif
|
||||
case TYPE_STRING:
|
||||
ap->a.a_string = va_arg (args, const char *);
|
||||
break;
|
||||
#ifdef HAVE_WCHAR_T
|
||||
case TYPE_WIDE_STRING:
|
||||
ap->a.a_wide_string = va_arg (args, const wchar_t *);
|
||||
break;
|
||||
#endif
|
||||
case TYPE_POINTER:
|
||||
ap->a.a_pointer = va_arg (args, void *);
|
||||
break;
|
||||
case TYPE_COUNT_SCHAR_POINTER:
|
||||
ap->a.a_count_schar_pointer = va_arg (args, signed char *);
|
||||
break;
|
||||
case TYPE_COUNT_SHORT_POINTER:
|
||||
ap->a.a_count_short_pointer = va_arg (args, short *);
|
||||
break;
|
||||
case TYPE_COUNT_INT_POINTER:
|
||||
ap->a.a_count_int_pointer = va_arg (args, int *);
|
||||
break;
|
||||
case TYPE_COUNT_LONGINT_POINTER:
|
||||
ap->a.a_count_longint_pointer = va_arg (args, long int *);
|
||||
break;
|
||||
#ifdef HAVE_LONG_LONG
|
||||
case TYPE_COUNT_LONGLONGINT_POINTER:
|
||||
ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
/* Unknown type. */
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
134
lib/printf-args.h
Normal file
134
lib/printf-args.h
Normal file
@@ -0,0 +1,134 @@
|
||||
/* Decomposed printf argument list.
|
||||
Copyright (C) 1999, 2002-2003 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. */
|
||||
|
||||
#ifndef _PRINTF_ARGS_H
|
||||
#define _PRINTF_ARGS_H
|
||||
|
||||
/* Get wchar_t. */
|
||||
#ifdef HAVE_WCHAR_T
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
|
||||
/* Get wint_t. */
|
||||
#ifdef HAVE_WINT_T
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
/* Get va_list. */
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
/* Argument types */
|
||||
typedef enum
|
||||
{
|
||||
TYPE_NONE,
|
||||
TYPE_SCHAR,
|
||||
TYPE_UCHAR,
|
||||
TYPE_SHORT,
|
||||
TYPE_USHORT,
|
||||
TYPE_INT,
|
||||
TYPE_UINT,
|
||||
TYPE_LONGINT,
|
||||
TYPE_ULONGINT,
|
||||
#ifdef HAVE_LONG_LONG
|
||||
TYPE_LONGLONGINT,
|
||||
TYPE_ULONGLONGINT,
|
||||
#endif
|
||||
TYPE_DOUBLE,
|
||||
#ifdef HAVE_LONG_DOUBLE
|
||||
TYPE_LONGDOUBLE,
|
||||
#endif
|
||||
TYPE_CHAR,
|
||||
#ifdef HAVE_WINT_T
|
||||
TYPE_WIDE_CHAR,
|
||||
#endif
|
||||
TYPE_STRING,
|
||||
#ifdef HAVE_WCHAR_T
|
||||
TYPE_WIDE_STRING,
|
||||
#endif
|
||||
TYPE_POINTER,
|
||||
TYPE_COUNT_SCHAR_POINTER,
|
||||
TYPE_COUNT_SHORT_POINTER,
|
||||
TYPE_COUNT_INT_POINTER,
|
||||
TYPE_COUNT_LONGINT_POINTER
|
||||
#ifdef HAVE_LONG_LONG
|
||||
, TYPE_COUNT_LONGLONGINT_POINTER
|
||||
#endif
|
||||
} arg_type;
|
||||
|
||||
/* Polymorphic argument */
|
||||
typedef struct
|
||||
{
|
||||
arg_type type;
|
||||
union
|
||||
{
|
||||
signed char a_schar;
|
||||
unsigned char a_uchar;
|
||||
short a_short;
|
||||
unsigned short a_ushort;
|
||||
int a_int;
|
||||
unsigned int a_uint;
|
||||
long int a_longint;
|
||||
unsigned long int a_ulongint;
|
||||
#ifdef HAVE_LONG_LONG
|
||||
long long int a_longlongint;
|
||||
unsigned long long int a_ulonglongint;
|
||||
#endif
|
||||
float a_float;
|
||||
double a_double;
|
||||
#ifdef HAVE_LONG_DOUBLE
|
||||
long double a_longdouble;
|
||||
#endif
|
||||
int a_char;
|
||||
#ifdef HAVE_WINT_T
|
||||
wint_t a_wide_char;
|
||||
#endif
|
||||
const char* a_string;
|
||||
#ifdef HAVE_WCHAR_T
|
||||
const wchar_t* a_wide_string;
|
||||
#endif
|
||||
void* a_pointer;
|
||||
signed char * a_count_schar_pointer;
|
||||
short * a_count_short_pointer;
|
||||
int * a_count_int_pointer;
|
||||
long int * a_count_longint_pointer;
|
||||
#ifdef HAVE_LONG_LONG
|
||||
long long int * a_count_longlongint_pointer;
|
||||
#endif
|
||||
}
|
||||
a;
|
||||
}
|
||||
argument;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int count;
|
||||
argument *arg;
|
||||
}
|
||||
arguments;
|
||||
|
||||
|
||||
/* Fetch the arguments, putting them into a. */
|
||||
#ifdef STATIC
|
||||
STATIC
|
||||
#else
|
||||
extern
|
||||
#endif
|
||||
int printf_fetchargs (va_list args, arguments *a);
|
||||
|
||||
#endif /* _PRINTF_ARGS_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user