mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
952 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
311
ABOUT-NLS
311
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,190 @@ 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 January
|
||||
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 bg ca cs da de el en eo es et fi fr
|
||||
+-------------------------------------+
|
||||
a2ps | [] [] [] [] |
|
||||
bash | [] [] [] [] |
|
||||
bfd | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] |
|
||||
clisp | [] [] [] [] |
|
||||
cpio | [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] |
|
||||
fetchmail | () [] [] [] () |
|
||||
fileutils | [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] |
|
||||
flex | [] [] [] |
|
||||
gas | [] |
|
||||
gawk | [] [] |
|
||||
gcal | [] [] |
|
||||
gcc | [] [] |
|
||||
gettext | [] [] [] [] [] |
|
||||
gnupg | [] [] [] [] [] [] |
|
||||
gprof | [] [] |
|
||||
grep | [] [] [] [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
indent | [] [] [] [] |
|
||||
jpilot | () [] [] [] |
|
||||
jwhois | [] [] |
|
||||
kbd | [] |
|
||||
ld | [] [] |
|
||||
libc | [] [] [] [] [] [] [] |
|
||||
lilypond | [] [] |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
mysecretdiary | [] [] |
|
||||
nano | [] () [] [] [] [] |
|
||||
nano_1_0 | [] () [] [] [] [] |
|
||||
opcodes | [] [] [] |
|
||||
parted | [] [] [] [] |
|
||||
ptx | [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] |
|
||||
sketch | () [] () |
|
||||
soundtracker | [] [] [] |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] [] |
|
||||
textutils | [] [] [] [] |
|
||||
util-linux | [] [] [] [] |
|
||||
wdiff | [] [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] [] |
|
||||
+-------------------------------------+
|
||||
bg ca cs da de el en eo es et fi fr
|
||||
0 8 12 31 36 9 1 9 37 15 1 49
|
||||
|
||||
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 | [] |
|
||||
cpio | [] [] [] |
|
||||
diffutils | [] [] |
|
||||
enscript | [] |
|
||||
error | [] |
|
||||
fetchmail | |
|
||||
fileutils | [] [] |
|
||||
findutils | [] [] [] [] [] [] |
|
||||
flex | [] |
|
||||
gas | |
|
||||
gawk | [] |
|
||||
gcal | |
|
||||
gcc | [] |
|
||||
gettext | [] |
|
||||
gnupg | [] [] [] |
|
||||
gprof | |
|
||||
grep | [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] |
|
||||
indent | [] [] [] |
|
||||
jpilot | () () |
|
||||
jwhois | |
|
||||
kbd | |
|
||||
ld | |
|
||||
libc | [] [] [] [] |
|
||||
lilypond | [] [] |
|
||||
lynx | [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
mysecretdiary | |
|
||||
nano | [] [] [] () () [] |
|
||||
nano_1_0 | [] [] [] () () [] |
|
||||
opcodes | |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] |
|
||||
sharutils | [] [] [] |
|
||||
sketch | () |
|
||||
soundtracker | [] |
|
||||
sp | |
|
||||
tar | [] [] [] |
|
||||
texinfo | [] [] [] |
|
||||
textutils | [] [] |
|
||||
util-linux | () [] |
|
||||
wdiff | |
|
||||
wget | [] [] [] [] [] |
|
||||
+-------------------------------------+
|
||||
gl he hr hu id it ja ko lv nb nl nn
|
||||
20 6 1 3 6 11 22 9 1 6 17 4
|
||||
|
||||
no pl pt pt_BR ru sk sl sv tr uk zh
|
||||
+-------------------------------------+
|
||||
a2ps | () () () [] [] [] () | 8
|
||||
bash | | 4
|
||||
bfd | [] [] | 5
|
||||
binutils | [] | 4
|
||||
bison | [] [] [] | 7
|
||||
clisp | | 5
|
||||
cpio | [] [] [] [] | 11
|
||||
diffutils | [] [] [] | 11
|
||||
enscript | [] [] [] | 6
|
||||
error | [] [] | 5
|
||||
fetchmail | () () | 3
|
||||
fileutils | [] [] [] [] | 11
|
||||
findutils | [] [] [] [] [] [] | 17
|
||||
flex | [] [] | 6
|
||||
gas | [] | 2
|
||||
gawk | [] [] | 5
|
||||
gcal | [] | 3
|
||||
gcc | [] | 4
|
||||
gettext | [] [] [] [] | 10
|
||||
gnupg | [] [] [] | 12
|
||||
gprof | [] [] | 4
|
||||
grep | [] [] [] [] [] | 13
|
||||
hello | [] [] [] [] [] [] [] | 24
|
||||
id-utils | [] [] | 6
|
||||
indent | [] [] [] [] | 11
|
||||
jpilot | () () | 3
|
||||
jwhois | () () | 2
|
||||
kbd | [] [] | 3
|
||||
ld | [] [] | 4
|
||||
libc | [] [] [] [] [] [] | 17
|
||||
lilypond | [] | 5
|
||||
lynx | [] [] [] | 9
|
||||
m4 | [] [] [] | 12
|
||||
make | [] [] [] [] | 12
|
||||
mysecretdiary | [] | 3
|
||||
nano | () [] [] [] | 12
|
||||
nano_1_0 | () [] [] [] | 12
|
||||
opcodes | [] [] | 5
|
||||
parted | [] [] [] | 10
|
||||
ptx | [] [] [] [] [] [] | 15
|
||||
python | | 0
|
||||
recode | [] [] [] [] | 13
|
||||
sed | [] [] [] [] [] [] | 21
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] | 22
|
||||
sharutils | [] [] | 11
|
||||
sketch | () | 1
|
||||
soundtracker | | 4
|
||||
sp | | 0
|
||||
tar | [] [] [] [] [] [] [] | 16
|
||||
texinfo | [] [] | 10
|
||||
textutils | [] [] | 8
|
||||
util-linux | [] [] [] | 8
|
||||
wdiff | [] [] [] [] | 9
|
||||
wget | [] [] [] [] [] [] | 19
|
||||
+-------------------------------------+
|
||||
35 teams no pl pt pt_BR ru sk sl sv tr uk zh
|
||||
54 domains 5 12 2 11 25 10 11 39 29 4 1 463
|
||||
|
||||
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 +367,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 January 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
|
||||
|
||||
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:
|
||||
|
||||
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 \
|
||||
@@ -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,21 +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/ -//')
|
||||
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/\([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/')
|
||||
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-$$$$; \
|
||||
@@ -205,13 +225,6 @@ 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
|
||||
|
||||
rel-files = $(xd-delta) $(distdir).tar.bz2 $(distdir).tar.gz
|
||||
announcement: NEWS ChangeLog $(rel-files)
|
||||
@( \
|
||||
@@ -260,9 +273,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/
|
||||
@@ -286,11 +300,12 @@ $(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-upload-commands
|
||||
@@ -305,7 +320,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)
|
||||
|
||||
15
THANKS
15
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
|
||||
@@ -111,6 +116,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 +141,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 +208,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
|
||||
@@ -232,9 +240,11 @@ 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
|
||||
@@ -258,6 +268,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 +315,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
|
||||
@@ -331,6 +345,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
|
||||
|
||||
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.
|
||||
1325
config/config.guess
vendored
Normal file
1325
config/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load Diff
497
config/config.rpath
Executable file
497
config/config.rpath
Executable file
@@ -0,0 +1,497 @@
|
||||
#! /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*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
wl='-Wl,'
|
||||
fi
|
||||
;;
|
||||
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
|
||||
;;
|
||||
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*)
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
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
|
||||
else
|
||||
hardcode_direct=yes
|
||||
fi
|
||||
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
|
||||
# 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 run time linking.
|
||||
aix_use_runtimelinking=no
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
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_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
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
|
||||
1458
config/config.sub
vendored
Normal file
1458
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.2 2002/06/13 09:30:02 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
122
doc/ChangeLog
122
doc/ChangeLog
@@ -1,3 +1,125 @@
|
||||
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,8 @@ $(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 || :
|
||||
@PERL@ -ne \
|
||||
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ || /{posix}/ and print,exit 1' \
|
||||
$(srcdir)/*.texi 2> /dev/null && : || exit 1
|
||||
|
||||
check: check-texinfo
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile.in generated by automake 1.5a from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6.2 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,
|
||||
@@ -13,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -49,6 +48,8 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -67,7 +68,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
@@ -78,9 +78,9 @@ FESETROUND_LIBM = @FESETROUND_LIBM@
|
||||
GENCAT = @GENCAT@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
@@ -89,23 +89,27 @@ INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
LIB_NANOSLEEP = @LIB_NANOSLEEP@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
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@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
@@ -114,7 +118,6 @@ 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
|
||||
@@ -129,29 +132,29 @@ EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
|
||||
# old systems.
|
||||
MAKEINFO = makeinfo --no-split
|
||||
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
|
||||
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
|
||||
$(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)"; \
|
||||
@@ -178,7 +181,7 @@ 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) $<
|
||||
|
||||
@@ -230,7 +233,7 @@ mostlyclean-aminfo:
|
||||
|
||||
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]*; \
|
||||
@@ -245,15 +248,20 @@ 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 \
|
||||
@@ -281,6 +289,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 +297,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"
|
||||
@@ -382,7 +391,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 || :
|
||||
@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
|
||||
2439
doc/coreutils.texi
2439
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
|
||||
|
||||
280
lib/ChangeLog
280
lib/ChangeLog
@@ -1,3 +1,283 @@
|
||||
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
|
||||
|
||||
@@ -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,20 +28,25 @@ 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 \
|
||||
hard-locale.c hard-locale.h \
|
||||
@@ -57,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 \
|
||||
@@ -70,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 \
|
||||
@@ -82,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 \
|
||||
@@ -99,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 \
|
||||
@@ -115,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
|
||||
@@ -163,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 \
|
||||
|
||||
741
lib/Makefile.in
741
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
|
||||
|
||||
429
lib/c-stack.c
Normal file
429
lib/c-stack.c
Normal file
@@ -0,0 +1,429 @@
|
||||
/* 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/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
|
||||
|
||||
/* For platform which support the ISO C amendement 1 functionality we
|
||||
support user defined character classes. */
|
||||
#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||
/* 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
|
||||
# undef ISASCII /* defined in Solaris5.6's /usr/include/sys/euc.h */
|
||||
# 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
|
||||
|
||||
# undef ISPRINT /* defined in Solaris5.6's /usr/include/sys/euc.h */
|
||||
# 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 || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||
/* 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))
|
||||
|
||||
59
lib/gettext.h
Normal file
59
lib/gettext.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/* 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
|
||||
|
||||
/* 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>
|
||||
|
||||
@@ -42,6 +43,23 @@
|
||||
|
||||
static struct tm *localtime_buffer_addr;
|
||||
|
||||
/* 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)
|
||||
{
|
||||
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
|
||||
gettimeofday clobbers the static buffer used for localtime's result.
|
||||
|
||||
|
||||
@@ -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.h -- declarations for list of mounted filesystems
|
||||
Copyright (C) 1991, 1992, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1992, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -38,13 +38,22 @@ 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, "auto") \
|
||||
|| !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
|
||||
@@ -301,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)
|
||||
{
|
||||
@@ -527,14 +537,15 @@ 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
|
||||
@@ -575,13 +586,13 @@ quotearg_n_options (int n, char const *arg,
|
||||
{
|
||||
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;
|
||||
@@ -591,7 +602,7 @@ quotearg_n_options (int n, char const *arg,
|
||||
char *
|
||||
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 *
|
||||
@@ -600,13 +611,29 @@ quotearg (char const *arg)
|
||||
return quotearg_n (0, 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 = style;
|
||||
memset (o.quote_these_too, 0, sizeof o.quote_these_too);
|
||||
return o;
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_n_style (int n, enum quoting_style s, char const *arg)
|
||||
{
|
||||
struct quoting_options o;
|
||||
o.style = s;
|
||||
memset (o.quote_these_too, 0, sizeof o.quote_these_too);
|
||||
return quotearg_n_options (n, arg, &o);
|
||||
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 *
|
||||
@@ -621,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
|
||||
@@ -98,6 +98,11 @@ char *quotearg PARAMS ((char const *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 ((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>
|
||||
|
||||
@@ -113,10 +113,10 @@
|
||||
# endif
|
||||
|
||||
/* Support for bounded pointers. */
|
||||
# ifndef __BOUNDED_POINTERS__
|
||||
# define __bounded /* nothing */
|
||||
# define __unbounded /* nothing */
|
||||
# define __ptrvalue /* nothing */
|
||||
# if !defined _LIBC && !defined __BOUNDED_POINTERS__
|
||||
# define __bounded /* nothing */
|
||||
# define __unbounded /* nothing */
|
||||
# define __ptrvalue /* nothing */
|
||||
# endif
|
||||
|
||||
/* The `emacs' switch turns on certain matching commands
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
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;
|
||||
|
||||
11
lib/xstat.in
11
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
|
||||
@@ -39,8 +39,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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
178
m4/ChangeLog
178
m4/ChangeLog
@@ -1,3 +1,181 @@
|
||||
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 \
|
||||
c-stack.m4 \
|
||||
check-decl.m4 \
|
||||
chown.m4 \
|
||||
codeset.m4 \
|
||||
@@ -42,6 +44,9 @@ 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 \
|
||||
@@ -67,6 +72,7 @@ search-libs.m4 \
|
||||
st_dm_mode.m4 \
|
||||
st_mtim.m4 \
|
||||
stat.m4 \
|
||||
stdbool.m4 \
|
||||
strerror_r.m4 \
|
||||
strftime.m4 \
|
||||
timespec.m4 \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile.in generated by automake 1.5a from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6.2 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,
|
||||
@@ -13,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -49,6 +48,8 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -67,7 +68,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
@@ -78,9 +78,9 @@ FESETROUND_LIBM = @FESETROUND_LIBM@
|
||||
GENCAT = @GENCAT@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
HELP2MAN = @HELP2MAN@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
@@ -89,23 +89,27 @@ INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
LIB_NANOSLEEP = @LIB_NANOSLEEP@
|
||||
LTLIB = @LTLIB@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
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@
|
||||
STRIP = @STRIP@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
@@ -117,10 +121,12 @@ install_sh = @install_sh@
|
||||
|
||||
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 \
|
||||
c-stack.m4 \
|
||||
check-decl.m4 \
|
||||
chown.m4 \
|
||||
codeset.m4 \
|
||||
@@ -156,6 +162,9 @@ 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 \
|
||||
@@ -181,6 +190,7 @@ search-libs.m4 \
|
||||
st_dm_mode.m4 \
|
||||
st_mtim.m4 \
|
||||
stat.m4 \
|
||||
stdbool.m4 \
|
||||
strerror_r.m4 \
|
||||
strftime.m4 \
|
||||
timespec.m4 \
|
||||
@@ -193,7 +203,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,9 +213,9 @@ 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:
|
||||
@@ -216,15 +226,20 @@ 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 +263,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 +271,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"
|
||||
|
||||
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)])
|
||||
@@ -1,4 +1,10 @@
|
||||
#serial 4
|
||||
# c-bs-a.m4 serial 4 (fileutils-4.1.3)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
|
||||
136
m4/c-stack.m4
Normal file
136
m4/c-stack.m4
Normal file
@@ -0,0 +1,136 @@
|
||||
# Check prerequisites for compiling lib/c-stack.c.
|
||||
|
||||
# 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_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
|
||||
[# for STACK_DIRECTION
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])
|
||||
|
||||
AC_CACHE_CHECK([for working C stack overflow detection],
|
||||
ac_cv_sys_xsi_stack_overflow_heuristic,
|
||||
[AC_TRY_RUN(
|
||||
[
|
||||
#include <signal.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
static union
|
||||
{
|
||||
char buffer[SIGSTKSZ];
|
||||
long double ld;
|
||||
long u;
|
||||
void *p;
|
||||
} alternate_signal_stack;
|
||||
|
||||
#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
|
||||
|
||||
static void
|
||||
segv_handler (int signo, siginfo_t *info, void *context)
|
||||
{
|
||||
if (0 < info->si_code)
|
||||
{
|
||||
ucontext_t const *user_context = context;
|
||||
char const *stack_min = user_context->uc_stack.ss_sp;
|
||||
size_t stack_size = user_context->uc_stack.ss_size;
|
||||
char const *faulting_address = info->si_addr;
|
||||
size_t s = faulting_address - stack_min;
|
||||
size_t page_size = sysconf (_SC_PAGESIZE);
|
||||
if (find_stack_direction (0) < 0)
|
||||
s += page_size;
|
||||
if (s < stack_size + page_size)
|
||||
_exit (0);
|
||||
}
|
||||
|
||||
_exit (1);
|
||||
}
|
||||
|
||||
static int
|
||||
c_stack_action (void)
|
||||
{
|
||||
stack_t st;
|
||||
struct sigaction act;
|
||||
int r;
|
||||
|
||||
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;
|
||||
|
||||
sigemptyset (&act.sa_mask);
|
||||
act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
|
||||
act.sa_sigaction = segv_handler;
|
||||
return sigaction (SIGSEGV, &act, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
recurse (char *p)
|
||||
{
|
||||
char array[500];
|
||||
array[0] = 1;
|
||||
return *p + recurse (array);
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
c_stack_action ();
|
||||
return recurse ("\1");
|
||||
}
|
||||
],
|
||||
[ac_cv_sys_xsi_stack_overflow_heuristic=yes],
|
||||
[ac_cv_sys_xsi_stack_overflow_heuristic=no],
|
||||
[ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling])])
|
||||
|
||||
if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then
|
||||
AC_DEFINE(HAVE_XSI_STACK_OVERFLOW_HEURISTIC, 1,
|
||||
[Define to 1 if extending the stack slightly past the limit causes
|
||||
a SIGSEGV, and an alternate stack can be established with sigaltstack,
|
||||
and the signal handler is passed a context that specifies the
|
||||
run time stack. This behavior is defined by POSIX 1003.1-2001
|
||||
with the X/Open System Interface (XSI) option
|
||||
and is a standardized way to implement a SEGV-based stack
|
||||
overflow detection heuristic.])
|
||||
fi])
|
||||
|
||||
|
||||
AC_DEFUN([jm_PREREQ_C_STACK],
|
||||
[AC_REQUIRE([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC])
|
||||
|
||||
# for STACK_DIRECTION
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])
|
||||
|
||||
AC_CHECK_FUNCS(getcontext sigaltstack)
|
||||
AC_CHECK_DECLS([getcontext], , , [#include <ucontext.h>])
|
||||
AC_CHECK_DECLS([sigaltstack], , , [#include <signal.h>])
|
||||
|
||||
AC_CHECK_HEADERS(sys/resource.h ucontext.h unistd.h)
|
||||
|
||||
AC_CHECK_TYPES([stack_t], , , [#include <signal.h>])])
|
||||
@@ -1,4 +1,10 @@
|
||||
#serial AM1
|
||||
# codeset.m4 serial AM1 (gettext-0.10.40)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 4
|
||||
#serial 5
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl
|
||||
@@ -34,7 +34,7 @@ AC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
|
||||
]
|
||||
)
|
||||
if test $jm_cv_struct_dirent_d_type = yes; then
|
||||
AC_DEFINE(D_TYPE_IN_DIRENT, 1,
|
||||
AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1,
|
||||
[Define if there is a member named d_type in the struct describing
|
||||
directory headers.])
|
||||
fi
|
||||
|
||||
18
m4/dirfd.m4
18
m4/dirfd.m4
@@ -1,4 +1,4 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
dnl Find out how to get the file descriptor associated with an open DIR*.
|
||||
dnl From Jim Meyering
|
||||
@@ -25,9 +25,19 @@ AC_DEFUN([UTILS_FUNC_DIRFD],
|
||||
AC_CHECK_FUNCS(dirfd)
|
||||
AC_CHECK_DECLS([dirfd], , , $dirfd_headers)
|
||||
|
||||
# Use the replacement only if we have neither the function
|
||||
# nor a declaration.
|
||||
if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd = no,no; then
|
||||
AC_CACHE_CHECK([whether dirfd is a macro],
|
||||
jm_cv_func_dirfd_macro,
|
||||
AC_EGREP_CPP([dirent_header_defines_dirfd], [$dirfd_headers
|
||||
#ifdef dirfd
|
||||
dirent_header_defines_dirfd
|
||||
#endif],
|
||||
jm_cv_func_dirfd_macro=yes,
|
||||
jm_cv_func_dirfd_macro=no))
|
||||
|
||||
# Use the replacement only if we have no function, macro,
|
||||
# or declaration with that name.
|
||||
if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$jm_cv_func_dirfd_macro \
|
||||
= no,no,no; then
|
||||
AC_REPLACE_FUNCS([dirfd])
|
||||
AC_CACHE_CHECK(
|
||||
[how to get the file descriptor associated with an open DIR*],
|
||||
|
||||
@@ -1,15 +1,87 @@
|
||||
#serial 5
|
||||
# Check for fnmatch.
|
||||
|
||||
dnl Determine whether to add fnmatch.o to LIBOBJS and to
|
||||
dnl define fnmatch to rpl_fnmatch.
|
||||
dnl
|
||||
# This is a modified version of autoconf's AC_FUNC_FNMATCH.
|
||||
# This file should be removed after Autoconf 2.54 is required.
|
||||
|
||||
AC_DEFUN([jm_FUNC_FNMATCH],
|
||||
[
|
||||
AC_FUNC_FNMATCH
|
||||
if test $ac_cv_func_fnmatch_works = no; then
|
||||
AC_LIBOBJ(fnmatch)
|
||||
AC_DEFINE(fnmatch, rpl_fnmatch,
|
||||
[Define to rpl_fnmatch if the replacement function should be used.])
|
||||
fi
|
||||
])
|
||||
# Copyright (C) 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
|
||||
# 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.
|
||||
|
||||
# _AC_FUNC_FNMATCH_IF(STANDARD = GNU | POSIX, CACHE_VAR, IF-TRUE, IF-FALSE)
|
||||
# -------------------------------------------------------------------------
|
||||
# If a STANDARD compliant fnmatch is found, run IF-TRUE, otherwise
|
||||
# IF-FALSE. Use CACHE_VAR.
|
||||
AC_DEFUN([_AC_FUNC_FNMATCH_IF],
|
||||
[AC_CACHE_CHECK(
|
||||
[for working $1 fnmatch],
|
||||
[$2],
|
||||
[# Some versions of Solaris, SCO, and the GNU C Library
|
||||
# have a broken or incompatible fnmatch.
|
||||
# So we run a test program. If we are cross-compiling, take no chance.
|
||||
# Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <fnmatch.h>
|
||||
# define y(a, b, c) (fnmatch (a, b, c) == 0)
|
||||
# define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
|
||||
],
|
||||
[exit
|
||||
(!(y ("a*", "abc", 0)
|
||||
&& n ("d*/*1", "d/s/1", FNM_PATHNAME)
|
||||
&& y ("a\\\\bc", "abc", 0)
|
||||
&& n ("a\\\\bc", "abc", FNM_NOESCAPE)
|
||||
&& y ("*x", ".x", 0)
|
||||
&& n ("*x", ".x", FNM_PERIOD)
|
||||
&& m4_if([$1], [GNU],
|
||||
[y ("xxXX", "xXxX", FNM_CASEFOLD)
|
||||
&& y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)
|
||||
&& n ("d*/*1", "d/s/1", FNM_FILE_NAME)
|
||||
&& y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)
|
||||
&& y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)
|
||||
&& y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)],
|
||||
1)));])],
|
||||
[$2=yes],
|
||||
[$2=no],
|
||||
[$2=cross])])
|
||||
AS_IF([test $$2 = yes], [$3], [$4])
|
||||
])# _AC_FUNC_FNMATCH_IF
|
||||
|
||||
|
||||
# _AC_LIBOBJ_FNMATCH
|
||||
# ------------------
|
||||
# Prepare the replacement of fnmatch.
|
||||
AC_DEFUN([_AC_LIBOBJ_FNMATCH],
|
||||
[AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
|
||||
AC_CHECK_DECLS([getenv])
|
||||
AC_CHECK_FUNCS([mbsrtowcs mempcpy wmempcpy])
|
||||
AC_CHECK_HEADERS([wchar.h wctype.h])
|
||||
AC_LIBOBJ([fnmatch])
|
||||
AC_CONFIG_LINKS([lib/fnmatch.h:lib/fnmatch_.h])
|
||||
AC_DEFINE(fnmatch, rpl_fnmatch,
|
||||
[Define to rpl_fnmatch if the replacement function should be used.])
|
||||
])# _AC_LIBOBJ_FNMATCH
|
||||
|
||||
|
||||
# AC_FUNC_FNMATCH_GNU
|
||||
# -------------------
|
||||
AC_DEFUN([AC_FUNC_FNMATCH_GNU],
|
||||
[AC_REQUIRE([AC_GNU_SOURCE])
|
||||
_AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
|
||||
[rm -f lib/fnmatch.h],
|
||||
[_AC_LIBOBJ_FNMATCH])
|
||||
])# AC_FUNC_FNMATCH_GNU
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 8
|
||||
#serial 9
|
||||
|
||||
# A replacement for autoconf's macro by the same name. This version
|
||||
# accepts an optional argument specifying the name of the $srcdir-relative
|
||||
@@ -12,6 +12,9 @@ undefine([AC_FUNC_GETLOADAVG])
|
||||
AC_DEFUN([AC_FUNC_GETLOADAVG],
|
||||
[ac_have_func=no # yes means we've found a way to get the load average.
|
||||
|
||||
AC_CHECK_HEADERS(locale.h unistd.h mach/mach.h fcntl.h)
|
||||
AC_CHECK_FUNCS(setlocale)
|
||||
|
||||
# By default, expect to find getloadavg.c in $srcdir/.
|
||||
ac_lib_dir_getloadavg=$srcdir
|
||||
# But if there's an argument, DIR, expect to find getloadavg.c in $srcdir/DIR.
|
||||
|
||||
719
m4/gettext.m4
719
m4/gettext.m4
@@ -1,27 +1,40 @@
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License or the GNU Library General Public License but which still want
|
||||
# to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code of the GNU gettext library is covered
|
||||
# by the GNU Library General Public License, and the rest of the GNU
|
||||
# gettext package package is covered by the GNU General Public License.
|
||||
# They are *not* in the public domain.
|
||||
# gettext.m4 serial 14 (gettext-0.11.2)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
# serial 10
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
|
||||
|
||||
dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
|
||||
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
|
||||
dnl Macro to add for using GNU gettext.
|
||||
|
||||
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
|
||||
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
|
||||
dnl default (if it is not specified or empty) is 'no-libtool'.
|
||||
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
|
||||
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
|
||||
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
|
||||
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
||||
dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
||||
dnl AM-DISABLE-SHARED). Otherwise, a static library
|
||||
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
|
||||
dnl $(top_builddir)/intl/libintl.a will be created.
|
||||
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
||||
dnl implementations (in libc or libintl) without the ngettext() function
|
||||
dnl will be ignored.
|
||||
dnl LIBDIR is used to find the intl libraries. If empty,
|
||||
dnl INTLDIR is used to find the intl libraries. If empty,
|
||||
dnl the value `$(top_builddir)/intl/' is used.
|
||||
dnl
|
||||
dnl The result of the configuration is one of three cases:
|
||||
@@ -35,29 +48,53 @@ dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||
dnl 3) No internationalization, always use English msgid.
|
||||
dnl Catalog format: none
|
||||
dnl Catalog extension: none
|
||||
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
|
||||
dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
||||
dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
||||
dnl but we keep it in order not to force irrelevant filename changes on the
|
||||
dnl maintainers.
|
||||
dnl
|
||||
AC_DEFUN([AM_WITH_NLS],
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
AC_DEFUN([AM_GNU_GETTEXT],
|
||||
[
|
||||
dnl Argument checking.
|
||||
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
|
||||
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
|
||||
])])])])])
|
||||
ifelse([$2], [], , [ifelse([$2], [need-ngettext], ,
|
||||
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
|
||||
])])])
|
||||
define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
|
||||
define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
|
||||
|
||||
AC_REQUIRE([AM_PO_SUBDIRS])dnl
|
||||
ifelse(gt_included_intl, yes, [
|
||||
AC_REQUIRE([AM_INTL_SUBDIR])dnl
|
||||
])
|
||||
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
BUILD_INCLUDED_LIBINTL=no
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
INTLLIBS=
|
||||
])
|
||||
LIBINTL=
|
||||
LTLIBINTL=
|
||||
POSUB=
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS, 1,
|
||||
[Define to 1 if translation of program messages to the user's native language
|
||||
is requested.])
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
gt_use_preinstalled_gnugettext=no
|
||||
ifelse(gt_included_intl, yes, [
|
||||
AC_MSG_CHECKING([whether included gettext is requested])
|
||||
AC_ARG_WITH(included-gettext,
|
||||
[ --with-included-gettext use the GNU gettext library included here],
|
||||
@@ -67,214 +104,156 @@ AC_DEFUN([AM_WITH_NLS],
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
])
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If GNU gettext is available we use this. Else we have
|
||||
dnl to fall back to GNU NLS library.
|
||||
CATOBJEXT=NONE
|
||||
|
||||
dnl Add a version number to the cache macros.
|
||||
define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
|
||||
define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
|
||||
define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1))
|
||||
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
|
||||
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
||||
gt_cv_func_gnugettext_libc=yes,
|
||||
gt_cv_func_gnugettext_libc=no)])
|
||||
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern int *_nl_domain_bindings;],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
|
||||
gt_cv_func_gnugettext_libc=yes,
|
||||
gt_cv_func_gnugettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
||||
AC_CACHE_CHECK([for GNU gettext in libintl],
|
||||
gt_cv_func_gnugettext_libintl,
|
||||
[gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -lintl $LIBICONV"
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
||||
gt_cv_func_gnugettext_libintl=yes,
|
||||
gt_cv_func_gnugettext_libintl=no)
|
||||
LIBS="$gt_save_LIBS"])
|
||||
fi
|
||||
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
||||
dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
||||
ifelse(gt_included_intl, yes, , [
|
||||
AM_ICONV_LINK
|
||||
])
|
||||
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
|
||||
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
|
||||
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
|
||||
dnl even if libiconv doesn't exist.
|
||||
AC_LIB_LINKFLAGS_BODY([intl])
|
||||
AC_CACHE_CHECK([for GNU gettext in libintl],
|
||||
gt_cv_func_gnugettext_libintl,
|
||||
[gt_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $INCINTL"
|
||||
gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBINTL"
|
||||
dnl Now see whether libintl exists and does not depend on libiconv.
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias ();],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
|
||||
gt_cv_func_gnugettext_libintl=yes,
|
||||
gt_cv_func_gnugettext_libintl=no)
|
||||
dnl Now see whether libintl exists and depends on libiconv.
|
||||
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias ();],
|
||||
[bindtextdomain ("", "");
|
||||
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
|
||||
[LIBINTL="$LIBINTL $LIBICONV"
|
||||
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
|
||||
gt_cv_func_gnugettext_libintl=yes
|
||||
])
|
||||
fi
|
||||
CPPFLAGS="$gt_save_CPPFLAGS"
|
||||
LIBS="$gt_save_LIBS"])
|
||||
fi
|
||||
|
||||
dnl If an already present or preinstalled GNU gettext() is found,
|
||||
dnl use it. But if this macro is used in GNU gettext, and GNU
|
||||
dnl gettext is already preinstalled in libintl, we update this
|
||||
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
||||
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
||||
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
||||
&& test "$PACKAGE" != gettext; }; then
|
||||
AC_DEFINE(HAVE_GETTEXT, 1,
|
||||
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||
dnl If an already present or preinstalled GNU gettext() is found,
|
||||
dnl use it. But if this macro is used in GNU gettext, and GNU
|
||||
dnl gettext is already preinstalled in libintl, we update this
|
||||
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
||||
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
||||
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
||||
&& test "$PACKAGE" != gettext; }; then
|
||||
gt_use_preinstalled_gnugettext=yes
|
||||
else
|
||||
dnl Reset the values set by searching for libintl.
|
||||
LIBINTL=
|
||||
LTLIBINTL=
|
||||
INCINTL=
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
||||
dnl If iconv() is in a separate libiconv library, then anyone
|
||||
dnl linking with libintl{.a,.so} also needs to link with
|
||||
dnl libiconv.
|
||||
INTLLIBS="-lintl $LIBICONV"
|
||||
fi
|
||||
|
||||
gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
LIBS="$gt_save_LIBS"
|
||||
|
||||
dnl Search for GNU msgfmt in the PATH.
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
|
||||
dnl Search for GNU xgettext in the PATH.
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
||||
|
||||
CATOBJEXT=.gmo
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
dnl GNU gettext is not found in the C library.
|
||||
dnl Fall back on GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
ifelse(gt_included_intl, yes, [
|
||||
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
|
||||
dnl GNU gettext is not found in the C library.
|
||||
dnl Fall back on included GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions used to generate GNU NLS library.
|
||||
INTLOBJS="\$(GETTOBJS)"
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
||||
AC_SUBST(MSGFMT)
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
|
||||
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
|
||||
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||
fi
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions to use GNU gettext tools.
|
||||
CATOBJEXT=.gmo
|
||||
INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
|
||||
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||
fi
|
||||
])
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU msgfmt.
|
||||
if test "$GMSGFMT" != ":"; then
|
||||
dnl If it is no GNU msgfmt we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found msgfmt program is not GNU msgfmt; ignore it])
|
||||
GMSGFMT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl We need to process the po/ directory.
|
||||
POSUB=po
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS, 1,
|
||||
[Define to 1 if translation of program messages to the user's native language
|
||||
is requested.])
|
||||
else
|
||||
USE_NLS=no
|
||||
fi
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[for ac_file in $CONFIG_FILES; do
|
||||
# Support "outfile[:infile[:infile...]]"
|
||||
case "$ac_file" in
|
||||
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||
esac
|
||||
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||
case "$ac_file" in */Makefile.in)
|
||||
# Adjust a relative srcdir.
|
||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||
# In autoconf-2.50 it is called $srcdir.
|
||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||
case "$ac_given_srcdir" in
|
||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||
rm -f "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
||||
sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done])
|
||||
fi
|
||||
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
|
||||
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
||||
AC_MSG_CHECKING([how to link with libintl])
|
||||
AC_MSG_RESULT([$LIBINTL])
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
|
||||
fi
|
||||
|
||||
dnl For backward compatibility. Some packages may be using this.
|
||||
AC_DEFINE(HAVE_GETTEXT, 1,
|
||||
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||
AC_DEFINE(HAVE_DCGETTEXT, 1,
|
||||
[Define if the GNU dcgettext() function is already present or preinstalled.])
|
||||
fi
|
||||
|
||||
dnl We need to process the po/ directory.
|
||||
POSUB=po
|
||||
fi
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
||||
dnl to 'yes' because some of the testsuite requires it.
|
||||
if test "$PACKAGE" = gettext; then
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
fi
|
||||
|
||||
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
||||
dnl because plural.y uses bison specific features. It requires at least
|
||||
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
||||
dnl compile.
|
||||
dnl bison is only needed for the maintainer (who touches plural.y). But in
|
||||
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
||||
dnl the rule in general Makefile. Now, some people carelessly touch the
|
||||
dnl files or have a broken "make" program, hence the plural.c rule will
|
||||
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
||||
dnl present or too old.
|
||||
AC_CHECK_PROGS([INTLBISON], [bison])
|
||||
if test -z "$INTLBISON"; then
|
||||
ac_verc_fail=yes
|
||||
else
|
||||
dnl Found it, now check the version.
|
||||
AC_MSG_CHECKING([version of bison])
|
||||
changequote(<<,>>)dnl
|
||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||
case $ac_prog_version in
|
||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||
changequote([,])dnl
|
||||
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
||||
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
||||
esac
|
||||
AC_MSG_RESULT([$ac_prog_version])
|
||||
fi
|
||||
if test $ac_verc_fail = yes; then
|
||||
INTLBISON=:
|
||||
fi
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(BUILD_INCLUDED_LIBINTL)
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
|
||||
dnl For backward compatibility. Some configure.ins may be using this.
|
||||
nls_cv_header_intl=
|
||||
@@ -291,80 +270,270 @@ changequote([,])dnl
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
GENCAT=gencat
|
||||
AC_SUBST(GENCAT)
|
||||
|
||||
dnl Enable libtool support if the surrounding package wishes it.
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
|
||||
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
||||
])
|
||||
|
||||
dnl Usage: Just like AM_WITH_NLS, which see.
|
||||
AC_DEFUN([AM_GNU_GETTEXT],
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
AC_REQUIRE([jm_GLIBC21])dnl
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
INTLLIBS="$LIBINTL"
|
||||
AC_SUBST(INTLLIBS)
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
||||
dnl Make all documented variables known to autoconf.
|
||||
AC_SUBST(LIBINTL)
|
||||
AC_SUBST(LTLIBINTL)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
|
||||
dnl Checks for all prerequisites of the po subdirectory,
|
||||
dnl except for USE_NLS.
|
||||
AC_DEFUN([AM_PO_SUBDIRS],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
||||
|
||||
dnl Perform the following tests also if --disable-nls has been given,
|
||||
dnl because they are needed for "make dist" to work.
|
||||
|
||||
dnl Search for GNU msgfmt in the PATH.
|
||||
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
|
||||
dnl The second test excludes FreeBSD msgfmt.
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
|
||||
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
|
||||
dnl Search for GNU xgettext 0.11 or newer in the PATH.
|
||||
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
|
||||
dnl The second test excludes FreeBSD xgettext.
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
|
||||
(if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
dnl Remove leftover from FreeBSD xgettext call.
|
||||
rm -f messages.po
|
||||
|
||||
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
|
||||
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
|
||||
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU msgfmt.
|
||||
if test "$GMSGFMT" != ":"; then
|
||||
dnl If it is no GNU msgfmt we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
|
||||
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
|
||||
: ;
|
||||
else
|
||||
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
|
||||
AC_MSG_RESULT(
|
||||
[found $GMSGFMT program is not GNU msgfmt; ignore it])
|
||||
GMSGFMT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
|
||||
(if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
dnl Remove leftover from FreeBSD xgettext call.
|
||||
rm -f messages.po
|
||||
fi
|
||||
|
||||
AC_OUTPUT_COMMANDS([
|
||||
for ac_file in $CONFIG_FILES; do
|
||||
# Support "outfile[:infile[:infile...]]"
|
||||
case "$ac_file" in
|
||||
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||
esac
|
||||
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||
case "$ac_file" in */Makefile.in)
|
||||
# Adjust a relative srcdir.
|
||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||
# In autoconf-2.50 it is called $srcdir.
|
||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||
case "$ac_given_srcdir" in
|
||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||
rm -f "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
|
||||
# ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
|
||||
# on $ac_dir but don't depend on user-specified configuration
|
||||
# parameters.
|
||||
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
|
||||
# The LINGUAS file contains the set of available languages.
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
|
||||
fi
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
# Hide the ALL_LINGUAS assigment from automake.
|
||||
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
|
||||
fi
|
||||
case "$ac_given_srcdir" in
|
||||
.) srcdirpre= ;;
|
||||
*) srcdirpre='$(srcdir)/' ;;
|
||||
esac
|
||||
POFILES=
|
||||
GMOFILES=
|
||||
UPDATEPOFILES=
|
||||
DUMMYPOFILES=
|
||||
for lang in $ALL_LINGUAS; do
|
||||
POFILES="$POFILES $srcdirpre$lang.po"
|
||||
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
|
||||
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
|
||||
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
|
||||
done
|
||||
# CATALOGS depends on both $ac_dir and the user's LINGUAS
|
||||
# environment variable.
|
||||
INST_LINGUAS=
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
if test "%UNSET%" != "$LINGUAS"; then
|
||||
desiredlanguages="$LINGUAS"
|
||||
else
|
||||
desiredlanguages="$ALL_LINGUAS"
|
||||
fi
|
||||
for desiredlang in $desiredlanguages; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
INST_LINGUAS="$INST_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
CATALOGS=
|
||||
if test -n "$INST_LINGUAS"; then
|
||||
for lang in $INST_LINGUAS; do
|
||||
CATALOGS="$CATALOGS $lang.gmo"
|
||||
done
|
||||
fi
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
||||
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
||||
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
|
||||
if test -f "$f"; then
|
||||
case "$f" in
|
||||
*.orig | *.bak | *~) ;;
|
||||
*) cat "$f" >> "$ac_dir/Makefile" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done],
|
||||
[# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
|
||||
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
|
||||
# from automake.
|
||||
eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
|
||||
# Capture the value of LINGUAS because we need it to compute CATALOGS.
|
||||
LINGUAS="${LINGUAS-%UNSET%}"
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl Checks for all prerequisites of the intl subdirectory,
|
||||
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
|
||||
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
|
||||
AC_DEFUN([AM_INTL_SUBDIR],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
AC_REQUIRE([jm_GLIBC21])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
||||
stdlib.h string.h unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
|
||||
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
|
||||
strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
||||
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
|
||||
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
|
||||
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
||||
|
||||
AM_ICONV
|
||||
AM_LANGINFO_CODESET
|
||||
AM_LC_MESSAGES
|
||||
AM_WITH_NLS([$1],[$2],[$3])
|
||||
AM_ICONV
|
||||
AM_LANGINFO_CODESET
|
||||
AM_LC_MESSAGES
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
||||
dnl because plural.y uses bison specific features. It requires at least
|
||||
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
||||
dnl compile.
|
||||
dnl bison is only needed for the maintainer (who touches plural.y). But in
|
||||
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
||||
dnl the rule in general Makefile. Now, some people carelessly touch the
|
||||
dnl files or have a broken "make" program, hence the plural.c rule will
|
||||
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
||||
dnl present or too old.
|
||||
AC_CHECK_PROGS([INTLBISON], [bison])
|
||||
if test -z "$INTLBISON"; then
|
||||
ac_verc_fail=yes
|
||||
else
|
||||
dnl Found it, now check the version.
|
||||
AC_MSG_CHECKING([version of bison])
|
||||
changequote(<<,>>)dnl
|
||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||
case $ac_prog_version in
|
||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||
changequote([,])dnl
|
||||
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
||||
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
||||
esac
|
||||
AC_MSG_RESULT([$ac_prog_version])
|
||||
fi
|
||||
if test $ac_verc_fail = yes; then
|
||||
INTLBISON=:
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl Enable libtool support if the surrounding package wishes it.
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
|
||||
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
||||
])
|
||||
AC_DEFUN([AM_MKINSTALLDIRS],
|
||||
[
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl
|
||||
@@ -6,8 +6,8 @@ dnl See if gettimeofday clobbers the static buffer that localtime uses
|
||||
dnl for it's return value. The gettimeofday function from Mac OS X 10.0.4,
|
||||
dnl i.e. Darwin 1.3.7 has this problem.
|
||||
dnl
|
||||
dnl If it does, then arrange to use gettimeofday only via the wrapper
|
||||
dnl function that works around the problem.
|
||||
dnl If it does, then arrange to use gettimeofday and localtime only via
|
||||
dnl the wrapper functions that work around the problem.
|
||||
|
||||
AC_DEFUN([AC_FUNC_GETTIMEOFDAY_CLOBBER],
|
||||
[
|
||||
@@ -59,6 +59,8 @@ main ()
|
||||
])
|
||||
if test $jm_cv_func_gettimeofday_clobber = yes; then
|
||||
AC_LIBOBJ(gettimeofday)
|
||||
AC_DEFINE(localtime, rpl_localtime,
|
||||
[Define to rpl_localtime if the replacement function should be used.])
|
||||
AC_DEFINE(gettimeofday, rpl_gettimeofday,
|
||||
[Define to rpl_gettimeofday if the replacement function should be used.])
|
||||
AC_DEFINE(GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, 1,
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#serial 2
|
||||
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
# Test for the GNU C Library, version 2.1 or newer.
|
||||
# From Bruno Haible.
|
||||
|
||||
@@ -1,25 +1,12 @@
|
||||
#serial 3
|
||||
# Make sure _GNU_SOURCE is defined where necessary: as early as possible
|
||||
# for configure-time tests, as well as for every source file that includes
|
||||
# config.h.
|
||||
|
||||
# From Jim Meyering.
|
||||
|
||||
AC_DEFUN([AC__GNU_SOURCE],
|
||||
[
|
||||
# Make sure that _GNU_SOURCE is defined for all subsequent
|
||||
# configure-time compile tests.
|
||||
# This definition must be emitted (into confdefs.h) before any
|
||||
# test that involves compilation.
|
||||
cat >>confdefs.h <<\EOF
|
||||
# AC_GNU_SOURCE
|
||||
# --------------
|
||||
AC_DEFUN([AC_GNU_SOURCE],
|
||||
[AH_VERBATIM([_GNU_SOURCE],
|
||||
[/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE
|
||||
#endif
|
||||
EOF
|
||||
|
||||
# Emit this code into config.h.in.
|
||||
# The ifndef is to avoid redefinition warnings.
|
||||
AH_VERBATIM([_GNU_SOURCE], [#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE
|
||||
#endif])
|
||||
# undef _GNU_SOURCE
|
||||
#endif])dnl
|
||||
AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
|
||||
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
|
||||
AC_DEFINE([_GNU_SOURCE])
|
||||
])
|
||||
|
||||
57
m4/iconv.m4
57
m4/iconv.m4
@@ -1,19 +1,32 @@
|
||||
#serial AM2
|
||||
# iconv.m4 serial AM3 (gettext-0.11)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([AM_ICONV],
|
||||
AC_DEFUN([AM_ICONV_LINK],
|
||||
[
|
||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||
dnl those with the standalone portable GNU libiconv installed).
|
||||
|
||||
AC_ARG_WITH([libiconv-prefix],
|
||||
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
||||
for dir in `echo "$withval" | tr : ' '`; do
|
||||
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
||||
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
||||
done
|
||||
])
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([iconv])
|
||||
|
||||
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed libiconv and not disabled its use
|
||||
dnl via --without-libiconv-prefix, he wants to use it. The first
|
||||
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
||||
am_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
||||
|
||||
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||
@@ -26,7 +39,7 @@ AC_DEFUN([AM_ICONV],
|
||||
am_cv_func_iconv=yes)
|
||||
if test "$am_cv_func_iconv" != yes; then
|
||||
am_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -liconv"
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
@@ -39,6 +52,25 @@ AC_DEFUN([AM_ICONV],
|
||||
])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
||||
fi
|
||||
if test "$am_cv_lib_iconv" = yes; then
|
||||
AC_MSG_CHECKING([how to link with libiconv])
|
||||
AC_MSG_RESULT([$LIBICONV])
|
||||
else
|
||||
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
||||
dnl either.
|
||||
CPPFLAGS="$am_save_CPPFLAGS"
|
||||
LIBICONV=
|
||||
LTLIBICONV=
|
||||
fi
|
||||
AC_SUBST(LIBICONV)
|
||||
AC_SUBST(LTLIBICONV)
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_ICONV],
|
||||
[
|
||||
AC_REQUIRE([AM_ICONV_LINK])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_MSG_CHECKING([for iconv declaration])
|
||||
AC_CACHE_VAL(am_cv_proto_iconv, [
|
||||
AC_TRY_COMPILE([
|
||||
@@ -61,9 +93,4 @@ size_t iconv();
|
||||
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
||||
[Define as const if the declaration of iconv() needs const.])
|
||||
fi
|
||||
LIBICONV=
|
||||
if test "$am_cv_lib_iconv" = yes; then
|
||||
LIBICONV="-liconv"
|
||||
fi
|
||||
AC_SUBST(LIBICONV)
|
||||
])
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
#serial 1
|
||||
# isc-posix.m4 serial 1 (gettext-0.10.40)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
# This test replaces the one in autoconf.
|
||||
# Currently this macro should have the same name as the autoconf macro
|
||||
# because gettext's gettext.m4 (distributed in the automake package)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user