mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
1218 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43343c2793 | ||
|
|
68aff85110 | ||
|
|
9bbd5af6e8 | ||
|
|
34598a09f5 | ||
|
|
c6bb7f43ff | ||
|
|
2497b8e42f | ||
|
|
8c55f0fbfa | ||
|
|
a6d4483234 | ||
|
|
33106990a6 | ||
|
|
63fb8bd5b6 | ||
|
|
2bd28f0200 | ||
|
|
48a269db9c | ||
|
|
07fdea3ed9 | ||
|
|
14947f5b6c | ||
|
|
786b4298a5 | ||
|
|
a0ba130aea | ||
|
|
ae1331b60a | ||
|
|
2f17be04e3 | ||
|
|
db6dff2e6e | ||
|
|
fc1b595b19 | ||
|
|
c206bac583 | ||
|
|
64f41399ff | ||
|
|
bcfbac9349 | ||
|
|
32ea988e8b | ||
|
|
ad7b8c7978 | ||
|
|
b24b689963 | ||
|
|
334294f09d | ||
|
|
3f6c422f1a | ||
|
|
ad7e872471 | ||
|
|
a82d360478 | ||
|
|
bfe17c403d | ||
|
|
d234d4b968 | ||
|
|
edc5d1e500 | ||
|
|
ce62cf1bd3 | ||
|
|
eb7996a1df | ||
|
|
4d84eaa764 | ||
|
|
a5c943a9b4 | ||
|
|
6249feeba8 | ||
|
|
74222f7619 | ||
|
|
18d123ec85 | ||
|
|
2b6249f98c | ||
|
|
6884ff795d | ||
|
|
e54c429349 | ||
|
|
559555c77c | ||
|
|
b76525f29d | ||
|
|
a848d8b02b | ||
|
|
6f382f7324 | ||
|
|
5e9dbfad55 | ||
|
|
940ec37b9d | ||
|
|
fd72bdc343 | ||
|
|
5a75d400d9 | ||
|
|
03229a474f | ||
|
|
5b8a7240b0 | ||
|
|
7e168001e9 | ||
|
|
ca66dd1648 | ||
|
|
2200bd0564 | ||
|
|
9befab3af8 | ||
|
|
39d971818e | ||
|
|
e724268ea5 | ||
|
|
748de084cc | ||
|
|
7ca9560caf | ||
|
|
6c38ff8431 | ||
|
|
b6389794e2 | ||
|
|
29c8739e95 | ||
|
|
767a8b968e | ||
|
|
5db1ff6873 | ||
|
|
164e61fbb9 | ||
|
|
4a8560e2a0 | ||
|
|
d4439bcbf4 | ||
|
|
af37865370 | ||
|
|
3c26c805a7 | ||
|
|
a19f9253c4 | ||
|
|
510f7bfe87 | ||
|
|
283c81ccdd | ||
|
|
80206d9811 | ||
|
|
c696260961 | ||
|
|
dadffbebca | ||
|
|
2ea4083a64 | ||
|
|
a536063677 | ||
|
|
570e8c45fe | ||
|
|
37bbc4c47f | ||
|
|
5486771381 | ||
|
|
9ee956a2f7 | ||
|
|
15b923a271 | ||
|
|
6080be6701 | ||
|
|
3474b1e642 | ||
|
|
a96affa5e1 | ||
|
|
d85c0c81fa | ||
|
|
6978ba6736 | ||
|
|
753bb04a60 | ||
|
|
99bf17613b | ||
|
|
c7a1d7f58f | ||
|
|
b23214fca0 | ||
|
|
ce0f0e7e12 | ||
|
|
52b40984a2 | ||
|
|
eba70ec3a5 | ||
|
|
9d348b20ef | ||
|
|
34e8e6db03 | ||
|
|
b918fce9a6 | ||
|
|
02bdcf7646 | ||
|
|
cdcc745b6b | ||
|
|
33b79abe90 | ||
|
|
bac77ea3d9 | ||
|
|
b65a2d1877 | ||
|
|
6e5c26da04 | ||
|
|
ab4c1d5532 | ||
|
|
7678915a9e | ||
|
|
e5ee2e3aee | ||
|
|
902453fc35 | ||
|
|
545b6d7541 | ||
|
|
0fe8dc3290 | ||
|
|
44ce3e4b3c | ||
|
|
2aeeb5466e | ||
|
|
eb8c474088 | ||
|
|
290867cc4a | ||
|
|
4e2a62ff5e | ||
|
|
a1e22df67a | ||
|
|
703f6c0969 | ||
|
|
00489c764a | ||
|
|
6b33fa2fc6 | ||
|
|
01fb2d0ba8 | ||
|
|
d072c179a7 | ||
|
|
c77361418f | ||
|
|
ca407c08fa | ||
|
|
ffffb388a0 | ||
|
|
744750ded3 | ||
|
|
a879a0925f | ||
|
|
56a4c59e60 | ||
|
|
a1d54b2837 | ||
|
|
1882eec679 | ||
|
|
67bf6815c4 | ||
|
|
dc0221e601 | ||
|
|
ffceff850d | ||
|
|
af75d641d4 | ||
|
|
647eaf53a8 | ||
|
|
01eacf71cb | ||
|
|
cebf7f7371 | ||
|
|
a18abe21f7 | ||
|
|
ce7f59f2ff | ||
|
|
e289e5c881 | ||
|
|
a72662ed6b | ||
|
|
89eb405076 | ||
|
|
a6b74b8947 | ||
|
|
5a6436bf38 | ||
|
|
593a07614a | ||
|
|
d815f6dbb7 | ||
|
|
512de3938e | ||
|
|
66f8c36584 | ||
|
|
49d3f4be1a | ||
|
|
0dc6b951d8 | ||
|
|
665089a167 | ||
|
|
2afe4a1677 | ||
|
|
b645ebf086 | ||
|
|
99c8e3f461 | ||
|
|
81cae5ce24 | ||
|
|
dd2496d71e | ||
|
|
8a7ec6fa52 | ||
|
|
973f88bd7d | ||
|
|
27195acdb6 | ||
|
|
421c142235 | ||
|
|
8d7c1bb101 | ||
|
|
4afd8a87cd | ||
|
|
41fe641773 | ||
|
|
33c2d4da98 | ||
|
|
40d884ef95 | ||
|
|
99e738219b | ||
|
|
51e63eddf4 | ||
|
|
3f1725cd4a | ||
|
|
bde17523a9 | ||
|
|
fa6c1e3f51 | ||
|
|
b5e07cb9e8 | ||
|
|
2ee11887cd | ||
|
|
6d0fe4dba5 | ||
|
|
5a731510b2 | ||
|
|
d23970e52e | ||
|
|
4c7e003c1b | ||
|
|
4262ada1bd | ||
|
|
f4bb64378d | ||
|
|
d3ddaf1b29 | ||
|
|
16cec7b66e | ||
|
|
9d6d0e452b | ||
|
|
c16552eee5 | ||
|
|
e2003dea4b | ||
|
|
7f412c940d | ||
|
|
4b42154477 | ||
|
|
dc58af4acf | ||
|
|
58c37faa5c | ||
|
|
bec7e2c432 | ||
|
|
214d3ee739 | ||
|
|
a7d1d17be0 | ||
|
|
7039e40db2 | ||
|
|
c69f2e06ce | ||
|
|
48ed048feb | ||
|
|
abb32bb0ae | ||
|
|
5ad73398f4 | ||
|
|
e6b4ef7f1d | ||
|
|
a9a425d557 | ||
|
|
83df3a8165 | ||
|
|
9eea5b03dd | ||
|
|
b31006ba99 | ||
|
|
de19a1af57 | ||
|
|
3ba3282be5 | ||
|
|
0d051ba221 | ||
|
|
8020e5b1e3 | ||
|
|
074e29a651 | ||
|
|
5da70319a7 | ||
|
|
8ac1a9f278 | ||
|
|
6e78c788f0 | ||
|
|
35f99d5347 | ||
|
|
de1abda345 | ||
|
|
e6d1f21ea6 | ||
|
|
2223ca3c2d | ||
|
|
4605ddcc95 | ||
|
|
4dcdd8be06 | ||
|
|
67e6f0f233 | ||
|
|
8965df82d1 | ||
|
|
453257fa71 | ||
|
|
9e7746f4c0 | ||
|
|
7721a2148a | ||
|
|
64a1747ac5 | ||
|
|
2e53304940 | ||
|
|
299741bf33 | ||
|
|
a715ff5d80 | ||
|
|
e3dbc8d753 | ||
|
|
d8cfcf1a19 | ||
|
|
7fc37adff9 | ||
|
|
53ba358c4b | ||
|
|
f9114f866d | ||
|
|
846b65a50e | ||
|
|
6e8cd75ccf | ||
|
|
3a88e9055b | ||
|
|
10ff1d4404 | ||
|
|
fe02d6163d | ||
|
|
6088c6dba5 | ||
|
|
04c5110e59 | ||
|
|
555d569125 | ||
|
|
ff6434052f | ||
|
|
c230b93ee1 | ||
|
|
06f7295ae7 | ||
|
|
f35ad592ca | ||
|
|
8b213cb96f | ||
|
|
1cbf3518b8 | ||
|
|
7d04e0b63c | ||
|
|
fb10c254d8 | ||
|
|
003d4e0cbe | ||
|
|
b3e0a2f188 | ||
|
|
04bc254d7a | ||
|
|
6d9cf68838 | ||
|
|
442596279b | ||
|
|
04b4ee1245 | ||
|
|
848d68e2c7 | ||
|
|
1e1836f7ca | ||
|
|
4877e7ad84 | ||
|
|
15606fc8a9 | ||
|
|
fc3520c6fc | ||
|
|
0c788cabce | ||
|
|
a170c7e497 | ||
|
|
fff4a08af1 | ||
|
|
047ab72566 | ||
|
|
3ec40eb458 | ||
|
|
e2a70948d4 | ||
|
|
a905df79ad | ||
|
|
0ab9ebc469 | ||
|
|
807ad57ff1 | ||
|
|
2b45b199f8 | ||
|
|
ecbe7fb826 | ||
|
|
071b36fd90 | ||
|
|
d7313803f0 | ||
|
|
26ba37793c | ||
|
|
2f223b443c | ||
|
|
7758b0efd3 | ||
|
|
343d7d4065 | ||
|
|
f35cc0e4a0 | ||
|
|
86adc7266e | ||
|
|
57db2c8659 | ||
|
|
6d797a5b97 | ||
|
|
3d16018d2e | ||
|
|
6a4bcbb5d6 | ||
|
|
240330ca78 | ||
|
|
719c68fe2e | ||
|
|
34f5f485be | ||
|
|
dc70d62988 | ||
|
|
75dedb9944 | ||
|
|
45f4bb1290 | ||
|
|
dda6cbbb1c | ||
|
|
4c52326d70 | ||
|
|
2fd73898d2 | ||
|
|
4726bde475 | ||
|
|
a44fd51a81 | ||
|
|
35e9b38dd8 | ||
|
|
a2e113a2db | ||
|
|
767aa7bf70 | ||
|
|
9234b6f7e0 | ||
|
|
77bc22f77a | ||
|
|
646e37ff59 | ||
|
|
bf7c8ba557 | ||
|
|
59f339c1f8 | ||
|
|
2309be536f | ||
|
|
14c7cfea4c | ||
|
|
6f809229ef | ||
|
|
f09cbdc4b4 | ||
|
|
ef159d5cdb | ||
|
|
58e6f3d386 | ||
|
|
39237a241f | ||
|
|
8ba0cddae4 | ||
|
|
13221a5a13 | ||
|
|
3351c8aada | ||
|
|
19548deac9 | ||
|
|
ff43f6b441 | ||
|
|
1d51d96e1e | ||
|
|
140f272a56 | ||
|
|
9da59fff0d | ||
|
|
06b1f74288 | ||
|
|
dbb90872ee | ||
|
|
cb8155615a | ||
|
|
b29576f01f | ||
|
|
d404816448 | ||
|
|
02d8535f9e | ||
|
|
dfe88896b5 | ||
|
|
0f19d3650b | ||
|
|
10c95a54b5 | ||
|
|
f849e0aaac | ||
|
|
7e6aff288f | ||
|
|
c5b3b8e2b6 | ||
|
|
e20a6cfb82 | ||
|
|
bae1890d5b | ||
|
|
b2816db207 | ||
|
|
2e6f8bf01e | ||
|
|
a3eb51b0e2 | ||
|
|
6d3ea70cf7 | ||
|
|
b965b62436 | ||
|
|
8bd3e55a54 | ||
|
|
cb93da5115 | ||
|
|
9897e1994c | ||
|
|
52fc0276d7 | ||
|
|
ce73721712 | ||
|
|
0f6d0c6016 | ||
|
|
a4b18d8961 | ||
|
|
fb205872c1 | ||
|
|
a4ff1d036d | ||
|
|
26693888de | ||
|
|
63a8743830 | ||
|
|
2ef6aec8ce | ||
|
|
d38d008a1d | ||
|
|
09184490e9 | ||
|
|
c27d78e6e0 | ||
|
|
3b96dac1d7 | ||
|
|
c96356eba9 | ||
|
|
1d478cbd05 | ||
|
|
10d0bbfbc7 | ||
|
|
76c7142a55 | ||
|
|
e913eebe7c | ||
|
|
79278d0cad | ||
|
|
8af3bb0443 | ||
|
|
e8b70f2823 | ||
|
|
79e4cbd57a | ||
|
|
0057fa16a4 | ||
|
|
924d623ac8 | ||
|
|
636fceb22a | ||
|
|
ab0ab21b2e | ||
|
|
625d533476 | ||
|
|
2eef2b57dd | ||
|
|
faa8bced59 | ||
|
|
d2be1268c4 | ||
|
|
c75c72a9fc | ||
|
|
fc1018de0e | ||
|
|
7ec9be427c | ||
|
|
5e15547dad | ||
|
|
e9f9963e6b | ||
|
|
ad9071c4ba | ||
|
|
0ef5b0241e | ||
|
|
ef71f8a52d | ||
|
|
4c9753bdf7 | ||
|
|
e8e002ad91 | ||
|
|
36efe03850 | ||
|
|
37877a3b9c | ||
|
|
81c4b1fcff | ||
|
|
516c58c84c | ||
|
|
f930c9ca0e | ||
|
|
8e1915ff14 | ||
|
|
710a1bc347 | ||
|
|
c55ed2c0a9 | ||
|
|
f08e272c8b | ||
|
|
c2e4117240 | ||
|
|
90e0ba933e | ||
|
|
b2615f2b7f | ||
|
|
ae6d164b7a | ||
|
|
0e7a38dbbe | ||
|
|
1be69adaeb | ||
|
|
925390f0bf | ||
|
|
92255513cd | ||
|
|
42e9ac45ff | ||
|
|
eaa373aeb6 | ||
|
|
cea518eba5 | ||
|
|
fdadb32d0a | ||
|
|
b2cb94b93c | ||
|
|
c09bf755a6 | ||
|
|
137f240e4a | ||
|
|
59d5765b0f | ||
|
|
0ded127f4c | ||
|
|
205cfe4695 | ||
|
|
24f18f089d | ||
|
|
61dd314ba4 | ||
|
|
24a893ff63 | ||
|
|
ef0776dddd | ||
|
|
6095c9a3f8 | ||
|
|
ebc0c4c72f | ||
|
|
65e6baf5a9 | ||
|
|
072ec8dc77 | ||
|
|
ef8e614b04 | ||
|
|
d51a8422a2 | ||
|
|
7b53d3d127 | ||
|
|
36d90a4f13 | ||
|
|
09d4a8f165 | ||
|
|
c7475ee11e | ||
|
|
2431a66944 | ||
|
|
b016bc2d4f | ||
|
|
bdd9db581f | ||
|
|
29fbbc05c9 | ||
|
|
2a061153f6 | ||
|
|
8bbc4ca7ec | ||
|
|
56130b3231 | ||
|
|
5a40d9ead2 | ||
|
|
13d897efcf | ||
|
|
0c4c742189 | ||
|
|
9d64f63aaa | ||
|
|
d7984a3fdb | ||
|
|
17d3a3e28c | ||
|
|
20ee294371 | ||
|
|
6e40a95415 | ||
|
|
24ad720079 | ||
|
|
bb3842917c | ||
|
|
9c46845348 | ||
|
|
2cc5a65c0f | ||
|
|
15bef4ddb6 | ||
|
|
5ce88fe525 | ||
|
|
676991e630 | ||
|
|
f3959d84d3 | ||
|
|
86459445f9 | ||
|
|
ad0f322065 | ||
|
|
735b546108 | ||
|
|
94650aa4ba | ||
|
|
786fcaf4a2 | ||
|
|
eae0819e3d | ||
|
|
550a02c909 | ||
|
|
1e2a59b68a | ||
|
|
7fb3529376 | ||
|
|
3a898d66ba | ||
|
|
699c46f88b | ||
|
|
5565903d7c | ||
|
|
c14da32ec4 | ||
|
|
db37e581bc | ||
|
|
75bb9f0a2a | ||
|
|
89e4bfabcd | ||
|
|
57b792bb8a | ||
|
|
625cb88756 | ||
|
|
01084fbd8d | ||
|
|
219be37b93 | ||
|
|
3be197ed19 | ||
|
|
2bac14f45a | ||
|
|
ed05aed044 | ||
|
|
02be728995 | ||
|
|
cb75a8c02d | ||
|
|
f7978a042c | ||
|
|
6980e29da9 | ||
|
|
79d4ae4bf8 | ||
|
|
03d0ba4c06 | ||
|
|
b41ca51fc6 | ||
|
|
8e6c9373c1 | ||
|
|
dbaf821f82 | ||
|
|
b8b5ed3d52 | ||
|
|
8075fc59b5 | ||
|
|
d22026207c | ||
|
|
b5d5f6fffd | ||
|
|
e464e1da1c | ||
|
|
ec4ea625c9 | ||
|
|
38fa93be81 | ||
|
|
a1319f687c | ||
|
|
059c9672ff | ||
|
|
8a2075ba7d | ||
|
|
a6050a7291 | ||
|
|
d1cf325739 | ||
|
|
6cc8245afb | ||
|
|
93066fab51 | ||
|
|
daeef68961 | ||
|
|
c5e9725e5b | ||
|
|
e94bd40348 | ||
|
|
6576e27321 | ||
|
|
d29bfd529e | ||
|
|
e758541f7e | ||
|
|
0cf2e85eda | ||
|
|
de9a50b611 | ||
|
|
b6dd48b361 | ||
|
|
184edc32ab | ||
|
|
0199003cf9 | ||
|
|
bbd396f52f | ||
|
|
2a15b5cbc4 | ||
|
|
2dbf41d0d0 | ||
|
|
c80374e8e8 | ||
|
|
e53320438b | ||
|
|
1bb22e3075 | ||
|
|
fc7d0fef5f | ||
|
|
b2861672f1 | ||
|
|
9cd1ed4307 | ||
|
|
8a054458d4 | ||
|
|
570703fb5e | ||
|
|
0b79c81d9d | ||
|
|
6acdf37888 | ||
|
|
1391eaea5d | ||
|
|
d3de1d0186 | ||
|
|
a15c26266f | ||
|
|
c32c344dd6 | ||
|
|
e305ef0fa8 | ||
|
|
f1014ac7cc | ||
|
|
8fd6feded9 | ||
|
|
c175e3f6c8 | ||
|
|
73f2d11007 | ||
|
|
f2bb69ebb0 | ||
|
|
0129239343 | ||
|
|
92d76e1e92 | ||
|
|
dc2f3bc5e4 | ||
|
|
1a35394a57 | ||
|
|
2b5e6e4835 | ||
|
|
306c8e8b4f | ||
|
|
3cc80a4390 | ||
|
|
ff015c529a | ||
|
|
ebf16be3ea | ||
|
|
4061c49579 | ||
|
|
d01146b817 | ||
|
|
d0ae660607 | ||
|
|
5aaccdf6a7 | ||
|
|
dc3a2321e0 | ||
|
|
3f094fd26b | ||
|
|
e86cf7f5e6 | ||
|
|
ad9fd82850 | ||
|
|
da5debc995 | ||
|
|
9f79f8d7e0 | ||
|
|
56931437e3 | ||
|
|
5051a33ba6 | ||
|
|
8d851e17c0 | ||
|
|
1df5e317dc | ||
|
|
950d7008ea | ||
|
|
8a2d561e45 | ||
|
|
ccf99a6d4c | ||
|
|
78ec76159b | ||
|
|
28ea23054e | ||
|
|
cea6ca618e | ||
|
|
a9ecff59e4 | ||
|
|
b1f44ffb39 | ||
|
|
2e0e925d3b | ||
|
|
6f0db0ac6e | ||
|
|
aef17cff0f | ||
|
|
92cad6a4e5 | ||
|
|
5bd81eab0f | ||
|
|
598064934e | ||
|
|
c75c37dc2b | ||
|
|
67492390d4 | ||
|
|
480aa4b7c1 | ||
|
|
9a9958dafc | ||
|
|
2262fbb298 | ||
|
|
a36a4fdedc | ||
|
|
57d75ea4d8 | ||
|
|
7880914895 | ||
|
|
b214c8214c | ||
|
|
68f054be8f | ||
|
|
d9feb76a02 | ||
|
|
872325a656 | ||
|
|
d133be1fc3 | ||
|
|
ad02a0f47d | ||
|
|
f7d204bce4 | ||
|
|
2b38bcb26a | ||
|
|
6d89182e28 | ||
|
|
30215a98cc | ||
|
|
c8088a6184 | ||
|
|
82395d065e | ||
|
|
5120cb1bc9 | ||
|
|
e407204f28 | ||
|
|
af3fa53348 | ||
|
|
4fc8280fa6 | ||
|
|
9e92d099ce | ||
|
|
7c3982f666 | ||
|
|
b6e520d478 | ||
|
|
2c41df8b40 | ||
|
|
86168539c7 | ||
|
|
d849f68245 | ||
|
|
91990a324b | ||
|
|
ac829d6935 | ||
|
|
d1a60cddfe | ||
|
|
8d8acf4b3c | ||
|
|
fadc4d4786 | ||
|
|
9eb27b5fad | ||
|
|
b1e1f83089 | ||
|
|
ad935391c2 | ||
|
|
5f057a69d6 | ||
|
|
d635ea46cb | ||
|
|
51816f9adb | ||
|
|
50bc2a4286 | ||
|
|
7f01432879 | ||
|
|
d11a1de3ed | ||
|
|
c6590a2f61 | ||
|
|
f5da3f584b | ||
|
|
5771d0193b | ||
|
|
f52a204a4e | ||
|
|
21126e288b | ||
|
|
d1aa15101c | ||
|
|
92c4ad70ea | ||
|
|
1247f879f9 | ||
|
|
b46ec3cd33 | ||
|
|
f0ea374271 | ||
|
|
72af85a647 | ||
|
|
aa77b79b4b | ||
|
|
f36cf8b4d8 | ||
|
|
a8a0842148 | ||
|
|
8c3b497f01 | ||
|
|
61d6d975af | ||
|
|
b5422e71f7 | ||
|
|
c20f3cd330 | ||
|
|
a88ba0dd94 | ||
|
|
81c7cd4c29 | ||
|
|
f79efa913c | ||
|
|
8b861292c6 | ||
|
|
39f54be321 | ||
|
|
9bfbfd3b8a | ||
|
|
fff7466c36 | ||
|
|
bd2fa30652 | ||
|
|
fffcc47efc | ||
|
|
302c89b285 | ||
|
|
3dd09fbf17 | ||
|
|
baa4aff633 | ||
|
|
aa3694f1ff | ||
|
|
9211474a6e | ||
|
|
ca76cd842a | ||
|
|
6879364228 | ||
|
|
0a2845a592 | ||
|
|
d4e06e8c46 | ||
|
|
61789dd7d5 | ||
|
|
df92958bed | ||
|
|
c559453c89 | ||
|
|
65ab259cdb | ||
|
|
563ff6778d | ||
|
|
eae700da7d | ||
|
|
dc3bf580fc | ||
|
|
d2ed2e78cf | ||
|
|
c799d7b979 | ||
|
|
73c74c33e6 | ||
|
|
c1635e0379 | ||
|
|
2486f9acdf | ||
|
|
af1a8f76a6 | ||
|
|
1c1565ff39 | ||
|
|
c3d98f8640 | ||
|
|
cf504308fe | ||
|
|
3677890d37 | ||
|
|
2af2bec9b2 | ||
|
|
30f0e39058 | ||
|
|
fc1e984e89 | ||
|
|
24c61a8949 | ||
|
|
b3354081ac | ||
|
|
aedb44867d | ||
|
|
65a82e4c26 | ||
|
|
28571ed121 | ||
|
|
3a0036e766 | ||
|
|
fa0309e396 | ||
|
|
4f3c16b4f5 | ||
|
|
16b01fbdc7 | ||
|
|
cd0be06ed2 | ||
|
|
48f998c0e8 | ||
|
|
f3a82e33ac | ||
|
|
14867399cd | ||
|
|
948cbc01ff | ||
|
|
29dade1a06 | ||
|
|
814ef75488 | ||
|
|
17202b905d | ||
|
|
0a35becaf5 | ||
|
|
21eba648bd | ||
|
|
c880cde6a9 | ||
|
|
3afb09ac80 | ||
|
|
1595f15531 | ||
|
|
a6921b13ef | ||
|
|
ae5a552bf1 | ||
|
|
0d4eeae035 | ||
|
|
c4f4cfbf11 | ||
|
|
8cef936d37 | ||
|
|
583ce8b6c9 | ||
|
|
f369403dc6 | ||
|
|
3a82fa109f | ||
|
|
57d9a3625b | ||
|
|
3f81b8e189 | ||
|
|
d06faa245b | ||
|
|
29544710c6 | ||
|
|
7c38cd6901 | ||
|
|
9419e88fc4 | ||
|
|
2c929257dc | ||
|
|
28efd24883 | ||
|
|
bb09da15fe | ||
|
|
db8d2fe339 | ||
|
|
b3183656ef | ||
|
|
aa0c7901a4 | ||
|
|
ef8f6fe459 | ||
|
|
c3aafd6932 | ||
|
|
b0a1aa04ba | ||
|
|
e304471a9e | ||
|
|
405638ebb0 | ||
|
|
2020df6702 | ||
|
|
c4836a7811 | ||
|
|
47c5a14bad | ||
|
|
f6ac75fd2c | ||
|
|
c76a2ddf15 | ||
|
|
337e4b174d | ||
|
|
246e147a6a | ||
|
|
e566848d2a | ||
|
|
da1695cee6 | ||
|
|
2fd63693cc | ||
|
|
244554ca1a | ||
|
|
22b03a6110 | ||
|
|
d726c5ad5f | ||
|
|
c5fcc8e462 | ||
|
|
256f19b8db | ||
|
|
e4dfd95e1f | ||
|
|
846263ddff | ||
|
|
b9d1d9e98e | ||
|
|
3c3e5c4a31 | ||
|
|
e2497bb4fd | ||
|
|
7a5c83d8d5 | ||
|
|
808b51dfba | ||
|
|
baea296b94 | ||
|
|
07b422cb2a | ||
|
|
558fd59769 | ||
|
|
dea4262fa6 | ||
|
|
17e6a0e4bb | ||
|
|
9f1c3a0e22 | ||
|
|
a9e1eeab54 | ||
|
|
b39517e205 | ||
|
|
920077edd1 | ||
|
|
e2f0548110 | ||
|
|
a25f0cdb7e | ||
|
|
5fe8296d4a | ||
|
|
853b15e627 | ||
|
|
f5d3da342d | ||
|
|
8f5e4ea244 | ||
|
|
06b02f10be | ||
|
|
e616c17722 | ||
|
|
3bde76131b | ||
|
|
5a3e8f271b | ||
|
|
e5106171da | ||
|
|
e56702cfd6 | ||
|
|
20075bd5d4 | ||
|
|
11af8c2887 | ||
|
|
4e9fd57633 | ||
|
|
db2557052c | ||
|
|
97943b2180 | ||
|
|
69e796de6c | ||
|
|
2a7a905dfc | ||
|
|
81b59e0ba3 | ||
|
|
419dd76de0 | ||
|
|
04c4d4dc87 | ||
|
|
9f96885c83 | ||
|
|
7da31a15bb | ||
|
|
d7f4b25511 | ||
|
|
99c885f123 | ||
|
|
fba433574b | ||
|
|
d678a9231c | ||
|
|
d936975f34 | ||
|
|
4656d21181 | ||
|
|
b11f94d927 | ||
|
|
f57432bb1d | ||
|
|
3612fcbdb2 | ||
|
|
60a7806d6e | ||
|
|
e3fe486f9f | ||
|
|
0142f9ed84 | ||
|
|
63d4f2d50b | ||
|
|
6a8f12175a | ||
|
|
687ed33f94 | ||
|
|
39ae860d5b | ||
|
|
8f0c48cf2f | ||
|
|
a5d6352ca2 | ||
|
|
1f8d1e1a94 | ||
|
|
0d9dce8362 | ||
|
|
69e2127485 | ||
|
|
12756a214f | ||
|
|
7ca2112fce | ||
|
|
b9bf7eada4 | ||
|
|
0692039ada | ||
|
|
edd622d994 | ||
|
|
c53546aa7e | ||
|
|
c58e076233 | ||
|
|
20f7083676 | ||
|
|
ebf1beaf96 | ||
|
|
42eb22a775 | ||
|
|
68d442ddaf | ||
|
|
5e8ee3161d | ||
|
|
3f570570fd | ||
|
|
4228c4b860 | ||
|
|
1b34d3edee | ||
|
|
94fcdc55eb | ||
|
|
09eb7ebbca | ||
|
|
91564c12b0 | ||
|
|
a261a6aa62 | ||
|
|
59ad795300 | ||
|
|
3b118bfa86 | ||
|
|
9c5a25e176 | ||
|
|
525a872b3f | ||
|
|
908d3853ac | ||
|
|
2377fcd9a3 | ||
|
|
5e55fec6e9 | ||
|
|
28d582acd9 | ||
|
|
2b345f4a8d | ||
|
|
49a3c7a82d | ||
|
|
2202d97525 | ||
|
|
83dcec4e43 | ||
|
|
ad61fd4133 | ||
|
|
9644fae0fd | ||
|
|
36dd24da90 | ||
|
|
b79eab3aa6 | ||
|
|
c7f3f0fba9 | ||
|
|
0bca413339 | ||
|
|
a714e6b4e5 | ||
|
|
246ae48193 | ||
|
|
96cb172817 | ||
|
|
59c60442f3 | ||
|
|
7408ba7d77 | ||
|
|
8b7fb356cb | ||
|
|
b164e8fd95 | ||
|
|
8481ec72a8 | ||
|
|
90e921d334 | ||
|
|
f033fef4ce | ||
|
|
7513e6d4f4 | ||
|
|
361dda3c20 | ||
|
|
44cfebcac7 | ||
|
|
e2ae699ef5 | ||
|
|
b2b2d44f20 | ||
|
|
76272609c2 | ||
|
|
ebce0d1dec | ||
|
|
21d2ed30b3 | ||
|
|
7592628e48 | ||
|
|
9fff44980c | ||
|
|
5de5f30d9b | ||
|
|
aa21da0560 | ||
|
|
c1e20b738a | ||
|
|
981a7966e7 | ||
|
|
cc98f8a745 | ||
|
|
815c5a7a31 | ||
|
|
5c7becf8ca | ||
|
|
b7bdf635da | ||
|
|
1e6f7000ac | ||
|
|
e1ce35d51f | ||
|
|
12549a6db8 | ||
|
|
3741aa834b | ||
|
|
e98b44e829 | ||
|
|
9cb0d2f448 | ||
|
|
8232744d27 | ||
|
|
a5e2a85f07 | ||
|
|
1183723f25 | ||
|
|
014c8f4a02 | ||
|
|
b042392540 | ||
|
|
7823d1aaed | ||
|
|
f676dbef22 | ||
|
|
0798f9740f | ||
|
|
80cb677ce9 | ||
|
|
18a3d6a8aa | ||
|
|
9e2f2e9f31 | ||
|
|
98ca17881b | ||
|
|
d4e24746dc | ||
|
|
65cbf7d1fd | ||
|
|
edcef60550 | ||
|
|
3e7513f731 | ||
|
|
2efda64d38 | ||
|
|
e34b2d9108 | ||
|
|
bc4fb9c6f0 | ||
|
|
a4376b2603 | ||
|
|
28bcd77302 | ||
|
|
6793260cdd | ||
|
|
d614857d03 | ||
|
|
8abf13fa94 | ||
|
|
154e260c9d | ||
|
|
1b7ac91429 | ||
|
|
bbc05d986e | ||
|
|
21b915db0f | ||
|
|
c2fbf52745 | ||
|
|
5c754a018b | ||
|
|
821811d87f | ||
|
|
57eace9a0f | ||
|
|
afd24a90a3 | ||
|
|
395fbc0389 | ||
|
|
19d1db4624 | ||
|
|
f54a032ad1 | ||
|
|
213d9a655f | ||
|
|
71447df741 | ||
|
|
e44fbb95ea | ||
|
|
5ec71c5990 | ||
|
|
f1587760e9 | ||
|
|
78c4877776 | ||
|
|
55a1f9d86b | ||
|
|
a759b38acf | ||
|
|
04a5f2605f | ||
|
|
7278cc2e51 | ||
|
|
4166236b53 | ||
|
|
1f6bad2b30 | ||
|
|
3c25a62eb8 | ||
|
|
5e2bb11618 | ||
|
|
44dc43bb3d | ||
|
|
bf76cb368c | ||
|
|
c578654cad | ||
|
|
bf3a5672fb | ||
|
|
f87b5cab0c | ||
|
|
33f9d106bc | ||
|
|
793fbbc7f2 | ||
|
|
20c2cd43a9 | ||
|
|
546f26cbb3 | ||
|
|
a00579f70b | ||
|
|
61d5f094fd | ||
|
|
3e04fcdbb5 | ||
|
|
31cb36e88f | ||
|
|
06506ceb4f | ||
|
|
2c1c1dc64e | ||
|
|
7db90444af | ||
|
|
92747bfbc9 | ||
|
|
467a80a588 | ||
|
|
2d34812b74 | ||
|
|
874d77f17f | ||
|
|
662fff7861 | ||
|
|
2852c1c0a1 | ||
|
|
bae9a65da4 | ||
|
|
a08c6469be | ||
|
|
c99c6c304a | ||
|
|
6cf1df86a5 | ||
|
|
b2d18ac8f5 | ||
|
|
1c3fa0f99e | ||
|
|
5d9ed2d7bc | ||
|
|
97d18a1d85 | ||
|
|
7e37a5e5e1 | ||
|
|
d283021a71 | ||
|
|
0e4a77847a | ||
|
|
bc3afd9b46 | ||
|
|
fb92d24736 | ||
|
|
c00f96b198 | ||
|
|
7a50bc0dff | ||
|
|
31a6a88517 | ||
|
|
78ebc8e8d5 | ||
|
|
e053850b61 | ||
|
|
aa247b62b3 | ||
|
|
c31e5c3ca5 | ||
|
|
3da062869b | ||
|
|
f8053809f8 | ||
|
|
ef95b3233e | ||
|
|
437d89a151 | ||
|
|
2b1c83e4e2 | ||
|
|
e4407b754b | ||
|
|
f2c93707b4 | ||
|
|
5713380d80 | ||
|
|
ff9ea9b139 | ||
|
|
026c2017b1 | ||
|
|
64eb355c76 | ||
|
|
023877ac27 | ||
|
|
cc6668c3e7 | ||
|
|
ecf261bb6e | ||
|
|
3de8f89388 | ||
|
|
1495a99781 | ||
|
|
80e8506f75 | ||
|
|
bb1f5171c4 | ||
|
|
5883167774 | ||
|
|
2d1ec93821 | ||
|
|
012945ff54 | ||
|
|
0199f37303 | ||
|
|
8ecf5f402d | ||
|
|
81e204a3e7 | ||
|
|
ccfd76fbc8 | ||
|
|
0957ccf367 | ||
|
|
3ca688d69a | ||
|
|
885956355c | ||
|
|
e6345ecb09 | ||
|
|
758e7f409f | ||
|
|
945532de66 | ||
|
|
54bf872aab | ||
|
|
ee6911b745 | ||
|
|
c5c6647f22 | ||
|
|
72d40f6724 | ||
|
|
99f7bd761f | ||
|
|
325addae1d | ||
|
|
4e69204179 | ||
|
|
c7b097f904 | ||
|
|
8723a1eaae | ||
|
|
fe680fd860 | ||
|
|
2bd66cf7fc | ||
|
|
8e7e29d1de | ||
|
|
96efa91b23 | ||
|
|
ea2703dd8c | ||
|
|
009e3b99cf | ||
|
|
10b3363e2e | ||
|
|
c8aa23a9cc | ||
|
|
8a755a3d27 | ||
|
|
36a16de45c | ||
|
|
6e2ffd49b1 | ||
|
|
2abefb14eb | ||
|
|
e2c1c2e529 | ||
|
|
067c2ea921 | ||
|
|
e91fe759ec | ||
|
|
37d0d50168 | ||
|
|
6f46b8dd99 | ||
|
|
1f2f9be7f8 | ||
|
|
96400fcda4 | ||
|
|
4ff8979277 | ||
|
|
3e9354e7f7 | ||
|
|
42e25937cf | ||
|
|
1701230f32 | ||
|
|
68bd369ece | ||
|
|
358a274042 | ||
|
|
2f8c0a3131 | ||
|
|
9b0e6e4b56 | ||
|
|
2302cc643b | ||
|
|
f29617e3fe | ||
|
|
485d699baf | ||
|
|
a5bda3260c | ||
|
|
b5b50f46ea | ||
|
|
0037e217df | ||
|
|
2bea3939c6 | ||
|
|
65562d99c3 | ||
|
|
f199c753eb | ||
|
|
af0225072d | ||
|
|
d85702e334 | ||
|
|
b4012f613a | ||
|
|
bc3a5c4e5f | ||
|
|
fe734b9b2d | ||
|
|
d298aab8a2 | ||
|
|
87ca587534 | ||
|
|
aafbc6e7fc | ||
|
|
8efbf4f961 | ||
|
|
9e19c0c5cd | ||
|
|
9b2c2ebb79 | ||
|
|
9f9d6f6c31 | ||
|
|
e73a9ed54d | ||
|
|
84f8fd1af6 | ||
|
|
15e112e97b | ||
|
|
37d93402d2 | ||
|
|
b00199bd9b | ||
|
|
98ad587709 | ||
|
|
5d1f26b8e5 | ||
|
|
dd3d3d7226 | ||
|
|
fe42846981 | ||
|
|
a907e0806e | ||
|
|
4705104cfa | ||
|
|
706fae60a3 | ||
|
|
9aec59b45a | ||
|
|
3fcb933b8c | ||
|
|
50c1199e09 | ||
|
|
5ce160d64c | ||
|
|
30c0861e98 | ||
|
|
6d5707dfa6 | ||
|
|
fca9e007c6 | ||
|
|
75ecfa15f1 | ||
|
|
e3cc4f6bc8 | ||
|
|
d851ca7056 | ||
|
|
4471d9eb05 | ||
|
|
39b517459f | ||
|
|
d4eb26affa | ||
|
|
fc9f72abca | ||
|
|
cec759ed61 | ||
|
|
9d4fa35a77 | ||
|
|
66be6a1689 | ||
|
|
aaa4c7445b | ||
|
|
4d18918a3a | ||
|
|
26802588fa | ||
|
|
d8a4f42f8c | ||
|
|
638f87f1bd | ||
|
|
521f68c0a5 | ||
|
|
c672e2892b | ||
|
|
27d553aad2 | ||
|
|
d04627589e | ||
|
|
9782cef803 | ||
|
|
88429654db | ||
|
|
b9ca7077bb | ||
|
|
f5bf6fe980 | ||
|
|
9db9190cd4 | ||
|
|
df5fb23be1 | ||
|
|
9b9c6a8565 | ||
|
|
51a3adcefa | ||
|
|
d1772031ee | ||
|
|
309253682d | ||
|
|
b34d965da0 | ||
|
|
b9676dd73d | ||
|
|
de9ef8a7a7 | ||
|
|
3c20276087 | ||
|
|
174e9df9c1 | ||
|
|
8d83abaf89 | ||
|
|
82a83f3743 | ||
|
|
0b6b9b5195 | ||
|
|
ae3295706e | ||
|
|
79a8c33f6d | ||
|
|
44dcbba28a | ||
|
|
f0ed17134a | ||
|
|
1cc94659ad | ||
|
|
4ee49675d3 | ||
|
|
2fcddf2514 | ||
|
|
450dbb37c2 | ||
|
|
42ee53e9ba | ||
|
|
2a9c589d4d | ||
|
|
4efee8b478 | ||
|
|
6e5e7b7179 | ||
|
|
a580a5e647 | ||
|
|
d63b8caa5c | ||
|
|
2fae9e5d26 | ||
|
|
9be58099c4 | ||
|
|
49db4dd32c | ||
|
|
c6be028a84 | ||
|
|
e92b78f873 | ||
|
|
83c58cadbc | ||
|
|
c3d224580c | ||
|
|
894cb43a58 | ||
|
|
d063f15ca1 | ||
|
|
7e03c96656 | ||
|
|
ae66a6b2b0 | ||
|
|
686562b5a7 | ||
|
|
b094fe9daa | ||
|
|
16a1aff95a | ||
|
|
7f892add00 | ||
|
|
a9f5b7cff2 | ||
|
|
6b1cbebf24 | ||
|
|
fc0b04b093 | ||
|
|
8471372f24 | ||
|
|
80f17f22f2 | ||
|
|
098bfeea80 | ||
|
|
0ef9bacdc7 | ||
|
|
879adb17cc | ||
|
|
92c8fc20fb | ||
|
|
47a2e7569c | ||
|
|
d5654c49bd | ||
|
|
a6a92722ff | ||
|
|
f5a1b61888 | ||
|
|
24d1484e1c | ||
|
|
efc6e85c74 | ||
|
|
a988aefd03 | ||
|
|
a49772f23b | ||
|
|
ea1f6ec04b | ||
|
|
0b072ba82c | ||
|
|
0928d79889 | ||
|
|
6994cb9650 | ||
|
|
5b34b167f9 | ||
|
|
923091ff96 | ||
|
|
26061de96f | ||
|
|
102ad5c8ff | ||
|
|
bb0d2464f8 | ||
|
|
2de5b90948 | ||
|
|
d85b445409 | ||
|
|
707c2dc263 | ||
|
|
7f8213c31e | ||
|
|
e1958d172e | ||
|
|
7f0947ae50 | ||
|
|
dcfb371a6b | ||
|
|
acca325884 | ||
|
|
3e729d218d | ||
|
|
56117f587b | ||
|
|
568ec722bb | ||
|
|
a95d10ec54 | ||
|
|
8f730b8a46 | ||
|
|
2f8490672b | ||
|
|
99fbca4eba | ||
|
|
f05581b361 | ||
|
|
5444831241 | ||
|
|
1e40feefae | ||
|
|
f3ac2e7839 | ||
|
|
01f0361e79 | ||
|
|
33c85ae850 | ||
|
|
db5fd4aaae | ||
|
|
f4df046ab6 | ||
|
|
93da1d6e5b | ||
|
|
3e947ade15 | ||
|
|
800c8d7882 | ||
|
|
7afc9d1829 | ||
|
|
15295aaf8a | ||
|
|
4542868aea | ||
|
|
3287aaae94 | ||
|
|
86eb6a1aac | ||
|
|
4a2b55cc60 | ||
|
|
73711e47bb | ||
|
|
e03be48b10 | ||
|
|
b8efd17fe8 | ||
|
|
d7b3fa5629 | ||
|
|
8572927454 | ||
|
|
b3fca9f7f6 | ||
|
|
3a0a028c8c | ||
|
|
0c3fd30903 | ||
|
|
52f3031b24 | ||
|
|
b3463e39bd | ||
|
|
a34483b143 | ||
|
|
afa12bc912 | ||
|
|
c0f45e1e43 | ||
|
|
7c8e0d8c97 | ||
|
|
b0b791399d | ||
|
|
6dd490fa03 | ||
|
|
dec4961f11 | ||
|
|
ff927371bd | ||
|
|
0dc8754559 | ||
|
|
fb66999103 | ||
|
|
97b434be77 | ||
|
|
51cd0868f5 | ||
|
|
65d5eb615d | ||
|
|
0bb8253d33 | ||
|
|
b0c1bd7cb5 | ||
|
|
2fe074017c | ||
|
|
e91b426d5a | ||
|
|
f05548e77b | ||
|
|
df4c89a556 | ||
|
|
2c9dc1f509 | ||
|
|
b7d1e33e4a | ||
|
|
0d1ddb59de | ||
|
|
022e60027b | ||
|
|
2bb262fd64 | ||
|
|
225d614f6f | ||
|
|
8087128c07 | ||
|
|
3cfa2e263a | ||
|
|
a927d9b0ae | ||
|
|
0099b7b26e | ||
|
|
9e1b4e382a | ||
|
|
a62884b9bb | ||
|
|
79d3f45d37 | ||
|
|
31f6ab878e | ||
|
|
8fade926f8 | ||
|
|
7fa1528c0f | ||
|
|
5073e90886 |
6
.cvsignore
Normal file
6
.cvsignore
Normal file
@@ -0,0 +1,6 @@
|
||||
Makefile
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
stamp-h1
|
||||
autom4te.cache
|
||||
1
.prev-version
Normal file
1
.prev-version
Normal file
@@ -0,0 +1 @@
|
||||
0.0.0
|
||||
350
ABOUT-NLS
350
ABOUT-NLS
@@ -113,6 +113,13 @@ But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
The locale naming convention of `LL_CC', with `LL' denoting the
|
||||
language and `CC' denoting the country, is the one use on systems based
|
||||
on GNU libc. On other systems, some variations of this scheme are
|
||||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
|
||||
locales supported by your system for your country by running the command
|
||||
`locale -a | grep '^LL''.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
@@ -164,128 +171,229 @@ Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of September
|
||||
2001. The matrix shows, in regard of each package, for which languages
|
||||
matrix shows the current state of internationalization, as of July
|
||||
2002. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja
|
||||
+----------------------------------------------------+
|
||||
a2ps | [] [] [] |
|
||||
bash | [] [] [] [] |
|
||||
bfd | |
|
||||
binutils | [] |
|
||||
bison | [] [] [] [] [] |
|
||||
clisp | [] [] [] [] |
|
||||
cpio | [] [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] |
|
||||
fetchmail | |
|
||||
fileutils | [] [] [] [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] [] |
|
||||
flex | [] [] [] |
|
||||
freetype | |
|
||||
gas | |
|
||||
gawk | [] [] |
|
||||
gcal | |
|
||||
gcc | |
|
||||
gettext | [] [] [] [] [] [] [] [] [] [] |
|
||||
gnupg | [] [] [] [] [] [] [] |
|
||||
gprof | |
|
||||
grep | [] [] [] [] [] [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
indent | [] [] [] [] [] |
|
||||
jpilot | [] |
|
||||
kbd | |
|
||||
ld | [] |
|
||||
libc | [] [] [] [] [] [] [] [] |
|
||||
lilypond | [] |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] [] [] [] [] |
|
||||
make | [] [] [] [] [] [] |
|
||||
mysecretdiary | [] |
|
||||
nano | [] [] [] |
|
||||
opcodes | |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] [] [] |
|
||||
sketch | |
|
||||
soundtracker | [] [] [] |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] [] [] |
|
||||
textutils | [] [] [] [] [] [] [] [] |
|
||||
util-linux | [] [] |
|
||||
wdiff | [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] [] [] [] |
|
||||
+----------------------------------------------------+
|
||||
bg cs da de el en eo es et fi fr gl he hr id it ja
|
||||
0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18
|
||||
Ready PO files be bg ca cs da de el en eo es et fi fr
|
||||
+----------------------------------------+
|
||||
a2ps | [] [] [] [] |
|
||||
bash | [] [] [] [] |
|
||||
bfd | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] |
|
||||
clisp | [] [] [] [] |
|
||||
clisp | |
|
||||
clisplow | |
|
||||
cpio | [] [] [] [] |
|
||||
darkstat | () |
|
||||
diffutils | [] [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] [] |
|
||||
fetchmail | [] () [] [] [] () |
|
||||
fileutils | [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] |
|
||||
flex | [] [] [] [] [] |
|
||||
gas | [] [] |
|
||||
gawk | [] [] [] |
|
||||
gcal | [] [] |
|
||||
gcc | [] [] |
|
||||
gettext | [] [] [] [] [] |
|
||||
gnupg | [] [] [] [] [] [] [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () () () () () |
|
||||
grep | [] [] [] [] [] [] [] |
|
||||
gretl | [] |
|
||||
gthumb | () () () |
|
||||
hello | [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
indent | [] [] [] [] [] |
|
||||
jpilot | () [] [] [] |
|
||||
jwhois | [] [] |
|
||||
kbd | [] [] [] |
|
||||
ld | [] [] |
|
||||
libc | [] [] [] [] [] [] [] |
|
||||
libiconv | [] [] [] [] |
|
||||
lifelines | () () |
|
||||
lilypond | [] [] [] |
|
||||
lingoteach | [] [] |
|
||||
lingoteach_lessons| () () |
|
||||
lynx | [] [] [] [] [] |
|
||||
m4 | [] [] [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
man-db | [] () () [] () () |
|
||||
mysecretdiary | [] [] [] |
|
||||
nano | [] () [] [] [] [] |
|
||||
nano_1_0 | [] () [] [] [] [] |
|
||||
opcodes | [] [] [] |
|
||||
parted | [] [] [] [] [] |
|
||||
ptx | [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] |
|
||||
sketch | () [] () |
|
||||
soundtracker | [] [] [] |
|
||||
sp | [] |
|
||||
tar | [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] [] |
|
||||
textutils | [] [] [] [] [] |
|
||||
util-linux | [] [] [] [] [] [] |
|
||||
vorbis-tools | [] |
|
||||
wastesedge | |
|
||||
wdiff | [] [] [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] [] [] [] |
|
||||
+----------------------------------------+
|
||||
be bg ca cs da de el en eo es et fi fr
|
||||
0 2 19 10 30 44 9 1 12 45 16 3 53
|
||||
|
||||
ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
|
||||
+----------------------------------------------------+
|
||||
a2ps | [] [] [] | 6
|
||||
bash | | 4
|
||||
bfd | | 0
|
||||
binutils | | 1
|
||||
bison | [] | 6
|
||||
clisp | [] | 5
|
||||
cpio | [] [] [] [] [] | 10
|
||||
diffutils | [] [] [] [] | 11
|
||||
enscript | [] [] [] | 5
|
||||
error | [] [] | 4
|
||||
fetchmail | | 0
|
||||
fileutils | [] [] [] [] [] [] [] [] [] | 17
|
||||
findutils | [] [] [] [] [] [] [] [] | 16
|
||||
flex | [] [] [] | 6
|
||||
freetype | | 0
|
||||
gas | | 0
|
||||
gawk | [] | 3
|
||||
gcal | | 0
|
||||
gcc | | 0
|
||||
gettext | [] [] [] [] [] [] [] [] | 18
|
||||
gnupg | [] [] [] | 10
|
||||
gprof | | 0
|
||||
grep | [] [] [] [] | 12
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] | 22
|
||||
id-utils | [] [] [] | 6
|
||||
indent | [] [] [] [] [] [] [] | 12
|
||||
jpilot | | 1
|
||||
kbd | [] | 1
|
||||
ld | | 1
|
||||
libc | [] [] [] [] [] [] [] [] | 16
|
||||
lilypond | [] [] | 3
|
||||
lynx | [] [] [] [] | 8
|
||||
m4 | [] [] [] [] | 12
|
||||
make | [] [] [] [] [] [] | 12
|
||||
mysecretdiary | | 1
|
||||
nano | [] | 4
|
||||
opcodes | [] | 1
|
||||
parted | [] [] | 5
|
||||
ptx | [] [] [] [] [] [] [] [] | 15
|
||||
python | | 0
|
||||
recode | [] [] [] [] | 13
|
||||
sed | [] [] [] [] [] [] [] | 19
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21
|
||||
sharutils | [] [] [] | 11
|
||||
sketch | | 0
|
||||
soundtracker | | 3
|
||||
sp | | 0
|
||||
tar | [] [] [] [] [] [] [] | 15
|
||||
texinfo | [] | 7
|
||||
textutils | [] [] [] [] [] [] [] [] | 16
|
||||
util-linux | [] [] | 4
|
||||
wdiff | [] [] [] [] | 7
|
||||
wget | [] [] [] [] [] [] [] | 17
|
||||
+----------------------------------------------------+
|
||||
33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
|
||||
53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387
|
||||
gl he hr hu id it ja ko lv nb nl nn
|
||||
+-------------------------------------+
|
||||
a2ps | () () [] |
|
||||
bash | [] |
|
||||
bfd | [] |
|
||||
binutils | [] |
|
||||
bison | [] [] [] [] |
|
||||
clisp | [] |
|
||||
clisp | |
|
||||
clisplow | |
|
||||
cpio | [] [] [] [] |
|
||||
darkstat | () |
|
||||
diffutils | [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] |
|
||||
fetchmail | [] |
|
||||
fileutils | [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] [] |
|
||||
flex | [] |
|
||||
gas | |
|
||||
gawk | [] |
|
||||
gcal | |
|
||||
gcc | [] |
|
||||
gettext | [] [] |
|
||||
gnupg | [] [] [] [] |
|
||||
gprof | |
|
||||
gpsdrive | [] () () |
|
||||
grep | [] [] [] [] [] [] [] |
|
||||
gretl | |
|
||||
gthumb | () () |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] |
|
||||
indent | [] [] [] [] |
|
||||
jpilot | () () |
|
||||
jwhois | [] [] |
|
||||
kbd | |
|
||||
ld | |
|
||||
libc | [] [] [] [] |
|
||||
libiconv | [] [] [] |
|
||||
lifelines | |
|
||||
lilypond | [] [] |
|
||||
lingoteach | [] |
|
||||
lingoteach_lessons| |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
make | [] [] [] [] [] [] |
|
||||
man-db | () () |
|
||||
mysecretdiary | [] |
|
||||
nano | [] [] [] [] [] [] |
|
||||
nano_1_0 | [] [] [] [] [] |
|
||||
opcodes | [] [] |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] |
|
||||
sharutils | [] [] [] |
|
||||
sketch | () |
|
||||
soundtracker | [] [] |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] |
|
||||
texinfo | [] [] [] |
|
||||
textutils | [] [] [] |
|
||||
util-linux | () [] |
|
||||
vorbis-tools | |
|
||||
wastesedge | |
|
||||
wdiff | [] [] [] |
|
||||
wget | [] [] [] [] [] [] |
|
||||
+-------------------------------------+
|
||||
gl he hr hu id it ja ko lv nb nl nn
|
||||
23 9 12 18 14 13 26 9 1 8 19 4
|
||||
|
||||
no pl pt pt_BR ru sk sl sv tr uk zh_TW
|
||||
+----------------------------------------+
|
||||
a2ps | () () () [] [] [] [] [] | 10
|
||||
bash | [] | 6
|
||||
bfd | [] [] | 5
|
||||
binutils | [] [] | 5
|
||||
bison | [] [] [] | 11
|
||||
clisp | | 5
|
||||
clisp | | 0
|
||||
clisplow | | 0
|
||||
cpio | [] [] [] [] | 12
|
||||
darkstat | [] () | 1
|
||||
diffutils | [] [] [] [] [] [] | 17
|
||||
enscript | [] [] [] [] | 8
|
||||
error | [] [] [] | 7
|
||||
fetchmail | () () [] | 6
|
||||
fileutils | [] [] [] [] [] | 13
|
||||
findutils | [] [] [] [] [] [] [] | 21
|
||||
flex | [] [] [] | 9
|
||||
gas | [] | 3
|
||||
gawk | [] [] | 6
|
||||
gcal | [] [] | 4
|
||||
gcc | [] | 4
|
||||
gettext | [] [] [] [] [] [] | 13
|
||||
gnupg | [] [] [] | 14
|
||||
gprof | [] [] | 4
|
||||
gpsdrive | [] [] () | 3
|
||||
grep | [] [] [] [] | 18
|
||||
gretl | | 1
|
||||
gthumb | () () [] | 1
|
||||
hello | [] [] [] [] [] [] [] | 28
|
||||
id-utils | [] [] [] [] | 9
|
||||
indent | [] [] [] [] [] | 14
|
||||
jpilot | () () [] | 4
|
||||
jwhois | [] () () [] [] | 7
|
||||
kbd | [] [] | 5
|
||||
ld | [] [] | 4
|
||||
libc | [] [] [] [] [] [] | 17
|
||||
libiconv | [] [] [] [] | 11
|
||||
lifelines | [] | 1
|
||||
lilypond | [] | 6
|
||||
lingoteach | [] [] | 5
|
||||
lingoteach_lessons| | 0
|
||||
lynx | [] [] [] [] | 13
|
||||
m4 | [] [] [] | 12
|
||||
make | [] [] [] [] | 14
|
||||
man-db | | 3
|
||||
mysecretdiary | [] [] [] | 7
|
||||
nano | [] [] [] [] | 15
|
||||
nano_1_0 | [] [] [] [] | 14
|
||||
opcodes | [] [] | 7
|
||||
parted | [] [] [] | 11
|
||||
ptx | [] [] [] [] [] [] [] | 19
|
||||
python | | 0
|
||||
recode | [] [] [] [] [] [] | 15
|
||||
sed | [] [] [] [] [] [] | 23
|
||||
sh-utils | [] | 8
|
||||
sharutils | [] [] [] [] | 13
|
||||
sketch | [] () [] | 4
|
||||
soundtracker | [] | 6
|
||||
sp | | 1
|
||||
tar | [] [] [] [] [] [] [] | 18
|
||||
texinfo | [] [] | 10
|
||||
textutils | [] [] [] [] [] | 13
|
||||
util-linux | [] [] [] | 10
|
||||
vorbis-tools | [] | 2
|
||||
wastesedge | | 0
|
||||
wdiff | [] [] [] [] [] | 14
|
||||
wget | [] [] [] [] [] [] [] [] | 24
|
||||
+----------------------------------------+
|
||||
36 teams no pl pt pt_BR ru sk sl sv tr uk zh_TW
|
||||
67 domains 4 15 2 24 26 12 10 47 42 4 8 594
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
@@ -298,9 +406,9 @@ distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If September 2001 seems to be old, you may fetch a more recent copy
|
||||
of this `ABOUT-NLS' file on most GNU archive sites. The most
|
||||
up-to-date matrix with full percentage details can be found at
|
||||
If July 2002 seems to be old, you may fetch a more recent copy of
|
||||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
||||
matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
|
||||
Using `gettext' in new packages
|
||||
|
||||
7
ChangeLog
Normal file
7
ChangeLog
Normal file
@@ -0,0 +1,7 @@
|
||||
2002-07-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 0.1.0.
|
||||
|
||||
* configure.ac: Merge the three files from fileutils,
|
||||
textutils, and sh-utils.
|
||||
* Makefile.am: Likewise.
|
||||
25
INSTALL
25
INSTALL
@@ -1,3 +1,9 @@
|
||||
Copyright 1994, 1995, 1996, 1999, 2000, 2001 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
@@ -70,7 +76,7 @@ them in the environment. You can do that on the command line like this:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Environment Variables::, for more details.
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
@@ -84,10 +90,10 @@ the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
@@ -141,8 +147,7 @@ type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
@@ -172,11 +177,11 @@ default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Environment Variables
|
||||
=====================
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to configure. However, some packages may run
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
31
Makefile.am
Normal file
31
Makefile.am
Normal file
@@ -0,0 +1,31 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
|
||||
SUBDIRS = lib src doc man m4 po tests djgpp
|
||||
EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
|
||||
.kludge-stamp .prev-version
|
||||
|
||||
install-root:
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
# Some tests always need root privileges, others need them only sometimes.
|
||||
check-root:
|
||||
cd tests && $(MAKE) $@
|
||||
|
||||
distcheck-hook:
|
||||
$(MAKE) my-distcheck
|
||||
|
||||
# Just prior to distribution, ...
|
||||
# transform the automake-generated rule that runs `rm -f rm'.
|
||||
# On some systems, that command would fail with a diagnostic like
|
||||
# `rm: cannot unlink `rm': Text file busy' when `.' appears so early
|
||||
# in the shell's search path that running `rm' would run the `rm'
|
||||
# executable in the current directory.
|
||||
# Similarly, adjust the clean-binPROGRAMS rule.
|
||||
|
||||
rm_subst = \
|
||||
s!(rm -f (rm|\$$\(bin_PROGRAMS\)))$$!$$1 > /dev/null 2>&1 || /bin/$$1!
|
||||
.kludge-stamp: $(srcdir)/src/Makefile.in
|
||||
perl -pi -e '$(rm_subst)' $(srcdir)/src/Makefile.in
|
||||
touch $@
|
||||
22
Makefile.cfg
22
Makefile.cfg
@@ -1,23 +1,17 @@
|
||||
# -*- makefile -*-
|
||||
## Customize Makefile.maint.
|
||||
|
||||
# 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)
|
||||
url_dir_list = \
|
||||
ftp://alpha.gnu.org/gnu/fetish \
|
||||
http://fetish.sf.net \
|
||||
|
||||
# Files that `make wget-update' should update.
|
||||
wget_files = \
|
||||
$(srcdir)/config.guess \
|
||||
$(srcdir)/config.sub \
|
||||
$(srcdir)/doc/texinfo.tex \
|
||||
$(srcdir)/src/ansi2knr.c
|
||||
$(srcdir)/config/config.guess \
|
||||
$(srcdir)/config/config.sub \
|
||||
$(srcdir)/config/texinfo.tex
|
||||
|
||||
# $(srcdir)/src/ansi2knr.c
|
||||
|
||||
###############################################
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# This Makefile fragment is shared between fileutils, sh-utils, textutils,
|
||||
# CPPI, Bison, and Autoconf.
|
||||
|
||||
## Copyright 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001-2002 Free Software Foundation, Inc.
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
@@ -53,9 +53,35 @@ release_archive_dir ?= ../release
|
||||
# Checks that don't require cvs.
|
||||
# Run `changelog-check' last, as previous test may reveal problems requiring
|
||||
# new ChangeLog entries.
|
||||
local-check: po-check copyright-check writable-files \
|
||||
m4-check author_mark_check \
|
||||
changelog-check
|
||||
local-check = \
|
||||
po-check copyright-check writable-files m4-check author_mark_check \
|
||||
changelog-check strftime-check header-check
|
||||
.PHONY: $(local-check)
|
||||
|
||||
# Make sure C source files in src/ don't include xalloc.h directly,
|
||||
# since they all already include it via sys2.h.
|
||||
# It's not a big deal -- just aesthetics.
|
||||
header-check:
|
||||
if test -f $(srcdir)/src/sys2.h; then \
|
||||
if grep 'xalloc\.h' $(srcdir)/src/*.c; then \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
# Ensure that date's --help output stays in sync with the info
|
||||
# documentation for GNU strftime. The only exception is %N,
|
||||
# which date accepts but GNU strftime does not.
|
||||
extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/'
|
||||
strftime-check:
|
||||
if test -f $(srcdir)/src/date.c; then \
|
||||
grep '^ %. ' $(srcdir)/src/date.c | sort \
|
||||
| $(extract_char) > $@-src; \
|
||||
{ echo N; \
|
||||
info libc date calendar format | grep '^ `%.'\' \
|
||||
| $(extract_char); } | sort > $@-info; \
|
||||
diff -u $@-src $@-info || exit 1; \
|
||||
rm -f $@-src $@-info; \
|
||||
fi
|
||||
|
||||
changelog-check:
|
||||
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||
@@ -74,7 +100,7 @@ m4-check:
|
||||
po-check:
|
||||
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; \
|
||||
grep -E -l '\b_\(' lib/*.[ch] src/*.[ch] | sort > $@-2; \
|
||||
diff -u $@-1 $@-2 || exit 1; \
|
||||
rm -f $@-1 $@-2; \
|
||||
fi
|
||||
@@ -139,7 +165,7 @@ maintainer-distcheck: changelog-check
|
||||
# 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: local-check cvs-check maintainer-distcheck
|
||||
cvs-dist: $(local-check) cvs-check maintainer-distcheck
|
||||
$(CVS) update po
|
||||
$(CVS) tag -c $(this-cvs-tag)
|
||||
$(MAKE) dist
|
||||
@@ -158,7 +184,7 @@ null_AM_MAKEFLAGS = \
|
||||
# and building with CFLAGS='-Wformat -Werror' causes any format warning to be
|
||||
# treated as a failure.
|
||||
t=./=test
|
||||
my-distcheck: local-check
|
||||
my-distcheck: $(local-check)
|
||||
-rm -rf $(t)
|
||||
mkdir $(t)
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
@@ -177,19 +203,15 @@ my-distcheck: local-check
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
|
||||
# This must be the same name on both hosts.
|
||||
# Make it a symlink that points to the right place.
|
||||
real_dir = fetish-ftp
|
||||
|
||||
url_dir_list = $(foreach x,$(hosts),ftp://$($(x)_host)/$($(x)_url_dir))
|
||||
|
||||
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/')
|
||||
xdelta-md5 = $(shell md5sum < $(xd-delta)|sed 's/ -//')
|
||||
xdelta-sha1 = $(shell sha1sum < $(xd-delta)|sed 's/ -//')
|
||||
tgz-size = $(shell du --human $(my_distdir).tar.gz|sed 's/\([MkK]\).*/ \1B/')
|
||||
bz2-size = $(shell du --human $(my_distdir).tar.bz2|sed 's/\([MkK]\).*/ \1B/')
|
||||
xd-size = $(shell du --human $(xd-delta)|sed 's/\([MkK]\).*/ \1B/')
|
||||
|
||||
rel-check:
|
||||
tarz=/tmp/rel-check-tarz-$$$$; \
|
||||
@@ -203,12 +225,8 @@ rel-check:
|
||||
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
|
||||
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
|
||||
|
||||
GZIP = gzip
|
||||
BZIP2 = bzip2
|
||||
$(my_distdir).tar.bz2: $(my_distdir).tar.gz
|
||||
$(GZIP) -dc $< > $(my_distdir).tar
|
||||
rm -f $@
|
||||
$(BZIP2) -9 $(my_distdir).tar
|
||||
news-r1 = /^[^ ].*$(THIS_VERSION_REGEXP)[]:]/
|
||||
news-r2 = /^[^ ].*$(PREV_VERSION_REGEXP)[]:]/
|
||||
|
||||
rel-files = $(xd-delta) $(distdir).tar.bz2 $(distdir).tar.gz
|
||||
announcement: NEWS ChangeLog $(rel-files)
|
||||
@@ -228,15 +246,17 @@ announcement: NEWS ChangeLog $(rel-files)
|
||||
echo " $$url/$(xd-delta) ($(xd-size))"; \
|
||||
done; \
|
||||
echo; \
|
||||
echo "Here are the MD5 and SHA1 signatures for the compressed tar files:"; \
|
||||
echo "Here are the MD5 and SHA1 signatures:"; \
|
||||
echo; \
|
||||
echo "$(tgz-md5) $(my_distdir).tar.gz"; \
|
||||
echo "$(bz2-md5) $(my_distdir).tar.bz2"; \
|
||||
echo "$(xdelta-md5) $(xd-delta)"; \
|
||||
echo "$(tgz-sha1) $(my_distdir).tar.gz"; \
|
||||
echo "$(bz2-sha1) $(my_distdir).tar.bz2"; \
|
||||
echo "$(xdelta-sha1) $(xd-delta)"; \
|
||||
echo; \
|
||||
echo NEWS:; \
|
||||
sed -n "/$(THIS_VERSION_REGEXP)[]:]/,/$(PREV_VERSION_REGEXP)[]:]/p" NEWS \
|
||||
sed -n "$(news-r1),$(news-r2)p" NEWS \
|
||||
| grep -v '^\['; \
|
||||
echo; \
|
||||
echo ChangeLog entries:; \
|
||||
@@ -256,9 +276,10 @@ 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 \
|
||||
wget_files ?= $(srcdir)/config/config.guess \
|
||||
$(srcdir)/config/config.sub \
|
||||
$(srcdir)/src/ansi2knr.c \
|
||||
$(srcdir)/doc/texinfo.tex
|
||||
$(srcdir)/config/texinfo.tex
|
||||
get-targets = $(patsubst %, get-%, $(wget_files))
|
||||
|
||||
config.guess-url_prefix = $(ftp-gnu)/config/
|
||||
@@ -282,19 +303,18 @@ $(get-targets):
|
||||
automake_repo=:pserver:anoncvs@anoncvs.cygnus.com:/cvs/automake
|
||||
.PHONY: wget-update
|
||||
wget-update: $(get-targets)
|
||||
for f in depcomp missing mkinstalldirs; 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; \
|
||||
cd config && \
|
||||
for f in depcomp missing mkinstalldirs; do \
|
||||
test -f $$f || { echo "*** skipping $$f" 1>&2; continue; }; \
|
||||
echo checking out $$f...; \
|
||||
$(CVS) -d $(automake_repo) co -p automake/lib/$$f > $$f.t \
|
||||
&& $(move_if_change) $$f.t $$f; \
|
||||
done
|
||||
|
||||
define emit-rsync-commands
|
||||
define emit-upload-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 upload $(PACKAGE) $(PREV_VERSION) $(VERSION)
|
||||
echo '# send the /tmp/announcement e-mail'
|
||||
echo =====================================
|
||||
echo =====================================
|
||||
@@ -303,7 +323,7 @@ endef
|
||||
$(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz
|
||||
xdelta delta -9 $^ $@ || :
|
||||
|
||||
alpha: local-check
|
||||
alpha: $(local-check)
|
||||
$(MAKE) cvs-dist
|
||||
$(MAKE) $(xd-delta)
|
||||
$(MAKE) -s announcement > /tmp/announce-$(my_distdir)
|
||||
@@ -311,4 +331,4 @@ alpha: local-check
|
||||
chmod a-w $(rel-files)
|
||||
echo $(VERSION) > $(prev_version_file)
|
||||
$(CVS) ci -m. $(prev_version_file)
|
||||
@$(emit-rsync-commands)
|
||||
@$(emit-upload-commands)
|
||||
|
||||
20
THANKS
20
THANKS
@@ -11,12 +11,15 @@ Adam Klein aklein@debian.org
|
||||
Akim Demaille demaille@inf.enst.fr
|
||||
Alain Magloire alain@qnx.com
|
||||
Alan Iwi iwi@atm.ox.ac.uk
|
||||
Albert Chin-A-Young china@thewrittenword.com
|
||||
Albert Hopkins ahopkins@dynacare.com
|
||||
Alberto Accomazzi alberto@cfa0.harvard.edu
|
||||
aldomel aldomel@ix.netcom.com
|
||||
Alen Muzinic zveki@fly.cc.fer.hr
|
||||
Alexandre Duret-Lutz duret_g@epita.fr
|
||||
Alexey Solovyov alekso@math.uu.se
|
||||
Alfred M. Szmidt ams@kemisten.nu
|
||||
Andi Kleen freitag@alancoxonachip.com
|
||||
Andre Novaes Cunha Andre.Cunha@br.global-one.net
|
||||
Andreas Gruenbacher ag@bestbits.at
|
||||
Andreas Jaeger jaeger@gnu.org
|
||||
@@ -58,9 +61,11 @@ Charles Karney karney@pppl.gov
|
||||
Charles Randall crandall@matchlogic.com
|
||||
Chip Salzenberg chip@valinux.com
|
||||
Chris Faylor cgf@cygnus.com
|
||||
Chris J. Bednar cjb@AdvancedDataSolutions.com
|
||||
Chris Sylvain csylvain@umm.edu
|
||||
Chris Yeo cyeo@biking.org
|
||||
Christi Alice Scarborough christi@chiark.greenend.org.uk
|
||||
Christian Harkort christian.harkort@web.de
|
||||
Christian Krackowizer ckrackowiz@std.schuler-ag.com
|
||||
Christian Rose menthos@menthos.com
|
||||
Christian von Roques roques@pond.sub.org
|
||||
@@ -74,6 +79,7 @@ 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
|
||||
Dave Beckett dajobe@dajobe.org
|
||||
David Dyck dcd@tc.fluke.COM
|
||||
David Godfrey dave@delta.demon.co.uk
|
||||
David Luyer david_luyer@pacific.net.au
|
||||
@@ -111,6 +117,7 @@ Fr
|
||||
Gabor Z. Papp gzp@gzp.org.hu
|
||||
Galen Hazelwood galenh@micron.net
|
||||
Gary Anderson ganderson@clark.net
|
||||
Gaute Hvoslef Kvalnes gaute@verdsveven.com
|
||||
Gaël Quéri gqueri@mail.dotcom.fr
|
||||
Geoff Kuenning geoff@cs.hmc.edu
|
||||
Geoff Odhner geoff@franklin.com
|
||||
@@ -135,6 +142,7 @@ Ian Bruce ian.bruce@myrealbox.com
|
||||
Ian Jackson ijackson@chiark.greenend.org.uk
|
||||
Ian Lance Taylor ian@cygnus.com
|
||||
Ian Turner vectro@pipeline.com
|
||||
Iida Yosiaki iida@gnu.org
|
||||
James james@albion.glarp.com
|
||||
James Antill jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
||||
James Sneeringer jvs@ocslink.com
|
||||
@@ -201,6 +209,7 @@ Manfred Hollstein manfred@s-direktnet.de
|
||||
Marc Boucher marc@mbsi.ca
|
||||
Marc Olzheim marcolz@stack.nl
|
||||
Marco Franzen Marco.Franzen@Thyron.com
|
||||
Marcus Brinkmann http://www.marcus-brinkmann.de
|
||||
Marcus Daniels marcus@ee.pdx.edu
|
||||
Mark A. Thomas thommark@access.digex.net
|
||||
Mark D. Roth roth@uiuc.edu
|
||||
@@ -214,6 +223,7 @@ Markus Demleitner msdemlei@auriga.ari.uni-heidelberg.de
|
||||
Martin martin@dresden.nacamar.de
|
||||
Martin Gallant martyg@goodbit.net
|
||||
Martin Hippe martin.hippe@schlund.de
|
||||
Martin Michlmayr tbm@cyrius.com
|
||||
Martin Mitchell martin@debian.org
|
||||
Martin P.J. Zinser zinser@decus.de
|
||||
Marty Leisner leisner@sdsp.mc.xerox.com
|
||||
@@ -222,6 +232,7 @@ Mate Wierdl mw@moni.msci.memphis.edu
|
||||
Matej Vela mvela@public.srce.hr
|
||||
Matt Perry matt@primefactor.com
|
||||
Matt Schalit mschalit@pacbell.net
|
||||
Matthew Arnison maffew@cat.org.au
|
||||
Matthew Braun matthew@ans.net
|
||||
Matthew Clarke Matthew_Clarke@mindlink.bc.ca
|
||||
Matthew S. Levine mslevine@theory.lcs.mit.edu
|
||||
@@ -232,15 +243,18 @@ Matthias Urlichs smurf@noris.de
|
||||
Meelis Roos mroos@tartu.cyber.ee
|
||||
Michael ??? michael@roka.net
|
||||
Michael Deutschmann michael@talamasca.ocis.net
|
||||
Michael Gaughen mgaughen@polyserve.com
|
||||
Michael Hasselberg mikelh@zonta.ping.de
|
||||
Michael Hohn hohn@math.utah.edu
|
||||
Michael J. Croghan mcroghan@usatoday.com
|
||||
Michael Piefel piefel@informatik.hu-berlin.de
|
||||
Michael Steffens michael.steffens@s.netic.de
|
||||
Michael Stone mstone@debian.org
|
||||
Michael Stutz stutz@dsl.org
|
||||
Michael Veksler mveksler@techunix.technion.ac.il
|
||||
Michel Robitaille robitail@IRO.UMontreal.CA
|
||||
Michiel Bacchiani bacchian@raven.bu.edu
|
||||
Mike Castle dalgoda@ix.netcom.com
|
||||
Miles Bader miles@gnu.ai.mit.edu
|
||||
Minh Tran-Le tranle@intellicorp.com
|
||||
Morten Welinder terra@diku.dk
|
||||
@@ -258,6 +272,7 @@ Paul Eggert eggert@twinsun.com
|
||||
Paul Nevai nevai@ops.mps.ohio-state.edu
|
||||
Paul Sauer paul@alexa.com
|
||||
Paul Slootman paul@debian.org
|
||||
Pawel Prokop pablo@wizard.ae.krakow.pl
|
||||
Per Cederqvist ceder@lysator.liu.se
|
||||
Per Kristian Hove perhov@math.ntnu.no
|
||||
Peter Eriksson peter@ifm.liu.se
|
||||
@@ -304,14 +319,17 @@ Stephen Smoogen ??????????
|
||||
Steve McConnel steve@acadcomp.sil.org
|
||||
Stuart Kemp skemp@peter.bmc.com
|
||||
Tadayoshi Funaba tadf@kt.rim.or.jp
|
||||
TAKAI Kousuke takai@vlsi.kuee.kyoto-u.ac.jp
|
||||
Theodore Ts'o tytso@rsts-11.mit.edu
|
||||
Thomas Bushnell thomas@gnu.ai.mit.edu
|
||||
Thomas Quinot thomas@Cuivre.FR.EU.ORG
|
||||
Tim J. Robbins tjr@FreeBSD.org
|
||||
Tim Smithers mouse@dmouse.com.au
|
||||
Tim Waugh twaugh@redhat
|
||||
Todd A. Jacobs tjacobs@codegnome.org
|
||||
Tom Quinn trq@dionysos.thphys.ox.ac.uk
|
||||
Ton Hospel thospel@mail.dma.be
|
||||
Tony Kocurko akocurko@mun.ca
|
||||
Tony Leneis tony@plaza.ds.adp.com
|
||||
Tony Robinson ajr@eng.cam.ac.uk
|
||||
Torbjorn Granlund tege@nada.kth.se
|
||||
@@ -319,6 +337,7 @@ Torbjorn Lindgren tl@funcom.no
|
||||
Torsten Landschoff torsten@pclab.ifg.uni-kiel.de
|
||||
Ulrich Drepper drepper@gnu.org
|
||||
Urs Thuermann urs@isnogud.escape.de
|
||||
Uwe H. Steinfeld usteinfeld@gmx.net
|
||||
Vesselin Atanasov vesselin@bgnet.bg
|
||||
Vin Shelton acs@alumni.princeton.edu
|
||||
Volker Borchert bt@teknon.de
|
||||
@@ -330,6 +349,7 @@ Will Edgington wedgingt@acm.org
|
||||
William Bader william@nscs.fast.net
|
||||
William Dowling will@franklin.com
|
||||
William Lewis wiml@omnigroup.com
|
||||
Wojciech Purczynski cliph@isec.pl
|
||||
Wolfram Kleff kleff@cs.uni-bonn.de
|
||||
Won-kyu Park wkpark@chem.skku.ac.kr
|
||||
Zvi Har'El rl@math.technion.ac.il
|
||||
|
||||
15
TODO
Normal file
15
TODO
Normal file
@@ -0,0 +1,15 @@
|
||||
Fix README
|
||||
fix AUTHORS
|
||||
|
||||
restore djgpp, eventually
|
||||
|
||||
put old ChangeLog files somewhere...
|
||||
Add them to EXTRA_DIST
|
||||
|
||||
Move things so there are no symlinks from repository to
|
||||
any directory other than common
|
||||
|
||||
Make bug-reporting address bug-coreutils@gnu.org work.
|
||||
grep 'bug-.*utils' src/*.c
|
||||
|
||||
merge .po files
|
||||
4
config/ChangeLog
Normal file
4
config/ChangeLog
Normal file
@@ -0,0 +1,4 @@
|
||||
2002-02-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* config.guess (main): Don't use `head -1'; it's no longer portable.
|
||||
Use `sed 1q' instead.
|
||||
1351
config/config.guess
vendored
Normal file
1351
config/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load Diff
513
config/config.rpath
Executable file
513
config/config.rpath
Executable file
@@ -0,0 +1,513 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2002 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is 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.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except M$VC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shlibext=
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
linux*)
|
||||
echo '__INTEL_COMPILER' > conftest.$ac_ext
|
||||
if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
# Intel icc
|
||||
wl='-Qoption,ld,'
|
||||
fi
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
if test "x$host_vendor" = xsni; then
|
||||
wl='-LD'
|
||||
else
|
||||
wl='-Wl,'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
# On AIX, the GNU linker is very broken
|
||||
ld_shlibs=no
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we can use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
hardcode_direct=yes
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
esac
|
||||
fi
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes # Not in the search PATH, but as the default
|
||||
# location of the library.
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
if test "x$host_vendor" = xsno; then
|
||||
hardcode_direct=yes # is this really true???
|
||||
else
|
||||
hardcode_direct=no # Motorola manual says yes, but my tests say they lie
|
||||
fi
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv5*)
|
||||
hardcode_libdir_flag_spec=
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4.2uw2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
;;
|
||||
sysv5uw7* | unixware7*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
libname_spec='lib$name'
|
||||
sys_lib_dlsearch_path_spec="/lib /usr/lib"
|
||||
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
shlibext=so
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
shlibext=so
|
||||
;;
|
||||
amigaos*)
|
||||
shlibext=ixlibrary
|
||||
;;
|
||||
beos*)
|
||||
shlibext=so
|
||||
;;
|
||||
bsdi4*)
|
||||
shlibext=so
|
||||
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
|
||||
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
case $GCC,$host_os in
|
||||
yes,cygwin*)
|
||||
shlibext=dll.a
|
||||
;;
|
||||
yes,mingw*)
|
||||
shlibext=dll
|
||||
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
|
||||
;;
|
||||
yes,pw32*)
|
||||
shlibext=dll
|
||||
;;
|
||||
*)
|
||||
shlibext=dll
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shlibext=dylib
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
freebsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
gnu*)
|
||||
shlibext=so
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
shlibext=sl
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
shlibext=so
|
||||
case "$host_os" in
|
||||
irix5*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
|
||||
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
|
||||
;;
|
||||
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
|
||||
;;
|
||||
linux-gnu*)
|
||||
shlibext=so
|
||||
;;
|
||||
netbsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
newsos6)
|
||||
shlibext=so
|
||||
;;
|
||||
openbsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shlibext=dll
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
shlibext=so
|
||||
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
|
||||
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
|
||||
;;
|
||||
sco3.2v5*)
|
||||
shlibext=so
|
||||
;;
|
||||
solaris*)
|
||||
shlibext=so
|
||||
;;
|
||||
sunos4*)
|
||||
shlibext=so
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
shlibext=so
|
||||
case "$host_vendor" in
|
||||
motorola)
|
||||
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
uts4*)
|
||||
shlibext=so
|
||||
;;
|
||||
dgux*)
|
||||
shlibext=so
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
shlibext=so
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
# Compile-time system search path for libraries
|
||||
sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
|
||||
|
||||
# Run-time system search path for libraries
|
||||
sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
|
||||
|
||||
EOF
|
||||
1460
config/config.sub
vendored
Normal file
1460
config/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load Diff
423
config/depcomp
Normal file
423
config/depcomp
Normal file
@@ -0,0 +1,423 @@
|
||||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# 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.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. This file always lives in the current directory.
|
||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||
# $object doesn't have directory information.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'. We will use -o /dev/null later,
|
||||
# however we can't do the remplacement now because
|
||||
# `-o $object' might simply not be used
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
276
config/install-sh
Executable file
276
config/install-sh
Executable file
@@ -0,0 +1,276 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case "$1" in
|
||||
-c) instcmd=$cpprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified" >&2
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d "$dst" ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f "$src" -o -d "$src" ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified" >&2
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d "$dst" ]
|
||||
then
|
||||
dst=$dst/`basename "$src"`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
|
||||
if [ ! -d "$pathcomp" ] ;
|
||||
then
|
||||
$mkdirprog "$pathcomp"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd "$dst" &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
dstfile=`basename "$dst" $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
rmtmp=$dstdir/#rm.$$#
|
||||
|
||||
# Trap to clean up temp files at exit.
|
||||
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp";else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp";else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp";else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp";else true;fi &&
|
||||
|
||||
# Now remove or move any old file at destination location. We try this
|
||||
# two ways since rm can't unlink itself on some systems and the destination
|
||||
# file might be busy for other reasons. In this case, the final cleanup
|
||||
# might fail but the new file should still install successfully.
|
||||
|
||||
{
|
||||
if [ -f "$dstdir/$dstfile" ]
|
||||
then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
|
||||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
|
||||
{
|
||||
echo "install: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
true
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
|
||||
fi &&
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
||||
336
config/missing
Normal file
336
config/missing
Normal file
@@ -0,0 +1,336 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# 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.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
101
config/mkinstalldirs
Normal file
101
config/mkinstalldirs
Normal file
@@ -0,0 +1,101 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id: mkinstalldirs,v 1.3 2002/07/18 20:44:25 meyering Exp $
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* ) # -h for help
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
-m ) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
dirmode="${1}"
|
||||
shift ;;
|
||||
-- ) shift; break ;; # stop option processing
|
||||
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
|
||||
* ) break ;; # first non-opt arg
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi ;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 3
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
File diff suppressed because it is too large
Load Diff
302
configure.ac
Normal file
302
configure.ac
Normal file
@@ -0,0 +1,302 @@
|
||||
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
|
||||
AC_INIT(GNU coreutils, 0.1.0, bug-coreutils@gnu.org)
|
||||
AC_CONFIG_SRCDIR(src/ls.c)
|
||||
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AM_CONFIG_HEADER(config.h:config.hin)
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE([1.6 gnits dist-bzip2])
|
||||
|
||||
AC_GNU_SOURCE
|
||||
jm_PERL
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_PROG_RANLIB
|
||||
AC_AIX
|
||||
AC_MINIX
|
||||
|
||||
AC_CHECK_FUNCS(uname,
|
||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uname" MAN="$MAN uname.1")
|
||||
AC_CHECK_FUNCS(chroot,
|
||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS chroot" MAN="$MAN chroot.1")
|
||||
AC_CHECK_FUNCS(gethostid,
|
||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS hostid" MAN="$MAN hostid.1")
|
||||
|
||||
jm_MACROS
|
||||
|
||||
AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
|
||||
jm_WINSIZE_IN_PTEM
|
||||
|
||||
# Check for SunOS statfs brokenness wrt partitions 2GB and larger.
|
||||
# If <sys/vfs.h> exists and struct statfs has a member named f_spare,
|
||||
# enable the work-around code in fsusage.c.
|
||||
AC_MSG_CHECKING([for statfs that truncates block counts])
|
||||
AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
|
||||
[AC_TRY_COMPILE([
|
||||
#if !defined(sun) && !defined(__sun)
|
||||
choke -- this is a workaround for a Sun-specific problem
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/vfs.h>],
|
||||
[struct statfs t; long c = *(t.f_spare);],
|
||||
fu_cv_sys_truncating_statfs=yes,
|
||||
fu_cv_sys_truncating_statfs=no,
|
||||
)])
|
||||
if test $fu_cv_sys_truncating_statfs = yes; then
|
||||
AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1,
|
||||
[ Define if the block counts reported by statfs may be truncated to 2GB
|
||||
and the correct values may be stored in the f_spare array.
|
||||
(SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem.
|
||||
SunOS 4.1.1 seems not to be affected.)])
|
||||
fi
|
||||
AC_MSG_RESULT($fu_cv_sys_truncating_statfs)
|
||||
|
||||
AC_MSG_CHECKING(whether localtime caches TZ)
|
||||
AC_CACHE_VAL(utils_cv_localtime_cache,
|
||||
[if test x$ac_cv_func_tzset = xyes; then
|
||||
AC_TRY_RUN([#include <time.h>
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
extern char **environ;
|
||||
unset_TZ ()
|
||||
{
|
||||
char **from, **to;
|
||||
for (to = from = environ; (*to = *from); from++)
|
||||
if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
|
||||
to++;
|
||||
}
|
||||
main()
|
||||
{
|
||||
time_t now = time ((time_t *) 0);
|
||||
int hour_GMT0, hour_unset;
|
||||
if (putenv ("TZ=GMT0") != 0)
|
||||
exit (1);
|
||||
hour_GMT0 = localtime (&now)->tm_hour;
|
||||
unset_TZ ();
|
||||
hour_unset = localtime (&now)->tm_hour;
|
||||
if (putenv ("TZ=PST8") != 0)
|
||||
exit (1);
|
||||
if (localtime (&now)->tm_hour == hour_GMT0)
|
||||
exit (1);
|
||||
unset_TZ ();
|
||||
if (localtime (&now)->tm_hour != hour_unset)
|
||||
exit (1);
|
||||
exit (0);
|
||||
}], utils_cv_localtime_cache=no, utils_cv_localtime_cache=yes,
|
||||
[# If we have tzset, assume the worst when cross-compiling.
|
||||
utils_cv_localtime_cache=yes])
|
||||
else
|
||||
# If we lack tzset, report that localtime does not cache TZ,
|
||||
# since we can't invalidate the cache if we don't have tzset.
|
||||
utils_cv_localtime_cache=no
|
||||
fi])dnl
|
||||
AC_MSG_RESULT($utils_cv_localtime_cache)
|
||||
if test $utils_cv_localtime_cache = yes; then
|
||||
AC_DEFINE(LOCALTIME_CACHE, 1, [FIXME])
|
||||
fi
|
||||
|
||||
# SCO-ODT-3.0 is reported to need -los to link programs using initgroups
|
||||
AC_CHECK_FUNCS(initgroups)
|
||||
if test $ac_cv_func_initgroups = no; then
|
||||
AC_CHECK_LIB(os, initgroups)
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(syslog)
|
||||
if test $ac_cv_func_syslog = no; then
|
||||
# syslog is not in the default libraries. See if it's in some other.
|
||||
for lib in bsd socket inet; do
|
||||
AC_CHECK_LIB($lib, syslog, [AC_DEFINE(HAVE_SYSLOG, 1, [FIXME])
|
||||
LIBS="$LIBS -l$lib"; break])
|
||||
done
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for 3-argument setpriority function)
|
||||
AC_CACHE_VAL(utils_cv_func_setpriority,
|
||||
[AC_TRY_LINK([#include <sys/time.h>
|
||||
#include <sys/resource.h>],
|
||||
[setpriority(0, 0, 0);],
|
||||
utils_cv_func_setpriority=yes, utils_cv_func_setpriority=no)])
|
||||
AC_MSG_RESULT($utils_cv_func_setpriority)
|
||||
if test $utils_cv_func_setpriority = yes; then
|
||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS nice"
|
||||
OPTIONAL_BIN_ZCRIPTS="$OPTIONAL_BIN_ZCRIPTS nohup"
|
||||
MAN="$MAN nice.1 nohup.1"
|
||||
else
|
||||
AC_MSG_CHECKING(for nice function)
|
||||
AC_CACHE_VAL(utils_cv_func_nice,
|
||||
[AC_TRY_LINK([], nice();,
|
||||
utils_cv_func_nice=yes, utils_cv_func_nice=no)])
|
||||
AC_MSG_RESULT($utils_cv_func_nice)
|
||||
if test $utils_cv_func_nice = yes; then
|
||||
AC_DEFINE(NICE_PRIORITY, 1, [FIXME])
|
||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS nice"
|
||||
OPTIONAL_BIN_ZCRIPTS="$OPTIONAL_BIN_ZCRIPTS nohup"
|
||||
MAN="$MAN nice.1 nohup.1"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_DEFUN(jm_DUMMY_1,
|
||||
[
|
||||
AC_REQUIRE([jm_PREREQ_READUTMP])
|
||||
if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
|
||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS pinky users who"
|
||||
MAN="$MAN pinky.1 users.1 who.1"
|
||||
fi
|
||||
])
|
||||
jm_DUMMY_1
|
||||
|
||||
AC_MSG_CHECKING(ut_host in struct utmp)
|
||||
AC_CACHE_VAL(su_cv_func_ut_host_in_utmp,
|
||||
[AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <utmp.h>], [struct utmp ut; ut.ut_host;],
|
||||
su_cv_func_ut_host_in_utmp=yes, su_cv_func_ut_host_in_utmp=no)])
|
||||
AC_MSG_RESULT($su_cv_func_ut_host_in_utmp)
|
||||
if test $su_cv_func_ut_host_in_utmp = yes; then
|
||||
have_ut_host=1
|
||||
AC_DEFINE(HAVE_UT_HOST, 1, [FIXME])
|
||||
fi
|
||||
|
||||
if test -z "$have_ut_host"; then
|
||||
AC_MSG_CHECKING(ut_host in struct utmpx)
|
||||
AC_CACHE_VAL(su_cv_func_ut_host_in_utmpx,
|
||||
[AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <utmpx.h>], [struct utmpx ut; ut.ut_host;],
|
||||
su_cv_func_ut_host_in_utmpx=yes, su_cv_func_ut_host_in_utmpx=no)])
|
||||
AC_MSG_RESULT($su_cv_func_ut_host_in_utmpx)
|
||||
if test $su_cv_func_ut_host_in_utmpx = yes; then
|
||||
AC_DEFINE(HAVE_UTMPX_H, 1, [FIXME])
|
||||
AC_DEFINE(HAVE_UT_HOST, 1, [FIXME])
|
||||
fi
|
||||
fi
|
||||
|
||||
GNULIB_BOOT_TIME(
|
||||
[OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uptime" MAN="$MAN uptime.1"])
|
||||
|
||||
AM_SYS_POSIX_TERMIOS
|
||||
jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
|
||||
|
||||
if test $am_cv_sys_posix_termios = yes; then
|
||||
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS stty" MAN="$MAN stty.1"
|
||||
|
||||
AC_MSG_CHECKING(whether termios.h needs _XOPEN_SOURCE)
|
||||
AC_CACHE_VAL(su_cv_sys_termios_needs_xopen_source,
|
||||
[AC_EGREP_CPP(yes, [#include <termios.h>
|
||||
#ifdef IUCLC
|
||||
yes
|
||||
#endif], su_cv_sys_termios_needs_xopen_source=no,
|
||||
AC_EGREP_CPP(yes, [#define _XOPEN_SOURCE
|
||||
#include <termios.h>
|
||||
#ifdef IUCLC
|
||||
yes
|
||||
#endif], su_cv_sys_termios_needs_xopen_source=yes,
|
||||
su_cv_sys_termios_needs_xopen_source=no))])
|
||||
AC_MSG_RESULT($su_cv_sys_termios_needs_xopen_source)
|
||||
test $su_cv_sys_termios_needs_xopen_source = yes &&
|
||||
AC_DEFINE(TERMIOS_NEEDS_XOPEN_SOURCE, 1, [FIXME])
|
||||
|
||||
AC_MSG_CHECKING(c_line in struct termios)
|
||||
AC_CACHE_VAL(su_cv_sys_c_line_in_termios,
|
||||
[AC_TRY_LINK([#if TERMIOS_NEEDS_XOPEN_SOURCE
|
||||
#define _XOPEN_SOURCE
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <termios.h>],
|
||||
[struct termios t; t.c_line;],
|
||||
su_cv_sys_c_line_in_termios=yes,
|
||||
su_cv_sys_c_line_in_termios=no)])
|
||||
AC_MSG_RESULT($su_cv_sys_c_line_in_termios)
|
||||
test $su_cv_sys_c_line_in_termios = yes && AC_DEFINE(HAVE_C_LINE, 1, [FIXME])
|
||||
fi
|
||||
|
||||
# FIXME: note that this macro appears above, too.
|
||||
# I'm leaving it here for now. This whole thing needs to be modernized...
|
||||
jm_WINSIZE_IN_PTEM
|
||||
|
||||
jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H
|
||||
|
||||
if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no && \
|
||||
test $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h = no; then
|
||||
AC_MSG_CHECKING(TIOCGWINSZ in sys/pty.h)
|
||||
AC_CACHE_VAL(su_cv_sys_tiocgwinsz_in_sys_pty_h,
|
||||
[AC_TRY_LINK([#include <sys/types.h>
|
||||
#ifdef WINSIZE_IN_PTEM
|
||||
# include <sys/stream.h>
|
||||
# include <sys/ptem.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/pty.h>],
|
||||
[int x = TIOCGWINSZ;],
|
||||
su_cv_sys_tiocgwinsz_in_sys_pty_h=yes,
|
||||
su_cv_sys_tiocgwinsz_in_sys_pty_h=no)])
|
||||
AC_MSG_RESULT($su_cv_sys_tiocgwinsz_in_sys_pty_h)
|
||||
|
||||
test $su_cv_sys_tiocgwinsz_in_sys_pty_h = yes \
|
||||
&& AC_DEFINE(GWINSZ_IN_SYS_PTY, 1,
|
||||
[Define if your system defines TIOCGWINSZ in sys/pty.h.])
|
||||
fi
|
||||
|
||||
# For src/kill.c.
|
||||
AC_CHECK_DECLS([strsignal, strtoimax, sys_siglist, _sys_siglist])
|
||||
|
||||
jm_LIB_CHECK
|
||||
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
AC_CONFIG_FILES(
|
||||
Makefile
|
||||
doc/Makefile
|
||||
lib/Makefile
|
||||
man/Makefile
|
||||
m4/Makefile
|
||||
po/Makefile.in
|
||||
src/Makefile
|
||||
tests/Makefile
|
||||
tests/basename/Makefile
|
||||
tests/chgrp/Makefile
|
||||
tests/chmod/Makefile
|
||||
tests/chown/Makefile
|
||||
tests/cp/Makefile
|
||||
tests/cut/Makefile
|
||||
tests/date/Makefile
|
||||
tests/dd/Makefile
|
||||
tests/dircolors/Makefile
|
||||
tests/du/Makefile
|
||||
tests/expr/Makefile
|
||||
tests/factor/Makefile
|
||||
tests/fmt/Makefile
|
||||
tests/head/Makefile
|
||||
tests/install/Makefile
|
||||
tests/join/Makefile
|
||||
tests/ln/Makefile
|
||||
tests/ls-2/Makefile
|
||||
tests/ls/Makefile
|
||||
tests/md5sum/Makefile
|
||||
tests/misc/Makefile
|
||||
tests/mkdir/Makefile
|
||||
tests/mv/Makefile
|
||||
tests/od/Makefile
|
||||
tests/pr/Makefile
|
||||
tests/rm/Makefile
|
||||
tests/rmdir/Makefile
|
||||
tests/seq/Makefile
|
||||
tests/sha1sum/Makefile
|
||||
tests/shred/Makefile
|
||||
tests/sort/Makefile
|
||||
tests/stty/Makefile
|
||||
tests/sum/Makefile
|
||||
tests/tac/Makefile
|
||||
tests/tail-2/Makefile
|
||||
tests/tail/Makefile
|
||||
tests/test/Makefile
|
||||
tests/touch/Makefile
|
||||
tests/tr/Makefile
|
||||
tests/tsort/Makefile
|
||||
tests/unexpand/Makefile
|
||||
tests/uniq/Makefile
|
||||
tests/wc/Makefile
|
||||
)
|
||||
AC_OUTPUT
|
||||
154
doc/ChangeLog
154
doc/ChangeLog
@@ -1,3 +1,157 @@
|
||||
2002-07-22 Martin Michlmayr <tbm@cyrius.com>
|
||||
|
||||
* coreutils.texi (Formatting the file names): Document
|
||||
that -N/--literal are equivalent to --quoting-style=literal.
|
||||
Reported by Oskar Liljeblad as Debian bug#103612.
|
||||
|
||||
2002-07-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (du invocation): s/PAT/PATTERN/.
|
||||
From Martin Michlmayr.
|
||||
|
||||
2002-07-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (cp invocation): Remove unnecessary "$@" in example;
|
||||
Texinfo would render the @" as an umlaut over the following character.
|
||||
From Paul Eggert.
|
||||
* Makefile.am (check-texinfo): Check for the above.
|
||||
|
||||
2002-07-06 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (stat invocation): Remove description of --secure.
|
||||
|
||||
2002-07-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (stat invocation): Rename --link/-l
|
||||
to --dereference/-L. Rewrite description of --dereference.
|
||||
|
||||
2002-06-26 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (Putting the tools together): Don't mention egrep,
|
||||
since it's not part of POSIX 1003.1-2001.
|
||||
|
||||
2002-06-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (stat invocation): New section. From Michael Meskes.
|
||||
|
||||
2002-05-19 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (ls invocation): Document new option: --author.
|
||||
|
||||
2002-06-03 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (rm invocation): Add the warning (also in the --help
|
||||
output) that the contents of a removed file are often recoverable.
|
||||
|
||||
2002-05-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (check-texinfo): Adapt to reflect that now we use
|
||||
@acronym{POSIX}.
|
||||
|
||||
2002-05-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi: Use @acronym in place of most uses of @sc.
|
||||
* getdate.texi (Date input formats): Likewise.
|
||||
|
||||
2002-04-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi: Change `@code{PROG}' to `@command{PROG}'.
|
||||
|
||||
2002-04-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (kill invocation): Document the above.
|
||||
Document POSIX signals better.
|
||||
|
||||
2002-04-15 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi: Document kill.
|
||||
Written by Marcus Brinkmann.
|
||||
|
||||
2002-04-13 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi: Document link and unlink.
|
||||
|
||||
2002-04-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi: Use new directives, @copying and @insertcopying,
|
||||
thus now requiring texinfo-4.2 to create the .info file.
|
||||
|
||||
2002-02-26 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (File characteristic tests): Document the
|
||||
behavior of test -nt and -ot when one of the files does not exist,
|
||||
using the same behavior that is documented in ksh93.
|
||||
|
||||
2002-03-05 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (cut invocation): Say that selected input is
|
||||
written in the same order that it is read, and is written
|
||||
exactly once.
|
||||
|
||||
2002-03-03 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Make cp -r equivalent to cp -R. Add a new cp option --copy-contents
|
||||
for people who want to emulate the traditional (and rarely desirable)
|
||||
cp -r behavior.
|
||||
|
||||
* coreutils.texi (cp invocation): Document this.
|
||||
Fix some related minor bugs: --no-dereference is no longer
|
||||
equivalent to -d, and --archive (-a) can override the other
|
||||
symlink options. Warn that cp -R is not portable on symbolic
|
||||
links unless you also specify -P.
|
||||
|
||||
2002-03-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (cp invocation): Document that cp -r
|
||||
preserves symlinks. Emphasize non-portability of cp -r.
|
||||
|
||||
2002-02-27 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (Time directives): Add %N for nanoseconds.
|
||||
This documents the recent change to 'ls'.
|
||||
|
||||
2002-02-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (pr invocation): Reword to avoid using `:'
|
||||
in an @opindex entry -- info doesn't permit it.
|
||||
|
||||
2002-02-27 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (Formatting file timestamps): Document new
|
||||
time-formatting method: --time-style=+FORMAT.
|
||||
|
||||
2002-02-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (seq invocation): In the example, use "tail
|
||||
-n 3", not "tail -3", to conform to POSIX 1003.1-2001.
|
||||
|
||||
2002-02-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (tsort background): New section.
|
||||
From Ian Lance Taylor.
|
||||
(tsort invocation): Add a more realistic example.
|
||||
|
||||
2002-02-15 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi: Document _POSIX2_VERSION.
|
||||
(Standards Conformance): New section.
|
||||
|
||||
2002-01-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (START-INFO-DIR-ENTRY): Remove a few entries
|
||||
and clean up a few others based on suggestions from Bob Proulx.
|
||||
|
||||
2002-02-14 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Add support for POSIX 1003.1-2001, which requires removal for
|
||||
support of obsolete "+" option syntax in sort, tail, and uniq.
|
||||
* coreutils.texi: Document this. (Also, document a similar
|
||||
change to "touch", for fileutils).
|
||||
|
||||
2002-01-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (shred invocation): List some journaled filesystems.
|
||||
|
||||
2001-11-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* coreutils.texi (Date directives): Document %u.
|
||||
|
||||
@@ -31,6 +31,9 @@ $(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 2> /dev/null && exit 1 || :
|
||||
grep '\$$@"' $(srcdir)/*.texi && exit 1 || :
|
||||
$(PERL) -ne \
|
||||
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ || /{posix}/ and print,exit 1' \
|
||||
$(srcdir)/*.texi 2> /dev/null && : || exit 1
|
||||
|
||||
check: check-texinfo
|
||||
|
||||
238
doc/Makefile.in
238
doc/Makefile.in
@@ -1,7 +1,7 @@
|
||||
# Makefile.in generated by automake 1.5a from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6a from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -14,110 +14,72 @@
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FESETROUND_LIBM = @FESETROUND_LIBM@
|
||||
GENCAT = @GENCAT@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBS = @LIBS@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
LIB_NANOSLEEP = @LIB_NANOSLEEP@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SEQ_LIBM = @SEQ_LIBM@
|
||||
SQRT_LIBM = @SQRT_LIBM@
|
||||
U = @U@
|
||||
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@
|
||||
|
||||
info_TEXINFOS = coreutils.texi
|
||||
|
||||
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
|
||||
# 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,30 +90,98 @@ EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
|
||||
# and those names all map to one 14-byte name (<package>.info-) on some crufty
|
||||
# old systems.
|
||||
MAKEINFO = makeinfo --no-split
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
POSUB = @POSUB@
|
||||
POW_LIB = @POW_LIB@
|
||||
RANLIB = @RANLIB@
|
||||
SEQ_LIBM = @SEQ_LIBM@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SQRT_LIBM = @SQRT_LIBM@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
YACC = @YACC@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
info_TEXINFOS = coreutils.texi
|
||||
|
||||
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
|
||||
subdir = doc
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex
|
||||
INFO_DEPS = coreutils.info
|
||||
DVIS = coreutils.dvi
|
||||
PDFS = coreutils.pdf
|
||||
PSS = coreutils.ps
|
||||
TEXINFOS = coreutils.texi
|
||||
DIST_COMMON = ChangeLog Makefile.am Makefile.in mdate-sh stamp-vti \
|
||||
texinfo.tex version.texi
|
||||
DIST_COMMON = ChangeLog Makefile.am Makefile.in stamp-vti version.texi
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .info .ps .texi
|
||||
.SUFFIXES: .dvi .info .pdf .ps .texi
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
$(AUTOMAKE) --gnits doc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
|
||||
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||
@:
|
||||
$(srcdir)/stamp-vti: coreutils.texi $(top_srcdir)/configure.ac
|
||||
@(set `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/coreutils.texi`; \
|
||||
@(set `$(SHELL) $(top_srcdir)/config/mdate-sh $(srcdir)/coreutils.texi`; \
|
||||
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||
echo "@set EDITION $(VERSION)"; \
|
||||
@@ -170,6 +200,7 @@ maintainer-clean-vti:
|
||||
|
||||
coreutils.info: coreutils.texi $(srcdir)/version.texi
|
||||
coreutils.dvi: coreutils.texi $(srcdir)/version.texi
|
||||
coreutils.pdf: coreutils.texi $(srcdir)/version.texi
|
||||
|
||||
.texi.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
@@ -178,16 +209,23 @@ coreutils.dvi: coreutils.texi $(srcdir)/version.texi
|
||||
`echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS="$(srcdir)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
TEXINPUTS="$(top_srcdir)/config$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) $<
|
||||
|
||||
.texi.pdf:
|
||||
TEXINPUTS="$(top_srcdir)/config$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2PDF) $<
|
||||
|
||||
.texi:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
||||
`echo $< | sed 's,.*/,,'`
|
||||
TEXI2DVI = texi2dvi
|
||||
|
||||
TEXI2PDF = $(TEXI2DVI) --pdf
|
||||
DVIPS = dvips
|
||||
.dvi.ps:
|
||||
$(DVIPS) $< -o $@
|
||||
@@ -195,7 +233,7 @@ DVIPS = dvips
|
||||
uninstall-info-am:
|
||||
$(PRE_UNINSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
||||
install-info --version | grep -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"; \
|
||||
@@ -225,12 +263,12 @@ dist-info: $(INFO_DEPS)
|
||||
mostlyclean-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
|
||||
coreutils.pdf coreutils.pg coreutils.ps coreutils.tmp \
|
||||
coreutils.toc coreutils.tp coreutils.vr
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
cd $(srcdir) && \
|
||||
for i in $(INFO_DEPS); do \
|
||||
list='$(INFO_DEPS)'; for i in $$list; do \
|
||||
rm -f $$i; \
|
||||
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
|
||||
rm -f $$i-[0-9]*; \
|
||||
@@ -239,21 +277,29 @@ maintainer-clean-aminfo:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
@list='$(DISTFILES)'; for file in $$list; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
@@ -261,7 +307,7 @@ distdir: $(DISTFILES)
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="${top_distdir}" distdir="$(distdir)" \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
@@ -281,6 +327,7 @@ install-am: all-am
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
@@ -288,7 +335,7 @@ mostlyclean-generic:
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@@ -331,7 +378,7 @@ install-info-am: $(INFO_DEPS)
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
||||
install-info --version | grep -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";\
|
||||
@@ -351,6 +398,14 @@ mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am: $(PDFS)
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am: $(PSS)
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic dist-info \
|
||||
@@ -360,8 +415,8 @@ uninstall-am: uninstall-info-am
|
||||
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
|
||||
mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
# Remove `DISABLED_' when fileutils, textutils, and sh-utils have
|
||||
@@ -382,7 +437,10 @@ $(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 2> /dev/null && exit 1 || :
|
||||
grep '\$$@"' $(srcdir)/*.texi && exit 1 || :
|
||||
$(PERL) -ne \
|
||||
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ || /{posix}/ and print,exit 1' \
|
||||
$(srcdir)/*.texi 2> /dev/null && : || exit 1
|
||||
|
||||
check: check-texinfo
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
|
||||
8
doc/code-vs-command
Normal file
8
doc/code-vs-command
Normal file
@@ -0,0 +1,8 @@
|
||||
perl -pi -e \
|
||||
's/\@code\{('"$(echo cp dd df dir dircolors du install ln ls mkdir mkfifo mknod mv shred touch vdir|tr ' ' '|')"')\}/\@command{$1}/' coreutils.texi
|
||||
|
||||
perl -pi -e \
|
||||
's/\@code\{('"$(echo cp dd df dir dircolors du install ln ls mkdir mkfifo mknod mv shred touch vdir|tr ' ' '|')"')\}/\@command{$1}/' coreutils.texi
|
||||
|
||||
regex=$((textutils; shellutils) | tr -s ' ' '|')
|
||||
perl -pi -e 's/\@code\{('"$regex"')\}/\@command{$1}/' coreutils.texi
|
||||
2553
doc/coreutils.texi
2553
doc/coreutils.texi
File diff suppressed because it is too large
Load Diff
@@ -35,13 +35,13 @@ programs accept. These are the strings you, as a user, can supply as
|
||||
arguments to the various programs. The C interface (via the
|
||||
@code{getdate} function) is not described here.
|
||||
|
||||
@cindex beginning of time, for @sc{posix}
|
||||
@cindex epoch, for @sc{posix}
|
||||
@cindex beginning of time, for @acronym{POSIX}
|
||||
@cindex epoch, for @acronym{POSIX}
|
||||
Although the date syntax here can represent any possible time since the
|
||||
year zero, computer integers often cannot represent such a wide range of
|
||||
time. On @sc{posix} systems, the clock starts at 1970-01-01 00:00:00
|
||||
@sc{utc}: @sc{posix} does not require support for times before the
|
||||
@sc{posix} Epoch and times far in the future. Traditional Unix systems
|
||||
time. On @acronym{POSIX} systems, the clock starts at 1970-01-01 00:00:00
|
||||
@sc{utc}: @acronym{POSIX} does not require support for times before the
|
||||
@acronym{POSIX} Epoch and times far in the future. Traditional Unix systems
|
||||
have 32-bit signed @code{time_t} and can represent times from 1901-12-13
|
||||
20:45:52 through 2038-01-19 03:14:07 @sc{utc}. Systems with 64-bit
|
||||
signed @code{time_t} can represent all the times in the known
|
||||
|
||||
356
lib/ChangeLog
356
lib/ChangeLog
@@ -1,3 +1,359 @@
|
||||
2002-07-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
|
||||
and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
|
||||
|
||||
* gettext.h: Upgrade to gettext-0.11.3.
|
||||
|
||||
2002-07-13 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* xstat.in: Include <string.h>.
|
||||
* mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
|
||||
on FreeBSD.
|
||||
|
||||
2002-07-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
|
||||
ones. At least on GNU/Linux systems, `auto' means something else.
|
||||
From Michael Stone.
|
||||
|
||||
2002-07-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* c-stack.c: Include sys/time.h.
|
||||
From Volker Borchert.
|
||||
|
||||
2002-06-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
|
||||
New macro. Use it uniformly instead of
|
||||
(defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
|
||||
It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
|
||||
reported by Vin Shelton.
|
||||
|
||||
2002-06-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
|
||||
redefinition due to Solaris5.6's definition in /usr/include/sys/euc.h.
|
||||
|
||||
2002-06-22 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
|
||||
Do not assume SA_SIGINFO behavior.
|
||||
Bug reported by Jim Meyering on NetBSD 1.5.2.
|
||||
|
||||
2002-06-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
|
||||
|
||||
* exitfail.c, exitfail.h: Likewise.
|
||||
* Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
|
||||
of fnmatch.h.
|
||||
(EXTRA_DIST): Add fnmatch_loop.c.
|
||||
(libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
|
||||
|
||||
* fnmatch_loop.c: New file, from diffutils-2.8.2.
|
||||
* fnmatch.c: Update from diffutils-2.8.2.
|
||||
* fnmatch_.h: New file. From diffutils-2.8.2.
|
||||
* fnmatch.h: Remove file.
|
||||
|
||||
2002-06-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* file-type.h: Report an error if neither S_ISREG nor
|
||||
S_IFREG is defined, instead of using a test specific to glibc
|
||||
2.2. This should be safe, since POSIX requires S_ISREG and
|
||||
Unix Version 7 had S_IFREG. We don't need to check for
|
||||
<sys/types.h> since we don't use any symbols that it defines.
|
||||
|
||||
2002-06-15 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
|
||||
For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
|
||||
have been included before this file.
|
||||
|
||||
2002-06-13 Richard Dawe <richdawe@bigfoot.com>
|
||||
|
||||
* Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
|
||||
so that each temporary file name is unique and valid in the first
|
||||
8 characters, for operation under DOS.
|
||||
|
||||
2002-06-15 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Work even with DJGPP 2.03, which lacks support for symlinks.
|
||||
From Richard Dawe.
|
||||
* xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
|
||||
is defined.
|
||||
* lchown.c (S_ISLNK): Likewise.
|
||||
|
||||
2002-06-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* file-type.h: Use the version from diffutils-2.8.2.
|
||||
* file-type.c: Likewise.
|
||||
|
||||
2002-05-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
Fix a problem seen only on nonconforming systems whereby ls.c's
|
||||
use of localtime, and then of gettimeofday would cause trouble:
|
||||
the localtime call used to initialize rpl_gettimeofday's save
|
||||
mechanism would clobber ls's current local time information so
|
||||
that in any long listing the first file would always be listed
|
||||
with date 1970-01-01. Analysis by Volker Borchert.
|
||||
|
||||
* gettimeofday.c (localtime): Undefine.
|
||||
(rpl_localtime): New function.
|
||||
|
||||
2002-05-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
|
||||
* file-type.h: New file.
|
||||
* file-type.c (file_type): New file/function. Extracted from diffutils.
|
||||
|
||||
2002-04-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
|
||||
|
||||
2002-04-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
|
||||
depending on <sys/wait.h> and WTERMSIG. Default to 64 instead
|
||||
of 127, since 64 is the largest conceivable number for ancient
|
||||
nonstandard hosts.
|
||||
* sig2str.c: Do not include <sys/wait.h>; no longer needed.
|
||||
|
||||
2002-04-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* sig2str.c (WTERMSIG): Remove definition (unused).
|
||||
|
||||
2002-04-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* sig2str.h, sig2str.c: New files.
|
||||
* Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
|
||||
|
||||
2002-04-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* gettext.h: New file, from Gettext.
|
||||
* Makefile.am (INCLUDES): Remove -I../intl.
|
||||
(libfetish_a_SOURCES): Add gettext.h.
|
||||
|
||||
2002-04-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* readutmp.h (UT_TYPE): Remove definition (now in who.c).
|
||||
(HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
|
||||
(HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
|
||||
|
||||
2002-04-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* dirfd.h (dirfd): Elide prototype if dirfd is a macro.
|
||||
|
||||
2002-03-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* makepath.c (make_path): Remove a comma from a diagnostic.
|
||||
Suggestion from Santiago Vila.
|
||||
|
||||
2002-03-08 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* rename.c: Mention that this wrapper is needed also on
|
||||
mips-dec-ultrix4.4 systems.
|
||||
|
||||
2002-03-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
|
||||
not HAVE_CLOCK_SETTIME.
|
||||
|
||||
2002-02-27 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* nanosleep.h: Rename to....
|
||||
* timespec.h: New name for nanosleep.h. All uses changed.
|
||||
|
||||
* gettime.c: New file.
|
||||
* settime.c: New file.
|
||||
* stime.c: Remove.
|
||||
|
||||
* Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
|
||||
timespec.h. Remove nanosleep.h.
|
||||
|
||||
2002-02-25 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* acl.c, acl.h: New files.
|
||||
* Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
|
||||
|
||||
2002-02-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* strnlen.c (strnlen): Define-away/undef so that an inconsistent
|
||||
prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
|
||||
cause trouble. Reported by Nelson Beebe.
|
||||
|
||||
2002-02-23 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* path-concat.c (xpath_concat): Reorder code to pacify
|
||||
compilers that don't know that xalloc_die never returns.
|
||||
|
||||
2002-02-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* getdate.c: Regenerate using bison-1.33.
|
||||
|
||||
2002-02-15 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* posixver.c, posixver.h: New files.
|
||||
* Makefile.am (libfetish_a_SOURCES): Add them.
|
||||
|
||||
2002-02-02 Paul Eggert <eggert@twinsun.com>
|
||||
Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* unicodeio.h (print_unicode_char): Add exit_on_error argument.
|
||||
(fwrite_success_callback): New declaration.
|
||||
* unicodeio.c (unicode_to_mb): New function, extracted from
|
||||
print_unicode_char. Call failure callback instead of error.
|
||||
(fwrite_success_callback): New function.
|
||||
(exit_failure_callback): New function.
|
||||
(fallback_failure_callback): New function.
|
||||
(print_unicode_char): Call unicode_to_mb.
|
||||
|
||||
2002-01-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (getdate$U.o): Depend on unlocked-io.h.
|
||||
|
||||
2002-01-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
|
||||
Otherwise, some versions of automake would omit the rule that makes
|
||||
Makefile from Makefile.in.
|
||||
|
||||
2001-01-21 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* xmemcoll.h, xmemcoll.c: New files.
|
||||
* Makefile.am (libfetish_a_SOURCES): Add them.
|
||||
* memcoll.c: Include errno.h, and declare errno if not defined.
|
||||
(memcoll): Set errno to zero if there is no error.
|
||||
|
||||
* quotearg.c (quotearg_buffer_restyled):
|
||||
Fix bug with quoting buffers containing NUL when backslashing escapes.
|
||||
This bug was exposed by the other changes in this patch.
|
||||
(quotearg_n_options): New arg ARGSIZE.
|
||||
All callers changed.
|
||||
(quoting_options_from_style): New function.
|
||||
(quotearg_n_style): Use it.
|
||||
(quotearg_n_style_mem): New function.
|
||||
|
||||
* quotearg.h (quotearg_n_style_mem): New function.
|
||||
|
||||
2002-01-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* getdate.y: Add three semicolons, each just before a closing brace.
|
||||
Bison (as of version 1.31) no longer papers over that mistake.
|
||||
|
||||
2002-02-14 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* backupfile.c (ISDIGIT): Comment fix.
|
||||
* getdate.y (ISDIGIT): Likewise.
|
||||
* posixtm.c (ISDIGIT, year): Likewise.
|
||||
* strverscmp.c (ISDIGIT): Likewise.
|
||||
* userspec.c (ISDIGIT): Likewise.
|
||||
|
||||
2002-01-05 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* version-etc.c (version_etc_copyright): Update copyright year.
|
||||
|
||||
2001-01-19 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* closeout.c (close_stdout_status): If ferror (stdout), do
|
||||
not silently exit merely because the output buffer happens to
|
||||
have nothing pending.
|
||||
|
||||
2001-12-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
See the big note in ../ChangeLog.
|
||||
* human.c (suffixes): Prefer K to k for 1024.
|
||||
(generate_suffix_backwards): New function.
|
||||
(human_readable_inexact): Use it.
|
||||
* xstrtol.c (__xstrtol): If there is no number but there
|
||||
is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
|
||||
Accept 'K' as well as 'k'.
|
||||
|
||||
2001-12-15 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* regex.h (__restrict_arr): Update from libc.
|
||||
|
||||
* mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
|
||||
as `remote' if the name starts with `//'. Suggested by Michael Stone.
|
||||
(STREQ): Define.
|
||||
|
||||
2001-12-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
|
||||
Instead, include "xalloc.h".
|
||||
(initbuffer): Don't cast xmalloc return value to char*.
|
||||
(readline): Reword comment.
|
||||
Don't cast xrealloc return value to char*
|
||||
Return NULL, not 0.
|
||||
|
||||
2001-12-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* modechange.c (mode_compile): Add cast to avoid pedantic warning about
|
||||
`signed and unsigned type in conditional expression'.
|
||||
* posixtm.c (posix_time_parse): Likewise.
|
||||
|
||||
* xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
|
||||
|
||||
* readtokens.c (readtoken): Declare an index to be of type unsigned
|
||||
to avoid a pedantic warning.
|
||||
|
||||
* getstr.c: Don't include assert.h.
|
||||
(getstr): Remove warning-evoking assertions.
|
||||
Return -1 if offset parameter is out of bounds.
|
||||
Change the type of a local from int to size_t.
|
||||
|
||||
* strftime.c (my_strftime_localtime_r): Include this function
|
||||
definition in the `#if ! HAVE_TM_GMTOFF' block.
|
||||
|
||||
* xgethostname.c: Remove declarations of xmalloc and xrealloc.
|
||||
Include xalloc.h instead.
|
||||
|
||||
2001-12-02 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tempname.c: Don't declare getenv, thus reverting the change of
|
||||
2001-11-18. It's no longer necessary, now that stdlib.h is always
|
||||
included.
|
||||
|
||||
* regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
|
||||
__unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld.
|
||||
|
||||
2001-11-30 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* xstrdup.c: Include xalloc.h, so that xstrdup is declared
|
||||
before being defined.
|
||||
|
||||
2001-11-27 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* quotearg.h (quotearg_n, quotearg_n_style):
|
||||
First arg is int, not unsigned.
|
||||
* quotearg.c (quotearg_n, quotearg_n_style): Likewise.
|
||||
(SIZE_MAX, UINT_MAX): New macros.
|
||||
(quotearg_n_options): Abort if N is negative.
|
||||
Avoid overflow check on hosts where size_t is 64 bits and int
|
||||
is 32 bits, as overflow is impossible there.
|
||||
Fix off-by-one typo that caused unnecessary reallocation.
|
||||
|
||||
2001-11-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* tempname.c: Merge with version from libc.
|
||||
* regex.c: Likewise.
|
||||
|
||||
* tempname.c: Include stdlib.h unconditionally. On some old systems
|
||||
for which STDC_HEADERS is 0, it was not included, resulting in a
|
||||
warning about an integer-to-pointer conversion problem with getenv.
|
||||
Reported by Volker Borchert.
|
||||
|
||||
2001-11-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* gtod.h: Remove file.
|
||||
* Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
|
||||
* gettimeofday.c: Don't include gtod.h.
|
||||
(GTOD_init): Remove function.
|
||||
(rpl_gettimeofday): Do its job here instead, rather than aborting.
|
||||
Suggestion from Volker Borchert.
|
||||
|
||||
2001-11-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* hash.h (struct hash_table): Don't define here. Merely declare it.
|
||||
|
||||
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = ../src/ansi2knr
|
||||
|
||||
noinst_LIBRARIES = libfetish.a
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
INCLUDES = -I.. -I$(srcdir)
|
||||
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
|
||||
## Put relatively complex files at the beginning of the list so
|
||||
@@ -13,8 +13,10 @@ DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
## added by automake, but on systems with an up to date GNU libc,
|
||||
## regex.c isn't even compiled.
|
||||
libfetish_a_SOURCES = \
|
||||
acl.h acl.c \
|
||||
getdate.h getdate.y \
|
||||
posixtm.c posixtm.h \
|
||||
posixver.c posixver.h \
|
||||
strftime.c \
|
||||
getopt.c getopt.h getopt1.c \
|
||||
hash.c hash.h \
|
||||
@@ -26,23 +28,27 @@ libfetish_a_SOURCES = \
|
||||
basename.c \
|
||||
bumpalloc.h \
|
||||
canon-host.c \
|
||||
c-stack.c c-stack.h \
|
||||
closeout.c closeout.h \
|
||||
diacrit.c diacrit.h \
|
||||
dirname.c dirname.h \
|
||||
dirfd.h \
|
||||
dup-safer.c \
|
||||
exclude.c exclude.h \
|
||||
exitfail.c exitfail.h \
|
||||
filemode.c filemode.h \
|
||||
fnmatch.h \
|
||||
file-type.c file-type.h \
|
||||
fnmatch_.h \
|
||||
fopen-safer.c \
|
||||
fsusage.h \
|
||||
full-write.c full-write.h \
|
||||
getline.h \
|
||||
getpagesize.h \
|
||||
getstr.c getstr.h \
|
||||
gettime.c \
|
||||
gettext.h \
|
||||
getugroups.c \
|
||||
group-member.h \
|
||||
gtod.h \
|
||||
hard-locale.c hard-locale.h \
|
||||
human.c human.h \
|
||||
idcache.c \
|
||||
@@ -58,7 +64,6 @@ libfetish_a_SOURCES = \
|
||||
memcoll.c memcoll.h \
|
||||
modechange.c modechange.h \
|
||||
mountlist.h \
|
||||
nanosleep.h \
|
||||
path-concat.c path-concat.h \
|
||||
pathmax.h \
|
||||
physmem.c physmem.h \
|
||||
@@ -71,10 +76,13 @@ libfetish_a_SOURCES = \
|
||||
same.c same.h \
|
||||
save-cwd.c save-cwd.h \
|
||||
savedir.c savedir.h \
|
||||
settime.c \
|
||||
sha.c sha.h \
|
||||
sig2str.h \
|
||||
stdio-safer.h \
|
||||
stripslash.c \
|
||||
strverscmp.h \
|
||||
timespec.h \
|
||||
unicodeio.c unicodeio.h \
|
||||
unistd-safer.h \
|
||||
userspec.c \
|
||||
@@ -83,6 +91,7 @@ libfetish_a_SOURCES = \
|
||||
xgetcwd.c \
|
||||
xgethostname.c \
|
||||
xmalloc.c \
|
||||
xmemcoll.c xmemcoll.h \
|
||||
xreadlink.c xreadlink.h \
|
||||
xstrdup.c \
|
||||
xstrtod.c xstrtod.h \
|
||||
@@ -100,15 +109,17 @@ BUILT_SOURCES = getdate.c lstat.c stat.c unlocked-io.h
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
DISTCLEANFILES = lstat.c stat.c unlocked-io.h
|
||||
|
||||
EXTRA_DIST = xstat.in config.charset ref-add.sin ref-del.sin gen-uio
|
||||
EXTRA_DIST = xstat.in config.charset ref-add.sin ref-del.sin gen-uio \
|
||||
fnmatch_loop.c
|
||||
|
||||
lstat.c: xstat.in
|
||||
sed \
|
||||
-e '/@IGNORE@/d' \
|
||||
-e 's/@xstat@/lstat/g' \
|
||||
-e '/_LSTAT_ONLY@/d' \
|
||||
-e '/@BEGIN_STAT_ONLY@/,/@END_STAT_ONLY@/d' \
|
||||
$(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
$(srcdir)/xstat.in > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
stat.c: xstat.in
|
||||
sed \
|
||||
@@ -116,10 +127,8 @@ stat.c: xstat.in
|
||||
-e 's/@xstat@/stat/g' \
|
||||
-e '/_STAT_ONLY@/d' \
|
||||
-e '/@BEGIN_LSTAT_ONLY@/,/@END_LSTAT_ONLY@/d' \
|
||||
$(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
Makefile: $(BUILT_SOURCES)
|
||||
$(srcdir)/xstat.in > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
# The following is needed in order to install a simple file in $(libdir)
|
||||
# which is shared with other installed packages. We use a list of referencing
|
||||
@@ -164,13 +173,20 @@ charset.alias: config.charset
|
||||
|
||||
SUFFIXES = .sed .sin
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > $@-t
|
||||
mv $@-t $@
|
||||
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
CLEANFILES = charset.alias ref-add.sed ref-del.sed
|
||||
|
||||
###############################################
|
||||
|
||||
# FIXME: remove this dependency once automake handles it.
|
||||
# As of cvs automake of about 2002-01-13,
|
||||
# this dependency is necessary to avoid a build failure
|
||||
# when running `make check' before running `make all'.
|
||||
# Otherwise, unlocked-io.h is not built before it's needed.
|
||||
getdate$U.o: unlocked-io.h
|
||||
|
||||
# FIXME: CAUTION this list is a duplicate of one in ../Makefile.cfg.
|
||||
io_functions = \
|
||||
clearerr feof ferror fflush fgets fputc fputs \
|
||||
|
||||
924
lib/Makefile.in
924
lib/Makefile.in
File diff suppressed because it is too large
Load Diff
62
lib/acl.c
Normal file
62
lib/acl.c
Normal file
@@ -0,0 +1,62 @@
|
||||
/* acl.c - access control lists
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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 <sys/stat.h>
|
||||
#ifndef S_ISLNK
|
||||
# define S_ISLNK(Mode) 0
|
||||
#endif
|
||||
|
||||
#include "acl.h"
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef ENOSYS
|
||||
# define ENOSYS (-1)
|
||||
#endif
|
||||
|
||||
#ifndef MIN_ACL_ENTRIES
|
||||
# define MIN_ACL_ENTRIES 4
|
||||
#endif
|
||||
|
||||
/* Return 1 if PATH has a nontrivial access control list, 0 if not,
|
||||
and -1 (setting errno) if an error is encountered. */
|
||||
|
||||
int
|
||||
file_has_acl (char const *path, struct stat const *pathstat)
|
||||
{
|
||||
/* FIXME: This implementation should work on recent-enough versions
|
||||
of HP-UX, Solaris, and Unixware, but it simply returns 0 with
|
||||
POSIX 1003.1e (draft 17 -- abandoned), AIX, GNU/Linux, Irix, and
|
||||
Tru64. Please see Samba's source/lib/sysacls.c file for
|
||||
fix-related ideas. */
|
||||
|
||||
#if HAVE_ACL && defined GETACLCNT
|
||||
if (! S_ISLNK (pathstat->st_mode))
|
||||
{
|
||||
int n = acl (path, GETACLCNT, 0, NULL);
|
||||
return n < 0 ? (errno == ENOSYS ? 0 : -1) : (MIN_ACL_ENTRIES < n);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
28
lib/acl.h
Normal file
28
lib/acl.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/* acl.c - access control lists
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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_SYS_ACL_H && HAVE_ACL
|
||||
# include <sys/acl.h>
|
||||
#endif
|
||||
#if ! defined GETACLCNT && defined ACL_CNT
|
||||
# define GETACLCNT ACL_CNT
|
||||
#endif
|
||||
|
||||
int file_has_acl (char const *, struct stat const *);
|
||||
@@ -1,5 +1,5 @@
|
||||
/* backupfile.c -- make Emacs style backup file names
|
||||
Copyright 1990,91,92,93,94,95,96,97,98,99,2000, 2001 Free Software
|
||||
Copyright (C) 1990,91,92,93,94,95,96,97,98,99,2000, 2001, 2002 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -95,10 +95,9 @@ char *malloc ();
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
- It's typically faster.
|
||||
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless
|
||||
it's important to use the locale's definition of `digit' even when the
|
||||
host does not conform to Posix. */
|
||||
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
|
||||
ISDIGIT_LOCALE unless it's important to use the locale's definition
|
||||
of `digit' even when the host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
#if D_INO_IN_DIRENT
|
||||
|
||||
435
lib/c-stack.c
Normal file
435
lib/c-stack.c
Normal file
@@ -0,0 +1,435 @@
|
||||
/* Stack overflow handling.
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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. */
|
||||
|
||||
/* NOTES:
|
||||
|
||||
A program that uses alloca, dynamic arrays, or large local
|
||||
variables may extend the stack by more than a page at a time. If
|
||||
so, when the stack overflows the operating system may not detect
|
||||
the overflow until the program uses the array, and this module may
|
||||
incorrectly report a program error instead of a stack overflow.
|
||||
|
||||
To avoid this problem, allocate only small objects on the stack; a
|
||||
program should be OK if it limits single allocations to a page or
|
||||
less. Allocate larger arrays in static storage, or on the heap
|
||||
(e.g., with malloc). Yes, this is a pain, but we don't know of any
|
||||
better solution that is portable.
|
||||
|
||||
No attempt has been made to deal with multithreaded applications.
|
||||
|
||||
If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, the current implementation
|
||||
assumes that, if the RLIMIT_STACK limit changes during execution,
|
||||
then c_stack_action is invoked immediately afterwards. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef __attribute__
|
||||
# if __GNUC__ < 3 || __STRICT_ANSI__
|
||||
# define __attribute__(x)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "gettext.h"
|
||||
#define _(msgid) gettext (msgid)
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef ENOTSUP
|
||||
# define ENOTSUP EINVAL
|
||||
#endif
|
||||
#ifndef EOVERFLOW
|
||||
# define EOVERFLOW EINVAL
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
#if ! HAVE_STACK_T && ! defined stack_t
|
||||
typedef struct sigaltstack stack_t;
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if HAVE_SYS_RESOURCE_H
|
||||
/* Include sys/time.h here, because...
|
||||
SunOS-4.1.x <sys/resource.h> fails to include <sys/time.h>.
|
||||
This gives "incomplete type" errors for ru_utime and tu_stime. */
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# endif
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UCONTEXT_H
|
||||
# include <ucontext.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifndef STDERR_FILENO
|
||||
# define STDERR_FILENO 2
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include "c-stack.h"
|
||||
#include "exitfail.h"
|
||||
|
||||
extern char *program_name;
|
||||
|
||||
/* The user-specified action to take when a SEGV-related program error
|
||||
or stack overflow occurs. */
|
||||
static void (* volatile segv_action) (int);
|
||||
|
||||
/* Translated messages for program errors and stack overflow. Do not
|
||||
translate them in the signal handler, since gettext is not
|
||||
async-signal-safe. */
|
||||
static char const * volatile program_error_message;
|
||||
static char const * volatile stack_overflow_message;
|
||||
|
||||
/* Output an error message, then exit with status EXIT_FAILURE if it
|
||||
appears to have been a stack overflow, or with a core dump
|
||||
otherwise. This function is async-signal-safe. */
|
||||
|
||||
static void die (int) __attribute__ ((noreturn));
|
||||
static void
|
||||
die (int signo)
|
||||
{
|
||||
char const *message =
|
||||
signo ? program_error_message : stack_overflow_message;
|
||||
segv_action (signo);
|
||||
write (STDERR_FILENO, program_name, strlen (program_name));
|
||||
write (STDERR_FILENO, ": ", 2);
|
||||
write (STDERR_FILENO, message, strlen (message));
|
||||
write (STDERR_FILENO, "\n", 1);
|
||||
if (! signo)
|
||||
_exit (exit_failure);
|
||||
kill (getpid (), signo);
|
||||
abort ();
|
||||
}
|
||||
|
||||
#if HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK
|
||||
|
||||
/* Direction of the C runtime stack. This function is
|
||||
async-signal-safe. */
|
||||
|
||||
# if STACK_DIRECTION
|
||||
# define find_stack_direction(ptr) STACK_DIRECTION
|
||||
# else
|
||||
static int
|
||||
find_stack_direction (char const *addr)
|
||||
{
|
||||
char dummy;
|
||||
return ! addr ? find_stack_direction (&dummy) : addr < &dummy ? 1 : -1;
|
||||
}
|
||||
# endif
|
||||
|
||||
# if HAVE_XSI_STACK_OVERFLOW_HEURISTIC
|
||||
# define get_stack_location(argv) 0
|
||||
# else
|
||||
|
||||
# if defined RLIMIT_STACK && defined _SC_PAGESIZE
|
||||
|
||||
/* Return the minimum machine address deducible from ARGV. This
|
||||
includes the addresses of all the strings that ARGV points at, as
|
||||
well as the address of ARGV itself. */
|
||||
|
||||
static char const *
|
||||
min_address_from_argv (char * const *argv)
|
||||
{
|
||||
char const *min = (char const *) argv;
|
||||
char const *p;
|
||||
while ((p = *argv++))
|
||||
if (p < min)
|
||||
min = p;
|
||||
return min;
|
||||
}
|
||||
|
||||
/* Return the maximum machine address deducible from ARGV. */
|
||||
|
||||
static char const *
|
||||
max_address_from_argv (char * const *argv)
|
||||
{
|
||||
char const *max = *argv;
|
||||
char const *max1;
|
||||
char const *p;
|
||||
while ((p = *argv++))
|
||||
if (max < p)
|
||||
max = p;
|
||||
max1 = (char const *) (argv + 1);
|
||||
return max && max1 < max ? max + strlen (max) + 1 : max1;
|
||||
}
|
||||
# endif
|
||||
|
||||
/* The base and size of the stack, determined at startup. */
|
||||
static char const * volatile stack_base;
|
||||
static size_t volatile stack_size;
|
||||
|
||||
/* Store the base and size of the stack into the static variables
|
||||
STACK_BASE and STACK_SIZE. The base is the numerically lowest
|
||||
address in the stack. Return -1 (setting errno) if this cannot be
|
||||
done. */
|
||||
|
||||
static int
|
||||
get_stack_location (char * const *argv)
|
||||
{
|
||||
# if ! (defined RLIMIT_STACK && defined _SC_PAGESIZE)
|
||||
|
||||
errno = ENOTSUP;
|
||||
return -1;
|
||||
|
||||
# else
|
||||
|
||||
struct rlimit rlimit;
|
||||
int r = getrlimit (RLIMIT_STACK, &rlimit);
|
||||
if (r == 0)
|
||||
{
|
||||
char const *base;
|
||||
size_t size = rlimit.rlim_cur;
|
||||
extern char **environ;
|
||||
size_t page_size = sysconf (_SC_PAGESIZE);
|
||||
int stack_direction = find_stack_direction (0);
|
||||
|
||||
# if HAVE_GETCONTEXT && HAVE_DECL_GETCONTEXT
|
||||
ucontext_t context;
|
||||
if (getcontext (&context) == 0)
|
||||
{
|
||||
base = context.uc_stack.ss_sp;
|
||||
if (stack_direction < 0)
|
||||
base -= size - context.uc_stack.ss_size;
|
||||
}
|
||||
else
|
||||
# endif
|
||||
{
|
||||
if (stack_direction < 0)
|
||||
{
|
||||
char const *a = max_address_from_argv (argv);
|
||||
char const *b = max_address_from_argv (environ);
|
||||
base = (a < b ? b : a) - size;
|
||||
base += - (size_t) base % page_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
char const *a = min_address_from_argv (argv);
|
||||
char const *b = min_address_from_argv (environ);
|
||||
base = a < b ? a : b;
|
||||
base -= (size_t) base % page_size;
|
||||
}
|
||||
}
|
||||
|
||||
if (size != rlimit.rlim_cur
|
||||
|| rlimit.rlim_cur < 0
|
||||
|| base + size < base
|
||||
# ifdef RLIM_SAVED_CUR
|
||||
|| rlimit.rlim_cur == RLIM_SAVED_CUR
|
||||
# endif
|
||||
# ifdef RLIM_SAVED_MAX
|
||||
|| rlimit.rlim_cur == RLIM_SAVED_MAX
|
||||
# endif
|
||||
# ifdef RLIM_INFINITY
|
||||
|| rlimit.rlim_cur == RLIM_INFINITY
|
||||
# endif
|
||||
)
|
||||
{
|
||||
errno = EOVERFLOW;
|
||||
return -1;
|
||||
}
|
||||
|
||||
stack_base = base;
|
||||
stack_size = size;
|
||||
|
||||
# if DEBUG
|
||||
fprintf (stderr, "get_stack_location base=%p size=%lx\n",
|
||||
base, (unsigned long) size);
|
||||
# endif
|
||||
}
|
||||
|
||||
return r;
|
||||
|
||||
# endif
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Storage for the alternate signal stack. */
|
||||
static union
|
||||
{
|
||||
char buffer[SIGSTKSZ];
|
||||
|
||||
/* These other members are for proper alignment. There's no
|
||||
standard way to guarantee stack alignment, but this seems enough
|
||||
in practice. */
|
||||
long double ld;
|
||||
long l;
|
||||
void *p;
|
||||
} alternate_signal_stack;
|
||||
|
||||
# if defined SA_ONSTACK && defined SA_SIGINFO && defined _SC_PAGESIZE
|
||||
|
||||
/* Handle a segmentation violation and exit. This function is
|
||||
async-signal-safe. */
|
||||
|
||||
static void segv_handler (int, siginfo_t *, void *) __attribute__((noreturn));
|
||||
static void
|
||||
segv_handler (int signo, siginfo_t *info,
|
||||
void *context __attribute__ ((unused)))
|
||||
{
|
||||
/* Clear SIGNO if it seems to have been a stack overflow. */
|
||||
if (0 < info->si_code)
|
||||
{
|
||||
/* If the faulting address is within the stack, or within one
|
||||
page of the stack end, assume that it is a stack
|
||||
overflow. */
|
||||
# if HAVE_XSI_STACK_OVERFLOW_HEURISTIC
|
||||
ucontext_t const *user_context = context;
|
||||
char const *stack_base = user_context->uc_stack.ss_sp;
|
||||
size_t stack_size = user_context->uc_stack.ss_size;
|
||||
# endif
|
||||
char const *faulting_address = info->si_addr;
|
||||
size_t s = faulting_address - stack_base;
|
||||
size_t page_size = sysconf (_SC_PAGESIZE);
|
||||
if (find_stack_direction (0) < 0)
|
||||
s += page_size;
|
||||
if (s < stack_size + page_size)
|
||||
signo = 0;
|
||||
|
||||
# if DEBUG
|
||||
{
|
||||
char buf[1024];
|
||||
sprintf (buf,
|
||||
"segv_handler fault=%p base=%p size=%lx page=%lx signo=%d\n",
|
||||
faulting_address, stack_base, (unsigned long) stack_size,
|
||||
(unsigned long) page_size, signo);
|
||||
write (STDERR_FILENO, buf, strlen (buf));
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
die (signo);
|
||||
}
|
||||
# endif
|
||||
|
||||
static void
|
||||
null_action (int signo __attribute__ ((unused)))
|
||||
{
|
||||
}
|
||||
|
||||
/* Assuming ARGV is the argument vector of `main', set up ACTION so
|
||||
that it is invoked on C stack overflow. Return -1 (setting errno)
|
||||
if this cannot be done.
|
||||
|
||||
When ACTION is called, it is passed an argument equal to SIGSEGV
|
||||
for a segmentation violation that does not appear related to stack
|
||||
overflow, and is passed zero otherwise.
|
||||
|
||||
A null ACTION acts like an action that does nothing.
|
||||
|
||||
ACTION must be async-signal-safe. ACTION together with its callees
|
||||
must not require more than SIGSTKSZ bytes of stack space. */
|
||||
|
||||
int
|
||||
c_stack_action (char * const *argv __attribute__ ((unused)),
|
||||
void (*action) (int))
|
||||
{
|
||||
int r = get_stack_location (argv);
|
||||
if (r != 0)
|
||||
return r;
|
||||
|
||||
{
|
||||
stack_t st;
|
||||
st.ss_flags = 0;
|
||||
st.ss_sp = alternate_signal_stack.buffer;
|
||||
st.ss_size = sizeof alternate_signal_stack.buffer;
|
||||
r = sigaltstack (&st, 0);
|
||||
if (r != 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
segv_action = action ? action : null_action;
|
||||
program_error_message = _("program error");
|
||||
stack_overflow_message = _("stack overflow");
|
||||
|
||||
{
|
||||
# if ! (defined SA_ONSTACK && defined SA_SIGINFO && defined _SC_PAGESIZE)
|
||||
return signal (SIGSEGV, die) == SIG_ERR ? -1 : 0;
|
||||
# else
|
||||
struct sigaction act;
|
||||
sigemptyset (&act.sa_mask);
|
||||
|
||||
/* POSIX 1003.1-2001 says SA_RESETHAND implies SA_NODEFER, but
|
||||
this is not true on Solaris 8 at least. It doesn't hurt to use
|
||||
SA_NODEFER here, so leave it in. */
|
||||
act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
|
||||
|
||||
act.sa_sigaction = segv_handler;
|
||||
|
||||
return sigaction (SIGSEGV, &act, 0);
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
#else /* ! (HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK) */
|
||||
|
||||
int
|
||||
c_stack_action (char * const *argv __attribute__ ((unused)),
|
||||
void (*action) (int) __attribute__ ((unused)))
|
||||
{
|
||||
errno = ENOTSUP;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if DEBUG
|
||||
|
||||
int volatile exit_failure;
|
||||
|
||||
static long
|
||||
recurse (char *p)
|
||||
{
|
||||
char array[500];
|
||||
array[0] = 1;
|
||||
return *p + recurse (array);
|
||||
}
|
||||
|
||||
char *program_name;
|
||||
|
||||
int
|
||||
main (int argc __attribute__ ((unused)), char **argv)
|
||||
{
|
||||
program_name = argv[0];
|
||||
fprintf (stderr, "The last line of output should be \"stack overflow\".\n");
|
||||
if (c_stack_action (argv, 0) == 0)
|
||||
return recurse ("\1");
|
||||
perror ("c_stack_action");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
compile-command: "gcc -DDEBUG -DHAVE_CONFIG_H -I.. -g -O -Wall -W c-stack.c"
|
||||
End:
|
||||
*/
|
||||
19
lib/c-stack.h
Normal file
19
lib/c-stack.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Stack overflow handling.
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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. */
|
||||
|
||||
int c_stack_action (char * const *, void (*) (int));
|
||||
@@ -94,7 +94,9 @@ close_stdout_status (int status)
|
||||
{
|
||||
int e = ferror (stdout) ? 0 : -1;
|
||||
|
||||
if (__fpending (stdout) == 0)
|
||||
/* If the stream's error bit is clear and there is nothing to flush,
|
||||
then return right away. */
|
||||
if (e && __fpending (stdout) == 0)
|
||||
return;
|
||||
|
||||
if (fclose (stdout) != 0)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent table of character encoding aliases.
|
||||
#
|
||||
# Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
@@ -235,10 +235,12 @@ case "$os" in
|
||||
#echo "sun_eu_greek ?" # what is this?
|
||||
echo "UTF-8 UTF-8"
|
||||
;;
|
||||
freebsd*)
|
||||
freebsd* | os2*)
|
||||
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
|
||||
# localcharset.c falls back to using the full locale name
|
||||
# from the environment variables.
|
||||
# Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
|
||||
# reuse FreeBSD's locale data for OS/2.
|
||||
echo "C ASCII"
|
||||
echo "US-ASCII ASCII"
|
||||
for l in la_LN lt_LN; do
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
#ifndef HAVE_DECL_DIRFD
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_DIRFD
|
||||
#if !HAVE_DECL_DIRFD && !defined dirfd
|
||||
int dirfd (DIR const *);
|
||||
#endif
|
||||
|
||||
31
lib/exitfail.c
Normal file
31
lib/exitfail.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/* Failure exit status
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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; see the file COPYING.
|
||||
If not, write to the Free Software Foundation,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifndef EXIT_FAILURE
|
||||
# define EXIT_FAILURE 1
|
||||
#endif
|
||||
|
||||
int volatile exit_failure = EXIT_FAILURE;
|
||||
20
lib/exitfail.h
Normal file
20
lib/exitfail.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/* Failure exit status
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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; see the file COPYING.
|
||||
If not, write to the Free Software Foundation,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
extern int volatile exit_failure;
|
||||
72
lib/file-type.c
Normal file
72
lib/file-type.c
Normal file
@@ -0,0 +1,72 @@
|
||||
/* Return a string describing the type of a file.
|
||||
|
||||
Copyright (C) 1993, 1994, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
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 <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "file-type.h"
|
||||
|
||||
#include <gettext.h>
|
||||
#define _(text) gettext (text)
|
||||
|
||||
char const *
|
||||
file_type (struct stat const *st)
|
||||
{
|
||||
/* See POSIX 1003.1-2001 XCU Table 4-8 lines 17093-17107 for some of
|
||||
these formats.
|
||||
|
||||
To keep diagnostics grammatical in English, the returned string
|
||||
must start with a consonant. */
|
||||
|
||||
if (S_ISREG (st->st_mode))
|
||||
return st->st_size == 0 ? _("regular empty file") : _("regular file");
|
||||
|
||||
if (S_ISDIR (st->st_mode))
|
||||
return _("directory");
|
||||
|
||||
if (S_ISBLK (st->st_mode))
|
||||
return _("block special file");
|
||||
|
||||
if (S_ISCHR (st->st_mode))
|
||||
return _("character special file");
|
||||
|
||||
if (S_ISFIFO (st->st_mode))
|
||||
return _("fifo");
|
||||
|
||||
if (S_ISLNK (st->st_mode))
|
||||
return _("symbolic link");
|
||||
|
||||
if (S_ISSOCK (st->st_mode))
|
||||
return _("socket");
|
||||
|
||||
if (S_TYPEISMQ (st))
|
||||
return _("message queue");
|
||||
|
||||
if (S_TYPEISSEM (st))
|
||||
return _("semaphore");
|
||||
|
||||
if (S_TYPEISSHM (st))
|
||||
return _("shared memory object");
|
||||
|
||||
return _("weird file");
|
||||
}
|
||||
161
lib/file-type.h
Normal file
161
lib/file-type.h
Normal file
@@ -0,0 +1,161 @@
|
||||
/* Return a string describing the type of a file.
|
||||
|
||||
Copyright (C) 1993, 1994, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Paul Eggert and Jim Meyering. */
|
||||
|
||||
#ifndef FILE_TYPE_H
|
||||
# define FILE_TYPE_H 1
|
||||
|
||||
# if ! defined S_ISREG && ! defined S_IFREG
|
||||
you must include <sys/stat.h> before including this file
|
||||
# endif
|
||||
|
||||
char const *file_type (struct stat const *);
|
||||
|
||||
# ifndef S_IFMT
|
||||
# define S_IFMT 0170000
|
||||
# endif
|
||||
|
||||
# if STAT_MACROS_BROKEN
|
||||
# undef S_ISBLK
|
||||
# undef S_ISCHR
|
||||
# undef S_ISDIR
|
||||
# undef S_ISDOOR
|
||||
# undef S_ISFIFO
|
||||
# undef S_ISLNK
|
||||
# undef S_ISNAM
|
||||
# undef S_ISMPB
|
||||
# undef S_ISMPC
|
||||
# undef S_ISNWK
|
||||
# undef S_ISREG
|
||||
# undef S_ISSOCK
|
||||
# endif
|
||||
|
||||
|
||||
# ifndef S_ISBLK
|
||||
# ifdef S_IFBLK
|
||||
# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
|
||||
# else
|
||||
# define S_ISBLK(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_ISCHR
|
||||
# ifdef S_IFCHR
|
||||
# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
||||
# else
|
||||
# define S_ISCHR(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_ISDIR
|
||||
# ifdef S_IFDIR
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
# else
|
||||
# define S_ISDIR(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_ISDOOR /* Solaris 2.5 and up */
|
||||
# ifdef S_IFDOOR
|
||||
# define S_ISDOOR(m) (((m) & S_IFMT) == S_IFDOOR)
|
||||
# else
|
||||
# define S_ISDOOR(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_ISFIFO
|
||||
# ifdef S_IFIFO
|
||||
# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
||||
# else
|
||||
# define S_ISFIFO(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_ISLNK
|
||||
# ifdef S_IFLNK
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
# else
|
||||
# define S_ISLNK(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_ISMPB /* V7 */
|
||||
# ifdef S_IFMPB
|
||||
# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
|
||||
# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
|
||||
# else
|
||||
# define S_ISMPB(m) 0
|
||||
# define S_ISMPC(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_ISNAM /* Xenix */
|
||||
# ifdef S_IFNAM
|
||||
# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
|
||||
# else
|
||||
# define S_ISNAM(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_ISNWK /* HP/UX */
|
||||
# ifdef S_IFNWK
|
||||
# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
|
||||
# else
|
||||
# define S_ISNWK(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_ISREG
|
||||
# ifdef S_IFREG
|
||||
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||
# else
|
||||
# define S_ISREG(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_ISSOCK
|
||||
# ifdef S_IFSOCK
|
||||
# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
|
||||
# else
|
||||
# define S_ISSOCK(m) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
||||
# ifndef S_TYPEISSEM
|
||||
# ifdef S_INSEM
|
||||
# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
|
||||
# else
|
||||
# define S_TYPEISSEM(p) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_TYPEISSHM
|
||||
# ifdef S_INSHD
|
||||
# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
|
||||
# else
|
||||
# define S_TYPEISSHM(p) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef S_TYPEISMQ
|
||||
# define S_TYPEISMQ(p) 0
|
||||
# endif
|
||||
|
||||
#endif /* FILE_TYPE_H */
|
||||
525
lib/fnmatch.c
525
lib/fnmatch.c
@@ -1,4 +1,5 @@
|
||||
/* Copyright 1991, 1992, 1993, 1996, 1997, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -10,9 +11,9 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@@ -23,208 +24,362 @@
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
# define HAVE_ALLOCA 1
|
||||
#else
|
||||
# if defined HAVE_ALLOCA_H || defined _LIBC
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
# pragma alloca
|
||||
# else
|
||||
# ifndef alloca
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if ! defined __builtin_expect && __GNUC__ < 3
|
||||
# define __builtin_expect(expr, expected) (expr)
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <fnmatch.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined STDC_HEADERS || !defined isascii
|
||||
# define IN_CTYPE_DOMAIN(c) 1
|
||||
#if HAVE_STRING_H || defined _LIBC
|
||||
# include <string.h>
|
||||
#else
|
||||
# define IN_CTYPE_DOMAIN(c) isascii (c)
|
||||
# if HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c))
|
||||
#if defined STDC_HEADERS || defined _LIBC
|
||||
# include <stddef.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC)
|
||||
|
||||
/* For platform which support the ISO C amendement 1 functionality we
|
||||
support user defined character classes. */
|
||||
#if defined _LIBC || WIDE_CHAR_SUPPORT
|
||||
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
|
||||
# include <wchar.h>
|
||||
# include <wctype.h>
|
||||
#endif
|
||||
|
||||
/* We need some of the locale data (the collation sequence information)
|
||||
but there is no interface to get this information in general. Therefore
|
||||
we support a correct implementation only in glibc. */
|
||||
#ifdef _LIBC
|
||||
# include "../locale/localeinfo.h"
|
||||
# include "../locale/elem-hash.h"
|
||||
# include "../locale/coll-lookup.h"
|
||||
# include <shlib-compat.h>
|
||||
|
||||
# define CONCAT(a,b) __CONCAT(a,b)
|
||||
# define mbsinit __mbsinit
|
||||
# define mbsrtowcs __mbsrtowcs
|
||||
# define fnmatch __fnmatch
|
||||
extern int fnmatch (const char *pattern, const char *string, int flags);
|
||||
#endif
|
||||
|
||||
/* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */
|
||||
#define NO_LEADING_PERIOD(flags) \
|
||||
((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))
|
||||
|
||||
/* Comment out all this code if we are using the GNU C Library, are not
|
||||
actually compiling the library itself, and have not detected a bug
|
||||
in the library. This code is part of the GNU C
|
||||
Library, but also included in many other GNU distributions. Compiling
|
||||
and linking in this code is a waste when using the GNU C library
|
||||
(especially if it is a shared library). Rather than having every GNU
|
||||
program understand `configure --with-gnu-libc' and omit the object files,
|
||||
it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU
|
||||
|
||||
|
||||
#ifndef errno
|
||||
# if defined STDC_HEADERS || !defined isascii
|
||||
# define ISASCII(c) 1
|
||||
# else
|
||||
# define ISASCII(c) isascii(c)
|
||||
# endif
|
||||
|
||||
# ifdef isblank
|
||||
# define ISBLANK(c) (ISASCII (c) && isblank (c))
|
||||
# else
|
||||
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
|
||||
# endif
|
||||
# ifdef isgraph
|
||||
# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
|
||||
# else
|
||||
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
|
||||
# endif
|
||||
|
||||
# define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||
# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
||||
# define ISALNUM(c) (ISASCII (c) && isalnum (c))
|
||||
# define ISALPHA(c) (ISASCII (c) && isalpha (c))
|
||||
# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
||||
# define ISLOWER(c) (ISASCII (c) && islower (c))
|
||||
# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
||||
# define ISSPACE(c) (ISASCII (c) && isspace (c))
|
||||
# define ISUPPER(c) (ISASCII (c) && isupper (c))
|
||||
# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||
|
||||
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
|
||||
|
||||
# if defined _LIBC || WIDE_CHAR_SUPPORT
|
||||
/* The GNU C library provides support for user-defined character classes
|
||||
and the functions from ISO C amendement 1. */
|
||||
# ifdef CHARCLASS_NAME_MAX
|
||||
# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
|
||||
# else
|
||||
/* This shouldn't happen but some implementation might still have this
|
||||
problem. Use a reasonable default value. */
|
||||
# define CHAR_CLASS_MAX_LENGTH 256
|
||||
# endif
|
||||
|
||||
# ifdef _LIBC
|
||||
# define IS_CHAR_CLASS(string) __wctype (string)
|
||||
# else
|
||||
# define IS_CHAR_CLASS(string) wctype (string)
|
||||
# endif
|
||||
|
||||
# ifdef _LIBC
|
||||
# define ISWCTYPE(WC, WT) __iswctype (WC, WT)
|
||||
# else
|
||||
# define ISWCTYPE(WC, WT) iswctype (WC, WT)
|
||||
# endif
|
||||
|
||||
# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC
|
||||
/* In this case we are implementing the multibyte character handling. */
|
||||
# define HANDLE_MULTIBYTE 1
|
||||
# endif
|
||||
|
||||
# else
|
||||
# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
|
||||
|
||||
# define IS_CHAR_CLASS(string) \
|
||||
(STREQ (string, "alpha") || STREQ (string, "upper") \
|
||||
|| STREQ (string, "lower") || STREQ (string, "digit") \
|
||||
|| STREQ (string, "alnum") || STREQ (string, "xdigit") \
|
||||
|| STREQ (string, "space") || STREQ (string, "print") \
|
||||
|| STREQ (string, "punct") || STREQ (string, "graph") \
|
||||
|| STREQ (string, "cntrl") || STREQ (string, "blank"))
|
||||
# endif
|
||||
|
||||
/* Avoid depending on library functions or files
|
||||
whose names are inconsistent. */
|
||||
|
||||
# if !defined _LIBC && !defined getenv && !HAVE_DECL_GETENV
|
||||
extern char *getenv ();
|
||||
# endif
|
||||
|
||||
# ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* Match STRING against the filename pattern PATTERN, returning zero if
|
||||
it matches, nonzero if not. */
|
||||
int
|
||||
fnmatch (const char *pattern, const char *string, int flags)
|
||||
{
|
||||
register const char *p = pattern, *n = string;
|
||||
register char c;
|
||||
/* Global variable. */
|
||||
static int posixly_correct;
|
||||
|
||||
# ifndef internal_function
|
||||
/* Inside GNU libc we mark some function in a special way. In other
|
||||
environments simply ignore the marking. */
|
||||
# define internal_function
|
||||
# endif
|
||||
|
||||
/* Note that this evaluates C many times. */
|
||||
#define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER ((unsigned char) (c)) \
|
||||
? tolower ((unsigned char) (c)) \
|
||||
: (c))
|
||||
# ifdef _LIBC
|
||||
# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
|
||||
# else
|
||||
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
|
||||
# endif
|
||||
# define CHAR char
|
||||
# define UCHAR unsigned char
|
||||
# define INT int
|
||||
# define FCT internal_fnmatch
|
||||
# define EXT ext_match
|
||||
# define END end_pattern
|
||||
# define L(CS) CS
|
||||
# ifdef _LIBC
|
||||
# define BTOWC(C) __btowc (C)
|
||||
# else
|
||||
# define BTOWC(C) btowc (C)
|
||||
# endif
|
||||
# define STRLEN(S) strlen (S)
|
||||
# define STRCAT(D, S) strcat (D, S)
|
||||
# ifdef _LIBC
|
||||
# define MEMPCPY(D, S, N) __mempcpy (D, S, N)
|
||||
# else
|
||||
# if HAVE_MEMPCPY
|
||||
# define MEMPCPY(D, S, N) mempcpy (D, S, N)
|
||||
# else
|
||||
# define MEMPCPY(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
|
||||
# endif
|
||||
# endif
|
||||
# define MEMCHR(S, C, N) memchr (S, C, N)
|
||||
# define STRCOLL(S1, S2) strcoll (S1, S2)
|
||||
# include "fnmatch_loop.c"
|
||||
|
||||
while ((c = *p++) != '\0')
|
||||
|
||||
# if HANDLE_MULTIBYTE
|
||||
# define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c))
|
||||
# define CHAR wchar_t
|
||||
# define UCHAR wint_t
|
||||
# define INT wint_t
|
||||
# define FCT internal_fnwmatch
|
||||
# define EXT ext_wmatch
|
||||
# define END end_wpattern
|
||||
# define L(CS) L##CS
|
||||
# define BTOWC(C) (C)
|
||||
# ifdef _LIBC
|
||||
# define STRLEN(S) __wcslen (S)
|
||||
# define STRCAT(D, S) __wcscat (D, S)
|
||||
# define MEMPCPY(D, S, N) __wmempcpy (D, S, N)
|
||||
# else
|
||||
# define STRLEN(S) wcslen (S)
|
||||
# define STRCAT(D, S) wcscat (D, S)
|
||||
# if HAVE_WMEMPCPY
|
||||
# define MEMPCPY(D, S, N) wmempcpy (D, S, N)
|
||||
# else
|
||||
# define MEMPCPY(D, S, N) (wmemcpy (D, S, N) + (N))
|
||||
# endif
|
||||
# endif
|
||||
# define MEMCHR(S, C, N) wmemchr (S, C, N)
|
||||
# define STRCOLL(S1, S2) wcscoll (S1, S2)
|
||||
# define WIDE_CHAR_VERSION 1
|
||||
|
||||
# undef IS_CHAR_CLASS
|
||||
/* We have to convert the wide character string in a multibyte string. But
|
||||
we know that the character class names consist of alphanumeric characters
|
||||
from the portable character set, and since the wide character encoding
|
||||
for a member of the portable character set is the same code point as
|
||||
its single-byte encoding, we can use a simplified method to convert the
|
||||
string to a multibyte character string. */
|
||||
static wctype_t
|
||||
is_char_class (const wchar_t *wcs)
|
||||
{
|
||||
char s[CHAR_CLASS_MAX_LENGTH + 1];
|
||||
char *cp = s;
|
||||
|
||||
do
|
||||
{
|
||||
c = FOLD (c);
|
||||
|
||||
switch (c)
|
||||
/* Test for a printable character from the portable character set. */
|
||||
# ifdef _LIBC
|
||||
if (*wcs < 0x20 || *wcs > 0x7e
|
||||
|| *wcs == 0x24 || *wcs == 0x40 || *wcs == 0x60)
|
||||
return (wctype_t) 0;
|
||||
# else
|
||||
switch (*wcs)
|
||||
{
|
||||
case '?':
|
||||
if (*n == '\0')
|
||||
return FNM_NOMATCH;
|
||||
else if ((flags & FNM_FILE_NAME) && *n == '/')
|
||||
return FNM_NOMATCH;
|
||||
else if ((flags & FNM_PERIOD) && *n == '.' &&
|
||||
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
|
||||
return FNM_NOMATCH;
|
||||
case L' ': case L'!': case L'"': case L'#': case L'%':
|
||||
case L'&': case L'\'': case L'(': case L')': case L'*':
|
||||
case L'+': case L',': case L'-': case L'.': case L'/':
|
||||
case L'0': case L'1': case L'2': case L'3': case L'4':
|
||||
case L'5': case L'6': case L'7': case L'8': case L'9':
|
||||
case L':': case L';': case L'<': case L'=': case L'>':
|
||||
case L'?':
|
||||
case L'A': case L'B': case L'C': case L'D': case L'E':
|
||||
case L'F': case L'G': case L'H': case L'I': case L'J':
|
||||
case L'K': case L'L': case L'M': case L'N': case L'O':
|
||||
case L'P': case L'Q': case L'R': case L'S': case L'T':
|
||||
case L'U': case L'V': case L'W': case L'X': case L'Y':
|
||||
case L'Z':
|
||||
case L'[': case L'\\': case L']': case L'^': case L'_':
|
||||
case L'a': case L'b': case L'c': case L'd': case L'e':
|
||||
case L'f': case L'g': case L'h': case L'i': case L'j':
|
||||
case L'k': case L'l': case L'm': case L'n': case L'o':
|
||||
case L'p': case L'q': case L'r': case L's': case L't':
|
||||
case L'u': case L'v': case L'w': case L'x': case L'y':
|
||||
case L'z': case L'{': case L'|': case L'}': case L'~':
|
||||
break;
|
||||
|
||||
case '\\':
|
||||
if (!(flags & FNM_NOESCAPE))
|
||||
{
|
||||
c = *p++;
|
||||
if (c == '\0')
|
||||
/* Trailing \ loses. */
|
||||
return FNM_NOMATCH;
|
||||
c = FOLD (c);
|
||||
}
|
||||
if (FOLD (*n) != c)
|
||||
return FNM_NOMATCH;
|
||||
break;
|
||||
|
||||
case '*':
|
||||
if ((flags & FNM_PERIOD) && *n == '.' &&
|
||||
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
|
||||
return FNM_NOMATCH;
|
||||
|
||||
for (c = *p++; c == '?' || c == '*'; c = *p++)
|
||||
{
|
||||
if (c == '?')
|
||||
{
|
||||
/* A ? needs to match one character. */
|
||||
if (*n == '\0' || (*n == '/' && (flags & FNM_FILE_NAME)))
|
||||
/* There isn't another character; no match. */
|
||||
return FNM_NOMATCH;
|
||||
else
|
||||
/* One character of the string is consumed in matching
|
||||
this ? wildcard, so *??? won't match if there are
|
||||
less than three characters. */
|
||||
++n;
|
||||
}
|
||||
}
|
||||
|
||||
if (c == '\0')
|
||||
{
|
||||
if ((flags & (FNM_FILE_NAME | FNM_LEADING_DIR)) == FNM_FILE_NAME)
|
||||
for (; *n != '\0'; n++)
|
||||
if (*n == '/')
|
||||
return FNM_NOMATCH;
|
||||
return 0;
|
||||
}
|
||||
|
||||
{
|
||||
char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
|
||||
c1 = FOLD (c1);
|
||||
for (--p; *n != '\0'; ++n)
|
||||
if ((c == '[' || FOLD (*n) == c1) &&
|
||||
fnmatch (p, n, flags & ~FNM_PERIOD) == 0)
|
||||
return 0;
|
||||
else if (*n == '/' && (flags & FNM_FILE_NAME))
|
||||
break;
|
||||
return FNM_NOMATCH;
|
||||
}
|
||||
|
||||
case '[':
|
||||
{
|
||||
/* Nonzero if the sense of the character class is inverted. */
|
||||
register int not;
|
||||
|
||||
if (*n == '\0')
|
||||
return FNM_NOMATCH;
|
||||
|
||||
if ((flags & FNM_PERIOD) && *n == '.' &&
|
||||
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
|
||||
return FNM_NOMATCH;
|
||||
|
||||
not = (*p == '!' || *p == '^');
|
||||
if (not)
|
||||
++p;
|
||||
|
||||
c = *p++;
|
||||
for (;;)
|
||||
{
|
||||
register char cstart = c, cend = c;
|
||||
|
||||
if (!(flags & FNM_NOESCAPE) && c == '\\')
|
||||
{
|
||||
if (*p == '\0')
|
||||
return FNM_NOMATCH;
|
||||
cstart = cend = *p++;
|
||||
}
|
||||
|
||||
cstart = cend = FOLD (cstart);
|
||||
|
||||
if (c == '\0')
|
||||
/* [ (unterminated) loses. */
|
||||
return FNM_NOMATCH;
|
||||
|
||||
c = *p++;
|
||||
c = FOLD (c);
|
||||
|
||||
if ((flags & FNM_FILE_NAME) && c == '/')
|
||||
/* [/] can never match. */
|
||||
return FNM_NOMATCH;
|
||||
|
||||
if (c == '-' && *p != ']')
|
||||
{
|
||||
cend = *p++;
|
||||
if (!(flags & FNM_NOESCAPE) && cend == '\\')
|
||||
cend = *p++;
|
||||
if (cend == '\0')
|
||||
return FNM_NOMATCH;
|
||||
cend = FOLD (cend);
|
||||
|
||||
c = *p++;
|
||||
}
|
||||
|
||||
if (FOLD (*n) >= cstart && FOLD (*n) <= cend)
|
||||
goto matched;
|
||||
|
||||
if (c == ']')
|
||||
break;
|
||||
}
|
||||
if (!not)
|
||||
return FNM_NOMATCH;
|
||||
break;
|
||||
|
||||
matched:;
|
||||
/* Skip the rest of the [...] that already matched. */
|
||||
while (c != ']')
|
||||
{
|
||||
if (c == '\0')
|
||||
/* [... (unterminated) loses. */
|
||||
return FNM_NOMATCH;
|
||||
|
||||
c = *p++;
|
||||
if (!(flags & FNM_NOESCAPE) && c == '\\')
|
||||
{
|
||||
if (*p == '\0')
|
||||
return FNM_NOMATCH;
|
||||
/* XXX 1003.2d11 is unclear if this is right. */
|
||||
++p;
|
||||
}
|
||||
}
|
||||
if (not)
|
||||
return FNM_NOMATCH;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (c != FOLD (*n))
|
||||
return FNM_NOMATCH;
|
||||
return (wctype_t) 0;
|
||||
}
|
||||
# endif
|
||||
|
||||
++n;
|
||||
/* Avoid overrunning the buffer. */
|
||||
if (cp == s + CHAR_CLASS_MAX_LENGTH)
|
||||
return (wctype_t) 0;
|
||||
|
||||
*cp++ = (char) *wcs++;
|
||||
}
|
||||
while (*wcs != L'\0');
|
||||
|
||||
if (*n == '\0')
|
||||
return 0;
|
||||
*cp = '\0';
|
||||
|
||||
if ((flags & FNM_LEADING_DIR) && *n == '/')
|
||||
/* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */
|
||||
return 0;
|
||||
|
||||
return FNM_NOMATCH;
|
||||
|
||||
#undef FOLD
|
||||
# ifdef _LIBC
|
||||
return __wctype (s);
|
||||
# else
|
||||
return wctype (s);
|
||||
# endif
|
||||
}
|
||||
# define IS_CHAR_CLASS(string) is_char_class (string)
|
||||
|
||||
# include "fnmatch_loop.c"
|
||||
# endif
|
||||
|
||||
|
||||
int
|
||||
fnmatch (pattern, string, flags)
|
||||
const char *pattern;
|
||||
const char *string;
|
||||
int flags;
|
||||
{
|
||||
# if HANDLE_MULTIBYTE
|
||||
if (__builtin_expect (MB_CUR_MAX, 1) != 1)
|
||||
{
|
||||
mbstate_t ps;
|
||||
size_t n;
|
||||
wchar_t *wpattern;
|
||||
wchar_t *wstring;
|
||||
|
||||
/* Convert the strings into wide characters. */
|
||||
memset (&ps, '\0', sizeof (ps));
|
||||
n = mbsrtowcs (NULL, &pattern, 0, &ps);
|
||||
if (__builtin_expect (n, 0) == (size_t) -1)
|
||||
/* Something wrong.
|
||||
XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
already done? */
|
||||
return -1;
|
||||
wpattern = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
|
||||
assert (mbsinit (&ps));
|
||||
(void) mbsrtowcs (wpattern, &pattern, n + 1, &ps);
|
||||
|
||||
assert (mbsinit (&ps));
|
||||
n = mbsrtowcs (NULL, &string, 0, &ps);
|
||||
if (__builtin_expect (n, 0) == (size_t) -1)
|
||||
/* Something wrong.
|
||||
XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
already done? */
|
||||
return -1;
|
||||
wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
|
||||
assert (mbsinit (&ps));
|
||||
(void) mbsrtowcs (wstring, &string, n + 1, &ps);
|
||||
|
||||
return internal_fnwmatch (wpattern, wstring, wstring + n,
|
||||
flags & FNM_PERIOD, flags);
|
||||
}
|
||||
# endif /* mbstate_t and mbsrtowcs or _LIBC. */
|
||||
|
||||
return internal_fnmatch (pattern, string, string + strlen (string),
|
||||
flags & FNM_PERIOD, flags);
|
||||
}
|
||||
|
||||
# ifdef _LIBC
|
||||
# undef fnmatch
|
||||
versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3);
|
||||
# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3)
|
||||
strong_alias (__fnmatch, __fnmatch_old)
|
||||
compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0);
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif /* _LIBC or not __GNU_LIBRARY__. */
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
/* Copyright (C) 1991, 1992, 1993 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.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _FNMATCH_H
|
||||
|
||||
#define _FNMATCH_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
||||
#undef __P
|
||||
#define __P(protos) protos
|
||||
#else /* Not C++ or ANSI C. */
|
||||
#undef __P
|
||||
#define __P(protos) ()
|
||||
/* We can get away without defining `const' here only because in this file
|
||||
it is used only inside the prototype for `fnmatch', which is elided in
|
||||
non-ANSI C where `const' is problematical. */
|
||||
#endif /* C++ or ANSI C. */
|
||||
|
||||
|
||||
/* We #undef these before defining them because some losing systems
|
||||
(HP-UX A.08.07 for example) define these in <unistd.h>. */
|
||||
#undef FNM_PATHNAME
|
||||
#undef FNM_NOESCAPE
|
||||
#undef FNM_PERIOD
|
||||
|
||||
/* Bits set in the FLAGS argument to `fnmatch'. */
|
||||
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
|
||||
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
||||
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
||||
|
||||
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
|
||||
#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
||||
#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
||||
#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
||||
#endif
|
||||
|
||||
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
||||
#define FNM_NOMATCH 1
|
||||
|
||||
/* Match STRING against the filename pattern PATTERN,
|
||||
returning zero if it matches, FNM_NOMATCH if not. */
|
||||
extern int fnmatch __P ((const char *__pattern, const char *__string,
|
||||
int __flags));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* fnmatch.h */
|
||||
80
lib/fnmatch_.h
Normal file
80
lib/fnmatch_.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2001, 2002
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _FNMATCH_H
|
||||
# define _FNMATCH_H 1
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
# if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||
# if !defined __GLIBC__ || !defined __P
|
||||
# undef __P
|
||||
# define __P(protos) protos
|
||||
# endif
|
||||
# else /* Not C++ or ANSI C. */
|
||||
# undef __P
|
||||
# define __P(protos) ()
|
||||
/* We can get away without defining `const' here only because in this file
|
||||
it is used only inside the prototype for `fnmatch', which is elided in
|
||||
non-ANSI C where `const' is problematical. */
|
||||
# endif /* C++ or ANSI C. */
|
||||
|
||||
# ifndef __const
|
||||
# define __const const
|
||||
# endif
|
||||
|
||||
/* We #undef these before defining them because some losing systems
|
||||
(HP-UX A.08.07 for example) define these in <unistd.h>. */
|
||||
# undef FNM_PATHNAME
|
||||
# undef FNM_NOESCAPE
|
||||
# undef FNM_PERIOD
|
||||
|
||||
/* Bits set in the FLAGS argument to `fnmatch'. */
|
||||
# define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
|
||||
# define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
||||
# define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
||||
|
||||
# if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
|
||||
# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
||||
# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
||||
# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
||||
# define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */
|
||||
# endif
|
||||
|
||||
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
||||
# define FNM_NOMATCH 1
|
||||
|
||||
/* This value is returned if the implementation does not support
|
||||
`fnmatch'. Since this is not the case here it will never be
|
||||
returned but the conformance test suites still require the symbol
|
||||
to be defined. */
|
||||
# ifdef _XOPEN_SOURCE
|
||||
# define FNM_NOSYS (-1)
|
||||
# endif
|
||||
|
||||
/* Match NAME against the filename pattern PATTERN,
|
||||
returning zero if it matches, FNM_NOMATCH if not. */
|
||||
extern int fnmatch __P ((__const char *__pattern, __const char *__name,
|
||||
int __flags));
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* fnmatch.h */
|
||||
1189
lib/fnmatch_loop.c
Normal file
1189
lib/fnmatch_loop.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
%{
|
||||
/* Parse a string into an internal time stamp.
|
||||
Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -63,10 +63,9 @@
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
- It's typically faster.
|
||||
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to ISDIGIT_LOCALE unless
|
||||
it's important to use the locale's definition of `digit' even when the
|
||||
host does not conform to Posix. */
|
||||
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
|
||||
ISDIGIT_LOCALE unless it's important to use the locale's definition
|
||||
of `digit' even when the host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
@@ -378,19 +377,19 @@ relunit:
|
||||
| tSNUMBER tDAY_UNIT
|
||||
{ PC.rel_day += $1.value * $2; }
|
||||
| tDAY_UNIT
|
||||
{ PC.rel_day += $1 }
|
||||
{ PC.rel_day += $1; }
|
||||
| tUNUMBER tHOUR_UNIT
|
||||
{ PC.rel_hour += $1.value * $2; }
|
||||
| tSNUMBER tHOUR_UNIT
|
||||
{ PC.rel_hour += $1.value * $2; }
|
||||
| tHOUR_UNIT
|
||||
{ PC.rel_hour += $1 }
|
||||
{ PC.rel_hour += $1; }
|
||||
| tUNUMBER tMINUTE_UNIT
|
||||
{ PC.rel_minutes += $1.value * $2; }
|
||||
| tSNUMBER tMINUTE_UNIT
|
||||
{ PC.rel_minutes += $1.value * $2; }
|
||||
| tMINUTE_UNIT
|
||||
{ PC.rel_minutes += $1 }
|
||||
{ PC.rel_minutes += $1; }
|
||||
| tUNUMBER tSEC_UNIT
|
||||
{ PC.rel_seconds += $1.value * $2; }
|
||||
| tSNUMBER tSEC_UNIT
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
@@ -49,7 +47,7 @@ int
|
||||
getstr (char **lineptr, size_t *n, FILE *stream, int delim1, int delim2,
|
||||
size_t offset)
|
||||
{
|
||||
int nchars_avail; /* Allocated but unused chars in *LINEPTR. */
|
||||
size_t nchars_avail; /* Allocated but unused chars in *LINEPTR. */
|
||||
char *read_pos; /* Where we're reading into *LINEPTR. */
|
||||
int ret;
|
||||
|
||||
@@ -64,6 +62,9 @@ getstr (char **lineptr, size_t *n, FILE *stream, int delim1, int delim2,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (*n < offset)
|
||||
return -1;
|
||||
|
||||
nchars_avail = *n - offset;
|
||||
read_pos = *lineptr + offset;
|
||||
|
||||
@@ -75,7 +76,6 @@ getstr (char **lineptr, size_t *n, FILE *stream, int delim1, int delim2,
|
||||
always (unless we get an error while reading the first char)
|
||||
NUL-terminate the line buffer. */
|
||||
|
||||
assert(*n - nchars_avail == read_pos - *lineptr);
|
||||
if (nchars_avail < 2)
|
||||
{
|
||||
if (*n > MIN_CHUNK)
|
||||
@@ -88,7 +88,6 @@ getstr (char **lineptr, size_t *n, FILE *stream, int delim1, int delim2,
|
||||
if (!*lineptr)
|
||||
return -1;
|
||||
read_pos = *n - nchars_avail + *lineptr;
|
||||
assert(*n - nchars_avail == read_pos - *lineptr);
|
||||
}
|
||||
|
||||
if (c == EOF || ferror (stream))
|
||||
|
||||
69
lib/gettext.h
Normal file
69
lib/gettext.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifndef _LIBGETTEXT_H
|
||||
# define _LIBGETTEXT_H 1
|
||||
|
||||
/* NLS can be disabled through the configure --disable-nls option. */
|
||||
# if ENABLE_NLS
|
||||
|
||||
/* Get declarations of GNU message catalog functions. */
|
||||
# include <libintl.h>
|
||||
|
||||
# else
|
||||
|
||||
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
|
||||
chokes if dcgettext is defined as a macro. So include it now, to make
|
||||
later inclusions of <locale.h> a NOP. We don't include <libintl.h>
|
||||
as well because people using "gettext.h" will not include <libintl.h>,
|
||||
and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
|
||||
is OK. */
|
||||
# if defined(__sun)
|
||||
# include <locale.h>
|
||||
# endif
|
||||
|
||||
/* Disabled NLS.
|
||||
The casts to 'const char *' serve the purpose of producing warnings
|
||||
for invalid uses of the value returned from these functions.
|
||||
On pre-ANSI systems without 'const', the config.h file is supposed to
|
||||
contain "#define const". */
|
||||
# define gettext(Msgid) ((const char *) (Msgid))
|
||||
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
|
||||
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
|
||||
# define ngettext(Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define dngettext(Domainname, Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define textdomain(Domainname) ((const char *) (Domainname))
|
||||
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
|
||||
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
|
||||
|
||||
# endif
|
||||
|
||||
/* A pseudo function call that serves as a marker for the automated
|
||||
extraction of messages, but does not call gettext(). The run-time
|
||||
translation is done at a different place in the code.
|
||||
The argument, String, should be a literal string. Concatenated strings
|
||||
and other string expressions won't work.
|
||||
The macro's expansion is not parenthesized, so that it is suitable as
|
||||
initializer for static 'char[]' or 'const char[]' variables. */
|
||||
# define gettext_noop(String) String
|
||||
|
||||
#endif /* _LIBGETTEXT_H */
|
||||
46
lib/gettime.c
Normal file
46
lib/gettime.c
Normal file
@@ -0,0 +1,46 @@
|
||||
/* gettime -- get the system clock
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "timespec.h"
|
||||
|
||||
/* Get the system time. */
|
||||
|
||||
int
|
||||
gettime (struct timespec *ts)
|
||||
{
|
||||
#if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME
|
||||
if (clock_gettime (CLOCK_REALTIME, ts) == 0)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
{
|
||||
struct timeval tv;
|
||||
int r = gettimeofday (&tv, 0);
|
||||
if (r == 0)
|
||||
{
|
||||
ts->tv_sec = tv.tv_sec;
|
||||
ts->tv_nsec = tv.tv_usec * 1000;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Work around the bug in some systems whereby gettimeofday clobbers the
|
||||
static buffer that localtime uses for it's return value. The gettimeofday
|
||||
function from Mac OS X 10.0.4, i.e. Darwin 1.3.7 has this problem.
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -21,9 +21,10 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Disable the definition of gettimeofday (from config.h) so we can use
|
||||
the library version. */
|
||||
/* Disable the definitions of gettimeofday and localtime (from config.h)
|
||||
so we can use the library versions here. */
|
||||
#undef gettimeofday
|
||||
#undef localtime
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -39,15 +40,24 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "gtod.h"
|
||||
|
||||
static struct tm *localtime_buffer_addr;
|
||||
|
||||
void
|
||||
GTOD_init (void)
|
||||
/* This is a wrapper for localtime. It is used only on systems for which
|
||||
gettimeofday clobbers the static buffer used for localtime's result.
|
||||
|
||||
On the first call, record the address of the static buffer that
|
||||
localtime uses for its result. */
|
||||
|
||||
struct tm *
|
||||
rpl_localtime (const time_t *timep)
|
||||
{
|
||||
time_t t = 0;
|
||||
localtime_buffer_addr = localtime (&t);
|
||||
struct tm *tm = localtime (timep);
|
||||
|
||||
if (! localtime_buffer_addr)
|
||||
localtime_buffer_addr = tm;
|
||||
|
||||
return tm;
|
||||
}
|
||||
|
||||
/* This is a wrapper for gettimeofday. It is used only on systems for which
|
||||
@@ -63,7 +73,10 @@ rpl_gettimeofday (struct timeval *tv, struct timezone *tz)
|
||||
int result;
|
||||
|
||||
if (! localtime_buffer_addr)
|
||||
abort ();
|
||||
{
|
||||
time_t t = 0;
|
||||
localtime_buffer_addr = localtime (&t);
|
||||
}
|
||||
|
||||
save = *localtime_buffer_addr;
|
||||
result = gettimeofday (tv, tz);
|
||||
|
||||
21
lib/gtod.h
21
lib/gtod.h
@@ -1,21 +0,0 @@
|
||||
#ifndef GTOD_H
|
||||
# define GTOD_H 1
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
void GTOD_init PARAMS ((void));
|
||||
|
||||
/* This is a no-op on compliant systems. */
|
||||
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER
|
||||
# define GETTIMEOFDAY_INIT() GTOD_init ()
|
||||
# else
|
||||
# define GETTIMEOFDAY_INIT() /* empty */
|
||||
# endif
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,6 @@
|
||||
/* hard-locale.c -- Determine whether a locale is hard.
|
||||
Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -19,41 +20,26 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
#else
|
||||
# ifdef HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
# pragma alloca
|
||||
# else
|
||||
# ifdef _WIN32
|
||||
# include <malloc.h>
|
||||
# include <io.h>
|
||||
# else
|
||||
# ifndef alloca
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#include "hard-locale.h"
|
||||
|
||||
/* Return nonzero if the current CATEGORY locale is hard, i.e. if you
|
||||
can't get away with assuming traditional C or POSIX behavior. */
|
||||
int
|
||||
hard_locale (int category)
|
||||
{
|
||||
#if ! (defined ENABLE_NLS && HAVE_SETLOCALE)
|
||||
#if ! HAVE_SETLOCALE
|
||||
return 0;
|
||||
#else
|
||||
|
||||
@@ -62,22 +48,28 @@ hard_locale (int category)
|
||||
|
||||
if (p)
|
||||
{
|
||||
# if defined __GLIBC__ && __GLIBC__ >= 2
|
||||
# if defined __GLIBC__ && 2 <= __GLIBC__
|
||||
if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
|
||||
hard = 0;
|
||||
# else
|
||||
char *locale = alloca (strlen (p) + 1);
|
||||
strcpy (locale, p);
|
||||
char *locale = malloc (strlen (p) + 1);
|
||||
if (locale)
|
||||
{
|
||||
strcpy (locale, p);
|
||||
|
||||
/* Temporarily set the locale to the "C" and "POSIX" locales to
|
||||
find their names, so that we can determine whether one or the
|
||||
other is the caller's locale. */
|
||||
if (((p = setlocale (category, "C")) && strcmp (p, locale) == 0)
|
||||
|| ((p = setlocale (category, "POSIX")) && strcmp (p, locale) == 0))
|
||||
hard = 0;
|
||||
/* Temporarily set the locale to the "C" and "POSIX" locales
|
||||
to find their names, so that we can determine whether one
|
||||
or the other is the caller's locale. */
|
||||
if (((p = setlocale (category, "C"))
|
||||
&& strcmp (p, locale) == 0)
|
||||
|| ((p = setlocale (category, "POSIX"))
|
||||
&& strcmp (p, locale) == 0))
|
||||
hard = 0;
|
||||
|
||||
/* Restore the caller's locale. */
|
||||
setlocale (category, locale);
|
||||
/* Restore the caller's locale. */
|
||||
setlocale (category, locale);
|
||||
free (locale);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
62
lib/human.c
62
lib/human.c
@@ -1,5 +1,7 @@
|
||||
/* human.c -- print human readable file size
|
||||
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
|
||||
@@ -66,16 +68,34 @@ char *getenv ();
|
||||
static const char suffixes[] =
|
||||
{
|
||||
0, /* not used */
|
||||
'k', /* kilo */
|
||||
'M', /* Mega */
|
||||
'G', /* Giga */
|
||||
'T', /* Tera */
|
||||
'P', /* Peta */
|
||||
'E', /* Exa */
|
||||
'Z', /* Zetta */
|
||||
'Y' /* Yotta */
|
||||
'K', /* kibi ('k' for kilo is a special case) */
|
||||
'M', /* mega or mebi */
|
||||
'G', /* giga or gibi */
|
||||
'T', /* tera or tebi */
|
||||
'P', /* peta or pebi */
|
||||
'E', /* exa or exbi */
|
||||
'Z', /* zetta or 2**70 */
|
||||
'Y' /* yotta or 2**80 */
|
||||
};
|
||||
|
||||
/* Generate into P[-1] (and possibly P[-2]) the proper suffix for
|
||||
POWER and BASE. Return the address of the generated suffix. */
|
||||
static char *
|
||||
generate_suffix_backwards (char *p, int power, int base)
|
||||
{
|
||||
char letter = suffixes[power];
|
||||
|
||||
if (base == 1000)
|
||||
{
|
||||
*--p = 'B';
|
||||
if (power == 1)
|
||||
letter = 'k';
|
||||
}
|
||||
|
||||
*--p = letter;
|
||||
return p;
|
||||
}
|
||||
|
||||
/* If INEXACT_STYLE is not human_round_to_even, and if easily
|
||||
possible, adjust VALUE according to the style. */
|
||||
static double
|
||||
@@ -113,7 +133,7 @@ human_readable (uintmax_t n, char *buf,
|
||||
Use INEXACT_STYLE to determine whether to take the ceiling or floor
|
||||
of any result that cannot be expressed exactly.
|
||||
|
||||
If OUTPUT_BLOCK_SIZE is negative, use a format like "127k" if
|
||||
If OUTPUT_BLOCK_SIZE is negative, use a format like "127K" if
|
||||
possible, using powers of -OUTPUT_BLOCK_SIZE; otherwise, use
|
||||
ordinary decimal format. Normally -OUTPUT_BLOCK_SIZE is either
|
||||
1000 or 1024; it must be at least 2. Most people visually process
|
||||
@@ -121,9 +141,10 @@ human_readable (uintmax_t n, char *buf,
|
||||
more prone to misinterpretation. Hence, converting to an
|
||||
abbreviated form usually improves readability. Use a suffix
|
||||
indicating which power is being used. For example, assuming
|
||||
-OUTPUT_BLOCK_SIZE is 1024, 8500 would be converted to 8.3k,
|
||||
-OUTPUT_BLOCK_SIZE is 1024, 8500 would be converted to 8.3K,
|
||||
133456345 to 127M, 56990456345 to 53G, and so on. Numbers smaller
|
||||
than -OUTPUT_BLOCK_SIZE aren't modified. */
|
||||
than -OUTPUT_BLOCK_SIZE aren't modified. If -OUTPUT_BLOCK_SIZE is
|
||||
1024, append a "B" after any size letter. */
|
||||
|
||||
char *
|
||||
human_readable_inexact (uintmax_t n, char *buf,
|
||||
@@ -193,6 +214,8 @@ human_readable_inexact (uintmax_t n, char *buf,
|
||||
sprintf (buf, "%.0f", adjust_value (inexact_style, damt));
|
||||
else
|
||||
{
|
||||
char suffix[3];
|
||||
char const *psuffix;
|
||||
double e = 1;
|
||||
power = 0;
|
||||
|
||||
@@ -205,12 +228,13 @@ human_readable_inexact (uintmax_t n, char *buf,
|
||||
|
||||
damt /= e;
|
||||
|
||||
sprintf (buf, "%.1f%c", adjust_value (inexact_style, damt),
|
||||
suffixes[power]);
|
||||
if (4 < strlen (buf))
|
||||
sprintf (buf, "%.0f%c",
|
||||
adjust_value (inexact_style, damt * 10) / 10,
|
||||
suffixes[power]);
|
||||
suffix[2] = '\0';
|
||||
psuffix = generate_suffix_backwards (suffix + 2, power, base);
|
||||
sprintf (buf, "%.1f%s",
|
||||
adjust_value (inexact_style, damt), psuffix);
|
||||
if (4 + (base == 1000) < strlen (buf))
|
||||
sprintf (buf, "%.0f%s",
|
||||
adjust_value (inexact_style, damt * 10) / 10, psuffix);
|
||||
}
|
||||
|
||||
return buf;
|
||||
@@ -236,7 +260,7 @@ human_readable_inexact (uintmax_t n, char *buf,
|
||||
}
|
||||
while (base <= amt && power < sizeof suffixes - 1);
|
||||
|
||||
*--p = suffixes[power];
|
||||
p = generate_suffix_backwards (p, power, base);
|
||||
|
||||
if (amt < 10)
|
||||
{
|
||||
|
||||
11
lib/lchown.c
11
lib/lchown.c
@@ -1,5 +1,5 @@
|
||||
/* Provide a stub lchown function for systems that lack it.
|
||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -30,8 +30,13 @@ extern int errno;
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
# undef S_ISLNK
|
||||
#endif
|
||||
#if !defined(S_ISLNK) && defined(S_IFLNK)
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
|
||||
#ifndef S_ISLNK
|
||||
# ifdef S_IFLNK
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
# else
|
||||
# define S_ISLNK(m) 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Declare chown to avoid a warning. Don't include unistd.h,
|
||||
|
||||
@@ -25,9 +25,8 @@
|
||||
#include <sys/types.h>
|
||||
#include "linebuffer.h"
|
||||
#include "unlocked-io.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
void free ();
|
||||
|
||||
/* Initialize linebuffer LINEBUFFER for use. */
|
||||
@@ -37,14 +36,16 @@ initbuffer (struct linebuffer *linebuffer)
|
||||
{
|
||||
linebuffer->length = 0;
|
||||
linebuffer->size = 200;
|
||||
linebuffer->buffer = (char *) xmalloc (linebuffer->size);
|
||||
linebuffer->buffer = xmalloc (linebuffer->size);
|
||||
}
|
||||
|
||||
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
|
||||
Keep the newline; append a newline if it's the last line of a file
|
||||
that ends in a non-newline character. Do not null terminate.
|
||||
Return LINEBUFFER, except at end of file return 0. */
|
||||
|
||||
Therefore the stream can contain NUL bytes, and the length
|
||||
(including the newline) is returned in linebuffer->length.
|
||||
Return NULL upon error, or when STREAM is empty.
|
||||
Otherwise, return LINEBUFFER. */
|
||||
struct linebuffer *
|
||||
readline (struct linebuffer *linebuffer, FILE *stream)
|
||||
{
|
||||
@@ -54,7 +55,7 @@ readline (struct linebuffer *linebuffer, FILE *stream)
|
||||
char *end = buffer + linebuffer->size; /* Sentinel. */
|
||||
|
||||
if (feof (stream) || ferror (stream))
|
||||
return 0;
|
||||
return NULL;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -62,7 +63,7 @@ readline (struct linebuffer *linebuffer, FILE *stream)
|
||||
if (c == EOF)
|
||||
{
|
||||
if (p == buffer)
|
||||
return 0;
|
||||
return NULL;
|
||||
if (p[-1] == '\n')
|
||||
break;
|
||||
c = '\n';
|
||||
@@ -70,7 +71,7 @@ readline (struct linebuffer *linebuffer, FILE *stream)
|
||||
if (p == end)
|
||||
{
|
||||
linebuffer->size *= 2;
|
||||
buffer = (char *) xrealloc (buffer, linebuffer->size);
|
||||
buffer = xrealloc (buffer, linebuffer->size);
|
||||
p = p - linebuffer->buffer + buffer;
|
||||
linebuffer->buffer = buffer;
|
||||
end = buffer + linebuffer->size;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Determine a canonical name for the current locale's character encoding.
|
||||
|
||||
Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@@ -42,7 +42,12 @@
|
||||
# define WIN32
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#if defined __EMX__
|
||||
/* Assume EMX program runs on OS/2, even if compiled under DOS. */
|
||||
# define OS2
|
||||
#endif
|
||||
|
||||
#if !defined WIN32
|
||||
# if HAVE_LANGINFO_CODESET
|
||||
# include <langinfo.h>
|
||||
# else
|
||||
@@ -50,10 +55,19 @@
|
||||
# include <locale.h>
|
||||
# endif
|
||||
# endif
|
||||
#else /* WIN32 */
|
||||
#elif defined WIN32
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#if defined OS2
|
||||
# define INCL_DOS
|
||||
# include <os2.h>
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
|
||||
/* Win32, OS/2, DOS */
|
||||
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
|
||||
#endif
|
||||
|
||||
#ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
@@ -63,6 +77,11 @@
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETC_UNLOCKED
|
||||
# undef getc
|
||||
# define getc getc_unlocked
|
||||
#endif
|
||||
|
||||
/* The following static variable is declared 'volatile' to avoid a
|
||||
possible multithread problem in the function get_charset_aliases. If we
|
||||
are running in a threaded environment, and if two threads initialize
|
||||
@@ -86,7 +105,7 @@ get_charset_aliases ()
|
||||
cp = charset_aliases;
|
||||
if (cp == NULL)
|
||||
{
|
||||
#ifndef WIN32
|
||||
#if !defined WIN32
|
||||
FILE *fp;
|
||||
const char *dir = LIBDIR;
|
||||
const char *base = "charset.alias";
|
||||
@@ -138,19 +157,19 @@ get_charset_aliases ()
|
||||
continue;
|
||||
}
|
||||
ungetc (c, fp);
|
||||
if (fscanf(fp, "%50s %50s", buf1, buf2) < 2)
|
||||
if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
|
||||
break;
|
||||
l1 = strlen (buf1);
|
||||
l2 = strlen (buf2);
|
||||
if (res_size == 0)
|
||||
{
|
||||
res_size = l1 + 1 + l2 + 1;
|
||||
res_ptr = malloc (res_size + 1);
|
||||
res_ptr = (char *) malloc (res_size + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
res_size += l1 + 1 + l2 + 1;
|
||||
res_ptr = realloc (res_ptr, res_size + 1);
|
||||
res_ptr = (char *) realloc (res_ptr, res_size + 1);
|
||||
}
|
||||
if (res_ptr == NULL)
|
||||
{
|
||||
@@ -174,14 +193,16 @@ get_charset_aliases ()
|
||||
if (file_name != NULL)
|
||||
free (file_name);
|
||||
|
||||
#else /* WIN32 */
|
||||
#else
|
||||
|
||||
/* To avoid the troubles of installing a separate file in the same
|
||||
directory as the DLL and of retrieving the DLL's directory at
|
||||
runtime, simply inline the aliases here. */
|
||||
|
||||
# if defined WIN32
|
||||
cp = "CP936" "\0" "GBK" "\0"
|
||||
"CP1361" "\0" "JOHAB" "\0";
|
||||
# endif
|
||||
#endif
|
||||
|
||||
charset_aliases = cp;
|
||||
@@ -205,7 +226,7 @@ locale_charset ()
|
||||
const char *codeset;
|
||||
const char *aliases;
|
||||
|
||||
#ifndef WIN32
|
||||
#if !(defined WIN32 || defined OS2)
|
||||
|
||||
# if HAVE_LANGINFO_CODESET
|
||||
|
||||
@@ -242,7 +263,7 @@ locale_charset ()
|
||||
|
||||
# endif
|
||||
|
||||
#else /* WIN32 */
|
||||
#elif defined WIN32
|
||||
|
||||
static char buf[2 + 10 + 1];
|
||||
|
||||
@@ -250,6 +271,59 @@ locale_charset ()
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
codeset = buf;
|
||||
|
||||
#elif defined OS2
|
||||
|
||||
const char *locale;
|
||||
static char buf[2 + 10 + 1];
|
||||
ULONG cp[3];
|
||||
ULONG cplen;
|
||||
|
||||
/* Allow user to override the codeset, as set in the operating system,
|
||||
with standard language environment variables. */
|
||||
locale = getenv ("LC_ALL");
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
{
|
||||
locale = getenv ("LC_CTYPE");
|
||||
if (locale == NULL || locale[0] == '\0')
|
||||
locale = getenv ("LANG");
|
||||
}
|
||||
if (locale != NULL && locale[0] != '\0')
|
||||
{
|
||||
/* If the locale name contains an encoding after the dot, return it. */
|
||||
const char *dot = strchr (locale, '.');
|
||||
|
||||
if (dot != NULL)
|
||||
{
|
||||
const char *modifier;
|
||||
|
||||
dot++;
|
||||
/* Look for the possible @... trailer and remove it, if any. */
|
||||
modifier = strchr (dot, '@');
|
||||
if (modifier == NULL)
|
||||
return dot;
|
||||
if (modifier - dot < sizeof (buf))
|
||||
{
|
||||
memcpy (buf, dot, modifier - dot);
|
||||
buf [modifier - dot] = '\0';
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
|
||||
/* Resolve through the charset.alias file. */
|
||||
codeset = locale;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* OS/2 has a function returning the locale's codepage as a number. */
|
||||
if (DosQueryCp (sizeof (cp), cp, &cplen))
|
||||
codeset = "";
|
||||
else
|
||||
{
|
||||
sprintf (buf, "CP%u", cp[0]);
|
||||
codeset = buf;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (codeset == NULL)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* makepath.c -- Ensure that a directory path exists.
|
||||
Copyright (C) 1990, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -338,7 +338,7 @@ make_path (const char *argpath,
|
||||
stat and mkdir process O(n^2) file name components. */
|
||||
if (do_chdir && chdir (basename_dir) < 0)
|
||||
{
|
||||
error (0, errno, _("cannot chdir to directory, %s"),
|
||||
error (0, errno, _("cannot chdir to directory %s"),
|
||||
quote (dirpath));
|
||||
CLEANUP;
|
||||
return 1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Locale-specific memory comparison.
|
||||
Copyright 1999 Free Software Foundation, Inc.
|
||||
Copyright 1999, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -21,6 +21,11 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if HAVE_STRING_H
|
||||
@@ -30,7 +35,8 @@
|
||||
/* Compare S1 (with length S1LEN) and S2 (with length S2LEN) according
|
||||
to the LC_COLLATE locale. S1 and S2 do not overlap, and are not
|
||||
adjacent. Temporarily modify the bytes after S1 and S2, but
|
||||
restore their original contents before returning. */
|
||||
restore their original contents before returning. Set errno to an
|
||||
error number if there is an error, and to zero otherwise. */
|
||||
int
|
||||
memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
|
||||
{
|
||||
@@ -41,7 +47,7 @@ memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
|
||||
s1[s1len++] = '\0';
|
||||
s2[s2len++] = '\0';
|
||||
|
||||
while (! (diff = strcoll (s1, s2)))
|
||||
while (! (errno = 0, (diff = strcoll (s1, s2)) || errno))
|
||||
{
|
||||
/* strcoll found no difference, but perhaps it was fooled by NUL
|
||||
characters in the data. Work around this problem by advancing
|
||||
|
||||
@@ -194,18 +194,18 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
&& 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)));
|
||||
: (mode_t) ((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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* mountlist.c -- return a list of mounted filesystems
|
||||
Copyright (C) 1991, 1992, 1997-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1992, 1997-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -136,6 +136,7 @@ extern int errno;
|
||||
# include <sys/mntent.h>
|
||||
#endif
|
||||
|
||||
#undef MNT_IGNORE
|
||||
#if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT
|
||||
# define MNT_IGNORE(M) hasmntopt ((M), MNTOPT_IGNORE)
|
||||
#else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* mountlist.h -- declarations for list of mounted filesystems
|
||||
Copyright (C) 1991, 1992, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1992, 1998, 2000-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -38,13 +38,21 @@ struct mount_entry
|
||||
struct mount_entry *read_filesystem_list PARAMS ((int need_fs_type));
|
||||
|
||||
#ifndef ME_DUMMY
|
||||
# define ME_DUMMY(fs_name, fs_type) \
|
||||
(!strcmp (fs_type, "auto") \
|
||||
|| !strcmp (fs_type, "autofs") \
|
||||
# define ME_DUMMY(Fs_name, Fs_type) \
|
||||
(!strcmp (Fs_type, "autofs") \
|
||||
/* for Irix 6.5 */ \
|
||||
|| !strcmp (fs_type, "ignore"))
|
||||
|| !strcmp (Fs_type, "ignore"))
|
||||
#endif
|
||||
|
||||
#undef STREQ
|
||||
#define STREQ(a, b) (strcmp ((a), (b)) == 0)
|
||||
|
||||
#ifndef ME_REMOTE
|
||||
# define ME_REMOTE(fs_name, fs_type) (strchr (fs_name, ':') != 0)
|
||||
/* A file system is `remote' if its Fs_name contains a `:'
|
||||
or if (it is of type smbfs and its Fs_name starts with `//'). */
|
||||
# define ME_REMOTE(Fs_name, Fs_type) \
|
||||
(strchr ((Fs_name), ':') != 0 \
|
||||
|| ((Fs_name)[0] == '/' \
|
||||
&& (Fs_name)[1] == '/' \
|
||||
&& STREQ (Fs_type, "smbfs")))
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Provide a replacement for the POSIX nanosleep function.
|
||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -43,7 +43,7 @@ extern int errno;
|
||||
# define SIGCONT SIGTERM
|
||||
#endif
|
||||
|
||||
#include "nanosleep.h"
|
||||
#include "timespec.h"
|
||||
|
||||
static int suspended;
|
||||
int first_call = 1;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* path-concat.c -- concatenate two arbitrary pathnames
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -121,7 +123,7 @@ char *
|
||||
xpath_concat (const char *dir, const char *base, char **base_in_result)
|
||||
{
|
||||
char *res = path_concat (dir, base, base_in_result);
|
||||
if (res)
|
||||
return res;
|
||||
xalloc_die ();
|
||||
if (! res)
|
||||
xalloc_die ();
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Parse dates for touch and date.
|
||||
Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001 Free Software Foundation Inc.
|
||||
Copyright (C) 1989, 1990, 1991, 1998, 2000-2002 Free Software Foundation Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -46,10 +46,9 @@
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
- It's typically faster.
|
||||
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless
|
||||
it's important to use the locale's definition of `digit' even when the
|
||||
host does not conform to Posix. */
|
||||
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
|
||||
ISDIGIT_LOCALE unless it's important to use the locale's definition
|
||||
of `digit' even when the host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
/* The return value. */
|
||||
@@ -64,7 +63,7 @@ time_t mktime ();
|
||||
8, 10, or 12 digits, followed by optional .ss
|
||||
(PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS)
|
||||
|
||||
touch mmddhhmm[YY] FILE... (obsolescent)
|
||||
touch mmddhhmm[YY] FILE... (obsoleted by POSIX 1003.1-2001)
|
||||
8 or 10 digits
|
||||
(PDS_TRAILING_YEAR)
|
||||
|
||||
@@ -82,7 +81,8 @@ year (const int *digit_pair, size_t n, int allow_century)
|
||||
case 1:
|
||||
t.tm_year = *digit_pair;
|
||||
/* Deduce the century based on the year.
|
||||
See POSIX.2 section 4.63.3. */
|
||||
POSIX requires that 00-68 be interpreted as 2000-2068,
|
||||
and that 69-99 be interpreted as 1969-1999. */
|
||||
if (digit_pair[0] <= 68)
|
||||
t.tm_year += 100;
|
||||
break;
|
||||
@@ -125,7 +125,7 @@ posix_time_parse (const char *s, unsigned int syntax_bits)
|
||||
|
||||
size_t s_len = strlen (s);
|
||||
size_t len = (((syntax_bits & PDS_SECONDS) && (dot = strchr (s, '.')))
|
||||
? dot - s
|
||||
? (size_t) (dot - s)
|
||||
: s_len);
|
||||
|
||||
if (len != 8 && len != 10 && len != 12)
|
||||
|
||||
58
lib/posixver.c
Normal file
58
lib/posixver.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/* Which POSIX version to conform to, for utilities.
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#if !HAVE_DECL_GETENV && !defined getenv
|
||||
char *getenv ();
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifndef _POSIX2_VERSION
|
||||
# define _POSIX2_VERSION 0
|
||||
#endif
|
||||
|
||||
/* The POSIX version that utilities should conform to. The default is
|
||||
specified by the system. */
|
||||
|
||||
int
|
||||
posix2_version (void)
|
||||
{
|
||||
long int v = _POSIX2_VERSION;
|
||||
char const *s = getenv ("_POSIX2_VERSION");
|
||||
|
||||
if (s && *s)
|
||||
{
|
||||
char *e;
|
||||
long int i = strtol (s, &e, 10);
|
||||
if (! *e)
|
||||
v = i;
|
||||
}
|
||||
|
||||
return v < INT_MIN ? INT_MIN : v < INT_MAX ? v : INT_MAX;
|
||||
}
|
||||
1
lib/posixver.h
Normal file
1
lib/posixver.h
Normal file
@@ -0,0 +1 @@
|
||||
int posix2_version (void);
|
||||
@@ -1,5 +1,5 @@
|
||||
/* quotearg.c - quote arguments for output
|
||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -44,9 +44,15 @@
|
||||
#ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
#endif
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
#ifndef UCHAR_MAX
|
||||
# define UCHAR_MAX ((unsigned char) -1)
|
||||
#endif
|
||||
#ifndef UINT_MAX
|
||||
# define UINT_MAX ((unsigned int) -1)
|
||||
#endif
|
||||
|
||||
#if HAVE_C_BACKSLASH_A
|
||||
# define ALERT_CHAR '\a'
|
||||
@@ -295,6 +301,16 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
|
||||
c = arg[i];
|
||||
switch (c)
|
||||
{
|
||||
case '\0':
|
||||
if (backslash_escapes)
|
||||
{
|
||||
STORE ('\\');
|
||||
STORE ('0');
|
||||
STORE ('0');
|
||||
c = '0';
|
||||
}
|
||||
break;
|
||||
|
||||
case '?':
|
||||
switch (quoting_style)
|
||||
{
|
||||
@@ -521,20 +537,22 @@ quotearg_buffer (char *buffer, size_t buffersize,
|
||||
p->style, p);
|
||||
}
|
||||
|
||||
/* Use storage slot N to return a quoted version of the string ARG.
|
||||
/* Use storage slot N to return a quoted version of argument ARG.
|
||||
ARG is of size ARGSIZE, but if that is -1, ARG is a null-terminated string.
|
||||
OPTIONS specifies the quoting options.
|
||||
The returned value points to static storage that can be
|
||||
reused by the next call to this function with the same value of N.
|
||||
N must be nonnegative. N is deliberately declared with type "int"
|
||||
to allow for future extensions (using negative values). */
|
||||
static char *
|
||||
quotearg_n_options (int n, char const *arg,
|
||||
quotearg_n_options (int n, char const *arg, size_t argsize,
|
||||
struct quoting_options const *options)
|
||||
{
|
||||
/* Preallocate a slot 0 buffer, so that the caller can always quote
|
||||
one small component of a "memory exhausted" message in slot 0. */
|
||||
static char slot0[256];
|
||||
static unsigned int nslots = 1;
|
||||
unsigned int n0 = n;
|
||||
struct slotvec
|
||||
{
|
||||
size_t size;
|
||||
@@ -543,32 +561,38 @@ quotearg_n_options (int n, char const *arg,
|
||||
static struct slotvec slotvec0 = {sizeof slot0, slot0};
|
||||
static struct slotvec *slotvec = &slotvec0;
|
||||
|
||||
if (nslots <= n)
|
||||
if (n < 0)
|
||||
abort ();
|
||||
|
||||
if (nslots <= n0)
|
||||
{
|
||||
int n1 = n + 1;
|
||||
size_t s = n1 * sizeof (struct slotvec);
|
||||
if (! (0 < n1 && n1 == s / sizeof (struct slotvec)))
|
||||
abort ();
|
||||
unsigned int n1 = n0 + 1;
|
||||
size_t s = n1 * sizeof *slotvec;
|
||||
|
||||
if (SIZE_MAX / UINT_MAX <= sizeof *slotvec
|
||||
&& n1 != s / sizeof *slotvec)
|
||||
xalloc_die ();
|
||||
|
||||
if (slotvec == &slotvec0)
|
||||
{
|
||||
slotvec = (struct slotvec *) xmalloc (sizeof (struct slotvec));
|
||||
slotvec = (struct slotvec *) xmalloc (sizeof *slotvec);
|
||||
*slotvec = slotvec0;
|
||||
}
|
||||
slotvec = (struct slotvec *) xrealloc (slotvec, s);
|
||||
memset (slotvec + nslots, 0, (n1 - nslots) * sizeof (struct slotvec));
|
||||
nslots = n;
|
||||
memset (slotvec + nslots, 0, (n1 - nslots) * sizeof *slotvec);
|
||||
nslots = n1;
|
||||
}
|
||||
|
||||
{
|
||||
size_t size = slotvec[n].size;
|
||||
char *val = slotvec[n].val;
|
||||
size_t qsize = quotearg_buffer (val, size, arg, (size_t) -1, options);
|
||||
size_t qsize = quotearg_buffer (val, size, arg, argsize, options);
|
||||
|
||||
if (size <= qsize)
|
||||
{
|
||||
slotvec[n].size = size = qsize + 1;
|
||||
slotvec[n].val = val = xrealloc (val == slot0 ? 0 : val, size);
|
||||
quotearg_buffer (val, size, arg, (size_t) -1, options);
|
||||
quotearg_buffer (val, size, arg, argsize, options);
|
||||
}
|
||||
|
||||
return val;
|
||||
@@ -576,9 +600,9 @@ quotearg_n_options (int n, char const *arg,
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_n (unsigned int n, char const *arg)
|
||||
quotearg_n (int n, char const *arg)
|
||||
{
|
||||
return quotearg_n_options (n, arg, &default_quoting_options);
|
||||
return quotearg_n_options (n, arg, (size_t) -1, &default_quoting_options);
|
||||
}
|
||||
|
||||
char *
|
||||
@@ -587,13 +611,29 @@ quotearg (char const *arg)
|
||||
return quotearg_n (0, arg);
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_n_style (unsigned int n, enum quoting_style s, char const *arg)
|
||||
/* Return quoting options for STYLE, with no extra quoting. */
|
||||
static struct quoting_options
|
||||
quoting_options_from_style (enum quoting_style style)
|
||||
{
|
||||
struct quoting_options o;
|
||||
o.style = s;
|
||||
o.style = style;
|
||||
memset (o.quote_these_too, 0, sizeof o.quote_these_too);
|
||||
return quotearg_n_options (n, arg, &o);
|
||||
return o;
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_n_style (int n, enum quoting_style s, char const *arg)
|
||||
{
|
||||
struct quoting_options const o = quoting_options_from_style (s);
|
||||
return quotearg_n_options (n, arg, (size_t) -1, &o);
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_n_style_mem (int n, enum quoting_style s,
|
||||
char const *arg, size_t argsize)
|
||||
{
|
||||
struct quoting_options const o = quoting_options_from_style (s);
|
||||
return quotearg_n_options (n, arg, argsize, &o);
|
||||
}
|
||||
|
||||
char *
|
||||
@@ -608,7 +648,7 @@ quotearg_char (char const *arg, char ch)
|
||||
struct quoting_options options;
|
||||
options = default_quoting_options;
|
||||
set_char_quoting (&options, ch, 1);
|
||||
return quotearg_n_options (0, arg, &options);
|
||||
return quotearg_n_options (0, arg, (size_t) -1, &options);
|
||||
}
|
||||
|
||||
char *
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* quotearg.h - quote arguments for output
|
||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -89,7 +89,7 @@ size_t quotearg_buffer PARAMS ((char *buffer, size_t buffersize,
|
||||
The returned value points to static storage that can be
|
||||
reused by the next call to this function with the same value of N.
|
||||
N must be nonnegative. */
|
||||
char *quotearg_n PARAMS ((unsigned int n, char const *arg));
|
||||
char *quotearg_n PARAMS ((int n, char const *arg));
|
||||
|
||||
/* Equivalent to quotearg_n (0, ARG). */
|
||||
char *quotearg PARAMS ((char const *arg));
|
||||
@@ -97,8 +97,12 @@ char *quotearg PARAMS ((char const *arg));
|
||||
/* Use style S and storage slot N to return a quoted version of the string ARG.
|
||||
This is like quotearg_n (N, ARG), except that it uses S with no other
|
||||
options to specify the quoting method. */
|
||||
char *quotearg_n_style PARAMS ((unsigned int n, enum quoting_style s,
|
||||
char const *arg));
|
||||
char *quotearg_n_style PARAMS ((int n, enum quoting_style s, char const *arg));
|
||||
/* Use style S and storage slot N to return a quoted version of the
|
||||
argument ARG of size ARGSIZE. This is like quotearg_n_style
|
||||
(N, S, ARG), except it can quote null bytes. */
|
||||
char *quotearg_n_style_mem PARAMS ((int n, enum quoting_style s,
|
||||
char const *arg, size_t argsize));
|
||||
|
||||
/* Equivalent to quotearg_n_style (0, S, ARG). */
|
||||
char *quotearg_style PARAMS ((enum quoting_style s, char const *arg));
|
||||
|
||||
@@ -108,9 +108,10 @@ readtoken (FILE *stream,
|
||||
if (!same_delimiters)
|
||||
{
|
||||
const char *t;
|
||||
unsigned int j;
|
||||
saved_delim = delim;
|
||||
for (i = 0; i < sizeof (isdelim); i++)
|
||||
isdelim[i] = 0;
|
||||
for (j = 0; j < sizeof (isdelim); j++)
|
||||
isdelim[j] = 0;
|
||||
for (t = delim; *t; t++)
|
||||
isdelim[(unsigned int) *t] = 1;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Declarations for GNU's read utmp module.
|
||||
Copyright (C) 1992-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -69,9 +69,6 @@
|
||||
# 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
|
||||
|
||||
@@ -82,12 +79,25 @@
|
||||
# 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
|
||||
|
||||
# define HAVE_STRUCT_XTMP_UT_EXIT \
|
||||
(HAVE_STRUCT_UTMP_UT_EXIT \
|
||||
|| HAVE_STRUCT_UTMPX_UT_EXIT)
|
||||
|
||||
# define HAVE_STRUCT_XTMP_UT_ID \
|
||||
(HAVE_STRUCT_UTMP_UT_ID \
|
||||
|| HAVE_STRUCT_UTMPX_UT_ID)
|
||||
|
||||
# define HAVE_STRUCT_XTMP_UT_PID \
|
||||
(HAVE_STRUCT_UTMP_UT_PID \
|
||||
|| HAVE_STRUCT_UTMPX_UT_PID)
|
||||
|
||||
# define HAVE_STRUCT_XTMP_UT_TYPE \
|
||||
(HAVE_STRUCT_UTMP_UT_TYPE \
|
||||
|| HAVE_STRUCT_UTMPX_UT_TYPE)
|
||||
|
||||
typedef struct UTMP_STRUCT_NAME STRUCT_UTMP;
|
||||
|
||||
# include <time.h>
|
||||
|
||||
518
lib/regex.c
518
lib/regex.c
@@ -82,6 +82,11 @@
|
||||
# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
|
||||
|
||||
# define btowc __btowc
|
||||
# define iswctype __iswctype
|
||||
# define mbrtowc __mbrtowc
|
||||
# define wcslen __wcslen
|
||||
# define wcscoll __wcscoll
|
||||
# define wcrtomb __wcrtomb
|
||||
|
||||
/* We are also using some library internals. */
|
||||
# include <locale/localeinfo.h>
|
||||
@@ -107,6 +112,13 @@
|
||||
# define gettext_noop(String) String
|
||||
# endif
|
||||
|
||||
/* Support for bounded pointers. */
|
||||
# if !defined _LIBC && !defined __BOUNDED_POINTERS__
|
||||
# define __bounded /* nothing */
|
||||
# define __unbounded /* nothing */
|
||||
# define __ptrvalue /* nothing */
|
||||
# endif
|
||||
|
||||
/* The `emacs' switch turns on certain matching commands
|
||||
that make sense only in Emacs. */
|
||||
# ifdef emacs
|
||||
@@ -3300,13 +3312,8 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp)
|
||||
|
||||
for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
|
||||
{
|
||||
# ifdef _LIBC
|
||||
if (__iswctype (__btowc (ch), wt))
|
||||
SET_LIST_BIT (ch);
|
||||
# else
|
||||
if (iswctype (btowc (ch), wt))
|
||||
SET_LIST_BIT (ch);
|
||||
# endif
|
||||
|
||||
if (translate && (is_upper || is_lower)
|
||||
&& (ISUPPER (ch) || ISLOWER (ch)))
|
||||
@@ -4618,9 +4625,12 @@ static unsigned char
|
||||
truncate_wchar (c)
|
||||
CHAR_T c;
|
||||
{
|
||||
unsigned char buf[MB_LEN_MAX];
|
||||
int retval = wctomb(buf, c);
|
||||
return retval > 0 ? buf[0] : (unsigned char)c;
|
||||
unsigned char buf[MB_CUR_MAX];
|
||||
mbstate_t state;
|
||||
int retval;
|
||||
memset (&state, '\0', sizeof (state));
|
||||
retval = wcrtomb (buf, c, &state);
|
||||
return retval > 0 ? buf[0] : (unsigned char) c;
|
||||
}
|
||||
#endif /* WCHAR */
|
||||
|
||||
@@ -5798,6 +5808,88 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
unsigned num_regs_pushed = 0;
|
||||
#endif
|
||||
|
||||
/* Definitions for state transitions. More efficiently for gcc. */
|
||||
#ifdef __GNUC__
|
||||
# if defined HAVE_SUBTRACT_LOCAL_LABELS && defined SHARED
|
||||
# define NEXT \
|
||||
do \
|
||||
{ \
|
||||
int offset; \
|
||||
const void *__unbounded ptr; \
|
||||
offset = (p == pend \
|
||||
? 0 : jmptable[SWITCH_ENUM_CAST ((re_opcode_t) *p++)]); \
|
||||
ptr = &&end_of_pattern + offset; \
|
||||
goto *ptr; \
|
||||
} \
|
||||
while (0)
|
||||
# define REF(x) \
|
||||
&&label_##x - &&end_of_pattern
|
||||
# define JUMP_TABLE_TYPE const int
|
||||
# else
|
||||
# define NEXT \
|
||||
do \
|
||||
{ \
|
||||
const void *__unbounded ptr; \
|
||||
ptr = (p == pend ? &&end_of_pattern \
|
||||
: jmptable[SWITCH_ENUM_CAST ((re_opcode_t) *p++)]); \
|
||||
goto *ptr; \
|
||||
} \
|
||||
while (0)
|
||||
# define REF(x) \
|
||||
&&label_##x
|
||||
# define JUMP_TABLE_TYPE const void *const
|
||||
# endif
|
||||
# define CASE(x) label_##x
|
||||
static JUMP_TABLE_TYPE jmptable[] =
|
||||
{
|
||||
REF (no_op),
|
||||
REF (succeed),
|
||||
REF (exactn),
|
||||
# ifdef MBS_SUPPORT
|
||||
REF (exactn_bin),
|
||||
# endif
|
||||
REF (anychar),
|
||||
REF (charset),
|
||||
REF (charset_not),
|
||||
REF (start_memory),
|
||||
REF (stop_memory),
|
||||
REF (duplicate),
|
||||
REF (begline),
|
||||
REF (endline),
|
||||
REF (begbuf),
|
||||
REF (endbuf),
|
||||
REF (jump),
|
||||
REF (jump_past_alt),
|
||||
REF (on_failure_jump),
|
||||
REF (on_failure_keep_string_jump),
|
||||
REF (pop_failure_jump),
|
||||
REF (maybe_pop_jump),
|
||||
REF (dummy_failure_jump),
|
||||
REF (push_dummy_failure),
|
||||
REF (succeed_n),
|
||||
REF (jump_n),
|
||||
REF (set_number_at),
|
||||
REF (wordchar),
|
||||
REF (notwordchar),
|
||||
REF (wordbeg),
|
||||
REF (wordend),
|
||||
REF (wordbound),
|
||||
REF (notwordbound)
|
||||
# ifdef emacs
|
||||
,REF (before_dot),
|
||||
REF (at_dot),
|
||||
REF (after_dot),
|
||||
REF (syntaxspec),
|
||||
REF (notsyntaxspec)
|
||||
# endif
|
||||
};
|
||||
#else
|
||||
# define NEXT \
|
||||
break
|
||||
# define CASE(x) \
|
||||
case x
|
||||
#endif
|
||||
|
||||
DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
|
||||
|
||||
INIT_FAIL_STACK ();
|
||||
@@ -6020,13 +6112,21 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
DEBUG_PRINT2 ("\n0x%x: ", p);
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
NEXT;
|
||||
#else
|
||||
if (p == pend)
|
||||
{ /* End of pattern means we might have succeeded. */
|
||||
DEBUG_PRINT1 ("end of pattern ... ");
|
||||
#endif
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
end_of_pattern:
|
||||
#endif
|
||||
/* End of pattern means we might have succeeded. */
|
||||
DEBUG_PRINT1 ("end of pattern ... ");
|
||||
|
||||
/* If we haven't matched the entire string, and we want the
|
||||
longest match, try backtracking. */
|
||||
if (d != end_match_2)
|
||||
longest match, try backtracking. */
|
||||
if (d != end_match_2)
|
||||
{
|
||||
/* 1 if this match ends in the same string (string1 or string2)
|
||||
as the best previous match. */
|
||||
@@ -6042,184 +6142,185 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
else
|
||||
best_match_p = !MATCHING_IN_FIRST_STRING;
|
||||
|
||||
DEBUG_PRINT1 ("backtracking.\n");
|
||||
DEBUG_PRINT1 ("backtracking.\n");
|
||||
|
||||
if (!FAIL_STACK_EMPTY ())
|
||||
{ /* More failure points to try. */
|
||||
if (!FAIL_STACK_EMPTY ())
|
||||
{ /* More failure points to try. */
|
||||
|
||||
/* If exceeds best match so far, save it. */
|
||||
if (!best_regs_set || best_match_p)
|
||||
{
|
||||
best_regs_set = true;
|
||||
match_end = d;
|
||||
/* If exceeds best match so far, save it. */
|
||||
if (!best_regs_set || best_match_p)
|
||||
{
|
||||
best_regs_set = true;
|
||||
match_end = d;
|
||||
|
||||
DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
|
||||
DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
|
||||
|
||||
for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
|
||||
{
|
||||
best_regstart[mcnt] = regstart[mcnt];
|
||||
best_regend[mcnt] = regend[mcnt];
|
||||
}
|
||||
}
|
||||
goto fail;
|
||||
}
|
||||
for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
|
||||
{
|
||||
best_regstart[mcnt] = regstart[mcnt];
|
||||
best_regend[mcnt] = regend[mcnt];
|
||||
}
|
||||
}
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* If no failure points, don't restore garbage. And if
|
||||
last match is real best match, don't restore second
|
||||
best one. */
|
||||
else if (best_regs_set && !best_match_p)
|
||||
{
|
||||
restore_best_regs:
|
||||
/* Restore best match. It may happen that `dend ==
|
||||
end_match_1' while the restored d is in string2.
|
||||
For example, the pattern `x.*y.*z' against the
|
||||
strings `x-' and `y-z-', if the two strings are
|
||||
not consecutive in memory. */
|
||||
DEBUG_PRINT1 ("Restoring best registers.\n");
|
||||
/* If no failure points, don't restore garbage. And if
|
||||
last match is real best match, don't restore second
|
||||
best one. */
|
||||
else if (best_regs_set && !best_match_p)
|
||||
{
|
||||
restore_best_regs:
|
||||
/* Restore best match. It may happen that `dend ==
|
||||
end_match_1' while the restored d is in string2.
|
||||
For example, the pattern `x.*y.*z' against the
|
||||
strings `x-' and `y-z-', if the two strings are
|
||||
not consecutive in memory. */
|
||||
DEBUG_PRINT1 ("Restoring best registers.\n");
|
||||
|
||||
d = match_end;
|
||||
dend = ((d >= string1 && d <= end1)
|
||||
? end_match_1 : end_match_2);
|
||||
d = match_end;
|
||||
dend = ((d >= string1 && d <= end1)
|
||||
? end_match_1 : end_match_2);
|
||||
|
||||
for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
|
||||
{
|
||||
regstart[mcnt] = best_regstart[mcnt];
|
||||
regend[mcnt] = best_regend[mcnt];
|
||||
}
|
||||
}
|
||||
} /* d != end_match_2 */
|
||||
}
|
||||
} /* d != end_match_2 */
|
||||
|
||||
succeed_label:
|
||||
DEBUG_PRINT1 ("Accepting match.\n");
|
||||
/* If caller wants register contents data back, do it. */
|
||||
if (regs && !bufp->no_sub)
|
||||
DEBUG_PRINT1 ("Accepting match.\n");
|
||||
/* If caller wants register contents data back, do it. */
|
||||
if (regs && !bufp->no_sub)
|
||||
{
|
||||
/* Have the register data arrays been allocated? */
|
||||
if (bufp->regs_allocated == REGS_UNALLOCATED)
|
||||
{ /* No. So allocate them with malloc. We need one
|
||||
extra element beyond `num_regs' for the `-1' marker
|
||||
GNU code uses. */
|
||||
regs->num_regs = MAX (RE_NREGS, num_regs + 1);
|
||||
regs->start = TALLOC (regs->num_regs, regoff_t);
|
||||
regs->end = TALLOC (regs->num_regs, regoff_t);
|
||||
if (regs->start == NULL || regs->end == NULL)
|
||||
if (bufp->regs_allocated == REGS_UNALLOCATED)
|
||||
{ /* No. So allocate them with malloc. We need one
|
||||
extra element beyond `num_regs' for the `-1' marker
|
||||
GNU code uses. */
|
||||
regs->num_regs = MAX (RE_NREGS, num_regs + 1);
|
||||
regs->start = TALLOC (regs->num_regs, regoff_t);
|
||||
regs->end = TALLOC (regs->num_regs, regoff_t);
|
||||
if (regs->start == NULL || regs->end == NULL)
|
||||
{
|
||||
FREE_VARIABLES ();
|
||||
return -2;
|
||||
}
|
||||
bufp->regs_allocated = REGS_REALLOCATE;
|
||||
}
|
||||
else if (bufp->regs_allocated == REGS_REALLOCATE)
|
||||
{ /* Yes. If we need more elements than were already
|
||||
allocated, reallocate them. If we need fewer, just
|
||||
leave it alone. */
|
||||
if (regs->num_regs < num_regs + 1)
|
||||
{
|
||||
regs->num_regs = num_regs + 1;
|
||||
RETALLOC (regs->start, regs->num_regs, regoff_t);
|
||||
RETALLOC (regs->end, regs->num_regs, regoff_t);
|
||||
if (regs->start == NULL || regs->end == NULL)
|
||||
bufp->regs_allocated = REGS_REALLOCATE;
|
||||
}
|
||||
else if (bufp->regs_allocated == REGS_REALLOCATE)
|
||||
{ /* Yes. If we need more elements than were already
|
||||
allocated, reallocate them. If we need fewer, just
|
||||
leave it alone. */
|
||||
if (regs->num_regs < num_regs + 1)
|
||||
{
|
||||
regs->num_regs = num_regs + 1;
|
||||
RETALLOC (regs->start, regs->num_regs, regoff_t);
|
||||
RETALLOC (regs->end, regs->num_regs, regoff_t);
|
||||
if (regs->start == NULL || regs->end == NULL)
|
||||
{
|
||||
FREE_VARIABLES ();
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* These braces fend off a "empty body in an else-statement"
|
||||
warning under GCC when assert expands to nothing. */
|
||||
assert (bufp->regs_allocated == REGS_FIXED);
|
||||
}
|
||||
|
||||
/* Convert the pointer data in `regstart' and `regend' to
|
||||
indices. Register zero has to be set differently,
|
||||
since we haven't kept track of any info for it. */
|
||||
if (regs->num_regs > 0)
|
||||
{
|
||||
regs->start[0] = pos;
|
||||
/* Convert the pointer data in `regstart' and `regend' to
|
||||
indices. Register zero has to be set differently,
|
||||
since we haven't kept track of any info for it. */
|
||||
if (regs->num_regs > 0)
|
||||
{
|
||||
regs->start[0] = pos;
|
||||
#ifdef WCHAR
|
||||
if (MATCHING_IN_FIRST_STRING)
|
||||
regs->end[0] = mbs_offset1 != NULL ?
|
||||
mbs_offset1[d-string1] : 0;
|
||||
regs->end[0] = (mbs_offset1 != NULL ?
|
||||
mbs_offset1[d-string1] : 0);
|
||||
else
|
||||
regs->end[0] = csize1 + (mbs_offset2 != NULL ?
|
||||
mbs_offset2[d-string2] : 0);
|
||||
regs->end[0] = csize1 + (mbs_offset2 != NULL
|
||||
? mbs_offset2[d-string2] : 0);
|
||||
#else
|
||||
regs->end[0] = (MATCHING_IN_FIRST_STRING
|
||||
regs->end[0] = (MATCHING_IN_FIRST_STRING
|
||||
? ((regoff_t) (d - string1))
|
||||
: ((regoff_t) (d - string2 + size1)));
|
||||
: ((regoff_t) (d - string2 + size1)));
|
||||
#endif /* WCHAR */
|
||||
}
|
||||
}
|
||||
|
||||
/* Go through the first `min (num_regs, regs->num_regs)'
|
||||
registers, since that is all we initialized. */
|
||||
/* Go through the first `min (num_regs, regs->num_regs)'
|
||||
registers, since that is all we initialized. */
|
||||
for (mcnt = 1; (unsigned) mcnt < MIN (num_regs, regs->num_regs);
|
||||
mcnt++)
|
||||
{
|
||||
if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
|
||||
regs->start[mcnt] = regs->end[mcnt] = -1;
|
||||
else
|
||||
{
|
||||
if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
|
||||
regs->start[mcnt] = regs->end[mcnt] = -1;
|
||||
else
|
||||
{
|
||||
regs->start[mcnt]
|
||||
= (regoff_t) POINTER_TO_OFFSET (regstart[mcnt]);
|
||||
regs->end[mcnt]
|
||||
regs->end[mcnt]
|
||||
= (regoff_t) POINTER_TO_OFFSET (regend[mcnt]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If the regs structure we return has more elements than
|
||||
were in the pattern, set the extra elements to -1. If
|
||||
we (re)allocated the registers, this is the case,
|
||||
because we always allocate enough to have at least one
|
||||
-1 at the end. */
|
||||
for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
|
||||
regs->start[mcnt] = regs->end[mcnt] = -1;
|
||||
/* If the regs structure we return has more elements than
|
||||
were in the pattern, set the extra elements to -1. If
|
||||
we (re)allocated the registers, this is the case,
|
||||
because we always allocate enough to have at least one
|
||||
-1 at the end. */
|
||||
for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
|
||||
regs->start[mcnt] = regs->end[mcnt] = -1;
|
||||
} /* regs && !bufp->no_sub */
|
||||
|
||||
DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
|
||||
nfailure_points_pushed, nfailure_points_popped,
|
||||
nfailure_points_pushed - nfailure_points_popped);
|
||||
DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
|
||||
DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
|
||||
nfailure_points_pushed, nfailure_points_popped,
|
||||
nfailure_points_pushed - nfailure_points_popped);
|
||||
DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
|
||||
|
||||
#ifdef WCHAR
|
||||
if (MATCHING_IN_FIRST_STRING)
|
||||
mcnt = mbs_offset1 != NULL ? mbs_offset1[d-string1] : 0;
|
||||
else
|
||||
mcnt = (mbs_offset2 != NULL ? mbs_offset2[d-string2] : 0) +
|
||||
csize1;
|
||||
mcnt -= pos;
|
||||
csize1;
|
||||
mcnt -= pos;
|
||||
#else
|
||||
mcnt = d - pos - (MATCHING_IN_FIRST_STRING
|
||||
? string1
|
||||
: string2 - size1);
|
||||
mcnt = d - pos - (MATCHING_IN_FIRST_STRING
|
||||
? string1 : string2 - size1);
|
||||
#endif /* WCHAR */
|
||||
|
||||
DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
|
||||
DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
|
||||
|
||||
FREE_VARIABLES ();
|
||||
return mcnt;
|
||||
}
|
||||
FREE_VARIABLES ();
|
||||
return mcnt;
|
||||
}
|
||||
|
||||
#ifndef __GNUC__
|
||||
/* Otherwise match next pattern command. */
|
||||
switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
|
||||
{
|
||||
#endif
|
||||
/* Ignore these. Used to ignore the n of succeed_n's which
|
||||
currently have n == 0. */
|
||||
case no_op:
|
||||
CASE (no_op):
|
||||
DEBUG_PRINT1 ("EXECUTING no_op.\n");
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
case succeed:
|
||||
CASE (succeed):
|
||||
DEBUG_PRINT1 ("EXECUTING succeed.\n");
|
||||
goto succeed_label;
|
||||
|
||||
/* Match the next n pattern characters exactly. The following
|
||||
byte in the pattern defines n, and the n bytes after that
|
||||
are the characters to match. */
|
||||
case exactn:
|
||||
CASE (exactn):
|
||||
#ifdef MBS_SUPPORT
|
||||
case exactn_bin:
|
||||
CASE (exactn_bin):
|
||||
#endif
|
||||
mcnt = *p++;
|
||||
DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
|
||||
@@ -6261,11 +6362,11 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
while (--mcnt);
|
||||
}
|
||||
SET_REGS_MATCHED ();
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
|
||||
/* Match any character except possibly a newline or a null. */
|
||||
case anychar:
|
||||
CASE (anychar):
|
||||
DEBUG_PRINT1 ("EXECUTING anychar.\n");
|
||||
|
||||
PREFETCH ();
|
||||
@@ -6277,11 +6378,11 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
SET_REGS_MATCHED ();
|
||||
DEBUG_PRINT2 (" Matched `%ld'.\n", (long int) *d);
|
||||
d++;
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
|
||||
case charset:
|
||||
case charset_not:
|
||||
CASE (charset):
|
||||
CASE (charset_not):
|
||||
{
|
||||
register UCHAR_T c;
|
||||
#ifdef WCHAR
|
||||
@@ -6365,12 +6466,12 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
for (workp2 = workp + coll_symbol_length ; workp < workp2 ;)
|
||||
{
|
||||
const CHAR_T *backup_d = d, *backup_dend = dend;
|
||||
length = wcslen(workp);
|
||||
length = wcslen (workp);
|
||||
|
||||
/* If wcscoll(the collating symbol, whole string) > 0,
|
||||
any substring of the string never match with the
|
||||
collating symbol. */
|
||||
if (wcscoll(workp, d) > 0)
|
||||
if (wcscoll (workp, d) > 0)
|
||||
{
|
||||
workp += length + 1;
|
||||
continue;
|
||||
@@ -6395,7 +6496,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
str_buf[i] = TRANSLATE(*d);
|
||||
str_buf[i+1] = '\0';
|
||||
|
||||
match = wcscoll(workp, str_buf);
|
||||
match = wcscoll (workp, str_buf);
|
||||
if (match == 0)
|
||||
goto char_set_matched;
|
||||
|
||||
@@ -6506,12 +6607,12 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
for (workp2 = workp + equiv_class_length ; workp < workp2 ;)
|
||||
{
|
||||
const CHAR_T *backup_d = d, *backup_dend = dend;
|
||||
length = wcslen(workp);
|
||||
length = wcslen (workp);
|
||||
|
||||
/* If wcscoll(the collating symbol, whole string) > 0,
|
||||
any substring of the string never match with the
|
||||
collating symbol. */
|
||||
if (wcscoll(workp, d) > 0)
|
||||
if (wcscoll (workp, d) > 0)
|
||||
{
|
||||
workp += length + 1;
|
||||
break;
|
||||
@@ -6536,7 +6637,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
str_buf[i] = TRANSLATE(*d);
|
||||
str_buf[i+1] = '\0';
|
||||
|
||||
match = wcscoll(workp, str_buf);
|
||||
match = wcscoll (workp, str_buf);
|
||||
|
||||
if (match == 0)
|
||||
goto char_set_matched;
|
||||
@@ -6559,7 +6660,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
}
|
||||
|
||||
/* match with char_range? */
|
||||
#ifdef _LIBC
|
||||
# ifdef _LIBC
|
||||
if (nrules != 0)
|
||||
{
|
||||
uint32_t collseqval;
|
||||
@@ -6582,7 +6683,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
# endif
|
||||
{
|
||||
/* We set range_start_char at str_buf[0], range_end_char
|
||||
at str_buf[4], and compared char at str_buf[2]. */
|
||||
@@ -6618,9 +6719,8 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
range_end_char = str_buf + 4;
|
||||
}
|
||||
|
||||
if (wcscoll(range_start_char, str_buf+2) <= 0 &&
|
||||
wcscoll(str_buf+2, range_end_char) <= 0)
|
||||
|
||||
if (wcscoll (range_start_char, str_buf+2) <= 0
|
||||
&& wcscoll (str_buf+2, range_end_char) <= 0)
|
||||
goto char_set_matched;
|
||||
}
|
||||
}
|
||||
@@ -6648,7 +6748,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
#endif /* WCHAR */
|
||||
SET_REGS_MATCHED ();
|
||||
d++;
|
||||
break;
|
||||
NEXT;
|
||||
}
|
||||
|
||||
|
||||
@@ -6657,7 +6757,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
number of groups inner to this one in the next. The text
|
||||
matched within the group is recorded (in the internal
|
||||
registers data structure) under the register number. */
|
||||
case start_memory:
|
||||
CASE (start_memory):
|
||||
DEBUG_PRINT3 ("EXECUTING start_memory %ld (%ld):\n",
|
||||
(long int) *p, (long int) p[1]);
|
||||
|
||||
@@ -6700,13 +6800,13 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
p += 2;
|
||||
just_past_start_mem = p;
|
||||
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
|
||||
/* The stop_memory opcode represents the end of a group. Its
|
||||
arguments are the same as start_memory's: the register
|
||||
number, and the number of inner groups. */
|
||||
case stop_memory:
|
||||
CASE (stop_memory):
|
||||
DEBUG_PRINT3 ("EXECUTING stop_memory %ld (%ld):\n",
|
||||
(long int) *p, (long int) p[1]);
|
||||
|
||||
@@ -6839,12 +6939,12 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
|
||||
/* Move past the register number and the inner group count. */
|
||||
p += 2;
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
|
||||
/* \<digit> has been turned into a `duplicate' command which is
|
||||
followed by the numeric value of <digit> as the register number. */
|
||||
case duplicate:
|
||||
CASE (duplicate):
|
||||
{
|
||||
register const CHAR_T *d2, *dend2;
|
||||
int regno = *p++; /* Get which register to match against. */
|
||||
@@ -6904,58 +7004,68 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
SET_REGS_MATCHED ();
|
||||
}
|
||||
}
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
|
||||
/* begline matches the empty string at the beginning of the string
|
||||
(unless `not_bol' is set in `bufp'), and, if
|
||||
`newline_anchor' is set, after newlines. */
|
||||
case begline:
|
||||
CASE (begline):
|
||||
DEBUG_PRINT1 ("EXECUTING begline.\n");
|
||||
|
||||
if (AT_STRINGS_BEG (d))
|
||||
{
|
||||
if (!bufp->not_bol) break;
|
||||
if (!bufp->not_bol)
|
||||
{
|
||||
NEXT;
|
||||
}
|
||||
}
|
||||
else if (d[-1] == '\n' && bufp->newline_anchor)
|
||||
{
|
||||
break;
|
||||
NEXT;
|
||||
}
|
||||
/* In all other cases, we fail. */
|
||||
goto fail;
|
||||
|
||||
|
||||
/* endline is the dual of begline. */
|
||||
case endline:
|
||||
CASE (endline):
|
||||
DEBUG_PRINT1 ("EXECUTING endline.\n");
|
||||
|
||||
if (AT_STRINGS_END (d))
|
||||
{
|
||||
if (!bufp->not_eol) break;
|
||||
if (!bufp->not_eol)
|
||||
{
|
||||
NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
/* We have to ``prefetch'' the next character. */
|
||||
else if ((d == end1 ? *string2 : *d) == '\n'
|
||||
&& bufp->newline_anchor)
|
||||
{
|
||||
break;
|
||||
NEXT;
|
||||
}
|
||||
goto fail;
|
||||
|
||||
|
||||
/* Match at the very beginning of the data. */
|
||||
case begbuf:
|
||||
CASE (begbuf):
|
||||
DEBUG_PRINT1 ("EXECUTING begbuf.\n");
|
||||
if (AT_STRINGS_BEG (d))
|
||||
break;
|
||||
{
|
||||
NEXT;
|
||||
}
|
||||
goto fail;
|
||||
|
||||
|
||||
/* Match at the very end of the data. */
|
||||
case endbuf:
|
||||
CASE (endbuf):
|
||||
DEBUG_PRINT1 ("EXECUTING endbuf.\n");
|
||||
if (AT_STRINGS_END (d))
|
||||
break;
|
||||
{
|
||||
NEXT;
|
||||
}
|
||||
goto fail;
|
||||
|
||||
|
||||
@@ -6975,7 +7085,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
stack at all is that otherwise we would have to change
|
||||
`anychar's code to do something besides goto fail in this
|
||||
case; that seems worse than this. */
|
||||
case on_failure_keep_string_jump:
|
||||
CASE (on_failure_keep_string_jump):
|
||||
DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
|
||||
|
||||
EXTRACT_NUMBER_AND_INCR (mcnt, p);
|
||||
@@ -6986,7 +7096,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
#endif
|
||||
|
||||
PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
|
||||
/* Uses of on_failure_jump:
|
||||
@@ -7001,7 +7111,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
Repeats start with an on_failure_jump that points past both
|
||||
the repetition text and either the following jump or
|
||||
pop_failure_jump back to this on_failure_jump. */
|
||||
case on_failure_jump:
|
||||
CASE (on_failure_jump):
|
||||
on_failure:
|
||||
DEBUG_PRINT1 ("EXECUTING on_failure_jump");
|
||||
|
||||
@@ -7043,12 +7153,12 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
|
||||
DEBUG_PRINT1 (":\n");
|
||||
PUSH_FAILURE_POINT (p + mcnt, d, -2);
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
|
||||
/* A smart repeat ends with `maybe_pop_jump'.
|
||||
We change it to either `pop_failure_jump' or `jump'. */
|
||||
case maybe_pop_jump:
|
||||
CASE (maybe_pop_jump):
|
||||
EXTRACT_NUMBER_AND_INCR (mcnt, p);
|
||||
DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
|
||||
{
|
||||
@@ -7216,7 +7326,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
points put on by this pop_failure_jump's matching
|
||||
on_failure_jump; we got through the pattern to here from the
|
||||
matching on_failure_jump, so didn't fail. */
|
||||
case pop_failure_jump:
|
||||
CASE (pop_failure_jump):
|
||||
{
|
||||
/* We need to pass separate storage for the lowest and
|
||||
highest registers, even though we don't care about the
|
||||
@@ -7243,7 +7353,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
/* Note fall through. */
|
||||
|
||||
/* Unconditionally jump (without popping any failure points). */
|
||||
case jump:
|
||||
CASE (jump):
|
||||
EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
|
||||
DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
|
||||
p += mcnt; /* Do the jump. */
|
||||
@@ -7252,12 +7362,12 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
#else
|
||||
DEBUG_PRINT2 ("(to 0x%x).\n", p);
|
||||
#endif
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
|
||||
/* We need this opcode so we can detect where alternatives end
|
||||
in `group_match_null_string_p' et al. */
|
||||
case jump_past_alt:
|
||||
CASE (jump_past_alt):
|
||||
DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n");
|
||||
goto unconditional_jump;
|
||||
|
||||
@@ -7267,7 +7377,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
pop_failure_jump, also, and with a pattern of, say, `a+', we
|
||||
are skipping over the on_failure_jump, so we have to push
|
||||
something meaningless for pop_failure_jump to pop. */
|
||||
case dummy_failure_jump:
|
||||
CASE (dummy_failure_jump):
|
||||
DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n");
|
||||
/* It doesn't matter what we push for the string here. What
|
||||
the code at `fail' tests is the value for the pattern. */
|
||||
@@ -7280,16 +7390,16 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
we don't want the failure point for the alternative to be
|
||||
popped. For example, matching `(a|ab)*' against `aab'
|
||||
requires that we match the `ab' alternative. */
|
||||
case push_dummy_failure:
|
||||
CASE (push_dummy_failure):
|
||||
DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n");
|
||||
/* See comments just above at `dummy_failure_jump' about the
|
||||
two zeroes. */
|
||||
PUSH_FAILURE_POINT (NULL, NULL, -2);
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
/* Have to succeed matching what follows at least n times.
|
||||
After that, handle like `on_failure_jump'. */
|
||||
case succeed_n:
|
||||
CASE (succeed_n):
|
||||
EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
|
||||
DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
|
||||
|
||||
@@ -7326,9 +7436,9 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
#endif /* WCHAR */
|
||||
goto on_failure;
|
||||
}
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
case jump_n:
|
||||
CASE (jump_n):
|
||||
EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
|
||||
DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
|
||||
|
||||
@@ -7350,9 +7460,9 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
/* If don't have to jump any more, skip over the rest of command. */
|
||||
else
|
||||
p += 2 * OFFSET_ADDRESS_SIZE;
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
case set_number_at:
|
||||
CASE (set_number_at):
|
||||
{
|
||||
DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
|
||||
|
||||
@@ -7365,7 +7475,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt);
|
||||
#endif
|
||||
STORE_NUMBER (p1, mcnt);
|
||||
break;
|
||||
NEXT;
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -7374,34 +7484,40 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
AT_WORD_BOUNDARY, so this code is disabled. Expanding the
|
||||
macro and introducing temporary variables works around the bug. */
|
||||
|
||||
case wordbound:
|
||||
CASE (wordbound):
|
||||
DEBUG_PRINT1 ("EXECUTING wordbound.\n");
|
||||
if (AT_WORD_BOUNDARY (d))
|
||||
break;
|
||||
{
|
||||
NEXT;
|
||||
}
|
||||
goto fail;
|
||||
|
||||
case notwordbound:
|
||||
CASE (notwordbound):
|
||||
DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
|
||||
if (AT_WORD_BOUNDARY (d))
|
||||
goto fail;
|
||||
break;
|
||||
NEXT;
|
||||
#else
|
||||
case wordbound:
|
||||
CASE (wordbound):
|
||||
{
|
||||
boolean prevchar, thischar;
|
||||
|
||||
DEBUG_PRINT1 ("EXECUTING wordbound.\n");
|
||||
if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
|
||||
break;
|
||||
{
|
||||
NEXT;
|
||||
}
|
||||
|
||||
prevchar = WORDCHAR_P (d - 1);
|
||||
thischar = WORDCHAR_P (d);
|
||||
if (prevchar != thischar)
|
||||
break;
|
||||
{
|
||||
NEXT;
|
||||
}
|
||||
goto fail;
|
||||
}
|
||||
|
||||
case notwordbound:
|
||||
CASE (notwordbound):
|
||||
{
|
||||
boolean prevchar, thischar;
|
||||
|
||||
@@ -7413,49 +7529,53 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
thischar = WORDCHAR_P (d);
|
||||
if (prevchar != thischar)
|
||||
goto fail;
|
||||
break;
|
||||
NEXT;
|
||||
}
|
||||
#endif
|
||||
|
||||
case wordbeg:
|
||||
CASE (wordbeg):
|
||||
DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
|
||||
if (!AT_STRINGS_END (d) && WORDCHAR_P (d)
|
||||
&& (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
|
||||
break;
|
||||
{
|
||||
NEXT;
|
||||
}
|
||||
goto fail;
|
||||
|
||||
case wordend:
|
||||
CASE (wordend):
|
||||
DEBUG_PRINT1 ("EXECUTING wordend.\n");
|
||||
if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
|
||||
&& (AT_STRINGS_END (d) || !WORDCHAR_P (d)))
|
||||
break;
|
||||
{
|
||||
NEXT;
|
||||
}
|
||||
goto fail;
|
||||
|
||||
#ifdef emacs
|
||||
case before_dot:
|
||||
CASE (before_dot):
|
||||
DEBUG_PRINT1 ("EXECUTING before_dot.\n");
|
||||
if (PTR_CHAR_POS ((unsigned char *) d) >= point)
|
||||
goto fail;
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
case at_dot:
|
||||
CASE (at_dot):
|
||||
DEBUG_PRINT1 ("EXECUTING at_dot.\n");
|
||||
if (PTR_CHAR_POS ((unsigned char *) d) != point)
|
||||
goto fail;
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
case after_dot:
|
||||
CASE (after_dot):
|
||||
DEBUG_PRINT1 ("EXECUTING after_dot.\n");
|
||||
if (PTR_CHAR_POS ((unsigned char *) d) <= point)
|
||||
goto fail;
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
case syntaxspec:
|
||||
CASE (syntaxspec):
|
||||
DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
|
||||
mcnt = *p++;
|
||||
goto matchsyntax;
|
||||
|
||||
case wordchar:
|
||||
CASE (wordchar):
|
||||
DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n");
|
||||
mcnt = (int) Sword;
|
||||
matchsyntax:
|
||||
@@ -7465,14 +7585,14 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt)
|
||||
goto fail;
|
||||
SET_REGS_MATCHED ();
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
case notsyntaxspec:
|
||||
CASE (notsyntaxspec):
|
||||
DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt);
|
||||
mcnt = *p++;
|
||||
goto matchnotsyntax;
|
||||
|
||||
case notwordchar:
|
||||
CASE (notwordchar):
|
||||
DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n");
|
||||
mcnt = (int) Sword;
|
||||
matchnotsyntax:
|
||||
@@ -7482,32 +7602,34 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
|
||||
if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt)
|
||||
goto fail;
|
||||
SET_REGS_MATCHED ();
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
#else /* not emacs */
|
||||
case wordchar:
|
||||
CASE (wordchar):
|
||||
DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
|
||||
PREFETCH ();
|
||||
if (!WORDCHAR_P (d))
|
||||
goto fail;
|
||||
SET_REGS_MATCHED ();
|
||||
d++;
|
||||
break;
|
||||
NEXT;
|
||||
|
||||
case notwordchar:
|
||||
CASE (notwordchar):
|
||||
DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
|
||||
PREFETCH ();
|
||||
if (WORDCHAR_P (d))
|
||||
goto fail;
|
||||
SET_REGS_MATCHED ();
|
||||
d++;
|
||||
break;
|
||||
NEXT;
|
||||
#endif /* not emacs */
|
||||
|
||||
#ifndef __GNUC__
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
continue; /* Successfully executed one pattern command; keep going. */
|
||||
#endif
|
||||
|
||||
|
||||
/* We goto here if a matching operation fails. */
|
||||
|
||||
14
lib/regex.h
14
lib/regex.h
@@ -1,6 +1,6 @@
|
||||
/* Definitions for data structures and routines for the regular
|
||||
expression library, version 0.12.
|
||||
Copyright (C) 1985,1989-1993,1995-1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1985,1989-93,1995-98,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.
|
||||
|
||||
@@ -529,10 +529,14 @@ extern int re_exec _RE_ARGS ((const char *));
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
/* For now unconditionally define __restrict_arr to expand to nothing.
|
||||
Ideally we would have a test for the compiler which allows defining
|
||||
it to restrict. */
|
||||
#define __restrict_arr
|
||||
/* gcc 3.1 and up support the [restrict] syntax. */
|
||||
#ifndef __restrict_arr
|
||||
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
|
||||
# define __restrict_arr __restrict
|
||||
# else
|
||||
# define __restrict_arr
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* POSIX compatibility. */
|
||||
extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* 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.
|
||||
path has a trailing slash. The rename functions of SunOS 4.1.1_U1 and
|
||||
mips-dec-ultrix4.4 have this bug.
|
||||
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
43
lib/settime.c
Normal file
43
lib/settime.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* settime -- set the system clock
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "timespec.h"
|
||||
|
||||
/* Set the system time. */
|
||||
|
||||
int
|
||||
settime (struct timespec const *ts)
|
||||
{
|
||||
#if defined CLOCK_REALTIME && HAVE_CLOCK_SETTIME
|
||||
if (clock_settime (CLOCK_REALTIME, ts) == 0)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
tv.tv_sec = ts->tv_sec;
|
||||
tv.tv_usec = ts->tv_nsec / 1000;
|
||||
return settimeofday (&tv, 0);
|
||||
}
|
||||
}
|
||||
346
lib/sig2str.c
Normal file
346
lib/sig2str.c
Normal file
@@ -0,0 +1,346 @@
|
||||
/* sig2str.c -- convert between signal names and numbers
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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 <limits.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "sig2str.h"
|
||||
|
||||
#ifndef SIGRTMIN
|
||||
# define SIGRTMIN 0
|
||||
# undef SIGRTMAX
|
||||
#endif
|
||||
#ifndef SIGRTMAX
|
||||
# define SIGRTMAX (SIGRTMIN - 1)
|
||||
#endif
|
||||
|
||||
#define NUMNAME(name) { SIG##name, #name }
|
||||
|
||||
/* Signal names and numbers. Put the preferred name first. */
|
||||
static struct numname { int num; char const name[8]; } numname_table[] =
|
||||
{
|
||||
/* Signals required by POSIX 1003.1-2001 base, listed in
|
||||
traditional numeric order. */
|
||||
#ifdef SIGHUP
|
||||
NUMNAME (HUP),
|
||||
#endif
|
||||
#ifdef SIGINT
|
||||
NUMNAME (INT),
|
||||
#endif
|
||||
#ifdef SIGQUIT
|
||||
NUMNAME (QUIT),
|
||||
#endif
|
||||
#ifdef SIGILL
|
||||
NUMNAME (ILL),
|
||||
#endif
|
||||
#ifdef SIGTRAP
|
||||
NUMNAME (TRAP),
|
||||
#endif
|
||||
#ifdef SIGABRT
|
||||
NUMNAME (ABRT),
|
||||
#endif
|
||||
#ifdef SIGFPE
|
||||
NUMNAME (FPE),
|
||||
#endif
|
||||
#ifdef SIGKILL
|
||||
NUMNAME (KILL),
|
||||
#endif
|
||||
#ifdef SIGBUS
|
||||
NUMNAME (BUS),
|
||||
#endif
|
||||
#ifdef SIGSEGV
|
||||
NUMNAME (SEGV),
|
||||
#endif
|
||||
#ifdef SIGPIPE
|
||||
NUMNAME (PIPE),
|
||||
#endif
|
||||
#ifdef SIGALRM
|
||||
NUMNAME (ALRM),
|
||||
#endif
|
||||
#ifdef SIGTERM
|
||||
NUMNAME (TERM),
|
||||
#endif
|
||||
#ifdef SIGUSR1
|
||||
NUMNAME (USR1),
|
||||
#endif
|
||||
#ifdef SIGUSR2
|
||||
NUMNAME (USR2),
|
||||
#endif
|
||||
#ifdef SIGCHLD
|
||||
NUMNAME (CHLD),
|
||||
#endif
|
||||
#ifdef SIGURG
|
||||
NUMNAME (URG),
|
||||
#endif
|
||||
#ifdef SIGSTOP
|
||||
NUMNAME (STOP),
|
||||
#endif
|
||||
#ifdef SIGTSTP
|
||||
NUMNAME (TSTP),
|
||||
#endif
|
||||
#ifdef SIGCONT
|
||||
NUMNAME (CONT),
|
||||
#endif
|
||||
#ifdef SIGTTIN
|
||||
NUMNAME (TTIN),
|
||||
#endif
|
||||
#ifdef SIGTTOU
|
||||
NUMNAME (TTOU),
|
||||
#endif
|
||||
|
||||
/* Signals required by POSIX 1003.1-2001 with the XSI extension. */
|
||||
#ifdef SIGSYS
|
||||
NUMNAME (SYS),
|
||||
#endif
|
||||
#ifdef SIGPOLL
|
||||
NUMNAME (POLL),
|
||||
#endif
|
||||
#ifdef SIGVTALRM
|
||||
NUMNAME (VTALRM),
|
||||
#endif
|
||||
#ifdef SIGPROF
|
||||
NUMNAME (PROF),
|
||||
#endif
|
||||
#ifdef SIGXCPU
|
||||
NUMNAME (XCPU),
|
||||
#endif
|
||||
#ifdef SIGXFSZ
|
||||
NUMNAME (XFSZ),
|
||||
#endif
|
||||
|
||||
/* Unix Version 7. */
|
||||
#ifdef SIGIOT
|
||||
NUMNAME (IOT), /* Older name for ABRT. */
|
||||
#endif
|
||||
#ifdef SIGEMT
|
||||
NUMNAME (EMT),
|
||||
#endif
|
||||
|
||||
/* USG Unix. */
|
||||
#ifdef SIGPHONE
|
||||
NUMNAME (PHONE),
|
||||
#endif
|
||||
#ifdef SIGWIND
|
||||
NUMNAME (WIND),
|
||||
#endif
|
||||
|
||||
/* Unix System V. */
|
||||
#ifdef SIGCLD
|
||||
NUMNAME (CLD),
|
||||
#endif
|
||||
#ifdef SIGPWR
|
||||
NUMNAME (PWR),
|
||||
#endif
|
||||
|
||||
/* GNU/Linux 2.2 and Solaris 8. */
|
||||
#ifdef SIGCANCEL
|
||||
NUMNAME (CANCEL),
|
||||
#endif
|
||||
#ifdef SIGLWP
|
||||
NUMNAME (LWP),
|
||||
#endif
|
||||
#ifdef SIGWAITING
|
||||
NUMNAME (WAITING),
|
||||
#endif
|
||||
#ifdef SIGFREEZE
|
||||
NUMNAME (FREEZE),
|
||||
#endif
|
||||
#ifdef SIGTHAW
|
||||
NUMNAME (THAW),
|
||||
#endif
|
||||
#ifdef SIGLOST
|
||||
NUMNAME (LOST),
|
||||
#endif
|
||||
#ifdef SIGWINCH
|
||||
NUMNAME (WINCH),
|
||||
#endif
|
||||
|
||||
/* GNU/Linux 2.2. */
|
||||
#ifdef SIGINFO
|
||||
NUMNAME (INFO),
|
||||
#endif
|
||||
#ifdef SIGIO
|
||||
NUMNAME (IO),
|
||||
#endif
|
||||
#ifdef SIGSTKFLT
|
||||
NUMNAME (STKFLT),
|
||||
#endif
|
||||
|
||||
/* AIX 5L. */
|
||||
#ifdef SIGDANGER
|
||||
NUMNAME (DANGER),
|
||||
#endif
|
||||
#ifdef SIGGRANT
|
||||
NUMNAME (GRANT),
|
||||
#endif
|
||||
#ifdef SIGMIGRATE
|
||||
NUMNAME (MIGRATE),
|
||||
#endif
|
||||
#ifdef SIGMSG
|
||||
NUMNAME (MSG),
|
||||
#endif
|
||||
#ifdef SIGPRE
|
||||
NUMNAME (PRE),
|
||||
#endif
|
||||
#ifdef SIGRETRACT
|
||||
NUMNAME (RETRACT),
|
||||
#endif
|
||||
#ifdef SIGSAK
|
||||
NUMNAME (SAK),
|
||||
#endif
|
||||
#ifdef SIGSOUND
|
||||
NUMNAME (SOUND),
|
||||
#endif
|
||||
|
||||
/* Older AIX versions. */
|
||||
#ifdef SIGALRM1
|
||||
NUMNAME (ALRM1), /* unknown; taken from Bash 2.05 */
|
||||
#endif
|
||||
#ifdef SIGKAP
|
||||
NUMNAME (KAP), /* Older name for SIGGRANT. */
|
||||
#endif
|
||||
#ifdef SIGVIRT
|
||||
NUMNAME (VIRT), /* unknown; taken from Bash 2.05 */
|
||||
#endif
|
||||
#ifdef SIGWINDOW
|
||||
NUMNAME (WINDOW), /* Older name for SIGWINCH. */
|
||||
#endif
|
||||
|
||||
/* BeOS */
|
||||
#ifdef SIGKILLTHR
|
||||
NUMNAME (KILLTHR),
|
||||
#endif
|
||||
|
||||
/* Older HP-UX versions. */
|
||||
#ifdef SIGDIL
|
||||
NUMNAME (DIL),
|
||||
#endif
|
||||
|
||||
/* Korn shell and Bash, of uncertain vintage. */
|
||||
{ 0, "EXIT" }
|
||||
};
|
||||
|
||||
#define NUMNAME_ENTRIES (sizeof numname_table / sizeof numname_table[0])
|
||||
|
||||
/* ISDIGIT differs from isdigit, as follows:
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
- It's typically faster.
|
||||
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
|
||||
ISDIGIT_LOCALE unless it's important to use the locale's definition
|
||||
of `digit' even when the host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
/* Convert the signal name SIGNAME to a signal number. Return the
|
||||
signal number if successful, -1 otherwise. */
|
||||
|
||||
static int
|
||||
str2signum (char const *signame)
|
||||
{
|
||||
if (ISDIGIT (*signame))
|
||||
{
|
||||
char *endp;
|
||||
long int n = strtol (signame, &endp, 10);
|
||||
if (! *endp && n <= SIGNUM_BOUND)
|
||||
return n;
|
||||
}
|
||||
else
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < NUMNAME_ENTRIES; i++)
|
||||
if (strcmp (numname_table[i].name, signame) == 0)
|
||||
return numname_table[i].num;
|
||||
|
||||
{
|
||||
char *endp;
|
||||
int rtmin = SIGRTMIN;
|
||||
int rtmax = SIGRTMAX;
|
||||
|
||||
if (0 < rtmin && strncmp (signame, "RTMIN", 5) == 0)
|
||||
{
|
||||
long int n = strtol (signame + 5, &endp, 10);
|
||||
if (! *endp && 0 <= n && n <= rtmax - rtmin)
|
||||
return rtmin + n;
|
||||
}
|
||||
else if (0 < rtmax && strncmp (signame, "RTMAX", 5) == 0)
|
||||
{
|
||||
long int n = strtol (signame + 5, &endp, 10);
|
||||
if (! *endp && rtmin - rtmax <= n && n <= 0)
|
||||
return rtmax + n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Convert the signal name SIGNAME to the signal number *SIGNUM.
|
||||
Return 0 if successful, -1 otherwise. */
|
||||
|
||||
int
|
||||
str2sig (char const *signame, int *signum)
|
||||
{
|
||||
*signum = str2signum (signame);
|
||||
return *signum < 0 ? -1 : 0;
|
||||
}
|
||||
|
||||
/* Convert SIGNUM to a signal name in SIGNAME. SIGNAME must point to
|
||||
a buffer of at least SIG2STR_MAX bytes. Return 0 if successful, -1
|
||||
otherwise. */
|
||||
|
||||
int
|
||||
sig2str (int signum, char *signame)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < NUMNAME_ENTRIES; i++)
|
||||
if (numname_table[i].num == signum)
|
||||
{
|
||||
strcpy (signame, numname_table[i].name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
{
|
||||
int rtmin = SIGRTMIN;
|
||||
int rtmax = SIGRTMAX;
|
||||
|
||||
if (! (rtmin <= signum && signum <= rtmax))
|
||||
return -1;
|
||||
|
||||
if (signum <= rtmin + (rtmax - rtmin) / 2)
|
||||
{
|
||||
int delta = signum - rtmin;
|
||||
sprintf (signame, delta ? "RTMIN+%d" : "RTMIN", delta);
|
||||
}
|
||||
else
|
||||
{
|
||||
int delta = rtmax - signum;
|
||||
sprintf (signame, delta ? "RTMAX-%d" : "RTMAX", delta);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
47
lib/sig2str.h
Normal file
47
lib/sig2str.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* sig2str.h -- convert between signal names and numbers
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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. */
|
||||
|
||||
/* Include <signal.h> before including this file. */
|
||||
|
||||
/* Don't override system declarations of SIG2STR_MAX, sig2str, str2sig. */
|
||||
#ifndef SIG2STR_MAX
|
||||
|
||||
/* Upper bound on the string length of an integer converted to string.
|
||||
302 / 1000 is ceil (log10 (2.0)). Subtract 1 for the sign bit;
|
||||
add 1 for integer division truncation; add 1 more for a minus sign. */
|
||||
# define INT_STRLEN_BOUND(t) ((sizeof (t) * CHAR_BIT - 1) * 302 / 1000 + 2)
|
||||
|
||||
/* Size of a buffer needed to hold a signal name like "HUP". */
|
||||
# define SIG2STR_MAX (sizeof "SIGRTMAX" + INT_STRLEN_BOUND (int) - 1)
|
||||
|
||||
int sig2str (int, char *);
|
||||
int str2sig (char const *, int *);
|
||||
|
||||
#endif
|
||||
|
||||
/* An upper bound on signal numbers allowed by the system. */
|
||||
|
||||
#if defined _sys_nsig
|
||||
# define SIGNUM_BOUND (_sys_nsig - 1)
|
||||
#elif defined NSIG
|
||||
# define SIGNUM_BOUND (NSIG - 1)
|
||||
#else
|
||||
# define SIGNUM_BOUND 64
|
||||
#endif
|
||||
@@ -191,7 +191,6 @@ my_strftime_gmtime_r (t, tp)
|
||||
*tp = *l;
|
||||
return tp;
|
||||
}
|
||||
# endif /* ! HAVE_TM_GMTOFF */
|
||||
|
||||
static struct tm *my_strftime_localtime_r __P ((const time_t *, struct tm *));
|
||||
static struct tm *
|
||||
@@ -205,6 +204,7 @@ my_strftime_localtime_r (t, tp)
|
||||
*tp = *l;
|
||||
return tp;
|
||||
}
|
||||
# endif /* ! HAVE_TM_GMTOFF */
|
||||
#endif /* ! defined _LIBC */
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Find the length of STRING, but scan at most MAXLEN characters.
|
||||
Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 2000-2002 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
|
||||
@@ -25,7 +25,11 @@
|
||||
# if !STDC_HEADERS && HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
/* Temporarily redefine strnlen so that an inconsistent prototype
|
||||
(on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't cause trouble. */
|
||||
# define strnlen system_strnlen
|
||||
# include <string.h>
|
||||
# undef strnlen
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Compare strings while treating digits characters numerically.
|
||||
Copyright (C) 1997, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 2000, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
|
||||
|
||||
@@ -41,10 +41,9 @@
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
- It's typically faster.
|
||||
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless
|
||||
it's important to use the locale's definition of `digit' even when the
|
||||
host does not conform to Posix. */
|
||||
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
|
||||
ISDIGIT_LOCALE unless it's important to use the locale's definition
|
||||
of `digit' even when the host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
#undef __strverscmp
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
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.
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
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.
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@@ -32,6 +32,9 @@
|
||||
#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
|
||||
@@ -41,10 +44,11 @@
|
||||
|
||||
#if STDC_HEADERS || _LIBC
|
||||
# include <stddef.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if HAVE_FCNTL_H || _LIBC
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
@@ -102,12 +106,24 @@
|
||||
|
||||
#if ! (HAVE___SECURE_GETENV || _LIBC)
|
||||
# define __secure_getenv getenv
|
||||
#endif
|
||||
|
||||
# ifndef HAVE_DECL_GETENV
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
# if !HAVE_DECL_GETENV
|
||||
char *getenv ();
|
||||
#ifdef _LIBC
|
||||
# include <hp-timing.h>
|
||||
# if HP_TIMING_AVAIL
|
||||
# define RANDOM_BITS(Var) \
|
||||
if (__builtin_expect (value == UINT64_C (0), 0)) \
|
||||
{ \
|
||||
/* If this is the first time this function is used initialize \
|
||||
the variable we accumulate the value in to some somewhat \
|
||||
random value. If we'd not do this programs at startup time \
|
||||
might have a reduced set of possible names, at least on slow \
|
||||
machines. */ \
|
||||
struct timeval tv; \
|
||||
__gettimeofday (&tv, NULL); \
|
||||
value = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; \
|
||||
} \
|
||||
HP_TIMING_NOW (Var)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -120,11 +136,6 @@ char *getenv ();
|
||||
# define uint64_t uintmax_t
|
||||
#endif
|
||||
|
||||
/* The total number of temporary file names that can exist for a given
|
||||
template is 62**6. On ancient hosts where uint64_t is really 32
|
||||
bits, TEMPORARIES evaluates to 965660736, which is good enough. */
|
||||
#define TEMPORARIES ((uint64_t) 62 * 62 * 62 * 62 * 62 * 62)
|
||||
|
||||
/* Return nonzero if DIR is an existent directory. */
|
||||
static int
|
||||
direxists (const char *dir)
|
||||
@@ -221,11 +232,23 @@ __gen_tempname (char *tmpl, int kind)
|
||||
char *XXXXXX;
|
||||
static uint64_t value;
|
||||
uint64_t random_time_bits;
|
||||
uint64_t count;
|
||||
unsigned int count;
|
||||
int fd = -1;
|
||||
int save_errno = errno;
|
||||
struct_stat64 st;
|
||||
|
||||
/* A lower bound on the number of temporary files to attempt to
|
||||
generate. The maximum total number of temporary file names that
|
||||
can exist for a given template is 62**6. It should never be
|
||||
necessary to try all these combinations. Instead if a reasonable
|
||||
number of names is tried (we define reasonable as 62**3) fail to
|
||||
give the system administrator the chance to remove the problems. */
|
||||
unsigned int attempts_min = 62 * 62 * 62;
|
||||
|
||||
/* The number of times to attempt to generate a temporary file. To
|
||||
conform to POSIX, this must be no smaller than TMP_MAX. */
|
||||
unsigned int attempts = attempts_min < TMP_MAX ? TMP_MAX : attempts_min;
|
||||
|
||||
len = strlen (tmpl);
|
||||
if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX"))
|
||||
{
|
||||
@@ -237,18 +260,22 @@ __gen_tempname (char *tmpl, int kind)
|
||||
XXXXXX = &tmpl[len - 6];
|
||||
|
||||
/* Get some more or less random data. */
|
||||
#if HAVE_GETTIMEOFDAY || _LIBC
|
||||
#ifdef RANDOM_BITS
|
||||
RANDOM_BITS (random_time_bits);
|
||||
#else
|
||||
# if HAVE_GETTIMEOFDAY || _LIBC
|
||||
{
|
||||
struct timeval tv;
|
||||
__gettimeofday (&tv, NULL);
|
||||
random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec;
|
||||
}
|
||||
#else
|
||||
# else
|
||||
random_time_bits = time (NULL);
|
||||
# endif
|
||||
#endif
|
||||
value += random_time_bits ^ __getpid ();
|
||||
|
||||
for (count = 0; count < TEMPORARIES; value += 7777, ++count)
|
||||
for (count = 0; count < attempts; value += 7777, ++count)
|
||||
{
|
||||
uint64_t v = value;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/* Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
/* timespec -- System time interface
|
||||
|
||||
Copyright (C) 2000, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -14,8 +16,8 @@
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if ! defined NANOSLEEP_H
|
||||
# define NANOSLEEP_H
|
||||
#if ! defined TIMESPEC_H
|
||||
# define TIMESPEC_H
|
||||
|
||||
/* You must include config.h before including this file. */
|
||||
|
||||
@@ -40,10 +42,19 @@ struct timespec
|
||||
};
|
||||
# endif
|
||||
|
||||
# ifdef ST_MTIM_NSEC
|
||||
# define TIMESPEC_NS(timespec) ((timespec).ST_MTIM_NSEC)
|
||||
# else
|
||||
# define TIMESPEC_NS(timespec) 0
|
||||
# endif
|
||||
|
||||
# if ! HAVE_DECL_NANOSLEEP
|
||||
/* Don't specify a prototype here. Some systems (e.g., OSF) declare
|
||||
nanosleep with a conflicting one (const-less first parameter). */
|
||||
int nanosleep ();
|
||||
# endif
|
||||
|
||||
int gettime (struct timespec *);
|
||||
int settime (struct timespec const *);
|
||||
|
||||
#endif
|
||||
123
lib/unicodeio.c
123
lib/unicodeio.c
@@ -1,6 +1,6 @@
|
||||
/* Unicode character output to streams with locale dependent encoding.
|
||||
|
||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
@@ -19,6 +19,9 @@
|
||||
|
||||
/* Written by Bruno Haible <haible@clisp.cons.org>. */
|
||||
|
||||
/* Note: This file requires the locale_charset() function. See in
|
||||
libiconv-1.7/libcharset/INTEGRATE for how to obtain it. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
@@ -47,11 +50,13 @@ extern int errno;
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# define _(Text) Text
|
||||
# define gettext(Text) Text
|
||||
#endif
|
||||
#define _(Text) gettext (Text)
|
||||
#define N_(Text) Text
|
||||
|
||||
/* Specification. */
|
||||
#include "unicodeio.h"
|
||||
|
||||
/* When we pass a Unicode character to iconv(), we must pass it in a
|
||||
@@ -105,10 +110,19 @@ utf8_wctomb (unsigned char *r, unsigned int wc)
|
||||
/* Luckily, the encoding's name is platform independent. */
|
||||
#define UTF8_NAME "UTF-8"
|
||||
|
||||
/* Outputs the Unicode character CODE to the output stream STREAM.
|
||||
/* Converts the Unicode character CODE to its multibyte representation
|
||||
in the current locale and calls the SUCCESS callback on the resulting
|
||||
byte sequence. If an error occurs, invokes the FAILURE callback instead,
|
||||
passing it CODE and an English error string.
|
||||
Returns whatever the callback returned.
|
||||
Assumes that the locale doesn't change between two calls. */
|
||||
void
|
||||
print_unicode_char (FILE *stream, unsigned int code)
|
||||
long
|
||||
unicode_to_mb (unsigned int code,
|
||||
long (*success) PARAMS ((const char *buf, size_t buflen,
|
||||
void *callback_arg)),
|
||||
long (*failure) PARAMS ((unsigned int code, const char *msg,
|
||||
void *callback_arg)),
|
||||
void *callback_arg)
|
||||
{
|
||||
static int initialized;
|
||||
static int is_utf8;
|
||||
@@ -130,31 +144,32 @@ print_unicode_char (FILE *stream, unsigned int code)
|
||||
{
|
||||
utf8_to_local = iconv_open (charset, UTF8_NAME);
|
||||
if (utf8_to_local == (iconv_t)(-1))
|
||||
{
|
||||
/* For an unknown encoding, assume ASCII. */
|
||||
utf8_to_local = iconv_open ("ASCII", UTF8_NAME);
|
||||
if (utf8_to_local == (iconv_t)(-1))
|
||||
error (1, 0,
|
||||
_("cannot output U+%04X: iconv function not usable"),
|
||||
code);
|
||||
}
|
||||
/* For an unknown encoding, assume ASCII. */
|
||||
utf8_to_local = iconv_open ("ASCII", UTF8_NAME);
|
||||
}
|
||||
#endif
|
||||
initialized = 1;
|
||||
}
|
||||
|
||||
/* Test whether the utf8_to_local converter is available at all. */
|
||||
if (!is_utf8)
|
||||
{
|
||||
#if HAVE_ICONV
|
||||
if (utf8_to_local == (iconv_t)(-1))
|
||||
return failure (code, N_("iconv function not usable"), callback_arg);
|
||||
#else
|
||||
return failure (code, N_("iconv function not available"), callback_arg);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Convert the character to UTF-8. */
|
||||
count = utf8_wctomb ((unsigned char *) inbuf, code);
|
||||
if (count < 0)
|
||||
error (1, 0, _("U+%04X: character out of range"), code);
|
||||
return failure (code, N_("character out of range"), callback_arg);
|
||||
|
||||
if (is_utf8)
|
||||
{
|
||||
fwrite (inbuf, 1, count, stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if HAVE_ICONV
|
||||
if (!is_utf8)
|
||||
{
|
||||
char outbuf[25];
|
||||
const char *inptr;
|
||||
size_t inbytesleft;
|
||||
@@ -177,8 +192,7 @@ print_unicode_char (FILE *stream, unsigned int code)
|
||||
|| (res > 0 && code != 0 && outptr - outbuf == 1 && *outbuf == '\0')
|
||||
# endif
|
||||
)
|
||||
error (1, res == (size_t)(-1) ? errno : 0,
|
||||
_("cannot convert U+%04X to local character set"), code);
|
||||
return failure (code, NULL, callback_arg);
|
||||
|
||||
/* Avoid glibc-2.1 bug and Solaris 2.7 bug. */
|
||||
# if defined _LIBICONV_VERSION \
|
||||
@@ -187,14 +201,63 @@ print_unicode_char (FILE *stream, unsigned int code)
|
||||
/* Get back to the initial shift state. */
|
||||
res = iconv (utf8_to_local, NULL, NULL, &outptr, &outbytesleft);
|
||||
if (res == (size_t)(-1))
|
||||
error (1, errno, _("cannot convert U+%04X to local character set"),
|
||||
code);
|
||||
return failure (code, NULL, callback_arg);
|
||||
# endif
|
||||
|
||||
fwrite (outbuf, 1, outptr - outbuf, stream);
|
||||
#else
|
||||
error (1, 0, _("cannot output U+%04X: iconv function not available"),
|
||||
code);
|
||||
#endif
|
||||
return success (outbuf, outptr - outbuf, callback_arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* At this point, is_utf8 is true, so no conversion is needed. */
|
||||
return success (inbuf, count, callback_arg);
|
||||
}
|
||||
|
||||
/* Simple success callback that outputs the converted string.
|
||||
The STREAM is passed as callback_arg. */
|
||||
long
|
||||
fwrite_success_callback (const char *buf, size_t buflen, void *callback_arg)
|
||||
{
|
||||
FILE *stream = (FILE *) callback_arg;
|
||||
|
||||
fwrite (buf, 1, buflen, stream);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Simple failure callback that displays an error and exits. */
|
||||
static long
|
||||
exit_failure_callback (unsigned int code, const char *msg, void *callback_arg)
|
||||
{
|
||||
if (msg == NULL)
|
||||
error (1, 0, _("cannot convert U+%04X to local character set"), code);
|
||||
else
|
||||
error (1, 0, _("cannot convert U+%04X to local character set: %s"), code,
|
||||
gettext (msg));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Simple failure callback that displays a fallback representation in plain
|
||||
ASCII, using the same notation as ISO C99 strings. */
|
||||
static long
|
||||
fallback_failure_callback (unsigned int code, const char *msg, void *callback_arg)
|
||||
{
|
||||
FILE *stream = (FILE *) callback_arg;
|
||||
|
||||
if (code < 0x10000)
|
||||
fprintf (stream, "\\u%04X", code);
|
||||
else
|
||||
fprintf (stream, "\\U%08X", code);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Outputs the Unicode character CODE to the output stream STREAM.
|
||||
Upon failure, exit if exit_on_error is true, otherwise output a fallback
|
||||
notation. */
|
||||
void
|
||||
print_unicode_char (FILE *stream, unsigned int code, int exit_on_error)
|
||||
{
|
||||
unicode_to_mb (code, fwrite_success_callback,
|
||||
exit_on_error
|
||||
? exit_failure_callback
|
||||
: fallback_failure_callback,
|
||||
stream);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
/* Unicode character output to streams with locale dependent encoding.
|
||||
|
||||
Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifndef UNICODEIO_H
|
||||
# define UNICODEIO_H
|
||||
|
||||
@@ -11,7 +30,15 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Outputs the Unicode character CODE to the output stream STREAM. */
|
||||
extern void print_unicode_char PARAMS((FILE *stream, unsigned int code));
|
||||
/* Outputs the Unicode character CODE to the output stream STREAM.
|
||||
Upon failure, exit if exit_on_error is true, otherwise output a fallback
|
||||
notation. */
|
||||
extern void print_unicode_char PARAMS ((FILE *stream, unsigned int code,
|
||||
int exit_on_error));
|
||||
|
||||
/* Simple success callback that outputs the converted string.
|
||||
The STREAM is passed as callback_arg. */
|
||||
extern long fwrite_success_callback PARAMS ((const char *buf, size_t buflen,
|
||||
void *callback_arg));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* userspec.c -- Parse a user and group string.
|
||||
Copyright (C) 1989-1992, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989-1992, 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -134,10 +134,9 @@ struct group *getgrgid ();
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
- It's typically faster.
|
||||
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless
|
||||
it's important to use the locale's definition of `digit' even when the
|
||||
host does not conform to Posix. */
|
||||
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
|
||||
ISDIGIT_LOCALE unless it's important to use the locale's definition
|
||||
of `digit' even when the host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
#ifndef strdup
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Utility to help print --version output in a consistent format.
|
||||
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
char* version_etc_copyright =
|
||||
/* Do *not* mark this string for translation. */
|
||||
"Copyright (C) 2001 Free Software Foundation, Inc.";
|
||||
"Copyright (C) 2002 Free Software Foundation, Inc.";
|
||||
|
||||
|
||||
/* Display the --version information the standard way.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* xgethostname.c -- return current hostname with unlimited length
|
||||
Copyright (C) 1992, 1996, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1996, 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
|
||||
@@ -29,6 +29,7 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
#include "error.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef ENAMETOOLONG
|
||||
# define ENAMETOOLONG 9999
|
||||
@@ -39,8 +40,6 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
int gethostname ();
|
||||
char *xmalloc ();
|
||||
char *xrealloc ();
|
||||
|
||||
#ifndef INITIAL_HOSTNAME_LENGTH
|
||||
# define INITIAL_HOSTNAME_LENGTH 34
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* xmalloc.c -- malloc with out of memory checking
|
||||
Copyright (C) 1990-1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -46,12 +46,12 @@ void free ();
|
||||
# define EXIT_FAILURE 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DONE_WORKING_MALLOC_CHECK
|
||||
"you must run the autoconf test for a properly working malloc -- see malloc.m4"
|
||||
#ifndef HAVE_MALLOC
|
||||
"you must run the autoconf test for a properly working malloc"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DONE_WORKING_REALLOC_CHECK
|
||||
"you must run the autoconf test for a properly working realloc --see realloc.m4"
|
||||
#ifndef HAVE_REALLOC
|
||||
"you must run the autoconf test for a properly working realloc"
|
||||
#endif
|
||||
|
||||
/* Exit value when the requested amount of memory is not available.
|
||||
|
||||
70
lib/xmemcoll.c
Normal file
70
lib/xmemcoll.c
Normal file
@@ -0,0 +1,70 @@
|
||||
/* Locale-specific memory comparison.
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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. */
|
||||
|
||||
/* Contributed by Paul Eggert <eggert@twinsun.com>. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
|
||||
#include "error.h"
|
||||
#include "memcoll.h"
|
||||
#include "quotearg.h"
|
||||
#include "xmemcoll.h"
|
||||
|
||||
/* Exit value when xmemcoll fails.
|
||||
The caller may set it to some other value. */
|
||||
int xmemcoll_exit_failure = EXIT_FAILURE;
|
||||
|
||||
/* Compare S1 (with length S1LEN) and S2 (with length S2LEN) according
|
||||
to the LC_COLLATE locale. S1 and S2 do not overlap, and are not
|
||||
adjacent. Temporarily modify the bytes after S1 and S2, but
|
||||
restore their original contents before returning. Report an error
|
||||
and exit if there is an error. */
|
||||
|
||||
int
|
||||
xmemcoll (char *s1, size_t s1len, char *s2, size_t s2len)
|
||||
{
|
||||
int diff = memcoll (s1, s1len, s2, s2len);
|
||||
int collation_errno = errno;
|
||||
|
||||
if (collation_errno)
|
||||
{
|
||||
error (0, collation_errno, _("string comparison failed"));
|
||||
error (0, 0, _("Set LC_ALL='C' to work around the problem."));
|
||||
error (xmemcoll_exit_failure, 0,
|
||||
_("The strings compared were %s and %s."),
|
||||
quotearg_n_style_mem (0, locale_quoting_style, s1, s1len),
|
||||
quotearg_n_style_mem (1, locale_quoting_style, s2, s2len));
|
||||
}
|
||||
|
||||
return diff;
|
||||
}
|
||||
2
lib/xmemcoll.h
Normal file
2
lib/xmemcoll.h
Normal file
@@ -0,0 +1,2 @@
|
||||
extern int xmemcoll_exit_failure;
|
||||
int xmemcoll (char *, size_t, char *, size_t);
|
||||
@@ -78,7 +78,7 @@ xreadlink (char const *filename)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (link_length < buf_size)
|
||||
if ((size_t) link_length < buf_size)
|
||||
{
|
||||
buffer[link_length] = 0;
|
||||
return buffer;
|
||||
|
||||
12
lib/xstat.in
12
lib/xstat.in
@@ -4,7 +4,7 @@
|
||||
/* Work around the bug in some systems whereby @xstat@ succeeds when
|
||||
given the zero-length file name argument. The @xstat@ from SunOS4.1.4
|
||||
has this bug.
|
||||
Copyright (C) 1997-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -31,6 +31,7 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
@BEGIN_LSTAT_ONLY@
|
||||
#include <string.h>
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
@@ -39,8 +40,13 @@ extern int errno;
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
# undef S_ISLNK
|
||||
#endif
|
||||
#if !defined(S_ISLNK) && defined(S_IFLNK)
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
|
||||
#ifndef S_ISLNK
|
||||
# ifdef S_IFLNK
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
# else
|
||||
# define S_ISLNK(m) 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_FREE
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* xstrdup.c -- copy a string with out of memory checking
|
||||
Copyright (C) 1990, 1996, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1996, 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
|
||||
@@ -19,14 +19,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
@@ -35,7 +27,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
char *xmalloc PARAMS ((size_t n));
|
||||
#include "xalloc.h"
|
||||
|
||||
/* Return a newly allocated copy of STRING. */
|
||||
|
||||
|
||||
@@ -141,8 +141,16 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
|
||||
tmp = __strtol (s, p, strtol_base);
|
||||
if (errno != 0)
|
||||
return LONGINT_OVERFLOW;
|
||||
|
||||
if (*p == s)
|
||||
return LONGINT_INVALID;
|
||||
{
|
||||
/* If there is no number but there is a valid suffix, assume the
|
||||
number is 1. The string is invalid otherwise. */
|
||||
if (valid_suffixes && **p && strchr (valid_suffixes, **p))
|
||||
tmp = 1;
|
||||
else
|
||||
return LONGINT_INVALID;
|
||||
}
|
||||
|
||||
/* Let valid_suffixes == NULL mean `allow any suffix'. */
|
||||
/* FIXME: update all callers except the ones that allow suffixes
|
||||
@@ -169,15 +177,20 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
|
||||
{
|
||||
/* The ``valid suffix'' '0' is a special flag meaning that
|
||||
an optional second suffix is allowed, which can change
|
||||
the base, e.g. "100MD" for 100 megabytes decimal. */
|
||||
the base. A suffix "B" (e.g. "100MB") stands for a power
|
||||
of 1000, whereas a suffix "iB" (e.g. "100MiB") stands for
|
||||
a power of 1024. If no suffix (e.g. "100M"), assume
|
||||
power-of-1024. */
|
||||
|
||||
switch (p[0][1])
|
||||
{
|
||||
case 'B':
|
||||
suffixes++;
|
||||
case 'i':
|
||||
if (p[0][2] == 'B')
|
||||
suffixes += 2;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
case 'B':
|
||||
case 'D': /* 'D' is obsolescent */
|
||||
base = 1000;
|
||||
suffixes++;
|
||||
break;
|
||||
@@ -198,29 +211,30 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
|
||||
overflow = 0;
|
||||
break;
|
||||
|
||||
case 'E': /* Exa */
|
||||
case 'E': /* exa or exbi */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 6);
|
||||
break;
|
||||
|
||||
case 'G': /* Giga */
|
||||
case 'G': /* giga or gibi */
|
||||
case 'g': /* 'g' is undocumented; for compatibility only */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 3);
|
||||
break;
|
||||
|
||||
case 'k': /* kilo */
|
||||
case 'K': /* kibi */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 1);
|
||||
break;
|
||||
|
||||
case 'M': /* Mega */
|
||||
case 'M': /* mega or mebi */
|
||||
case 'm': /* 'm' is undocumented; for compatibility only */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 2);
|
||||
break;
|
||||
|
||||
case 'P': /* Peta */
|
||||
case 'P': /* peta or pebi */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 5);
|
||||
break;
|
||||
|
||||
case 'T': /* Tera */
|
||||
case 'T': /* tera or tebi */
|
||||
case 't': /* 't' is undocumented; for compatibility only */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 4);
|
||||
break;
|
||||
@@ -229,11 +243,11 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
|
||||
overflow = bkm_scale (&tmp, 2);
|
||||
break;
|
||||
|
||||
case 'Y': /* Yotta */
|
||||
case 'Y': /* yotta or 2**80 */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 8);
|
||||
break;
|
||||
|
||||
case 'Z': /* Zetta */
|
||||
case 'Z': /* zetta or 2**70 */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 7);
|
||||
break;
|
||||
|
||||
|
||||
217
m4/ChangeLog
217
m4/ChangeLog
@@ -1,3 +1,220 @@
|
||||
2002-07-23 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* c-bs-a.m4 (AC_C_BACKSLASH_A): Remove file, now that autoconf
|
||||
provides this macro.
|
||||
|
||||
2002-07-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* intdiv0.m4: New file. From gettex-0.11.3.
|
||||
|
||||
* jm-macros.m4: Require autoconf-2.53b.
|
||||
Use new macros AC_FUNC_MALLOC and AC_FUNC_REALLOC,
|
||||
in place of jm_-prefixed ones. Thanks, Akim!
|
||||
* malloc.m4: Remove file, now that autoconf provides this macro.
|
||||
* realloc.m4: Likewise.
|
||||
|
||||
2002-07-18 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* gettext.m4: Upgrade to gettext-0.11.3.
|
||||
* iconv.m4: Upgrade to gettext-0.11.3.
|
||||
* isc-posix.m4: Upgrade to gettext-0.11.3.
|
||||
* lcmessage.m4: Upgrade to gettext-0.11.3.
|
||||
* lib-link.m4: Upgrade to gettext-0.11.3.
|
||||
|
||||
2002-07-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* boottime.m4: New file. Extracted from sh-utils' configure.ac
|
||||
and extended to work also with *BSD systems.
|
||||
|
||||
2002-07-15 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
FreeBSD support for uname and uptime.
|
||||
* jm-macros.m4 (jm_MACROS): Check for the sysctl function.
|
||||
(jm_CHECK_ALL_HEADERS): Check for sys/sysctl.h.
|
||||
Suggestion from Bruno Haible.
|
||||
|
||||
2002-06-11 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
|
||||
|
||||
2002-06-22 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* c-stack.m4: New file, from diffutils-2.8.2.
|
||||
* prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
|
||||
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
|
||||
now that configure.ac uses AC_GNU_SOURCE.
|
||||
(jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
|
||||
* prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
|
||||
|
||||
Update to latest tools. Suggestions from Paul Eggert.
|
||||
* stdbool.m4: New file, from diffutils-2.8.2.
|
||||
* gnu-source.m4: Update from diffutils-2.8.2.
|
||||
* fnmatch.m4: Likewise.
|
||||
* prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
|
||||
to AC_HEADER_STDBOOL
|
||||
|
||||
2002-06-21 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* c-bs-a.m4: Add comment, from diffutils-2.8.2.
|
||||
* mbrtowc.m4: Likewise.
|
||||
|
||||
* mbstate_t.m4: Update from diffutils-2.8.2.
|
||||
* mbswidth.m4: Reflect name change:
|
||||
s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
|
||||
* prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
|
||||
|
||||
* lib-link.m4: Update from gettext-0.11.2.
|
||||
* gettext.m4: Likewise.
|
||||
|
||||
* jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
|
||||
From Alfred M. Szmidt.
|
||||
|
||||
2002-05-19 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
|
||||
|
||||
2002-06-07 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
|
||||
They're needed at least for NetBSD 1.5.2.
|
||||
($statxfs_includes): Include those same headers.
|
||||
($statxfs_includes): Include sys/vfs.h if available.
|
||||
($statxfs_includes): Likewise for sys/statvfs.h.
|
||||
Check for the following members in both structs statfs and statvfs:
|
||||
f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
|
||||
|
||||
2002-06-01 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
|
||||
s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
|
||||
|
||||
2002-05-28 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
|
||||
Reported by Volker Borchert.
|
||||
|
||||
2002-05-27 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
|
||||
localtime.
|
||||
|
||||
* readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
|
||||
use the replacement function; it wouldn't resolve at link time.
|
||||
Reported by Volker Borchert.
|
||||
|
||||
2002-04-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
|
||||
|
||||
2002-04-29 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
|
||||
Do not check for alloca.h (no longer used) or stdbool.h (was never
|
||||
used?). Add AM_C_PROTOTYPES since hard-locale.h uses it.
|
||||
|
||||
2002-04-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
|
||||
|
||||
2002-04-29 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
|
||||
* prereq.m4: Add jm_PREREQ_STRNLEN.
|
||||
Use AC_FUNC_STRNLEN here instead.
|
||||
|
||||
* jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
|
||||
With autoconf-2.53a, it's part of AC_PROG_CC.
|
||||
|
||||
2002-04-28 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
|
||||
* prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
|
||||
|
||||
2002-04-24 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
|
||||
(jm_PREREQ): Use it.
|
||||
|
||||
* getloadavg.m4: Check for these headers: locale.h unistd.h
|
||||
mach/mach.h fcntl.h.
|
||||
Check for this function: setlocale.
|
||||
|
||||
2002-04-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
|
||||
ut_pid, ut_id, ut_exit.
|
||||
|
||||
2002-04-12 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* ls-mntd-fs.m4 (checking for getmntinfo function...): Remove now-bogus
|
||||
check for f_type in sys/mount.h. Instead, just test for the existence
|
||||
of the getmntinfo function. Needed for Darwin 5.3.
|
||||
|
||||
* dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
|
||||
This is necessary at least on Darwin 5.3.
|
||||
|
||||
* jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
|
||||
AC_FUNC_STRNLEN. Otherwise, we'd end up putting two copies of strnlen.o
|
||||
in the library, and that makes some versions of ranlib object.
|
||||
|
||||
2002-04-09 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
|
||||
to be more precise. Rather than saying we're checking whether the
|
||||
function `works', say what we're testing.
|
||||
* realloc.m4 (jm_FUNC_REALLOC): Likewise.
|
||||
Reported by Bruno Haible.
|
||||
|
||||
2002-02-27 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
|
||||
Check for clock_settime.
|
||||
|
||||
2002-02-25 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* acl.m4: New file.
|
||||
* jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
|
||||
Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
|
||||
|
||||
2002-02-16 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* codeset.m4: Upgrade to gettext-0.11.
|
||||
* gettext.m4: Upgrade to gettext-0.11.
|
||||
* glibc21.m4: Upgrade to gettext-0.11.
|
||||
* iconv.m4: Upgrade to gettext-0.11.
|
||||
* isc-posix.m4: Upgrade to gettext-0.11.
|
||||
* lcmessage.m4: Upgrade to gettext-0.11.
|
||||
* lib-ld.m4: New file, from gettext-0.11.
|
||||
* lib-link.m4: New file, from gettext-0.11.
|
||||
* lib-prefix.m4: New file, from gettext-0.11.
|
||||
* progtest.m4: Upgrade to gettext-0.11.
|
||||
|
||||
2002-02-15 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
|
||||
(jm_PREREQ): Use it.
|
||||
|
||||
2002-01-26 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
|
||||
* strnlen.m4: Remove file, now that it's part of autoconf.
|
||||
|
||||
2002-01-22 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
|
||||
|
||||
2002-01-19 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
|
||||
Remove useless quotes: DF_PROG="df".
|
||||
* strnlen.m4: New file.
|
||||
|
||||
2001-12-14 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Check for iswspace.
|
||||
Suggestion from Bruno Haible.
|
||||
|
||||
2001-11-20 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
##m4-files-begin
|
||||
EXTRA_DIST = \
|
||||
README jm-glibc-io.m4 jm-glibc-io.m4n Makefile.am.in \
|
||||
acl.m4 \
|
||||
afs.m4 \
|
||||
assert.m4 \
|
||||
bison.m4 \
|
||||
c-bs-a.m4 \
|
||||
boottime.m4 \
|
||||
c-stack.m4 \
|
||||
check-decl.m4 \
|
||||
chown.m4 \
|
||||
codeset.m4 \
|
||||
@@ -32,6 +34,7 @@ gnu-source.m4 \
|
||||
group-member.m4 \
|
||||
host-os.m4 \
|
||||
iconv.m4 \
|
||||
intdiv0.m4 \
|
||||
inttypes.m4 \
|
||||
isc-posix.m4 \
|
||||
jm-glibc-io.m4 \
|
||||
@@ -42,11 +45,13 @@ jm-winsz2.m4 \
|
||||
lchown.m4 \
|
||||
lcmessage.m4 \
|
||||
lib-check.m4 \
|
||||
lib-ld.m4 \
|
||||
lib-link.m4 \
|
||||
lib-prefix.m4 \
|
||||
link-follow.m4 \
|
||||
longlong.m4 \
|
||||
ls-mntd-fs.m4 \
|
||||
lstat.m4 \
|
||||
malloc.m4 \
|
||||
mbrtowc.m4 \
|
||||
mbstate_t.m4 \
|
||||
mbswidth.m4 \
|
||||
@@ -59,7 +64,6 @@ prereq.m4 \
|
||||
progtest.m4 \
|
||||
putenv.m4 \
|
||||
readdir.m4 \
|
||||
realloc.m4 \
|
||||
regex.m4 \
|
||||
rename.m4 \
|
||||
rmdir-errno.m4 \
|
||||
@@ -67,6 +71,7 @@ search-libs.m4 \
|
||||
st_dm_mode.m4 \
|
||||
st_mtim.m4 \
|
||||
stat.m4 \
|
||||
stdbool.m4 \
|
||||
strerror_r.m4 \
|
||||
strftime.m4 \
|
||||
timespec.m4 \
|
||||
|
||||
167
m4/Makefile.in
167
m4/Makefile.in
@@ -1,7 +1,7 @@
|
||||
# Makefile.in generated by automake 1.5a from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6a from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -14,113 +14,145 @@
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FESETROUND_LIBM = @FESETROUND_LIBM@
|
||||
GENCAT = @GENCAT@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBS = @LIBS@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
LIB_NANOSLEEP = @LIB_NANOSLEEP@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
POW_LIB = @POW_LIB@
|
||||
RANLIB = @RANLIB@
|
||||
SEQ_LIBM = @SEQ_LIBM@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SQRT_LIBM = @SQRT_LIBM@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
YACC = @YACC@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
|
||||
EXTRA_DIST = \
|
||||
README jm-glibc-io.m4 jm-glibc-io.m4n Makefile.am.in \
|
||||
acl.m4 \
|
||||
afs.m4 \
|
||||
assert.m4 \
|
||||
bison.m4 \
|
||||
c-bs-a.m4 \
|
||||
boottime.m4 \
|
||||
c-stack.m4 \
|
||||
check-decl.m4 \
|
||||
chown.m4 \
|
||||
codeset.m4 \
|
||||
@@ -146,6 +178,7 @@ gnu-source.m4 \
|
||||
group-member.m4 \
|
||||
host-os.m4 \
|
||||
iconv.m4 \
|
||||
intdiv0.m4 \
|
||||
inttypes.m4 \
|
||||
isc-posix.m4 \
|
||||
jm-glibc-io.m4 \
|
||||
@@ -156,11 +189,13 @@ jm-winsz2.m4 \
|
||||
lchown.m4 \
|
||||
lcmessage.m4 \
|
||||
lib-check.m4 \
|
||||
lib-ld.m4 \
|
||||
lib-link.m4 \
|
||||
lib-prefix.m4 \
|
||||
link-follow.m4 \
|
||||
longlong.m4 \
|
||||
ls-mntd-fs.m4 \
|
||||
lstat.m4 \
|
||||
malloc.m4 \
|
||||
mbrtowc.m4 \
|
||||
mbstate_t.m4 \
|
||||
mbswidth.m4 \
|
||||
@@ -173,7 +208,6 @@ prereq.m4 \
|
||||
progtest.m4 \
|
||||
putenv.m4 \
|
||||
readdir.m4 \
|
||||
realloc.m4 \
|
||||
regex.m4 \
|
||||
rename.m4 \
|
||||
rmdir-errno.m4 \
|
||||
@@ -181,6 +215,7 @@ search-libs.m4 \
|
||||
st_dm_mode.m4 \
|
||||
st_mtim.m4 \
|
||||
stat.m4 \
|
||||
stdbool.m4 \
|
||||
strerror_r.m4 \
|
||||
strftime.m4 \
|
||||
timespec.m4 \
|
||||
@@ -193,7 +228,7 @@ xstrtoimax.m4 \
|
||||
xstrtoumax.m4
|
||||
|
||||
subdir = m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
@@ -203,28 +238,36 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu m4/Makefile
|
||||
$(AUTOMAKE) --gnits m4/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
@list='$(DISTFILES)'; for file in $$list; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
@@ -248,6 +291,7 @@ install-am: all-am
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
@@ -255,7 +299,7 @@ mostlyclean-generic:
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@@ -294,6 +338,14 @@ mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
@@ -302,7 +354,8 @@ uninstall-am: uninstall-info-am
|
||||
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
|
||||
mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
|
||||
Makefile.am: Makefile.am.in
|
||||
|
||||
23
m4/acl.m4
Normal file
23
m4/acl.m4
Normal file
@@ -0,0 +1,23 @@
|
||||
# acl.m4 - check for access control list (ACL) primitives
|
||||
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU 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.
|
||||
|
||||
AC_DEFUN([AC_FUNC_ACL],
|
||||
[AC_CHECK_HEADERS(sys/acl.h)
|
||||
AC_CHECK_FUNCS(acl)])
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user