mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
825 Commits
FILEUTILS-
...
CPPI-1_10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1a6dd3dcc | ||
|
|
0e4b6ae724 | ||
|
|
a034129a21 | ||
|
|
30ae7570c6 | ||
|
|
293e33d6b4 | ||
|
|
75b89617fb | ||
|
|
b1eedbaa0a | ||
|
|
038cd9b6ac | ||
|
|
62ef54223a | ||
|
|
a129fd7d2f | ||
|
|
e519cc9571 | ||
|
|
8fadcd2d9e | ||
|
|
049759fe01 | ||
|
|
d2cb2639f0 | ||
|
|
d9076f5a87 | ||
|
|
89bef497fd | ||
|
|
9af2cc052b | ||
|
|
8927e79a05 | ||
|
|
876acbccf4 | ||
|
|
ad44c41742 | ||
|
|
c6d89f346a | ||
|
|
7fe83a7a35 | ||
|
|
6bcf3fe4e4 | ||
|
|
1226c8ad6f | ||
|
|
26e8855760 | ||
|
|
6683b38ce1 | ||
|
|
ae0e62acab | ||
|
|
5152182db3 | ||
|
|
a780d450bc | ||
|
|
a18f65b1d3 | ||
|
|
aef2dad707 | ||
|
|
39b654069a | ||
|
|
5a3ec90c81 | ||
|
|
3e55e5756f | ||
|
|
293fbc2d0a | ||
|
|
f7383741d3 | ||
|
|
cd88376b05 | ||
|
|
40277bdae4 | ||
|
|
168d3387ef | ||
|
|
736a31a3fc | ||
|
|
e919024c70 | ||
|
|
917646ccb0 | ||
|
|
30eb0e4ed0 | ||
|
|
6efc19263f | ||
|
|
6fcc39f7e0 | ||
|
|
f5ad53838f | ||
|
|
50a600c47f | ||
|
|
c784ec50bb | ||
|
|
2ddbd39163 | ||
|
|
4b4de06dbc | ||
|
|
30398caa8f | ||
|
|
75660e5da7 | ||
|
|
da4170a71f | ||
|
|
01c0d9e91c | ||
|
|
0c8eed4f57 | ||
|
|
dea75949e0 | ||
|
|
f6a97a1483 | ||
|
|
45d73bae97 | ||
|
|
8d948d3ae7 | ||
|
|
8c9c61851e | ||
|
|
cfda7b7224 | ||
|
|
0dfd4b7782 | ||
|
|
8d4c961d53 | ||
|
|
23d0e1c18e | ||
|
|
f1bc30be6f | ||
|
|
6560a8c784 | ||
|
|
a39efe1575 | ||
|
|
98d2a14011 | ||
|
|
88a10b132b | ||
|
|
1be4401ecb | ||
|
|
d18b37d719 | ||
|
|
3384735e06 | ||
|
|
62e0b734d6 | ||
|
|
c31e4314d8 | ||
|
|
2beac10424 | ||
|
|
7c976d9485 | ||
|
|
961f6fb0c9 | ||
|
|
e41436072c | ||
|
|
d72341c0c8 | ||
|
|
31867cf5cb | ||
|
|
5d896be5dc | ||
|
|
0e94296ac1 | ||
|
|
a99fb13160 | ||
|
|
8b4468d407 | ||
|
|
c8f712ac70 | ||
|
|
a3c3e5dc3b | ||
|
|
bce3cdb26f | ||
|
|
adb94428ac | ||
|
|
1b7ca0aeb7 | ||
|
|
8025ccf64d | ||
|
|
c52ca035b1 | ||
|
|
7d6896c0d9 | ||
|
|
0473003f8a | ||
|
|
756e2026fc | ||
|
|
38a7b45e0e | ||
|
|
2ccc189bd6 | ||
|
|
774376d731 | ||
|
|
418c24dd7e | ||
|
|
908a517100 | ||
|
|
97606853e8 | ||
|
|
8636b9323e | ||
|
|
574916aa9f | ||
|
|
61e7341926 | ||
|
|
b0b1bd5ae2 | ||
|
|
d736fb1b2c | ||
|
|
4893d6c53b | ||
|
|
c025720350 | ||
|
|
ee7bb8de6e | ||
|
|
5bb5ceb5a2 | ||
|
|
3cbc678ef0 | ||
|
|
6f960a3224 | ||
|
|
1053d6cc80 | ||
|
|
0352337f1e | ||
|
|
d87fc7bc94 | ||
|
|
ca7fc5d683 | ||
|
|
e204540061 | ||
|
|
692f81b371 | ||
|
|
8e1897a33b | ||
|
|
2c3988dbca | ||
|
|
760d4e6f3a | ||
|
|
52ba9d8815 | ||
|
|
49d1716c11 | ||
|
|
02095a6616 | ||
|
|
1926146ed5 | ||
|
|
017ada27dd | ||
|
|
f7b3fa35e6 | ||
|
|
c9277ec2a9 | ||
|
|
8b7078eada | ||
|
|
a917db5ab2 | ||
|
|
8033ceb4ae | ||
|
|
79bb16b328 | ||
|
|
ee5f88a66f | ||
|
|
b85edfac45 | ||
|
|
67785d9d82 | ||
|
|
4b532bfa2f | ||
|
|
175fa8ef06 | ||
|
|
5f64ac353e | ||
|
|
df80cbe561 | ||
|
|
c04dab58ad | ||
|
|
62c7564165 | ||
|
|
f251729f7a | ||
|
|
c08d959056 | ||
|
|
1f0fb076ba | ||
|
|
352912e2b2 | ||
|
|
43624d4052 | ||
|
|
43614bef5f | ||
|
|
cfb5f2d82a | ||
|
|
85601384c9 | ||
|
|
16b0a807af | ||
|
|
22732cd352 | ||
|
|
12fb893bba | ||
|
|
025550c34d | ||
|
|
04c04ad4e9 | ||
|
|
c397b531b7 | ||
|
|
7a9eebbc9c | ||
|
|
cd470239ae | ||
|
|
531822b168 | ||
|
|
f1c7411a97 | ||
|
|
786d944b5e | ||
|
|
8f0403a90f | ||
|
|
bd510c7b11 | ||
|
|
345f20440e | ||
|
|
9e879e9c09 | ||
|
|
3b6ddee01e | ||
|
|
c2fc3f28dd | ||
|
|
f7eab80b3c | ||
|
|
a8219ddccd | ||
|
|
b8b5b82220 | ||
|
|
8cc6b069b6 | ||
|
|
a5bd412ed0 | ||
|
|
dad1592217 | ||
|
|
2f7d346fb1 | ||
|
|
1650fcd3f7 | ||
|
|
cf3a6f7638 | ||
|
|
f4456619fa | ||
|
|
b1cb63869d | ||
|
|
8bd003b434 | ||
|
|
331635b016 | ||
|
|
271a090daa | ||
|
|
9426be56f5 | ||
|
|
ed582f5612 | ||
|
|
e364b0d6b8 | ||
|
|
2227cb6a07 | ||
|
|
04a872f0d3 | ||
|
|
992b068bd2 | ||
|
|
d8535172f6 | ||
|
|
b6678c419b | ||
|
|
8989b5b65c | ||
|
|
dbe66b162b | ||
|
|
f6e82b7dea | ||
|
|
1450c855b6 | ||
|
|
3c9e00c4fd | ||
|
|
e149a84b32 | ||
|
|
521f5344c8 | ||
|
|
4b8000742f | ||
|
|
9ce2d23774 | ||
|
|
d45e530c21 | ||
|
|
1fecbd7863 | ||
|
|
bef1bc6137 | ||
|
|
daa8b2b1a3 | ||
|
|
37f9f5ed29 | ||
|
|
b4c2f799ec | ||
|
|
98e643ab3b | ||
|
|
b2604c5d12 | ||
|
|
b489ba12d8 | ||
|
|
966d1cd6e6 | ||
|
|
99fa315bf8 | ||
|
|
7ed10357bc | ||
|
|
4a94a06aa6 | ||
|
|
c29cb48a98 | ||
|
|
2034cba6f7 | ||
|
|
8e3f835a46 | ||
|
|
b338208678 | ||
|
|
ba94ef5b1b | ||
|
|
1af93e3d71 | ||
|
|
5848516f26 | ||
|
|
a46bcc4636 | ||
|
|
e8256c3c7c | ||
|
|
22f4434076 | ||
|
|
500f90eab5 | ||
|
|
902a2a5d7a | ||
|
|
677cb6c6a9 | ||
|
|
c08bfa1060 | ||
|
|
f49ad025e6 | ||
|
|
e57fb62f7f | ||
|
|
0246568205 | ||
|
|
71477a1aa8 | ||
|
|
45cb2385d5 | ||
|
|
dd4aedd1d3 | ||
|
|
1bb999e519 | ||
|
|
78c7e1f60b | ||
|
|
30aa344399 | ||
|
|
90ce79ff92 | ||
|
|
b5063eb63b | ||
|
|
e67563e822 | ||
|
|
56a458164e | ||
|
|
fb87a6052f | ||
|
|
204c08e9fa | ||
|
|
69d4a38c4e | ||
|
|
246d5a99d3 | ||
|
|
49313f9a74 | ||
|
|
29e3c2e97f | ||
|
|
e2003b82ff | ||
|
|
047056d4fb | ||
|
|
bbcf9c36cf | ||
|
|
c8de6584bb | ||
|
|
d463885c24 | ||
|
|
e54944039a | ||
|
|
6b647033ce | ||
|
|
c8576c4f8c | ||
|
|
56ee0fa636 | ||
|
|
b8926b07cc | ||
|
|
41971a1eaa | ||
|
|
6438d68006 | ||
|
|
1efb4218a7 | ||
|
|
0af0ad2493 | ||
|
|
d2e9866f3c | ||
|
|
23cc993dad | ||
|
|
bf0d2aac15 | ||
|
|
cc3ea7c99f | ||
|
|
2afd912ce5 | ||
|
|
a8737499b5 | ||
|
|
5d133efc26 | ||
|
|
fae5972a38 | ||
|
|
b17fce4fa4 | ||
|
|
c582df59bf | ||
|
|
4451bd8a9f | ||
|
|
493d736f7d | ||
|
|
782f4e9842 | ||
|
|
8fb784af90 | ||
|
|
fa9d5f6445 | ||
|
|
e55708d43c | ||
|
|
b628469832 | ||
|
|
e222fda574 | ||
|
|
2e1f0f43f0 | ||
|
|
d9a0e2c715 | ||
|
|
7394867950 | ||
|
|
f27f72bd6d | ||
|
|
2fb7f1e3c1 | ||
|
|
b9a9796da6 | ||
|
|
519b707b4e | ||
|
|
2d0f3f2e74 | ||
|
|
f553273be8 | ||
|
|
096c85ad5f | ||
|
|
1743aa2657 | ||
|
|
24e7d36a6a | ||
|
|
9404b5a3fb | ||
|
|
f6a99b1551 | ||
|
|
5f8d1a3d0b | ||
|
|
957b608418 | ||
|
|
2fca663e2f | ||
|
|
8c65bdf194 | ||
|
|
9c52203523 | ||
|
|
7f9d95c41d | ||
|
|
9074a69e21 | ||
|
|
2768c3dfc4 | ||
|
|
500ac13ddf | ||
|
|
e1e14bdb38 | ||
|
|
9ea67a3c6f | ||
|
|
30b3f9a1c1 | ||
|
|
48456d1d61 | ||
|
|
45c6397848 | ||
|
|
50d41186a4 | ||
|
|
4b9aaf267e | ||
|
|
9d3cbe12bd | ||
|
|
868e467701 | ||
|
|
dfbabfe758 | ||
|
|
21049673a0 | ||
|
|
3de0ead1ef | ||
|
|
66b1f79fb0 | ||
|
|
f9b3e59ae5 | ||
|
|
b7cd544ce5 | ||
|
|
8e94dcc2c6 | ||
|
|
c73e54a8ad | ||
|
|
5bd7ca3781 | ||
|
|
f164f70523 | ||
|
|
b22ba791cb | ||
|
|
4435f69035 | ||
|
|
46e9ed6beb | ||
|
|
3c0e576c6d | ||
|
|
e1aa041f5e | ||
|
|
924bbfab87 | ||
|
|
f9b5d8621a | ||
|
|
7982727372 | ||
|
|
29a8fa8694 | ||
|
|
d8f340e664 | ||
|
|
bda130b531 | ||
|
|
8fae90bd5b | ||
|
|
bec0525334 | ||
|
|
ca2b5b72fd | ||
|
|
e2b4a506f6 | ||
|
|
c9cab79e76 | ||
|
|
b34fc0c6fc | ||
|
|
3d1bf08703 | ||
|
|
3aab98bf96 | ||
|
|
0e06c2e22e | ||
|
|
6f634593ab | ||
|
|
52e8da0bc2 | ||
|
|
46c7196039 | ||
|
|
b73e91b1d4 | ||
|
|
c7007e30a5 | ||
|
|
94713349b1 | ||
|
|
236b06bc29 | ||
|
|
426d1b07d1 | ||
|
|
6b8cfeea5b | ||
|
|
1c0ab47708 | ||
|
|
b9154ca314 | ||
|
|
543d2fa8ec | ||
|
|
69df1f32a9 | ||
|
|
10a6b91082 | ||
|
|
d6a685271c | ||
|
|
c5e168c034 | ||
|
|
f12de0bcd8 | ||
|
|
b8f309cf14 | ||
|
|
19f9ab1fdb | ||
|
|
726edc8172 | ||
|
|
7847d32de2 | ||
|
|
24c9a6c7cd | ||
|
|
9f9610d983 | ||
|
|
1499642b50 | ||
|
|
ca0659ab9a | ||
|
|
6fa00f67da | ||
|
|
285c128eab | ||
|
|
06d3fd68cd | ||
|
|
be36cc026f | ||
|
|
79b030e317 | ||
|
|
0a0306d149 | ||
|
|
fdc624ee8c | ||
|
|
75b98a1845 | ||
|
|
46703b2bc4 | ||
|
|
e72d2e5729 | ||
|
|
b983106f60 | ||
|
|
945ef37057 | ||
|
|
7164873b95 | ||
|
|
a5d6ae87e0 | ||
|
|
1341235a1c | ||
|
|
35e76078e7 | ||
|
|
4d44d31bd9 | ||
|
|
be696e072e | ||
|
|
8da0422f17 | ||
|
|
48440e9d01 | ||
|
|
6a6ca8f365 | ||
|
|
5fface8d3a | ||
|
|
7eaaae4ec0 | ||
|
|
811ade5514 | ||
|
|
593d17ffe4 | ||
|
|
25a9e171a2 | ||
|
|
86c5a50e86 | ||
|
|
abb5c4e845 | ||
|
|
445de17323 | ||
|
|
861405b462 | ||
|
|
025b70bbb3 | ||
|
|
08ca0e9233 | ||
|
|
71110e3f87 | ||
|
|
a11890b981 | ||
|
|
c9fc879e89 | ||
|
|
7cb4c9284d | ||
|
|
d998775909 | ||
|
|
1a728b8b0d | ||
|
|
97bfe9b9dd | ||
|
|
a40c539ad1 | ||
|
|
5100b0b05f | ||
|
|
30bc289991 | ||
|
|
a68a480194 | ||
|
|
c17e423533 | ||
|
|
e489a18ead | ||
|
|
7ee6f9593d | ||
|
|
49648de23c | ||
|
|
43fa809135 | ||
|
|
a3dc365194 | ||
|
|
9f2dcee21a | ||
|
|
325df18179 | ||
|
|
27177c023a | ||
|
|
7f07e4b250 | ||
|
|
65c50ce72b | ||
|
|
53d1eedb1b | ||
|
|
00ef90d13b | ||
|
|
5b0132826f | ||
|
|
197061600e | ||
|
|
c21430123d | ||
|
|
c19b40fd68 | ||
|
|
115c65d3f4 | ||
|
|
3bb36380c3 | ||
|
|
c2390af52f | ||
|
|
6d28b40fce | ||
|
|
e7dfa263f2 | ||
|
|
6bbc8a8fef | ||
|
|
458d1c2ee2 | ||
|
|
4813ddbf6b | ||
|
|
358d534284 | ||
|
|
d325a6bac2 | ||
|
|
721691651f | ||
|
|
fa653c0720 | ||
|
|
ee7490797e | ||
|
|
8625974643 | ||
|
|
be6df5151f | ||
|
|
d3aefd7569 | ||
|
|
70855c0876 | ||
|
|
6d99caa5ee | ||
|
|
35c215bbba | ||
|
|
410e28bd78 | ||
|
|
8233ef4ca8 | ||
|
|
91b9ff7935 | ||
|
|
61829f0638 | ||
|
|
5d34d8c327 | ||
|
|
57658678dd | ||
|
|
eb64d4a73b | ||
|
|
62eab23e81 | ||
|
|
4518931c29 | ||
|
|
cac9a29ad8 | ||
|
|
f10bbe70a9 | ||
|
|
3c1f856059 | ||
|
|
5514c4792b | ||
|
|
25f95ca91e | ||
|
|
cfd53be2c8 | ||
|
|
e3093d28d9 | ||
|
|
e0689425b8 | ||
|
|
68de994bf1 | ||
|
|
b11665966d | ||
|
|
01b7b402a3 | ||
|
|
03285f9da5 | ||
|
|
334ae8d83d | ||
|
|
871b2ea818 | ||
|
|
2679dfb639 | ||
|
|
3a960cb7e4 | ||
|
|
f5cf8b6039 | ||
|
|
675a66a029 | ||
|
|
ffd0a44de4 | ||
|
|
2a9477bd95 | ||
|
|
5f001b35ed | ||
|
|
241297f40e | ||
|
|
df373089ee | ||
|
|
2a08e10112 | ||
|
|
d015986221 | ||
|
|
4fda5e9381 | ||
|
|
6f1ffe444c | ||
|
|
9f0b79a1ba | ||
|
|
cf4686a06a | ||
|
|
ccbe301659 | ||
|
|
6af107568c | ||
|
|
890e2a5a58 | ||
|
|
56bcd15a9c | ||
|
|
05c801ff0c | ||
|
|
c74553f398 | ||
|
|
d4142ec88e | ||
|
|
80016947b7 | ||
|
|
5af9b0048f | ||
|
|
9758a4d87a | ||
|
|
3e593e8a31 | ||
|
|
b0abc5579f | ||
|
|
55d155dbbe | ||
|
|
9de8c30c25 | ||
|
|
e4db8d3b54 | ||
|
|
ba74efc7c6 | ||
|
|
2307570c3e | ||
|
|
e9fd7152ff | ||
|
|
be9f2f6ef6 | ||
|
|
320475d619 | ||
|
|
025068df27 | ||
|
|
b7f166b3fd | ||
|
|
57e7dc4cda | ||
|
|
325680aae4 | ||
|
|
7446097d1a | ||
|
|
96bbda7216 | ||
|
|
7f77515e02 | ||
|
|
2714dd0ed2 | ||
|
|
7dfaaf5bf1 | ||
|
|
4d30007986 | ||
|
|
d07a45be2b | ||
|
|
438636be9b | ||
|
|
ff7797f6e2 | ||
|
|
d81e0e6f97 | ||
|
|
787a2cf49f | ||
|
|
9676083a22 | ||
|
|
8d509a79da | ||
|
|
1de5de8401 | ||
|
|
e7a4ab5efa | ||
|
|
c2223ba418 | ||
|
|
5bc2860579 | ||
|
|
0c2cd33ac8 | ||
|
|
198a0609cf | ||
|
|
8270c52b6b | ||
|
|
5d223fd617 | ||
|
|
a256689440 | ||
|
|
557c8b8ae8 | ||
|
|
22bdd77f67 | ||
|
|
fba069f78c | ||
|
|
2f4ff2ce9f | ||
|
|
ad177f456c | ||
|
|
1f7a13e62e | ||
|
|
78d17132eb | ||
|
|
2a1afebeb4 | ||
|
|
8ec9cd1836 | ||
|
|
11038c572e | ||
|
|
e3a56266dd | ||
|
|
78e5a1082a | ||
|
|
3ede7fb763 | ||
|
|
0048e2bb67 | ||
|
|
09221df9c6 | ||
|
|
5044873647 | ||
|
|
4bcbd9c6aa | ||
|
|
98c5eb08be | ||
|
|
9db34852ce | ||
|
|
cd5ba13ce2 | ||
|
|
ecf425de69 | ||
|
|
e94c44b8f0 | ||
|
|
9cdff96426 | ||
|
|
f77dc12f7f | ||
|
|
37c3f113f5 | ||
|
|
88287082b0 | ||
|
|
787421de85 | ||
|
|
47e01313ad | ||
|
|
ba42a3c5b2 | ||
|
|
a103ea415c | ||
|
|
4778b57c26 | ||
|
|
70c58eb46a | ||
|
|
075c8604cb | ||
|
|
55cebafa24 | ||
|
|
d5c34a9824 | ||
|
|
b2cb2e804e | ||
|
|
0019b6cebf | ||
|
|
30323f5739 | ||
|
|
1de223c226 | ||
|
|
eeae6e79dd | ||
|
|
47b335399c | ||
|
|
871c0f6caa | ||
|
|
20f3fe5f32 | ||
|
|
0aee2ba653 | ||
|
|
4723d1adde | ||
|
|
987834edba | ||
|
|
2c618b8359 | ||
|
|
45ee51d156 | ||
|
|
934fbc196c | ||
|
|
e7b9e3e7c1 | ||
|
|
ff10610d6c | ||
|
|
23d47fb4aa | ||
|
|
6bb0a39d24 | ||
|
|
8b8419e185 | ||
|
|
e2625cbbcd | ||
|
|
e7ec75cca0 | ||
|
|
a1321f00a8 | ||
|
|
d622232fb2 | ||
|
|
6aca235a6f | ||
|
|
d22bee04aa | ||
|
|
c036ffc1cc | ||
|
|
99d7f7d422 | ||
|
|
5cb10ea445 | ||
|
|
7a493e5c54 | ||
|
|
da56b3ffb6 | ||
|
|
8525d006fc | ||
|
|
3f6077b5bb | ||
|
|
52377e246d | ||
|
|
c83137adb3 | ||
|
|
ed71d8021e | ||
|
|
3ff0f8076b | ||
|
|
3dd1381c64 | ||
|
|
1f8a8b45ff | ||
|
|
78e3f940b7 | ||
|
|
d06b301fd0 | ||
|
|
a772996d99 | ||
|
|
2a4617da4c | ||
|
|
629c01e2c2 | ||
|
|
5326a0b265 | ||
|
|
f318f5c4d8 | ||
|
|
30bbbfe67a | ||
|
|
f06dd61f03 | ||
|
|
67998a215f | ||
|
|
94767ce8cf | ||
|
|
577a8f346e | ||
|
|
daf6c50b95 | ||
|
|
b221cf780f | ||
|
|
2bc68d2234 | ||
|
|
d6f931281e | ||
|
|
ae9d89cfe2 | ||
|
|
263fb2dc15 | ||
|
|
e5e92e670c | ||
|
|
d85aac6782 | ||
|
|
d54655c623 | ||
|
|
18656b733d | ||
|
|
ac4936b7b1 | ||
|
|
742625303d | ||
|
|
9e2606d77b | ||
|
|
c8d0d0ca6f | ||
|
|
0e3fea79f3 | ||
|
|
dcfda51801 | ||
|
|
fad08d3f31 | ||
|
|
d362235eed | ||
|
|
6ff755a69a | ||
|
|
c4bb1d449e | ||
|
|
e673a685ac | ||
|
|
37e38b4941 | ||
|
|
9eabf6d99a | ||
|
|
8efb6d5f7b | ||
|
|
928b1b8300 | ||
|
|
211a6642e2 | ||
|
|
fd1d1eaa80 | ||
|
|
ad41cbff8a | ||
|
|
71611d94f3 | ||
|
|
9beeae646e | ||
|
|
67450be04d | ||
|
|
84264973d6 | ||
|
|
5239228c17 | ||
|
|
29940657ab | ||
|
|
a5ab9f78c3 | ||
|
|
01bbd27a4d | ||
|
|
df06c5de7b | ||
|
|
706235da55 | ||
|
|
403b4c49eb | ||
|
|
c6014bc847 | ||
|
|
c148112941 | ||
|
|
19b3a9d102 | ||
|
|
7f9c804f7a | ||
|
|
4bdc202a00 | ||
|
|
a80ec26277 | ||
|
|
fcdbd9ff15 | ||
|
|
108694f32a | ||
|
|
59b34eded2 | ||
|
|
622dcc58ee | ||
|
|
770b6c1bb5 | ||
|
|
56c1cbf2e8 | ||
|
|
bd485671ff | ||
|
|
43be299a76 | ||
|
|
1493e0d650 | ||
|
|
592e22d509 | ||
|
|
c8e070ed62 | ||
|
|
ceb3908c6f | ||
|
|
4468f22968 | ||
|
|
eb3dc6a095 | ||
|
|
4a65486da9 | ||
|
|
07872e486f | ||
|
|
5aba961278 | ||
|
|
9be1481d17 | ||
|
|
eda1fa3268 | ||
|
|
633a2ace39 | ||
|
|
c2329c797c | ||
|
|
4d8de6887f | ||
|
|
5b2304d7b4 | ||
|
|
b6863fa3c9 | ||
|
|
c0ba4297c5 | ||
|
|
acc13fdc89 | ||
|
|
ee56fd2719 | ||
|
|
16863fa14e | ||
|
|
c957bbdeae | ||
|
|
c6a4fe00db | ||
|
|
30fc8c55a3 | ||
|
|
98c8115e96 | ||
|
|
d6b863b09c | ||
|
|
c730e2d9e8 | ||
|
|
81268e4b67 | ||
|
|
896a20a2a9 | ||
|
|
455ce0178b | ||
|
|
e268536dba | ||
|
|
e2aae9e166 | ||
|
|
8e4dbf5ab0 | ||
|
|
b7138e1052 | ||
|
|
5775f7e864 | ||
|
|
6deb757ba4 | ||
|
|
a0d25e62aa | ||
|
|
dc38e3a287 | ||
|
|
7b99d77bc6 | ||
|
|
1a79f34996 | ||
|
|
ad3ec0add1 | ||
|
|
a3ffafd3fe | ||
|
|
2d33b67399 | ||
|
|
e7e6c322a0 | ||
|
|
9ea9eed873 | ||
|
|
d882d1d100 | ||
|
|
b6e29912be | ||
|
|
687ef9f9fe | ||
|
|
4e1f4a8496 | ||
|
|
c1485dd854 | ||
|
|
35099b35ba | ||
|
|
2a5fb11132 | ||
|
|
a49513bedd | ||
|
|
fc6a8dcfb2 | ||
|
|
cbb4300cc2 | ||
|
|
deb79403bd | ||
|
|
9f43a52210 | ||
|
|
6bf0f043cd | ||
|
|
3f1cd6f52a | ||
|
|
d1da062806 | ||
|
|
bce88bc1ae | ||
|
|
8740ecf8c0 | ||
|
|
e92e87181b | ||
|
|
902dacb46a | ||
|
|
134bbf752c | ||
|
|
b27dd775ad | ||
|
|
e230d9a62b | ||
|
|
7709a02741 | ||
|
|
aaf9e9a820 | ||
|
|
674fed73ec | ||
|
|
98d1d862d5 | ||
|
|
aaef348f3d | ||
|
|
9bc96fd932 | ||
|
|
7b0658b00f | ||
|
|
f4034df457 | ||
|
|
5856751f41 | ||
|
|
4df9c47ca7 | ||
|
|
354a71cdc2 | ||
|
|
481c79dfac | ||
|
|
5e32f7c19a | ||
|
|
c5b4a727ab | ||
|
|
8c07ff563b | ||
|
|
fa997616ff | ||
|
|
0edd80c0f2 | ||
|
|
cc49da4ddf | ||
|
|
b7b4bec8df | ||
|
|
7aed2f97a5 | ||
|
|
89c7458b53 | ||
|
|
0809f17d77 | ||
|
|
550edf90b2 | ||
|
|
f3aa989205 | ||
|
|
f8a894c567 | ||
|
|
a0439c2405 | ||
|
|
edfabc70d3 | ||
|
|
9e14c22918 | ||
|
|
f3334434ea | ||
|
|
5686f159ab | ||
|
|
b7f12e5291 | ||
|
|
954daed8c2 | ||
|
|
b042ca3c0f | ||
|
|
5d3b5e175a | ||
|
|
1f13191b6f | ||
|
|
5aa665a624 | ||
|
|
85a5e683e8 | ||
|
|
e646037f4a | ||
|
|
536a6dd3ce | ||
|
|
701cc3fe2c | ||
|
|
22fc5f7ac9 | ||
|
|
4dcf0e2c7b | ||
|
|
67aea68e97 | ||
|
|
2320b98d89 | ||
|
|
4f90505509 | ||
|
|
4fcf9133ef | ||
|
|
1f29ee0e02 | ||
|
|
5285933ed8 | ||
|
|
1efbe325bd | ||
|
|
1f678f44f9 | ||
|
|
895cf6e91f | ||
|
|
682bc57d89 | ||
|
|
74ac72a78f | ||
|
|
f324aa68f9 | ||
|
|
88db6b6944 | ||
|
|
387d125c2d | ||
|
|
fd77d94155 | ||
|
|
137c6d5137 | ||
|
|
671567d496 | ||
|
|
aa3ef39ac8 | ||
|
|
b360fa26e5 | ||
|
|
168401bef2 | ||
|
|
9ecf7a54be | ||
|
|
b46b6af7e3 | ||
|
|
318e97ef64 | ||
|
|
9b525d2fe1 | ||
|
|
7a5e723600 | ||
|
|
9a2e78d703 | ||
|
|
b28d611552 | ||
|
|
f39ef82a14 | ||
|
|
c76348c318 | ||
|
|
dd9804a4fe | ||
|
|
f0018a3b9c | ||
|
|
9adb2c7cf1 | ||
|
|
857c948551 | ||
|
|
33cf956fc8 | ||
|
|
66816a3514 | ||
|
|
6417617d33 | ||
|
|
769b95b751 | ||
|
|
de0ebc7eb6 | ||
|
|
d8271b06b4 | ||
|
|
206205c6ee | ||
|
|
3336d7cf69 | ||
|
|
c319b5bf3b | ||
|
|
de577f3440 | ||
|
|
9f0489df43 | ||
|
|
46e7805428 | ||
|
|
d4b4519d8d | ||
|
|
b8d4bfe024 | ||
|
|
7046dfbc47 | ||
|
|
f119221740 | ||
|
|
fe38ed9d90 | ||
|
|
bc9ff8c14d | ||
|
|
a400a0e081 | ||
|
|
3abbefb5e4 | ||
|
|
51d5f8a438 | ||
|
|
e8c1aced2b |
@@ -15,6 +15,7 @@ have-Makefile := $(shell test -f Makefile && echo yes)
|
||||
ifeq ($(have-Makefile),yes)
|
||||
|
||||
include Makefile
|
||||
include $(srcdir)/Makefile.cfg
|
||||
include $(srcdir)/Makefile.maint
|
||||
|
||||
else
|
||||
|
||||
21
Makefile.cfg
Normal file
21
Makefile.cfg
Normal file
@@ -0,0 +1,21 @@
|
||||
## Customize Makefile.maint.
|
||||
|
||||
move_if_change = move-if-change
|
||||
|
||||
# List the hosts to which test releases are copied.
|
||||
# `a' and `b' are merely placeholders, and correspond to the
|
||||
# `a_' and `b_' prefixes of the following variables.
|
||||
hosts = a b
|
||||
a_host = alpha.gnu.org
|
||||
b_host = freefriends.org
|
||||
|
||||
alpha_subdir = gnu/fetish
|
||||
a_url_dir = $(alpha_subdir)
|
||||
b_url_dir = $(alpha_subdir)
|
||||
|
||||
# Files that `make wget-update' should update.
|
||||
wget_files = \
|
||||
$(srcdir)/config.guess \
|
||||
$(srcdir)/config.sub \
|
||||
$(srcdir)/doc/texinfo.tex \
|
||||
$(srcdir)/src/ansi2knr.c
|
||||
257
Makefile.maint
257
Makefile.maint
@@ -1,48 +1,100 @@
|
||||
# -*-Makefile-*-
|
||||
# This Makefile fragment is shared between fileutils, sh-utils, textutils.
|
||||
# This Makefile fragment is shared between fileutils, sh-utils, textutils,
|
||||
# and Autoconf.
|
||||
|
||||
maintainer-check:
|
||||
if head ChangeLog| grep 'Version $(VERSION)' > /dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "$(VERSION) not in ChangeLog; not tagging" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(MAKE) distcheck
|
||||
$(MAKE) my-distcheck
|
||||
|
||||
prev_version_file = .prev-version
|
||||
prev_version_file ?= .prev-version
|
||||
|
||||
THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
|
||||
PREV_VERSION := $(shell cat $(prev_version_file))
|
||||
PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
|
||||
|
||||
tag-package = $(shell echo "$(PACKAGE)" | tr a-z A-Z)
|
||||
tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
|
||||
tag-this-version = $(subst .,_,$(VERSION))
|
||||
tag-prev-version = $(subst .,_,$(PREV_VERSION))
|
||||
this-cvs-tag = $(tag-package)-$(tag-this-version)
|
||||
prev-cvs-tag = $(tag-package)-$(tag-prev-version)
|
||||
my_distdir = $(PACKAGE)-$(VERSION)
|
||||
|
||||
# Old releases are stored here.
|
||||
# Used for diffs and xdeltas.
|
||||
release-archive-dir ?= ../release
|
||||
|
||||
|
||||
|
||||
## --------------- ##
|
||||
## Sanity checks. ##
|
||||
## --------------- ##
|
||||
|
||||
changelog-check:
|
||||
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||
po-check:
|
||||
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1
|
||||
grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2
|
||||
diff -u $@-1 $@-2
|
||||
rm -f $@-1 $@-2
|
||||
if test -f po/POTFILES.in; then \
|
||||
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
|
||||
grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2; \
|
||||
diff -u $@-1 $@-2 || exit 1; \
|
||||
rm -f $@-1 $@-2; \
|
||||
fi
|
||||
|
||||
# Check that `make alpha' will not fail at the end of the process.
|
||||
writable-files:
|
||||
if test -d $(release-archive-dir); then :; else \
|
||||
mkdir $(release-archive-dir); \
|
||||
fi
|
||||
for file in $(distdir).tar.gz $(xd-delta) \
|
||||
$(release-archive-dir)/$(distdir).tar.gz \
|
||||
$(release-archive-dir)/$(xd-delta); do \
|
||||
test -e $$file || continue; \
|
||||
test -w $$file \
|
||||
|| { echo ERROR: $$file is not writable; fail=1; }; \
|
||||
done; \
|
||||
test "$$fail" && exit 1 || :
|
||||
|
||||
# Checks that don't require cvs.
|
||||
local-check: changelog-check po-check writable-files check-copyright
|
||||
|
||||
|
||||
# Sanity checks with the CVS repository.
|
||||
cvs-tag-check:
|
||||
echo $(this-cvs-tag); \
|
||||
if cvs -n log -h README | grep -e $(this-cvs-tag): >/dev/null; then \
|
||||
echo "$(this-cvs-tag) as already been used; not tagging" 1>&2; \
|
||||
exit 1; \
|
||||
else :; fi
|
||||
|
||||
cvs-diff-check:
|
||||
if cvs diff >cvs-diffs; then \
|
||||
rm cvs-diffs; \
|
||||
else \
|
||||
echo "Some files are locally modified:" 1>&2; \
|
||||
cat cvs-diffs; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
cvs-check: cvs-diff-check cvs-tag-check
|
||||
|
||||
maintainer-distcheck: changelog-check
|
||||
$(MAKE) distcheck
|
||||
$(MAKE) my-distcheck
|
||||
|
||||
|
||||
# Do not save the original name or timestamp in the .tar.gz file.
|
||||
GZIP_ENV = --no-name
|
||||
GZIP_ENV = '--no-name --best'
|
||||
|
||||
# Automake 1.4 does not define AMTAR.
|
||||
AMTAR ?= $(TAR)
|
||||
|
||||
# Tag before making distribution. Also, don't make a distribution if
|
||||
# checks fail. Also, make sure the NEWS file is up-to-date.
|
||||
# FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
|
||||
cvs-dist: maintainer-check
|
||||
echo $(this-cvs-tag); \
|
||||
if cvs -n log -h README| grep -e $(this-cvs-tag): > /dev/null; then \
|
||||
echo "VERSION not new; not tagging" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
cvs update po; \
|
||||
cvs-dist: cvs-check maintainer-distcheck
|
||||
cvs update po
|
||||
cvs tag -c $(this-cvs-tag)
|
||||
$(MAKE) dist
|
||||
|
||||
@@ -55,21 +107,22 @@ null_AM_MAKEFLAGS = \
|
||||
AUTOHEADER=false \
|
||||
MAKEINFO=false
|
||||
|
||||
# Detect format-string/arg-list mismatches that would normally be obscured
|
||||
# by the use of _(). The --disable-nls effectively defines away that macro,
|
||||
# and building with CFLAGS='-Wformat -Werror' causes any format warning to be
|
||||
# treated as a failure.
|
||||
t=./=test
|
||||
my-distcheck: writable-files po-check
|
||||
-rm -rf $(t)
|
||||
mkdir $(t)
|
||||
GZIP=$(GZIP) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
# Removing $(DEPDIR) like this is a gross kludge to work around a bug
|
||||
# in automake. Remove that line once it's fixed.
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
cd $(t)/$(distdir) \
|
||||
&& ./configure --disable-nls \
|
||||
&& $(MAKE) CFLAGS='-Wformat -Werror' \
|
||||
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(MAKE) check \
|
||||
&& $(MAKE) distclean \
|
||||
&& rm -rf $(DEPDIR)
|
||||
&& $(MAKE) distclean
|
||||
cd $(t) && mv $(distdir) $(distdir).old \
|
||||
&& $(AMTAR) -zxf ../$(distdir).tar.gz
|
||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||
@@ -78,20 +131,19 @@ my-distcheck: writable-files po-check
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
|
||||
a_host = alpha.gnu.org
|
||||
b_host = freefriends.org
|
||||
# This must be the same name on both hosts.
|
||||
# Make it a symlink that points to the right place.
|
||||
real_dir = fetish-ftp
|
||||
|
||||
alpha_subdir = gnu/fetish
|
||||
a_url_dir = $(alpha_subdir)
|
||||
b_url_dir = $(alpha_subdir)
|
||||
url_dir_list = $(foreach x,$(hosts),ftp://$($(x)_host)/$($(x)_url_dir))
|
||||
|
||||
a_real_dir = /fs/share/ftp/$(alpha_subdir)
|
||||
b_real_dir = fetish-ftp
|
||||
|
||||
url_dir_list = $(foreach x,a b,ftp://$($(x)_host)/$($(x)_url_dir))
|
||||
|
||||
md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
|
||||
sha1 = $(shell sha1sum < $(distdir).tar.gz|sed 's/ -//')
|
||||
tgz-md5 = $(shell md5sum < $(my_distdir).tar.gz|sed 's/ -//')
|
||||
tgz-sha1 = $(shell sha1sum < $(my_distdir).tar.gz|sed 's/ -//')
|
||||
bz2-md5 = $(shell md5sum < $(my_distdir).tar.bz2|sed 's/ -//')
|
||||
bz2-sha1 = $(shell sha1sum < $(my_distdir).tar.bz2|sed 's/ -//')
|
||||
tgz-size = $(shell du --human $(my_distdir).tar.gz|sed 's/\([Mk]\).*/ \1B/')
|
||||
bz2-size = $(shell du --human $(my_distdir).tar.bz2|sed 's/\([Mk]\).*/ \1B/')
|
||||
xd-size = $(shell du --human $(xd-delta)|sed 's/\([Mk]\).*/ \1B/')
|
||||
|
||||
rel-check:
|
||||
tarz=/tmp/rel-check-tarz-$$$$; \
|
||||
@@ -102,33 +154,43 @@ rel-check:
|
||||
echo "$(md5) -" > $$md5_tmp; \
|
||||
md5sum -c $$md5_tmp < $$tarz
|
||||
|
||||
release-archive-dir = ../release
|
||||
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
|
||||
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
|
||||
|
||||
announcement: NEWS ChangeLog $(distdir).tar.gz
|
||||
GZIP = gzip
|
||||
BZIP2 = bzip2
|
||||
$(my_distdir).tar.bz2: $(my_distdir).tar.gz
|
||||
$(GZIP) -dc $< > $(my_distdir).tar
|
||||
rm -f $@
|
||||
$(BZIP2) -9 $(my_distdir).tar
|
||||
|
||||
rel-files = $(xd-delta) $(distdir).tar.bz2 $(distdir).tar.gz
|
||||
announcement: NEWS ChangeLog $(rel-files)
|
||||
@( \
|
||||
echo Subject: $(distdir) released; \
|
||||
echo Subject: $(my_distdir) released; \
|
||||
echo; \
|
||||
echo FIXME: put comments here; \
|
||||
echo; \
|
||||
for url in $(url_dir_list); do \
|
||||
echo " $$url/$(distdir).tar.gz"; \
|
||||
echo " $$url/$(my_distdir).tar.gz ($(tgz-size))"; \
|
||||
echo " $$url/$(my_distdir).tar.bz2 ($(bz2-size))"; \
|
||||
done; \
|
||||
echo; \
|
||||
echo And here are xdelta-style diffs; \
|
||||
echo; \
|
||||
for url in $(url_dir_list); do \
|
||||
echo " $$url/$(xd-delta)"; \
|
||||
echo " $$url/$(xd-delta) ($(xd-size))"; \
|
||||
done; \
|
||||
echo; \
|
||||
echo "Here are the MD5 and SHA1 signatures for the .tar.gz file"; \
|
||||
echo "Here are the MD5 and SHA1 signatures for the compressed tar files:"; \
|
||||
echo; \
|
||||
echo "$(md5) $(distdir).tar.gz"; \
|
||||
echo "$(sha1) $(distdir).tar.gz"; \
|
||||
echo "$(tgz-md5) $(my_distdir).tar.gz"; \
|
||||
echo "$(bz2-md5) $(my_distdir).tar.bz2"; \
|
||||
echo "$(tgz-sha1) $(my_distdir).tar.gz"; \
|
||||
echo "$(bz2-sha1) $(my_distdir).tar.bz2"; \
|
||||
echo; \
|
||||
echo NEWS:; \
|
||||
sed -n "/$(THIS_VERSION_REGEXP)/,/^\[$(PREV_VERSION_REGEXP)/p" NEWS \
|
||||
sed -n "/$(THIS_VERSION_REGEXP)[]:]/,/$(PREV_VERSION_REGEXP)[]:]/p" NEWS \
|
||||
| grep -v '^\['; \
|
||||
echo; \
|
||||
echo ChangeLog entries:; \
|
||||
@@ -139,41 +201,76 @@ announcement: NEWS ChangeLog $(distdir).tar.gz
|
||||
-e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
|
||||
)
|
||||
|
||||
writable-files:
|
||||
for file in $(distdir).tar.gz $(xd-delta) \
|
||||
../release/$(distdir).tar.gz ../release/$(xd-delta); do \
|
||||
test -e $$file || continue; \
|
||||
test -w $$file \
|
||||
|| { echo ERROR: $$file is not writable; fail=1; }; \
|
||||
done; \
|
||||
test "$$fail" && exit 1 || :
|
||||
|
||||
WGET = wget
|
||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
||||
|
||||
# Use mv, if you don't have/want move-if-change.
|
||||
move_if_change ?= move-if-change
|
||||
|
||||
# The following pseudo table associates a local directory and a URL
|
||||
# with each of the files that belongs to some other package and is
|
||||
# regularly updated from the specified URL.
|
||||
wget_files ?= $(srcdir)/config.guess $(srcdir)/config.sub \
|
||||
$(srcdir)/src/ansi2knr.c \
|
||||
$(srcdir)/doc/texinfo.tex
|
||||
get-targets = $(patsubst %, get-%, $(wget_files))
|
||||
|
||||
config.guess-url_prefix = $(ftp-gnu)/config/
|
||||
config.sub-url_prefix = $(ftp-gnu)/config/
|
||||
|
||||
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
|
||||
|
||||
texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/
|
||||
|
||||
standards.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
||||
make-stds.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
||||
|
||||
target = $(patsubst get-%, %, $@)
|
||||
url = $($(notdir $(target))-url_prefix)$(notdir $(target))
|
||||
|
||||
.PHONY: $(get-targets)
|
||||
$(get-targets):
|
||||
$(WGET) $(url) -O $(target).t \
|
||||
&& $(move_if_change) $(target).t $(target)
|
||||
|
||||
automake_repo=:pserver:anoncvs@anoncvs.cygnus.com:/cvs/automake
|
||||
.PHONY: wget-update
|
||||
wget-update:
|
||||
$(WGET) $(ftp-gnu)/texinfo/texinfo.tex -O $(srcdir)/doc/texinfo.tex
|
||||
$(WGET) $(ftp-gnu)/config/config.guess -O $(srcdir)/config.guess
|
||||
$(WGET) $(ftp-gnu)/config/config.sub -O $(srcdir)/config.sub
|
||||
cvs -d $(automake_repo) co -p automake/depcomp > depcomp
|
||||
wget-update: $(get-targets)
|
||||
for f in depcomp missing; do \
|
||||
test -f $$f || continue; \
|
||||
echo checking out $$f...; \
|
||||
cvs -d $(automake_repo) co -p automake/lib/$$f > $$f.t \
|
||||
&& $(move_if_change) $$f.t $$f; \
|
||||
done
|
||||
|
||||
alpha: writable-files po-check
|
||||
define emit-rsync-commands
|
||||
echo =====================================
|
||||
echo =====================================
|
||||
echo 'for host in $(a_host) $(b_host); do \'
|
||||
echo ' rsync -e ssh --pro -av $(xd-delta) $(my_distdir).tar.bz2 \'
|
||||
echo ' $(my_distdir).tar.gz $$host:$(real_dir); done'
|
||||
echo '# send the /tmp/announcement e-mail'
|
||||
echo =====================================
|
||||
echo =====================================
|
||||
endef
|
||||
|
||||
# Make sure that the copyright date in lib/version-etc.c is up to date.
|
||||
check-copyright:
|
||||
@if test -f lib/version-etc.c; then \
|
||||
grep 'N_("Copyright (C) $(shell date +%Y) Free' lib/version-etc.c \
|
||||
> /dev/null \
|
||||
|| { echo 'out of date copyright in $<; update it' 1>&2; exit 1; }; \
|
||||
fi
|
||||
|
||||
$(xd-delta): $(release-archive-dir)/$(prev-tgz) $(distdir).tar.gz
|
||||
xdelta delta -9 $^ $@ || :
|
||||
|
||||
alpha: local-check
|
||||
$(MAKE) cvs-dist
|
||||
$(MAKE) -s announcement > /tmp/announce-$(distdir)
|
||||
ln $(distdir).tar.gz ../release
|
||||
chmod a-w $(distdir).tar.gz
|
||||
cd $(release-archive-dir) \
|
||||
&& xdelta delta -9 $(prev-tgz) $(distdir).tar.gz $(xd-delta) || :
|
||||
ln $(release-archive-dir)/$(xd-delta) .
|
||||
chmod a-w $(release-archive-dir)/$(xd-delta)
|
||||
$(MAKE) $(xd-delta)
|
||||
$(MAKE) -s announcement > /tmp/announce-$(my_distdir)
|
||||
ln $(rel-files) $(release-archive-dir)
|
||||
chmod a-w $(rel-files)
|
||||
echo $(VERSION) > $(prev_version_file)
|
||||
cvs ci -m. $(prev_version_file)
|
||||
@echo =====================================
|
||||
@echo =====================================
|
||||
@echo 'rsync -e ssh --pro -av $(xd-delta) $(distdir).tar.gz \'
|
||||
@echo ' $(b_host):$(b_real_dir)'
|
||||
@echo '# send the /tmp/announcement e-mail'
|
||||
@echo =====================================
|
||||
@echo =====================================
|
||||
@$(emit-rsync-commands)
|
||||
|
||||
25
THANKS
25
THANKS
@@ -25,6 +25,7 @@ Andreas Stolcke stolcke@ICSI.Berkeley.EDU
|
||||
Andres Soolo andres@soolo.matti.ee
|
||||
Andrew Burgess aab@cichlid.com
|
||||
Andrew Dalke dalke@bioreason.com
|
||||
Andrew Pham andpha@us.ibm.com
|
||||
Andrew Tridgell tridge@samba.org
|
||||
Andries Brouwer Andries.Brouwer@cwi.nl
|
||||
Andy Longton alongton@metamark.com
|
||||
@@ -34,6 +35,7 @@ Arne H. Juul arnej@solan.unit.no
|
||||
Arne Henrik Juul arnej@imf.unit.no
|
||||
Arthur Pool pool@commerce.uq.edu.au
|
||||
Austin Donnelly Austin.Donnelly@cl.cam.ac.uk
|
||||
Axel Kittenberger Anshil@gmx.net
|
||||
Bauke Jan Douma bjdouma@xs4all.nl
|
||||
Bengt Martensson bengt@mathematik.uni-Bremen.de
|
||||
Bernd Leibing bernd.leibing@rz.uni-ulm.de
|
||||
@@ -63,16 +65,20 @@ Chuck Hedrick hedrick@klinzhai.rutgers.edu
|
||||
Clark Morgan cmorgan@aracnet.com
|
||||
Colin Plumb colin@nyx.net
|
||||
Collin Rogowski collin@rogowski.de
|
||||
Dale Scheetz dwarf@polaris.net
|
||||
Dan Hagerty hag@gnu.ai.it.edu
|
||||
Dan Pascu dan@services.iiruc.ro
|
||||
Daniel Bergstrom noa@melody.se
|
||||
Darren Salt ds@youmustbejoking.demon.co.uk
|
||||
David Dyck dcd@tc.fluke.COM
|
||||
David Godfrey dave@delta.demon.co.uk
|
||||
David Luyer david_luyer@pacific.net.au
|
||||
Dennis Henriksen opus@flamingo.osrl.dk
|
||||
Derek Clegg dclegg@next.com
|
||||
Dick Streefland dick_streefland@tasking.com
|
||||
Dirk Lattermann dlatt@t-online.de
|
||||
Dirk-Jan Faber djfaber@snow.nl
|
||||
Dan Jacobson http://www.geocities.com/jidani
|
||||
Don Parsons dparsons@synapse.kent.edu
|
||||
Donni Erpel donald@appc11.gsi.de
|
||||
Doug McLaren dougmc@comco.com
|
||||
@@ -94,6 +100,7 @@ Frank Adler fadler@allesklar.de
|
||||
Frank T Lofaro ftlofaro@snooks.Egr.UNLV.EDU
|
||||
François Pinard pinard@iro.umontreal.ca
|
||||
Fred Fish fnf@ninemoons.com
|
||||
Frederik Eaton frederik@caltech.edu
|
||||
Gabor Z. Papp gzp@gzp.org.hu
|
||||
Galen Hazelwood galenh@micron.net
|
||||
Gary Anderson ganderson@clark.net
|
||||
@@ -114,6 +121,7 @@ Hans Verkuil hans@wyst.hobby.nl
|
||||
Harry Liu rliu@lek.ugcs.caltech.edu
|
||||
Herbert Xu herbert@gondor.apana.org.au
|
||||
Holger Berger hberger@ess.nec.de
|
||||
Hon-Yin Kok hkok@yoda.unl.edu
|
||||
Hugh Daniel hugh@xanadu.com
|
||||
Ian Jackson ijackson@chiark.greenend.org.uk
|
||||
Ian Lance Taylor ian@cygnus.com
|
||||
@@ -151,6 +159,7 @@ John Roll john@panic.harvard.edu
|
||||
John Salmon johns@mullet.anu.edu.au
|
||||
John Summerfield summer@OS2.ami.com.au
|
||||
Joost van Baal joostvb@xs4all.nl
|
||||
Jorge Stolfi stolfi@ic.unicamp.br
|
||||
Joseph S. Myers jsm28@cam.ac.uk
|
||||
Jungshik Shin jshin@pantheon.yale.edu
|
||||
Jürgen Fluk louis@dachau.marco.de
|
||||
@@ -165,9 +174,11 @@ Karl-Michael Schneider schneide@phil.uni-passau.de
|
||||
Karsten Thygesen karthy@kom.auc.dk
|
||||
Kaveh R. Ghazi ghazi@caip.rutgers.edu
|
||||
Keith Owens kaos@audio.apana.org.au
|
||||
Keith Thompson kst@sdsc.edu
|
||||
Ken Pizzini kenp@halcyon.com
|
||||
Kjetil Torgrim Homme kjetilho@ifi.uio.no
|
||||
Kristoffer Rose kris@diku.dk
|
||||
??? kytek@cybercomm.net
|
||||
Larry McVoy lm@sgi.com
|
||||
Lars Hecking lhecking@nmrc.ucc.ie
|
||||
Lehti Rami rammer@cs.tut.fi
|
||||
@@ -185,6 +196,7 @@ Mark A. Thomas thommark@access.digex.net
|
||||
Mark D. Roth roth@uiuc.edu
|
||||
Mark Harris mark@monitor.designacc.com
|
||||
Mark Hewitt mhewitt@armature.com
|
||||
Mark Hounschell markh@compro.net
|
||||
Mark Kettenis kettenis@phys.uva.nl
|
||||
Mark Nudelman marknu@flash.net
|
||||
Mark W. Eichin eichin@cygnus.com
|
||||
@@ -199,9 +211,11 @@ Masami Takikawa takikawm@CS.ORST.EDU
|
||||
Mate Wierdl mw@moni.msci.memphis.edu
|
||||
Matej Vela mvela@public.srce.hr
|
||||
Matt Perry matt@primefactor.com
|
||||
Matt Schalit mschalit@pacbell.net
|
||||
Matthew Braun matthew@ans.net
|
||||
Matthew Clarke Matthew_Clarke@mindlink.bc.ca
|
||||
Matthew S. Levine mslevine@theory.lcs.mit.edu
|
||||
Matthew Smith matts@bluesguitar.org
|
||||
Matthew Swift swift@alum.mit.edu
|
||||
Mattias Wadenstein maswan@acc.umu.se
|
||||
Matthias Urlichs smurf@noris.de
|
||||
@@ -210,6 +224,8 @@ Michael ??? michael@roka.net
|
||||
Michael Deutschmann michael@talamasca.ocis.net
|
||||
Michael Hasselberg mikelh@zonta.ping.de
|
||||
Michael Hohn hohn@math.utah.edu
|
||||
Michael J. Croghan mcroghan@usatoday.com
|
||||
Michael Steffens michael.steffens@s.netic.de
|
||||
Michael Stone mstone@debian.org
|
||||
Michael Stutz stutz@dsl.org
|
||||
Michael Veksler mveksler@techunix.technion.ac.il
|
||||
@@ -223,6 +239,8 @@ Niklas Edmundsson nikke@acc.umu.se
|
||||
Noah Friedman friedman@splode.com
|
||||
Noel Cragg noel@red-bean.com
|
||||
Olav Morkrid olav@funcom.com
|
||||
Ole Laursen olau@hardworking.dk
|
||||
Oskar Liljeblad osk@hem.passagen.se
|
||||
Ørn E. Hansen oehansen@daimi.aau.dk
|
||||
Paul Eggert eggert@twinsun.com
|
||||
Paul Nevai nevai@ops.mps.ohio-state.edu
|
||||
@@ -245,6 +263,7 @@ Ralf W. Stephan stephan@tmt.de
|
||||
Ralph Loader loader@maths.ox.ac.uk
|
||||
Raul Miller moth@magenta.com
|
||||
Richard Braakman dark@xs4all.nl
|
||||
Richard Dawe richdawe@bigfoot.com
|
||||
Richard J. Rauenzahn rrauenza@hairball.cup.hp.com
|
||||
Richard Sharman rsharman@magmacom.com
|
||||
Rick Sladkey jrs@world.std.com
|
||||
@@ -252,6 +271,7 @@ Rik Faith faith@cs.unc.edu
|
||||
Risto Kankkunen kankkune@lingsoft.fi
|
||||
Robert H. de Vries robert@and.nl
|
||||
Rogier Wolff R.E.Wolff@BitWizard.nl
|
||||
Roland Huebner ro-huebner@gmx.de
|
||||
Ronald F. Guilmette rfg@netcom.com
|
||||
Ross Alexander r.alexander@auckland.ac.nz
|
||||
Ross Paterson rap@doc.ic.ac.uk
|
||||
@@ -262,7 +282,10 @@ Sander van Malssen svm@kozmix.ow.nl
|
||||
Santiago Vila Doncel sanvila@unex.es
|
||||
Savochkin Andrey Vladimirovich saw@msu.ru
|
||||
Scott Lurndal slurn@griffin.engr.sgi.com
|
||||
Stephen Gildea gildea@x.org
|
||||
Soeren Sonnenburg sonnenburg@informatik.hu-berlin.de
|
||||
Stéphane Chazelas Stephane_CHAZELAS@yahoo.fr
|
||||
Stephen Eglen eglen@pcg.wustl.edu
|
||||
Stephen Gildea gildea@stop.mail-abuse.org
|
||||
Stephen Smoogen ??????????
|
||||
Steve McConnel steve@acadcomp.sil.org
|
||||
Stuart Kemp skemp@peter.bmc.com
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
Makefile
|
||||
fileutils.aux
|
||||
fileutils.cm
|
||||
fileutils.cp
|
||||
fileutils.cps
|
||||
fileutils.dvi
|
||||
fileutils.fl
|
||||
fileutils.fn
|
||||
fileutils.info
|
||||
fileutils.info*
|
||||
fileutils.ky
|
||||
fileutils.log
|
||||
fileutils.op
|
||||
fileutils.pg
|
||||
fileutils.toc
|
||||
fileutils.tp
|
||||
fileutils.vr
|
||||
coreutils.aux
|
||||
coreutils.cm
|
||||
coreutils.cp
|
||||
coreutils.cps
|
||||
coreutils.dvi
|
||||
coreutils.fl
|
||||
coreutils.fn
|
||||
coreutils.info
|
||||
coreutils.info*
|
||||
coreutils.ky
|
||||
coreutils.log
|
||||
coreutils.op
|
||||
coreutils.pg
|
||||
coreutils.toc
|
||||
coreutils.tp
|
||||
coreutils.vr
|
||||
stamp-vti
|
||||
version.texi
|
||||
|
||||
31
doc/ChangeLog
Normal file
31
doc/ChangeLog
Normal file
@@ -0,0 +1,31 @@
|
||||
2001-07-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (cp invocation): Reflect 2001-07-08 change to
|
||||
cp (via copy.c).
|
||||
|
||||
2001-06-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (info_TEXINFOS): Reflect renaming: s/omni-/core/.
|
||||
* coreutils.texi: Likewise.
|
||||
|
||||
* coreutils.texi: New, renamed from omni-utils.texi.
|
||||
* omni-utils.texi: Removed, renamed to coreutils.texi.
|
||||
|
||||
* omni-utils.texi (ls invocation): Mention the effect of locale.
|
||||
Reported by Keith Thompson.
|
||||
|
||||
2001-05-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* texinfo.tex: Update from master source.
|
||||
|
||||
* omni-utils.texi (ls invocation): Document more clearly what ls
|
||||
does when given no arguments.
|
||||
|
||||
2001-05-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* textutils.texi: Remove file.
|
||||
|
||||
* Makefile.am ($(DVIS), $(INFO_DEPS)): Depend on $(EXTRA_DIST).
|
||||
(DISABLED_constants.texi): New rule -- disabled for now.
|
||||
|
||||
This directory is now shared by fileutils, textutils, and sh-utils.
|
||||
@@ -1,7 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
info_TEXINFOS = fileutils.texi
|
||||
info_TEXINFOS = coreutils.texi
|
||||
|
||||
EXTRA_DIST = perm.texi getdate.texi
|
||||
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
|
||||
|
||||
# The following is necessary if the package name is 8 characters or longer.
|
||||
# If the info documentation would be split into 10 or more separate files,
|
||||
@@ -12,3 +12,25 @@ EXTRA_DIST = perm.texi getdate.texi
|
||||
# and those names all map to one 14-byte name (<package>.info-) on some crufty
|
||||
# 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
|
||||
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)
|
||||
|
||||
# List words/regexps here that should not appear in the texinfo documentation.
|
||||
check-texinfo:
|
||||
grep timezone $(srcdir)/*.texi && exit 1 || :
|
||||
grep -w POSIX $(srcdir)/*.texi && exit 1 || :
|
||||
|
||||
check: check-texinfo
|
||||
|
||||
318
doc/Makefile.in
318
doc/Makefile.in
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4b from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4i from Makefile.am.
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -11,6 +11,8 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -31,11 +33,9 @@ infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
@@ -47,28 +47,22 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_FLAG =
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
@@ -82,6 +76,7 @@ GNU_PACKAGE = @GNU_PACKAGE@
|
||||
GT_NO = @GT_NO@
|
||||
GT_YES = @GT_YES@
|
||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
@@ -111,13 +106,14 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
_am_include = @_am_include@
|
||||
_am_quote = @_am_quote@
|
||||
install_sh = @install_sh@
|
||||
l = @l@
|
||||
|
||||
info_TEXINFOS = coreutils.texi
|
||||
|
||||
info_TEXINFOS = fileutils.texi
|
||||
|
||||
EXTRA_DIST = perm.texi getdate.texi
|
||||
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
|
||||
|
||||
# The following is necessary if the package name is 8 characters or longer.
|
||||
# If the info documentation would be split into 10 or more separate files,
|
||||
@@ -128,38 +124,34 @@ EXTRA_DIST = perm.texi getdate.texi
|
||||
# and those names all map to one 14-byte name (<package>.info-) on some crufty
|
||||
# old systems.
|
||||
MAKEINFO = makeinfo --no-split
|
||||
EXEEXT =
|
||||
OBJEXT = o
|
||||
subdir = doc
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
TEXI2DVI = texi2dvi
|
||||
INFO_DEPS = fileutils.info
|
||||
DVIS = fileutils.dvi
|
||||
TEXINFOS = fileutils.texi
|
||||
DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti texinfo.tex \
|
||||
version.texi
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
INFO_DEPS = coreutils.info
|
||||
DVIS = coreutils.dvi
|
||||
TEXINFOS = coreutils.texi
|
||||
DIST_COMMON = ChangeLog Makefile.am Makefile.in mdate-sh stamp-vti \
|
||||
texinfo.tex version.texi
|
||||
all: all-am
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits doc/Makefile
|
||||
.SUFFIXES: .dvi .info .ps .texi
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnits doc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||
@:
|
||||
|
||||
$(srcdir)/stamp-vti: fileutils.texi $(top_srcdir)/configure.in
|
||||
@(set `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/fileutils.texi`; \
|
||||
$(srcdir)/stamp-vti: coreutils.texi $(top_srcdir)/configure.in
|
||||
@(set `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/coreutils.texi`; \
|
||||
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||
echo "@set EDITION $(VERSION)"; \
|
||||
@@ -173,88 +165,37 @@ $(srcdir)/stamp-vti: fileutils.texi $(top_srcdir)/configure.in
|
||||
mostlyclean-vti:
|
||||
-rm -f vti.tmp
|
||||
|
||||
clean-vti:
|
||||
|
||||
distclean-vti:
|
||||
|
||||
maintainer-clean-vti:
|
||||
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
|
||||
|
||||
fileutils.info: fileutils.texi $(srcdir)/version.texi
|
||||
fileutils.dvi: fileutils.texi $(srcdir)/version.texi
|
||||
|
||||
|
||||
DVIPS = dvips
|
||||
coreutils.info: coreutils.texi $(srcdir)/version.texi
|
||||
coreutils.dvi: coreutils.texi $(srcdir)/version.texi
|
||||
|
||||
.texi.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
||||
`echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) $<
|
||||
|
||||
.texi:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo.dvi:
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.txi.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
|
||||
.txi.dvi:
|
||||
TEXINPUTS=$(srcdir):$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.txi:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
||||
`echo $< | sed 's,.*/,,'`
|
||||
TEXI2DVI = texi2dvi
|
||||
DVIPS = dvips
|
||||
.dvi.ps:
|
||||
$(DVIPS) $< -o $@
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
||||
if test -f $$d/$$ifile; then \
|
||||
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
|
||||
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
|
||||
uninstall-info:
|
||||
uninstall-info-am:
|
||||
$(PRE_UNINSTALL)
|
||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
||||
@if (install-info --version && \
|
||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
|
||||
@@ -281,19 +222,14 @@ dist-info: $(INFO_DEPS)
|
||||
done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -f fileutils.aux fileutils.cp fileutils.cps fileutils.dvi \
|
||||
fileutils.fn fileutils.fns fileutils.pgs fileutils.ky \
|
||||
fileutils.kys fileutils.ps fileutils.log fileutils.pg \
|
||||
fileutils.toc fileutils.tp fileutils.tps fileutils.vr \
|
||||
fileutils.vrs fileutils.op fileutils.tr fileutils.cv \
|
||||
fileutils.cn fileutils.cm fileutils.ov
|
||||
|
||||
clean-aminfo:
|
||||
|
||||
distclean-aminfo:
|
||||
-rm -f coreutils.aux coreutils.cp coreutils.cps coreutils.dvi coreutils.fl \
|
||||
coreutils.fn coreutils.ky coreutils.log coreutils.op \
|
||||
coreutils.pg coreutils.ps coreutils.toc coreutils.tp \
|
||||
coreutils.vr
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
cd $(srcdir) && for i in $(INFO_DEPS); do \
|
||||
cd $(srcdir) && \
|
||||
for i in $(INFO_DEPS); do \
|
||||
rm -f $$i; \
|
||||
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
|
||||
rm -f $$i-[0-9]*; \
|
||||
@@ -303,11 +239,18 @@ tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
@@ -317,73 +260,130 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||
info-am: $(INFO_DEPS)
|
||||
info: info-am
|
||||
dvi-am: $(DVIS)
|
||||
dvi: dvi-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="${top_distdir}" distdir="$(distdir)" \
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
all-am: Makefile $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-info
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(INFO_DEPS)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
-rm -f Makefile.in
|
||||
mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-vti clean-aminfo clean-generic mostlyclean-am
|
||||
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-vti distclean-aminfo distclean-generic clean-am
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-vti maintainer-clean-aminfo \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
||||
if test -f $$d/$$ifile; then \
|
||||
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
|
||||
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \
|
||||
install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \
|
||||
clean-aminfo maintainer-clean-aminfo tags distdir info-am info dvi-am \
|
||||
dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all install-strip \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic dist-info \
|
||||
distclean distclean-generic distdir dvi dvi-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti mostlyclean \
|
||||
mostlyclean-aminfo mostlyclean-generic mostlyclean-vti \
|
||||
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
|
||||
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)
|
||||
|
||||
# List words/regexps here that should not appear in the texinfo documentation.
|
||||
check-texinfo:
|
||||
grep timezone $(srcdir)/*.texi && exit 1 || :
|
||||
grep -w POSIX $(srcdir)/*.texi && exit 1 || :
|
||||
|
||||
check: check-texinfo
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
2
doc/constants.texi
Normal file
2
doc/constants.texi
Normal file
@@ -0,0 +1,2 @@
|
||||
@set DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS 5
|
||||
@set DEFAULT_MAX_N_CONSECUTIVE_SIZE_CHANGES 200
|
||||
11308
doc/coreutils.texi
Normal file
11308
doc/coreutils.texi
Normal file
File diff suppressed because it is too large
Load Diff
395
doc/doclicense.texi
Normal file
395
doc/doclicense.texi
Normal file
@@ -0,0 +1,395 @@
|
||||
@c -*-texinfo-*-
|
||||
@node GNU Free Documentation License
|
||||
@appendix GNU Free Documentation License
|
||||
@center Version 1.1, March 2000
|
||||
@ifnottex
|
||||
@menu
|
||||
* How to use this License for your documents::
|
||||
@end menu
|
||||
@end ifnottex
|
||||
@display
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
@end display
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@enumerate 0
|
||||
@item
|
||||
PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
written document ``free'' in the sense of freedom: to assure everyone
|
||||
the effective freedom to copy and redistribute it, with or without
|
||||
modifying it, either commercially or noncommercially. Secondarily,
|
||||
this License preserves for the author and publisher a way to get
|
||||
credit for their work, while not being considered responsible for
|
||||
modifications made by others.
|
||||
|
||||
This License is a kind of ``copyleft'', which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work that contains a
|
||||
notice placed by the copyright holder saying it can be distributed
|
||||
under the terms of this License. The ``Document'', below, refers to any
|
||||
such manual or work. Any member of the public is a licensee, and is
|
||||
addressed as ``you''.
|
||||
|
||||
A ``Modified Version'' of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A ``Secondary Section'' is a named appendix or a front-matter section of
|
||||
the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall subject
|
||||
(or to related matters) and contains nothing that could fall directly
|
||||
within that overall subject. (For example, if the Document is in part a
|
||||
textbook of mathematics, a Secondary Section may not explain any
|
||||
mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The ``Invariant Sections'' are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License.
|
||||
|
||||
The ``Cover Texts'' are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License.
|
||||
|
||||
A ``Transparent'' copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, whose contents can be viewed and edited directly and
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup has been designed to thwart or discourage
|
||||
subsequent modification by readers is not Transparent. A copy that is
|
||||
not ``Transparent'' is called ``Opaque''.
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||
or XML using a publicly available DTD, and standard-conforming simple
|
||||
HTML designed for human modification. Opaque formats include
|
||||
PostScript, PDF, proprietary formats that can be read and edited only
|
||||
by proprietary word processors, SGML or XML for which the DTD and/or
|
||||
processing tools are not generally available, and the
|
||||
machine-generated HTML produced by some word processors for output
|
||||
purposes only.
|
||||
|
||||
The ``Title Page'' means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, ``Title Page'' means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies of the Document numbering more than 100,
|
||||
and the Document's license notice requires Cover Texts, you must enclose
|
||||
the copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a publicly-accessible computer-network location containing a complete
|
||||
Transparent copy of the Document, free of added material, which the
|
||||
general network-using public has access to download anonymously at no
|
||||
charge using public-standard network protocols. If you use the latter
|
||||
option, you must take reasonably prudent steps, when you begin
|
||||
distribution of Opaque copies in quantity, to ensure that this
|
||||
Transparent copy will remain thus accessible at the stated location
|
||||
until at least one year after the last time you distribute an Opaque
|
||||
copy (directly or through your agents or retailers) of that edition to
|
||||
the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.@*
|
||||
B. List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has less than five).@*
|
||||
C. State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.@*
|
||||
D. Preserve all the copyright notices of the Document.@*
|
||||
E. Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.@*
|
||||
F. Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.@*
|
||||
G. Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.@*
|
||||
H. Include an unaltered copy of this License.@*
|
||||
I. Preserve the section entitled ``History'', and its title, and add to
|
||||
it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section entitled ``History'' in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.@*
|
||||
J. Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the ``History'' section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.@*
|
||||
K. In any section entitled ``Acknowledgements'' or ``Dedications'',
|
||||
preserve the section's title, and preserve in the section all the
|
||||
substance and tone of each of the contributor acknowledgements
|
||||
and/or dedications given therein.@*
|
||||
L. Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.@*
|
||||
M. Delete any section entitled ``Endorsements''. Such a section
|
||||
may not be included in the Modified Version.@*
|
||||
N. Do not retitle any existing section as ``Endorsements''
|
||||
or to conflict in title with any Invariant Section.@*
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section entitled ``Endorsements'', provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties--for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections entitled ``History''
|
||||
in the various original documents, forming one section entitled
|
||||
``History''; likewise combine any sections entitled ``Acknowledgements'',
|
||||
and any sections entitled ``Dedications''. You must delete all sections
|
||||
entitled ``Endorsements.''
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, does not as a whole count as a Modified Version
|
||||
of the Document, provided no compilation copyright is claimed for the
|
||||
compilation. Such a compilation is called an ``aggregate'', and this
|
||||
License does not apply to the other self-contained works thus compiled
|
||||
with the Document, on account of their being thus compiled, if they
|
||||
are not themselves derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one quarter
|
||||
of the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that surround only the Document within the aggregate.
|
||||
Otherwise they must appear on covers around the whole aggregate.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License provided that you also include the
|
||||
original English version of this License. In case of a disagreement
|
||||
between the translation and the original English version of this
|
||||
License, the original English version will prevail.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document except
|
||||
as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
@iftex
|
||||
@sp1
|
||||
@end iftex
|
||||
@item
|
||||
FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
http://www.gnu.org/copyleft/.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@node How to use this License for your documents
|
||||
@unnumberedsec ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
|
||||
Copyright (C) @var{year} @var{your name}.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with the Invariant Sections being @var{list their titles}, with the
|
||||
Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
|
||||
A copy of the license is included in the section entitled ``GNU
|
||||
Free Documentation License''.
|
||||
@end group
|
||||
@end smallexample
|
||||
If you have no Invariant Sections, write ``with no Invariant Sections''
|
||||
instead of saying which ones are invariant. If you have no
|
||||
Front-Cover Texts, write ``no Front-Cover Texts'' instead of
|
||||
``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
@@ -100,6 +100,34 @@ When a month is written this way, it is still considered to be written
|
||||
numerically, instead of being ``spelled in full''; this changes the
|
||||
allowed strings.
|
||||
|
||||
@cindex language, in dates
|
||||
In the current implementation, only English is supported for words and
|
||||
abbreviations like @samp{AM}, @samp{DST}, @samp{EST}, @samp{first},
|
||||
@samp{January}, @samp{Sunday}, @samp{tomorrow}, and @samp{year}.
|
||||
|
||||
@cindex language, in dates
|
||||
@cindex time zone item
|
||||
The output of @command{date} is not always acceptable as a date string,
|
||||
not only because of the language problem, but also because there is no
|
||||
standard meaning for time zone items like @samp{IST}. When using
|
||||
@command{date} to generate a date string intended to be parsed later,
|
||||
specify a date format that is independent of language and that does not
|
||||
use time zone items other than @samp{UTC} and @samp{Z}. Here are some
|
||||
ways to do this:
|
||||
|
||||
@example
|
||||
$ LC_ALL=C TZ=UTC0 date
|
||||
Fri Dec 15 19:48:05 UTC 2000
|
||||
$ TZ=UTC0 date +"%Y-%m-%d %H:%M:%SZ"
|
||||
2000-12-15 19:48:05Z
|
||||
$ date --iso-8601=seconds # a GNU extension
|
||||
2000-12-15T11:48:05-0800
|
||||
$ date --rfc-822 # a GNU extension
|
||||
Fri, 15 Dec 2000 11:48:05 -0800
|
||||
$ date +"%Y-%m-%d %H:%M:%S %z" # %z is a GNU extension.
|
||||
2000-12-15 11:48:05 -0800
|
||||
@end example
|
||||
|
||||
@cindex case, ignored in dates
|
||||
@cindex comments, in dates
|
||||
Alphabetic case is completely ignored in dates. Comments may be introduced
|
||||
@@ -238,13 +266,15 @@ but not both.
|
||||
@cindex time zone item
|
||||
|
||||
A @dfn{time zone item} specifies an international time zone, indicated
|
||||
by a small set of letters, e.g., @samp{UTC} for Coordinated Universal
|
||||
by a small set of letters, e.g., @samp{UTC} or @samp{Z}
|
||||
for Coordinated Universal
|
||||
Time. Any included periods are ignored. By following a
|
||||
non-daylight-saving time zone by the string @samp{DST} in a separate
|
||||
word (that is, separated by some white space), the corresponding
|
||||
daylight saving time zone may be specified.
|
||||
|
||||
Time zone items are obsolescent and are not recommended, because they
|
||||
Time zone items other than @samp{UTC} and @samp{Z}
|
||||
are obsolescent and are not recommended, because they
|
||||
are ambiguous; for example, @samp{EST} has a different meaning in
|
||||
Australia than in the United States. Instead, it's better to use
|
||||
unambiguous numeric time zone corrections like @samp{-0500}, as
|
||||
|
||||
@@ -69,11 +69,12 @@ matter what group the user who creates them is in.
|
||||
@cindex sticky
|
||||
@cindex swap space, saving text image in
|
||||
@cindex text image, saving in swap space
|
||||
@cindex append-only directories
|
||||
@cindex restricted deletion flag
|
||||
save the program's text image on the swap device so it will load more
|
||||
quickly when run (called the @dfn{sticky bit}). For directories on some
|
||||
systems, prevent users from removing files that they do not own in the
|
||||
directory; this is called making the directory @dfn{append-only}.
|
||||
systems, prevent users from removing or renaming a file in a directory
|
||||
unless they own the file or the directory; this is called the
|
||||
@dfn{restricted deletion flag} for the directory.
|
||||
@end enumerate
|
||||
|
||||
@node Symbolic Modes
|
||||
@@ -118,7 +119,7 @@ format:
|
||||
|
||||
@noindent
|
||||
The spaces between the three parts above are shown for readability only;
|
||||
symbolic modes can not contain spaces.
|
||||
symbolic modes cannot contain spaces.
|
||||
|
||||
The @var{users} part tells which users' access to the file is changed.
|
||||
It consists of one or more of the following letters (or it can be empty;
|
||||
@@ -427,7 +428,7 @@ This number is always interpreted in octal; you do not have to add a
|
||||
leading 0, as you do in C. Mode 0055 is the same as mode 55.
|
||||
|
||||
A numeric mode is usually shorter than the corresponding symbolic
|
||||
mode, but it is limited in that it can not take into account a file's
|
||||
mode, but it is limited in that it cannot take into account a file's
|
||||
previous permissions; it can only set them absolutely.
|
||||
|
||||
On most systems, the permissions granted to the user,
|
||||
|
||||
3373
doc/sh-utils.texi
3373
doc/sh-utils.texi
File diff suppressed because it is too large
Load Diff
242
doc/texinfo.tex
242
doc/texinfo.tex
@@ -3,10 +3,10 @@
|
||||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{2000-12-11.07}
|
||||
\def\texinfoversion{2001-06-21.10}
|
||||
%
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
|
||||
% Free Software Foundation, Inc.
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
|
||||
% 2000, 01 Free Software Foundation, Inc.
|
||||
%
|
||||
% This texinfo.tex file is free software; you can redistribute it and/or
|
||||
% modify it under the terms of the GNU General Public License as
|
||||
@@ -170,6 +170,16 @@
|
||||
}%
|
||||
\fi
|
||||
|
||||
% 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
|
||||
\removelastskip\penalty-100\medskip\fi\fi}
|
||||
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
|
||||
\removelastskip\penalty-200\bigskip\fi\fi}
|
||||
|
||||
% For @cropmarks command.
|
||||
% Do @cropmarks to get crop marks.
|
||||
%
|
||||
@@ -431,7 +441,7 @@
|
||||
% environments. --karl, 6may93
|
||||
%{\advance \baselineskip by -\singlespaceskip
|
||||
%\kern \baselineskip}%
|
||||
\setleading \singlespaceskip
|
||||
\setleading\singlespaceskip
|
||||
}
|
||||
|
||||
%% Simple single-character @ commands
|
||||
@@ -730,9 +740,9 @@ where each line of input produces a line of output.}
|
||||
\fi
|
||||
%
|
||||
\ifodd\pageno
|
||||
\def\temp{\inleftmargin\lefttext}%
|
||||
\def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
|
||||
\else
|
||||
\def\temp{\inrightmargin\righttext}%
|
||||
\def\temp{\inleftmargin\lefttext}%
|
||||
\fi
|
||||
\temp
|
||||
}
|
||||
@@ -924,11 +934,15 @@ where each line of input produces a line of output.}
|
||||
\fi
|
||||
\ifx\empty\imagewidth\else width \imagewidth \fi
|
||||
\ifx\empty\imageheight\else height \imageheight \fi
|
||||
{#1.pdf}%
|
||||
\ifnum\pdftexversion<13
|
||||
#1.pdf%
|
||||
\else
|
||||
{#1.pdf}%
|
||||
\fi
|
||||
\ifnum\pdftexversion < 14 \else
|
||||
\pdfrefximage \pdflastximage
|
||||
\fi}
|
||||
\def\pdfmkdest#1{\pdfdest name{#1@} xyz}
|
||||
\def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
|
||||
\def\pdfmkpgn#1{#1@}
|
||||
\let\linkcolor = \Blue % was Cyan, but that seems light?
|
||||
\def\endlink{\Black\pdfendlink}
|
||||
@@ -1026,6 +1040,7 @@ where each line of input produces a line of output.}
|
||||
\def\pdfurl#1{%
|
||||
\begingroup
|
||||
\normalturnoffactive\def\@{@}%
|
||||
\let\value=\expandablevalue
|
||||
\leavevmode\Red
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
|
||||
@@ -1053,9 +1068,8 @@ where each line of input produces a line of output.}
|
||||
\def\makelink{\addtokens{\toksB}%
|
||||
{\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
|
||||
\def\pdflink#1{%
|
||||
\startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}}
|
||||
\startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
|
||||
\linkcolor #1\endlink}
|
||||
\def\mkpgn#1{#1@}
|
||||
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
|
||||
\fi % \ifx\pdfoutput
|
||||
|
||||
@@ -1072,9 +1086,29 @@ where each line of input produces a line of output.}
|
||||
% We don't need math for this one.
|
||||
\def\ttsl{\tenttsl}
|
||||
|
||||
% Default leading.
|
||||
\newdimen\textleading \textleading = 13.2pt
|
||||
|
||||
% Set the baselineskip to #1, and the lineskip and strut size
|
||||
% correspondingly. There is no deep meaning behind these magic numbers
|
||||
% used as factors; they just match (closely enough) what Knuth defined.
|
||||
%
|
||||
\def\lineskipfactor{.08333}
|
||||
\def\strutheightpercent{.70833}
|
||||
\def\strutdepthpercent {.29167}
|
||||
%
|
||||
\def\setleading#1{%
|
||||
\normalbaselineskip = #1\relax
|
||||
\normallineskip = \lineskipfactor\normalbaselineskip
|
||||
\normalbaselines
|
||||
\setbox\strutbox =\hbox{%
|
||||
\vrule width0pt height\strutheightpercent\baselineskip
|
||||
depth \strutdepthpercent \baselineskip
|
||||
}%
|
||||
}
|
||||
|
||||
% Use Computer Modern fonts at \magstephalf (11pt).
|
||||
\newcount\mainmagstep
|
||||
\mainmagstep=\magstephalf
|
||||
\newcount\mainmagstep \mainmagstep=\magstephalf
|
||||
|
||||
% Set the font macro #1 to the font named #2, adding on the
|
||||
% specified font prefix (normally `cm').
|
||||
@@ -1141,6 +1175,18 @@ where each line of input produces a line of output.}
|
||||
\font\smalli=cmmi9
|
||||
\font\smallsy=cmsy9
|
||||
|
||||
% Fonts for small examples (8pt).
|
||||
\setfont\smallerrm\rmshape{8}{1000}
|
||||
\setfont\smallertt\ttshape{8}{1000}
|
||||
\setfont\smallerbf\bfshape{10}{800}
|
||||
\setfont\smallerit\itshape{8}{1000}
|
||||
\setfont\smallersl\slshape{8}{1000}
|
||||
\setfont\smallersf\sfshape{8}{1000}
|
||||
\setfont\smallersc\scshape{10}{800}
|
||||
\setfont\smallerttsl\ttslshape{10}{800}
|
||||
\font\smalleri=cmmi8
|
||||
\font\smallersy=cmsy8
|
||||
|
||||
% Fonts for title page:
|
||||
\setfont\titlerm\rmbshape{12}{\magstep3}
|
||||
\setfont\titleit\itbshape{10}{\magstep4}
|
||||
@@ -1229,7 +1275,7 @@ where each line of input produces a line of output.}
|
||||
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
|
||||
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
|
||||
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
|
||||
\resetmathfonts}
|
||||
\resetmathfonts \setleading{\textleading}}
|
||||
\def\titlefonts{%
|
||||
\let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
|
||||
\let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
|
||||
@@ -1258,7 +1304,14 @@ where each line of input produces a line of output.}
|
||||
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
|
||||
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
|
||||
\let\tenttsl=\smallttsl
|
||||
\resetmathfonts \setleading{11pt}}
|
||||
\resetmathfonts \setleading{10.5pt}}
|
||||
\def\smallerfonts{%
|
||||
\let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
|
||||
\let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
|
||||
\let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
|
||||
\let\tenttsl=\smallerttsl
|
||||
\resetmathfonts \setleading{9.5pt}}
|
||||
\let\smallexamplefonts = \smallerfonts
|
||||
|
||||
% Set up the default fonts, so we can use them for creating boxes.
|
||||
%
|
||||
@@ -2452,10 +2505,14 @@ width0pt\relax} \fi
|
||||
\let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont
|
||||
\let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont
|
||||
\let\tensf=\nullfont
|
||||
% Similarly for index fonts (mostly for their use in smallexample).
|
||||
% Similarly for index fonts.
|
||||
\let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont
|
||||
\let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont
|
||||
\let\smallsf=\nullfont
|
||||
% Similarly for smallexample fonts.
|
||||
\let\smallerrm=\nullfont \let\smallerit=\nullfont \let\smallersl=\nullfont
|
||||
\let\smallerbf=\nullfont \let\smallertt=\nullfont \let\smallersc=\nullfont
|
||||
\let\smallersf=\nullfont
|
||||
%
|
||||
% Don't complain when characters are missing from the fonts.
|
||||
\tracinglostchars = 0
|
||||
@@ -2904,16 +2961,17 @@ width0pt\relax} \fi
|
||||
% Now the real index entry with the fonts.
|
||||
\toks0 = {#2}%
|
||||
%
|
||||
% If third (subentry) arg is present, add it to the index
|
||||
% string. And include a space.
|
||||
% If the third (subentry) arg is present, add it to the index
|
||||
% line to write.
|
||||
\ifx\thirdarg\emptymacro \else
|
||||
\toks0 = \expandafter{\the\toks0 \space #3}%
|
||||
\toks0 = \expandafter{\the\toks0{#3}}%
|
||||
\fi
|
||||
%
|
||||
% Set up the complete index entry, with both the sort key
|
||||
% and the original text, including any font commands. We write
|
||||
% three arguments to \entry to the .?? file, texindex reduces to
|
||||
% two when writing the .??s sorted result.
|
||||
% Set up the complete index entry, with both the sort key and
|
||||
% the original text, including any font commands. We write
|
||||
% three arguments to \entry to the .?? file (four in the
|
||||
% subentry case), texindex reduces to two when writing the .??s
|
||||
% sorted result.
|
||||
\edef\temp{%
|
||||
\write\csname#1indfile\endcsname{%
|
||||
\realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
|
||||
@@ -3135,11 +3193,18 @@ width0pt\relax} \fi
|
||||
\def\primary #1{\line{#1\hfil}}
|
||||
|
||||
\newskip\secondaryindent \secondaryindent=0.5cm
|
||||
|
||||
\def\secondary #1#2{
|
||||
{\parfillskip=0in \parskip=0in
|
||||
\hangindent =1in \hangafter=1
|
||||
\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
|
||||
\def\secondary#1#2{{%
|
||||
\parfillskip=0in
|
||||
\parskip=0in
|
||||
\hangindent=1in
|
||||
\hangafter=1
|
||||
\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
|
||||
\ifpdf
|
||||
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
|
||||
\else
|
||||
#2
|
||||
\fi
|
||||
\par
|
||||
}}
|
||||
|
||||
% Define two-column mode, which we use to typeset indexes.
|
||||
@@ -4134,9 +4199,17 @@ width0pt\relax} \fi
|
||||
% is reset to zero; thus the \afterenvbreak inserts no space -- but the
|
||||
% start of the next paragraph will insert \parskip
|
||||
%
|
||||
\def\aboveenvbreak{{\advance\envskipamount by \parskip
|
||||
\endgraf \ifdim\lastskip<\envskipamount
|
||||
\removelastskip \penalty-50 \vskip\envskipamount \fi}}
|
||||
\def\aboveenvbreak{{%
|
||||
\ifnum\lastpenalty < 10000
|
||||
\advance\envskipamount by \parskip
|
||||
\endgraf
|
||||
\ifdim\lastskip<\envskipamount
|
||||
\removelastskip
|
||||
\penalty-50
|
||||
\vskip\envskipamount
|
||||
\fi
|
||||
\fi
|
||||
}}
|
||||
|
||||
\let\afterenvbreak = \aboveenvbreak
|
||||
|
||||
@@ -4268,7 +4341,7 @@ width0pt\relax} \fi
|
||||
\def\smalllispx{\begingroup
|
||||
\def\Esmalllisp{\nonfillfinish\endgroup}%
|
||||
\def\Esmallexample{\nonfillfinish\endgroup}%
|
||||
\smallfonts
|
||||
\smallexamplefonts
|
||||
\lisp
|
||||
}
|
||||
|
||||
@@ -4279,12 +4352,12 @@ width0pt\relax} \fi
|
||||
\let\Edisplay = \nonfillfinish
|
||||
\gobble
|
||||
}
|
||||
|
||||
%
|
||||
% @smalldisplay (when @smallbook): @display plus smaller fonts.
|
||||
%
|
||||
\def\smalldisplayx{\begingroup
|
||||
\def\Esmalldisplay{\nonfillfinish\endgroup}%
|
||||
\smallfonts \rm
|
||||
\smallexamplefonts \rm
|
||||
\display
|
||||
}
|
||||
|
||||
@@ -4296,12 +4369,12 @@ width0pt\relax} \fi
|
||||
\let\Eformat = \nonfillfinish
|
||||
\gobble
|
||||
}
|
||||
|
||||
%
|
||||
% @smallformat (when @smallbook): @format plus smaller fonts.
|
||||
%
|
||||
\def\smallformatx{\begingroup
|
||||
\def\Esmallformat{\nonfillfinish\endgroup}%
|
||||
\smallfonts \rm
|
||||
\smallexamplefonts \rm
|
||||
\format
|
||||
}
|
||||
|
||||
@@ -5452,13 +5525,15 @@ width0pt\relax} \fi
|
||||
\ifpdf
|
||||
\leavevmode
|
||||
\getfilename{#4}%
|
||||
\ifnum\filenamelength>0
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
goto file{\the\filename.pdf} name{#1@}%
|
||||
\else
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
goto name{#1@}%
|
||||
\fi
|
||||
{\normalturnoffactive
|
||||
\ifnum\filenamelength>0
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
goto file{\the\filename.pdf} name{#1}%
|
||||
\else
|
||||
\startlink attr{/Border [0 0 0]}%
|
||||
goto name{#1}%
|
||||
\fi
|
||||
}%
|
||||
\linkcolor
|
||||
\fi
|
||||
%
|
||||
@@ -5738,24 +5813,6 @@ width0pt\relax} \fi
|
||||
|
||||
}%end \catcode `\@=11
|
||||
|
||||
% Set the baselineskip to #1, and the lineskip and strut size
|
||||
% correspondingly. There is no deep meaning behind these magic numbers
|
||||
% used as factors; they just match (closely enough) what Knuth defined.
|
||||
%
|
||||
\def\lineskipfactor{.08333}
|
||||
\def\strutheightpercent{.70833}
|
||||
\def\strutdepthpercent {.29167}
|
||||
%
|
||||
\def\setleading#1{%
|
||||
\normalbaselineskip = #1\relax
|
||||
\normallineskip = \lineskipfactor\normalbaselineskip
|
||||
\normalbaselines
|
||||
\setbox\strutbox =\hbox{%
|
||||
\vrule width0pt height\strutheightpercent\baselineskip
|
||||
depth \strutdepthpercent \baselineskip
|
||||
}%
|
||||
}
|
||||
|
||||
% @| inserts a changebar to the left of the current line. It should
|
||||
% surround any changed text. This approach does *not* work if the
|
||||
% change spans more than two lines of output. To handle that, we would
|
||||
@@ -5827,8 +5884,10 @@ width0pt\relax} \fi
|
||||
% Arguments to @image:
|
||||
% #1 is (mandatory) image filename; we tack on .eps extension.
|
||||
% #2 is (optional) width, #3 is (optional) height.
|
||||
% #4 is just the usual extra ignored arg for parsing this stuff.
|
||||
\def\imagexxx#1,#2,#3,#4\finish{%
|
||||
% #4 is (ignored optional) html alt text.
|
||||
% #5 is (ignored optional) extension.
|
||||
% #6 is just the usual extra ignored arg for parsing this stuff.
|
||||
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{%
|
||||
\ifpdf
|
||||
\centerline{\dopdfimage{#1}{#2}{#3}}%
|
||||
\else
|
||||
@@ -5836,7 +5895,8 @@ width0pt\relax} \fi
|
||||
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
|
||||
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
|
||||
\begingroup
|
||||
\catcode`\^^M = 5 % in case we're inside an example
|
||||
\catcode`\^^M = 5 % in case we're inside an example
|
||||
\normalturnoffactive % allow _ et al. in names
|
||||
% If the image is by itself, center it.
|
||||
\ifvmode
|
||||
\nobreak\bigskip
|
||||
@@ -5922,8 +5982,9 @@ should work if nowhere else does.}
|
||||
}
|
||||
|
||||
% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
|
||||
% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can
|
||||
% set \parskip and call \setleading for \baselineskip.
|
||||
% 4) hoffset; 5) binding offset; 6) topskip. We also call
|
||||
% \setleading{\textleading}, so the caller should define \textleading.
|
||||
% The caller should also set \parskip.
|
||||
%
|
||||
\def\internalpagesizes#1#2#3#4#5#6{%
|
||||
\voffset = #3\relax
|
||||
@@ -5944,14 +6005,25 @@ should work if nowhere else does.}
|
||||
\normaloffset = #4\relax
|
||||
\bindingoffset = #5\relax
|
||||
%
|
||||
\setleading{\textleading}
|
||||
%
|
||||
\parindent = \defaultparindent
|
||||
\setemergencystretch
|
||||
}
|
||||
|
||||
% Use `small' versions.
|
||||
%
|
||||
\def\smallenvironments{%
|
||||
\let\smalldisplay = \smalldisplayx
|
||||
\let\smallexample = \smalllispx
|
||||
\let\smallformat = \smallformatx
|
||||
\let\smalllisp = \smalllispx
|
||||
}
|
||||
|
||||
% @letterpaper (the default).
|
||||
\def\letterpaper{{\globaldefs = 1
|
||||
\parskip = 3pt plus 2pt minus 1pt
|
||||
\setleading{13.2pt}%
|
||||
\textleading = 13.2pt
|
||||
%
|
||||
% If page is nothing but text, make it come out even.
|
||||
\internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
|
||||
@@ -5960,7 +6032,7 @@ should work if nowhere else does.}
|
||||
% Use @smallbook to reset parameters for 7x9.5 (or so) format.
|
||||
\def\smallbook{{\globaldefs = 1
|
||||
\parskip = 2pt plus 1pt
|
||||
\setleading{12pt}%
|
||||
\textleading = 12pt
|
||||
%
|
||||
\internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
|
||||
%
|
||||
@@ -5970,17 +6042,13 @@ should work if nowhere else does.}
|
||||
\contentsrightmargin = 0pt
|
||||
\deftypemargin = 0pt
|
||||
\defbodyindent = .5cm
|
||||
%
|
||||
\let\smalldisplay = \smalldisplayx
|
||||
\let\smallexample = \smalllispx
|
||||
\let\smallformat = \smallformatx
|
||||
\let\smalllisp = \smalllispx
|
||||
\smallenvironments
|
||||
}}
|
||||
|
||||
% Use @afourpaper to print on European A4 paper.
|
||||
\def\afourpaper{{\globaldefs = 1
|
||||
\setleading{12pt}%
|
||||
\parskip = 3pt plus 2pt minus 1pt
|
||||
\textleading = 12pt
|
||||
%
|
||||
\internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
|
||||
%
|
||||
@@ -5988,23 +6056,39 @@ should work if nowhere else does.}
|
||||
\hfuzz = 1pt
|
||||
}}
|
||||
|
||||
% Use @afivepaper to print on European A5 paper.
|
||||
% From romildo@urano.iceb.ufop.br, 2 July 2000.
|
||||
% He also recommends making @example and @lisp be small.
|
||||
\def\afivepaper{{\globaldefs = 1
|
||||
\parskip = 2pt plus 1pt minus 0.1pt
|
||||
\textleading = 12.5pt
|
||||
%
|
||||
\internalpagesizes{166mm}{120mm}{\voffset}{-8mm}{\bindingoffset}{8pt}%
|
||||
%
|
||||
\lispnarrowing = 0.2in
|
||||
\tolerance = 800
|
||||
\hfuzz = 1.2pt
|
||||
\contentsrightmargin = 0mm
|
||||
\deftypemargin = 0pt
|
||||
\defbodyindent = 2mm
|
||||
\tableindent = 12mm
|
||||
%
|
||||
\smallenvironments
|
||||
}}
|
||||
|
||||
% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
|
||||
% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
|
||||
\def\afourlatex{{\globaldefs = 1
|
||||
\setleading{13.6pt}%
|
||||
\textleading = 13.6pt
|
||||
%
|
||||
\afourpaper
|
||||
\internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
|
||||
%
|
||||
\globaldefs = 0
|
||||
}}
|
||||
|
||||
% Use @afourwide to print on European A4 paper in wide format.
|
||||
\def\afourwide{%
|
||||
\afourpaper
|
||||
\internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
|
||||
%
|
||||
\globaldefs = 0
|
||||
}
|
||||
|
||||
% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
|
||||
@@ -6018,7 +6102,7 @@ should work if nowhere else does.}
|
||||
\globaldefs = 1
|
||||
%
|
||||
\parskip = 3pt plus 2pt minus 1pt
|
||||
\setleading{13.2pt}%
|
||||
\setleading{\textleading}%
|
||||
%
|
||||
\internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
|
||||
}}
|
||||
|
||||
4415
doc/textutils.texi
4415
doc/textutils.texi
File diff suppressed because it is too large
Load Diff
290
lib/ChangeLog
290
lib/ChangeLog
@@ -1,3 +1,283 @@
|
||||
2001-07-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (noinst_HEADERS): Remove definition, per new automake
|
||||
recommendation.
|
||||
(libfetish_a_SOURCES): Put all .h files here instead.
|
||||
Remove a thus-exposed (better checks in automake) duplicate and
|
||||
two unnecessary .h files.
|
||||
|
||||
2001-06-11 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.c: Update from GNU libc.
|
||||
|
||||
2001-05-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* readutmp.h (UT_TYPE): Define.
|
||||
|
||||
2001-05-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* argmatch.c: Include "quote.h".
|
||||
(argmatch_invalid): Remove explicit `' quotes. Instead, use the
|
||||
quote function. Reported by Göran Uddeborg.
|
||||
|
||||
2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
|
||||
|
||||
* dirname.c (dir_name): Compute append_dot using path, not newpath
|
||||
which is not yet declared.
|
||||
|
||||
2001-05-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/Makefile.am (libfetish_a_SOURCES):
|
||||
Add strftime.c, since we now compile it on all hosts.
|
||||
|
||||
* lib/strftime.c (my_strftime):
|
||||
Define to nstrftime if emacs, but only if my_strftime is not defined.
|
||||
(extra_args, extra_args_spec, extra_args_spec_iso): Rename from
|
||||
ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
|
||||
Add one more extra argument: a nanoseconds value.
|
||||
All uses changed.
|
||||
(ns): New macro.
|
||||
(my_strftime function): Add %N format.
|
||||
(emacs_strftimeu): Renamed from emacs_strftime,
|
||||
with extra ut argument.
|
||||
|
||||
2001-05-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
dirname code cleanup. base_name now behaves more compatibly
|
||||
with POSIX basename when given file names that have trailing
|
||||
slashes, and similarly for dir_name. Add new primitives
|
||||
base_len and dir_len. Put the directory-name-related decls
|
||||
into dirname.h.
|
||||
|
||||
* addext.c (ISSLASH, base_name): Remove; now in dirname.h.
|
||||
* backupfile.c (base_name): Likewise.
|
||||
* basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
|
||||
* dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
|
||||
* makepath.c (strip_trailing_slashes): Likewise.
|
||||
* path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
|
||||
Likewise.
|
||||
* rename.c (strip_trailing_slashes): Likewise.
|
||||
* same.c (base_name): Likewise.
|
||||
* stripslash.c (ISSLASH): Likewise.
|
||||
|
||||
* addext.c: Include <dirname.h> after size_t is defined.
|
||||
* backupfile.c: Likewise.
|
||||
|
||||
* addext.c (addext): Use base_len to trim redundant
|
||||
trailing slashes instead of doing it ourselves.
|
||||
But do not trim the last slash if it is not redundant.
|
||||
|
||||
* backupfile.c (find_backup_file_name,
|
||||
max_backup_version): Use base_len instead of rolling it ourselves.
|
||||
Handle the case of "" and (on DOS) "C:" correctly.
|
||||
|
||||
* basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
|
||||
Include <string.h>, <dirname.h>.
|
||||
(base_name): Allow file names ending in slashes, other than names
|
||||
that are all slashes. In this case, return the basename followed
|
||||
by the slashes. This is more general, and can be used in places
|
||||
where the original base_name purposely had an assertion failure.
|
||||
(base_len): New function.
|
||||
|
||||
* dirname.c: Include <string.h> instead of <stdlib.h>.
|
||||
Do not include <assert.h>; no longer needed.
|
||||
Include xalloc.h.
|
||||
(memrchr): Remove decl.
|
||||
(dir_name_r): Remove.
|
||||
(dir_len): Renamed from dirlen. All callers changed.
|
||||
Rewrite in terms of base_name, for simplicity and consistency.
|
||||
(dir_name): Never return NULL. All callers changed.
|
||||
Do not include <stdlib.h> in test program; no longer needed.
|
||||
return 0; is fine for test program.
|
||||
|
||||
* dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
|
||||
New macros.
|
||||
(base_name, base_len, dir_len, strip_trailing_slashes): New decls.
|
||||
|
||||
* path-concat.c (path_concat): Use base_len to compute
|
||||
base length, not strlen; this means we cannot rely on memcpy
|
||||
to null-terminate.
|
||||
|
||||
* same.c (STREQ): Remove.
|
||||
(same_name): Handle the case where the basename ends in trailing '/'.
|
||||
|
||||
* stripslash.c (strip_trailing_slashes): Return nonzero if
|
||||
a slash was stripped. Do not strip the last slash after a
|
||||
file system prefix.
|
||||
|
||||
2001-04-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
|
||||
recomputed; that's necessary when the offset spans a DST transition.
|
||||
Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
|
||||
|
||||
2001-04-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.h, regex.c: Update from GNU libc.
|
||||
|
||||
2001-03-19 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* version-etc.c (version_etc_copyright): Update to 2001.
|
||||
|
||||
2001-03-16 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* tempname.c (uint64_t): Define to uintmax_t if
|
||||
not defined, and if UINT64_MAX is not defined.
|
||||
Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
|
||||
Reported by John David Anglin.
|
||||
|
||||
2001-03-10 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
|
||||
alias if codeset is empty.
|
||||
* config.charset (BeOS): Use wildcard syntax.
|
||||
|
||||
2001-03-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
|
||||
Don't insert a backslash when concatenating e.g., `C:' and `foo'.
|
||||
From Bruno Haible.
|
||||
|
||||
2001-03-06 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
|
||||
Don't return NULL.
|
||||
* unicodeio.c (print_unicode_char): Simplify accordingly.
|
||||
|
||||
2001-03-06 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
|
||||
support for DOS/DJGPP.
|
||||
|
||||
2001-02-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES):
|
||||
Add dup-safer.c, fopen-safer.c.
|
||||
(noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
|
||||
|
||||
* dup-safer.c, fopen-safer.c, stdio-safer.h,
|
||||
lib/unistd-safer.h: New files.
|
||||
|
||||
2001-02-25 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
The mkstemp replacement is taken from glibc 2.2.2, with some
|
||||
portability fixes for use outside glibc, as follows:
|
||||
|
||||
* tempname.c (struct_stat64): New macro.
|
||||
(direxists, __gen_tempname): Use it.
|
||||
This avoids a portability problem with Solaris 8.
|
||||
|
||||
* tempname.c (<config.h>): Include if HAVE_CONFIG_H.
|
||||
(<stddef.h>, <stdint.h>, <string.h>):
|
||||
Include only if STDC_HEADERS || _LIBC.
|
||||
(<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
|
||||
(<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
|
||||
(<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
|
||||
(__set_errno): Define this macro if <errno.h> doesn't.
|
||||
(P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
|
||||
Define these macros if <stdio.h> doesn't.
|
||||
(S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
|
||||
Define these macros if <sys/stat.h>
|
||||
doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
|
||||
(stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
|
||||
__xstat64): Define if not _LIBC.
|
||||
(__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
|
||||
(__gen_tempname): Invoke gettimeofday only if
|
||||
HAVE_GETTIMEOFDAY || _LIBC;
|
||||
otherwise, fall back on plain "time".
|
||||
Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
|
||||
|
||||
* mkstemp.c (__GT_FILE): Define to zero if not defined.
|
||||
|
||||
* mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
|
||||
|
||||
2001-02-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* strtoul.c: Sync from GNU libc. Use double quotes, not <...>
|
||||
around included file name.
|
||||
|
||||
* strnlen.c (__strnlen): Merge in a change from GNU libc.
|
||||
|
||||
* strftime.c: Update from GNU libc (the only changes were to comments).
|
||||
|
||||
2001-02-13 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
|
||||
|
||||
2001-02-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* mbswidth.c, quotearg.c (mbrtowc, mbsinit):
|
||||
Remove workaround macros for hosts that have mbrtowc but not
|
||||
mbstate_t, as we now insist on proper declarations for both
|
||||
before using mbrtowc.
|
||||
|
||||
2001-02-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.c: Update from libc.
|
||||
|
||||
2001-02-16 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* alloca.c (malloc): Undef before defining, since stdlib.h
|
||||
may have defined it. Needed for Encore Umax-3.0.9.16b systems.
|
||||
Reported by Mark Hounschell via Paul Eggert.
|
||||
|
||||
2001-01-30 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* config.charset: Update for FreeBSD 4.2.
|
||||
|
||||
2001-01-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* quotearg.c: Include stddef.h.
|
||||
* quote.c: Include stddef.h.
|
||||
Reported by Axel Kittenberger.
|
||||
|
||||
* xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
|
||||
line in double quotes so that it evokes a better diagnostic.
|
||||
[HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
|
||||
Reported by Axel Kittenberger.
|
||||
|
||||
2001-01-15 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* unicodeio.c (print_unicode_char): Cast the second iconv() arg,
|
||||
to avoid a warning. Add back 'const' to inptr.
|
||||
|
||||
2001-01-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* basename.c: Include <stdio.h>, needed by assert on SunOS4.
|
||||
From Bruno Haible.
|
||||
|
||||
2001-01-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* rename.c: New file. From Volker Borchert.
|
||||
Include stdlib.h, string.h or strings.h, and xalloc.h.
|
||||
Use strip_trailing_slashes rather than open-coding it.
|
||||
|
||||
2001-01-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* strftime.c: Sync with glibc time/strftime.c 1.81.
|
||||
|
||||
2001-01-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* unicodeio.c (print_unicode_char): Remove `const' from declaration of
|
||||
local `inptr' to avoid warning with some system declarations of iconv.
|
||||
|
||||
2000-12-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* modechange.c: Do not assume that mode_t uses the
|
||||
traditional octal encoding. E.g. "chmod 1 FOO" should set
|
||||
the other-execute bit of FOO even if S_IXOTH != 1.
|
||||
|
||||
(SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
|
||||
WOTH, XOTH, ALLM): New macros.
|
||||
(S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
|
||||
S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
|
||||
Use them.
|
||||
(S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
|
||||
(S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
|
||||
(mode_compile):
|
||||
No need to use uintmax_t; unsigned long is long enough.
|
||||
Don't bother to get suffix since we don't use it.
|
||||
|
||||
2000-12-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* hash.c (is_prime): Return explicit boolean values.
|
||||
@@ -83,11 +363,11 @@
|
||||
|
||||
2000-12-01 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/memrchr.c: Include <config.h> before any system include file.
|
||||
* memrchr.c: Include <config.h> before any system include file.
|
||||
|
||||
2000-11-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
|
||||
* dirname.c (dir_name_r): Fix typo: int -> size_t.
|
||||
|
||||
2000-11-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
@@ -95,12 +375,12 @@
|
||||
|
||||
2000-11-22 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/strftime.c (my_strftime): Do not invoke mbrlen with a
|
||||
* strftime.c (my_strftime): Do not invoke mbrlen with a
|
||||
size of (size_t) -1; it's not portable.
|
||||
|
||||
2000-11-17 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* lib/obstack.h: Formatting changes.
|
||||
* obstack.h: Formatting changes.
|
||||
(obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
|
||||
prevent type checking.
|
||||
(obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
|
||||
@@ -480,7 +760,7 @@
|
||||
|
||||
* quotearg.h (enum quoting style): New enum clocale_quoting_style.
|
||||
|
||||
* quotearg.c: (quoting_style_args, quoting_style_vals,
|
||||
* quotearg.c (quoting_style_args, quoting_style_vals,
|
||||
quotearg_buffer_restyled): Add support for
|
||||
clocale_quoting_style. Undo previous change to
|
||||
locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
|
||||
|
||||
@@ -7,32 +7,89 @@ noinst_LIBRARIES = libfetish.a
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
|
||||
## Put relatively complex files at the beginning of the list so
|
||||
## that parallel compiles finish a tiny bit sooner. I don't see
|
||||
## a way to make regex.c appear earlier in the list, since it's
|
||||
## added by automake, but on systems with an up to date GNU libc,
|
||||
## regex.c isn't even compiled.
|
||||
libfetish_a_SOURCES = \
|
||||
getdate.y posixtm.c addext.c argmatch.c backupfile.c basename.c \
|
||||
canon-host.c closeout.c diacrit.c dirname.c exclude.c filemode.c \
|
||||
full-write.c getopt.c getopt1.c getstr.c getugroups.c hard-locale.c hash.c \
|
||||
human.c idcache.c isdir.c linebuffer.c localcharset.c long-options.c \
|
||||
makepath.c mbswidth.c md5.c memcasecmp.c memcoll.c modechange.c \
|
||||
path-concat.c physmem.c \
|
||||
quote.c quotearg.c readtokens.c safe-read.c same.c save-cwd.c \
|
||||
savedir.c sha.c stripslash.c unicodeio.c userspec.c version-etc.c xgetcwd.c \
|
||||
xgethostname.c xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c \
|
||||
xstrtoumax.c yesno.c
|
||||
getdate.h getdate.y \
|
||||
posixtm.c posixtm.h \
|
||||
strftime.c \
|
||||
getopt.c getopt.h getopt1.c \
|
||||
hash.c hash.h \
|
||||
__fpending.h \
|
||||
addext.c \
|
||||
argmatch.c argmatch.h \
|
||||
backupfile.c backupfile.h \
|
||||
basename.c \
|
||||
bumpalloc.h \
|
||||
canon-host.c \
|
||||
closeout.c closeout.h \
|
||||
diacrit.c diacrit.h \
|
||||
dirname.c dirname.h \
|
||||
dup-safer.c \
|
||||
exclude.c exclude.h \
|
||||
filemode.c filemode.h \
|
||||
fnmatch.h \
|
||||
fopen-safer.c \
|
||||
fsusage.h \
|
||||
full-write.c \
|
||||
getline.h \
|
||||
getpagesize.h \
|
||||
getstr.c getstr.h \
|
||||
getugroups.c \
|
||||
group-member.h \
|
||||
hard-locale.c hard-locale.h \
|
||||
human.c human.h \
|
||||
idcache.c \
|
||||
isdir.c \
|
||||
lchown.h \
|
||||
linebuffer.c linebuffer.h \
|
||||
localcharset.c \
|
||||
long-options.c long-options.h \
|
||||
makepath.c makepath.h \
|
||||
mbswidth.c mbswidth.h \
|
||||
md5.c md5.h \
|
||||
memcasecmp.c memcasecmp.h \
|
||||
memcoll.c memcoll.h \
|
||||
modechange.c modechange.h \
|
||||
mountlist.h \
|
||||
nanosleep.h \
|
||||
path-concat.c path-concat.h \
|
||||
pathmax.h \
|
||||
physmem.c physmem.h \
|
||||
quote.c quote.h \
|
||||
quotearg.c quotearg.h \
|
||||
readtokens.c readtokens.h \
|
||||
readutmp.h \
|
||||
regex.h \
|
||||
safe-read.c safe-read.h \
|
||||
same.c same.h \
|
||||
save-cwd.c save-cwd.h \
|
||||
savedir.c savedir.h \
|
||||
sha.c sha.h \
|
||||
stdio-safer.h \
|
||||
stripslash.c \
|
||||
strverscmp.h \
|
||||
unicodeio.c unicodeio.h \
|
||||
unistd-safer.h \
|
||||
userspec.c \
|
||||
version-etc.c version-etc.h \
|
||||
xalloc.h \
|
||||
xgetcwd.c \
|
||||
xgethostname.c \
|
||||
xmalloc.c \
|
||||
xstrdup.c \
|
||||
xstrtod.c xstrtod.h \
|
||||
xstrtol.c xstrtol.h \
|
||||
xstrtoul.c \
|
||||
xstrtoumax.c \
|
||||
yesno.c
|
||||
|
||||
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = \
|
||||
argmatch.h backupfile.h bumpalloc.h closeout.h diacrit.h dirname.h error.h \
|
||||
exclude.h filemode.h fnmatch.h __fpending.h fsusage.h \
|
||||
getdate.h getline.h getopt.h \
|
||||
getstr.h getpagesize.h group-member.h hard-locale.h hash.h human.h lchown.h \
|
||||
linebuffer.h long-options.h mbswidth.h md5.h memcasecmp.h memcoll.h \
|
||||
makepath.h mbswidth.h modechange.h mountlist.h nanosleep.h obstack.h \
|
||||
path-concat.h pathmax.h physmem.h posixtm.h \
|
||||
quote.h quotearg.h readtokens.h \
|
||||
readutmp.h regex.h safe-read.h same.h save-cwd.h savedir.h sha.h \
|
||||
strverscmp.h unicodeio.h version-etc.h xalloc.h xstrtod.h xstrtol.h
|
||||
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
1281
lib/Makefile.in
1281
lib/Makefile.in
File diff suppressed because it is too large
Load Diff
12
lib/addext.c
12
lib/addext.c
@@ -1,5 +1,5 @@
|
||||
/* addext.c -- add an extension to a file name
|
||||
Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright 1990, 1997, 1998, 1999, 2001 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,8 +29,6 @@
|
||||
# define HAVE_LONG_FILE_NAMES 0
|
||||
#endif
|
||||
|
||||
#include <backupfile.h>
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
@@ -49,7 +47,8 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *));
|
||||
#include "backupfile.h"
|
||||
#include "dirname.h"
|
||||
|
||||
/* Append to FILENAME the extension EXT, unless the result would be too long,
|
||||
in which case just append the character E. */
|
||||
@@ -58,7 +57,7 @@ void
|
||||
addext (char *filename, char const *ext, int e)
|
||||
{
|
||||
char *s = base_name (filename);
|
||||
size_t slen = strlen (s), extlen = strlen (ext);
|
||||
size_t slen = base_len (s), extlen = strlen (ext);
|
||||
long slen_max = -1;
|
||||
|
||||
#if HAVE_PATHCONF && defined _PC_NAME_MAX
|
||||
@@ -70,7 +69,8 @@ addext (char *filename, char const *ext, int e)
|
||||
else
|
||||
{
|
||||
char c = *s;
|
||||
*s = 0;
|
||||
if (! ISSLASH (c))
|
||||
*s = 0;
|
||||
slen_max = pathconf (filename, _PC_NAME_MAX);
|
||||
*s = c;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ typedef char *pointer;
|
||||
Callers below should use malloc. */
|
||||
|
||||
# ifndef emacs
|
||||
# undef malloc
|
||||
# define malloc xmalloc
|
||||
# endif
|
||||
extern pointer malloc ();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* argmatch.c -- find a match for a string in an array
|
||||
Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1998, 1999, 2001 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
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include "error.h"
|
||||
#include "quotearg.h"
|
||||
#include "quote.h"
|
||||
|
||||
/* When reporting an invalid argument, show nonprinting characters
|
||||
by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use
|
||||
@@ -156,10 +157,11 @@ void
|
||||
argmatch_invalid (const char *context, const char *value, int problem)
|
||||
{
|
||||
char const *format = (problem == -1
|
||||
? _("invalid argument %s for `%s'")
|
||||
: _("ambiguous argument %s for `%s'"));
|
||||
? _("invalid argument %s for %s")
|
||||
: _("ambiguous argument %s for %s"));
|
||||
|
||||
error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context);
|
||||
error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value),
|
||||
quote (context));
|
||||
}
|
||||
|
||||
/* List the valid arguments for argmatch.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* backupfile.c -- make Emacs style backup file names
|
||||
Copyright (C) 1990-1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright 1990,91,92,93,94,95,96,97,98,99,2000, 2001 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -23,9 +24,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <argmatch.h>
|
||||
#include <backupfile.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#if HAVE_STRING_H
|
||||
@@ -76,8 +74,6 @@ char *getenv ();
|
||||
char *malloc ();
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *));
|
||||
|
||||
#if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
|
||||
# define HAVE_DIR 1
|
||||
#else
|
||||
@@ -111,6 +107,10 @@ char *base_name PARAMS ((char const *));
|
||||
# define REAL_DIR_ENTRY(dp) 1
|
||||
#endif
|
||||
|
||||
#include "argmatch.h"
|
||||
#include "backupfile.h"
|
||||
#include "dirname.h"
|
||||
|
||||
/* The extension added to file names to produce a simple (as opposed
|
||||
to numbered) backup file name. */
|
||||
const char *simple_backup_suffix = "~";
|
||||
@@ -137,29 +137,31 @@ find_backup_file_name (const char *file, enum backup_type backup_type)
|
||||
if (HAVE_DIR && backup_suffix_size_max < numbered_suffix_size_max)
|
||||
backup_suffix_size_max = numbered_suffix_size_max;
|
||||
|
||||
s = malloc (file_len + backup_suffix_size_max + numbered_suffix_size_max);
|
||||
s = malloc (file_len + 1
|
||||
+ backup_suffix_size_max + numbered_suffix_size_max);
|
||||
if (s)
|
||||
{
|
||||
strcpy (s, file);
|
||||
|
||||
#if HAVE_DIR
|
||||
if (backup_type != simple)
|
||||
{
|
||||
int highest_backup;
|
||||
size_t dir_len = base_name (s) - s;
|
||||
size_t dirlen = dir_len (file);
|
||||
|
||||
strcpy (s + dir_len, ".");
|
||||
highest_backup = max_backup_version (file + dir_len, s);
|
||||
memcpy (s, file, dirlen);
|
||||
if (dirlen == FILESYSTEM_PREFIX_LEN (file))
|
||||
s[dirlen++] = '.';
|
||||
s[dirlen] = '\0';
|
||||
highest_backup = max_backup_version (base_name (file), s);
|
||||
if (! (backup_type == numbered_existing && highest_backup == 0))
|
||||
{
|
||||
char *numbered_suffix = s + (file_len + backup_suffix_size_max);
|
||||
sprintf (numbered_suffix, ".~%d~", highest_backup + 1);
|
||||
suffix = numbered_suffix;
|
||||
}
|
||||
strcpy (s, file);
|
||||
}
|
||||
#endif /* HAVE_DIR */
|
||||
|
||||
strcpy (s, file);
|
||||
addext (s, suffix, '~');
|
||||
}
|
||||
return s;
|
||||
@@ -186,7 +188,7 @@ max_backup_version (const char *file, const char *dir)
|
||||
return 0;
|
||||
|
||||
highest_version = 0;
|
||||
file_name_length = strlen (file);
|
||||
file_name_length = base_len (file);
|
||||
|
||||
while ((dp = readdir (dirp)) != 0)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* basename.c -- return the last element in a path
|
||||
Copyright (C) 1990, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -19,52 +19,61 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef FILESYSTEM_PREFIX_LEN
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *name));
|
||||
#include "dirname.h"
|
||||
|
||||
/* In general, we can't use the builtin `basename' function if available,
|
||||
since it has different meanings in different environments.
|
||||
In some environments the builtin `basename' modifies its argument.
|
||||
If NAME is all slashes, be sure to return `/'. */
|
||||
|
||||
Return the address of the last file name component of NAME. If
|
||||
NAME has no file name components because it is all slashes, return
|
||||
NAME if it is empty, the address of its last slash otherwise. */
|
||||
|
||||
char *
|
||||
base_name (char const *name)
|
||||
{
|
||||
char const *base = name += FILESYSTEM_PREFIX_LEN (name);
|
||||
int all_slashes = 1;
|
||||
char const *base = name + FILESYSTEM_PREFIX_LEN (name);
|
||||
char const *p;
|
||||
|
||||
for (p = name; *p; p++)
|
||||
for (p = base; *p; p++)
|
||||
{
|
||||
if (ISSLASH (*p))
|
||||
base = p + 1;
|
||||
else
|
||||
all_slashes = 0;
|
||||
{
|
||||
/* Treat multiple adjacent slashes like a single slash. */
|
||||
do p++;
|
||||
while (ISSLASH (*p));
|
||||
|
||||
/* If the file name ends in slash, use the trailing slash as
|
||||
the basename if no non-slashes have been found. */
|
||||
if (! *p)
|
||||
{
|
||||
if (ISSLASH (*base))
|
||||
base = p - 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* *P is a non-slash preceded by a slash. */
|
||||
base = p;
|
||||
}
|
||||
}
|
||||
|
||||
/* If NAME is all slashes, arrange to return `/'. */
|
||||
if (*base == '\0' && ISSLASH (*name) && all_slashes)
|
||||
--base;
|
||||
|
||||
/* Make sure the last byte is not a slash. */
|
||||
assert (all_slashes || !ISSLASH (*(p - 1)));
|
||||
|
||||
return (char *) base;
|
||||
}
|
||||
|
||||
/* Return the length of of the basename NAME. Typically NAME is the
|
||||
value returned by base_name. Act like strlen (NAME), except omit
|
||||
redundant trailing slashes. */
|
||||
|
||||
size_t
|
||||
base_len (char const *name)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
|
||||
continue;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent table of character encoding aliases.
|
||||
#
|
||||
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000-2001 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
|
||||
@@ -33,27 +33,37 @@
|
||||
# name used by which systems a MIME name?
|
||||
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
|
||||
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
|
||||
# ISO-8859-2 glibc aix hpux irix solaris freebsd yes
|
||||
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
|
||||
# ISO-8859-3 glibc yes
|
||||
# ISO-8859-4 solaris yes
|
||||
# ISO-8859-5 glibc aix hpux irix solaris yes
|
||||
# ISO-8859-4 osf solaris freebsd yes
|
||||
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
|
||||
# ISO-8859-6 glibc aix hpux solaris yes
|
||||
# ISO-8859-7 glibc aix hpux irix osf solaris yes
|
||||
# ISO-8859-8 glibc aix hpux solaris yes
|
||||
# ISO-8859-8 glibc aix hpux osf solaris yes
|
||||
# ISO-8859-9 glibc aix hpux irix osf solaris yes
|
||||
# ISO-8859-13 glibc
|
||||
# ISO-8859-15 glibc aix solaris freebsd
|
||||
# ISO-8859-15 glibc aix osf solaris freebsd
|
||||
# KOI8-R glibc solaris freebsd yes
|
||||
# KOI8-U glibc yes
|
||||
# CP850 aix osf
|
||||
# KOI8-U glibc freebsd yes
|
||||
# CP437 dos
|
||||
# CP775 dos
|
||||
# CP850 aix osf dos
|
||||
# CP852 dos
|
||||
# CP855 dos
|
||||
# CP856 aix
|
||||
# CP866 freebsd
|
||||
# CP874 win32
|
||||
# CP857 dos
|
||||
# CP861 dos
|
||||
# CP862 dos
|
||||
# CP864 dos
|
||||
# CP865 dos
|
||||
# CP866 freebsd dos
|
||||
# CP869 dos
|
||||
# CP874 win32 dos
|
||||
# CP922 aix
|
||||
# CP932 aix win32
|
||||
# CP932 aix win32 dos
|
||||
# CP943 aix
|
||||
# CP949 win32
|
||||
# CP950 win32
|
||||
# CP949 osf win32 dos
|
||||
# CP950 win32 dos
|
||||
# CP1046 aix
|
||||
# CP1124 aix
|
||||
# CP1129 aix
|
||||
@@ -65,17 +75,17 @@
|
||||
# CP1255 win32
|
||||
# CP1256 win32
|
||||
# CP1257 win32
|
||||
# GB2312 glibc aix hpux irix solaris yes
|
||||
# EUC-JP glibc aix hpux irix solaris yes
|
||||
# EUC-KR glibc aix hpux irix solaris yes
|
||||
# EUC-TW glibc aix hpux irix solaris
|
||||
# BIG5 glibc aix hpux solaris yes
|
||||
# GB2312 glibc aix hpux irix solaris freebsd yes
|
||||
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
|
||||
# EUC-KR glibc aix hpux irix osf solaris freebsd yes
|
||||
# EUC-TW glibc aix hpux irix osf solaris
|
||||
# BIG5 glibc aix hpux osf solaris freebsd yes
|
||||
# BIG5HKSCS glibc
|
||||
# GBK aix win32
|
||||
# GBK aix osf win32 dos
|
||||
# GB18030 glibc
|
||||
# SJIS hpux solaris
|
||||
# SJIS hpux osf solaris freebsd
|
||||
# JOHAB glibc win32
|
||||
# TIS-620 glibc aix hpux solaris
|
||||
# TIS-620 glibc aix hpux osf solaris
|
||||
# VISCII glibc yes
|
||||
# HP-ROMAN8 hpux
|
||||
# HP-ARABIC8 hpux
|
||||
@@ -83,7 +93,9 @@
|
||||
# HP-HEBREW8 hpux
|
||||
# HP-TURKISH8 hpux
|
||||
# HP-KANA8 hpux
|
||||
# UTF-8 glibc aix hpux solaris yes
|
||||
# DEC-KANJI osf
|
||||
# DEC-HANYU osf
|
||||
# UTF-8 glibc aix hpux osf solaris yes
|
||||
#
|
||||
# Note: Names which are not marked as being a MIME name should not be used in
|
||||
# Internet protocols for information interchange (mail, news, etc.).
|
||||
@@ -178,9 +190,28 @@ case "$os" in
|
||||
;;
|
||||
osf*)
|
||||
echo "ISO8859-1 ISO-8859-1"
|
||||
echo "ISO8859-2 ISO-8859-2"
|
||||
echo "ISO8859-4 ISO-8859-4"
|
||||
echo "ISO8859-5 ISO-8859-5"
|
||||
echo "ISO8859-7 ISO-8859-7"
|
||||
echo "ISO8859-8 ISO-8859-8"
|
||||
echo "ISO8859-9 ISO-8859-9"
|
||||
echo "ISO8859-15 ISO-8859-15"
|
||||
echo "cp850 CP850"
|
||||
echo "big5 BIG5"
|
||||
echo "dechanyu DEC-HANYU"
|
||||
echo "dechanzi GB2312"
|
||||
echo "deckanji DEC-KANJI"
|
||||
echo "deckorean EUC-KR"
|
||||
echo "eucJP EUC-JP"
|
||||
echo "eucKR EUC-KR"
|
||||
echo "eucTW EUC-TW"
|
||||
echo "GBK GBK"
|
||||
echo "KSC5601 CP949"
|
||||
echo "sdeckanji EUC-JP"
|
||||
echo "SJIS SJIS"
|
||||
echo "TACTIS TIS-620"
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
solaris*)
|
||||
echo "646 ASCII"
|
||||
@@ -205,30 +236,203 @@ case "$os" in
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
freebsd*)
|
||||
# FreeBSD 3.3 doesn't have nl_langinfo(CODESET); therefore
|
||||
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
echo "C ASCII"
|
||||
echo "US-ASCII ASCII"
|
||||
for l in lt_LN; do
|
||||
for l in la_LN lt_LN; do
|
||||
echo "$l.ASCII ASCII"
|
||||
done
|
||||
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
|
||||
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT lt_LN \
|
||||
nl_BE nl_NL no_NO pt_PT sv_SE; do
|
||||
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
|
||||
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
|
||||
echo "$l.ISO_8859-1 ISO-8859-1"
|
||||
echo "$l.DIS_8859-15 ISO-8859-15"
|
||||
done
|
||||
for l in hr_HR hu_HU lt_LN pl_PL sl_SI; do
|
||||
for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
|
||||
echo "$l.ISO_8859-2 ISO-8859-2"
|
||||
done
|
||||
for l in la_LN lt_LT; do
|
||||
echo "$l.ISO_8859-4 ISO-8859-4"
|
||||
done
|
||||
for l in ru_RU ru_SU; do
|
||||
echo "$l.KOI8-R KOI8-R"
|
||||
echo "$l.ISO_8859-5 ISO-8859-5"
|
||||
echo "$l.CP866 CP866"
|
||||
done
|
||||
echo "uk_UA.KOI8-U KOI8-U"
|
||||
echo "zh_TW.BIG5 BIG5"
|
||||
echo "zh_TW.Big5 BIG5"
|
||||
echo "zh_CN.EUC GB2312"
|
||||
echo "ja_JP.EUC EUC-JP"
|
||||
echo "ja_JP.SJIS SJIS"
|
||||
echo "ja_JP.Shift_JIS SJIS"
|
||||
echo "ko_KR.EUC EUC-KR"
|
||||
;;
|
||||
beos*)
|
||||
# BeOS has a single locale, and it has UTF-8 encoding.
|
||||
echo "C UTF-8"
|
||||
echo "* UTF-8"
|
||||
;;
|
||||
msdosdjgpp*)
|
||||
# DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
echo "#"
|
||||
echo "# The encodings given here may not all be correct."
|
||||
echo "# If you find that the encoding given for your language and"
|
||||
echo "# country is not the one your DOS machine actually uses, just"
|
||||
echo "# correct it in this file, and send a mail to"
|
||||
echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
|
||||
echo "# and Bruno Haible <haible@clisp.cons.org>."
|
||||
echo "#"
|
||||
echo "C ASCII"
|
||||
# ISO-8859-1 languages
|
||||
echo "ca CP850"
|
||||
echo "ca_ES CP850"
|
||||
echo "da CP865" # not CP850 ??
|
||||
echo "da_DK CP865" # not CP850 ??
|
||||
echo "de CP850"
|
||||
echo "de_AT CP850"
|
||||
echo "de_CH CP850"
|
||||
echo "de_DE CP850"
|
||||
echo "en CP850"
|
||||
echo "en_AU CP850" # not CP437 ??
|
||||
echo "en_CA CP850"
|
||||
echo "en_GB CP850"
|
||||
echo "en_NZ CP437"
|
||||
echo "en_US CP437"
|
||||
echo "en_ZA CP850" # not CP437 ??
|
||||
echo "es CP850"
|
||||
echo "es_AR CP850"
|
||||
echo "es_BO CP850"
|
||||
echo "es_CL CP850"
|
||||
echo "es_CO CP850"
|
||||
echo "es_CR CP850"
|
||||
echo "es_CU CP850"
|
||||
echo "es_DO CP850"
|
||||
echo "es_EC CP850"
|
||||
echo "es_ES CP850"
|
||||
echo "es_GT CP850"
|
||||
echo "es_HN CP850"
|
||||
echo "es_MX CP850"
|
||||
echo "es_NI CP850"
|
||||
echo "es_PA CP850"
|
||||
echo "es_PY CP850"
|
||||
echo "es_PE CP850"
|
||||
echo "es_SV CP850"
|
||||
echo "es_UY CP850"
|
||||
echo "es_VE CP850"
|
||||
echo "et CP850"
|
||||
echo "et_EE CP850"
|
||||
echo "eu CP850"
|
||||
echo "eu_ES CP850"
|
||||
echo "fi CP850"
|
||||
echo "fi_FI CP850"
|
||||
echo "fr CP850"
|
||||
echo "fr_BE CP850"
|
||||
echo "fr_CA CP850"
|
||||
echo "fr_CH CP850"
|
||||
echo "fr_FR CP850"
|
||||
echo "ga CP850"
|
||||
echo "ga_IE CP850"
|
||||
echo "gd CP850"
|
||||
echo "gd_GB CP850"
|
||||
echo "gl CP850"
|
||||
echo "gl_ES CP850"
|
||||
echo "id CP850" # not CP437 ??
|
||||
echo "id_ID CP850" # not CP437 ??
|
||||
echo "is CP861" # not CP850 ??
|
||||
echo "is_IS CP861" # not CP850 ??
|
||||
echo "it CP850"
|
||||
echo "it_CH CP850"
|
||||
echo "it_IT CP850"
|
||||
echo "lt CP775"
|
||||
echo "lt_LT CP775"
|
||||
echo "lv CP775"
|
||||
echo "lv_LV CP775"
|
||||
echo "nb CP865" # not CP850 ??
|
||||
echo "nb_NO CP865" # not CP850 ??
|
||||
echo "nl CP850"
|
||||
echo "nl_BE CP850"
|
||||
echo "nl_NL CP850"
|
||||
echo "nn CP865" # not CP850 ??
|
||||
echo "nn_NO CP865" # not CP850 ??
|
||||
echo "no CP865" # not CP850 ??
|
||||
echo "no_NO CP865" # not CP850 ??
|
||||
echo "pt CP850"
|
||||
echo "pt_BR CP850"
|
||||
echo "pt_PT CP850"
|
||||
echo "sv CP850"
|
||||
echo "sv_SE CP850"
|
||||
# ISO-8859-2 languages
|
||||
echo "cs CP852"
|
||||
echo "cs_CZ CP852"
|
||||
echo "hr CP852"
|
||||
echo "hr_HR CP852"
|
||||
echo "hu CP852"
|
||||
echo "hu_HU CP852"
|
||||
echo "pl CP852"
|
||||
echo "pl_PL CP852"
|
||||
echo "ro CP852"
|
||||
echo "ro_RO CP852"
|
||||
echo "sk CP852"
|
||||
echo "sk_SK CP852"
|
||||
echo "sl CP852"
|
||||
echo "sl_SI CP852"
|
||||
echo "sq CP852"
|
||||
echo "sq_AL CP852"
|
||||
echo "sr CP852" # CP852 or CP866 or CP855 ??
|
||||
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
|
||||
# ISO-8859-3 languages
|
||||
echo "mt CP850"
|
||||
echo "mt_MT CP850"
|
||||
# ISO-8859-5 languages
|
||||
echo "be CP866"
|
||||
echo "be_BE CP866"
|
||||
echo "bg CP866" # not CP855 ??
|
||||
echo "bg_BG CP866" # not CP855 ??
|
||||
echo "mk CP866" # not CP855 ??
|
||||
echo "mk_MK CP866" # not CP855 ??
|
||||
echo "ru KOI8-R" # not CP866 ??
|
||||
echo "ru_RU KOI8-R" # not CP866 ??
|
||||
# ISO-8859-6 languages
|
||||
echo "ar CP864"
|
||||
echo "ar_AE CP864"
|
||||
echo "ar_DZ CP864"
|
||||
echo "ar_EG CP864"
|
||||
echo "ar_IQ CP864"
|
||||
echo "ar_IR CP864"
|
||||
echo "ar_JO CP864"
|
||||
echo "ar_KW CP864"
|
||||
echo "ar_MA CP864"
|
||||
echo "ar_OM CP864"
|
||||
echo "ar_QA CP864"
|
||||
echo "ar_SA CP864"
|
||||
echo "ar_SY CP864"
|
||||
# ISO-8859-7 languages
|
||||
echo "el CP869"
|
||||
echo "el_GR CP869"
|
||||
# ISO-8859-8 languages
|
||||
echo "he CP862"
|
||||
echo "he_IL CP862"
|
||||
# ISO-8859-9 languages
|
||||
echo "tr CP857"
|
||||
echo "tr_TR CP857"
|
||||
# Japanese
|
||||
echo "ja CP932"
|
||||
echo "ja_JP CP932"
|
||||
# Chinese
|
||||
echo "zh_CN GBK"
|
||||
echo "zh_TW CP950" # not CP938 ??
|
||||
# Korean
|
||||
echo "kr CP949" # not CP934 ??
|
||||
echo "kr_KR CP949" # not CP934 ??
|
||||
# Thai
|
||||
echo "th CP874"
|
||||
echo "th_TH CP874"
|
||||
# Other
|
||||
echo "eo CP850"
|
||||
echo "eo_EO CP850"
|
||||
;;
|
||||
esac
|
||||
|
||||
132
lib/dirname.c
132
lib/dirname.c
@@ -1,5 +1,5 @@
|
||||
/* dirname.c -- return all but the last element in a path
|
||||
Copyright (C) 1990, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright 1990, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -19,126 +19,43 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
#endif
|
||||
#if defined STDC_HEADERS || defined HAVE_STRING_H
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
# ifndef strrchr
|
||||
# define strrchr rindex
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef HAVE_DECL_MEMRCHR
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_MEMRCHR
|
||||
void *memrchr ();
|
||||
#endif
|
||||
|
||||
#include "dirname.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef FILESYSTEM_PREFIX_LEN
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif
|
||||
|
||||
#define BACKSLASH_IS_PATH_SEPARATOR ISSLASH ('\\')
|
||||
|
||||
/* Return the length of `dirname (PATH)' and set *RESULT to point
|
||||
to PATH or to `"."', as appropriate. Works properly even if
|
||||
there are trailing slashes (by effectively ignoring them).
|
||||
WARNING: This function doesn't work for cwd-relative names like
|
||||
`a:foo' that are specified with a drive-letter prefix. That case
|
||||
is handled in the caller. */
|
||||
static size_t
|
||||
dir_name_r (char const *path, char const **result)
|
||||
/* Return the length of `dirname (PATH)', or zero if PATH is
|
||||
in the working directory. Works properly even if
|
||||
there are trailing slashes (by effectively ignoring them). */
|
||||
size_t
|
||||
dir_len (char const *path)
|
||||
{
|
||||
char const *slash;
|
||||
size_t length; /* Length of result, not including NUL. */
|
||||
size_t prefix_length = FILESYSTEM_PREFIX_LEN (path);
|
||||
size_t length;
|
||||
|
||||
slash = strrchr (path, '/');
|
||||
if (BACKSLASH_IS_PATH_SEPARATOR)
|
||||
{
|
||||
char const *b = strrchr (path, '\\');
|
||||
if (b && slash < b)
|
||||
slash = b;
|
||||
}
|
||||
/* Strip the basename and any redundant slashes before it. */
|
||||
for (length = base_name (path) - path; prefix_length < length; length--)
|
||||
if (! ISSLASH (path[length - 1]))
|
||||
return length;
|
||||
|
||||
/* If the last byte of PATH is a slash, decrement SLASH until it's
|
||||
pointing at the leftmost in a sequence of trailing slashes. */
|
||||
if (slash && slash[1] == 0)
|
||||
{
|
||||
while (path < slash && ISSLASH (slash[-1]))
|
||||
{
|
||||
--slash;
|
||||
}
|
||||
|
||||
if (path < slash)
|
||||
{
|
||||
size_t len = slash - path;
|
||||
slash = memrchr (path, '/', len);
|
||||
if (BACKSLASH_IS_PATH_SEPARATOR)
|
||||
{
|
||||
char const *b = memrchr (path, '\\', len);
|
||||
if (b && slash < b)
|
||||
slash = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (slash == 0)
|
||||
{
|
||||
/* File is in the current directory. */
|
||||
|
||||
length = FILESYSTEM_PREFIX_LEN (path);
|
||||
|
||||
if (length == 0)
|
||||
{
|
||||
path = ".";
|
||||
length = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Remove any trailing slashes from the result. If we have a
|
||||
canonicalized "d:/path", leave alone the root case "d:/". */
|
||||
char const *lim = path + FILESYSTEM_PREFIX_LEN (path);
|
||||
|
||||
while (lim < slash && ISSLASH (*slash))
|
||||
--slash;
|
||||
|
||||
length = slash - path + 1;
|
||||
}
|
||||
|
||||
*result = path;
|
||||
return length;
|
||||
/* But don't strip the only slash from "/". */
|
||||
return prefix_length + ISSLASH (path[prefix_length]);
|
||||
}
|
||||
|
||||
/* Return the leading directories part of PATH,
|
||||
allocated with malloc. If out of memory, return 0.
|
||||
allocated with xmalloc.
|
||||
Works properly even if there are trailing slashes
|
||||
(by effectively ignoring them). */
|
||||
|
||||
char *
|
||||
dir_name (char const *path)
|
||||
{
|
||||
char const *result;
|
||||
size_t length = dir_name_r (path, &result);
|
||||
int append_dot = (length && length == FILESYSTEM_PREFIX_LEN (newpath));
|
||||
char *newpath = (char *) malloc (length + append_dot + 1);
|
||||
if (newpath == 0)
|
||||
return 0;
|
||||
strncpy (newpath, result, length);
|
||||
/* If PATH is "d:foo", return "d:.", the CWD on drive d: */
|
||||
size_t length = dir_len (path);
|
||||
int append_dot = (length == FILESYSTEM_PREFIX_LEN (path));
|
||||
char *newpath = xmalloc (length + append_dot + 1);
|
||||
memcpy (newpath, path, length);
|
||||
if (append_dot)
|
||||
newpath[length++] = '.';
|
||||
newpath[length] = 0;
|
||||
@@ -149,7 +66,8 @@ dir_name (char const *path)
|
||||
/*
|
||||
|
||||
Run the test like this (expect no output):
|
||||
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall memrchr.c dirname.c
|
||||
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall \
|
||||
basename.c dirname.c xmalloc.c
|
||||
sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
|
||||
|
||||
BEGIN-DATA
|
||||
@@ -165,7 +83,6 @@ END-DATA
|
||||
|
||||
# define MAX_BUFF_LEN 1024
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
@@ -183,7 +100,6 @@ main ()
|
||||
if (strcmp (result, expected_result))
|
||||
printf ("%s: got %s, expected %s\n", path, result, expected_result);
|
||||
}
|
||||
exit (0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1998, 2001 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
|
||||
@@ -25,7 +25,23 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
char *
|
||||
dir_name PARAMS ((const char *path));
|
||||
# ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
# endif
|
||||
|
||||
# ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
# endif
|
||||
|
||||
# ifndef FILESYSTEM_PREFIX_LEN
|
||||
# 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));
|
||||
|
||||
int strip_trailing_slashes PARAMS ((char *path));
|
||||
|
||||
#endif /* not DIRNAME_H_ */
|
||||
|
||||
62
lib/dup-safer.c
Normal file
62
lib/dup-safer.c
Normal file
@@ -0,0 +1,62 @@
|
||||
/* Invoke dup, but avoid some glitches.
|
||||
Copyright (C) 2001 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. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#if HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifndef STDERR_FILENO
|
||||
# define STDERR_FILENO 2
|
||||
#endif
|
||||
|
||||
#include <unistd-safer.h>
|
||||
|
||||
/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
|
||||
STDERR_FILENO. */
|
||||
|
||||
int
|
||||
dup_safer (int fd)
|
||||
{
|
||||
#ifdef F_DUPFD
|
||||
return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
|
||||
#else
|
||||
int f = dup (fd);
|
||||
if (0 <= f && f <= STDERR_FILENO)
|
||||
{
|
||||
int f1 = dup_safer (f);
|
||||
int e = errno;
|
||||
close (f);
|
||||
errno = e;
|
||||
f = f1;
|
||||
}
|
||||
return f;
|
||||
#endif
|
||||
}
|
||||
76
lib/fopen-safer.c
Normal file
76
lib/fopen-safer.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/* Invoke fopen, but avoid some glitches.
|
||||
Copyright (C) 2001 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. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <unistd-safer.h>
|
||||
|
||||
#ifndef STDERR_FILENO
|
||||
# define STDERR_FILENO 2
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdio-safer.h>
|
||||
|
||||
/* Like fopen, but do not return stdin, stdout, or stderr. */
|
||||
|
||||
FILE *
|
||||
fopen_safer (char const *file, char const *mode)
|
||||
{
|
||||
FILE *fp = fopen (file, mode);
|
||||
|
||||
if (fp)
|
||||
{
|
||||
int fd = fileno (fp);
|
||||
|
||||
if (0 <= fd && fd <= STDERR_FILENO)
|
||||
{
|
||||
int f = dup_safer (fd);
|
||||
|
||||
if (f < 0)
|
||||
{
|
||||
int e = errno;
|
||||
fclose (fp);
|
||||
errno = e;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (fclose (fp) != 0
|
||||
|| ! (fp = fdopen (f, mode)))
|
||||
{
|
||||
int e = errno;
|
||||
close (f);
|
||||
errno = e;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fp;
|
||||
}
|
||||
@@ -990,7 +990,8 @@ get_date (const char *p, const time_t *now)
|
||||
|
||||
/* Let mktime deduce tm_isdst if we have an absolute time stamp,
|
||||
or if the relative time stamp mentions days, months, or years. */
|
||||
if (pc.dates_seen | pc.days_seen | pc.times_seen | pc.rel_day | pc.rel_month | pc.rel_year)
|
||||
if (pc.dates_seen | pc.days_seen | pc.times_seen | pc.rel_day
|
||||
| pc.rel_month | pc.rel_year)
|
||||
tm.tm_isdst = -1;
|
||||
|
||||
/* But if the input explicitly specifies local time with or without
|
||||
@@ -1037,6 +1038,7 @@ get_date (const char *p, const time_t *now)
|
||||
{
|
||||
tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7
|
||||
+ 7 * (pc.day_ordinal - (0 < pc.day_ordinal)));
|
||||
tm.tm_isdst = -1;
|
||||
Start = mktime (&tm);
|
||||
if (Start == (time_t) -1)
|
||||
return Start;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* hash - hashing table processing.
|
||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Written by Jim Meyering, 1992.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Determine a canonical name for the current locale's character encoding.
|
||||
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2001 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
|
||||
@@ -191,7 +191,7 @@ get_charset_aliases ()
|
||||
into one of the canonical names listed in config.charset.
|
||||
The result must not be freed; it is statically allocated.
|
||||
If the canonical name cannot be determined, the result is a non-canonical
|
||||
name or NULL. */
|
||||
name. */
|
||||
|
||||
#ifdef STATIC
|
||||
STATIC
|
||||
@@ -211,10 +211,14 @@ locale_charset ()
|
||||
|
||||
# else
|
||||
|
||||
/* On old systems which lack it, use setlocale and getenv. */
|
||||
/* On old systems which lack it, use setlocale or getenv. */
|
||||
const char *locale = NULL;
|
||||
|
||||
# if HAVE_SETLOCALE
|
||||
/* But most old systems don't have a complete set of locales. Some
|
||||
(like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
|
||||
use setlocale here; it would return "C" when it doesn't support the
|
||||
locale name the user has set. */
|
||||
# if HAVE_SETLOCALE && 0
|
||||
locale = setlocale (LC_CTYPE, NULL);
|
||||
# endif
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
@@ -245,18 +249,20 @@ locale_charset ()
|
||||
|
||||
#endif
|
||||
|
||||
if (codeset != NULL && codeset[0] != '\0')
|
||||
{
|
||||
/* Resolve alias. */
|
||||
for (aliases = get_charset_aliases ();
|
||||
*aliases != '\0';
|
||||
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
|
||||
if (!strcmp (codeset, aliases))
|
||||
{
|
||||
codeset = aliases + strlen (aliases) + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (codeset == NULL)
|
||||
/* The canonical name cannot be determined. */
|
||||
codeset = "";
|
||||
|
||||
/* Resolve alias. */
|
||||
for (aliases = get_charset_aliases ();
|
||||
*aliases != '\0';
|
||||
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
|
||||
if (strcmp (codeset, aliases) == 0
|
||||
|| (aliases[0] == '*' && aliases[1] == '\0'))
|
||||
{
|
||||
codeset = aliases + strlen (aliases) + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return codeset;
|
||||
}
|
||||
|
||||
@@ -115,11 +115,10 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
#include "save-cwd.h"
|
||||
#include "dirname.h"
|
||||
#include "error.h"
|
||||
#include "quote.h"
|
||||
|
||||
void strip_trailing_slashes ();
|
||||
|
||||
#define CLEANUP_CWD \
|
||||
do \
|
||||
{ \
|
||||
@@ -196,7 +195,6 @@ make_dir (const char *dir, const char *dirpath, mode_t mode, int *created_dir_p)
|
||||
}
|
||||
|
||||
/* Ensure that the directory ARGPATH exists.
|
||||
Remove any trailing slashes from ARGPATH before calling this function.
|
||||
|
||||
Create any leading directories that don't already exist, with
|
||||
permissions PARENT_MODE.
|
||||
|
||||
@@ -51,12 +51,6 @@
|
||||
# define iswprint(wc) 1
|
||||
#endif
|
||||
|
||||
/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
|
||||
#if HAVE_MBRTOWC && defined mbstate_t
|
||||
# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
|
||||
# define mbsinit(ps) 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_WCWIDTH
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Determine the number of screen columns needed for a string.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2001 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
|
||||
@@ -34,6 +34,7 @@
|
||||
#define MBSW_ACCEPT_UNPRINTABLE 2
|
||||
|
||||
/* Returns the number of screen columns needed for STRING. */
|
||||
#define mbswidth gnu_mbswidth /* avoid clash with UnixWare 7.1.1 function */
|
||||
extern int mbswidth PARAMS ((const char *string, int flags));
|
||||
|
||||
/* Returns the number of screen columns needed for the NBYTES bytes
|
||||
|
||||
37
lib/mkstemp.c
Normal file
37
lib/mkstemp.c
Normal file
@@ -0,0 +1,37 @@
|
||||
/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef __GT_FILE
|
||||
# define __GT_FILE 0
|
||||
#endif
|
||||
|
||||
int __gen_tempname ();
|
||||
|
||||
/* Generate a unique temporary file name from TEMPLATE.
|
||||
The last six characters of TEMPLATE must be "XXXXXX";
|
||||
they are replaced with a string that makes the filename unique.
|
||||
Then open the file and return a fd. */
|
||||
int
|
||||
mkstemp (template)
|
||||
char *template;
|
||||
{
|
||||
return __gen_tempname (template, __GT_FILE);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* modechange.c -- file mode manipulation
|
||||
Copyright (C) 1989, 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989, 1990, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -50,50 +50,65 @@ char *malloc ();
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
/* The traditional octal values corresponding to each mode bit. */
|
||||
#define SUID 04000
|
||||
#define SGID 02000
|
||||
#define SVTX 01000
|
||||
#define RUSR 00400
|
||||
#define WUSR 00200
|
||||
#define XUSR 00100
|
||||
#define RGRP 00040
|
||||
#define WGRP 00020
|
||||
#define XGRP 00010
|
||||
#define ROTH 00004
|
||||
#define WOTH 00002
|
||||
#define XOTH 00001
|
||||
#define ALLM 07777 /* all octal mode bits */
|
||||
|
||||
#ifndef S_ISUID
|
||||
# define S_ISUID 04000
|
||||
# define S_ISUID SUID
|
||||
#endif
|
||||
#ifndef S_ISGID
|
||||
# define S_ISGID 04000
|
||||
# define S_ISGID SGID
|
||||
#endif
|
||||
#ifndef S_ISVTX
|
||||
# define S_ISVTX 01000
|
||||
# define S_ISVTX SVTX
|
||||
#endif
|
||||
#ifndef S_IRUSR
|
||||
# define S_IRUSR 0400
|
||||
# define S_IRUSR RUSR
|
||||
#endif
|
||||
#ifndef S_IWUSR
|
||||
# define S_IWUSR 0200
|
||||
# define S_IWUSR WUSR
|
||||
#endif
|
||||
#ifndef S_IXUSR
|
||||
# define S_IXUSR 0100
|
||||
# define S_IXUSR XUSR
|
||||
#endif
|
||||
#ifndef S_IRGRP
|
||||
# define S_IRGRP 0040
|
||||
# define S_IRGRP RGRP
|
||||
#endif
|
||||
#ifndef S_IWGRP
|
||||
# define S_IWGRP 0020
|
||||
# define S_IWGRP WGRP
|
||||
#endif
|
||||
#ifndef S_IXGRP
|
||||
# define S_IXGRP 0010
|
||||
# define S_IXGRP XGRP
|
||||
#endif
|
||||
#ifndef S_IROTH
|
||||
# define S_IROTH 0004
|
||||
# define S_IROTH ROTH
|
||||
#endif
|
||||
#ifndef S_IWOTH
|
||||
# define S_IWOTH 0002
|
||||
# define S_IWOTH WOTH
|
||||
#endif
|
||||
#ifndef S_IXOTH
|
||||
# define S_IXOTH 0001
|
||||
# define S_IXOTH XOTH
|
||||
#endif
|
||||
#ifndef S_IRWXU
|
||||
# define S_IRWXU 0700
|
||||
# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
|
||||
#endif
|
||||
#ifndef S_IRWXG
|
||||
# define S_IRWXG 0070
|
||||
# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
|
||||
#endif
|
||||
#ifndef S_IRWXO
|
||||
# define S_IRWXO 0007
|
||||
# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
|
||||
#endif
|
||||
|
||||
/* All the mode bits that can be affected by chmod. */
|
||||
@@ -157,8 +172,7 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
{
|
||||
struct mode_change *head; /* First element of the linked list. */
|
||||
struct mode_change *tail; /* An element of the linked list. */
|
||||
uintmax_t mode_value; /* The mode value, if octal. */
|
||||
char *string_end; /* Pointer to end of parsed value. */
|
||||
unsigned long octal_value; /* The mode value, if octal. */
|
||||
mode_t umask_value; /* The umask value (surprise). */
|
||||
|
||||
head = NULL;
|
||||
@@ -166,12 +180,34 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
tail = NULL;
|
||||
#endif
|
||||
|
||||
if (xstrtoumax (mode_string, &string_end, 8, &mode_value, "") == LONGINT_OK)
|
||||
if (xstrtoul (mode_string, NULL, 8, &octal_value, "") == LONGINT_OK)
|
||||
{
|
||||
struct mode_change *p;
|
||||
if (mode_value != (mode_value & CHMOD_MODE_BITS))
|
||||
mode_t mode;
|
||||
if (octal_value != (octal_value & ALLM))
|
||||
return MODE_INVALID;
|
||||
p = make_node_op_equals ((mode_t) mode_value);
|
||||
|
||||
/* Help the compiler optimize the usual case where mode_t uses
|
||||
the traditional octal representation. */
|
||||
mode = ((S_ISUID == SUID && S_ISGID == SGID && S_ISVTX == SVTX
|
||||
&& S_IRUSR == RUSR && S_IWUSR == WUSR && S_IXUSR == XUSR
|
||||
&& S_IRGRP == RGRP && S_IWGRP == WGRP && S_IXGRP == XGRP
|
||||
&& S_IROTH == ROTH && S_IWOTH == WOTH && S_IXOTH == XOTH)
|
||||
? octal_value
|
||||
: ((octal_value & SUID ? S_ISUID : 0)
|
||||
| (octal_value & SGID ? S_ISGID : 0)
|
||||
| (octal_value & SVTX ? S_ISVTX : 0)
|
||||
| (octal_value & RUSR ? S_IRUSR : 0)
|
||||
| (octal_value & WUSR ? S_IWUSR : 0)
|
||||
| (octal_value & XUSR ? S_IXUSR : 0)
|
||||
| (octal_value & RGRP ? S_IRGRP : 0)
|
||||
| (octal_value & WGRP ? S_IWGRP : 0)
|
||||
| (octal_value & XGRP ? S_IXGRP : 0)
|
||||
| (octal_value & ROTH ? S_IROTH : 0)
|
||||
| (octal_value & WOTH ? S_IWOTH : 0)
|
||||
| (octal_value & XOTH ? S_IXOTH : 0)));
|
||||
|
||||
p = make_node_op_equals (mode);
|
||||
if (p == NULL)
|
||||
return MODE_MEMORY_EXHAUSTED;
|
||||
mode_append_entry (&head, &tail, p);
|
||||
@@ -393,7 +429,7 @@ mode_adjust (mode_t oldmode, const struct mode_change *changes)
|
||||
|
||||
/* In order to change only `u', `g', or `o' permissions,
|
||||
or some combination thereof, clear unselected bits.
|
||||
This can not be done in mode_compile because the value
|
||||
This cannot be done in mode_compile because the value
|
||||
to which the `changes->affected' mask is applied depends
|
||||
on the old mode of each file. */
|
||||
value &= changes->affected;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* obstack.c - subroutines used implicitly by object stack macros
|
||||
Copyright (C) 1988-1994,96,97,98,99,2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
@@ -471,7 +471,15 @@ _obstack_memory_used (h)
|
||||
# define fputs(s, f) _IO_fputs (s, f)
|
||||
# endif
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static void
|
||||
__attribute__ ((noreturn))
|
||||
print_and_abort ()
|
||||
{
|
||||
fputs (_("memory exhausted"), stderr);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* path-concat.c -- concatenate two arbitrary pathnames
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 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
|
||||
@@ -55,14 +55,7 @@ char *malloc ();
|
||||
char *strdup ();
|
||||
#endif
|
||||
|
||||
#ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
#endif
|
||||
|
||||
#include "dirname.h"
|
||||
#include "xalloc.h"
|
||||
#include "path-concat.h"
|
||||
|
||||
@@ -84,8 +77,8 @@ path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
{
|
||||
char *p;
|
||||
char *p_concat;
|
||||
size_t base_len;
|
||||
size_t dir_len;
|
||||
size_t baselen;
|
||||
size_t dirlen;
|
||||
|
||||
if (!dir)
|
||||
{
|
||||
@@ -96,27 +89,28 @@ path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
}
|
||||
|
||||
/* DIR is not empty. */
|
||||
base_len = strlen (base);
|
||||
dir_len = strlen (dir);
|
||||
baselen = base_len (base);
|
||||
dirlen = strlen (dir);
|
||||
|
||||
p_concat = malloc (dir_len + base_len + 2);
|
||||
p_concat = malloc (dirlen + baselen + 2);
|
||||
if (!p_concat)
|
||||
return 0;
|
||||
|
||||
p = mempcpy (p_concat, dir, dir_len);
|
||||
p = mempcpy (p_concat, dir, dirlen);
|
||||
|
||||
if (dir_len > 0)
|
||||
if (FILESYSTEM_PREFIX_LEN (dir) < dirlen)
|
||||
{
|
||||
if (ISSLASH (*(p - 1)) && ISSLASH(*base))
|
||||
if (ISSLASH (*(p - 1)) && ISSLASH (*base))
|
||||
--p;
|
||||
else if (!ISSLASH (*(p - 1)) && !ISSLASH(*base))
|
||||
else if (!ISSLASH (*(p - 1)) && !ISSLASH (*base))
|
||||
*p++ = DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
if (base_in_result)
|
||||
*base_in_result = p;
|
||||
|
||||
memcpy (p, base, base_len + 1);
|
||||
memcpy (p, base, baselen);
|
||||
p[baselen] = '\0';
|
||||
|
||||
return p_concat;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDDEF_H
|
||||
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <quotearg.h>
|
||||
#include <quote.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* quotearg.c - quote arguments for output
|
||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -21,6 +21,9 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDDEF_H
|
||||
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <quotearg.h>
|
||||
#include <xalloc.h>
|
||||
@@ -63,13 +66,7 @@
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_MBRTOWC
|
||||
size_t mbrtowc ();
|
||||
# ifdef mbstate_t
|
||||
# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
|
||||
# define mbsinit(ps) 1
|
||||
# endif
|
||||
#else
|
||||
#if !HAVE_MBRTOWC
|
||||
/* Disable multibyte processing entirely. Since MB_CUR_MAX is 1, the
|
||||
other macros are defined only for documentation and to satisfy C
|
||||
syntax. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Declarations for GNU's read utmp module.
|
||||
Copyright (C) 1992-2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2001 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
|
||||
@@ -69,6 +69,9 @@
|
||||
# undef UT_USER
|
||||
# define UT_USER(Utmp) ((Utmp)->ut_name)
|
||||
# endif
|
||||
# if defined HAVE_STRUCT_UTMPX_UT_TYPE
|
||||
# define UT_TYPE(Utmp) ((Utmp)->ut_type)
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
@@ -79,6 +82,9 @@
|
||||
# undef UT_USER
|
||||
# define UT_USER(Utmp) Utmp->ut_name
|
||||
# endif
|
||||
# if defined HAVE_STRUCT_UTMP_UT_TYPE
|
||||
# define UT_TYPE(Utmp) ((Utmp)->ut_type)
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
|
||||
2342
lib/regex.c
2342
lib/regex.c
File diff suppressed because it is too large
Load Diff
@@ -160,6 +160,11 @@ typedef unsigned long int reg_syntax_t;
|
||||
this bit set, and it won't affect anything in the normal case. */
|
||||
#define RE_DEBUG (RE_NO_GNU_OPS << 1)
|
||||
|
||||
/* If this bit is set, a syntactically invalid interval is treated as
|
||||
a string of ordinary characters. For example, the ERE 'a{1' is
|
||||
treated as 'a\{1'. */
|
||||
#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
|
||||
|
||||
/* This global variable defines the particular regexp syntax to use (for
|
||||
some interfaces). When a regexp is compiled, the syntax used is
|
||||
stored in the pattern buffer, so changing this does not affect
|
||||
@@ -199,7 +204,8 @@ extern reg_syntax_t re_syntax_options;
|
||||
| RE_NO_BK_VBAR)
|
||||
|
||||
#define RE_SYNTAX_POSIX_EGREP \
|
||||
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
|
||||
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
|
||||
| RE_INVALID_INTERVAL_ORD)
|
||||
|
||||
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
|
||||
#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
|
||||
|
||||
67
lib/rename.c
Normal file
67
lib/rename.c
Normal file
@@ -0,0 +1,67 @@
|
||||
/* Work around the bug in some systems whereby rename fails when the source
|
||||
path has a trailing slash. The rename from SunOS 4.1.1_U1 has this bug.
|
||||
Copyright (C) 2001 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 Volker Borchert */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include "dirname.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef HAVE_DECL_FREE
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_FREE
|
||||
void free ();
|
||||
#endif
|
||||
|
||||
/* Rename the file SRC_PATH to DST_PATH, removing any trailing
|
||||
slashes from SRC_PATH. Needed for SunOS 4.1.1_U1. */
|
||||
|
||||
int
|
||||
rpl_rename (const char *src_path, const char *dst_path)
|
||||
{
|
||||
char *src_temp;
|
||||
int ret_val;
|
||||
size_t s_len = strlen (src_path);
|
||||
|
||||
if (s_len && src_path[s_len - 1] == '/')
|
||||
{
|
||||
src_temp = xstrdup (src_path);
|
||||
strip_trailing_slashes (src_temp);
|
||||
}
|
||||
else
|
||||
src_temp = (char *) src_path;
|
||||
|
||||
ret_val = rename (src_temp, dst_path);
|
||||
|
||||
if (src_temp != src_path)
|
||||
free (src_temp);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
19
lib/same.c
19
lib/same.c
@@ -54,8 +54,6 @@ extern int errno;
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
|
||||
#define STREQ(a, b) (strcmp ((a), (b)) == 0)
|
||||
|
||||
#ifndef HAVE_DECL_FREE
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
@@ -63,8 +61,6 @@ extern int errno;
|
||||
void free ();
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *));
|
||||
|
||||
#define SAME_INODE(Stat_buf_1, Stat_buf_2) \
|
||||
((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
|
||||
&& (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
|
||||
@@ -78,11 +74,11 @@ same_name (const char *source, const char *dest)
|
||||
struct stat source_dir_stats;
|
||||
struct stat dest_dir_stats;
|
||||
char *source_dirname, *dest_dirname;
|
||||
char *source_basename, *dest_basename;
|
||||
size_t source_baselen, dest_baselen;
|
||||
|
||||
source_dirname = dir_name (source);
|
||||
dest_dirname = dir_name (dest);
|
||||
if (source_dirname == NULL || dest_dirname == NULL)
|
||||
xalloc_die ();
|
||||
|
||||
if (stat (source_dirname, &source_dir_stats))
|
||||
{
|
||||
@@ -99,6 +95,13 @@ same_name (const char *source, const char *dest)
|
||||
free (source_dirname);
|
||||
free (dest_dirname);
|
||||
|
||||
return (SAME_INODE (source_dir_stats, dest_dir_stats)
|
||||
&& STREQ (base_name (source), base_name (dest)));
|
||||
if (! SAME_INODE (source_dir_stats, dest_dir_stats))
|
||||
return 0;
|
||||
|
||||
source_basename = base_name (source);
|
||||
dest_basename = base_name (dest);
|
||||
source_baselen = base_len (source_basename);
|
||||
dest_baselen = base_len (dest_basename);
|
||||
return (source_baselen == dest_baselen
|
||||
&& memcmp (source_basename, dest_basename, dest_baselen) == 0);
|
||||
}
|
||||
|
||||
9
lib/stdio-safer.h
Normal file
9
lib/stdio-safer.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
FILE *fopen_safer PARAMS ((char const *, char const *));
|
||||
100
lib/strftime.c
100
lib/strftime.c
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
@@ -289,7 +289,7 @@ static const CHAR_T zeroes[16] = /* "0000000000000000" */
|
||||
else if (to_uppcase) \
|
||||
memcpy_uppcase (p, (s), _n); \
|
||||
else \
|
||||
MEMCPY ((PTR) p, (PTR) (s), _n))
|
||||
MEMCPY ((PTR) p, (const PTR) (s), _n))
|
||||
|
||||
#ifdef COMPILE_WIDE
|
||||
# define widen(os, ws, l) \
|
||||
@@ -421,40 +421,49 @@ static CHAR_T const month_name[][10] =
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef emacs
|
||||
# define my_strftime emacs_strftimeu
|
||||
# define ut_argument , ut
|
||||
# define ut_argument_spec int ut;
|
||||
# define ut_argument_spec_iso , int ut
|
||||
/* When compiling this file, GNU applications can #define my_strftime
|
||||
to a symbol (typically nstrftime) to get an extended strftime with
|
||||
extra arguments UT and NS. Emacs is a special case for now, but
|
||||
this Emacs-specific code can be removed once Emacs's config.h
|
||||
defines my_strftime. */
|
||||
#if defined emacs && !defined my_strftime
|
||||
# define my_strftime nstrftime
|
||||
#endif
|
||||
|
||||
#ifdef my_strftime
|
||||
# define extra_args , ut, ns
|
||||
# define extra_args_spec int ut; int ns;
|
||||
# define extra_args_spec_iso , int ut, int ns
|
||||
#else
|
||||
# ifdef COMPILE_WIDE
|
||||
# define my_strftime wcsftime
|
||||
# else
|
||||
# define my_strftime strftime
|
||||
# endif
|
||||
# define ut_argument
|
||||
# define ut_argument_spec
|
||||
# define ut_argument_spec_iso
|
||||
# define extra_args
|
||||
# define extra_args_spec
|
||||
# define extra_args_spec_iso
|
||||
/* We don't have this information in general. */
|
||||
# define ut 0
|
||||
# define ns 0
|
||||
#endif
|
||||
|
||||
#if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET
|
||||
/* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
|
||||
Work around this bug by copying *tp before it might be munged. */
|
||||
size_t _strftime_copytm __P ((char *, size_t, const char *,
|
||||
const struct tm * ut_argument_spec_iso));
|
||||
const struct tm * extra_args_spec_iso));
|
||||
size_t
|
||||
my_strftime (s, maxsize, format, tp ut_argument)
|
||||
my_strftime (s, maxsize, format, tp extra_args)
|
||||
CHAR_T *s;
|
||||
size_t maxsize;
|
||||
const CHAR_T *format;
|
||||
const struct tm *tp;
|
||||
ut_argument_spec
|
||||
extra_args_spec
|
||||
{
|
||||
struct tm tmcopy;
|
||||
tmcopy = *tp;
|
||||
return _strftime_copytm (s, maxsize, format, &tmcopy ut_argument);
|
||||
return _strftime_copytm (s, maxsize, format, &tmcopy extra_args);
|
||||
}
|
||||
# undef my_strftime
|
||||
# define my_strftime _strftime_copytm
|
||||
@@ -468,12 +477,12 @@ static CHAR_T const month_name[][10] =
|
||||
anywhere, so to determine how many characters would be
|
||||
written, use NULL for S and (size_t) UINT_MAX for MAXSIZE. */
|
||||
size_t
|
||||
my_strftime (s, maxsize, format, tp ut_argument)
|
||||
my_strftime (s, maxsize, format, tp extra_args)
|
||||
CHAR_T *s;
|
||||
size_t maxsize;
|
||||
const CHAR_T *format;
|
||||
const struct tm *tp;
|
||||
ut_argument_spec
|
||||
extra_args_spec
|
||||
{
|
||||
int hour12 = tp->tm_hour;
|
||||
#ifdef _NL_CURRENT
|
||||
@@ -793,10 +802,11 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
goto bad_format;
|
||||
#ifdef _NL_CURRENT
|
||||
if (! (modifier == 'E'
|
||||
&& (*(subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME,
|
||||
NLW(ERA_D_T_FMT)))
|
||||
&& (*(subfmt =
|
||||
(const CHAR_T *) _NL_CURRENT (LC_TIME,
|
||||
NLW(ERA_D_T_FMT)))
|
||||
!= '\0')))
|
||||
subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT));
|
||||
subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT));
|
||||
#else
|
||||
# if HAVE_STRFTIME
|
||||
goto underlying_strftime;
|
||||
@@ -809,9 +819,9 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
{
|
||||
CHAR_T *old_start = p;
|
||||
size_t len = my_strftime (NULL, (size_t) -1, subfmt,
|
||||
tp ut_argument);
|
||||
tp extra_args);
|
||||
add (len, my_strftime (p, maxsize - i, subfmt,
|
||||
tp ut_argument));
|
||||
tp extra_args));
|
||||
|
||||
if (to_uppcase)
|
||||
while (old_start < p)
|
||||
@@ -887,10 +897,10 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
goto bad_format;
|
||||
#ifdef _NL_CURRENT
|
||||
if (! (modifier == L_('E')
|
||||
&& (*(subfmt = (CHAR_T *)_NL_CURRENT (LC_TIME,
|
||||
NLW(ERA_D_FMT)))
|
||||
&& (*(subfmt =
|
||||
(const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT)))
|
||||
!= L_('\0'))))
|
||||
subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT));
|
||||
subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT));
|
||||
goto subformat;
|
||||
#else
|
||||
# if HAVE_STRFTIME
|
||||
@@ -1043,6 +1053,21 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
|
||||
DO_NUMBER (2, tp->tm_mon + 1);
|
||||
|
||||
case L_('N'): /* GNU extension. */
|
||||
if (modifier == L_('E'))
|
||||
goto bad_format;
|
||||
|
||||
number_value = ns;
|
||||
if (width != -1)
|
||||
{
|
||||
/* Take an explicit width less than 9 as a precision. */
|
||||
int j;
|
||||
for (j = width; j < 9; j++)
|
||||
number_value /= 10;
|
||||
}
|
||||
|
||||
DO_NUMBER (9, number_value);
|
||||
|
||||
case L_('n'): /* POSIX.2 extension. */
|
||||
add (1, *p = L_('\n'));
|
||||
break;
|
||||
@@ -1067,14 +1092,15 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
goto underlying_strftime;
|
||||
#endif
|
||||
|
||||
case L_('R'): /* GNU extension. */
|
||||
case L_('R'): /* ISO C99 extension. */
|
||||
subfmt = L_("%H:%M");
|
||||
goto subformat;
|
||||
|
||||
case L_('r'): /* POSIX.2 extension. */
|
||||
#ifdef _NL_CURRENT
|
||||
if (*(subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME,
|
||||
NLW(T_FMT_AMPM))) == L_('\0'))
|
||||
if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME,
|
||||
NLW(T_FMT_AMPM)))
|
||||
== L_('\0'))
|
||||
#endif
|
||||
subfmt = L_("%I:%M:%S %p");
|
||||
goto subformat;
|
||||
@@ -1129,10 +1155,10 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
goto bad_format;
|
||||
#ifdef _NL_CURRENT
|
||||
if (! (modifier == L_('E')
|
||||
&& (*(subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME,
|
||||
NLW(ERA_T_FMT)))
|
||||
&& (*(subfmt =
|
||||
(const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_T_FMT)))
|
||||
!= L_('\0'))))
|
||||
subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT));
|
||||
subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT));
|
||||
goto subformat;
|
||||
#else
|
||||
# if HAVE_STRFTIME
|
||||
@@ -1159,8 +1185,8 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7);
|
||||
|
||||
case L_('V'):
|
||||
case L_('g'): /* GNU extension. */
|
||||
case L_('G'): /* GNU extension. */
|
||||
case L_('g'): /* ISO C99 extension. */
|
||||
case L_('G'): /* ISO C99 extension. */
|
||||
if (modifier == L_('E'))
|
||||
goto bad_format;
|
||||
{
|
||||
@@ -1284,7 +1310,7 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
#endif
|
||||
break;
|
||||
|
||||
case L_('z'): /* GNU extension. */
|
||||
case L_('z'): /* ISO C99 extension. */
|
||||
if (tp->tm_isdst < 0)
|
||||
break;
|
||||
|
||||
@@ -1366,15 +1392,15 @@ my_strftime (s, maxsize, format, tp ut_argument)
|
||||
|
||||
#ifdef emacs
|
||||
/* For Emacs we have a separate interface which corresponds to the normal
|
||||
strftime function and does not have the extra information whether the
|
||||
TP arguments comes from a `gmtime' call or not. */
|
||||
strftime function plus the ut argument, but without the ns argument. */
|
||||
size_t
|
||||
emacs_strftime (s, maxsize, format, tp)
|
||||
emacs_strftimeu (s, maxsize, format, tp, ut)
|
||||
char *s;
|
||||
size_t maxsize;
|
||||
const char *format;
|
||||
const struct tm *tp;
|
||||
int ut;
|
||||
{
|
||||
return my_strftime (s, maxsize, format, tp, 0);
|
||||
return my_strftime (s, maxsize, format, tp, ut, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* stripslash.c -- remove trailing slashes from a string
|
||||
Copyright (C) 1990 Free Software Foundation, Inc.
|
||||
/* stripslash.c -- remove redundant trailing slashes from a file name
|
||||
Copyright (C) 1990, 2001 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
|
||||
@@ -25,22 +25,21 @@
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif
|
||||
#include "dirname.h"
|
||||
|
||||
/* Remove trailing slashes from PATH.
|
||||
Return nonzero if a trailing slash was removed.
|
||||
This is useful when using filename completion from a shell that
|
||||
adds a "/" after directory names (such as tcsh and bash), because
|
||||
the Unix rename and rmdir system calls return an "Invalid argument" error
|
||||
when given a path that ends in "/" (except for the root directory). */
|
||||
|
||||
void
|
||||
int
|
||||
strip_trailing_slashes (char *path)
|
||||
{
|
||||
int last;
|
||||
|
||||
last = strlen (path) - 1;
|
||||
while (0 < last && ISSLASH (path[last]))
|
||||
path[last--] = '\0';
|
||||
char *base = base_name (path);
|
||||
char *base_lim = base + base_len (base);
|
||||
int had_slash = *base_lim;
|
||||
*base_lim = '\0';
|
||||
return had_slash;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Find the length of STRING, but scan at most MAXLEN characters.
|
||||
Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 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
|
||||
@@ -51,7 +51,7 @@ size_t
|
||||
__strnlen (const char *string, size_t maxlen)
|
||||
{
|
||||
const char *end = memchr (string, '\0', maxlen);
|
||||
return end ? end - string : maxlen;
|
||||
return end ? (size_t) (end - string) : maxlen;
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__strnlen, strnlen)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1999, 2001 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
@@ -19,4 +19,4 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define UNSIGNED 1
|
||||
|
||||
#include <strtol.c>
|
||||
#include "strtol.c"
|
||||
|
||||
306
lib/tempname.c
Normal file
306
lib/tempname.c
Normal file
@@ -0,0 +1,306 @@
|
||||
/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef __set_errno
|
||||
# define __set_errno(Val) errno = (Val)
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef P_tmpdir
|
||||
# define P_tmpdir "/tmp"
|
||||
#endif
|
||||
#ifndef TMP_MAX
|
||||
# define TMP_MAX 238328
|
||||
#endif
|
||||
#ifndef __GT_FILE
|
||||
# define __GT_FILE 0
|
||||
# define __GT_BIGFILE 1
|
||||
# define __GT_DIR 2
|
||||
# define __GT_NOCREATE 3
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS || _LIBC
|
||||
# include <stddef.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_FCNTL_H || _LIBC
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_TIME_H || _LIBC
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDINT_H || _LIBC
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H || _LIBC
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
#if !defined S_ISDIR && defined S_IFDIR
|
||||
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
#if !S_IRUSR && S_IREAD
|
||||
# define S_IRUSR S_IREAD
|
||||
#endif
|
||||
#if !S_IRUSR
|
||||
# define S_IRUSR 00400
|
||||
#endif
|
||||
#if !S_IWUSR && S_IWRITE
|
||||
# define S_IWUSR S_IWRITE
|
||||
#endif
|
||||
#if !S_IWUSR
|
||||
# define S_IWUSR 00200
|
||||
#endif
|
||||
#if !S_IXUSR && S_IEXEC
|
||||
# define S_IXUSR S_IEXEC
|
||||
#endif
|
||||
#if !S_IXUSR
|
||||
# define S_IXUSR 00100
|
||||
#endif
|
||||
|
||||
#if _LIBC
|
||||
# define struct_stat64 struct stat64
|
||||
#else
|
||||
# define struct_stat64 struct stat
|
||||
# define __getpid getpid
|
||||
# define __gettimeofday gettimeofday
|
||||
# define __mkdir mkdir
|
||||
# define __open open
|
||||
# define __open64 open
|
||||
# define __lxstat64(version, path, buf) lstat (path, buf)
|
||||
# define __xstat64(version, path, buf) stat (path, buf)
|
||||
#endif
|
||||
|
||||
#if ! (HAVE___SECURE_GETENV || _LIBC)
|
||||
# define __secure_getenv getenv
|
||||
#endif
|
||||
|
||||
/* Use the widest available unsigned type if uint64_t is not
|
||||
available. The algorithm below extracts a number less than 62**6
|
||||
(approximately 2**35.725) from uint64_t, so ancient hosts where
|
||||
uintmax_t is only 32 bits lose about 3.725 bits of randomness,
|
||||
which is better than not having mkstemp at all. */
|
||||
#if !defined UINT64_MAX && !defined uint64_t
|
||||
# define uint64_t uintmax_t
|
||||
#endif
|
||||
|
||||
/* Return nonzero if DIR is an existent directory. */
|
||||
static int
|
||||
direxists (const char *dir)
|
||||
{
|
||||
struct_stat64 buf;
|
||||
return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode);
|
||||
}
|
||||
|
||||
/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is
|
||||
non-null and exists, uses it; otherwise uses the first of $TMPDIR,
|
||||
P_tmpdir, /tmp that exists. Copies into TMPL a template suitable
|
||||
for use with mk[s]temp. Will fail (-1) if DIR is non-null and
|
||||
doesn't exist, none of the searched dirs exists, or there's not
|
||||
enough space in TMPL. */
|
||||
int
|
||||
__path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
|
||||
int try_tmpdir)
|
||||
{
|
||||
const char *d;
|
||||
size_t dlen, plen;
|
||||
|
||||
if (!pfx || !pfx[0])
|
||||
{
|
||||
pfx = "file";
|
||||
plen = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
plen = strlen (pfx);
|
||||
if (plen > 5)
|
||||
plen = 5;
|
||||
}
|
||||
|
||||
if (try_tmpdir)
|
||||
{
|
||||
d = __secure_getenv ("TMPDIR");
|
||||
if (d != NULL && direxists (d))
|
||||
dir = d;
|
||||
else if (dir != NULL && direxists (dir))
|
||||
/* nothing */ ;
|
||||
else
|
||||
dir = NULL;
|
||||
}
|
||||
if (dir == NULL)
|
||||
{
|
||||
if (direxists (P_tmpdir))
|
||||
dir = P_tmpdir;
|
||||
else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||
dir = "/tmp";
|
||||
else
|
||||
{
|
||||
__set_errno (ENOENT);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
dlen = strlen (dir);
|
||||
while (dlen > 1 && dir[dlen - 1] == '/')
|
||||
dlen--; /* remove trailing slashes */
|
||||
|
||||
/* check we have room for "${dir}/${pfx}XXXXXX\0" */
|
||||
if (tmpl_len < dlen + 1 + plen + 6 + 1)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* These are the characters used in temporary filenames. */
|
||||
static const char letters[] =
|
||||
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
|
||||
/* Generate a temporary file name based on TMPL. TMPL must match the
|
||||
rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed
|
||||
does not exist at the time of the call to __gen_tempname. TMPL is
|
||||
overwritten with the result.
|
||||
|
||||
KIND may be one of:
|
||||
__GT_NOCREATE: simply verify that the name does not exist
|
||||
at the time of the call.
|
||||
__GT_FILE: create the file using open(O_CREAT|O_EXCL)
|
||||
and return a read-write fd. The file is mode 0600.
|
||||
__GT_BIGFILE: same as __GT_FILE but use open64().
|
||||
__GT_DIR: create a directory, which will be mode 0700.
|
||||
|
||||
We use a clever algorithm to get hard-to-predict names. */
|
||||
int
|
||||
__gen_tempname (char *tmpl, int kind)
|
||||
{
|
||||
int len;
|
||||
char *XXXXXX;
|
||||
static uint64_t value;
|
||||
uint64_t random_time_bits;
|
||||
int count, fd = -1;
|
||||
int save_errno = errno;
|
||||
struct_stat64 st;
|
||||
|
||||
len = strlen (tmpl);
|
||||
if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX"))
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* This is where the Xs start. */
|
||||
XXXXXX = &tmpl[len - 6];
|
||||
|
||||
/* Get some more or less random data. */
|
||||
#if HAVE_GETTIMEOFDAY || _LIBC
|
||||
{
|
||||
struct timeval tv;
|
||||
__gettimeofday (&tv, NULL);
|
||||
random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec;
|
||||
}
|
||||
#else
|
||||
random_time_bits = time (NULL);
|
||||
#endif
|
||||
value += random_time_bits ^ __getpid ();
|
||||
|
||||
for (count = 0; count < TMP_MAX; value += 7777, ++count)
|
||||
{
|
||||
uint64_t v = value;
|
||||
|
||||
/* Fill in the random bits. */
|
||||
XXXXXX[0] = letters[v % 62];
|
||||
v /= 62;
|
||||
XXXXXX[1] = letters[v % 62];
|
||||
v /= 62;
|
||||
XXXXXX[2] = letters[v % 62];
|
||||
v /= 62;
|
||||
XXXXXX[3] = letters[v % 62];
|
||||
v /= 62;
|
||||
XXXXXX[4] = letters[v % 62];
|
||||
v /= 62;
|
||||
XXXXXX[5] = letters[v % 62];
|
||||
|
||||
switch (kind)
|
||||
{
|
||||
case __GT_FILE:
|
||||
fd = __open (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
|
||||
break;
|
||||
|
||||
case __GT_BIGFILE:
|
||||
fd = __open64 (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
|
||||
break;
|
||||
|
||||
case __GT_DIR:
|
||||
fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
|
||||
break;
|
||||
|
||||
case __GT_NOCREATE:
|
||||
/* This case is backward from the other three. __gen_tempname
|
||||
succeeds if __xstat fails because the name does not exist.
|
||||
Note the continue to bypass the common logic at the bottom
|
||||
of the loop. */
|
||||
if (__lxstat64 (_STAT_VER, tmpl, &st) < 0)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
{
|
||||
__set_errno (save_errno);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
/* Give up now. */
|
||||
return -1;
|
||||
}
|
||||
continue;
|
||||
|
||||
default:
|
||||
assert (! "invalid KIND in __gen_tempname");
|
||||
}
|
||||
|
||||
if (fd >= 0)
|
||||
{
|
||||
__set_errno (save_errno);
|
||||
return fd;
|
||||
}
|
||||
else if (errno != EEXIST)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* We got out of the loop because we ran out of combinations to try. */
|
||||
__set_errno (EEXIST);
|
||||
return -1;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Unicode character output to streams with locale dependent encoding.
|
||||
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2001 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
|
||||
@@ -124,13 +124,11 @@ print_unicode_char (FILE *stream, unsigned int code)
|
||||
extern const char *locale_charset PARAMS ((void));
|
||||
const char *charset = locale_charset ();
|
||||
|
||||
is_utf8 = (charset != NULL && !strcmp (charset, UTF8_NAME));
|
||||
is_utf8 = !strcmp (charset, UTF8_NAME);
|
||||
#if HAVE_ICONV
|
||||
if (!is_utf8)
|
||||
{
|
||||
utf8_to_local = (charset != NULL
|
||||
? iconv_open (charset, UTF8_NAME)
|
||||
: (iconv_t)(-1));
|
||||
utf8_to_local = iconv_open (charset, UTF8_NAME);
|
||||
if (utf8_to_local == (iconv_t)(-1))
|
||||
{
|
||||
/* For an unknown encoding, assume ASCII. */
|
||||
@@ -170,7 +168,9 @@ print_unicode_char (FILE *stream, unsigned int code)
|
||||
outbytesleft = sizeof (outbuf);
|
||||
|
||||
/* Convert the character from UTF-8 to the locale's charset. */
|
||||
res = iconv (utf8_to_local, &inptr, &inbytesleft, &outptr, &outbytesleft);
|
||||
res = iconv (utf8_to_local,
|
||||
(ICONV_CONST char **)&inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (inbytesleft > 0 || res == (size_t)(-1)
|
||||
/* Irix iconv() inserts a NUL byte if it cannot convert. */
|
||||
# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi)
|
||||
|
||||
9
lib/unistd-safer.h
Normal file
9
lib/unistd-safer.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int dup_safer PARAMS ((int));
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Utility to help print --version output in a consistent format.
|
||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2001 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,7 +35,7 @@
|
||||
/* Default copyright goes to the FSF. */
|
||||
|
||||
char* version_etc_copyright =
|
||||
N_("Copyright (C) 2000 Free Software Foundation, Inc.");
|
||||
N_("Copyright (C) 2001 Free Software Foundation, Inc.");
|
||||
|
||||
|
||||
/* Display the --version information the standard way.
|
||||
|
||||
@@ -47,11 +47,11 @@ void free ();
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DONE_WORKING_MALLOC_CHECK
|
||||
you must run the autoconf test for a properly working malloc -- see malloc.m4
|
||||
"you must run the autoconf test for a properly working malloc -- see malloc.m4"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DONE_WORKING_REALLOC_CHECK
|
||||
you must run the autoconf test for a properly working realloc -- see realloc.m4
|
||||
"you must run the autoconf test for a properly working realloc --see realloc.m4"
|
||||
#endif
|
||||
|
||||
/* Exit value when the requested amount of memory is not available.
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
Makefile
|
||||
jm-glibc-io.m4
|
||||
|
||||
240
m4/ChangeLog
240
m4/ChangeLog
@@ -1,3 +1,223 @@
|
||||
2001-07-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
The following changes were prompted by suggestions from Bruno Haible.
|
||||
|
||||
* jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
|
||||
is now generated.
|
||||
* Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
|
||||
definition of EXTRA_DIST.
|
||||
(Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
|
||||
ensure that the generated file is created/updated whenever the list
|
||||
of $(unlocked_functions) is changed.
|
||||
(jm-glibc-io.m4): New rule.
|
||||
(unlocked-io.h): New rule -- currently unused.
|
||||
|
||||
2001-06-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
|
||||
unmatched right bracket, rather than kludging it with an extra,
|
||||
falsely-matching quote in a comment. Patch by Akim Demaille.
|
||||
|
||||
2001-05-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
|
||||
Check for ut_type in struct utmp.
|
||||
|
||||
2001-05-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
|
||||
now that we use the package-supplied version unconditionally.
|
||||
(jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
|
||||
|
||||
2001-05-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.m4: Change a couple backticks to single quotes to avoid shell
|
||||
syntax errors.
|
||||
|
||||
2001-05-19 Alexandre Duret-Lutz <duret_g@epita.fr>
|
||||
|
||||
* dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
|
||||
|
||||
2001-05-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
|
||||
Don't bother to check library strftime, since
|
||||
we'll be using our own my_strftime function anyway.
|
||||
Define my_strftime instead of strftime.
|
||||
|
||||
2001-05-15 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.m4: Use proper quoting so brackets appear in the test program.
|
||||
Reported by, and with help from, Bruno Haible.
|
||||
|
||||
2001-05-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4 (major_t, minor_t): Define to unsigned int if undefined.
|
||||
|
||||
2000-11-26 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
|
||||
|
||||
2001-04-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* rmdir-errno.m4: Write to a new file, so that a restrictive umask
|
||||
doesn't interfere.
|
||||
|
||||
2001-04-21 Alexandre Duret-Lutz <duret_g@epita.fr>
|
||||
|
||||
* ftruncate.m4: Check for chsize.
|
||||
Link with ftruncate.o unconditionally if ftruncate is missing.
|
||||
This was required when cross-compiling to i586-mingw32msvc.
|
||||
|
||||
2001-03-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4: Require autoconf-2.49d.
|
||||
|
||||
2001-03-20 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* iconv.m4 (jm_ICONV): Recommend GNU libiconv.
|
||||
|
||||
2001-03-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
|
||||
now that the version in autoconf is equivalent.
|
||||
(jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
|
||||
|
||||
* error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
|
||||
Suggestion from Akim Demaille.
|
||||
|
||||
* prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
|
||||
(jm_PREREQ_TEMPNAME): New function.
|
||||
|
||||
2001-02-25 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
|
||||
lacks mkstemp. Compile our own tempname.c if we compile our own
|
||||
mkstemp.c, as mkstemp relies on tempname.
|
||||
|
||||
2001-03-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
|
||||
AH_VERBATIM really does output its argument verbatim.
|
||||
|
||||
2001-02-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
|
||||
|
||||
2001-02-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
|
||||
getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
|
||||
further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
|
||||
UnixWare 7.1.1.
|
||||
|
||||
* mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
|
||||
rather than AC_CACHE_VAL.
|
||||
|
||||
2001-02-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
|
||||
* mbswidth.m4 (jm_PREREQ_MBSWIDTH):
|
||||
Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
|
||||
* prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
|
||||
|
||||
2001-02-07 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
|
||||
|
||||
2001-02-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4: Require autoconf-2.14d (not yet released), because
|
||||
it includes the patch required for `large file' support with at least
|
||||
HP-UX's 10.20 /bin/cc.
|
||||
|
||||
2001-02-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
|
||||
AS_IF, now that it works once again (mysteriously).
|
||||
* fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
|
||||
|
||||
2001-01-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
|
||||
* chown.m4: Rename conftestchown to conftest.chown.
|
||||
* rename.m4: s/conftestdir/conftest.d1/ and s/conftestdir2/conftest.d2/.
|
||||
* utimes.m4: s/conftestdata/conftest.data/
|
||||
Inspired by Pavel Roskin's change in autoconf.
|
||||
|
||||
2001-01-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
|
||||
a use of AS_IF.
|
||||
* fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
|
||||
|
||||
2001-01-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
|
||||
quotearg.c includes it.
|
||||
|
||||
2001-01-15 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* iconv.m4 (jm_ICONV): Also check whether the iconv declaration
|
||||
has const.
|
||||
|
||||
2001-01-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Be sure that headers are checked before used in code compiled
|
||||
for the type checks.
|
||||
* jm-macros.m4 (jm_MACROS): Remove all header checks.
|
||||
In place of that, invoke jm_CHECK_ALL_TYPES.
|
||||
(jm_CHECK_ALL_HEADERS): New functions with the above checks.
|
||||
(jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
|
||||
Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
|
||||
The check for ssize_t was mistakenly run before the test for unistd.h.
|
||||
|
||||
The configure-time check for stdbool.h was missing.
|
||||
* prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
|
||||
(jm_PREREQ_HASH): New function.
|
||||
|
||||
2001-01-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
|
||||
for autoconf-2.49c.
|
||||
* ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
|
||||
|
||||
2001-01-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* rename.m4: Use temporary directories named conftestdir{,2}, not
|
||||
foo and bar. Create conftestdir/ in the script, not in the C code.
|
||||
Remove directories in the script, not in the C code.
|
||||
Remove conftestdir{,2} before trying to create the directory.
|
||||
Make the entire configure script fail if the mkdir fails.
|
||||
|
||||
2001-01-02 Volker Borchert <bt@teknon.de>
|
||||
|
||||
* rename.m4: New file.
|
||||
* jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
|
||||
|
||||
2001-01-01 Alexandre Duret-Lutz <duret_g@epita.fr>
|
||||
|
||||
* libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
|
||||
expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
|
||||
so `make install' also works in VPATH builds.
|
||||
|
||||
2001-01-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available), even
|
||||
on systems with utmpx.h. It's necessary for the declaration of utmp's
|
||||
ut_user member. Reported by Andreas Jaeger.
|
||||
|
||||
* check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if available.
|
||||
They are required for the declarations of getgrgid and getpwuid resp.
|
||||
(_jm_DECL_HEADERS): Check for grp.h and pwd.h.
|
||||
Reported by Andreas Jaeger.
|
||||
|
||||
2000-12-25 Alexandre Duret-Lutz <duret_g@epita.fr>
|
||||
|
||||
* libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
|
||||
prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
|
||||
can be used in subdirectories.
|
||||
|
||||
2000-12-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work better
|
||||
@@ -85,7 +305,7 @@
|
||||
|
||||
2000-08-06 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
|
||||
* mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
|
||||
not char, for compatibility with glibc 2.1.3 strftime.c.
|
||||
|
||||
2000-07-23 Paul Eggert <eggert@twinsun.com>
|
||||
@@ -291,7 +511,7 @@
|
||||
2000-05-26 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* glibc21.m4: New file.
|
||||
* jm-macros.m4: (jm_MACROS): Call jm_GLIBC21.
|
||||
* jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
|
||||
|
||||
2000-05-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
@@ -342,7 +562,7 @@
|
||||
* rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
|
||||
* jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
|
||||
|
||||
* nanosleep.m4: (jm_FUNC_NANOSLEEP): Save and restore LIBS around
|
||||
* nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
|
||||
AC_SEARCH_LIBS call for nanosleep.
|
||||
(LIB_NANOSLEEP): Set and AC_SUBST.
|
||||
|
||||
@@ -391,13 +611,13 @@
|
||||
2000-04-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Get it right :-)
|
||||
* jm-macros.m4: (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
|
||||
actual #define via AH_VERBATIM. Don't need separate AC_DEFINE.
|
||||
Suggestion from Akim Demaille.
|
||||
|
||||
2000-04-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4: (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg form
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg form
|
||||
of AC_DEFINE. Otherwise, the #ifndef in AH_VERBATIM gets clobbered.
|
||||
|
||||
2000-04-13 Jim Meyering <meyering@lucent.com>
|
||||
@@ -526,7 +746,7 @@
|
||||
|
||||
2000-02-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4: (jm_CHECK_ALL_TYPES): Require most macros.
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
|
||||
Remove explicit use of AC_HEADER_TIME. It is required by
|
||||
jm_CHECK_TYPE_STRUCT_TIMESPEC. Using AC_HEADER_TIME and
|
||||
`AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
|
||||
@@ -587,10 +807,10 @@
|
||||
(jm_FILE_SYSTEM_USAGE): Take two parameters.
|
||||
|
||||
* ftruncate.m4: New file (derived from part of fileutils/configure.in).
|
||||
* jm-macros.m4: (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
|
||||
* jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
|
||||
(jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
|
||||
|
||||
* jm-macros.m4: (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
|
||||
* jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
|
||||
AC_SUBST these here, rather than just in sh-util/configure.in, so
|
||||
that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
|
||||
all the same.
|
||||
@@ -680,7 +900,7 @@
|
||||
|
||||
* d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
|
||||
jm_STRUCT_DIRENT_D_TYPE.
|
||||
* d-ino.m4: (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
|
||||
* d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
|
||||
jm_STRUCT_DIRENT_D_INO.
|
||||
* utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
|
||||
jm_STRUCT_UTIMBUF.
|
||||
@@ -869,7 +1089,7 @@
|
||||
|
||||
1999-07-15 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4: (AC_CHECK_FUNCS): Check for getpagesize.
|
||||
* jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
|
||||
|
||||
1999-05-22 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
|
||||
##m4-files-begin
|
||||
EXTRA_DIST = README Makefile.am.in \
|
||||
EXTRA_DIST = README jm-glibc-io.m4n Makefile.am.in \
|
||||
afs.m4 \
|
||||
assert.m4 \
|
||||
bison.m4 \
|
||||
@@ -41,6 +41,7 @@ link-follow.m4 \
|
||||
ls-mntd-fs.m4 \
|
||||
lstat.m4 \
|
||||
malloc.m4 \
|
||||
mbrtowc.m4 \
|
||||
mbstate_t.m4 \
|
||||
mbswidth.m4 \
|
||||
memcmp.m4 \
|
||||
@@ -52,6 +53,7 @@ putenv.m4 \
|
||||
readdir.m4 \
|
||||
realloc.m4 \
|
||||
regex.m4 \
|
||||
rename.m4 \
|
||||
rmdir-errno.m4 \
|
||||
search-libs.m4 \
|
||||
st_dm_mode.m4 \
|
||||
@@ -73,10 +75,47 @@ xstrtoumax.m4
|
||||
Makefile.am: Makefile.am.in
|
||||
rm -f $@ $@t
|
||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
||||
( (echo EXTRA_DIST = README Makefile.am.in | tr '\012' @); \
|
||||
((echo EXTRA_DIST = README jm-glibc-io.m4n Makefile.am.in|tr '\012' @);\
|
||||
(echo *.m4|tr ' ' @) ) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
>> $@t
|
||||
sed -n '/^##m4-files-end/,$$p' $< >> $@t
|
||||
echo >> $@t
|
||||
echo all-local: jm-glibc-io.m4 >> $@t
|
||||
chmod a-w $@t
|
||||
mv $@t $@
|
||||
|
||||
unlocked_functions = \
|
||||
clearerr_unlocked feof_unlocked ferror_unlocked \
|
||||
fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked \
|
||||
fread_unlocked fwrite_unlocked getc_unlocked getchar_unlocked \
|
||||
putc_unlocked putchar_unlocked
|
||||
|
||||
comma_separated = $(shell echo $(unlocked_functions)|tr -s ' ' ,)
|
||||
base_functions = $(patsubst %_unlocked,%,$(unlocked_functions))
|
||||
jm-glibc-io.m4: jm-glibc-io.m4n Makefile
|
||||
echo 'dnl This file is automatically generated from $<' > $@t
|
||||
echo '' >> $@t
|
||||
sed \
|
||||
-e 's/@space_separated@/$(unlocked_functions)/g' \
|
||||
-e 's/@comma_separated@/$(comma_separated)/g' \
|
||||
$< >> $@t
|
||||
move-if-change $@t $@
|
||||
|
||||
unlocked-io.h: unlocked-io.hin Makefile.am.in
|
||||
tmp=t$$$$; \
|
||||
echo '' > $$tmp; \
|
||||
for f in $(base_functions); do \
|
||||
u=`echo $$f|tr '[:lower:]' '[:upper:]'`; \
|
||||
echo "# if HAVE_$${u}_UNLOCKED" >> $$tmp; \
|
||||
echo "# undef $$f" >> $$tmp; \
|
||||
echo "# define $$f(S) $${f}_unlocked (S)" >> $$tmp; \
|
||||
echo '#endif' >> $$tmp; \
|
||||
done; \
|
||||
sed "/^@replace_this@$$/r$$tmp" $< \
|
||||
| sed "/^@replace_this@$$/d" \
|
||||
$< > $@t; \
|
||||
rm -f $$tmp; \
|
||||
mv $@t $@
|
||||
|
||||
all-local: jm-glibc-io.m4
|
||||
|
||||
@@ -6,10 +6,60 @@
|
||||
Makefile.am: Makefile.am.in
|
||||
rm -f $@ $@t
|
||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
||||
( (echo EXTRA_DIST = README Makefile.am.in | tr '\012' @); \
|
||||
(((echo EXTRA_DIST =; \
|
||||
echo " README jm-glibc-io.m4 jm-glibc-io.m4n Makefile.am.in" \
|
||||
) | tr '\012' @); \
|
||||
(echo *.m4|tr ' ' @) ) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
>> $@t
|
||||
sed -n '/^##m4-files-end/,$$p' $< >> $@t
|
||||
echo >> $@t
|
||||
echo all-local: glibc-io.stamp >> $@t
|
||||
chmod a-w $@t
|
||||
mv $@t $@
|
||||
|
||||
unlocked_functions = \
|
||||
clearerr_unlocked feof_unlocked ferror_unlocked \
|
||||
fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked \
|
||||
fread_unlocked fwrite_unlocked getc_unlocked getchar_unlocked \
|
||||
putc_unlocked putchar_unlocked
|
||||
|
||||
comma_separated = $(shell echo $(unlocked_functions)|tr -s ' ' ,)
|
||||
base_functions = $(patsubst %_unlocked,%,$(unlocked_functions))
|
||||
|
||||
# Don't depend directly on jm-glibc-io.m4, because that would cause it
|
||||
# to be created in non-srcdir==. builds, and that leads to problems with
|
||||
# distcheck. Note also that we can't add it to DISTCLEANFILES for similar
|
||||
# reasons.
|
||||
glibc-io.stamp: jm-glibc-io.m4n Makefile
|
||||
if test `pwd` = `cd $(srcdir); pwd`; then \
|
||||
t=jm-glibc-io.m4; \
|
||||
src=$(srcdir)/jm-glibc-io.m4n; \
|
||||
echo "dnl This file is automatically generated from $${t}n." \
|
||||
> $${t}t; \
|
||||
echo '' >> $${t}t; \
|
||||
sed \
|
||||
-e 's/@space_separated@/$(unlocked_functions)/g' \
|
||||
-e 's/@comma_separated@/$(comma_separated)/g' \
|
||||
$$src >> $${t}t; \
|
||||
move-if-change $${t}t $$t; \
|
||||
fi
|
||||
touch $@
|
||||
|
||||
DISTCLEANFILES = glibc-io.stamp
|
||||
|
||||
unlocked-io.h: unlocked-io.hin Makefile.am.in
|
||||
tmp=t$$$$; \
|
||||
echo '' > $$tmp; \
|
||||
for f in $(base_functions); do \
|
||||
u=`echo $$f|tr '[:lower:]' '[:upper:]'`; \
|
||||
echo "# if HAVE_$${u}_UNLOCKED" >> $$tmp; \
|
||||
echo "# undef $$f" >> $$tmp; \
|
||||
echo "# define $$f(S) $${f}_unlocked (S)" >> $$tmp; \
|
||||
echo '#endif' >> $$tmp; \
|
||||
done; \
|
||||
sed "/^@replace_this@$$/r$$tmp" $< \
|
||||
| sed "/^@replace_this@$$/d" \
|
||||
$< > $@t; \
|
||||
rm -f $$tmp; \
|
||||
mv $@t $@
|
||||
|
||||
173
m4/Makefile.in
173
m4/Makefile.in
@@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4b from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4i from Makefile.am.
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -11,6 +11,8 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -31,11 +33,9 @@ infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
@@ -47,28 +47,22 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_FLAG =
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
|
||||
@SET_MAKE@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
@@ -82,6 +76,7 @@ GNU_PACKAGE = @GNU_PACKAGE@
|
||||
GT_NO = @GT_NO@
|
||||
GT_YES = @GT_YES@
|
||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
@@ -92,7 +87,6 @@ LIBOBJS = @LIBOBJS@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
LIB_NANOSLEEP = @LIB_NANOSLEEP@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
@@ -112,11 +106,13 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
_am_include = @_am_include@
|
||||
_am_quote = @_am_quote@
|
||||
install_sh = @install_sh@
|
||||
l = @l@
|
||||
|
||||
|
||||
EXTRA_DIST = README Makefile.am.in \
|
||||
EXTRA_DIST = \
|
||||
README jm-glibc-io.m4 jm-glibc-io.m4n Makefile.am.in \
|
||||
afs.m4 \
|
||||
assert.m4 \
|
||||
bison.m4 \
|
||||
@@ -156,6 +152,7 @@ link-follow.m4 \
|
||||
ls-mntd-fs.m4 \
|
||||
lstat.m4 \
|
||||
malloc.m4 \
|
||||
mbrtowc.m4 \
|
||||
mbstate_t.m4 \
|
||||
mbswidth.m4 \
|
||||
memcmp.m4 \
|
||||
@@ -167,6 +164,7 @@ putenv.m4 \
|
||||
readdir.m4 \
|
||||
realloc.m4 \
|
||||
regex.m4 \
|
||||
rename.m4 \
|
||||
rmdir-errno.m4 \
|
||||
search-libs.m4 \
|
||||
st_dm_mode.m4 \
|
||||
@@ -184,35 +182,41 @@ utime.m4 \
|
||||
utimes.m4 \
|
||||
xstrtoumax.m4
|
||||
|
||||
EXEEXT =
|
||||
OBJEXT = o
|
||||
subdir = m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
DIST_COMMON = README ChangeLog Makefile.am Makefile.in
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
DIST_COMMON = README ChangeLog Makefile.am Makefile.in
|
||||
all: all-am
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnits m4/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnits m4/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
@@ -222,72 +226,86 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
all-am: Makefile
|
||||
|
||||
install-data-am:
|
||||
installdirs:
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am:
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
installdirs:
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
-rm -f Makefile.in
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-generic clean-am
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am info info-am install \
|
||||
install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
Makefile.am: Makefile.am.in
|
||||
rm -f $@ $@t
|
||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
||||
( (echo EXTRA_DIST = README Makefile.am.in | tr '\012' @); \
|
||||
(((echo EXTRA_DIST =; \
|
||||
echo " README jm-glibc-io.m4 jm-glibc-io.m4n Makefile.am.in" \
|
||||
) | tr '\012' @); \
|
||||
(echo *.m4|tr ' ' @) ) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
>> $@t
|
||||
@@ -295,6 +313,21 @@ Makefile.am: Makefile.am.in
|
||||
chmod a-w $@t
|
||||
mv $@t $@
|
||||
|
||||
unlocked-io.h: unlocked-io.hin Makefile.am.in
|
||||
tmp=t$$$$; \
|
||||
echo > $$tmp; \
|
||||
for f in $(base_functions); do \
|
||||
u=`echo $$f|tr '[:lower:]' '[:upper:]'`; \
|
||||
echo "# if HAVE_$${u}_UNLOCKED" >> $$tmp; \
|
||||
echo "# undef $$f" >> $$tmp; \
|
||||
echo "# define $$f(S) $${f}_unlocked (S)" >> $$tmp; \
|
||||
echo '#endif' >> $$tmp; \
|
||||
done; \
|
||||
sed "/^@replace_this@$$/r$$tmp" $< \
|
||||
| sed "/^@replace_this@$$/d" \
|
||||
$< > $@t; \
|
||||
rm -f $$tmp; \
|
||||
mv $@t $@
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
@@ -3,7 +3,7 @@ and textutils packages.
|
||||
|
||||
These files are used by a program called aclocal (part of the GNU automake
|
||||
package). aclocal uses these files to create aclocal.m4 which is in turn
|
||||
used by autoconf to create the configure script at the the top level in
|
||||
used by autoconf to create the configure script at the top level in
|
||||
this distribution.
|
||||
|
||||
The Makefile.am file in this directory is automatically generated
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 16
|
||||
#serial 17
|
||||
|
||||
dnl This is just a wrapper function to encapsulate this kludge.
|
||||
dnl Putting it in a separate file like this helps share it between
|
||||
@@ -41,6 +41,14 @@ AC_DEFUN(jm_CHECK_DECLS,
|
||||
#if HAVE_UTMP_H
|
||||
# include <utmp.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_GRP_H
|
||||
# include <grp.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_PWD_H
|
||||
# include <pwd.h>
|
||||
#endif
|
||||
'
|
||||
|
||||
AC_CHECK_DECLS([
|
||||
@@ -72,6 +80,6 @@ dnl This is a little helper so we can require these header checks.
|
||||
AC_DEFUN(_jm_DECL_HEADERS,
|
||||
[
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h sys/time.h \
|
||||
utmp.h utmpx.h)
|
||||
AC_CHECK_HEADERS(grp.h memory.h pwd.h string.h strings.h stdlib.h \
|
||||
unistd.h sys/time.h utmp.h utmpx.h)
|
||||
])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 5
|
||||
#serial 6
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Determine whether chown accepts arguments of -1 for uid and gid.
|
||||
@@ -21,7 +21,7 @@ AC_DEFUN(jm_FUNC_CHOWN,
|
||||
int
|
||||
main ()
|
||||
{
|
||||
char *f = "conftestchown";
|
||||
char *f = "conftest.chown";
|
||||
struct stat before, after;
|
||||
|
||||
if (creat (f, 0600) < 0)
|
||||
|
||||
28
m4/dos.m4
28
m4/dos.m4
@@ -1,4 +1,4 @@
|
||||
# serial 2
|
||||
# serial 4
|
||||
|
||||
# Define some macros required for proper operation of code in lib/*.c
|
||||
# on MSDOS/Windows systems.
|
||||
@@ -7,19 +7,32 @@
|
||||
|
||||
AC_DEFUN(jm_AC_DOS,
|
||||
[
|
||||
# FIXME: this is incomplete. Add a compile-test that does something
|
||||
# like this:
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __MSDOS__
|
||||
AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
|
||||
[
|
||||
AC_TRY_COMPILE([],
|
||||
[#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
|
||||
neither MSDOS nor Windows
|
||||
#endif],
|
||||
[ac_cv_win_or_dos=yes],
|
||||
[ac_cv_win_or_dos=no])
|
||||
])
|
||||
|
||||
if test x"$ac_cv_win_or_dos" = xyes; then
|
||||
ac_fs_accepts_drive_letter_prefix=1
|
||||
ac_fs_backslash_is_file_name_separator=1
|
||||
else
|
||||
ac_fs_accepts_drive_letter_prefix=0
|
||||
ac_fs_backslash_is_file_name_separator=0
|
||||
fi
|
||||
|
||||
AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
|
||||
[#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) \
|
||||
((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
|
||||
else
|
||||
#else
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
#endif])
|
||||
|
||||
ac_fs_accepts_drive_letter_prefix=0
|
||||
AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
|
||||
$ac_fs_accepts_drive_letter_prefix,
|
||||
[Define on systems for which file names may have a so-called
|
||||
@@ -28,12 +41,11 @@ else
|
||||
|
||||
AH_VERBATIM(ISSLASH,
|
||||
[#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
|
||||
# define ISSLASH(C) ((C) == '/' || (C) == '\\\\')
|
||||
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
|
||||
#else
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif])
|
||||
|
||||
ac_fs_backslash_is_file_name_separator=0
|
||||
AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
|
||||
$ac_fs_backslash_is_file_name_separator,
|
||||
[Define if the backslash character may also serve as a file name
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
dnl FIXME: put these prerequisite-only *.m4 files in a separate
|
||||
dnl directory -- otherwise, they'll conflict with existing files.
|
||||
@@ -7,5 +7,6 @@ dnl These are the prerequisite macros for GNU's error.c file.
|
||||
AC_DEFUN(jm_PREREQ_ERROR,
|
||||
[
|
||||
AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt)
|
||||
AC_FUNC_STRERROR_R
|
||||
AC_HEADER_STDC
|
||||
])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 4
|
||||
#serial 7
|
||||
|
||||
# From fileutils/configure.in
|
||||
|
||||
@@ -179,14 +179,15 @@ if test $ac_fsusage_space = no; then
|
||||
fi
|
||||
|
||||
if test $ac_fsusage_space = no; then
|
||||
# SVR2
|
||||
AC_TRY_CPP([#include <sys/filsys.h>],
|
||||
AC_DEFINE(STAT_READ_FILSYS, 1,
|
||||
[ Define if there is no specific function for reading filesystems usage
|
||||
information and you have the <sys/filsys.h> header file. (SVR2)])
|
||||
ac_fsusage_space=yes)
|
||||
# SVR2
|
||||
AC_TRY_CPP([#include <sys/filsys.h>
|
||||
],
|
||||
AC_DEFINE(STAT_READ_FILSYS, 1,
|
||||
[Define if there is no specific function for reading filesystems usage
|
||||
information and you have the <sys/filsys.h> header file. (SVR2)])
|
||||
ac_fsusage_space=yes)
|
||||
fi
|
||||
|
||||
AS_IFELSE([test $ac_fsusage_space = yes], [$1], [$2])dnl
|
||||
AS_IF([test $ac_fsusage_space = yes], [$1], [$2])
|
||||
|
||||
])
|
||||
|
||||
@@ -1,27 +1,14 @@
|
||||
#serial 2
|
||||
#serial 3
|
||||
|
||||
# See if we need to emulate a missing ftruncate function using fcntl.
|
||||
# See if we need to emulate a missing ftruncate function using fcntl or chsize.
|
||||
|
||||
AC_DEFUN(jm_FUNC_FTRUNCATE,
|
||||
[
|
||||
AC_CHECK_FUNCS(ftruncate, , [ftruncate_missing=yes])
|
||||
|
||||
if test "$ftruncate_missing" = yes; then
|
||||
AC_CHECK_HEADERS(unistd.h)
|
||||
AC_MSG_CHECKING([fcntl emulation of ftruncate])
|
||||
AC_CACHE_VAL(fu_cv_sys_ftruncate_emulation,
|
||||
[AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>], [
|
||||
#if !defined(F_CHSIZE) && !defined(F_FREESP)
|
||||
chsize();
|
||||
#endif
|
||||
],
|
||||
fu_cv_sys_ftruncate_emulation=yes,
|
||||
fu_cv_sys_ftruncate_emulation=no)])
|
||||
AC_MSG_RESULT($fu_cv_sys_ftruncate_emulation)
|
||||
if test $fu_cv_sys_ftruncate_emulation = yes; then
|
||||
AC_LIBOBJ(ftruncate)
|
||||
fi
|
||||
AC_CHECK_HEADERS([unistd.h])
|
||||
AC_CHECK_FUNCS([chsize])
|
||||
AC_LIBOBJ(ftruncate)
|
||||
fi
|
||||
])
|
||||
|
||||
27
m4/iconv.m4
27
m4/iconv.m4
@@ -1,13 +1,13 @@
|
||||
#serial 1
|
||||
#serial 3
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN(jm_ICONV,
|
||||
[
|
||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||
dnl those with the standalone portable libiconv installed).
|
||||
dnl those with the standalone portable GNU libiconv installed).
|
||||
AC_CACHE_CHECK(for iconv, jm_cv_func_iconv, [
|
||||
jm_cv_func_iconv="no, consider installing libiconv"
|
||||
jm_cv_func_iconv="no, consider installing GNU libiconv"
|
||||
jm_cv_lib_iconv=no
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
@@ -30,6 +30,27 @@ AC_DEFUN(jm_ICONV,
|
||||
])
|
||||
if test "$jm_cv_func_iconv" = yes; then
|
||||
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
||||
AC_MSG_CHECKING([for iconv declaration])
|
||||
AC_CACHE_VAL(jm_cv_proto_iconv, [
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t* outbytesleft);
|
||||
#else
|
||||
size_t iconv();
|
||||
#endif
|
||||
], [], jm_cv_proto_iconv_arg1="", jm_cv_proto_iconv_arg1="const")
|
||||
jm_cv_proto_iconv="extern size_t iconv (iconv_t cd, $jm_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t* outbytesleft);"])
|
||||
jm_cv_proto_iconv=`echo "[$]jm_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||
AC_MSG_RESULT([$]{ac_t:-
|
||||
}[$]jm_cv_proto_iconv)
|
||||
AC_DEFINE_UNQUOTED(ICONV_CONST, $jm_cv_proto_iconv_arg1,
|
||||
[Define as const if the declaration of iconv() needs const.])
|
||||
fi
|
||||
LIBICONV=
|
||||
if test "$jm_cv_lib_iconv" = yes; then
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#serial 4
|
||||
dnl This file is automatically generated from m4/jm-glibc-io.m4n.
|
||||
|
||||
#serial 5 -*- autoconf -*-
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl
|
||||
@@ -10,16 +12,14 @@ AC_DEFUN(jm_FUNC_GLIBC_UNLOCKED_IO,
|
||||
[
|
||||
# Kludge (not executed) to make autoheader do the right thing.
|
||||
if test a = b; then
|
||||
AC_CHECK_DECLS([clearerr_unlocked, feof_unlocked, ferror_unlocked,
|
||||
fflush_unlocked, fputc_unlocked, fread_unlocked, fwrite_unlocked,
|
||||
getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked])
|
||||
AC_CHECK_DECLS([clearerr_unlocked,feof_unlocked,ferror_unlocked,fflush_unlocked,fgets_unlocked,fputc_unlocked,fputs_unlocked,fread_unlocked,fwrite_unlocked,getc_unlocked,getchar_unlocked,putc_unlocked,putchar_unlocked])
|
||||
AC_CHECK_FUNCS(clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getc_unlocked getchar_unlocked putc_unlocked putchar_unlocked)
|
||||
fi
|
||||
|
||||
io_functions='clearerr_unlocked feof_unlocked ferror_unlocked
|
||||
fflush_unlocked fputc_unlocked fread_unlocked fwrite_unlocked
|
||||
getc_unlocked getchar_unlocked putc_unlocked putchar_unlocked'
|
||||
io_functions='clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getc_unlocked getchar_unlocked putc_unlocked putchar_unlocked'
|
||||
|
||||
for jm_io_func in $io_functions; do
|
||||
# Check for the existence of each function only if its declared.
|
||||
# Check for the existence of each function only if it is declared.
|
||||
# Otherwise, we'd get the Solaris5.5.1 functions that are not
|
||||
# declared, and that have been removed from Solaris5.6. The resulting
|
||||
# 5.5.1 binaries would not run on 5.6 due to shared library differences.
|
||||
|
||||
33
m4/jm-glibc-io.m4n
Normal file
33
m4/jm-glibc-io.m4n
Normal file
@@ -0,0 +1,33 @@
|
||||
#serial 5 -*- autoconf -*-
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl
|
||||
dnl See if the glibc *_unlocked I/O macros are available.
|
||||
dnl Use only those *_unlocked macros that are declared.
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_GLIBC_UNLOCKED_IO,
|
||||
[
|
||||
# Kludge (not executed) to make autoheader do the right thing.
|
||||
if test a = b; then
|
||||
AC_CHECK_DECLS([@comma_separated@])
|
||||
AC_CHECK_FUNCS(@space_separated@)
|
||||
fi
|
||||
|
||||
io_functions='@space_separated@'
|
||||
|
||||
for jm_io_func in $io_functions; do
|
||||
# Check for the existence of each function only if it is declared.
|
||||
# Otherwise, we'd get the Solaris5.5.1 functions that are not
|
||||
# declared, and that have been removed from Solaris5.6. The resulting
|
||||
# 5.5.1 binaries would not run on 5.6 due to shared library differences.
|
||||
AC_CHECK_DECLS([$jm_io_func],
|
||||
jm_declared=yes,
|
||||
jm_declared=no,
|
||||
[#include <stdio.h>])
|
||||
if test $jm_declared = yes; then
|
||||
AC_CHECK_FUNCS($jm_io_func)
|
||||
fi
|
||||
done
|
||||
]
|
||||
)
|
||||
100
m4/jm-macros.m4
100
m4/jm-macros.m4
@@ -1,10 +1,10 @@
|
||||
#serial 29 -*- autoconf -*-
|
||||
#serial 37 -*- autoconf -*-
|
||||
|
||||
dnl Misc type-related macros for fileutils, sh-utils, textutils.
|
||||
|
||||
AC_DEFUN(jm_MACROS,
|
||||
[
|
||||
AC_PREREQ(2.14a)
|
||||
AC_PREREQ(2.49d)
|
||||
|
||||
GNU_PACKAGE="GNU $PACKAGE"
|
||||
AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE",
|
||||
@@ -19,45 +19,7 @@ AC_DEFUN(jm_MACROS,
|
||||
dnl This macro actually runs replacement code. See isc-posix.m4.
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
|
||||
AC_CHECK_HEADERS( \
|
||||
errno.h \
|
||||
fcntl.h \
|
||||
fenv.h \
|
||||
float.h \
|
||||
limits.h \
|
||||
memory.h \
|
||||
mntent.h \
|
||||
mnttab.h \
|
||||
netdb.h \
|
||||
paths.h \
|
||||
stdlib.h \
|
||||
stddef.h \
|
||||
stdint.h \
|
||||
string.h \
|
||||
sys/acl.h \
|
||||
sys/filsys.h \
|
||||
sys/fs/s5param.h \
|
||||
sys/fs_types.h \
|
||||
sys/fstyp.h \
|
||||
sys/ioctl.h \
|
||||
sys/mntent.h \
|
||||
sys/mount.h \
|
||||
sys/param.h \
|
||||
sys/socket.h \
|
||||
sys/statfs.h \
|
||||
sys/statvfs.h \
|
||||
sys/systeminfo.h \
|
||||
sys/time.h \
|
||||
sys/timeb.h \
|
||||
sys/vfs.h \
|
||||
sys/wait.h \
|
||||
syslog.h \
|
||||
termios.h \
|
||||
unistd.h \
|
||||
utime.h \
|
||||
values.h \
|
||||
)
|
||||
|
||||
jm_CHECK_ALL_TYPES
|
||||
jm_INCLUDED_REGEX([lib/regex.c])
|
||||
|
||||
AC_REQUIRE([jm_BISON])
|
||||
@@ -103,6 +65,7 @@ AC_DEFUN(jm_MACROS,
|
||||
AC_FUNC_GETLOADAVG([lib])
|
||||
AC_REQUIRE([jm_SYS_PROC_UPTIME])
|
||||
AC_REQUIRE([jm_FUNC_FTRUNCATE])
|
||||
AC_REQUIRE([vb_FUNC_RENAME])
|
||||
|
||||
AC_REPLACE_FUNCS(strcasecmp strncasecmp)
|
||||
AC_REPLACE_FUNCS(dup2)
|
||||
@@ -120,6 +83,11 @@ AC_DEFUN(jm_MACROS,
|
||||
AC_REPLACE_FUNCS(memchr memcpy memmove memrchr memset)
|
||||
AC_CHECK_FUNCS(getpagesize)
|
||||
|
||||
AC_REPLACE_FUNCS(mkstemp)
|
||||
if test $ac_cv_func_mkstemp != yes; then
|
||||
AC_LIBOBJ(tempname)
|
||||
fi
|
||||
|
||||
# By default, argmatch should fail calling usage (1).
|
||||
AC_DEFINE(ARGMATCH_DIE, [usage (1)],
|
||||
[Define to the function xargmatch calls on failures.])
|
||||
@@ -156,7 +124,6 @@ AC_DEFUN(jm_MACROS,
|
||||
endpwent \
|
||||
fchdir \
|
||||
fdatasync \
|
||||
fseeko \
|
||||
ftime \
|
||||
ftruncate \
|
||||
getcwd \
|
||||
@@ -227,6 +194,52 @@ AC_DEFUN(jm_MACROS,
|
||||
|
||||
])
|
||||
|
||||
# These tests must be run before any use of AC_CHECK_TYPE,
|
||||
# because that macro compiles code that tests e.g., HAVE_UNISTD_H.
|
||||
# See the definition of ac_includes_default in `configure'.
|
||||
AC_DEFUN(jm_CHECK_ALL_HEADERS,
|
||||
[
|
||||
AC_CHECK_HEADERS( \
|
||||
errno.h \
|
||||
fcntl.h \
|
||||
fenv.h \
|
||||
float.h \
|
||||
limits.h \
|
||||
memory.h \
|
||||
mntent.h \
|
||||
mnttab.h \
|
||||
netdb.h \
|
||||
paths.h \
|
||||
stdlib.h \
|
||||
stddef.h \
|
||||
stdint.h \
|
||||
string.h \
|
||||
sys/acl.h \
|
||||
sys/filsys.h \
|
||||
sys/fs/s5param.h \
|
||||
sys/fs_types.h \
|
||||
sys/fstyp.h \
|
||||
sys/ioctl.h \
|
||||
sys/mntent.h \
|
||||
sys/mount.h \
|
||||
sys/param.h \
|
||||
sys/resource.h \
|
||||
sys/socket.h \
|
||||
sys/statfs.h \
|
||||
sys/statvfs.h \
|
||||
sys/systeminfo.h \
|
||||
sys/time.h \
|
||||
sys/timeb.h \
|
||||
sys/vfs.h \
|
||||
sys/wait.h \
|
||||
syslog.h \
|
||||
termios.h \
|
||||
unistd.h \
|
||||
utime.h \
|
||||
values.h \
|
||||
)
|
||||
])
|
||||
|
||||
# This macro must be invoked before any tests that run the compiler.
|
||||
AC_DEFUN(jm_CHECK_ALL_TYPES,
|
||||
[
|
||||
@@ -253,6 +266,7 @@ AC_DEFUN(jm_CHECK_ALL_TYPES,
|
||||
AC_REQUIRE([AC_C_INLINE])
|
||||
AC_REQUIRE([AC_C_LONG_DOUBLE])
|
||||
|
||||
AC_REQUIRE([jm_CHECK_ALL_HEADERS])
|
||||
AC_REQUIRE([AC_HEADER_DIRENT])
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
AC_CHECK_MEMBERS([struct stat.st_blksize],,,[$ac_includes_default
|
||||
@@ -279,6 +293,8 @@ AC_DEFUN(jm_CHECK_ALL_TYPES,
|
||||
dnl This relies on the fact that autoconf 2.14a's implementation of
|
||||
dnl AC_CHECK_TYPE checks includes unistd.h.
|
||||
AC_CHECK_TYPE(ssize_t, int)
|
||||
AC_CHECK_TYPE(major_t, unsigned int)
|
||||
AC_CHECK_TYPE(minor_t, unsigned int)
|
||||
|
||||
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
|
||||
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 109
|
||||
# serial 110
|
||||
|
||||
AC_PREREQ(2.13) dnl Minimum Autoconf version required.
|
||||
|
||||
@@ -289,7 +289,7 @@ strdup __argz_count __argz_stringify __argz_next])
|
||||
dnl Try to locate it.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
MKINSTALLDIRS="`CDPATH=:; cd $ac_aux_dir && pwd`/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 6
|
||||
#serial 10
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl
|
||||
@@ -6,12 +6,10 @@ dnl This is not pretty. I've just taken the autoconf code and wrapped
|
||||
dnl it in an AC_DEFUN.
|
||||
dnl
|
||||
|
||||
AC_PREREQ(2.14a)
|
||||
|
||||
# jm_LIST_MOUNTED_FILESYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
AC_DEFUN(jm_LIST_MOUNTED_FILESYSTEMS,
|
||||
[
|
||||
AC_CHECK_FUNCS(listmntent getmntent getmntinfo)
|
||||
AC_CHECK_FUNCS(listmntent getmntinfo)
|
||||
AC_CHECK_HEADERS(mntent.h)
|
||||
|
||||
# Determine how to get the list of mounted filesystems.
|
||||
@@ -239,6 +237,6 @@ if test -z "$ac_list_mounted_fs"; then
|
||||
# Can't build mountlist.c or anything that needs its functions
|
||||
fi
|
||||
|
||||
AS_IFELSE([test $ac_list_mounted_fs = found], [$1], [$2])dnl
|
||||
AS_IF([test $ac_list_mounted_fs = found], [$1], [$2])
|
||||
|
||||
])
|
||||
|
||||
18
m4/mbrtowc.m4
Normal file
18
m4/mbrtowc.m4
Normal file
@@ -0,0 +1,18 @@
|
||||
#serial 2
|
||||
|
||||
dnl From Paul Eggert
|
||||
|
||||
AC_DEFUN(jm_FUNC_MBRTOWC,
|
||||
[
|
||||
AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
|
||||
jm_cv_func_mbrtowc,
|
||||
[AC_TRY_LINK(
|
||||
[@%:@include <wchar.h>],
|
||||
[mbstate_t state; return ! (sizeof state && mbrtowc);],
|
||||
jm_cv_func_mbrtowc=yes,
|
||||
jm_cv_func_mbrtowc=no)])
|
||||
if test $jm_cv_func_mbrtowc = yes; then
|
||||
AC_DEFINE(HAVE_MBRTOWC, 1,
|
||||
[Define to 1 if mbrtowc and mbstate_t are properly declared.])
|
||||
fi
|
||||
])
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 2
|
||||
#serial 4
|
||||
|
||||
dnl autoconf tests required for use of mbswidth.c
|
||||
dnl From Bruno Haible.
|
||||
@@ -8,7 +8,8 @@ AC_DEFUN(jm_PREREQ_MBSWIDTH,
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
AC_REQUIRE([AM_C_PROTOTYPES])
|
||||
AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
|
||||
AC_CHECK_FUNCS(isascii iswprint mbrtowc wcwidth)
|
||||
AC_CHECK_FUNCS(isascii iswprint wcwidth)
|
||||
jm_FUNC_MBRTOWC
|
||||
headers='
|
||||
# if HAVE_WCHAR_H
|
||||
# include <wchar.h>
|
||||
|
||||
45
m4/memcmp.m4
45
m4/memcmp.m4
@@ -1,47 +1,8 @@
|
||||
#serial 5
|
||||
|
||||
dnl A replacement for autoconf's AC_FUNC_MEMCMP that detects
|
||||
dnl the losing memcmp on some x86 Next systems.
|
||||
AC_DEFUN(jm_AC_FUNC_MEMCMP,
|
||||
[AC_CACHE_CHECK([for working memcmp], jm_cv_func_memcmp_working,
|
||||
[AC_TRY_RUN(
|
||||
[int
|
||||
main ()
|
||||
{
|
||||
/* Some versions of memcmp are not 8-bit clean. */
|
||||
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
|
||||
if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
|
||||
exit (1);
|
||||
|
||||
/* The Next x86 OpenStep bug shows up only when comparing 16 bytes
|
||||
or more and with at least one buffer not starting on a 4-byte boundary.
|
||||
William Lewis provided this test program. */
|
||||
{
|
||||
char foo[21];
|
||||
char bar[21];
|
||||
int i;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
char *a = foo + i;
|
||||
char *b = bar + i;
|
||||
strcpy (a, "--------01111111");
|
||||
strcpy (b, "--------10000000");
|
||||
if (memcmp (a, b, 16) >= 0)
|
||||
exit (1);
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
}],
|
||||
jm_cv_func_memcmp_working=yes,
|
||||
jm_cv_func_memcmp_working=no,
|
||||
jm_cv_func_memcmp_working=no)])
|
||||
test $jm_cv_func_memcmp_working = no \
|
||||
&& AC_LIBOBJ(memcmp)
|
||||
])
|
||||
#serial 6
|
||||
|
||||
AC_DEFUN(jm_FUNC_MEMCMP,
|
||||
[AC_REQUIRE([jm_AC_FUNC_MEMCMP])dnl
|
||||
if test $jm_cv_func_memcmp_working = no; then
|
||||
[AC_REQUIRE([AC_FUNC_MEMCMP])dnl
|
||||
if test $ac_cv_func_memcmp_working = no; then
|
||||
AC_DEFINE_UNQUOTED(memcmp, rpl_memcmp,
|
||||
[Define to rpl_memcmp if the replacement function should be used.])
|
||||
fi
|
||||
|
||||
28
m4/prereq.m4
28
m4/prereq.m4
@@ -1,4 +1,4 @@
|
||||
#serial 13
|
||||
#serial 19
|
||||
|
||||
dnl These are the prerequisite macros for files in the lib/
|
||||
dnl directories of the fileutils, sh-utils, and textutils packages.
|
||||
@@ -10,12 +10,14 @@ AC_DEFUN(jm_PREREQ,
|
||||
jm_PREREQ_DIRNAME
|
||||
jm_PREREQ_ERROR
|
||||
jm_PREREQ_GETPAGESIZE
|
||||
jm_PREREQ_HASH
|
||||
jm_PREREQ_HUMAN
|
||||
jm_PREREQ_MBSWIDTH
|
||||
jm_PREREQ_MEMCHR
|
||||
jm_PREREQ_QUOTEARG
|
||||
jm_PREREQ_READUTMP
|
||||
jm_PREREQ_REGEX
|
||||
jm_PREREQ_TEMPNAME # called by mkstemp
|
||||
])
|
||||
|
||||
AC_DEFUN(jm_PREREQ_ADDEXT,
|
||||
@@ -53,6 +55,12 @@ AC_DEFUN(jm_PREREQ_GETPAGESIZE,
|
||||
AC_CHECK_HEADERS(OS.h unistd.h)
|
||||
])
|
||||
|
||||
AC_DEFUN(jm_PREREQ_HASH,
|
||||
[
|
||||
AC_CHECK_HEADERS(stdlib.h stdbool.h)
|
||||
AC_REQUIRE([jm_CHECK_DECLS])
|
||||
])
|
||||
|
||||
# If you use human.c, you need the following files:
|
||||
# uintmax_t.m4 inttypes_h.m4 ulonglong.m4
|
||||
AC_DEFUN(jm_PREREQ_HUMAN,
|
||||
@@ -70,8 +78,9 @@ AC_DEFUN(jm_PREREQ_MEMCHR,
|
||||
|
||||
AC_DEFUN(jm_PREREQ_QUOTEARG,
|
||||
[
|
||||
AC_CHECK_FUNCS(isascii iswprint mbrtowc)
|
||||
AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
|
||||
AC_CHECK_FUNCS(isascii iswprint)
|
||||
jm_FUNC_MBRTOWC
|
||||
AC_CHECK_HEADERS(limits.h stddef.h stdlib.h string.h wchar.h wctype.h)
|
||||
AC_HEADER_STDC
|
||||
AC_C_BACKSLASH_A
|
||||
AC_MBSTATE_T
|
||||
@@ -91,7 +100,8 @@ AC_DEFUN(jm_PREREQ_READUTMP,
|
||||
$ac_includes_default
|
||||
#ifdef HAVE_UTMPX_H
|
||||
# include <utmpx.h>
|
||||
#else
|
||||
#endif
|
||||
#ifdef HAVE_UTMP_H
|
||||
# include <utmp.h>
|
||||
#endif
|
||||
"
|
||||
@@ -99,6 +109,8 @@ $ac_includes_default
|
||||
AC_CHECK_MEMBERS([struct utmp.ut_user],,,[$utmp_includes])
|
||||
AC_CHECK_MEMBERS([struct utmpx.ut_name],,,[$utmp_includes])
|
||||
AC_CHECK_MEMBERS([struct utmp.ut_name],,,[$utmp_includes])
|
||||
AC_CHECK_MEMBERS([struct utmpx.ut_type],,,[$utmp_includes])
|
||||
AC_CHECK_MEMBERS([struct utmp.ut_type],,,[$utmp_includes])
|
||||
AC_LIBOBJ(readutmp)
|
||||
fi
|
||||
])
|
||||
@@ -113,3 +125,11 @@ AC_DEFUN(jm_PREREQ_REGEX,
|
||||
AC_HEADER_STDC
|
||||
AC_FUNC_ALLOCA
|
||||
])
|
||||
|
||||
AC_DEFUN(jm_PREREQ_TEMPNAME,
|
||||
[
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_STAT
|
||||
AC_CHECK_HEADERS(fcntl.h sys/time.h stdint.h unistd.h)
|
||||
AC_CHECK_FUNCS(__secure_getenv gettimeofday)
|
||||
])
|
||||
|
||||
22
m4/regex.m4
22
m4/regex.m4
@@ -1,4 +1,4 @@
|
||||
#serial 8
|
||||
#serial 11
|
||||
|
||||
dnl Initially derived from code in GNU grep.
|
||||
dnl Mostly written by Jim Meyering.
|
||||
@@ -28,10 +28,9 @@ AC_DEFUN(jm_INCLUDED_REGEX,
|
||||
{
|
||||
static struct re_pattern_buffer regex;
|
||||
const char *s;
|
||||
struct re_registers regs;
|
||||
re_set_syntax (RE_SYNTAX_POSIX_EGREP);
|
||||
/* Add this third left square bracket, [, to balance the
|
||||
three right ones below. Otherwise autoconf-2.14 chokes. */
|
||||
s = re_compile_pattern ("a[[:]:]]b\n", 9, ®ex);
|
||||
[s = re_compile_pattern ("a[[:@:>@:]]b\n", 9, ®ex);]
|
||||
/* This should fail with _Invalid character class name_ error. */
|
||||
if (!s)
|
||||
exit (1);
|
||||
@@ -39,7 +38,20 @@ AC_DEFUN(jm_INCLUDED_REGEX,
|
||||
/* This should succeed, but doesn't for e.g. glibc-2.1.3. */
|
||||
s = re_compile_pattern ("{1", 2, ®ex);
|
||||
|
||||
exit (s ? 1 : 0);
|
||||
if (s)
|
||||
exit (1);
|
||||
|
||||
/* The following example is derived from a problem report
|
||||
against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
|
||||
s = re_compile_pattern ("[[anù]]*n", 7, ®ex);
|
||||
if (s)
|
||||
exit (1);
|
||||
|
||||
/* This should match, but doesn't for e.g. glibc-2.2.1. */
|
||||
if (re_match (®ex, "an", 2, 0, ®s) != 2)
|
||||
exit (1);
|
||||
|
||||
exit (0);
|
||||
}
|
||||
],
|
||||
jm_cv_func_working_re_compile_pattern=yes,
|
||||
|
||||
40
m4/rename.m4
Normal file
40
m4/rename.m4
Normal file
@@ -0,0 +1,40 @@
|
||||
#serial 2
|
||||
|
||||
dnl From Volker Borchert.
|
||||
dnl Determine whether rename works for source paths with a trailing slash.
|
||||
dnl The rename from SunOS 4.1.1_U1 doesn't.
|
||||
dnl
|
||||
dnl If it doesn't, then define RENAME_TRAILING_SLASH_BUG and arrange
|
||||
dnl to compile the wrapper function.
|
||||
dnl
|
||||
|
||||
AC_DEFUN(vb_FUNC_RENAME,
|
||||
[
|
||||
AC_CACHE_CHECK([whether rename is broken],
|
||||
vb_cv_func_rename_trailing_slash_bug,
|
||||
[
|
||||
rm -rf conftest.d1 conftest.d2
|
||||
mkdir conftest.d1 ||
|
||||
AC_MSG_ERROR([cannot create temporary directory])
|
||||
AC_TRY_RUN([
|
||||
# include <stdio.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
exit (rename ("conftest.d1/", "conftest.d2") ? 1 : 0);
|
||||
}
|
||||
],
|
||||
vb_cv_func_rename_trailing_slash_bug=no,
|
||||
vb_cv_func_rename_trailing_slash_bug=yes,
|
||||
dnl When crosscompiling, assume rename is broken.
|
||||
vb_cv_func_rename_trailing_slash_bug=yes)
|
||||
|
||||
rm -rf conftest.d1 conftest.d2
|
||||
])
|
||||
if test $vb_cv_func_rename_trailing_slash_bug = yes; then
|
||||
AC_LIBOBJ(rename)
|
||||
AC_DEFINE_UNQUOTED(RENAME_TRAILING_SLASH_BUG, 1,
|
||||
[Define if rename does not work for source paths with a trailing slash,
|
||||
like the one from SunOS 4.1.1_U1.])
|
||||
fi
|
||||
])
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
# When rmdir fails because the specified directory is not empty, it sets
|
||||
# errno to some value, usually ENOTEMPTY. However, on some AIX systems,
|
||||
@@ -25,12 +25,12 @@ extern int errno;
|
||||
int val;
|
||||
rmdir ("confdir2");
|
||||
val = errno;
|
||||
s = fopen ("confdir2/file", "w");
|
||||
s = fopen ("confdir2/errno", "w");
|
||||
fprintf (s, "%d\n", val);
|
||||
exit (0);
|
||||
}
|
||||
],
|
||||
fetish_cv_func_rmdir_errno_not_empty=`cat confdir2/file`,
|
||||
fetish_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`,
|
||||
fetish_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4',
|
||||
fetish_cv_func_rmdir_errno_not_empty=ENOTEMPTY
|
||||
)
|
||||
|
||||
122
m4/strftime.m4
122
m4/strftime.m4
@@ -1,4 +1,4 @@
|
||||
#serial 15
|
||||
#serial 16
|
||||
|
||||
dnl This macro is intended to be used solely in this file.
|
||||
dnl These are the prerequisite macros for GNU's strftime.c replacement.
|
||||
@@ -23,8 +23,6 @@ AC_DEFUN(_jm_STRFTIME_PREREQS,
|
||||
[#include <time.h>])
|
||||
])
|
||||
|
||||
dnl Determine if the strftime function has all the features of the GNU one.
|
||||
dnl
|
||||
dnl From Jim Meyering.
|
||||
dnl
|
||||
AC_DEFUN(jm_FUNC_GNU_STRFTIME,
|
||||
@@ -35,125 +33,11 @@ AC_DEFUN(jm_FUNC_GNU_STRFTIME,
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_CHECK_HEADERS(sys/time.h)
|
||||
AC_CACHE_CHECK([for working GNU strftime], jm_cv_func_working_gnu_strftime,
|
||||
[AC_TRY_RUN(
|
||||
[ /* Ulrich Drepper provided parts of the test program. */
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static int
|
||||
compare (const char *fmt, const struct tm *tm, const char *expected)
|
||||
{
|
||||
char buf[99];
|
||||
strftime (buf, 99, fmt, tm);
|
||||
if (strcmp (buf, expected))
|
||||
{
|
||||
#ifdef SHOW_FAILURES
|
||||
printf ("fmt: \"%s\", expected \"%s\", got \"%s\"\n",
|
||||
fmt, expected, buf);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int n_fail = 0;
|
||||
struct tm *tm;
|
||||
time_t t = 738367; /* Fri Jan 9 13:06:07 1970 */
|
||||
tm = gmtime (&t);
|
||||
|
||||
/* Undefine this in case the configure-time putenv test has defined it
|
||||
to something else. The use we make of this function here doesn't
|
||||
require the added functionality of the replacement one. */
|
||||
#undef putenv
|
||||
|
||||
/* This is necessary to make strftime give consistent zone strings and
|
||||
e.g., seconds since the epoch (%s). */
|
||||
putenv ("TZ=GMT0");
|
||||
|
||||
#undef CMP
|
||||
#define CMP(Fmt, Expected) n_fail += compare ((Fmt), tm, (Expected))
|
||||
|
||||
CMP ("%-m", "1"); /* GNU */
|
||||
CMP ("%A", "Friday");
|
||||
CMP ("%^A", "FRIDAY"); /* The ^ is a GNU extension. */
|
||||
CMP ("%B", "January");
|
||||
CMP ("%^B", "JANUARY");
|
||||
CMP ("%C", "19"); /* POSIX.2 */
|
||||
CMP ("%D", "01/09/70"); /* POSIX.2 */
|
||||
CMP ("%F", "1970-01-09");
|
||||
CMP ("%G", "1970"); /* GNU */
|
||||
CMP ("%H", "13");
|
||||
CMP ("%I", "01");
|
||||
CMP ("%M", "06");
|
||||
CMP ("%M", "06");
|
||||
CMP ("%R", "13:06"); /* POSIX.2 */
|
||||
CMP ("%S", "07");
|
||||
CMP ("%T", "13:06:07"); /* POSIX.2 */
|
||||
CMP ("%U", "01");
|
||||
CMP ("%V", "02");
|
||||
CMP ("%W", "01");
|
||||
CMP ("%X", "13:06:07");
|
||||
CMP ("%Y", "1970");
|
||||
CMP ("%Z", "GMT");
|
||||
CMP ("%_m", " 1"); /* GNU */
|
||||
CMP ("%a", "Fri");
|
||||
CMP ("%^a", "FRI");
|
||||
CMP ("%b", "Jan");
|
||||
CMP ("%^b", "JAN");
|
||||
CMP ("%c", "Fri Jan 9 13:06:07 1970");
|
||||
CMP ("%^c", "FRI JAN 9 13:06:07 1970");
|
||||
CMP ("%d", "09");
|
||||
CMP ("%e", " 9"); /* POSIX.2 */
|
||||
CMP ("%g", "70"); /* GNU */
|
||||
CMP ("%h", "Jan"); /* POSIX.2 */
|
||||
CMP ("%^h", "JAN");
|
||||
CMP ("%j", "009");
|
||||
CMP ("%k", "13"); /* GNU */
|
||||
CMP ("%l", " 1"); /* GNU */
|
||||
CMP ("%m", "01");
|
||||
CMP ("%n", "\n"); /* POSIX.2 */
|
||||
CMP ("%p", "PM");
|
||||
CMP ("%r", "01:06:07 PM"); /* POSIX.2 */
|
||||
CMP ("%s", "738367"); /* GNU */
|
||||
CMP ("%t", "\t"); /* POSIX.2 */
|
||||
CMP ("%u", "5"); /* POSIX.2 */
|
||||
CMP ("%w", "5");
|
||||
CMP ("%x", "01/09/70");
|
||||
CMP ("%y", "70");
|
||||
CMP ("%z", "+0000"); /* GNU */
|
||||
|
||||
exit (n_fail ? 1 : 0);
|
||||
}],
|
||||
jm_cv_func_working_gnu_strftime=yes,
|
||||
jm_cv_func_working_gnu_strftime=no,
|
||||
dnl When crosscompiling, assume strftime is missing or broken.
|
||||
jm_cv_func_working_gnu_strftime=no)
|
||||
])
|
||||
if test $jm_cv_func_working_gnu_strftime = no; then
|
||||
AC_LIBOBJ(strftime)
|
||||
AC_DEFINE_UNQUOTED(strftime, gnu_strftime,
|
||||
[Define to gnu_strftime if the replacement function should be used.])
|
||||
fi
|
||||
AC_DEFINE([my_strftime], [nstrftime],
|
||||
[Define to the name of the strftime replacement function.])
|
||||
])
|
||||
|
||||
AC_DEFUN(jm_FUNC_STRFTIME,
|
||||
[
|
||||
_jm_STRFTIME_PREREQS
|
||||
AC_REPLACE_FUNCS(strftime)
|
||||
])
|
||||
|
||||
10
m4/utimes.m4
10
m4/utimes.m4
@@ -5,7 +5,7 @@ dnl then do case-insensitive s/utime/utimes/.
|
||||
|
||||
AC_DEFUN(jm_FUNC_UTIMES_NULL,
|
||||
[AC_CACHE_CHECK(whether utimes accepts a null argument, ac_cv_func_utimes_null,
|
||||
[rm -f conftestdata; > conftestdata
|
||||
[rm -f conftest.data; > conftest.data
|
||||
AC_TRY_RUN([
|
||||
/* In case stat has been defined to rpl_stat, undef it here. */
|
||||
#undef stat
|
||||
@@ -13,9 +13,11 @@ AC_TRY_RUN([
|
||||
#include <sys/stat.h>
|
||||
main() {
|
||||
struct stat s, t;
|
||||
exit(!(stat ("conftestdata", &s) == 0 && utimes("conftestdata", (long *)0) == 0
|
||||
&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
|
||||
&& t.st_mtime - s.st_mtime < 120));
|
||||
exit(!(stat ("conftest.data", &s) == 0
|
||||
&& utimes("conftest.data", (long *)0) == 0
|
||||
&& stat("conftest.data", &t) == 0
|
||||
&& t.st_mtime >= s.st_mtime
|
||||
&& t.st_mtime - s.st_mtime < 120));
|
||||
}],
|
||||
ac_cv_func_utimes_null=yes,
|
||||
ac_cv_func_utimes_null=no,
|
||||
|
||||
22
man/rm.x
22
man/rm.x
@@ -13,24 +13,6 @@ the \fI\-f\fR or \fI\-\-force\fR option is not given,
|
||||
.B rm
|
||||
prompts the user for whether to remove the file. If the response
|
||||
does not begin with `y' or `Y', the file is skipped.
|
||||
.LP
|
||||
GNU
|
||||
.BR rm ,
|
||||
like every program that uses the getopt function to parse its
|
||||
arguments, lets you use the
|
||||
.I \-\-
|
||||
option to indicate that all following arguments are non-options. To
|
||||
remove a file called `\-f' in the current directory, you could type
|
||||
either
|
||||
.RS
|
||||
rm \-\- \-f
|
||||
.RE
|
||||
or
|
||||
.RS
|
||||
rm ./\-f
|
||||
.RE
|
||||
The Unix
|
||||
.B rm
|
||||
program's use of a single `\-' for this purpose predates the
|
||||
development of the getopt standard syntax.
|
||||
.SH OPTIONS
|
||||
[SEE ALSO]
|
||||
shred(1)
|
||||
|
||||
@@ -1,10 +1,870 @@
|
||||
2001-07-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (tgz-size): Also work for sizes in the kilobyte range.
|
||||
|
||||
* Makefile.maint: More changes from autoconf.
|
||||
|
||||
Changes from autoconf.
|
||||
* Makefile.maint (GZIP_ENV): Add --best.
|
||||
(AMTAR): Define.
|
||||
(writable-files): Factor out ../release/ constant, and work (by
|
||||
creating it) even if such a directory doesn't exist.
|
||||
|
||||
2001-07-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/copy.c (get_dest_mode): Clear set-user-ID and set-group-ID bits
|
||||
when copying (i.e., not in move mode) and not preserving permissions.
|
||||
Reported by kytek@cybercomm.net.
|
||||
|
||||
2001-07-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/ln.c (do_link): Test the boolean symbolic_link, not the function,
|
||||
symlink. Patch by Frederik Eaton.
|
||||
|
||||
2001-06-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint: Factor out definitions specific to fileutils,
|
||||
sh-utils, and textutils, so that other packages can use the framework.
|
||||
Patch by Akim Demaille.
|
||||
* Makefile.cfg: New file with package-specific definitions.
|
||||
* GNUmakefile: Include Makefile.cfg.
|
||||
* Makefile.am (EXTRA_DIST): Add Makefile.cfg.
|
||||
|
||||
2001-06-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/ls.c (main): Recheck global print_with_color after calling
|
||||
parse_ls_color, since that function may have reset it.
|
||||
Based on a patch from Richard Dawe.
|
||||
|
||||
2001-06-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* config.sub: Update from master repository.
|
||||
* config.guess: Likewise.
|
||||
|
||||
2001-06-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.in (ALL_LINGUAS): Add Turkish (tr).
|
||||
|
||||
2001-05-25 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/ls.c (print_long_format): Don't truncate user names
|
||||
or group names that are longer than 8 characters.
|
||||
|
||||
Add definitions that let me factor the wget rule while still letting
|
||||
me accommodate the fact that these files reside in several different
|
||||
directories and come from different places.
|
||||
* Makefile.maint (wget-files): Define.
|
||||
(get-targets, *-local_dir, *-url_prefix): Likewise.
|
||||
(target, url, local_file): Convenience variables.
|
||||
($(get-targets)): The factored rule.
|
||||
|
||||
2001-05-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/ansi2knr.c: Update from master source.
|
||||
|
||||
* Makefile.maint (wget-update): Have wget write to a temporary file,
|
||||
and replace the original only if wget succeeds.
|
||||
Also get ansi2nkr.c.
|
||||
(move-if-change): Define.
|
||||
(wget-update): Use it in place of mv.
|
||||
|
||||
* src/ls.c: Use `#if D_TYPE_IN_DIRENT && defined DTTOIF' to
|
||||
determine whether to enable the DT_INIT definition, not the less
|
||||
portable `#if defined _DIRENT_HAVE_D_TYPE || defined DTTOIF'.
|
||||
Reported by Eli Zaretskii.
|
||||
|
||||
* src/mkfifo.c (main): Remove quotes around %s.
|
||||
The argument is already quoted via the quote function.
|
||||
* src/mknod.c (main): Likewise.
|
||||
Reported by Göran Uddeborg.
|
||||
|
||||
2001-05-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (wget-update): depcomp and missing are now in
|
||||
automake's lib/ subdirectory.
|
||||
|
||||
2001-05-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Add new --time-style option.
|
||||
Change --full-time to be equivalent to --time-style=full-iso.
|
||||
|
||||
* NEWS, doc/omni-utils.texi: Describe this change.
|
||||
|
||||
* src/ls.c: Include "hard-locale.h".
|
||||
(nstrftime): New decl.
|
||||
(enum time_style): New enum.
|
||||
(time_style_args, time_style_types): New constants.
|
||||
(full_time): Remove.
|
||||
(long_time_format): Initialize to POSIX defaults.
|
||||
(TIME_STYLE_OPTION): New constant.
|
||||
(long_options, decode_switches, usage): Add --time-style support.
|
||||
(long_time_expected_width): Use nstrftime, not strftime.
|
||||
(print_long_format): Likewise.
|
||||
Increase initial size to match new full-iso time style.
|
||||
|
||||
* tests/ls/time-1: Unset QUOTING_STYLE and TIME_STYLE. Set TZ.
|
||||
Adjust to change in full-time format.
|
||||
Fix typo in failure messages (-a and -m were interchanged).
|
||||
|
||||
2001-05-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* doc/Makefile.am (EXTRA_DIST): Add constants.texi and doclicense.texi.
|
||||
(info_TEXINFOS): s/fileutils/omni-utils/.
|
||||
(check-texinfo): New rule.
|
||||
(check): Depend on check-texinfo.
|
||||
|
||||
* doc/omni-utils.texi (uniq invocation): Document the new optional
|
||||
arguments to the --all-repeated option.
|
||||
Make all references to POSIX use @sc{posix}.
|
||||
|
||||
2001-05-19 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* doc/fileutils.texi: Remove.
|
||||
|
||||
* doc/omni-utils.texi: Change a few uses of `timezone' to `time zone'.
|
||||
Reported by Stephen Eglen.
|
||||
|
||||
2001-05-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (my-distcheck): Remove work-around kludge and
|
||||
associated comment, now that automake has ben fixed.
|
||||
|
||||
2001-05-12 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Clean up some of the places where the code assumed that random
|
||||
types like 'mode_t' fit into 'int', which POSIX doesn't guarantee.
|
||||
|
||||
* src/ls.c (struct fileinfo.linkmode): Now st_mode.
|
||||
(print_color_indicator, print_name_with_quoting, print_type_indicator,
|
||||
length_of_file_name_and_frills):
|
||||
Use mode_t, not unsigned int, to store modes.
|
||||
(dired_dump_obstack): Do not assume size fits in 'int'.
|
||||
(get_link_name): readlink returns ssize_t, not int.
|
||||
(make_link_path): Store buffer size as size_t, not int.
|
||||
(print_long_format): Use unsigned long, not unsigned, to print
|
||||
nlink_t, uid_t, gid_t, major_t, minor_t.
|
||||
|
||||
2001-05-13 Paul Eggert <eggert@sic.twinsun.com>
|
||||
|
||||
* src/mknod.c (main): Check for NODEV device only if NODEV is defined.
|
||||
* src/system.h (NODEV): Remove, undoing previous change.
|
||||
|
||||
2001-05-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/remove.c (dir_name, dir_len): Define to different names
|
||||
to avoid shadowing warnings due to new declarations from dirname.h.
|
||||
|
||||
* tests/Fetish.pm (run_tests): Fail if any test name is longer
|
||||
than 12 bytes.
|
||||
* tests/ls-2/tests: Shorten test names so the length of a
|
||||
resulting file name doesn't exceed 14.
|
||||
|
||||
2001-05-12 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/system.h (NODEV): New macro, if not already defined.
|
||||
|
||||
* src/mknod.c (main): Check for overflow when converting out
|
||||
of uintmax_t. Do not assume that major_t and minor_t are no
|
||||
wider than int. Check for makedev failures. Convert device
|
||||
numbers via uintmax_t, not unsigned long, just in case.
|
||||
Coalesce duplicate code in the block and character device
|
||||
cases.
|
||||
|
||||
2001-05-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Add new --dereference-command-line option.
|
||||
-H now means this instead of meaning --si, as POSIX requires.
|
||||
|
||||
* NEWS, doc/omni-utils.texi: Document this.
|
||||
|
||||
* src/ls.c (enum Dereference_symlink): New type.
|
||||
(dereference): New var, replacing trace_links, which was removed.
|
||||
(long_options, main, decode_switches, gobble_file, usage):
|
||||
Implement the changes.
|
||||
|
||||
* tests/ls-2/tests:
|
||||
Rename slink-dir test to slink-dir-dF. Add new tests
|
||||
slink-dir-F, slink-dir-dFH, slink-dir-dFL.
|
||||
|
||||
2001-05-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
dirname code cleanup. base_name now behaves more compatibly
|
||||
with POSIX basename when given file names that have trailing
|
||||
slashes, and similarly for dir_name. Add new primitives
|
||||
base_len and dir_len. Put the directory-name-related decls
|
||||
into dirname.h.
|
||||
|
||||
* src/chmod.c (strip_trailing_slashes): Remove; now in dirname.h.
|
||||
* src/chown.c (strip_trailing_slashes): Likewise.
|
||||
* src/cp.c (strip_trailing_slashes): Likewise.
|
||||
* src/df.c (strip_trailing_slashes): Likewise.
|
||||
* src/ln.c (strip_trailing_slashes): Likewise.
|
||||
* src/mkdir.c (strip_trailing_slashes): Likewise.
|
||||
* src/rm.c (strip_trailing_slashes): Likewise.
|
||||
* src/rmdir.c (strip_trailing_slashes): Likewise.
|
||||
|
||||
* src/dircolors.c, src/ls.c, src/remove.c:
|
||||
Include "dirname.h", to get base_name.
|
||||
|
||||
* src/cp.c (make_path_private): Use dir_len instead of
|
||||
dir_name, and avoid an extra mealloc call.
|
||||
|
||||
* src/df.c (find_mount_point): No need to strip trailing
|
||||
slashes before invoking new dir_name.
|
||||
|
||||
* src/mv.c: Include "dirname.h".
|
||||
(strip_trailing_slashes_2): Remove; now done by
|
||||
strip_trailing_slashes. All callers changed.
|
||||
|
||||
* src/sys2.h (base_name): Remove decl; now in dirname.h.
|
||||
|
||||
* src/copy.c (copy_internal): Remove the code that tested for NULL
|
||||
dir_name return value. That can't happen.
|
||||
|
||||
2001-05-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/ls.c (usage): Wording changes related to -o, -n, and -g.
|
||||
* doc/omni-utils.texi: Likewise.
|
||||
From Paul Eggert.
|
||||
|
||||
2001-05-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/chmod.c (mode_changed, change_file_mode):
|
||||
There's no need to invoke both lstat and stat here, so call just
|
||||
one of the two functions.
|
||||
|
||||
2001-05-11 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* doc/omni-utils.texi: New file. The union of fileutils.texi,
|
||||
sh-utils.texi, and textutils.texi. Merged by Brian Youmans.
|
||||
|
||||
* src/shred.c (usage): Warn about backups and mirrors.
|
||||
* doc/omni-utils.texi (shred invocation): Likewise.
|
||||
From Nelson Beebe.
|
||||
|
||||
2001-05-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/ls.c (main): Don't set `format_needs_stat' for --recursive (-R),
|
||||
because that would make `ls -RF dir' stat unnecessarily all of the
|
||||
files in dir/ on some systems.
|
||||
Similarly, don't set `format_needs_stat' for --dereference (-L),
|
||||
because that would make `ls -RLF dir' stat unnecessarily all non-symlink
|
||||
files in dir/ on some systems.
|
||||
Instead, ...
|
||||
(gobble_file): ... also stat a file if `trace_dirs' (-R) is set and its
|
||||
type is unknown.
|
||||
... also stat a file if `trace_links' (-L) is set and the file is a
|
||||
symlink or its type is unknown.
|
||||
(print_dir): Also recognize DT_REG and DT_LNK.
|
||||
|
||||
2001-05-07 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/chown.c (main): Fix thinko that made --from=... fail:
|
||||
s/argv[optind]/optarg/. Reported by Andrew Pham.
|
||||
|
||||
* tests/chown: New directory.
|
||||
* tests/chown/basic: New (root-only) test for the above.
|
||||
* tests/cp/special-bits: Factor out the root-only test into this ...
|
||||
* tests/root-only: ... new file.
|
||||
* tests/Makefile.am (EXTRA_DIST): Add root-only.
|
||||
(SUBDIRS): Add chown.
|
||||
* tests/chown/Makefile.am: New file.
|
||||
* configure.in (AC_OUTPUT): Add tests/chown/Makefile.
|
||||
|
||||
2001-05-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/ls.c (decode_switches): Complain if the envvar, QUOTING_STYLE,
|
||||
is set to an invalid value.
|
||||
Move some declarations of locals into scopes where they're used.
|
||||
|
||||
2001-05-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* doc/texinfo.tex: Update from master repository.
|
||||
* config.sub: Likewise.
|
||||
* config.guess: Likewise.
|
||||
|
||||
2001-05-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (tgz-size, xd-size): Compute sizes.
|
||||
(announcement): Include sizes of .tar.gz and .xdelta files
|
||||
in the announcement.
|
||||
|
||||
* src/ls.c (print_owner): New global variable.
|
||||
(usage): Update the descriptions of -g.
|
||||
(decode_switches): Honor the -g option (omit owner information),
|
||||
now that POSIX specifies it.
|
||||
(print_long_format): Don't print owner name if -g was specified.
|
||||
Move declaration of `user_name' into the scope where it's used.
|
||||
(print_group): Rename global from `inhibit_group'. Update all
|
||||
uses accordingly.
|
||||
* doc/fileutils.texi (What information is listed): Describe -g.
|
||||
* TODO: Remove item for ls -g.
|
||||
|
||||
* src/ls.c (decode_switches): Make -n work just like -l, except
|
||||
with numeric IDs, per POSIX. Before, to have any effect, -n had
|
||||
to be used with -l. Reported by Dale Scheetz.
|
||||
(usage): Update the description of -n.
|
||||
Separate the descriptions of -n and --numeric-uid-gid.
|
||||
Split string in --help output that had exceeded my limit of
|
||||
2048 bytes.
|
||||
|
||||
2001-04-29 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.1.
|
||||
|
||||
* configure: Regenerate using a further-patched copy of autoconf-2.49e
|
||||
to work around a bug in its test for ranlib. This is the change to
|
||||
autoconf's acgeneral.m4 that was made on 2001-04-24.
|
||||
|
||||
* README: Don't mention mvdir. It is no longer provided.
|
||||
Don't mention HP/UX vs. du blocksize problem. It's long gone.
|
||||
Remove note about how cp, mv, and ln couldn't make backups
|
||||
of files with names of maximum length. Now they can do that.
|
||||
Thank the people who have provided access to their systems
|
||||
for portability testing.
|
||||
Warn about and describe autoconf/automake version requirements.
|
||||
Use a better URL for the GNU Coding Standards.
|
||||
|
||||
* man/rm.x: Refer to shred.
|
||||
Remove the example showing how to remove `-foo', since that is now
|
||||
in the --help output (and hence automatically included).
|
||||
* src/rm.c (usage): Mention shred.
|
||||
|
||||
* src/shred.c (usage): Include in --help output the warning about
|
||||
some of the filesystem types on which shred is not effective.
|
||||
|
||||
2001-04-25 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (my-distcheck): Add a comment.
|
||||
|
||||
2001-04-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0.45.
|
||||
|
||||
2001-04-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/ls.c (decode_switches): Ensure that -1 has no effect when it
|
||||
follows -l, per POSIX. Reported by Ulrich Drepper.
|
||||
|
||||
* src/dd.c (usage): Mention that sync makes dd pad with spaces (rather
|
||||
than NULs) when used with block or unblock.
|
||||
(dd_copy): When using sync with either block or unblock,
|
||||
pad with spaces. Reported by Dale Scheetz.
|
||||
* tests/dd/skip-seek (block-sync-1): New test, for this. Based on
|
||||
a report from Dale Scheetz.
|
||||
* doc/fileutils.texi (dd invocation): Document it here, too.
|
||||
|
||||
* configure: Regenerate using a patched copy of autoconf-2.49e to
|
||||
work around a bug in its test for a working memcmp function.
|
||||
This is the change to autoconf's acfunctions.m4 that was made
|
||||
on 2001-04-22.
|
||||
|
||||
* tests/ls/no-arg: New file.
|
||||
* tests/ls/Makefile.am (TESTS): Add no-arg.
|
||||
* src/ls.c (main): Fix off-by-one error introduced with last change.
|
||||
|
||||
2001-04-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0.44.
|
||||
|
||||
* configure, aclocal.m4, etc.: Regenerate using autoconf-2.49e.
|
||||
|
||||
* doc/fileutils.texi (touch invocation): Discuss ctime.
|
||||
Based on suggestions and contributions from Aharon Robbins
|
||||
and Dan Jacobson.
|
||||
|
||||
* src/ls.c (main): When given two or more arguments but the only one
|
||||
that exists is a directory, don't treat it as if it were the only
|
||||
argument. Before, `mkdir d; ls no-dir d 2>/dev/null' would act like
|
||||
`ls d' and produce no output. Now, it prints `d:'.
|
||||
Report and patch from Stéphane Chazelas.
|
||||
* tests/ls-2/tests: New tests, for the above fix.
|
||||
|
||||
2001-04-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* depcomp: New version, from automake.
|
||||
|
||||
2000-10-31 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* ls.c: Don't inspect MB_LEN_MAX. Paul Eggert says it's
|
||||
not always defined correctly.
|
||||
|
||||
2001-04-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
|
||||
|
||||
* tests/chgrp/basic: Ensure that initial group id's are properly set
|
||||
for `d' and `d/f3'.
|
||||
|
||||
2001-04-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/mv/setup: Skip nonexistent directories so we don't get
|
||||
diagnostics from df about e.g., `/usr/tmp not found'.
|
||||
|
||||
2001-03-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.in: Don't require autoconf version here -- it's done in m4/.
|
||||
|
||||
2001-03-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0.43.
|
||||
|
||||
* configure, aclocal.m4, etc.: Regenerate using autoconf-2.49d.
|
||||
|
||||
* Makefile.maint (check-copyright): New target and rule.
|
||||
(alpha): Depend on it.
|
||||
|
||||
* missing: Handle shell built-ins (only `:' and `cd' for now) to work
|
||||
around brain damage in Ultrix's /bin/sh.
|
||||
|
||||
2001-03-18 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0.42.
|
||||
|
||||
* tests/Fetish.pm: If the $DJDIR envvar is defined, set SHELL
|
||||
to $DJDIR/bin/bash.exe. Patch from Richard Dawe, based on a
|
||||
suggestion from Eli Zaretskii.
|
||||
|
||||
2001-03-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* doc/fileutils.texi: Warn that touch DATE FILE will be withdrawn.
|
||||
|
||||
2001-03-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/install/basic-1: Add the standard $VERBOSE-handling hook.
|
||||
This test currently fails for mips-dec-ultrix4.4.
|
||||
|
||||
* tests/install/create-leading: Use ../envvar-check rather than
|
||||
open-coding the same tests.
|
||||
|
||||
* tests/envvar-check: Set/use $as_unset, for those shells
|
||||
(like Ultrix4's /bin/sh) that don't accept `unset'.
|
||||
|
||||
* missing (--run): Use `eval' to run `"$@"'. Otherwise, Ultrix4.4's
|
||||
/bin/sh fails and outputs garbage.
|
||||
|
||||
* src/touch.c (usage): Tweak the obsolescent usage line so that
|
||||
help2man recognizes it as such. Reported by Dan Jacobson.
|
||||
|
||||
2001-03-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (wget-update): Also get `missing'.
|
||||
Use for-loops.
|
||||
|
||||
* missing: Update from automake.
|
||||
|
||||
2001-03-11 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/rm/isatty: Disable this test, for now.
|
||||
It would block when run in the background.
|
||||
|
||||
2001-03-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* config.guess: Update from master repository.
|
||||
|
||||
* Makefile.maint (my_distdir): Define new variable, and use this
|
||||
in place of most old uses of $(distdir).
|
||||
|
||||
* src/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
|
||||
Reported by Akim Demaille.
|
||||
|
||||
* tests/help-version: Ensure that /dev/full is a character device
|
||||
(using test -c) as well as being writable, before trying to write to it.
|
||||
Otherwise, the test could mistakenly append a newline to an existing,
|
||||
regular, writable, /dev/full file.
|
||||
Suggested by Ulrich Drepper.
|
||||
|
||||
2001-03-06 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/dd.c (S_TYPEISSHM): Rename parameter to reflect its type.
|
||||
(main): Pass a `struct stat *', not stat.st_mode to S_TYPEISSHM.
|
||||
Patch by Alain Magloire.
|
||||
|
||||
2001-03-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/dd.c (output_char): Reformat so each statement is on a
|
||||
separate line.
|
||||
|
||||
2001-02-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/mkdir.c (main): Remove assignment-in-if-expression.
|
||||
In fact, remove t_errno altogether. Reported by Nelson Beebe.
|
||||
|
||||
* tests/ls-2/tests: Add two tests of existing behavior -- both will
|
||||
have to be changed (soon after release), once ls is fixed.
|
||||
|
||||
2001-02-20 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/ls.c (FULL_TIME_OPTION): Renamed from FULL_TIME, for
|
||||
consistency with the other enum values.
|
||||
|
||||
2001-02-20 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* NEWS, doc/fileutils.texi: ls -H is now obsolescent.
|
||||
* src/ls.c (SI_OPTION): New enum value.
|
||||
(long_options): Use it instead of 'H' for --si.
|
||||
(decode_switches): Warn that -H will change soon.
|
||||
(usage): Likewise.
|
||||
|
||||
2001-02-18 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/rm/Makefile.am (TESTS): Add isatty.
|
||||
* tests/rm/isatty: New test, for the bug fixed below.
|
||||
|
||||
* Version 4.0.41.
|
||||
|
||||
* depcomp: New version, from automake.
|
||||
|
||||
`chmod 0 file; rm file' would no longer prompt before removal.
|
||||
* src/remove.c (remove_file): Revert last change.
|
||||
Reported by Vin Shelton.
|
||||
|
||||
2001-02-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0.40.
|
||||
|
||||
* src/chown.c (main): `quote' the offending argument.
|
||||
|
||||
2001-02-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Stop trying to support hosts that have nonstandard declarations for
|
||||
mbrtowc and/or mbstate_t. It's not worth the portability hassle.
|
||||
|
||||
* m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
|
||||
* m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
|
||||
Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
|
||||
* m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
|
||||
* lib/mbswidth.c, lib/quotearg.c, src/ls.c (mbrtowc, mbsinit):
|
||||
Remove workaround macros for hosts that have mbrtowc but not
|
||||
mbstate_t, as we now insist on proper declarations for both
|
||||
before using mbrtowc.
|
||||
Reported by Matt Schalit.
|
||||
|
||||
2001-02-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* config.sub: Update from master repository.
|
||||
* config.guess: Likewise.
|
||||
|
||||
2001-02-16 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* doc/getdate.texi: Mention that only English is supported.
|
||||
Show how to use "date" so that the output is acceptable to getdate.
|
||||
Mention Z as an abbreviation for UTC.
|
||||
|
||||
2001-02-11 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (emit-rsync-commands): Define.
|
||||
(alpha): Use it here.
|
||||
|
||||
2001-02-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (alpha): Fix previous, incomplete change.
|
||||
|
||||
* Version 4.0.39.
|
||||
|
||||
* depcomp: New version, from automake.
|
||||
|
||||
2001-02-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* README: Remove note about now-ancient Sequents.
|
||||
|
||||
2001-02-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/ln.c (main): Change type of index variable to `unsigned int'
|
||||
to avoid a warning.
|
||||
|
||||
* config.guess: Update from master repository.
|
||||
|
||||
* Makefile.maint (a_host): Use fencepost.
|
||||
(real_dir): Use the same name for both.
|
||||
(alpha): Print commands for both hosts.
|
||||
|
||||
* src/mv.c (long_options): Use `strip-trailing-slashes',
|
||||
per the documetation, not `strip-trailing-slash'.
|
||||
* src/cp.c (long_opts): Likewise.
|
||||
Reported by Oskar Liljeblad.
|
||||
|
||||
* doc/fileutils.texi (mv invocation): Add a warning about how a trailing
|
||||
slash makes a difference. Prompted by a report from Oskar Liljeblad
|
||||
via Michael Stone (Debian bug#83991).
|
||||
|
||||
2001-01-31 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* config.sub: Update from master repository.
|
||||
* config.guess: Likewise.
|
||||
|
||||
2001-01-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0.38.
|
||||
|
||||
* configure, aclocal.m4, etc.: Regenerate using autoconf-2.49c.
|
||||
|
||||
* src/ls.c (gobble_file): Add a FIXME comment.
|
||||
|
||||
* TODO: Add a few items.
|
||||
|
||||
* src/ls.c (enum) [FULL_TIME]: Define.
|
||||
(long_options): Use it.
|
||||
(decode_switches): Make --full-time imply -l.
|
||||
Prompted by a report from Karl Eichwalder.
|
||||
|
||||
2001-01-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/remove.c (remove_file): Correct an expression to avoid making
|
||||
an unnecessary call to euidaccess for each file.
|
||||
|
||||
2001-01-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0.37.
|
||||
|
||||
2001-01-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.in: Remove jm_CHECK_ALL_TYPES.
|
||||
Now it's invoked by jm_MACROS.
|
||||
|
||||
2001-01-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/sys2.h (case_GETOPT_VERSION_CHAR): Use PACKAGE, not GNU_PACKAGE.
|
||||
* src/sync.c (main): Likewise.
|
||||
* src/shred.c (PACKAGE): Likewise.
|
||||
* src/dd.c (main): Likewise.
|
||||
|
||||
2001-01-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0.36.
|
||||
|
||||
* src/shred.c (UINT_MAX_32_BITS): Define.
|
||||
Use UINT_MAX_32_BITS in the cpp conditions that determine
|
||||
the `word32' typedef. Using a literal `0xffffffff' failed with
|
||||
HPUX10.20's /bin/cc.
|
||||
|
||||
* config.sub: Update from master repository.
|
||||
* config.guess: Likewise.
|
||||
|
||||
2001-01-02 Volker Borchert <bt@teknon.de>
|
||||
|
||||
Work around a broken rename system call, e.g. on SunOS 4.1.1_U1,
|
||||
that fails when the source path has a trailing slash.
|
||||
* src/copy.h [RENAME_TRAILING_SLASH_BUG]: Use the rename wrapper.
|
||||
* tests/mv/trailing-slash: Test whether the workaround works.
|
||||
* tests/m4/Makefile.am (TESTS): Add trailing-slash.
|
||||
|
||||
2001-01-03 Alexandre Duret-Lutz <duret_g@epita.fr>
|
||||
|
||||
* po/Makefile.in.in (update-po): Merge po-files in temporary files
|
||||
in the build directory, and update the source directory only when
|
||||
the merged catalog differs from the original. This fixes the known
|
||||
`make distcheck' failure due to `make update-po' being called
|
||||
on up-to-date but read-only files.
|
||||
|
||||
2001-01-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/copy.c (same_file_ok): When moving a symlink onto itself,
|
||||
don't remove the symlink. Reported by David Luyer as Debian bug#82089,
|
||||
via Michael Stone.
|
||||
* tests/mv/into-self-4: New test for the above.
|
||||
* tests/mv/Makefile.am (TESTS): Add into-self-4.
|
||||
|
||||
* tests/chmod/setgid: If `chmod g+s d' fails, then try to chgrp
|
||||
to a group of which we're a member, then try the chmod again.
|
||||
|
||||
2001-01-11 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* depcomp: New version, from automake.
|
||||
|
||||
2001-01-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/copy.c (copy_internal): Add a comment.
|
||||
Set *copy_into_self in the new code that detects that.
|
||||
Make diagnostic more consistent: s/won't/will not/.
|
||||
[move_mode, copy_into_self]: Give a diagnstic here, now that
|
||||
we have the top_level_* globals. Remove the corresponding diagnostic
|
||||
from mv.c.
|
||||
Add a FIXME comment.
|
||||
* src/mv.c (do_move): Remove diagnostic, now that copy.c issues it.
|
||||
Set `fail' to nonzero in the primary `if (copy_into_self)' block
|
||||
rather than in its own tiny one below.
|
||||
|
||||
* src/copy.c (copy_internal): Don't allow cp (or mv, when working
|
||||
across a partition boundary) to overwrite a non-directory with a
|
||||
directory. Reported by Michael J. Croghan.
|
||||
* tests/cp/dir-vs-file: New test for the above.
|
||||
* tests/cp/Makefile.am (TESTS): Add dir-vs-file.
|
||||
|
||||
2001-01-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Give a better diagnostic for `cp -R a a'.
|
||||
* src/copy.c (top_level_src_path, top_level_dst_path): New globals.
|
||||
(copy_internal): Use them.
|
||||
(copy): Set them.
|
||||
* src/cp-hash.c [struct entry] (node): Describe how it's used,
|
||||
now that we've overloaded it, in order to detect and diagnose
|
||||
the copying-directory-into-self problem.
|
||||
(new_file): Remove global.
|
||||
(htab): Declare global to be static.
|
||||
(remember_created): Insert file name instead of dummy pointer, so
|
||||
that copy.c can use the just-created directory name to detect
|
||||
the copying-directory-into-self problem.
|
||||
* tests/cp/into-self: New test for the above.
|
||||
* tests/cp/Makefile.am (TESTS): Add into-self.
|
||||
|
||||
2001-01-07 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/cp.c (usage): Split a string that was longer than 2048 bytes.
|
||||
|
||||
* doc/perm.texi: s/can not/cannot/
|
||||
|
||||
2001-01-07 Karl Eichwalder <ke@suse.de>
|
||||
|
||||
* src/chown.c (usage): Split long message string.
|
||||
|
||||
2001-01-07 Karl Eichwalder <ke@suse.de>
|
||||
|
||||
* src/ls.c (usage): Untabify.
|
||||
|
||||
* src/chgrp.c (parse_group): Normalize spelling.
|
||||
|
||||
2001-01-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* NEWS: Document the planned --full-time change.
|
||||
* doc/fileutils.texi: Likewise.
|
||||
* NEWS: Document that time stamps depend on LC_TIME, not LC_MESSAGES.
|
||||
|
||||
2001-01-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Use the more precise algorithm of GNU "make" to decide whether
|
||||
a file is in the future, by looking at high-resolution time
|
||||
stamps if available.
|
||||
|
||||
* src/ls.c:
|
||||
(TIMESPEC_NS): New macro.
|
||||
(current_time): Initialize to the minimum value.
|
||||
(current_time_ns): New var.
|
||||
(main): Do not bother to initialize current_time;
|
||||
it's no longer needed.
|
||||
(get_current_time): New function.
|
||||
(print_long_format): Use it when a file appears to be in the future.
|
||||
Get the nanoseconds of the file's time stamp, if available,
|
||||
and use that to decide whether the file appears to be in the future.
|
||||
|
||||
* src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): New macros.
|
||||
|
||||
2001-01-02 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/ls.c (long_time_expected_width, print_long_format): Fix
|
||||
bug: the initial byte passed to strftime wasn't initialized to
|
||||
a nonzero value after the buffer was reallocated.
|
||||
|
||||
2001-01-02 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Make ls -l compatible with POSIX, which requires that the
|
||||
behavior of time formats must depend only on LC_TIME, not on
|
||||
LC_MESSAGES.
|
||||
|
||||
* po/Makefile.in.in (install-data-yes): If the package is
|
||||
fileutils, install LC_TIME as an alias for LC_MESSAGES.
|
||||
* src/sys2.h (dcgettext): New macro.
|
||||
* src/ls.c (decode_switches): Use dcgettext with LC_TIME,
|
||||
not plain gettext, to get the translations of time formats.
|
||||
|
||||
2001-01-02 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/ls.c (long_time_expected_width): New function.
|
||||
(print_long_format): Use it, so that we don't assume a
|
||||
particular width for time stamps in an internationalized
|
||||
environment.
|
||||
|
||||
2001-01-01 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* doc/fileutils.texi, NEWS:
|
||||
ls -l now reports the year for files even slightly in the future, as
|
||||
POSIX requires. This helps warn users about clock skew problems.
|
||||
|
||||
* src/ls.c (print_long_format):
|
||||
Report the year for files even slightly in the future.
|
||||
Avoid overflow problems near Y2038 on 32-bit hosts.
|
||||
To calculate "six months", take half the average Gregorian
|
||||
year, not 180 days.
|
||||
|
||||
2001-01-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/chmod/Makefile.am (TESTS): Add setgid.
|
||||
* tests/chmod/setgid: Test for chmod's existing behavior.
|
||||
Based on a report from Paul Eggert.
|
||||
|
||||
2000-12-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Clean up the terminology a tad: some directories were called "sticky"
|
||||
when they were really setgid.
|
||||
* tests/Makefile.am (EXTRA_DIST): sticky-check -> setgid-check
|
||||
* tests/chmod/c-option, tests/cp/cp-parents, tests/mkdir/parents,
|
||||
tests/mkdir/perm: Likewise.
|
||||
* tests/setgid-check: File renamed from tests/sticky-check.
|
||||
All uses of "sticky" changed to "setgid".
|
||||
|
||||
2000-12-31 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/cp/Makefile.am (TESTS): Add deref-slink.
|
||||
* tests/cp/deref-slink: New file. Test for the bug fixed by my
|
||||
2000-12-28 change to copy.c.
|
||||
|
||||
2000-12-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/ls.c: Improve performance by invoking gettext twice at the start,
|
||||
instead of once for each file.
|
||||
(long_time_format): New var.
|
||||
(decode_switches): Initialize it, if format == long_format.
|
||||
(print_long_format): Use it.
|
||||
|
||||
2000-12-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/ls.c (print_long_format): Don't dump core if strftime
|
||||
returns the empty string.
|
||||
|
||||
2000-12-30 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/ls.c (gobble_file): If not using long format, don't
|
||||
invoke acl; it's not needed.
|
||||
|
||||
2000-12-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Avoid an unnecessary `stat' when using --dereference.
|
||||
* src/copy.c (same_file_ok): Use stat only if lstat reported that
|
||||
the file was a symbolic link.
|
||||
|
||||
2000-12-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* doc/perm.texi: append-only directories -> restricted deletion flag,
|
||||
which is the term that POSIX d5 uses for this notion.
|
||||
|
||||
2000-12-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* tests/group-names: Try /usr/xpg4/bin/id (Solaris 7) if plain
|
||||
'id' doesn't work.
|
||||
|
||||
2000-12-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/cp/cp-parents: Run sticky-check from just-created directory.
|
||||
|
||||
2000-12-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/copy.c (same_file_ok): Fix two typos from my 2000-09-03 change:
|
||||
s/tmp_dst_sb/tmp_src_sb/.
|
||||
|
||||
2000-12-27 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* tests/sticky-check: Turn off the working directory's sticky
|
||||
bit, so that we don't have to worry about it later.
|
||||
|
||||
* src/copy.c (same_file_ok): Use a single auto var for
|
||||
tmp_dst_sb, instead of two static vars. Likewise for
|
||||
tmp_src_sb.
|
||||
|
||||
2000-12-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.0.35.
|
||||
|
||||
* Regenerate build/config framework to use automake-1.4b and
|
||||
the latest CVS version autoconf.
|
||||
|
||||
|
||||
* tests/mkdir/perm: Disable the test if the working directory has
|
||||
the sticky bit set.
|
||||
* tests/cp/cp-parents: Likewise.
|
||||
@@ -13,6 +873,7 @@
|
||||
2000-12-25 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Clean-up to avoid warnings from Irix's c89.
|
||||
|
||||
* src/remove.c (hash_compare_active_dir_ents): Return explicit `true'
|
||||
or `false', rather than relying on implicit int-to-enum cast.
|
||||
* src/copy.c (same_file_ok): Remove declaration and set of unused
|
||||
@@ -1296,7 +2157,7 @@
|
||||
Round negative numbers correctly.
|
||||
(show_dev): Round disk usage up and disk free space down.
|
||||
|
||||
* src/ls.c: (print_dir, gobble_file, print_long_format,
|
||||
* src/ls.c (print_dir, gobble_file, print_long_format,
|
||||
print_file_name_and_frills): Round disk usage up.
|
||||
* src/du.c (print_size): Likewise.
|
||||
|
||||
@@ -1616,7 +2477,7 @@
|
||||
2000-03-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Merge from textutils.
|
||||
* src/system.h: (O_BINARY, O_TEXT): Define if necessary.
|
||||
* src/system.h (O_BINARY, O_TEXT): Define if necessary.
|
||||
(SET_BINARY, SET_BINARY2): Define.
|
||||
(DEV_BSIZE): Define to BBSIZE if appropriate.
|
||||
|
||||
@@ -1907,7 +2768,7 @@
|
||||
|
||||
* lib/euidaccess.c: Sync with the GNU C library.
|
||||
|
||||
* tests/dir/Makefile.am: (TESTS_ENVIRONMENT): Add `pwd`/ prefix
|
||||
* tests/dir/Makefile.am (TESTS_ENVIRONMENT): Add `pwd`/ prefix
|
||||
to exported PATH value (though not strictly necessary, here).
|
||||
* tests/dd/Makefile.am: Likewise.
|
||||
* tests/dircolors/Makefile.am: Likewise.
|
||||
@@ -2810,7 +3671,7 @@
|
||||
create directory' rather than `cannot make directory'. The former
|
||||
also matches the one in makepath.c.
|
||||
|
||||
* src/dd.c: (apply_translations): Use TOUPPER and TOLOWER,
|
||||
* src/dd.c (apply_translations): Use TOUPPER and TOLOWER,
|
||||
not toupper and tolower.
|
||||
|
||||
1999-05-05 Jim Meyering <meyering@ascend.com>
|
||||
@@ -3844,7 +4705,7 @@
|
||||
(base_name): Declare.
|
||||
Mostly from Akim Demaille.
|
||||
|
||||
* lib/addext.c: (base_name): Declare.
|
||||
* lib/addext.c (base_name): Declare.
|
||||
* src/sys2.h: Add prototype for base_name.
|
||||
|
||||
* lib/argmatch.c: s/argmatch_exit_failure/argmatch_die/
|
||||
@@ -4490,7 +5351,7 @@
|
||||
|
||||
* configure.in (AC_STRUCT_ST_MTIM_NSEC): Renamed from AC_STRUCT_ST_MTIM.
|
||||
* acconfig.h (ST_MTIM_NSEC): New #undef.
|
||||
* src/system.h: (ST_TIME_CMP_NS, ATIME_CMP, CTIME_CMP, MTIME_CMP):
|
||||
* src/system.h (ST_TIME_CMP_NS, ATIME_CMP, CTIME_CMP, MTIME_CMP):
|
||||
Use new ST_MTIM_NSEC macro.
|
||||
|
||||
1998-08-16 Jim Meyering <meyering@ascend.com>
|
||||
@@ -4575,7 +5436,7 @@
|
||||
rev_cmp_mtime, compare_atime, rev_cmp_atime): Compare time
|
||||
stamps with subsecond resolution if available.
|
||||
|
||||
* src/system.h: (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP,
|
||||
* src/system.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP,
|
||||
CTIME_CMP, MTIME_CMP): New macros.
|
||||
|
||||
1998-08-01 Jim Meyering <meyering@ascend.com>
|
||||
@@ -4750,7 +5611,7 @@
|
||||
|
||||
1998-06-30 Paul Eggert <eggert@shade.twinsun.com>
|
||||
|
||||
* lib/mountlist.c: (read_filesystem_list):
|
||||
* lib/mountlist.c (read_filesystem_list):
|
||||
Don't leak memory on failure.
|
||||
Don't create a dummy struct mount_entry entry;
|
||||
use the address-of-the-tail-address method instead.
|
||||
@@ -4816,7 +5677,7 @@
|
||||
|
||||
1998-06-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lib/mountlist.c: (read_filesystem_list): If SVR4, lock
|
||||
* lib/mountlist.c (read_filesystem_list): If SVR4, lock
|
||||
/etc/.mnttab.lock if available, to avoid race conditions
|
||||
(e.g. with the automounter on Solaris 2.6).
|
||||
|
||||
@@ -5473,7 +6334,7 @@
|
||||
* src/copy.c (copy_internal): Use x->backup_type, not the global.
|
||||
(valid_options): Use VALID_BACKUP_TYPE and VALID_SPARSE_MODE.
|
||||
|
||||
* src/copy.h: (VALID_SPARSE_MODE): Define.
|
||||
* src/copy.h (VALID_SPARSE_MODE): Define.
|
||||
[struct cp_options] (backup_type): New member.
|
||||
|
||||
* src/cp.c [NDEBUG]: Comment out definition.
|
||||
|
||||
@@ -1,4 +1,84 @@
|
||||
Changes in release 4.01:
|
||||
[4.1.1]
|
||||
* cp now ensures that the set-user-ID and set-group-ID bits are cleared for
|
||||
the destination file when when copying and not preserving permissions.
|
||||
* `ln -f --backup k k' gives a clearer diagnostic
|
||||
* ls no longer truncates user names or group names that are longer
|
||||
than 8 characters.
|
||||
* ls's new --dereference-command-line option causes it to dereference
|
||||
symbolic links on the command-line only.
|
||||
* ls -H now means the same as ls --dereference-command-line, as per POSIX.
|
||||
* ls -g now acts like ls -l, except it does not display owner, as per POSIX.
|
||||
* ls -n now implies -l, as per POSIX.
|
||||
* ls can now display dates and times in one of four time styles:
|
||||
|
||||
- The `full-iso' time style gives full ISO-style time stamps like
|
||||
`2001-05-14 23:45:56.477817180 -0700'.
|
||||
- The 'iso' time style gives ISO-style time stamps like '2001-05-14 '
|
||||
and '05-14 23:45'.
|
||||
- The 'locale' time style gives locale-dependent time stamps like
|
||||
'touko 14 2001' and 'touko 14 23:45' (in a Finnish locale).
|
||||
- The 'posix-iso' time style gives traditional POSIX-locale
|
||||
time stamps like 'May 14 2001' and 'May 14 23:45' unless the user
|
||||
specifies a non-POSIX locale, in which case it uses ISO-style dates.
|
||||
This is the default.
|
||||
|
||||
You can specify a time style with an option like --time-style='iso'
|
||||
or with an environment variable like TIME_STYLE='iso'. GNU Emacs 21
|
||||
and later can parse ISO dates, but older Emacs versions cannot, so
|
||||
if you are using an older version of Emacs outside the default POSIX
|
||||
locale, you may need to set TIME_STYLE="locale".
|
||||
|
||||
* --full-time is now an alias for "-l --time-style=full-iso".
|
||||
|
||||
Changes in release 4.1:
|
||||
[4.0.45]
|
||||
* dd conv=sync,block now pads only with spaces
|
||||
* ls's -1 option no longer cancels the effect of a preceding -l
|
||||
* regenerate configure using a patched version of autoconf-2.49e to work
|
||||
around a bug in its test for a working memcmp function
|
||||
* ls: fix off-by-one error introduced with the previous change
|
||||
[4.0.44]
|
||||
* ls: When given two or more arguments but the only one that exists is a
|
||||
directory, don't treat it as if it were the only argument. Before,
|
||||
`mkdir d; ls no-dir d 2>/dev/null' would act like `ls d' and produce
|
||||
no output. Now, it prints `d:'.
|
||||
* touch -d 'last friday' would use a time stamp that was one hour off
|
||||
(e.g., 23:00 on *thursday* rather than 00:00 of the preceding friday)
|
||||
when run such that the current time and the target date/time fall on
|
||||
opposite sides of a daylight savings time transition.
|
||||
This problem arises only with relative date strings like `last monday'.
|
||||
It is not a problem with strings that include absolute dates.
|
||||
[4.0.43]
|
||||
* regenerate configure-related files using autoconf-2.49d
|
||||
[4.0.42]
|
||||
* Using ls's short-named `-H' option evokes the warning that the
|
||||
meaning of `-H' will soon change. Use `--si' instead.
|
||||
[4.0.41]
|
||||
* fix bug in rm introduced in 4.0.38: `chmod 0 f; rm f' would no longer prompt
|
||||
before removal.
|
||||
[4.0.40]
|
||||
* portability fixes, mainly for UnixWare 7.1.1
|
||||
[4.0.39]
|
||||
* cp and mv accept --strip-trailing-slashes, not just --strip-trailing-slash
|
||||
[4.0.38]
|
||||
* ls --full-time now implies -l; before, without -l it was a no-op
|
||||
[4.0.37]
|
||||
* portability fixes for SunOS4.1.1, Fujitsu (f300-fujitsu-uxpv4.1_ES),
|
||||
and Unicos (alphaev5-cray-unicosmk2.0.5.X)
|
||||
[4.0.36]
|
||||
* `mv dir/ new-name' no longer fails on SunOS4.1.1U
|
||||
* attempting to use mv to move a symlink onto itself no longer removes
|
||||
the symlink
|
||||
* `cp -R directory file' no longer removes `file'. now it fails and gives
|
||||
a diagnostic
|
||||
* The manual now warns that ls's --full-time format string is planned
|
||||
to change in a future release.
|
||||
* ls -l's time stamp format now depends on LC_TIME, not LC_MESSAGES,
|
||||
as POSIX requires.
|
||||
* ls -l now reports the year for files even slightly in the future, as
|
||||
POSIX requires. This helps warn users about clock skew problems.
|
||||
* `cp -d file symlink-to-some-other-file' no longer fails
|
||||
* performance improvements for ls
|
||||
[4.0.35]
|
||||
* ln --backup=simple --suffix=SUFFIX once again uses SUFFIX
|
||||
* install: Likewise.
|
||||
@@ -15,7 +95,9 @@ Changes in release 4.01:
|
||||
[4.0.33]
|
||||
* dd now accepts skip=nB and seek=nB, to advance past some number of bytes, n,
|
||||
that need not be a multiple of the block size.
|
||||
* dd (without conv=notrunc) now uses ftruncate only on regular files
|
||||
* dd (without conv=notrunc) now complains only when ftruncate fails on a
|
||||
regular file, a directory, or a shared memory object -- not when it fails
|
||||
to truncate other types of files, like /dev/fd0.
|
||||
* chmod --changes (-c) once again issues diagnostics only for the files
|
||||
with changed permissions
|
||||
* mkdir now gives one diagnostic (rather than two) for certain failures
|
||||
@@ -39,7 +121,7 @@ Changes in release 4.01:
|
||||
* ls is much more efficient on systems (e.g., linux-2.4.*) that store file
|
||||
type information in directory entries.
|
||||
* shred now automatically determines the size of each block device argument
|
||||
* ls's date/time format strings are now local dependent
|
||||
* ls's date/time format strings are now locale dependent
|
||||
* mkdir, mknod, mkfifo, and chmod work better in conjunction with ACLs
|
||||
* `cp --parents dir1/ dir2' no longer gets a failed assertion
|
||||
* shred now determines the size of block devices like /dev/fd0
|
||||
@@ -69,7 +151,7 @@ Changes in release 4.01:
|
||||
* cp -p and mv now try to preserve uid even if you're not root, as per POSIX.2.
|
||||
This affects behavior only on hosts that let you give files away via chmod.
|
||||
* du would fail when given `.' or `..' followed by other command line arguments
|
||||
* Using cp's short-named `-P' option evokes the warning that that the
|
||||
* Using cp's short-named `-P' option evokes the warning that the
|
||||
meaning of `-P' will soon change. Use `--parents' instead.
|
||||
* chgrp, chmod, and chown: when used with the --verbose option, might give an
|
||||
invalid diagnostic (due to clobbered errno) when failing.
|
||||
|
||||
@@ -1,3 +1,148 @@
|
||||
2001-06-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
(PIDSTR_DECL_AND_INIT): Define.
|
||||
|
||||
2001-06-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.in (ALL_LINGUAS): Add Turkish (tr).
|
||||
|
||||
2001-05-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/dirname.c (main): Add `const' to declaration of local, `result'.
|
||||
|
||||
2001-04-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Add options to make `who' more POSIX compliant.
|
||||
* who.c: Accept new options: --all (-a), --boot (-b), --dead (-d),
|
||||
--login, --process (-p), --runlevel (-r), --short (-s), --time (-t),
|
||||
--users (-u).
|
||||
The -u option now produces POSIX-specified results and is the same as
|
||||
the long option `--users'. --idle is no longer the same as -u.
|
||||
(time_string, print_line, print_boottime, print_deadprocs, print_login,
|
||||
print_initspawn, print_clockchange, print_runlevel): New functions.
|
||||
(print_user): Renamed from print_entry and reworked.
|
||||
(search_entries): Remove function.
|
||||
(who_am_i): Likewise.
|
||||
(usage): Describe new options.
|
||||
(main): Handle new options.
|
||||
Mostly from Michael Stone.
|
||||
|
||||
FIXME (remove this, later): This probably doesn't compile on any
|
||||
type of system except Linux, due to the unprotected uses of e.g.,
|
||||
utmp_ent->ut_exit.e_termination.
|
||||
|
||||
2001-05-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
dirname code cleanup. base_name now behaves more compatibly
|
||||
with POSIX basename when given file names that have trailing
|
||||
slashes, and similarly for dir_name. Add new primitives
|
||||
base_len and dir_len. Put the directory-name-related decls
|
||||
into dirname.h.
|
||||
|
||||
* basename.c: Include "dirname.h".
|
||||
(base_name, strip_trailing_slashes): Remove decls; now in dirname.h.
|
||||
(main): Use base_len instead of strip_trailing_slashes to strip
|
||||
trailing slashes.
|
||||
|
||||
* dirname.c (strip_trailing_slashes): Remove decl;
|
||||
now in dirname.h.
|
||||
(main): Use dir_len rather than dir_name_r.
|
||||
|
||||
* su.c: Include "dirname.h".
|
||||
(base_name): Remove decl; now in dirname.h.
|
||||
|
||||
2001-04-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* doc/sh-utils.texi (false invocation): Describe how --help and
|
||||
--version are treated with and without POSIXLY_CORRECT.
|
||||
(true invocation): Likewise. Forwarded by Michael Stone.
|
||||
|
||||
2001-03-18 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/Fetish.pm: If the $DJDIR envvar is defined, set SHELL
|
||||
to $DJDIR/bin/bash.exe. Patch from Richard Dawe, based on a
|
||||
suggestion from Eli Zaretskii.
|
||||
|
||||
2001-03-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* doc/sh-utils.texi (date invocation): Correct the description of how
|
||||
date works when given no format. Reported by Ole Laursen.
|
||||
|
||||
* src/factor.c: Include wheel-size.h.
|
||||
(WHEEL_START): Adjust definition.
|
||||
(wheel_tab[]): Remove body of definition.
|
||||
Include generated file, wheel.h, instead.
|
||||
|
||||
* src/wheel-gen.pl: New file.
|
||||
* src/Makefile.am (noinst_HEADERS): Add wheel.h wheel-size.h.
|
||||
(EXTRA_DIST): Add wheel-gen.pl.
|
||||
(PERL): Define.
|
||||
(wheel-size.h, wheel.h): New rules.
|
||||
(BUILT_SOURCES): Add wheel.h and wheel-size.h.
|
||||
(MAINTAINERCLEANFILES): Define.
|
||||
|
||||
2001-03-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (my_distdir): Define new variable, and use this
|
||||
in place of most old uses of $(distdir).
|
||||
|
||||
* src/date.c (usage): Describe %C.
|
||||
* doc/sh-utils.texi (Date directives): Likewise.
|
||||
|
||||
* tests/help-version: Ensure that /dev/full is a character device
|
||||
(using test -c) as well as being writable, before trying to write to it.
|
||||
Otherwise, the test could mistakenly append a newline to an existing,
|
||||
regular, writable, /dev/full file.
|
||||
Suggested by Ulrich Drepper.
|
||||
|
||||
2001-03-07 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/stty/Makefile.am (EXTRA_DIST): Remove input-tty.
|
||||
* tests/Makefile.am (EXTRA_DIST): Add input-tty.
|
||||
|
||||
* tests/stty/basic-1: Reflect change in location of input-tty.
|
||||
* tests/stty/row-col: Likewise.
|
||||
* tests/stty/input-tty: Move this file...
|
||||
* tests/input-tty: ... to here.
|
||||
|
||||
2001-02-24 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* doc/sh-utils.texi: Fix typo: '-d=1may' -> '-d 1may'.
|
||||
Fix and clarify time zone usage in 'date' examples.
|
||||
|
||||
2001-02-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/factor.c (usage): Tweak --help output: it prints the _prime_
|
||||
factors, not just any factors.
|
||||
|
||||
2001-02-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Improve the performance of `factor' (more than 2x speed-up for large N).
|
||||
* src/factor.c (wheel_tab): New global table.
|
||||
(WHEEL_START, WHEEL_END): Define.
|
||||
(factor): Remove the loop that special-cased `2'.
|
||||
Instead of incrementing by `2', use the offsets from the wheel table.
|
||||
From Michael Steffens.
|
||||
|
||||
2000-11-27 Prashant TR <rprash@wilco-int.com>
|
||||
|
||||
* src/test.c (eaccess) [__MSDOS__]: Just use access.
|
||||
|
||||
2001-01-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/dirname.c (main): Declare local result as non-const, now
|
||||
that it's freed.
|
||||
|
||||
2001-01-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.in: Remove jm_CHECK_ALL_TYPES.
|
||||
Now it's invoked by jm_MACROS.
|
||||
|
||||
2001-01-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/date.c (main): Fail when --rfc-822 (-R) is specified along
|
||||
with a format string. Reported by Jochen Hein.
|
||||
|
||||
2000-12-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* doc/texinfo.tex: Update from master repository.
|
||||
@@ -415,7 +560,7 @@
|
||||
2000-03-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Merge from textutils.
|
||||
* src/system.h: (O_BINARY, O_TEXT): Define if necessary.
|
||||
* src/system.h (O_BINARY, O_TEXT): Define if necessary.
|
||||
(SET_BINARY, SET_BINARY2): Define.
|
||||
(DEV_BSIZE): Define to BBSIZE if appropriate.
|
||||
|
||||
@@ -926,7 +1071,7 @@
|
||||
* src/false.c: New file.
|
||||
* src/true.sh: Removed.
|
||||
* src/false.sh: Removed.
|
||||
* src/Makefile.am: (bin_PROGRAMS): Add true and false.
|
||||
* src/Makefile.am (bin_PROGRAMS): Add true and false.
|
||||
(bin_SCRIPTS): Remove true and false.
|
||||
(EXTRA_DIST): Remove false.sh and true.sh.
|
||||
* man/true.1in: New file.
|
||||
@@ -1221,7 +1366,7 @@
|
||||
|
||||
Running `id USER' doesn't report any groups if there is no entry
|
||||
for USER in /etc/group. Always include the one from /etc/passwd.
|
||||
* src/id.c: (xgetgroups): Take new parameter, gid, and pass
|
||||
* src/id.c (xgetgroups): Take new parameter, gid, and pass
|
||||
it to getugroups.
|
||||
(print_group_list): Call getpwuid and adjust calls to xgetgroups
|
||||
to include new parameter.
|
||||
@@ -1557,7 +1702,7 @@
|
||||
* configure.in (jm_MACROS): New wrapper macro.
|
||||
Remove uses of most jm_* macros.
|
||||
|
||||
* acconfig.h: (chown): Add undef.
|
||||
* acconfig.h (chown): Add undef.
|
||||
(D_INO_IN_DIRENT): Likewise.
|
||||
(D_TYPE_IN_DIRENT): Likewise.
|
||||
(ssize_t): Likewise.
|
||||
@@ -2135,7 +2280,7 @@ Thu May 1 00:10:11 1997 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
Sun Apr 27 18:30:53 1997 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/printf.c: (cfcc_msg): File-scope constant.
|
||||
* src/printf.c (cfcc_msg): File-scope constant.
|
||||
(STRTOX): Use new constant as error message format string in macro.
|
||||
Suggestion from Andreas Schwab.
|
||||
(STRTOX): Don't fail because of extra character(s) following a
|
||||
@@ -2149,7 +2294,7 @@ Sun Apr 6 14:29:14 1997 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
(xstrtod, xstrtol, xstrtoul): Remove functions.
|
||||
Use the STRTOX instead.
|
||||
|
||||
* src/printf.c: (STRTOX): Interpret arguments like 'a and "a
|
||||
* src/printf.c (STRTOX): Interpret arguments like 'a and "a
|
||||
as POSIX requires. Derived from a patch by Dennis Henriksen.
|
||||
|
||||
Sun Mar 23 15:20:17 1997 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
@@ -2201,7 +2346,7 @@ Tue Mar 18 06:46:54 1997 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
Thu Mar 13 21:27:36 1997 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* lib/mktime.c: (TIME_T_MIN): Work around a bug in Cray C 5.0.3.0.
|
||||
* lib/mktime.c (TIME_T_MIN): Work around a bug in Cray C 5.0.3.0.
|
||||
|
||||
Wed Feb 19 23:06:46 1997 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
@@ -2293,7 +2438,7 @@ Wed Jan 22 20:12:31 1997 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
* lib/strftime.c (_strftime_copytm):
|
||||
New function, to work around Solaris 2.5 tzset bug.
|
||||
|
||||
* m4/mktime.m4: (AM_FUNC_MKTIME): Fix bug in mktime test -- don't
|
||||
* m4/mktime.m4 (AM_FUNC_MKTIME): Fix bug in mktime test -- don't
|
||||
test now, test a couple of thousand times.
|
||||
|
||||
* m4/strftime.m4 (main): Use TZ=GMT0, not TZ=GMT, since only GMT0 is
|
||||
@@ -3812,7 +3957,7 @@ Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com)
|
||||
|
||||
Fri Jun 23 23:04 1995 Jim Meyering (meyering@comco.com)
|
||||
|
||||
* configure.in: (AC_REPLACE_FUNCS): Add memcpy and memset.
|
||||
* configure.in (AC_REPLACE_FUNCS): Add memcpy and memset.
|
||||
Add checks for floor, modf, and rint -- all used by seq.c.
|
||||
|
||||
Mon Jun 12 00:26:54 1995 Jim Meyering (meyering@comco.com)
|
||||
@@ -3862,7 +4007,7 @@ Fri May 12 21:25:50 1995 Jim Meyering (meyering@comco.com)
|
||||
|
||||
Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
|
||||
|
||||
* configure.in: (AC_OUTPUT): Use echo, not date, to avoid creating
|
||||
* configure.in (AC_OUTPUT): Use echo, not date, to avoid creating
|
||||
unnecessary conflicts for people using version control software
|
||||
like RCS and CVS.
|
||||
(AC_ARG_PROGRAM): Use it.
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
Changes in release 2.1
|
||||
[2.0.12]
|
||||
* date -d 'last friday' would print a date/time that was one hour off
|
||||
(e.g., 23:00 on *thursday* rather than 00:00 of the preceding friday)
|
||||
when run such that the current time and the target date/time fall on
|
||||
opposite sides of a daylight savings time transition.
|
||||
This problem arose only with relative date strings like `last monday'.
|
||||
It was not a problem with strings that include absolute dates.
|
||||
[2.0.11]
|
||||
* setting the date now works properly, even when using -u
|
||||
* `date -f - < /dev/null' no longer dumps core
|
||||
|
||||
@@ -1,3 +1,518 @@
|
||||
2001-07-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/tail.c (usage): Reformat so help2man generates a properly
|
||||
indented man page. Patch by Herbert Xu.
|
||||
|
||||
2001-07-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.cfg: New file with package-specific definitions.
|
||||
* Makefile.am (EXTRA_DIST): Add Makefile.cfg.
|
||||
|
||||
2001-07-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/sort.c (usage): Suggest setting LC_COLLATE=C, rather
|
||||
than LC_ALL=C.
|
||||
|
||||
2001-06-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/sort/Test.pm: Add a test based on a report from Herbert Xu.
|
||||
|
||||
2001-05-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/uniq.c: Rename new option values: s/all/precede/ and
|
||||
s/minimum/separate/.
|
||||
* tests/uniq/Test.pm: Reflect the above renamings.
|
||||
|
||||
2001-05-12 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* src/tail.c (parse_obsolescent_option): Accept a b suffix.
|
||||
|
||||
2001-05-19 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
msgmerge-0.10.37 complains about some `invalid multibyte sequences.'
|
||||
* po/el.po: Remove the offending entries.
|
||||
* po/ko.po: Likewise.
|
||||
* po/zh.po: Likewise.
|
||||
|
||||
2001-05-19 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Support new modes for uniq's --all-repeated option.
|
||||
The default behavior is unchanged.
|
||||
|
||||
* src/uniq.c: Include argmatch.h.
|
||||
(usage): Update.
|
||||
(check_file): Implement it.
|
||||
(main): Handle new, optional arguments.
|
||||
* tests/uniq/Test.pm: New tests for the above.
|
||||
Patch by Padraig Brady.
|
||||
|
||||
2001-05-12 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* src/tail.c (parse_obsolescent_option): Use t_count_lines, not
|
||||
count_lines, in error message.
|
||||
|
||||
2001-05-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/comm.c (usage): Correct description of -3.
|
||||
Reported by Soeren Sonnenburg.
|
||||
|
||||
2001-04-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0.14.
|
||||
|
||||
* configure: Regenerate using a patched copy of autoconf-2.49e to
|
||||
work around a bug in its test for a working memcmp function.
|
||||
|
||||
2001-03-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/cksum.c: Fix bugs when computing length of large files.
|
||||
Add overflow and write error checks. Use uint_fast32_t, not
|
||||
unsigned long, to do checksum calculation, as C99 says
|
||||
uint_fast32_t should be no slower and might be faster.
|
||||
|
||||
Include <stdio.h> and "system.h" even if CRCTAB is defined,
|
||||
so that the code will compile if CRCTAB is defined.
|
||||
Include "human.h" if CRCTAB is not defined.
|
||||
(uint_fast32_t): Define if it appears that stdint.h didn't.
|
||||
(BIT, remainder, main, crctab): Use uint_fast32_t, not unsigned long,
|
||||
for checksums.
|
||||
(fill_r, remainder, main): Use ANSI prototypes.
|
||||
(fill_r, remainder, main): Omit duplicate code.
|
||||
(main): Use uintmax_t, not unsigned long, for file lengths.
|
||||
Use size_t, not long, for result of fread.
|
||||
Check for overflow when computing file lengths.
|
||||
Check for write error immediately after printing a line, so that
|
||||
we don't write to stdout indefinitely after an error.
|
||||
|
||||
2001-04-14 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (default_sort_size): Leave a 1/16 margin for RSS.
|
||||
Suggestion from Solar Designer.
|
||||
|
||||
2001-04-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/wc.c (usage): Tweak --help output: s/line,/newline,/
|
||||
|
||||
2001-04-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/sort.c (main): Add a comment justifying the use of
|
||||
`multi-character' rather than `multibyte' in a diagnostic.
|
||||
From Paul Eggert.
|
||||
|
||||
2001-04-12 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (RLIMIT_AS): Do not define; just use conditional
|
||||
code, since RLIMIT_RSS is similar (and is not standardized).
|
||||
(default_sort_size): Don't allocate more than the RSS limit,
|
||||
if this host has such a limit.
|
||||
|
||||
2001-03-20 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* NEWS, doc/textutils.texi: sort now accepts long options and
|
||||
checks POSIX option syntax.
|
||||
|
||||
* doc/textutils.texi: Document --, -, sort long options, and
|
||||
sort -o after files.
|
||||
|
||||
* src/sort.c: Include <getopt.h>.
|
||||
(usage, main): Add support for long options, and check option
|
||||
syntax as POSIX requires, though (as usual for GNU apps)
|
||||
options can follow file names unless POSIXLY_CORRECT is set.
|
||||
Many diagnostic revamped.
|
||||
(long_options): New constant.
|
||||
(badfieldspec): New arg MSGID. Mark as noreturn.
|
||||
(parse_field_count): New arg MSGID; if null, just return null on error.
|
||||
(new_key): Renamed from key_init. All callers changed. Now allocates
|
||||
the new key.
|
||||
|
||||
2001-03-18 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0.13.
|
||||
|
||||
* tests/Fetish.pm: If the $DJDIR envvar is defined, set SHELL
|
||||
to $DJDIR/bin/bash.exe. Patch from Richard Dawe, based on a
|
||||
suggestion from Eli Zaretskii.
|
||||
|
||||
2001-03-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c, src/tail.c, src/uniq.c (usage):
|
||||
Warn that the +N form will be withdrawn.
|
||||
* doc/textutils.texi: Likewise.
|
||||
|
||||
2001-03-08 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* NEWS, doc/textutils.texi: Document pr changes.
|
||||
|
||||
* src/pr.c: Include mbswidth.h.
|
||||
(standard_header, header, test_suite): Remove.
|
||||
(date_format, date_text, file_text, header_width_available): New vars.
|
||||
(long_options, main, init_header, usage):
|
||||
Add new -D or --date-format option.
|
||||
(CHARS_FOR_DATE_AND_PAGE, T_BUF_FMT, T_BUF_SIZE, NO_DATE): Remove.
|
||||
(init_header): Allow arbitrary width for date format. Change
|
||||
"Page %5d" to "Page %d", since the code no longer assumes fixed width.
|
||||
Do not assume that localtime succeeds.
|
||||
(init_header, print_header, usage): Do not truncate headers.
|
||||
(init_header, print_header): Defer width calculations until
|
||||
page is printed, since "Page 100000" is wider than "Page 1".
|
||||
Count columns, not bytes, in page headers.
|
||||
Custom headers take up only the center, not the whole header.
|
||||
(print_header): Use printf rather than fprintf(stdout).
|
||||
|
||||
* po/Makefile.in.in (install-data-yes): Install LC_TIME locale
|
||||
for all packages, not just for fileutils.
|
||||
(uninstall): Remove LC_TIME locale too.
|
||||
|
||||
* src/sys2.h (INT_STRLEN_BOUND): New macro.
|
||||
|
||||
* tests/pr/0F, tests/pr/0FF, tests/pr/2-S_f-t_notab,
|
||||
tests/pr/2-Sf-t_notab, tests/pr/2f-t_notab,
|
||||
tests/pr/2s_f-t_notab, tests/pr/2s_w60f-t_nota,
|
||||
tests/pr/2sf-t_notab, tests/pr/2sw60f-t_notab,
|
||||
tests/pr/2w60f-t_notab, tests/pr/3-0F, tests/pr/3-5l17f-t,
|
||||
tests/pr/3-FF, tests/pr/3a2l17-FF, tests/pr/3a3f-0F,
|
||||
tests/pr/3a3l15-t, tests/pr/3a3l8f-t, tests/pr/3b2l17-FF,
|
||||
tests/pr/3b3f-0F, tests/pr/3b3f-0FF, tests/pr/3b3f-FF,
|
||||
tests/pr/3b3l15-t, tests/pr/3b3l8f-t, tests/pr/3f-0F,
|
||||
tests/pr/3f-FF, tests/pr/3l17f-t, tests/pr/3l24-t,
|
||||
tests/pr/3ml17f-t, tests/pr/3ml24-FF, tests/pr/3ml24-t,
|
||||
tests/pr/3ml24-t-FF, tests/pr/4-7l24-FF, tests/pr/4l24-FF,
|
||||
tests/pr/a2l15-FF, tests/pr/a2l17-FF, tests/pr/a3-0F,
|
||||
tests/pr/a3f-0F, tests/pr/a3f-0FF, tests/pr/a3f-FF,
|
||||
tests/pr/a3l15-t, tests/pr/a3l17f-lm, tests/pr/a3l8f-t,
|
||||
tests/pr/b2l15-FF, tests/pr/b2l17-FF, tests/pr/b3-0F,
|
||||
tests/pr/b3f-0F, tests/pr/b3f-0FF, tests/pr/b3f-FF,
|
||||
tests/pr/b3l15-t, tests/pr/b3l17f-lm, tests/pr/b3l8f-t,
|
||||
tests/pr/FF, tests/pr/Ja3l17f-lm, tests/pr/Jb3l17f-lm,
|
||||
tests/pr/Jml17f-lm-lo, tests/pr/l17f-t, tests/pr/l24-FF,
|
||||
tests/pr/l24-t, tests/pr/ml17f-0F, tests/pr/ml17f-lm-lo,
|
||||
tests/pr/ml17f-t, tests/pr/ml17f-t-0F, tests/pr/ml20-FF-t,
|
||||
tests/pr/ml24-FF, tests/pr/ml24-t, tests/pr/ml24-t-FF,
|
||||
tests/pr/n+2-5l17f-0FF, tests/pr/n+2l17f-0FF,
|
||||
tests/pr/n+2l17f-bl, tests/pr/n+3-7l24-FF,
|
||||
tests/pr/n+3l17f-0FF, tests/pr/n+3l17f-bl,
|
||||
tests/pr/n+3ml13f-bl-FF, tests/pr/n+3ml17f-bl-tn,
|
||||
tests/pr/n+3ml17f-tn-bl, tests/pr/n+4-8a2l17-FF,
|
||||
tests/pr/n+4b2l10f-0FF, tests/pr/n+5-8b3l10f-FF,
|
||||
tests/pr/n+5a3l6f-0FF, tests/pr/n+6a2l17-FF,
|
||||
tests/pr/n+6b3l6f-FF, tests/pr/n+7l24-FF,
|
||||
tests/pr/n+8l20-FF, tests/pr/nJml17f-lmlmlo,
|
||||
tests/pr/nJml17f-lmlolm, tests/pr/nl17f-bl,
|
||||
tests/pr/nN1+3l17f-bl, tests/pr/nN15l17f-bl,
|
||||
tests/pr/nSml13-bl-FF, tests/pr/nSml13-t-t-FF,
|
||||
tests/pr/nSml13-t-tFFFF, tests/pr/nSml17-bl-FF,
|
||||
tests/pr/nSml17-t-t-FF, tests/pr/nSml17-t-tFFFF,
|
||||
tests/pr/o3a3l17f-tn, tests/pr/o3a3Sl17f-tn,
|
||||
tests/pr/o3a3Snl17f-tn, tests/pr/o3b3l17f-tn,
|
||||
tests/pr/o3b3Sl17f-tn, tests/pr/o3b3Snl17f-tn,
|
||||
tests/pr/o3Jml17f-lm-lo, tests/pr/o3ml17f-bl-tn,
|
||||
tests/pr/o3mSl17f-bl-tn, tests/pr/o3mSnl17fbltn,
|
||||
tests/pr/Test.pm, tests/pr/W-72l17f-ll, tests/pr/W20l17f-ll,
|
||||
tests/pr/W26l17f-ll, tests/pr/W27l17f-ll,
|
||||
tests/pr/W28l17f-ll, tests/pr/W35a3l17f-lm,
|
||||
tests/pr/W35b3l17f-lm, tests/pr/W35Ja3l17f-lm,
|
||||
tests/pr/W35Jb3l17f-lm, tests/pr/W35Jml17f-lmlo,
|
||||
tests/pr/W35ml17f-lm-lo, tests/pr/W72Jl17f-ll,
|
||||
tests/pr/w72l17f-ll:
|
||||
Adjust to minor spacing changes in pr headers.
|
||||
|
||||
2001-03-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (die): New message arg, to describe failures
|
||||
better. All callers changed.
|
||||
|
||||
2001-03-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c: Decrease buffer size when only merging or checking.
|
||||
(sort_size): Now the user-specified sort size.
|
||||
(MIN_MERGE_BUFFER_SIZE): New macro.
|
||||
(MIN_SORT_SIZE): Use it.
|
||||
(merge_buffer_size): New variable.
|
||||
(fillbuf): Increase merge_buffer_size if a longer line is encountered.
|
||||
(checkfp, mergefps): Do not allocate a buffer smaller than
|
||||
merge_buffer_size.
|
||||
(sort): Use the default_sort_size if sort_size is zero.
|
||||
(main): Do not set sort_size to default_sort_size.
|
||||
|
||||
2001-03-06 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (sort): If all the input files are empty, create
|
||||
an empty output file.
|
||||
* tests/sort/Test.pm: Test for this.
|
||||
|
||||
2001-03-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/sort.c (merge): Move declarations of local variables into
|
||||
the inner scope where they're used.
|
||||
(sort): Likewise.
|
||||
|
||||
2001-03-06 Paul Eggert <eggert@sic.twinsun.com>
|
||||
|
||||
Avoid the need for a copy of the input file when the input and
|
||||
output overlap, e.g. 'sort F -o F'. With -m, though, a copy
|
||||
is still needed sometimes.
|
||||
|
||||
* doc/textutils.texi: 'sort F -o F' no longer needs to copy F.
|
||||
|
||||
* src/sort.c: Do not include closeout.h.
|
||||
(xfopen): Use stdout if *how != 'r'.
|
||||
(mergefps): Remove FPS arg.
|
||||
Open all input files, and close all files when done.
|
||||
If OFP is null, open the output file (but after opening input files).
|
||||
All callers changed.
|
||||
(first_same_file): New function.
|
||||
(sort, merge): Remove arg OFP; we now open the output file as needed.
|
||||
All callers changed.
|
||||
(merge): New arg MAX_MERGE. All callers changed.
|
||||
(sort): For "sort F -o F", close the input before opening the output.
|
||||
(main): Do not use close_stdout; 'sort' and 'merge' now close stdout.
|
||||
(This also fixes a close-stdout-twice bug.)
|
||||
Remove test for overlapping input and output files, as 'sort' no longer
|
||||
needs to worry about overlap, and 'merge' checks for overlap itself.
|
||||
Use first_same_file to inform 'merge' about how much to merge at
|
||||
the top level, to avoid overlap.
|
||||
|
||||
2001-03-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
`fmt --prefix=S' would not work properly for any string S containing
|
||||
a byte with the high bit set.
|
||||
* src/fmt.c (prefix): Declare to be of type unsigned char, not `char'.
|
||||
(get_prefix): Likewise for local, `p'.
|
||||
Reported by François Pinard.
|
||||
|
||||
Add a test for the above-fixed problem.
|
||||
* tests/fmt: New directory/files.
|
||||
* configure.in (AC_OUTPUT): Add tests/fmt/Makefile.
|
||||
* tests/Makefile.am (SUBDIRS): Add fmt.
|
||||
|
||||
2001-03-05 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* src/tac.c (save_stdin): Use mkstemp to create temporary file.
|
||||
|
||||
2001-03-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (my_distdir): Define new variable, and use this
|
||||
in place of most old uses of $(distdir).
|
||||
|
||||
* tests/help-version: Ensure that /dev/full is a character device
|
||||
(using test -c) as well as being writable, before trying to write to it.
|
||||
Otherwise, the test could mistakenly append a newline to an existing,
|
||||
regular, writable, /dev/full file.
|
||||
Suggested by Ulrich Drepper.
|
||||
|
||||
2001-03-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tests/sha1sum/sample-vec: Insert the `--text' argument for each test.
|
||||
Reported by Matthew Smith.
|
||||
|
||||
2001-03-04 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.maint (my_distdir): Define.
|
||||
Use it in place of $(distdir) almost everywhere.
|
||||
|
||||
* Version 2.0.12.
|
||||
|
||||
* Makefile.maint (alpha): Use $(PACKAGE)-$(VERSION), not $(distdir),
|
||||
since the latter now has a `$(top_distdir)/' prefix.
|
||||
|
||||
2001-03-01 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (die): New function.
|
||||
(create_temp_file, xfopen, xfclose, write_bytes, sort_buffer_size,
|
||||
fillbuf, main): Use it to regularize error messages. The only change
|
||||
in behavior is that write_bytes and the final close used to say "write
|
||||
error" but now give just the output file name, which should be enough.
|
||||
|
||||
2001-03-01 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (xfclose): Add FILE arg, and report the file name
|
||||
on error. All callers changed.
|
||||
|
||||
2001-03-01 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (main): When fclose (stdin) fails, do not mention
|
||||
the output file in the error message; mention "-" instead.
|
||||
|
||||
2001-02-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (xfopen): Set have_read_stdin to 1 only if file is "-".
|
||||
Use fopen_safer, not fopen, to avoid subtle bugs when fopen returns
|
||||
stdin, stdout, or stderr.
|
||||
(xfclose): stdout is no longer a special case.
|
||||
(main): Close output file, don't just flush it; there might be
|
||||
an error on the close.
|
||||
|
||||
2001-02-27 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (initbuf): If the desired size cannot be
|
||||
allocated, repeatedly halve it until allocation succeeds.
|
||||
Reported by Solar Designer.
|
||||
|
||||
2001-02-26 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (parse_field_count): Comment fix.
|
||||
|
||||
2001-02-25 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c: Tune allocation and comparison of nodes
|
||||
representing temp files. This improved CPU performance of
|
||||
'sort -S 1 *.[ch]' by 17% on my host.
|
||||
|
||||
(struct tempnode): name member now uses struct hack.
|
||||
(temphead): Now a pointer, not a structure. All uses changed.
|
||||
(create_temp_file): Allocate node using struct hack.
|
||||
(zaptemp): Free node using struct hack. Use pointer comparison, not
|
||||
string comparison.
|
||||
|
||||
2001-02-25 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/sort.c (eolchar, trim_trailing_blanks): Now static.
|
||||
|
||||
2001-02-25 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
'sort' race condition fixes.
|
||||
|
||||
Defend against a DoS attack where someone else creates a
|
||||
temporary file with the same name as ours. Use mkstemp to do
|
||||
this, supplying our own mkstemp if the system doesn't have one.
|
||||
|
||||
Also, fix a race condition during cleanup on hosts without
|
||||
sigaction.
|
||||
|
||||
* src/sort.c (NAME_MAX_IN_DIR): Remove.
|
||||
(sigprocmask, sigset_t): New macros, defined only on older hosts.
|
||||
(caught_signals): New var.
|
||||
(xtmpfopen, tempname): Removed.
|
||||
(create_temp_file): New function, combining the functions of the old
|
||||
xtmpfopen and tempname. All callers changed.
|
||||
Use mkstemp to create the file.
|
||||
(sighandler): On hosts without sigaction, ignore signals while
|
||||
cleaning up, instead of letting them interrupt cleanup.
|
||||
(main): Initialize caught_signals. On hosts with sigaction, block all
|
||||
caught signals while handling one. Remove duplicate code.
|
||||
|
||||
2001-02-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/sort.c (keycompare): Move declarations of locals, lena and lenb,
|
||||
into the inner scope where they are used.
|
||||
|
||||
2001-02-19 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/sort.c (AUTHORS): Add Paul Eggert.
|
||||
|
||||
* src/wc.c (wc): Rename innermost `buf' to avoid shadowing warning.
|
||||
(wc): Rename local `wc' to avoid shadowing function name.
|
||||
|
||||
2001-02-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Fix a race condition: freed storage accessed during a signal handler.
|
||||
|
||||
* src/sort.c (struct tempnode.next): Now volatile.
|
||||
(zaptemp): Free the file name after removing it from the temp list,
|
||||
not before, because a signal can arrive between the two actions
|
||||
and cleanup () traverses the list.
|
||||
|
||||
2001-02-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Check for input size, and do not overallocate memory.
|
||||
Also check for memory quotas.
|
||||
|
||||
Revamp storage management so that line tables and character data are
|
||||
taken from the same buffer. Line tables are now in reverse order,
|
||||
since they grow down while the character data grow up.
|
||||
|
||||
* src/sort.c:
|
||||
(<sys/resource.h>): Include if HAVE_SYS_RESOURCE_H.
|
||||
(struct rlimit, getrlimit): Define a replacement if RLIMIT_DATA
|
||||
is not defined.
|
||||
(RLIMIT_AS): Define to RLIMIT_DATA if not defined.
|
||||
(struct lines): Remove.
|
||||
(struct buffer): New members nlines, line_bytes, eof.
|
||||
Remove member newline_free; no longer needed, since the code no longer
|
||||
runs out of line table space.
|
||||
(SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): Remove.
|
||||
(sort_size): Renamed from sortalloc; now applies to the sum of the
|
||||
character data and the line table, not just the character data.
|
||||
(MIN_SORT_SIZE, INPUT_FILE_SIZE_GUESS): New macros.
|
||||
(linelength): remove.
|
||||
(specify_sort_size): Don't worry about the distinction between the
|
||||
character data and the line table; that is now the caller's
|
||||
responsibility.
|
||||
(default_sort_size): Return the value, instead of being executed for
|
||||
side effect. Return half of available memory, or 1/16 of total memory,
|
||||
whichever is greater; except do not exceed 1/2 of quota.
|
||||
(sort_buffer_size): New function.
|
||||
(initbuf): New arg LINE_BYTES. Ensure that the line array is properly
|
||||
aligned. Initialize the new set of struct buffer members.
|
||||
(buffer_linelim): New function.
|
||||
(fillbuf): Return int, not size_t, since the callers merely care
|
||||
whether the result is nonzero. New arg FILE so that error messages
|
||||
can report the file name. Keep track of eof. Initialize the line
|
||||
table too, taking its memory from the input buffer's memory; this
|
||||
subsumes the old findlines function and removes the need for worrying
|
||||
about running out of line table entries.
|
||||
(checkfp, mergefps, sortlines, merge, sort): Adjust to the new storage
|
||||
management regime, in particular the fact that line tables are now
|
||||
filled in by fillbuf and are in reverse order.
|
||||
(checkfp): Now takes char *, not const char *, since subroutines
|
||||
require that now. Rewrite to avoid lint and duplicate code.
|
||||
If line length alloc calculation overflows,
|
||||
simply allocate enough memory to hold the line.
|
||||
(mergefps): New arg FILES, used for buffer size calculation and error
|
||||
messages. Rewrite to avoid lint. Do not loop if savealloc*2
|
||||
overflows.
|
||||
(mergefps, merge): Zap temporary files eagerly rather than lazily;
|
||||
this is needed because we now pass FILES to mergefps.
|
||||
(sortlines): Args now point at end of arrays, not at beginnings.
|
||||
(sort): Do not allocate temporary line array for sortlines;
|
||||
instead, take the space from the same buffer.
|
||||
(main): Adjust to sort_size and default_sort_size changes.
|
||||
|
||||
2001-02-18 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Rename test input files to avoid conflicts on case-insensitive
|
||||
file systems.
|
||||
* tests/pr/2-Sf-t_notab: Rename from 2Sf-t_notab.
|
||||
* tests/pr/2-S_f-t_notab: Rename from 2S_f-t_notab.
|
||||
* tests/pr/W-72l17f-ll: Rename from W72l17f-ll.
|
||||
* tests/pr/Test.pm: Update file names to reflect renamings.
|
||||
Reported by Matthew Smith.
|
||||
|
||||
2001-01-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.in: Remove jm_CHECK_ALL_TYPES.
|
||||
Now it's invoked by jm_MACROS.
|
||||
|
||||
2001-01-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/cksum.c (main): Use PACKAGE, not GNU_PACKAGE.
|
||||
* src/tsort.c (main): Likewise.
|
||||
* src/sort.c (main): Likewise.
|
||||
(usage): Convert each TAB in --help output to a sequence of 8 spaces.
|
||||
|
||||
2001-01-07 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/tail.c (usage): Split a string that was longer than 2048 bytes.
|
||||
|
||||
2001-01-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/sort.c (main): Remove embedded \n from diagnostic.
|
||||
|
||||
2001-01-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/od.c (ulonglong_t): Define place-holder type to avoid some #if
|
||||
directives.
|
||||
(LONGEST_INTEGRAL_TYPE): Remove definition.
|
||||
(MAX_INTEGRAL_TYPE_SIZE): Use ulonglong_t instead of
|
||||
LONGEST_INTEGRAL_TYPE.
|
||||
(print_long_long): Compile this function even on systems without
|
||||
long long support.
|
||||
(decode_one_format): Remove #if directive.
|
||||
|
||||
* src/od.c (decode_one_format): Guard use of print_long_long with
|
||||
`#if HAVE_UNSIGNED_LONG_LONG'. From Darren Salt.
|
||||
Change all `#ifdef HAVE_UNSIGNED_LONG_LONG' to use `#if' instead.
|
||||
|
||||
2000-12-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/sys2.h [HAVE_INTTYPES_H]: Include <inttypes.h>.
|
||||
@@ -779,7 +1294,7 @@
|
||||
(squeeze_filter, set_initialize, main): Use size_t and ssize_t in
|
||||
place of long and int in several decls.
|
||||
(read_and_delete, read_and_xlate): Likewise, and remove assertion.
|
||||
* tests/tr/Test.pm: (o-rep-1, o-rep-2): New tests.
|
||||
* tests/tr/Test.pm (o-rep-1, o-rep-2): New tests.
|
||||
|
||||
* src/cut.c: Correct copying notice to use GPL, per author's request.
|
||||
* src/paste.c: Likewise.
|
||||
@@ -976,7 +1491,7 @@
|
||||
|
||||
* lib/linebuffer.c (readline): Do not leave room for an extra
|
||||
byte after the newline; it's no longer needed.
|
||||
* src/sort.c: (sortalloc, mergealloc, fillbuf, checkfp, mergefps):
|
||||
* src/sort.c (sortalloc, mergealloc, fillbuf, checkfp, mergefps):
|
||||
Likewise.
|
||||
|
||||
* lib/memcoll.c (memcoll): The two arguments cannot be
|
||||
@@ -1579,7 +2094,7 @@
|
||||
* src/sys2.h (TOLOWER): Define.
|
||||
(TOUPPER): Define.
|
||||
* src/join.c (TOLOWER): Remove definition.
|
||||
* src/md5sum.c: (TOLOWER): Remove definition.
|
||||
* src/md5sum.c (TOLOWER): Remove definition.
|
||||
|
||||
1999-04-30 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
@@ -1731,7 +2246,7 @@
|
||||
|
||||
1999-03-13 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* src/tac.c: (tac_mem): `#if-0'-out this unused function.
|
||||
* src/tac.c (tac_mem): `#if-0'-out this unused function.
|
||||
(tac_stdin_to_mem): Likewise.
|
||||
|
||||
* doc/textutils.texi (cut invocation): Describe --output-delimiter.
|
||||
@@ -2561,7 +3076,7 @@
|
||||
|
||||
1998-01-16 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/sort.c: (mergefps): Add braces to avoid ambiguous `else' stmt.
|
||||
* src/sort.c (mergefps): Add braces to avoid ambiguous `else' stmt.
|
||||
(nls_set_fraction): Likewise.
|
||||
|
||||
* src/sort.c: Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
|
||||
@@ -2853,7 +3368,7 @@
|
||||
|
||||
1997-10-14 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/sort.c: (_NL_ITEM) [!defined]: Define.
|
||||
* src/sort.c (_NL_ITEM) [!defined]: Define.
|
||||
From from Ørn E. Hansen.
|
||||
|
||||
* src/sort.c: Use STREQ in place of most uses of strcmp.
|
||||
@@ -4292,7 +4807,7 @@ Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov)
|
||||
(noinst_HEADERS): Rename from HEADERS.
|
||||
(INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these
|
||||
to DEFS automatically.
|
||||
* lib/Makefile.am: (noinst_HEADERS): Rename from HEADERS.
|
||||
* lib/Makefile.am (noinst_HEADERS): Rename from HEADERS.
|
||||
|
||||
Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov)
|
||||
|
||||
@@ -4561,7 +5076,7 @@ Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com)
|
||||
(cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
|
||||
Update callers.
|
||||
|
||||
* tac.c: (cleanup): Don't exit.
|
||||
* tac.c (cleanup): Don't exit.
|
||||
(cleanup_fatal): New function. Call cleanup, then exit.
|
||||
(sighandler): New function.
|
||||
(cleanup_fatal): Renamed from cleanup. Call cleanup, then exit.
|
||||
@@ -4821,7 +5336,7 @@ Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com)
|
||||
|
||||
* Makefile.in (DISTFILES): Add README.alpha.
|
||||
|
||||
* lib/Makfile.in: (GETOPT, MEMCHR, REGEX): New variables.
|
||||
* lib/Makfile.in (GETOPT, MEMCHR, REGEX): New variables.
|
||||
(OBJECTS): Use them instead of hardcoding object file names.
|
||||
Suggested by Ulrich Drepper.
|
||||
|
||||
@@ -4898,7 +5413,7 @@ Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com)
|
||||
|
||||
* md5sum.c (md5_check): Use getline instead of fgets.
|
||||
|
||||
* lib/Makefile.in: (SOURCES): Add getline.c.
|
||||
* lib/Makefile.in (SOURCES): Add getline.c.
|
||||
(OBJECTS): Add getline.o.
|
||||
(DISTFILES): Add getline.h.
|
||||
(getline.o): Depend on getline.h.
|
||||
@@ -4971,7 +5486,7 @@ Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com)
|
||||
(split_3): No longer parse the `new format.' There is only one
|
||||
valid format now: the compatible one.
|
||||
|
||||
* lib/Makefile.in: (SOURCES): Add md5.c.
|
||||
* lib/Makefile.in (SOURCES): Add md5.c.
|
||||
(OBJECTS): Add md5.o.
|
||||
(DISTFILES): Add md5.h.
|
||||
(md5.o): Depend on md5.h.
|
||||
@@ -5171,10 +5686,10 @@ Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com)
|
||||
|
||||
* md5sum.c: New file. From Ulrich Drepper.
|
||||
* md5-test.rfc: New file.
|
||||
* Makefile.in: (PROGS): Add md5sum.
|
||||
* Makefile.in (PROGS): Add md5sum.
|
||||
(check): Run a recursive make in each subdirectory.
|
||||
* man/Makefile.in: (MANFILES): Add md5sum.1.
|
||||
* src/Makefile.in: (SOURCES): Add md5sum.c.
|
||||
* man/Makefile.in (MANFILES): Add md5sum.1.
|
||||
* src/Makefile.in (SOURCES): Add md5sum.c.
|
||||
(OBJECTS): Add md5sum.o.
|
||||
(PROGS): Add md5sum.
|
||||
(check): Add basic checks for md5sum.
|
||||
@@ -5295,7 +5810,7 @@ Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com)
|
||||
|
||||
Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com)
|
||||
|
||||
* configure.in: (AC_OUTPUT): Use echo, not date, to avoid creating
|
||||
* configure.in (AC_OUTPUT): Use echo, not date, to avoid creating
|
||||
unnecessary conflicts for people using version control software
|
||||
like RCS and CVS.
|
||||
(AC_ARG_PROGRAM): Use it.
|
||||
|
||||
@@ -1,4 +1,32 @@
|
||||
Changes in release 2.1
|
||||
[2.0.15]
|
||||
* uniq's --all-repeated option has new modes to delimit groups
|
||||
of duplicate lines: --all-repeated={precede,separate,none(default)}
|
||||
[2.0.14]
|
||||
* sort now accepts long options like "--reverse" and "--".
|
||||
* sort now checks option syntax as POSIX requires, except that (as usual
|
||||
for GNU) options can follow file names unless POSIXLY_CORRECT is set.
|
||||
For example, invalid positional combinations like "sort +1 -r -2" are
|
||||
now rejected as per POSIX.
|
||||
* The next POSIX standard will require that obsolescent 'sort'
|
||||
positional options like +1 be treated as file names, not options.
|
||||
Please use 'sort -k' instead.
|
||||
[2.0.13]
|
||||
* pr accepts new -D or --date option, to specify date format.
|
||||
* The following changes are required by POSIX:
|
||||
- If POSIXLY_CORRECT is set, dates in pr headers now look something like
|
||||
'Dec 4 23:59 2001', with the exact appearance affected by LC_TIME.
|
||||
- pr -h now affects only the center header string, not the entire header.
|
||||
- pr no longer truncates headers.
|
||||
* Spacing in pr headers has been adjusted slightly.
|
||||
* `fmt --prefix=S' now works when S contains a byte with the high bit set
|
||||
[2.0.12]
|
||||
* sort has improved performance when using very little main memory
|
||||
* sort has improved memory management
|
||||
* sort is no longer susceptible to certain denial of service attacks
|
||||
* sort no longer suffers from a race condition whereby an interrupt received
|
||||
during cleanup could cause it to fail to remove temporary files.
|
||||
This problem could arise only on hosts without sigaction.
|
||||
[2.0.11]
|
||||
* sort accepts new -S SIZE option, to specify main-memory usage.
|
||||
[2.0.10]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- Makefile -*- for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997, 2000 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
@@ -150,6 +150,11 @@ install-data-yes: all
|
||||
true; \
|
||||
fi; \
|
||||
fi; \
|
||||
timedir=$$destdir/$$lang/LC_TIME; \
|
||||
rm -fr $$timedir; \
|
||||
ln -s LC_MESSAGES $$timedir \
|
||||
|| (mkdir $$timedir && ln $$dir/* $$timedir); \
|
||||
echo "installing $$timedir as an alias for $$dir"; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
if test -x "$(MKINSTALLDIRS)"; then \
|
||||
@@ -171,10 +176,13 @@ uninstall:
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
for dir in $(localedir) $(gnulocaledir); do \
|
||||
for lc in LC_MESSAGES LC_TIME; do \
|
||||
for x in '' .m; do \
|
||||
rm -f $(DESTDIR)$$dir/$$lang/$$lc/$(PACKAGE)$(INSTOBJEXT)$$x; \
|
||||
done; \
|
||||
done; \
|
||||
done; \
|
||||
done
|
||||
|
||||
check: all
|
||||
@@ -206,20 +214,25 @@ dist distdir: update-po $(DISTFILES)
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
PATH=`pwd`/../src:$$PATH; \
|
||||
cd $(srcdir); \
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
mv $$lang.po $$lang.old.po; \
|
||||
echo "$$lang:"; \
|
||||
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
|
||||
rm -f $$lang.old.po; \
|
||||
if $(MSGMERGE) $(srcdir)/$$lang.po \
|
||||
$(srcdir)/$(PACKAGE).pot -o $$lang.new.po; then \
|
||||
if cmp $$lang.new.po $(srcdir)/$$lang.po >/dev/null; then \
|
||||
echo "$$lang.po is unchanged"; \
|
||||
rm -f $$lang.new.po; \
|
||||
else \
|
||||
echo "updating $$lang.po"; \
|
||||
rm -f $(srcdir)/$$lang.po; \
|
||||
mv $$lang.new.po $(srcdir)/$$lang.po; \
|
||||
fi; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
rm -f $$lang.po; \
|
||||
mv $$lang.old.po $$lang.po; \
|
||||
rm -f $$lang.new.po; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
|
||||
129
src/ansi2knr.c
129
src/ansi2knr.c
@@ -1,6 +1,6 @@
|
||||
/* Copyright (C) 1989, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. */
|
||||
/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */
|
||||
|
||||
/*$Id: ansi2knr.c,v 1.14 1999/04/13 14:44:33 meyering Exp $*/
|
||||
/*$Id: ansi2knr.c,v 1.15 2001/05/24 21:58:56 meyering Exp $*/
|
||||
/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
|
||||
|
||||
/*
|
||||
@@ -37,21 +37,21 @@ program under the GPL.
|
||||
* There are no error messages.
|
||||
*
|
||||
* ansi2knr recognizes function definitions by seeing a non-keyword
|
||||
* identifier at the left margin, followed by a left parenthesis,
|
||||
* with a right parenthesis as the last character on the line,
|
||||
* and with a left brace as the first token on the following line
|
||||
* (ignoring possible intervening comments), except that a line
|
||||
* identifier at the left margin, followed by a left parenthesis, with a
|
||||
* right parenthesis as the last character on the line, and with a left
|
||||
* brace as the first token on the following line (ignoring possible
|
||||
* intervening comments and/or preprocessor directives), except that a line
|
||||
* consisting of only
|
||||
* identifier1(identifier2)
|
||||
* will not be considered a function definition unless identifier2 is
|
||||
* the word "void", and a line consisting of
|
||||
* identifier1(identifier2, <<arbitrary>>)
|
||||
* will not be considered a function definition.
|
||||
* ansi2knr will recognize a multi-line header provided
|
||||
* that no intervening line ends with a left or right brace or a semicolon.
|
||||
* These algorithms ignore whitespace and comments, except that
|
||||
* the function name must be the first thing on the line.
|
||||
* The following constructs will confuse it:
|
||||
* ansi2knr will recognize a multi-line header provided that no intervening
|
||||
* line ends with a left or right brace or a semicolon. These algorithms
|
||||
* ignore whitespace, comments, and preprocessor directives, except that
|
||||
* the function name must be the first thing on the line. The following
|
||||
* constructs will confuse it:
|
||||
* - Any other construct that starts at the left margin and
|
||||
* follows the above syntax (such as a macro or function call).
|
||||
* - Some macros that tinker with the syntax of function headers.
|
||||
@@ -61,6 +61,27 @@ program under the GPL.
|
||||
* The original and principal author of ansi2knr is L. Peter Deutsch
|
||||
* <ghost@aladdin.com>. Other authors are noted in the change history
|
||||
* that follows (in reverse chronological order):
|
||||
|
||||
lpd 2000-04-12 backs out Eggert's changes because of bugs:
|
||||
- concatlits didn't declare the type of its bufend argument;
|
||||
- concatlits didn't't recognize when it was inside a comment;
|
||||
- scanstring could scan backward past the beginning of the string; when
|
||||
- the check for \ + newline in scanstring was unnecessary.
|
||||
|
||||
2000-03-05 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Add support for concatenated string literals.
|
||||
* ansi2knr.c (concatlits): New decl.
|
||||
(main): Invoke concatlits to concatenate string literals.
|
||||
(scanstring): Handle backslash-newline correctly. Work with
|
||||
character constants. Fix bug when scanning backwards through
|
||||
backslash-quote. Check for unterminated strings.
|
||||
(convert1): Parse character constants, too.
|
||||
(appendline, concatlits): New functions.
|
||||
* ansi2knr.1: Document this.
|
||||
|
||||
lpd 1999-08-17 added code to allow preprocessor directives
|
||||
wherever comments are allowed
|
||||
lpd 1999-04-12 added minor fixes from Pavel Roskin
|
||||
<pavel_roskin@geocities.com> for clean compilation with
|
||||
gcc -W -Wall
|
||||
@@ -196,6 +217,8 @@ program under the GPL.
|
||||
#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
|
||||
|
||||
/* Forward references */
|
||||
char *ppdirforward();
|
||||
char *ppdirbackward();
|
||||
char *skipspace();
|
||||
char *scanstring();
|
||||
int writeblanks();
|
||||
@@ -298,7 +321,7 @@ f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
|
||||
goto wl;
|
||||
if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
|
||||
goto wl;
|
||||
switch ( *skipspace(more, 1) )
|
||||
switch ( *skipspace(ppdirforward(more), 1) )
|
||||
{
|
||||
case '{':
|
||||
/* Definitely a function header. */
|
||||
@@ -349,32 +372,70 @@ wl: fputs(buf, out);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Skip over whitespace and comments, in either direction. */
|
||||
/*
|
||||
* Skip forward or backward over one or more preprocessor directives.
|
||||
*/
|
||||
char *
|
||||
ppdirforward(p)
|
||||
char *p;
|
||||
{
|
||||
for (; *p == '#'; ++p) {
|
||||
for (; *p != '\r' && *p != '\n'; ++p)
|
||||
if (*p == 0)
|
||||
return p;
|
||||
if (*p == '\r' && p[1] == '\n')
|
||||
++p;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
char *
|
||||
ppdirbackward(p, limit)
|
||||
char *p;
|
||||
char *limit;
|
||||
{
|
||||
char *np = p;
|
||||
|
||||
for (;; p = --np) {
|
||||
if (*np == '\n' && np[-1] == '\r')
|
||||
--np;
|
||||
for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np)
|
||||
if (np[-1] == 0)
|
||||
return np;
|
||||
if (*np != '#')
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Skip over whitespace, comments, and preprocessor directives,
|
||||
* in either direction.
|
||||
*/
|
||||
char *
|
||||
skipspace(p, dir)
|
||||
register char *p;
|
||||
register int dir; /* 1 for forward, -1 for backward */
|
||||
{ for ( ; ; )
|
||||
{ while ( is_space(*p) )
|
||||
p += dir;
|
||||
if ( !(*p == '/' && p[dir] == '*') )
|
||||
break;
|
||||
p += dir; p += dir;
|
||||
while ( !(*p == '*' && p[dir] == '/') )
|
||||
{ if ( *p == 0 )
|
||||
return p; /* multi-line comment?? */
|
||||
p += dir;
|
||||
}
|
||||
p += dir; p += dir;
|
||||
}
|
||||
return p;
|
||||
char *p;
|
||||
int dir; /* 1 for forward, -1 for backward */
|
||||
{
|
||||
for ( ; ; ) {
|
||||
while ( is_space(*p) )
|
||||
p += dir;
|
||||
if ( !(*p == '/' && p[dir] == '*') )
|
||||
break;
|
||||
p += dir; p += dir;
|
||||
while ( !(*p == '*' && p[dir] == '/') ) {
|
||||
if ( *p == 0 )
|
||||
return p; /* multi-line comment?? */
|
||||
p += dir;
|
||||
}
|
||||
p += dir; p += dir;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/* Scan over a quoted string, in either direction. */
|
||||
char *
|
||||
scanstring(p, dir)
|
||||
register char *p;
|
||||
register int dir;
|
||||
char *p;
|
||||
int dir;
|
||||
{
|
||||
for (p += dir; ; p += dir)
|
||||
if (*p == '"' && p[-dir] != '\\')
|
||||
@@ -412,14 +473,14 @@ writeblanks(start, end)
|
||||
int
|
||||
test1(buf)
|
||||
char *buf;
|
||||
{ register char *p = buf;
|
||||
{ char *p = buf;
|
||||
char *bend;
|
||||
char *endfn;
|
||||
int contin;
|
||||
|
||||
if ( !isidfirstchar(*p) )
|
||||
return 0; /* no name at left margin */
|
||||
bend = skipspace(buf + strlen(buf) - 1, -1);
|
||||
bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
|
||||
switch ( *bend )
|
||||
{
|
||||
case ';': contin = 0 /*2*/; break;
|
||||
@@ -498,7 +559,7 @@ convert1(buf, out, header, convert_varargs)
|
||||
int header; /* Boolean */
|
||||
int convert_varargs; /* Boolean */
|
||||
{ char *endfn;
|
||||
register char *p;
|
||||
char *p;
|
||||
/*
|
||||
* The breaks table contains pointers to the beginning and end
|
||||
* of each argument.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* basename -- strip directory and suffix from filenames
|
||||
Copyright (C) 1990-1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "system.h"
|
||||
#include "long-options.h"
|
||||
#include "dirname.h"
|
||||
#include "error.h"
|
||||
#include "closeout.h"
|
||||
|
||||
@@ -39,9 +40,6 @@
|
||||
|
||||
#define AUTHORS "FIXME unknown"
|
||||
|
||||
char *base_name ();
|
||||
void strip_trailing_slashes ();
|
||||
|
||||
/* The name this program was run with. */
|
||||
char *program_name;
|
||||
|
||||
@@ -118,9 +116,8 @@ main (int argc, char **argv)
|
||||
usage (1);
|
||||
}
|
||||
|
||||
strip_trailing_slashes (argv[1]);
|
||||
|
||||
name = base_name (argv[1]);
|
||||
name[base_len (name)] = '\0';
|
||||
|
||||
if (argc == 3)
|
||||
remove_suffix (name, argv[2]);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* chgrp -- change group ownership of files
|
||||
Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 89, 90, 91, 1995-2001 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
|
||||
@@ -91,7 +91,7 @@ parse_group (const char *name, gid_t *g)
|
||||
struct group *grp;
|
||||
|
||||
if (*name == '\0')
|
||||
error (1, 0, _("can not change to null group"));
|
||||
error (1, 0, _("cannot change to null group"));
|
||||
|
||||
grp = getgrnam (name);
|
||||
if (grp == NULL)
|
||||
|
||||
30
src/chmod.c
30
src/chmod.c
@@ -23,6 +23,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "dirname.h"
|
||||
#include "error.h"
|
||||
#include "filemode.h"
|
||||
#include "modechange.h"
|
||||
@@ -53,8 +54,6 @@ enum Verbosity
|
||||
V_off
|
||||
};
|
||||
|
||||
void strip_trailing_slashes ();
|
||||
|
||||
static int change_dir_mode PARAMS ((const char *dir,
|
||||
const struct mode_change *changes,
|
||||
const struct stat *statp));
|
||||
@@ -100,23 +99,13 @@ mode_changed (const char *file, mode_t old_mode)
|
||||
{
|
||||
struct stat new_stats;
|
||||
|
||||
if (lstat (file, &new_stats))
|
||||
if (stat (file, &new_stats))
|
||||
{
|
||||
if (force_silent == 0)
|
||||
error (0, errno, _("getting new attributes of %s"), quote (file));
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef S_ISLNK
|
||||
if (S_ISLNK (new_stats.st_mode)
|
||||
&& stat (file, &new_stats))
|
||||
{
|
||||
if (force_silent == 0)
|
||||
error (0, errno, _("getting new attributes of %s"), quote (file));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
return old_mode != new_stats.st_mode;
|
||||
}
|
||||
|
||||
@@ -165,25 +154,16 @@ change_file_mode (const char *file, const struct mode_change *changes,
|
||||
int fail;
|
||||
int saved_errno;
|
||||
|
||||
if (lstat (file, &file_stats))
|
||||
if (deref_symlink ? stat (file, &file_stats) : lstat (file, &file_stats))
|
||||
{
|
||||
if (force_silent == 0)
|
||||
error (0, errno, _("getting attributes of %s"), quote (file));
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef S_ISLNK
|
||||
if (S_ISLNK (file_stats.st_mode))
|
||||
{
|
||||
if (! deref_symlink)
|
||||
return 0;
|
||||
else
|
||||
if (stat (file, &file_stats))
|
||||
{
|
||||
if (force_silent == 0)
|
||||
error (0, errno, _("getting attributes of %s"), quote (file));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
newmode = mode_adjust (file_stats.st_mode, changes);
|
||||
|
||||
12
src/chown.c
12
src/chown.c
@@ -1,5 +1,5 @@
|
||||
/* chown -- change user and group ownership of files
|
||||
Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 89, 90, 91, 1995-2001 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
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <getopt.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "dirname.h"
|
||||
#include "error.h"
|
||||
#include "lchown.h"
|
||||
#include "quote.h"
|
||||
@@ -56,7 +57,6 @@ struct group *getgrgid ();
|
||||
#endif
|
||||
|
||||
char *parse_user_spec ();
|
||||
void strip_trailing_slashes ();
|
||||
|
||||
/* The name the program was run with. */
|
||||
char *program_name;
|
||||
@@ -126,6 +126,8 @@ Change the owner and/or group of each FILE to OWNER and/or GROUP.\n\
|
||||
--help display this help and exit\n\
|
||||
--version output version information and exit\n\
|
||||
\n\
|
||||
"));
|
||||
printf (_("\
|
||||
Owner is unchanged if missing. Group is unchanged if missing, but changed\n\
|
||||
to login group if implied by a `:'. OWNER and GROUP may be numeric as well\n\
|
||||
as symbolic.\n\
|
||||
@@ -171,11 +173,11 @@ main (int argc, char **argv)
|
||||
case FROM_OPTION:
|
||||
{
|
||||
char *u_dummy, *g_dummy;
|
||||
const char *e = parse_user_spec (argv[optind],
|
||||
const char *e = parse_user_spec (optarg,
|
||||
&old_uid, &old_gid,
|
||||
&u_dummy, &g_dummy);
|
||||
if (e)
|
||||
error (1, 0, "%s: %s", quote (argv[optind]), e);
|
||||
error (1, 0, "%s: %s", quote (optarg), e);
|
||||
break;
|
||||
}
|
||||
case 'R':
|
||||
@@ -223,7 +225,7 @@ main (int argc, char **argv)
|
||||
const char *e = parse_user_spec (argv[optind], &uid, &gid,
|
||||
&chopt.user_name, &chopt.group_name);
|
||||
if (e)
|
||||
error (1, 0, "%s: %s", argv[optind], e);
|
||||
error (1, 0, "%s: %s", quote (argv[optind]), e);
|
||||
|
||||
/* FIXME: set it to the empty string? */
|
||||
if (chopt.user_name == NULL)
|
||||
|
||||
92
src/cksum.c
92
src/cksum.c
@@ -1,5 +1,5 @@
|
||||
/* cksum -- calculate and print POSIX.2 checksums and sizes of files
|
||||
Copyright (C) 92, 1995-2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 92, 1995-2001 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,12 +47,17 @@
|
||||
|
||||
#define AUTHORS "Q. Frank Xia"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "system.h"
|
||||
|
||||
#if !defined UINT_FAST32_MAX && !defined uint_fast32_t
|
||||
# define uint_fast32_t unsigned int
|
||||
#endif
|
||||
|
||||
#ifdef CRCTAB
|
||||
|
||||
# include <stdio.h>
|
||||
|
||||
# define BIT(x) ( (unsigned long)1 << (x) )
|
||||
# define SBIT BIT(31)
|
||||
# define BIT(x) ((uint_fast32_t) 1 << (x))
|
||||
# define SBIT BIT (31)
|
||||
|
||||
/* The generating polynomial is
|
||||
|
||||
@@ -61,47 +66,48 @@
|
||||
|
||||
The i bit in GEN is set if X^i is a summand of G(X) except X^32. */
|
||||
|
||||
# define GEN (BIT(26)|BIT(23)|BIT(22)|BIT(16)|BIT(12)|BIT(11)|BIT(10)\
|
||||
|BIT(8) |BIT(7) |BIT(5) |BIT(4) |BIT(2) |BIT(1) |BIT(0));
|
||||
# define GEN (BIT (26) | BIT (23) | BIT (22) | BIT (16) | BIT (12) \
|
||||
| BIT (11) | BIT (10) | BIT (8) | BIT (7) | BIT (5) \
|
||||
| BIT (4) | BIT (2) | BIT (1) | BIT (0))
|
||||
|
||||
static unsigned long r[8];
|
||||
static uint_fast32_t r[8];
|
||||
|
||||
static void
|
||||
fill_r ()
|
||||
fill_r (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
r[0] = GEN;
|
||||
for (i = 1; i < 8; i++)
|
||||
r[i] = (r[i - 1] & SBIT) ? (r[i - 1] << 1) ^ r[0] : r[i - 1] << 1;
|
||||
r[i] = (r[i - 1] << 1) ^ ((r[i - 1] & SBIT) ? GEN : 0);
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
remainder (m)
|
||||
int m;
|
||||
static uint_fast32_t
|
||||
remainder (int m)
|
||||
{
|
||||
unsigned long rem = 0;
|
||||
uint_fast32_t rem = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
if (BIT (i) & m)
|
||||
rem = rem ^ r[i];
|
||||
rem ^= r[i];
|
||||
|
||||
return rem & 0xFFFFFFFF; /* Make it run on 64-bit machine. */
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
main (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
fill_r ();
|
||||
printf ("unsigned long crctab[256] = {\n 0x0");
|
||||
printf ("static uint_fast32_t crctab[256] =\n{\n 0x0");
|
||||
for (i = 0; i < 51; i++)
|
||||
{
|
||||
printf (",\n 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X",
|
||||
remainder (i * 5 + 1), remainder (i * 5 + 2), remainder (i * 5 + 3),
|
||||
remainder (i * 5 + 4), remainder (i * 5 + 5));
|
||||
remainder (i * 5 + 1), remainder (i * 5 + 2),
|
||||
remainder (i * 5 + 3), remainder (i * 5 + 4),
|
||||
remainder (i * 5 + 5));
|
||||
}
|
||||
printf ("\n};\n");
|
||||
exit (EXIT_SUCCESS);
|
||||
@@ -109,13 +115,12 @@ main ()
|
||||
|
||||
#else /* !CRCTAB */
|
||||
|
||||
# include <stdio.h>
|
||||
# include <getopt.h>
|
||||
# include <sys/types.h>
|
||||
# include "system.h"
|
||||
# include "closeout.h"
|
||||
# include "long-options.h"
|
||||
# include "error.h"
|
||||
# include "human.h"
|
||||
|
||||
/* Number of bytes to read at once. */
|
||||
# define BUFLEN (1 << 16)
|
||||
@@ -128,7 +133,7 @@ static struct option const long_options[] =
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
static unsigned long const crctab[256] =
|
||||
static uint_fast32_t crctab[256] =
|
||||
{
|
||||
0x0,
|
||||
0x04C11DB7, 0x09823B6E, 0x0D4326D9, 0x130476DC, 0x17C56B6B,
|
||||
@@ -196,10 +201,12 @@ static int
|
||||
cksum (const char *file, int print_name)
|
||||
{
|
||||
unsigned char buf[BUFLEN];
|
||||
unsigned long crc = 0;
|
||||
long length = 0;
|
||||
long bytes_read;
|
||||
uint_fast32_t crc = 0;
|
||||
uintmax_t length = 0;
|
||||
size_t bytes_read;
|
||||
register FILE *fp;
|
||||
char hbuf[LONGEST_HUMAN_READABLE + 1];
|
||||
char *hp;
|
||||
|
||||
if (STREQ (file, "-"))
|
||||
{
|
||||
@@ -223,9 +230,11 @@ cksum (const char *file, int print_name)
|
||||
{
|
||||
unsigned char *cp = buf;
|
||||
|
||||
if (length + bytes_read < length)
|
||||
error (EXIT_FAILURE, 0, _("%s: file too long"), file);
|
||||
length += bytes_read;
|
||||
while (bytes_read--)
|
||||
crc = (crc << 8) ^ crctab[((crc >> 24) ^ *(cp++)) & 0xFF];
|
||||
crc = (crc << 8) ^ crctab[((crc >> 24) ^ *cp++) & 0xFF];
|
||||
}
|
||||
|
||||
if (ferror (fp))
|
||||
@@ -242,19 +251,20 @@ cksum (const char *file, int print_name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
bytes_read = length;
|
||||
while (bytes_read > 0)
|
||||
{
|
||||
crc = (crc << 8) ^ crctab[((crc >> 24) ^ bytes_read) & 0xFF];
|
||||
bytes_read >>= 8;
|
||||
}
|
||||
hp = human_readable (length, hbuf, 1, 1);
|
||||
|
||||
for (; length; length >>= 8)
|
||||
crc = (crc << 8) ^ crctab[((crc >> 24) ^ length) & 0xFF];
|
||||
|
||||
crc = ~crc & 0xFFFFFFFF;
|
||||
|
||||
printf ("%lu %ld", crc, length);
|
||||
if (print_name)
|
||||
printf (" %s", file);
|
||||
putchar ('\n');
|
||||
printf ("%u %s %s\n", (unsigned) crc, hp, file);
|
||||
else
|
||||
printf ("%u %s\n", (unsigned) crc, hp);
|
||||
|
||||
if (ferror (stdout))
|
||||
error (EXIT_FAILURE, errno, "-: %s", _("write error"));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -296,7 +306,7 @@ main (int argc, char **argv)
|
||||
|
||||
atexit (close_stdout);
|
||||
|
||||
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
|
||||
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
|
||||
AUTHORS, usage);
|
||||
|
||||
have_read_stdin = 0;
|
||||
@@ -313,16 +323,12 @@ main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (optind >= argc)
|
||||
{
|
||||
if (cksum ("-", 0) < 0)
|
||||
errors = 1;
|
||||
}
|
||||
if (optind == argc)
|
||||
errors |= cksum ("-", 0);
|
||||
else
|
||||
{
|
||||
for (i = optind; i < argc; i++)
|
||||
if (cksum (argv[i], 1) < 0)
|
||||
errors = 1;
|
||||
errors |= cksum (argv[i], 1);
|
||||
}
|
||||
|
||||
if (have_read_stdin && fclose (stdin) == EOF)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* comm -- compare two sorted files line by line.
|
||||
Copyright (C) 86, 90, 91, 1995-2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 86, 90, 91, 1995-2001 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
|
||||
@@ -81,7 +81,7 @@ Compare sorted files LEFT_FILE and RIGHT_FILE line by line.\n\
|
||||
\n\
|
||||
-1 suppress lines unique to left file\n\
|
||||
-2 suppress lines unique to right file\n\
|
||||
-3 suppress lines unique to both files\n\
|
||||
-3 suppress lines that appear in both files\n\
|
||||
--help display this help and exit\n\
|
||||
--version output version information and exit\n\
|
||||
"));
|
||||
|
||||
93
src/copy.c
93
src/copy.c
@@ -1,5 +1,5 @@
|
||||
/* copy.c -- core functions for copying files and directories
|
||||
Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation.
|
||||
Copyright (C) 89, 90, 91, 1995-2001 Free Software Foundation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -67,6 +67,11 @@ static int copy_internal PARAMS ((const char *src_path, const char *dst_path,
|
||||
int *copy_into_self,
|
||||
int *rename_succeeded));
|
||||
|
||||
/* Pointers to the file names: they're used in the diagnostic that is issued
|
||||
when we detect the user is trying to copy a directory into itself. */
|
||||
static char const *top_level_src_path;
|
||||
static char const *top_level_dst_path;
|
||||
|
||||
/* The invocation name of this program. */
|
||||
extern char *program_name;
|
||||
|
||||
@@ -81,9 +86,11 @@ get_dest_mode (const struct cp_options *option, mode_t mode)
|
||||
if (option->set_mode)
|
||||
return option->mode;
|
||||
|
||||
/* Honor the umask for `cp', but not for `mv' or `cp -p'. */
|
||||
/* Honor the umask for `cp', but not for `mv' or `cp -p'.
|
||||
In addition, `cp' without -p must clear the set-user-ID and set-group-ID
|
||||
bits. POSIX requires it do that when creating new files. */
|
||||
if (!option->move_mode && !option->preserve_chmod_bits)
|
||||
mode &= option->umask_kill;
|
||||
mode &= (option->umask_kill & ~(S_ISUID | S_ISGID));
|
||||
|
||||
return mode;
|
||||
}
|
||||
@@ -392,6 +399,8 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
|
||||
{
|
||||
const struct stat *src_sb_link;
|
||||
const struct stat *dst_sb_link;
|
||||
struct stat tmp_dst_sb;
|
||||
struct stat tmp_src_sb;
|
||||
|
||||
int same_link;
|
||||
int same = (SAME_INODE (*src_sb, *dst_sb));
|
||||
@@ -415,17 +424,15 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
|
||||
|
||||
/* If both the source and destination files are symlinks (and we'll
|
||||
know this here IFF preserving symlinks (aka xstat == lstat),
|
||||
then it's ok. */
|
||||
then it's ok -- as long as they are distinct. */
|
||||
if (S_ISLNK (src_sb->st_mode) && S_ISLNK (dst_sb->st_mode))
|
||||
return 1;
|
||||
return ! same_name (src_path, dst_path);
|
||||
|
||||
src_sb_link = src_sb;
|
||||
dst_sb_link = dst_sb;
|
||||
}
|
||||
else
|
||||
{
|
||||
static struct stat tmp_dst_sb;
|
||||
static struct stat tmp_src_sb;
|
||||
if (!same)
|
||||
return 1;
|
||||
|
||||
@@ -489,7 +496,7 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
|
||||
return 1;
|
||||
|
||||
/* If neither is a symlink, then it's ok as long as they aren't
|
||||
links to the same file. */
|
||||
hard links to the same file. */
|
||||
if (!S_ISLNK (src_sb_link->st_mode) && !S_ISLNK (dst_sb_link->st_mode))
|
||||
{
|
||||
if (!SAME_INODE (*src_sb_link, *dst_sb_link))
|
||||
@@ -504,19 +511,25 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
|
||||
}
|
||||
|
||||
/* It's ok to remove a destination symlink. But that works only when we
|
||||
unlink before opening the destination and when they're on the same
|
||||
partition. */
|
||||
unlink before opening the destination and when the source and destination
|
||||
files are on the same partition. */
|
||||
if (x->unlink_dest_before_opening
|
||||
&& S_ISLNK (dst_sb_link->st_mode))
|
||||
return src_sb_link->st_dev == src_sb_link->st_dev;
|
||||
return dst_sb_link->st_dev == src_sb_link->st_dev;
|
||||
|
||||
if (x->xstat == lstat)
|
||||
{
|
||||
static struct stat tmp_dst_sb;
|
||||
static struct stat tmp_src_sb;
|
||||
if (stat (dst_path, &tmp_dst_sb)
|
||||
|| stat (src_path, &tmp_src_sb)
|
||||
|| ! SAME_INODE (tmp_dst_sb, tmp_dst_sb))
|
||||
if ( ! S_ISLNK (src_sb_link->st_mode))
|
||||
tmp_src_sb = *src_sb_link;
|
||||
else if (stat (src_path, &tmp_src_sb))
|
||||
return 1;
|
||||
|
||||
if ( ! S_ISLNK (dst_sb_link->st_mode))
|
||||
tmp_dst_sb = *dst_sb_link;
|
||||
else if (stat (dst_path, &tmp_dst_sb))
|
||||
return 1;
|
||||
|
||||
if ( ! SAME_INODE (tmp_src_sb, tmp_dst_sb))
|
||||
return 1;
|
||||
|
||||
/* FIXME: shouldn't this be testing whether we're making symlinks? */
|
||||
@@ -577,6 +590,10 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
find created files so as to not copy infinitely if a directory is
|
||||
copied into itself. */
|
||||
|
||||
/* Associate the destination path with the source device and inode
|
||||
so that if we encounter a matching dev/ino pair in the source tree
|
||||
we can arrange to create a hard link between the corresponding names
|
||||
in the destination tree. */
|
||||
earlier_file = remember_copied (dst_path, src_sb.st_ino, src_sb.st_dev);
|
||||
|
||||
src_mode = src_sb.st_mode;
|
||||
@@ -617,6 +634,14 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (S_ISDIR (src_type) && !S_ISDIR (dst_sb.st_mode))
|
||||
{
|
||||
error (0, 0,
|
||||
_("cannot overwrite non-directory %s with directory %s"),
|
||||
quote_n (0, dst_path), quote_n (1, src_path));
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!S_ISDIR (src_type))
|
||||
{
|
||||
if (S_ISDIR (dst_sb.st_mode))
|
||||
@@ -750,8 +775,21 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
directories). */
|
||||
if (S_ISDIR (src_type))
|
||||
{
|
||||
error (0, 0, _("won't create hard link %s to directory %s"),
|
||||
quote_n (0, dst_path), quote_n (1, earlier_file));
|
||||
/* If src_path and earlier_file refer to the same directory entry,
|
||||
then warn about copying a directory into itself. */
|
||||
if (same_name (src_path, earlier_file))
|
||||
{
|
||||
error (0, 0, _("cannot copy a directory, %s, into itself, %s"),
|
||||
quote_n (0, top_level_src_path),
|
||||
quote_n (1, top_level_dst_path));
|
||||
*copy_into_self = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
error (0, 0, _("will not create hard link %s to directory %s"),
|
||||
quote_n (0, dst_path), quote_n (1, earlier_file));
|
||||
}
|
||||
|
||||
goto un_backup;
|
||||
}
|
||||
|
||||
@@ -797,7 +835,13 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
/* FIXME: this is a little fragile in that it relies on rename(2)
|
||||
failing with a specific errno value. Expect problems on
|
||||
non-POSIX systems. */
|
||||
error (0, 0, _("cannot move %s to a subdirectory of itself, %s"),
|
||||
quote_n (0, top_level_src_path),
|
||||
quote_n (1, top_level_dst_path));
|
||||
*copy_into_self = 1;
|
||||
/* FIXME-cleanup: Don't return zero here; adjust mv.c accordingly.
|
||||
The only caller that uses this code (mv.c) ends up setting its
|
||||
exit status to nonzero when copy_into_self is nonzero. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -895,8 +939,6 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
int in_current_dir;
|
||||
|
||||
dst_parent = dir_name (dst_path);
|
||||
if (dst_parent == NULL)
|
||||
xalloc_die ();
|
||||
|
||||
in_current_dir = (STREQ (".", dst_parent)
|
||||
/* If either stat call fails, it's ok not to report
|
||||
@@ -1161,6 +1203,17 @@ copy (const char *src_path, const char *dst_path,
|
||||
int move_mode = options->move_mode;
|
||||
|
||||
assert (valid_options (options));
|
||||
|
||||
/* Record the file names: they're used in case of error, when copying
|
||||
a directory into itself. I don't like to make these tools do *any*
|
||||
extra work in the common case when that work is solely to handle
|
||||
exceptional cases, but in this case, I don't see a way to derive the
|
||||
top level source and destination directory names where they're used.
|
||||
An alternative is to use COPY_INTO_SELF and print the diagnostic
|
||||
from every caller -- but I don't wan't to do that. */
|
||||
top_level_src_path = src_path;
|
||||
top_level_dst_path = dst_path;
|
||||
|
||||
return copy_internal (src_path, dst_path, nonexistent_dst, 0, NULL,
|
||||
options, move_mode, copy_into_self, rename_succeeded);
|
||||
}
|
||||
|
||||
11
src/copy.h
11
src/copy.h
@@ -142,6 +142,17 @@ int rpl_lstat PARAMS((const char *, struct stat *));
|
||||
# define lstat rpl_lstat
|
||||
# endif
|
||||
|
||||
int rename ();
|
||||
|
||||
/* Arrange to make rename calls go through the wrapper function
|
||||
on systems with a rename function that fails for a source path
|
||||
specified with a trailing slash. */
|
||||
# if RENAME_TRAILING_SLASH_BUG
|
||||
int rpl_rename PARAMS((const char *, const char *));
|
||||
# undef rename
|
||||
# define rename rpl_rename
|
||||
# endif
|
||||
|
||||
int
|
||||
copy PARAMS ((const char *src_path, const char *dst_path,
|
||||
int nonexistent_dst, const struct cp_options *options,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user