mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-08 23:58:31 +08:00
Compare commits
601
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45cfe22efe | ||
|
|
cc3685d59f | ||
|
|
50b73048e7 | ||
|
|
3ff46a85e2 | ||
|
|
fe361d46d1 | ||
|
|
c7263463b0 | ||
|
|
6dfd809c7c | ||
|
|
ad483c3ee8 | ||
|
|
747fe02fc4 | ||
|
|
384dc53f06 | ||
|
|
7f5a317d8b | ||
|
|
ad9dd14dbe | ||
|
|
c0f9cb02b8 | ||
|
|
b1aa8394ef | ||
|
|
3c37f45c06 | ||
|
|
0497df82f5 | ||
|
|
5cc33d237d | ||
|
|
4d22dd08e2 | ||
|
|
372bb6b15b | ||
|
|
e1c5692ec0 | ||
|
|
6a4e2e6647 | ||
|
|
91a1478924 | ||
|
|
c6c29e492a | ||
|
|
87a827b056 | ||
|
|
f376f730eb | ||
|
|
367179a7f9 | ||
|
|
355fca3b07 | ||
|
|
b1923b80f1 | ||
|
|
2a4bf7e797 | ||
|
|
1d806c1fb9 | ||
|
|
3ac58092a2 | ||
|
|
8841bd89aa | ||
|
|
6bb6f6d3b7 | ||
|
|
5b627ca39d | ||
|
|
6b6f9ff898 | ||
|
|
ec19e4247b | ||
|
|
daaae3fef3 | ||
|
|
b6c8aca476 | ||
|
|
4312093551 | ||
|
|
057050b673 | ||
|
|
a7a1285310 | ||
|
|
116a3df36c | ||
|
|
755feef47c | ||
|
|
87f1cf848c | ||
|
|
8ad9e4d159 | ||
|
|
548a8f3140 | ||
|
|
7b9a9e4735 | ||
|
|
350bcbed8d | ||
|
|
3d86ce7fef | ||
|
|
3af3bc37bf | ||
|
|
72a5ba9b39 | ||
|
|
25c1dd5cbb | ||
|
|
b9dbb25306 | ||
|
|
374d511f46 | ||
|
|
995f39cc17 | ||
|
|
9f960aaf7f | ||
|
|
9839483dfd | ||
|
|
19c2c5516d | ||
|
|
de78ade548 | ||
|
|
158158d2f1 | ||
|
|
c5ff2318d8 | ||
|
|
d963ca0bce | ||
|
|
ff7521abb3 | ||
|
|
99d7ff2522 | ||
|
|
a774024501 | ||
|
|
d9b7883dde | ||
|
|
d00708f29e | ||
|
|
09dbe9e30b | ||
|
|
c8e10a1504 | ||
|
|
af953bfc42 | ||
|
|
644f943742 | ||
|
|
c66492a560 | ||
|
|
35b27b4cf9 | ||
|
|
69de0a9a88 | ||
|
|
c96c016788 | ||
|
|
e8cd5d9ebd | ||
|
|
8d2880144f | ||
|
|
7234565423 | ||
|
|
3bfd87851a | ||
|
|
b9ccfd5db2 | ||
|
|
dec3f3e9f4 | ||
|
|
4a301c0019 | ||
|
|
bd8cad7a28 | ||
|
|
4628e9b01e | ||
|
|
ee28823eee | ||
|
|
50093870ac | ||
|
|
d0479b8e41 | ||
|
|
028e4ac4ac | ||
|
|
e5173587a6 | ||
|
|
89160f07cb | ||
|
|
d88f19572f | ||
|
|
4716ba4332 | ||
|
|
83664d664b | ||
|
|
27d9ce970e | ||
|
|
00e6ecfdca | ||
|
|
e6894bef41 | ||
|
|
647f47400d | ||
|
|
6ff8657462 | ||
|
|
43fa95836b | ||
|
|
cac8e36b1b | ||
|
|
c7eff75461 | ||
|
|
7625bfe1d1 | ||
|
|
0303cef99b | ||
|
|
30db44f8d9 | ||
|
|
9b04bf4644 | ||
|
|
f13925433e | ||
|
|
611efa860e | ||
|
|
cbc25bc472 | ||
|
|
64266ab682 | ||
|
|
bf32638564 | ||
|
|
1c989f9456 | ||
|
|
816ce03a33 | ||
|
|
24f24fa2c8 | ||
|
|
6de37310f7 | ||
|
|
7be6856d20 | ||
|
|
67ca47ad67 | ||
|
|
8fc071c9ae | ||
|
|
f5d3e6bb77 | ||
|
|
e6a8d860ba | ||
|
|
5e38f61608 | ||
|
|
a49d90cee9 | ||
|
|
3f558f73cd | ||
|
|
9f930d245f | ||
|
|
11e0388374 | ||
|
|
5cce0f327c | ||
|
|
fd23e93905 | ||
|
|
8052cb40a3 | ||
|
|
6b9d770d9a | ||
|
|
3e20ab6af4 | ||
|
|
77e821b1b5 | ||
|
|
9d9c8e087e | ||
|
|
b038dd54b2 | ||
|
|
e5000c7fc1 | ||
|
|
6e17e42224 | ||
|
|
6db91a6419 | ||
|
|
ba664d7a58 | ||
|
|
4d37e7a049 | ||
|
|
94689d261f | ||
|
|
0982ec0149 | ||
|
|
a865a9eded | ||
|
|
8ed0d0c8f8 | ||
|
|
e4dfe2462d | ||
|
|
3c3d34f3da | ||
|
|
25e31e7224 | ||
|
|
8a97758454 | ||
|
|
7987660df7 | ||
|
|
c17d32749e | ||
|
|
76f4abd8df | ||
|
|
aaa1db3849 | ||
|
|
3849cb52b2 | ||
|
|
158944e642 | ||
|
|
3efbc51540 | ||
|
|
26aed5edaf | ||
|
|
5b9f9e328d | ||
|
|
801c353ac5 | ||
|
|
b0486b1cbd | ||
|
|
ae1b66e6c8 | ||
|
|
a28c2ca07a | ||
|
|
75a48d1464 | ||
|
|
c1f5a90b59 | ||
|
|
76fb30131e | ||
|
|
fb737d0259 | ||
|
|
e59c6045ad | ||
|
|
9f089c0d61 | ||
|
|
fc1f40bf90 | ||
|
|
f5ce128519 | ||
|
|
67e7e6c268 | ||
|
|
d59621d7d8 | ||
|
|
f1cc48bbec | ||
|
|
fd75287886 | ||
|
|
703e6213a7 | ||
|
|
944599f7c3 | ||
|
|
a0fcfbc608 | ||
|
|
70c6868cfc | ||
|
|
e875dd8ff7 | ||
|
|
476a48d27b | ||
|
|
553ee6fa18 | ||
|
|
b6808c631a | ||
|
|
1552fb26cc | ||
|
|
301d6d0704 | ||
|
|
977ea13751 | ||
|
|
ca9af6c739 | ||
|
|
4397bc8b70 | ||
|
|
30d1c15022 | ||
|
|
33e426f9a1 | ||
|
|
1925e81be5 | ||
|
|
7f4fa63a5e | ||
|
|
983dbceaf8 | ||
|
|
1918f9d183 | ||
|
|
130913a557 | ||
|
|
65307d4417 | ||
|
|
2462764678 | ||
|
|
e4a0cfa85d | ||
|
|
3890740829 | ||
|
|
2b64f75daa | ||
|
|
d41591e758 | ||
|
|
ae76aa42e3 | ||
|
|
2cdd6c918f | ||
|
|
d31dff5d5b | ||
|
|
e1ee8d3a68 | ||
|
|
727ad8dd5e | ||
|
|
b2b0a411a8 | ||
|
|
a3412bbd3d | ||
|
|
21b29282a2 | ||
|
|
181e1431e4 | ||
|
|
c58fe9a2dc | ||
|
|
ee63ca1ce5 | ||
|
|
4a8fce64a2 | ||
|
|
3bb7ff9838 | ||
|
|
80bacf0c42 | ||
|
|
03b209a101 | ||
|
|
9de8ae84ce | ||
|
|
655224ac2a | ||
|
|
4a5bd8f420 | ||
|
|
990c55ad93 | ||
|
|
87c7eecff7 | ||
|
|
eb908948fe | ||
|
|
ed56dc0d9b | ||
|
|
c9d6495f98 | ||
|
|
14a418c633 | ||
|
|
26c9179ab9 | ||
|
|
044b16f4e9 | ||
|
|
c59a94711c | ||
|
|
12b69d326e | ||
|
|
a92f117fec | ||
|
|
5b9ac69a65 | ||
|
|
654665b7c7 | ||
|
|
f0271955ec | ||
|
|
aa01a02424 | ||
|
|
620432767f | ||
|
|
752069ed74 | ||
|
|
b75d05951a | ||
|
|
104f19466b | ||
|
|
8c557d5e3e | ||
|
|
aff7685365 | ||
|
|
27bd4a1e78 | ||
|
|
0a5d42def7 | ||
|
|
4d3a95a6b6 | ||
|
|
fdc5571f25 | ||
|
|
0e04de001a | ||
|
|
5d42a4c2cc | ||
|
|
0ad9e46784 | ||
|
|
68b192d0dd | ||
|
|
c0a119316e | ||
|
|
ae2eaff13e | ||
|
|
6a5f96bfef | ||
|
|
98bec7469c | ||
|
|
4b4a00eb13 | ||
|
|
51b2586797 | ||
|
|
4e5f9db6ba | ||
|
|
6cfad51303 | ||
|
|
88c3891b7a | ||
|
|
2c606f0f92 | ||
|
|
62bb57925d | ||
|
|
f844eec463 | ||
|
|
0f1f93279b | ||
|
|
a83b0f09cb | ||
|
|
c6c955c542 | ||
|
|
9e1cbaf632 | ||
|
|
ee96242d57 | ||
|
|
db4703c178 | ||
|
|
6b280740cc | ||
|
|
22e8d11155 | ||
|
|
3ab24a1afb | ||
|
|
396e0415e4 | ||
|
|
3ff6d686a4 | ||
|
|
7f42b77318 | ||
|
|
9279ceae42 | ||
|
|
0ed18d6c0c | ||
|
|
f860dce906 | ||
|
|
7645b65271 | ||
|
|
079f7c691f | ||
|
|
00b97dc29c | ||
|
|
08ed359420 | ||
|
|
3090a1d9d9 | ||
|
|
ea72be0702 | ||
|
|
780f64dfed | ||
|
|
4360912968 | ||
|
|
57790ddd15 | ||
|
|
ae62f3fd1a | ||
|
|
a53b62005c | ||
|
|
4f81f15b9f | ||
|
|
caf512f51a | ||
|
|
f301b57542 | ||
|
|
ba11b11f3f | ||
|
|
6750d9b090 | ||
|
|
716a8a8a1a | ||
|
|
45ca822c29 | ||
|
|
5d08e3e8ab | ||
|
|
26753f62d6 | ||
|
|
48956dfd0f | ||
|
|
b7c667f2ff | ||
|
|
54a1813de5 | ||
|
|
402a46171b | ||
|
|
ae4b002f02 | ||
|
|
83817a84c3 | ||
|
|
09390d612a | ||
|
|
311e8a4a28 | ||
|
|
0d0f83ce42 | ||
|
|
12ef0fc101 | ||
|
|
6eb3b349ee | ||
|
|
c5b46a461f | ||
|
|
430896bd6a | ||
|
|
5dd4da2d24 | ||
|
|
f688a75efb | ||
|
|
7bd83db5a4 | ||
|
|
04c524c4b0 | ||
|
|
71584f8abc | ||
|
|
26765111ad | ||
|
|
066d68b563 | ||
|
|
65c0c1fd36 | ||
|
|
ee815d3f29 | ||
|
|
4be6b7a59e | ||
|
|
e4e9c3596e | ||
|
|
a67fb77b6b | ||
|
|
8bbe90f014 | ||
|
|
e13ea31465 | ||
|
|
b2cbddd0a4 | ||
|
|
ba8c210b3e | ||
|
|
bab0a98c67 | ||
|
|
758999db4f | ||
|
|
5346455569 | ||
|
|
8e619d6a10 | ||
|
|
e9e8bfe716 | ||
|
|
e2d554858b | ||
|
|
b9b2307456 | ||
|
|
fdd1a62962 | ||
|
|
e49ad9b365 | ||
|
|
5105c5e94b | ||
|
|
392ca57fdd | ||
|
|
b0d7c39e33 | ||
|
|
bb267dc296 | ||
|
|
1769a89be6 | ||
|
|
54cd01e24f | ||
|
|
7384dd3fbe | ||
|
|
51b221ee43 | ||
|
|
bff1832b2d | ||
|
|
70d7ddbbcc | ||
|
|
b7c5a468dc | ||
|
|
f9652c80ae | ||
|
|
39dbc7be16 | ||
|
|
dd5aac0f53 | ||
|
|
1452bbc1aa | ||
|
|
4a6fbb12f2 | ||
|
|
3cf9054816 | ||
|
|
fc8c13e9e1 | ||
|
|
3cfd9c9ac9 | ||
|
|
49d05ecd64 | ||
|
|
a0e78d4ebe | ||
|
|
da3b378848 | ||
|
|
14f82daac6 | ||
|
|
0c07dfee2c | ||
|
|
cdd3026022 | ||
|
|
f21e0750a8 | ||
|
|
f854c0566e | ||
|
|
b75f2c28f9 | ||
|
|
6393f70acb | ||
|
|
3d5a869794 | ||
|
|
12fc66d651 | ||
|
|
f1ecbef29e | ||
|
|
0c1ed45457 | ||
|
|
bf5806397a | ||
|
|
bf094836d8 | ||
|
|
0b67eee38b | ||
|
|
82bf05a0ce | ||
|
|
ea09d877ca | ||
|
|
aef475bc34 | ||
|
|
a0713d8d9b | ||
|
|
5bae2227b8 | ||
|
|
5703aac7be | ||
|
|
c9b41a4451 | ||
|
|
d78af38fec | ||
|
|
f958e42835 | ||
|
|
5e0fd15720 | ||
|
|
99f1dfad31 | ||
|
|
d33c4d286a | ||
|
|
7f0ddd1987 | ||
|
|
9359e4cbf3 | ||
|
|
72de2dcd21 | ||
|
|
ab8080455c | ||
|
|
f1698e08cc | ||
|
|
b8a7384521 | ||
|
|
d97aad47e3 | ||
|
|
789a98d932 | ||
|
|
c075fbc99c | ||
|
|
eb0740ad73 | ||
|
|
9106c38136 | ||
|
|
5cb9ee6746 | ||
|
|
72b6c2b1c7 | ||
|
|
ffc30dcbea | ||
|
|
0043ae9883 | ||
|
|
477f40256e | ||
|
|
67c27119f8 | ||
|
|
f23649c50d | ||
|
|
2143456bb3 | ||
|
|
473167dcc7 | ||
|
|
9216338892 | ||
|
|
1559585ef1 | ||
|
|
dc0d0c616e | ||
|
|
16afa991d0 | ||
|
|
9ad114ad58 | ||
|
|
b0b60fc2f1 | ||
|
|
6a11e51e2c | ||
|
|
0f884de176 | ||
|
|
2c218fa5d9 | ||
|
|
3c0bfe141d | ||
|
|
58611c4757 | ||
|
|
6ad469c1c4 | ||
|
|
ca911f45cf | ||
|
|
a80f36629b | ||
|
|
133192c659 | ||
|
|
07e85a9e7e | ||
|
|
6c60c46fcd | ||
|
|
438171b5ba | ||
|
|
4a764e3d3b | ||
|
|
0b25d4905e | ||
|
|
2dd2b17df7 | ||
|
|
870eeeb6b2 | ||
|
|
582b8e86e0 | ||
|
|
bab280f93a | ||
|
|
4749ee6c81 | ||
|
|
1a1f354cd7 | ||
|
|
71e4ceb22b | ||
|
|
6f7922d89c | ||
|
|
a16d0942d7 | ||
|
|
fea444e4d2 | ||
|
|
797f8dc9d5 | ||
|
|
20ce139ac1 | ||
|
|
eb46a9a4e2 | ||
|
|
0af17c40df | ||
|
|
b9cec87760 | ||
|
|
98d289f6b6 | ||
|
|
f175ece367 | ||
|
|
a91b462b62 | ||
|
|
5e9e4d273d | ||
|
|
a7071cbe63 | ||
|
|
ceb4bfd63d | ||
|
|
1cb5fbec42 | ||
|
|
6cc0f29734 | ||
|
|
7ec30d5937 | ||
|
|
ae6f93ebf0 | ||
|
|
8fa5aed6e8 | ||
|
|
1d7d57a23c | ||
|
|
ec6bc3a6c1 | ||
|
|
c544156ecf | ||
|
|
14b1c93b79 | ||
|
|
03a5167722 | ||
|
|
d17c16a1c0 | ||
|
|
46139b3cfb | ||
|
|
ba18232742 | ||
|
|
d03cbf630d | ||
|
|
d9c42342a1 | ||
|
|
cfa805f954 | ||
|
|
c55caac80e | ||
|
|
46da0971fe | ||
|
|
c1691f4661 | ||
|
|
41e2d09648 | ||
|
|
d69e5f014e | ||
|
|
630ee40e92 | ||
|
|
637a638f30 | ||
|
|
0b4a289092 | ||
|
|
d6b95af8bb | ||
|
|
80e41ab46e | ||
|
|
f47163fad3 | ||
|
|
4bf5771c23 | ||
|
|
66284f47ac | ||
|
|
43e2ba6ef6 | ||
|
|
6227894ac9 | ||
|
|
fa8ceb1f2c | ||
|
|
2c44d7573c | ||
|
|
35d80b24e3 | ||
|
|
f6bf4da124 | ||
|
|
e22307c48b | ||
|
|
9ca318cc03 | ||
|
|
254249b29a | ||
|
|
288238a6ea | ||
|
|
5286bb7e27 | ||
|
|
94941d2212 | ||
|
|
257b878d90 | ||
|
|
0e6e45afa2 | ||
|
|
68c0fa52a2 | ||
|
|
ff48318555 | ||
|
|
daa5c348d6 | ||
|
|
b234e8652a | ||
|
|
2018d9e2ee | ||
|
|
b8d4e46167 | ||
|
|
f581e9ca08 | ||
|
|
0966931ed7 | ||
|
|
dd4831ce37 | ||
|
|
db7cdaaaa4 | ||
|
|
721869072d | ||
|
|
83bbbdd08c | ||
|
|
b44c1e14db | ||
|
|
18d41844f1 | ||
|
|
ea00844dfb | ||
|
|
59c37b6b21 | ||
|
|
f42bf1bcfa | ||
|
|
6718095b09 | ||
|
|
b41fb4250f | ||
|
|
7e165c9059 | ||
|
|
d4fff052ce | ||
|
|
22c4356832 | ||
|
|
6f69fa17e5 | ||
|
|
a23087343b | ||
|
|
ba2ccfa167 | ||
|
|
71c5289b0f | ||
|
|
1893ec6a38 | ||
|
|
e2f8a38f47 | ||
|
|
e16db41ba6 | ||
|
|
13babeb0d3 | ||
|
|
c424f2da59 | ||
|
|
cac34d519a | ||
|
|
b47d1816eb | ||
|
|
8fbe82ee26 | ||
|
|
dd23f3b0d6 | ||
|
|
3365152cb0 | ||
|
|
4b3769bc7c | ||
|
|
cf2b29bfe0 | ||
|
|
98e994340a | ||
|
|
f4a0465b69 | ||
|
|
1908c08641 | ||
|
|
31d7822815 | ||
|
|
9b5225b600 | ||
|
|
f13f1b26e4 | ||
|
|
967578d96c | ||
|
|
421dcdf3a9 | ||
|
|
87a5e8a7a4 | ||
|
|
a2a3fc55fd | ||
|
|
02f25bd59b | ||
|
|
c7b0194ac3 | ||
|
|
885ba00117 | ||
|
|
3cfcebc885 | ||
|
|
2047317f3b | ||
|
|
ac7c207f14 | ||
|
|
a18be620a1 | ||
|
|
177f9d5cd4 | ||
|
|
afc1d235b7 | ||
|
|
c293f9bc63 | ||
|
|
24ea71e942 | ||
|
|
79df061031 | ||
|
|
375676b1b6 | ||
|
|
94f1773041 | ||
|
|
77055d99e4 | ||
|
|
fb63ae13d0 | ||
|
|
44a09a3306 | ||
|
|
579749498e | ||
|
|
52cff2eeb6 | ||
|
|
94f8647f1c | ||
|
|
88f4537c77 | ||
|
|
32fff90d82 | ||
|
|
00aec83a30 | ||
|
|
ff046934fd | ||
|
|
31f43cffe0 | ||
|
|
4c2d948abe | ||
|
|
c5cb336b87 | ||
|
|
8d7899fbb6 | ||
|
|
bca9fd93a8 | ||
|
|
9f3168cf9a | ||
|
|
24a09ef771 | ||
|
|
f0427c13e4 | ||
|
|
347415b76e | ||
|
|
ff407b13b9 | ||
|
|
265ede2a16 | ||
|
|
1bdf7624dc | ||
|
|
95a5089d2f | ||
|
|
760f9f4cd0 | ||
|
|
3a1db3bf88 | ||
|
|
0b7f4318c0 | ||
|
|
3316c605ba | ||
|
|
aa8ecd3c01 | ||
|
|
d35ffac1c7 | ||
|
|
b1f911a801 | ||
|
|
5b2cfa7797 | ||
|
|
3967ae2f20 | ||
|
|
3a7c62f09a | ||
|
|
571286fe50 | ||
|
|
28b5b97f16 | ||
|
|
4db14580ca | ||
|
|
379091f89d | ||
|
|
a6a5f54f28 | ||
|
|
a06faff6c1 | ||
|
|
e3d3d6c990 | ||
|
|
00926c6660 | ||
|
|
2f54e18d8b | ||
|
|
eb3b8b2ea7 | ||
|
|
731640fc24 | ||
|
|
1f574fe0be | ||
|
|
1b4d62a18d | ||
|
|
ce328bf180 | ||
|
|
58f6951944 | ||
|
|
450867ffea | ||
|
|
992b2c400b | ||
|
|
6145c5ea69 | ||
|
|
e3f24cf1bf | ||
|
|
1217a671f4 | ||
|
|
8814d1a72e | ||
|
|
d730f1d27c | ||
|
|
2e12a92961 | ||
|
|
4f72518358 | ||
|
|
655fe31070 | ||
|
|
9652be3de8 |
@@ -0,0 +1,74 @@
|
||||
List of known bugs (certainly very incomplete)
|
||||
----------------------------------------------
|
||||
|
||||
Time-stamp: <1997-12-28T12:54:55+0100 drepper>
|
||||
|
||||
This following list contains those bugs which I'm aware of. Please
|
||||
make sure that bugs you report are not listed here. If you can fix one
|
||||
of these bugs/limitations I'll certainly be glad to receive a patch.
|
||||
|
||||
Another source of information about bugs is the problem data base of the
|
||||
GNU project. There is an easy to use WWW interface available at
|
||||
|
||||
http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl
|
||||
|
||||
I would appreciate it very much if you could verify the problem was not
|
||||
reported before by looking through the database. To make the information
|
||||
in this database as useful as possible please report bugs always using the
|
||||
`glibcbug' shell script which gets installed with GNU libc.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Severity: [ *] to [***]
|
||||
|
||||
|
||||
[ **] There are problems with signal handling when using LinuxThreads.
|
||||
|
||||
[ **] The libm-ieee `log2' function seems to be very inaccurate.
|
||||
|
||||
[ *] The libm-ieee `asin' function gives wrong results (at least for 0.5).
|
||||
|
||||
[ *] The precision of the `sinhl' and/or `asinhl' function do not seem
|
||||
to be the best.
|
||||
|
||||
[ *] The syslog function should print to the console if the LOG_CONS
|
||||
flag was given.
|
||||
[PR libc/72]
|
||||
|
||||
[ *] On Linux, there should be a way to prevent defining the symbol
|
||||
NGROUPS_MAX in the <linux/limits.h> header file. In glibc it
|
||||
is defined in <posix1_lim.h> which must not make the other
|
||||
symbols in <linux/limits.h> available.
|
||||
[PR libc/140]
|
||||
|
||||
[ *] When assembling a locale definition, that uses the "copy"
|
||||
directive, with localedef, not only the copied category is
|
||||
checked for errors, but the whole file containing the same
|
||||
category.
|
||||
[PR libc/207]
|
||||
|
||||
[ *] The localedef program should not generate errors if for categories
|
||||
which are not used for the output there are characters referenced
|
||||
which are not defined in the charmap.
|
||||
[PR libc/229]
|
||||
|
||||
[ *] _IO_getline can loop forever, at least with C++
|
||||
[PR libc/332]
|
||||
|
||||
[ *] The rcmd() functions (more concrete: the handling of .rhosts) does
|
||||
not support netgroups and wildcards (+).
|
||||
|
||||
[ **] When popen() was called with an illegal command the function still
|
||||
returns with a value not equal to NULL.
|
||||
|
||||
[ *] setlocale() leaks memory. This becomes only a problem if a program
|
||||
calls this function very often which normally is not the case. The
|
||||
problem is fixed for glibc 2.1.
|
||||
|
||||
[ *] Using the NSS modules from statically linked programs sometimes
|
||||
fails (for very large entries). The problem is fixed in glibc 2.1.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Ulrich Drepper
|
||||
drepper@cygnus.com
|
||||
@@ -157,20 +157,32 @@ build the GNU C library:
|
||||
recommend you port GNU `make' instead. *Really.* We recommend
|
||||
version GNU `make' version 3.75 or later.
|
||||
|
||||
* GCC 2.7.2.1
|
||||
* GCC 2.7.2.3
|
||||
|
||||
On most platforms, the GNU C library can only be compiled with the
|
||||
GNU C compiler. We recommend GCC version 2.7.2 or later; earlier
|
||||
versions may have problems.
|
||||
|
||||
* `binutils' 2.7
|
||||
* `binutils' 2.8.1
|
||||
|
||||
Using the GNU `binutils' (assembler, linker, and related tools) is
|
||||
preferable when possible, and they are required to build an ELF
|
||||
shared C library. We recommend `binutils' version 2.7 or later;
|
||||
shared C library. We recommend `binutils' version 2.8 or later;
|
||||
earlier versions are known to have problems or to not support all
|
||||
architectures.
|
||||
|
||||
If you change any configuration file you will need also
|
||||
|
||||
* `autoconf' 2.12
|
||||
|
||||
and if you change any of the message translation files you will also need
|
||||
|
||||
* `GNU gettext' 0.10 or later
|
||||
|
||||
If you upgrade your source tree using the patches made available you probably
|
||||
will need those package above in any case.
|
||||
|
||||
|
||||
Supported Configurations
|
||||
------------------------
|
||||
|
||||
@@ -183,8 +195,8 @@ following patterns:
|
||||
iX86-ANYTHING-linux
|
||||
m68k-ANYTHING-linux
|
||||
|
||||
Former versions of this library used to support the following
|
||||
configurations but the current status is unknown:
|
||||
Former releases of this library (version 1.09.1 and perhaps earlier
|
||||
versions) used to run on the following configurations:
|
||||
|
||||
alpha-dec-osf1
|
||||
iX86-ANYTHING-bsd4.3
|
||||
@@ -208,7 +220,13 @@ configurations but the current status is unknown:
|
||||
sparc-sun-solaris2.N
|
||||
sparc-sun-sunos4.N
|
||||
|
||||
Each case of `iX86' can be `i386', `i486', `i586', or `i686'.. All
|
||||
Since no one has volunteered to test and fix the above
|
||||
configurations, these are not supported at the moment. It's expected
|
||||
that these don't work anymore. Porting the library is not hard. If
|
||||
you are interested in doing a port, please contact the glibc
|
||||
maintainers by sending electronic mail to <bug-glibc@prep.ai.mit.edu>.
|
||||
|
||||
Each case of `iX86' can be `i386', `i486', `i586', or `i686'. All
|
||||
of those configurations produce a library that can run on any of these
|
||||
processors. The library will be optimized for the specified processor,
|
||||
but will not use instructions not available on all of them.
|
||||
@@ -258,11 +276,11 @@ and `config.make' which are created by running `configure'; they will
|
||||
be in whatever directory was current when you ran `configure'.
|
||||
|
||||
If you think you have found some way in which the GNU C library does
|
||||
not conform to the ANSI and POSIX standards (*note Standards and
|
||||
not conform to the ISO and POSIX standards (*note Standards and
|
||||
Portability::.), that is definitely a bug. Report it!
|
||||
|
||||
Send bug reports to the Internet address `bug-glibc@prep.ai.mit.edu'
|
||||
or the UUCP path `mit-eddie!prep.ai.mit.edu!bug-glibc'. If you have
|
||||
Send bug reports to the Internet address <bug-glibc@prep.ai.mit.edu>
|
||||
or the UUCP path <mit-eddie!prep.ai.mit.edu!bug-glibc>. If you have
|
||||
other problems with installation or use, please report those as well.
|
||||
|
||||
If you are not sure how a function should behave, and this manual
|
||||
@@ -270,8 +288,8 @@ doesn't tell you, that's a bug in the manual. Report that too! If the
|
||||
function's behavior disagrees with the manual, then either the library
|
||||
or the manual has a bug, so report the disagreement. If you find any
|
||||
errors or omissions in this manual, please report them to the Internet
|
||||
address `bug-glibc-manual@prep.ai.mit.edu' or the UUCP path
|
||||
`mit-eddie!prep.ai.mit.edu!bug-glibc-manual'.
|
||||
address <bug-glibc-manual@prep.ai.mit.edu> or the UUCP path
|
||||
<mit-eddie!prep.ai.mit.edu!bug-glibc-manual>.
|
||||
|
||||
Adding New Functions
|
||||
====================
|
||||
@@ -773,10 +791,9 @@ parts of the library were contributed or worked on by other people.
|
||||
platforms was written by Per Bothner and modified by Ulrich
|
||||
Drepper.
|
||||
|
||||
* Some of the Internet-related code (most of the `inet'
|
||||
subdirectory) and several other miscellaneous functions and
|
||||
header files have been included from 4.4 BSD with little or no
|
||||
modification.
|
||||
* The Internet-related code (most of the `inet' subdirectory) and
|
||||
several other miscellaneous functions and header files have been
|
||||
included from 4.4 BSD with little or no modification.
|
||||
|
||||
All code incorporated from 4.4 BSD is under the following
|
||||
copyright:
|
||||
@@ -827,7 +844,7 @@ parts of the library were contributed or worked on by other people.
|
||||
`rand' and `srand' functions, were written by Earl T. Cohen for
|
||||
the University of California at Berkeley and are copyrighted by the
|
||||
Regents of the University of California. They have undergone minor
|
||||
changes to fit into the GNU C library and to fit the ANSI C
|
||||
changes to fit into the GNU C library and to fit the ISO C
|
||||
standard, but the functional code is Berkeley's.
|
||||
|
||||
* The Internet resolver code is taken directly from BIND 4.9.5,
|
||||
@@ -914,59 +931,6 @@ parts of the library were contributed or worked on by other people.
|
||||
Carnegie Mellon University
|
||||
Pittsburgh PA 15213-3890
|
||||
|
||||
or `Software.Distribution@CS.CMU.EDU' any improvements or
|
||||
or <Software.Distribution@CS.CMU.EDU> any improvements or
|
||||
extensions that they make and grant Carnegie Mellon the
|
||||
rights to redistribute these changes.
|
||||
|
||||
* The `getaddrinfo' function is written by Craig Metz and it has the
|
||||
following copyright:
|
||||
|
||||
The Inner Net License, Version 2.00
|
||||
===================================
|
||||
|
||||
The author(s) grant permission for redistribution and use in source and
|
||||
binary forms, with or without modification, of the software
|
||||
and documentation provided that the following conditions are met:
|
||||
|
||||
0. If you receive a version of the software that is
|
||||
specifically labelled as not being for redistribution
|
||||
(check the version message and/or README), you are not
|
||||
permitted to redistribute that version of the software in
|
||||
any way or form.
|
||||
1. All terms of the all other applicable copyrights and
|
||||
licenses must be followed.
|
||||
2. Redistributions of source code must retain the authors'
|
||||
copyright notice(s), this list of conditions, and the
|
||||
following disclaimer.
|
||||
3. Redistributions in binary form must reproduce the authors'
|
||||
copyright notice(s), this list of conditions, and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
4. All advertising materials mentioning features or use of
|
||||
this software must display the following acknowledgement
|
||||
with the name(s) of the authors as specified in the
|
||||
copyright notice(s) substituted where indicated:
|
||||
|
||||
This product includes software developed by <name(s)>, The Inner
|
||||
Net, and other contributors.
|
||||
|
||||
5. Neither the name(s) of the author(s) nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS
|
||||
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGE.
|
||||
|
||||
If these license terms cause you a real problem, contact the author.
|
||||
|
||||
@@ -118,8 +118,8 @@ foo:=$(shell echo '+out=$(+out)' >&2; echo foofoo >&2)
|
||||
$(+sysdeps)
|
||||
foo:=$(shell echo 'made +tsrcs=$(+tsrcs)'>&2)
|
||||
foo:=$(shell echo generated='$(generated)' >&2)
|
||||
generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))
|
||||
foo:=$(shell echo now generated='$(generated)' >&2)
|
||||
#generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))
|
||||
#foo:=$(shell echo now generated='$(generated)' >&2)
|
||||
+tsrcs := $(sort $(filter-out $(generated),$(+tsrcs)))
|
||||
foo:=$(shell echo '+tsrcs=$(+tsrcs)'>&2)
|
||||
foo:=$(shell echo foobie, dammit! >&2)
|
||||
@@ -142,10 +142,10 @@ ifdef subdir
|
||||
|
||||
foo:=$(shell echo subdir foo >&2)
|
||||
|
||||
+tsrcs := Makefile $(+tsrcs) \
|
||||
$(addsuffix .c,$(others) $(tests)) \
|
||||
$(wildcard $(addsuffix .input,$(tests)) \
|
||||
$(addsuffix .args,$(tests)))
|
||||
+tsrcs := Makefile $(+tsrcs) \
|
||||
$(addsuffix .c,$(others) $(tests) $(test-srcs)) \
|
||||
$(wildcard $(addsuffix .input,$(tests) $(test-srcs)) \
|
||||
$(addsuffix .args,$(tests) $(test-srcs)))
|
||||
+tardeps := $(strip $(+tsrcs))
|
||||
|
||||
verbose = v
|
||||
@@ -195,9 +195,9 @@ dist.tar: README $(tardir) $(+tsrcs)
|
||||
|
||||
$(tardir).tar: dist.tar subdir_dist
|
||||
@echo Files listed here have names exceeding 14 chars.
|
||||
tar xfv $< -C /tmp | sed -n '/[^/]\{15,\}/p'
|
||||
tar covf $@ -C /tmp $(tardir)
|
||||
-rm -fr /tmp/$(tardir) dist.tar &
|
||||
tar xfv $< -C $${TMPDIR-/tmp} | sed -n '/[^/]\{15,\}/p'
|
||||
tar covf $@ -C $${TMPDIR-/tmp} $(tardir)
|
||||
-rm -fr $${TMPDIR-/tmp}/$(tardir) dist.tar &
|
||||
|
||||
%.Z: %
|
||||
compress -c $< > $@
|
||||
|
||||
@@ -88,7 +88,7 @@ sources += $(foreach lib,$(extra-libs),$($(lib)-routines:=.c))
|
||||
# sysdep directories, so don't bother searching them.
|
||||
sysdep-sources := $(filter-out $(wildcard $(sources)), $(sources))
|
||||
all-sources = $(wildcard $(sort $(sources) $(sources:.c=.S) $(sources:.c=.s) \
|
||||
$(others:=.c) $(tests:=.c))) \
|
||||
$(others:=.c) $(tests:=.c) $(test-srcs:=.c))) \
|
||||
$(foreach dir,$(all-dirs),\
|
||||
$(wildcard \
|
||||
$(addprefix $(dir)/,\
|
||||
|
||||
+8
-9
@@ -23,6 +23,8 @@ ifneq (,)
|
||||
This makefile requires GNU Make.
|
||||
endif
|
||||
|
||||
all: # Make this the default goal
|
||||
|
||||
ifneq "$(origin +included-Makeconfig)" "file"
|
||||
|
||||
+included-Makeconfig := yes
|
||||
@@ -239,7 +241,8 @@ endif
|
||||
# other than there, so the zoneinfo directory contains only universal data,
|
||||
# localizing the configuration data elsewhere.
|
||||
ifndef localtime-file
|
||||
localtime-file = $(inst_sysconfdir)/localtime
|
||||
localtime-file = $(sysconfdir)/localtime
|
||||
inst_localtime-file = $(install_root)$(localtime-file)
|
||||
endif
|
||||
|
||||
# What to use for leap second specifications in compiling the default
|
||||
@@ -319,10 +322,10 @@ endif
|
||||
ifndef +link
|
||||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+prector) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
|
||||
$(link-extra-libs) $(link-libc) $(+postinit)
|
||||
$(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
|
||||
endif
|
||||
ifndef config-LDFLAGS
|
||||
ifeq (yes,$(build-shared))
|
||||
@@ -366,6 +369,8 @@ endif
|
||||
ifeq ($(elf),yes)
|
||||
+preinit = $(addprefix $(csu-objpfx),crti.o)
|
||||
+postinit = $(addprefix $(csu-objpfx),crtn.o)
|
||||
+prector = `$(CC) --print-file-name=crtbegin.o`
|
||||
+postctor = `$(CC) --print-file-name=crtend.o`
|
||||
endif
|
||||
csu-objpfx = $(common-objpfx)csu/
|
||||
elf-objpfx = $(common-objpfx)elf/
|
||||
@@ -516,12 +521,6 @@ endif
|
||||
ifndef BUILD_CC
|
||||
BUILD_CC = $(CC)
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD_CC),$(CC))
|
||||
cross-compiling := yes
|
||||
else
|
||||
cross-compiling := no
|
||||
endif
|
||||
|
||||
# Figure out the version numbers from version.h.
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ parent_echo-distinfo:
|
||||
|
||||
# Make the distribution tarfile.
|
||||
|
||||
distribute := README INSTALL FAQ NOTES NEWS PROJECTS \
|
||||
distribute := README INSTALL FAQ NOTES NEWS PROJECTS BUGS \
|
||||
COPYING.LIB COPYING ChangeLog ChangeLog.[0-9] \
|
||||
Makefile Makeconfig Makerules Rules Make-dist MakeTAGS \
|
||||
extra-lib.mk o-iterator.mk \
|
||||
@@ -303,6 +303,9 @@ makeinfo --no-validate --no-warn --no-headers $< -o $@
|
||||
endef
|
||||
INSTALL: manual/maint.texi; $(format-me)
|
||||
NOTES: manual/creature.texi; $(format-me)
|
||||
manual/dir-add.texi manual/dir-add.info: FORCE
|
||||
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
|
||||
FORCE:
|
||||
|
||||
rpm/%: subdir_distinfo
|
||||
$(MAKE) $(PARALLELMFLAGS) -C $(@D) subdirs='$(subdirs)' $(@F)
|
||||
|
||||
@@ -278,9 +278,9 @@ endif
|
||||
|
||||
# GCC can grok options after the file name, and it looks nicer that way.
|
||||
compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
|
||||
compile.S = $(CC) $< -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS)
|
||||
COMPILE.S = $(CC) -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS)
|
||||
COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
|
||||
compile.S = $(CC) $< -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
|
||||
COMPILE.S = $(CC) -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
|
||||
COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS) $(ASFLAGS-$(suffix $@))
|
||||
|
||||
# We need this for the output to go in the right place. It will default to
|
||||
# empty if make was configured to work with a cc that can't grok -c and -o
|
||||
@@ -339,6 +339,8 @@ $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
|
||||
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
|
||||
-Wl,--whole-archive $^ $(no-whole-archive) \
|
||||
$(LDLIBS-$(@F:lib%.so=%).so)
|
||||
test -z "$($(@F)-version)" || \
|
||||
(rm -f $@$($(@F)-version); $(LN_S) $(@F) $@$($(@F)-version))
|
||||
endef
|
||||
|
||||
# Don't try to use -lc when making libc.so itself.
|
||||
@@ -354,12 +356,6 @@ $(common-objpfx)libc.so: $(elfobjdir)/soinit.so \
|
||||
$(common-objpfx)libc_pic.a \
|
||||
$(elfobjdir)/sofini.so $(elfobjdir)/ld.so
|
||||
$(build-shlib)
|
||||
|
||||
ifdef libc.so-version
|
||||
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
|
||||
rm -f $@
|
||||
ln -s $(<F) $@ || ln $< $@
|
||||
endif
|
||||
endif
|
||||
|
||||
# Some files must not be compiled with the exception handler mechanism
|
||||
@@ -811,7 +807,7 @@ $(BUILD_CC) $(BUILD_CFLAGS) $(<:$(common-objpfx)%=$(..)%) -o $(..)$(@F)
|
||||
endef
|
||||
|
||||
# We always want to use configuration definitions.
|
||||
BUILD_CFLAGS = -include $(common-objpfx)config.h
|
||||
BUILD_CFLAGS = -include $(..)config.h
|
||||
|
||||
# Support the GNU standard name for this target.
|
||||
.PHONY: check
|
||||
@@ -839,9 +835,10 @@ mostlyclean: common-mostlyclean
|
||||
|
||||
# Remove the object files.
|
||||
common-mostlyclean:
|
||||
-rm -f $(addprefix $(objpfx),$(tests) $(others) \
|
||||
$(addsuffix .o,$(tests) $(others)) \
|
||||
$(addsuffix .out,$(tests)))
|
||||
-rm -f $(addprefix $(objpfx),$(tests) $(test-srcs) $(others) \
|
||||
$(addsuffix .o,$(tests) $(test-srcs) \
|
||||
$(others)) \
|
||||
$(addsuffix .out,$(tests) $(test-srcs)))
|
||||
-rm -f $(addprefix $(objpfx),$(extra-objs) $(install-lib))
|
||||
-rm -f core $(common-objpfx)stub-$(subdir)
|
||||
$(rmobjs)
|
||||
|
||||
@@ -1,12 +1,36 @@
|
||||
GNU C Library NEWS -- history of user-visible changes. 26 January 1997
|
||||
GNU C Library NEWS -- history of user-visible changes. 1997-11-15
|
||||
|
||||
Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
See the end for copying conditions.
|
||||
|
||||
Please send GNU C library bug reports using the `glibcbug' script to
|
||||
<bugs@gnu.ai.mit.edu>. Questions and suggestions should be send to
|
||||
<bugs@gnu.org>. Questions and suggestions should be send to
|
||||
<bug-glibc@prep.ai.mit.edu>.
|
||||
|
||||
Version 2.0.6
|
||||
|
||||
* more bug fixes
|
||||
|
||||
Version 2.0.5
|
||||
|
||||
* more bug fixes
|
||||
|
||||
* inet_ntoa is thread-safe
|
||||
|
||||
* updwtmp is moved from libutil to libc
|
||||
|
||||
* rewrite of cbrt function
|
||||
|
||||
* update of timezone data
|
||||
|
||||
Version 2.0.4
|
||||
|
||||
* more bug fixes
|
||||
|
||||
Version 2.0.3
|
||||
|
||||
* more bug fixes
|
||||
|
||||
Version 2.0.2
|
||||
|
||||
* more bug fixes
|
||||
@@ -14,6 +38,8 @@ Version 2.0.2
|
||||
* add atoll function
|
||||
|
||||
* fix complex problems in Berkeley DB code
|
||||
|
||||
* fix math functions
|
||||
|
||||
Version 2.0.1
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Open jobs for finishing GNU libc:
|
||||
---------------------------------
|
||||
Status: January 1997
|
||||
Status: August 1997
|
||||
|
||||
If you have time and talent to take over any of the jobs below please
|
||||
contact <bug-glibc@prep.ai.mit.edu>
|
||||
@@ -19,7 +19,16 @@ contact <bug-glibc@prep.ai.mit.edu>
|
||||
standards if they do not contradict each other.
|
||||
|
||||
|
||||
[ 3] Write translations for the GNU libc message for the so far
|
||||
[ 3] The IMHO opinion most important task is to write a more complete
|
||||
test suite. We cannot get too many people working on this. It is
|
||||
not difficult to write a test, find a definition of the function
|
||||
which I normally can provide, if necessary, and start writing tests
|
||||
to test for compliance. Beside this, take a look at the sources
|
||||
and write tests which in total test as many paths of execution as
|
||||
possible.
|
||||
|
||||
|
||||
[ 4] Write translations for the GNU libc message for the so far
|
||||
unsupported languages. GNU libc is fully internationalized and
|
||||
users can immediately benefit from this.
|
||||
|
||||
@@ -28,15 +37,7 @@ contact <bug-glibc@prep.ai.mit.edu>
|
||||
for the current status (of course better use a mirror of prep).
|
||||
|
||||
|
||||
[ 4] Write wordexp() function; this is described in POSIX.2, the
|
||||
header <wordexp.h> already exists.
|
||||
|
||||
Implementation idea: use some functions from bash.
|
||||
|
||||
**** Somebody is working on this. Help may or may not be appreciated.
|
||||
|
||||
|
||||
[ 5] Write `long double' versions of the math functions. This should be
|
||||
[ 6] Write `long double' versions of the math functions. This should be
|
||||
done in collaboration with the NetBSD and FreeBSD people.
|
||||
|
||||
The libm is in fact fdlibm (not the same as in Linux libc).
|
||||
@@ -45,7 +46,18 @@ contact <bug-glibc@prep.ai.mit.edu>
|
||||
the rest.
|
||||
|
||||
|
||||
[ 6] If you enjoy assembler programming (as I do --drepper :-) you might
|
||||
[ 7] Several math functions have to be written:
|
||||
|
||||
- exp2
|
||||
|
||||
each with float, double, and long double arguments.
|
||||
|
||||
Beside this most of the complex math functions which are new in
|
||||
ISO C 9X should be improved. Writing some of them in assembler is
|
||||
useful to exploit the parallelism which often is available.
|
||||
|
||||
|
||||
[ 8] If you enjoy assembler programming (as I do --drepper :-) you might
|
||||
be interested in writing optimized versions for some functions.
|
||||
Especially the string handling functions can be optimized a lot.
|
||||
|
||||
@@ -60,42 +72,38 @@ contact <bug-glibc@prep.ai.mit.edu>
|
||||
work.
|
||||
|
||||
|
||||
[ 7] Write nftw() function. Perhaps it might be good to reimplement the
|
||||
ftw() function as well to share most of the code.
|
||||
|
||||
**** Almost done!
|
||||
|
||||
|
||||
[ 8] Write AVL-tree based tsearch() et.al. functions. Currently only
|
||||
a very simple algorithm is used.
|
||||
There is a public domain version but using this would cause problems
|
||||
with the assignment.
|
||||
|
||||
|
||||
[ 9] Extend regex and/or rx to work with wide characters and complete
|
||||
[10] Extend regex and/or rx to work with wide characters and complete
|
||||
implementation of character class and collation class handling.
|
||||
|
||||
It is planed to do a complete rewrite.
|
||||
|
||||
|
||||
[10] Write access function for netmasks, bootparams, and automount
|
||||
[11] Write access function for netmasks, bootparams, and automount
|
||||
databases for nss_files and nss_db module.
|
||||
The functions should be embedded in the nss scheme. This is not
|
||||
hard and not all services must be supported at once.
|
||||
|
||||
|
||||
[11] Rewrite utmp/wtmp functions to use database functions. This is much
|
||||
better than the normal flat file format.
|
||||
|
||||
**** There are plans for a new approach to this problem. Please contact
|
||||
bug-glibc@prep.ai.mit.edu before starting to work.)
|
||||
|
||||
|
||||
[12] Several more or less small functions have to be written:
|
||||
[13] Several more or less small functions have to be written:
|
||||
|
||||
+ tcgetid() and waitid() from XPG4.2
|
||||
+ grantpt(), ptsname(), unlockpt() from XPG4.2
|
||||
+ getdate() from XPG4.2
|
||||
+ fmtmsg() from SVID
|
||||
|
||||
More information are available on request.
|
||||
More information is available on request.
|
||||
|
||||
|
||||
[14] We need to write a library for on-the-fly transformation of streams
|
||||
of text. In fact, this would be a recode-library (you know, GNU recode).
|
||||
This is needed in several places in the GNU libc and I already have
|
||||
rather concrete plans but so far no possibility to start this.
|
||||
|
||||
|
||||
[15] Cleaning up the header files. Ideally, each header style should
|
||||
follow the "good examples". Each variable and function should have
|
||||
a short description of the function and its parameters. The prototypes
|
||||
should always contain variable names which can help to identify their
|
||||
meaning; better than
|
||||
|
||||
int foo __P ((int, int, int, int));
|
||||
|
||||
Blargh!
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
This directory contains the version 2.0.1 test release of the GNU C Library.
|
||||
This directory contains the version 2.0.6 test release of the GNU C Library.
|
||||
Many bugs have been fixed since the last release.
|
||||
Some bugs surely remain.
|
||||
|
||||
As of this release, the GNU C library is known to run on the following
|
||||
configurations:
|
||||
|
||||
*-*-gnu GNU Hurd
|
||||
i[3456]86-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux-gnu Linux-2.0 on Intel
|
||||
m68k-*-linux-gnu Linux-2.0 on Motorola 680x0
|
||||
alpha-*-linux-gnu Linux-2.0 on DEC Alpha
|
||||
@@ -36,17 +36,18 @@ versions) used to run on the following configurations:
|
||||
sparc-sun-solaris2
|
||||
sparc-sun-sunos4
|
||||
|
||||
Whether this is still true for this release is unknown. Porting the
|
||||
library is not hard. If you are interested in doing a port, please
|
||||
get on the mailing list by sending electronic mail to
|
||||
<bug-glibc-request@prep.ai.mit.edu>.
|
||||
Since no one has volunteered to test and fix the above configurations,
|
||||
these are not supported at the moment. It's expected that these don't
|
||||
work anymore. Porting the library is not hard. If you are interested
|
||||
in doing a port, please contact the glibc maintainers by sending
|
||||
electronic mail to <bug-glibc@prep.ai.mit.edu>.
|
||||
|
||||
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
|
||||
provides the Unix `crypt' function, plus some other entry points.
|
||||
Because of the United States export restriction on DES implementations,
|
||||
we are distributing this code separately from the rest of the C
|
||||
library. There is an extra distribution tar file just for crypt; it is
|
||||
called `glibc-crypt-2.0.1.tar.gz'. You can just unpack the crypt
|
||||
called `glibc-crypt-2.0.6.tar.gz'. You can just unpack the crypt
|
||||
distribution along with the rest of the C library and build; you can
|
||||
also build the library without getting crypt. Users outside the USA
|
||||
can get the crypt distribution via anonymous FTP from ftp.ifi.uio.no
|
||||
|
||||
+8
-7
@@ -5,7 +5,7 @@ Some bugs surely remain.
|
||||
As of this release, the GNU C library is known to run on the following
|
||||
configurations:
|
||||
|
||||
*-*-gnu GNU Hurd
|
||||
i[3456]86-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux-gnu Linux-2.0 on Intel
|
||||
m68k-*-linux-gnu Linux-2.0 on Motorola 680x0
|
||||
alpha-*-linux-gnu Linux-2.0 on DEC Alpha
|
||||
@@ -36,10 +36,11 @@ versions) used to run on the following configurations:
|
||||
sparc-sun-solaris2
|
||||
sparc-sun-sunos4
|
||||
|
||||
Whether this is still true for this release is unknown. Porting the
|
||||
library is not hard. If you are interested in doing a port, please
|
||||
get on the mailing list by sending electronic mail to
|
||||
<bug-glibc-request@prep.ai.mit.edu>.
|
||||
Since no one has volunteered to test and fix the above configurations,
|
||||
these are not supported at the moment. It's expected that these don't
|
||||
work anymore. Porting the library is not hard. If you are interested
|
||||
in doing a port, please contact the glibc maintainers by sending
|
||||
electronic mail to <bug-glibc@gnu.org>.
|
||||
|
||||
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
|
||||
provides the Unix `crypt' function, plus some other entry points.
|
||||
@@ -79,9 +80,9 @@ in the GNU C library, explaining how you can tell the library what
|
||||
facilities you want it to make available.
|
||||
|
||||
We prefer to get bug reports sent using the `glibcbug' shell script which
|
||||
is install together with the rest of the GNU libc to <bugs@gnu.ai.mit.edu>.
|
||||
is install together with the rest of the GNU libc to <bugs@gnu.org>.
|
||||
Simply run this shell script and fill in the information. Nevertheless
|
||||
you can still send bug reports to <bug-glibc@prep.ai.mit.edu> as normal
|
||||
you can still send bug reports to <bug-glibc@gnu.org> as normal
|
||||
electronic mails.
|
||||
|
||||
The GNU C Library is free software. See the file COPYING.LIB for copying
|
||||
|
||||
@@ -83,19 +83,19 @@ common-generated := $(common-generated) dummy.o dummy.c empty.c empty.o
|
||||
.PHONY: others tests
|
||||
others: $(addprefix $(objpfx),$(others) $(extra-objs))
|
||||
ifeq ($(cross-compiling),yes)
|
||||
tests: $(addprefix $(objpfx),$(tests))
|
||||
tests: $(addprefix $(objpfx),$(tests) $(test-srcs))
|
||||
else
|
||||
tests: $(tests:%=$(objpfx)%.out)
|
||||
tests: $(tests:%=$(objpfx)%.out) $(addprefix $(objpfx),$(test-srcs))
|
||||
endif
|
||||
|
||||
ifneq "$(strip $(others) $(tests))" ""
|
||||
$(addprefix $(objpfx),$(others) $(tests)): %: %.o \
|
||||
ifneq "$(strip $(others) $(tests) $(test-srcs))" ""
|
||||
$(addprefix $(objpfx),$(others) $(tests) $(test-srcs)): %: %.o \
|
||||
$(sort $(filter $(common-objpfx)libc%,$(link-libc))) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
|
||||
$(+link)
|
||||
endif
|
||||
|
||||
ifneq "$(strip $(tests))" ""
|
||||
ifneq "$(strip $(tests) $(test-srcs))" ""
|
||||
# These are the implicit rules for making test outputs
|
||||
# from the test programs and whatever input files are present.
|
||||
$(objpfx)%.out: %.args $(objpfx)% %.input
|
||||
|
||||
Vendored
+59
@@ -31,3 +31,62 @@ changequote([,])dnl
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
|
||||
dnl
|
||||
|
||||
dnl These modifications are to allow for an empty cross compiler tree.
|
||||
dnl In the situation that cross-linking is impossible, the variable
|
||||
dnl `cross_linkable' will be substituted with "yes".
|
||||
AC_DEFUN(AC_PROG_CC_LOCAL,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_WORKS_LOCAL
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
dnl The following differs from the AC_PROG_CC macro in autoconf. Since
|
||||
dnl we require a recent version of gcc to be used we do not need to go
|
||||
dnl into lengths and test for bugs in old versions. It must be gcc 2.7
|
||||
dnl or above.
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
|
||||
dnl Check the version
|
||||
cat > conftest.c <<EOF
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
|
||||
if test -z "$CFLAGS"; then
|
||||
CFLAGS="-g -O2"
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([We require GNU CC version 2.7 or newer])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([GNU libc must be compiled using GNU CC])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_CC_WORKS_LOCAL,
|
||||
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
|
||||
AC_LANG_RESTORE
|
||||
AC_MSG_RESULT($ac_cv_prog_cc_works)
|
||||
if test $ac_cv_prog_cc_works = no; then
|
||||
cross_linkable=no
|
||||
ac_cv_prog_cc_cross=yes
|
||||
dnl AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.])
|
||||
else
|
||||
cross_linkable=yes
|
||||
fi
|
||||
AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler])
|
||||
AC_MSG_RESULT($ac_cv_prog_cc_cross)
|
||||
AC_SUBST(cross_linkable)
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
])
|
||||
|
||||
+25
-23
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 94, 95, 96, 97 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
|
||||
@@ -22,8 +22,12 @@
|
||||
|
||||
#ifdef _ASSERT_H
|
||||
|
||||
#undef _ASSERT_H
|
||||
#undef assert
|
||||
# undef _ASSERT_H
|
||||
# undef assert
|
||||
|
||||
# ifdef __USE_GNU
|
||||
# undef assert_perror
|
||||
# endif
|
||||
|
||||
#endif /* assert.h */
|
||||
|
||||
@@ -37,7 +41,7 @@
|
||||
|
||||
#ifdef NDEBUG
|
||||
|
||||
#define assert(expr) ((void) 0)
|
||||
# define assert(expr) ((void) 0)
|
||||
|
||||
/* void assert_perror (int errnum);
|
||||
|
||||
@@ -45,14 +49,12 @@
|
||||
error message with the error text for ERRNUM and abort.
|
||||
(This is a GNU extension.) */
|
||||
|
||||
#ifdef __USE_GNU
|
||||
#define assert_perror(errnum) ((void) 0)
|
||||
#endif
|
||||
# ifdef __USE_GNU
|
||||
# define assert_perror(errnum) ((void) 0)
|
||||
# endif
|
||||
|
||||
#else /* Not NDEBUG. */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* This prints an "Assertion failed" message and aborts. */
|
||||
@@ -71,27 +73,27 @@ extern void __assert_perror_fail __P ((int __errnum,
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#define assert(expr) \
|
||||
((void) ((expr) || \
|
||||
# define assert(expr) \
|
||||
((void) ((expr) ? 0 : \
|
||||
(__assert_fail (__STRING(expr), \
|
||||
__FILE__, __LINE__, __ASSERT_FUNCTION), 0)))
|
||||
|
||||
#ifdef __USE_GNU
|
||||
#define assert_perror(errnum) \
|
||||
((void) ((errnum) && (__assert_perror_fail ((errnum), \
|
||||
__FILE__, __LINE__, \
|
||||
__ASSERT_FUNCTION), 0)))
|
||||
#endif
|
||||
# ifdef __USE_GNU
|
||||
# define assert_perror(errnum) \
|
||||
((void) ((errnum) ? 0 : (__assert_perror_fail ((errnum), \
|
||||
__FILE__, __LINE__, \
|
||||
__ASSERT_FUNCTION), 0)))
|
||||
# endif
|
||||
|
||||
/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
|
||||
which contains the name of the function currently being defined.
|
||||
This is broken in G++ before version 2.6. */
|
||||
#if (!defined (__GNUC__) || __GNUC__ < 2 || \
|
||||
__GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4))
|
||||
#define __ASSERT_FUNCTION ((__const char *) 0)
|
||||
#else
|
||||
#define __ASSERT_FUNCTION __PRETTY_FUNCTION__
|
||||
#endif
|
||||
# if (!defined __GNUC__ || __GNUC__ < 2 || \
|
||||
__GNUC_MINOR__ < (defined __cplusplus ? 6 : 4))
|
||||
# define __ASSERT_FUNCTION ((__const char *) 0)
|
||||
# else
|
||||
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
|
||||
# endif
|
||||
|
||||
|
||||
#endif /* NDEBUG. */
|
||||
|
||||
+15
-5
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -34,6 +34,7 @@ catopen (const char *cat_name, int flag)
|
||||
{
|
||||
__nl_catd result;
|
||||
const char *env_var;
|
||||
const char *nlspath;
|
||||
|
||||
result = (__nl_catd) malloc (sizeof (*result));
|
||||
if (result == NULL)
|
||||
@@ -82,11 +83,20 @@ catopen (const char *cat_name, int flag)
|
||||
return (nl_catd) -1;
|
||||
}
|
||||
|
||||
if (__secure_getenv ("NLSPATH") != NULL)
|
||||
result->nlspath = __strdup (getenv ("NLSPATH"));
|
||||
else
|
||||
result->nlspath = __strdup (NLSPATH);
|
||||
nlspath = __secure_getenv ("NLSPATH");
|
||||
if (nlspath != NULL && *nlspath != '\0')
|
||||
{
|
||||
/* Append the system dependent directory. */
|
||||
size_t len = strlen (nlspath) + 1 + sizeof NLSPATH;
|
||||
char *tmp = alloca (len);
|
||||
|
||||
__stpcpy (__stpcpy (__stpcpy (tmp, nlspath), ":"), NLSPATH);
|
||||
nlspath = tmp;
|
||||
}
|
||||
else
|
||||
nlspath = NLSPATH;
|
||||
|
||||
result->nlspath = __strdup (nlspath);
|
||||
if (result->nlspath == NULL)
|
||||
{
|
||||
free ((void *) result->cat_name);
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ usage (int status)
|
||||
Usage: %s [OPTION]... -o OUTPUT-FILE [INPUT-FILE]...\n\
|
||||
%s [OPTION]... [OUTPUT-FILE [INPUT-FILE]...]\n\
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
-H, --header create C header file containing symbol definitions\n\
|
||||
-H, --header=NAME create C header file NAME containing symbol definitions\n\
|
||||
-h, --help display this help and exit\n\
|
||||
--new do not use existing catalog, force new output file\n\
|
||||
-o, --output=NAME write output to file NAME\n\
|
||||
|
||||
Vendored
+25
-7
@@ -68,8 +68,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
echo m68k-cbm-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-cbm-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
laguna:OpenBSD:*:*)
|
||||
echo mips64-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
@@ -118,19 +130,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-atari-openbsd${UNAME_RELEASE}
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-sun-openbsd${UNAME_RELEASE}
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-apple-openbsd${UNAME_RELEASE}
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
@@ -378,8 +396,8 @@ EOF
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:OpenBSD:*:*)
|
||||
echo m68k-hp-openbsd${UNAME_RELEASE}
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
directive. */
|
||||
#undef HAVE_ASM_POPSECTION_DIRECTIVE
|
||||
|
||||
/* Define to the prefix Alpha/ELF GCC emits before ..ng symbols. */
|
||||
#undef ASM_ALPHA_NG_SYMBOL_PREFIX
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ build-profile = @profile@
|
||||
build-omitfp = @omitfp@
|
||||
stdio = @stdio@
|
||||
add-ons = @subdirs@
|
||||
cross-compiling = @cross_compiling@
|
||||
|
||||
# Build tools.
|
||||
CC = @CC@
|
||||
|
||||
Vendored
+40
-25
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
@@ -149,13 +149,14 @@ esac
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \
|
||||
| arme[lb] | pyramid \
|
||||
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 \
|
||||
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
|
||||
| alpha | we32k | ns16k | clipper | i370 | sh \
|
||||
| powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
|
||||
| pdp11 | mips64el | mips64orion | mips64orionel \
|
||||
| sparc | sparclet | sparclite | sparc64)
|
||||
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
|
||||
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
|
||||
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| sparc | sparclet | sparclite | sparc64 | v850)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# We use `pc' rather than `unknown'
|
||||
@@ -170,14 +171,18 @@ case $basic_machine in
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
|
||||
| sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
|
||||
| none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
|
||||
| pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
|
||||
| pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
|
||||
vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
|
||||
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
|
||||
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
|
||||
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| f301-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@@ -204,9 +209,9 @@ case $basic_machine in
|
||||
amiga | amiga-*)
|
||||
basic_machine=m68k-cbm
|
||||
;;
|
||||
amigados)
|
||||
amigaos | amigados)
|
||||
basic_machine=m68k-cbm
|
||||
os=-amigados
|
||||
os=-amigaos
|
||||
;;
|
||||
amigaunix | amix)
|
||||
basic_machine=m68k-cbm
|
||||
@@ -391,11 +396,11 @@ case $basic_machine in
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
os=-linux
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
@@ -566,6 +571,12 @@ case $basic_machine in
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
@@ -585,7 +596,7 @@ case $basic_machine in
|
||||
basic_machine=vax-dec
|
||||
os=-vms
|
||||
;;
|
||||
vpp*|vx|vx-*)
|
||||
vpp*|vx|vx-*)
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
vxworks960)
|
||||
@@ -615,7 +626,7 @@ case $basic_machine in
|
||||
# Here we handle the default manufacturer of certain CPU types. It is in
|
||||
# some cases the only manufacturer, in others, it is the most popular.
|
||||
mips)
|
||||
if [ x$os = x-linux ]; then
|
||||
if [ x$os = x-linux-gnu ]; then
|
||||
basic_machine=mips-unknown
|
||||
else
|
||||
basic_machine=mips-mips
|
||||
@@ -680,9 +691,12 @@ case $os in
|
||||
-solaris)
|
||||
os=-solaris2
|
||||
;;
|
||||
-unixware* | svr4*)
|
||||
-svr4*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-unixware*)
|
||||
os=-sysv4.2uw
|
||||
;;
|
||||
-gnu/linux*)
|
||||
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
||||
;;
|
||||
@@ -693,7 +707,8 @@ case $os in
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
@@ -701,7 +716,7 @@ case $os in
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -linux-gnu* | -uxpv*)
|
||||
| -mingw32* | -linux-gnu* | -uxpv*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-linux*)
|
||||
@@ -827,7 +842,7 @@ case $basic_machine in
|
||||
os=-sysv
|
||||
;;
|
||||
*-cbm)
|
||||
os=-amigados
|
||||
os=-amigaos
|
||||
;;
|
||||
*-dg)
|
||||
os=-dgux
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#! /bin/sh
|
||||
|
||||
# From configure.in CVSid
|
||||
|
||||
|
||||
|
||||
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.12
|
||||
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
@@ -38,7 +42,8 @@ ac_help="$ac_help
|
||||
ac_help="$ac_help
|
||||
--enable-omitfp build undebuggable optimized library [default=no]"
|
||||
ac_help="$ac_help
|
||||
--enable-add-ons=DIR... configure and build named extra directories"
|
||||
--enable-add-ons[=DIR1,DIR2]... configure and build add-ons in DIR1,DIR2,...
|
||||
search for add-ons if no parameter given"
|
||||
|
||||
# Initialize some variables set by options.
|
||||
# The variables have the same names as the options, with
|
||||
@@ -545,14 +550,6 @@ else
|
||||
ac_n= ac_c='\c' ac_t=
|
||||
fi
|
||||
|
||||
if test -r /vmunix; then
|
||||
kernel_id=`strings /vmunix | grep UNIX`
|
||||
elif test -r /dynix; then
|
||||
kernel_id=`strings /dynix | grep DYNIX`
|
||||
else
|
||||
kernel_id=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -677,10 +674,24 @@ else
|
||||
fi
|
||||
|
||||
|
||||
if test $omitfp = yes; then
|
||||
echo "*** Not all versions of GCC compile code correctly when the"
|
||||
echo "*** -fomit-frame-pointer option is used. You are on your own"
|
||||
echo "*** if you use it."
|
||||
fi
|
||||
|
||||
# Check whether --enable-add-ons or --disable-add-ons was given.
|
||||
if test "${enable_add_ons+set}" = set; then
|
||||
enableval="$enable_add_ons"
|
||||
add_ons=`echo "$enableval" | sed 's/,/ /g'`
|
||||
case "$enableval" in
|
||||
yes) if test "$srcdir" = "."; then
|
||||
add_ons=`echo */configure | sed -e 's!/configure!!g'`
|
||||
else
|
||||
add_ons=`echo $srcdir/*/configure | \
|
||||
sed -e "s!^$srcdir/!!g" -e 's!/configure!!g'`
|
||||
fi;;
|
||||
*) add_ons=`echo "$enableval" | sed 's/,/ /g'`;;
|
||||
esac
|
||||
else
|
||||
add_ons=
|
||||
fi
|
||||
@@ -709,7 +720,12 @@ subdirs="$add_ons"
|
||||
add_ons_pfx=
|
||||
if test x"$add_ons" != x; then
|
||||
for f in $add_ons; do
|
||||
add_ons_pfx="$add_ons_pfx $f/"
|
||||
# Test whether such a subdir really exists.
|
||||
if test -d $srcdir/$f; then
|
||||
add_ons_pfx="$add_ons_pfx $f/"
|
||||
else
|
||||
{ echo "configure: error: add-on directory \"$f\" does not exist" 1>&2; exit 1; }
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -720,7 +736,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||
echo "configure:724: checking host system type" >&5
|
||||
echo "configure:740: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
@@ -753,6 +769,30 @@ gnu*)
|
||||
host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
|
||||
;;
|
||||
esac
|
||||
###
|
||||
### I put this here to prevent those annoying emails from people who cannot
|
||||
### read and try to compile glibc on unsupported platforms. --drepper
|
||||
###
|
||||
### By using the undocumented --enable-hacker-mode option for configure
|
||||
### one can skip this test to make the configuration not fail for unsupported
|
||||
### platforms.
|
||||
###
|
||||
if test -z "$enable_hacker_mode"; then
|
||||
case "$host_os" in
|
||||
linux* | gnu*)
|
||||
;;
|
||||
*)
|
||||
echo "*** The GNU C library is currently not available for this platform."
|
||||
echo "*** So far nobody cared to port it and if there is no volunteer it"
|
||||
echo "*** might never happen. So, if you have interest to see glibc on"
|
||||
echo "*** this platform visit"
|
||||
echo "*** http://www.gnu.org/software/libc/porting.html"
|
||||
echo "*** and join the group of porters"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
# We keep the original values in `$config_*' and never modify them, so we
|
||||
# can write them unchanged into config.make. Everything else uses
|
||||
@@ -766,7 +806,8 @@ gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
|
||||
gnu_ld=yes gnu_as=yes ;;
|
||||
esac
|
||||
case "$host_os" in
|
||||
linux*ecoff*)
|
||||
# i586-linuxaout is mangled into i586-pc-linux-gnuaout
|
||||
linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
|
||||
;;
|
||||
gnu* | linux* | sysv4* | solaris2*)
|
||||
# These systems (almost) always use the ELF format.
|
||||
@@ -791,8 +832,11 @@ m88???) base_machine=m88k machine=m88k/$machine ;;
|
||||
m88k) base_machine=m88k machine=m88k/m88100 ;;
|
||||
mips*) base_machine=mips machine=mips/$machine ;;
|
||||
mips64*) base_machine=mips64 machine=mips/mips64/$machine ;;
|
||||
sparc[6789]) base_machine=sparc machine=sparc/$machine ;;
|
||||
supersparc) base_machine=sparc machine=sparc/sparc8 ;;
|
||||
sparc | sparcv[67])
|
||||
base_machine=sparc machine=sparc/sparc32 ;;
|
||||
sparcv8 | supersparc | hypersparc)
|
||||
base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
|
||||
sparc64) base_machine=sparc machine=sparc/sparc64 ;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -800,7 +844,7 @@ esac
|
||||
# This can take a while to compute.
|
||||
sysdep_dir=$srcdir/sysdeps
|
||||
echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
|
||||
echo "configure:804: checking sysdep dirs" >&5
|
||||
echo "configure:848: checking sysdep dirs" >&5
|
||||
# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
|
||||
os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
|
||||
|
||||
@@ -847,7 +891,7 @@ while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do
|
||||
tail="$2"
|
||||
done
|
||||
|
||||
# For sparc/sparc9, try sparc/sparc9 and then sparc.
|
||||
# For sparc/sparcv9, try sparc/sparcv9 and then sparc.
|
||||
mach=
|
||||
tail=$machine
|
||||
while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
|
||||
@@ -1001,7 +1045,7 @@ echo "$ac_t""sysdeps/generic sysdeps/stub" 1>&6
|
||||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||
# ./install, which can be erroneously created by make from ./install.sh.
|
||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||
echo "configure:1005: checking for a BSD compatible install" >&5
|
||||
echo "configure:1049: checking for a BSD compatible install" >&5
|
||||
if test -z "$INSTALL"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@@ -1052,10 +1096,10 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||
|
||||
if test "$INSTALL" = "${srcdir}/install-sh -c"; then
|
||||
# The makefiles need to use a different form to find it in $srcdir.
|
||||
INSTALL='$(..)./install-sh -c'
|
||||
INSTALL='\$(..)./install-sh -c'
|
||||
fi
|
||||
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
|
||||
echo "configure:1059: checking whether ln -s works" >&5
|
||||
echo "configure:1103: checking whether ln -s works" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1080,7 +1124,7 @@ do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1084: checking for $ac_word" >&5
|
||||
echo "configure:1128: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1110,8 +1154,168 @@ done
|
||||
test -n "$MSGFMT" || MSGFMT=":"
|
||||
|
||||
|
||||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1161: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_CC="gcc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
if test -z "$CC"; then
|
||||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1190: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
ac_prog_rejected=no
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
|
||||
ac_prog_rejected=yes
|
||||
continue
|
||||
fi
|
||||
ac_cv_prog_CC="cc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
if test $ac_prog_rejected = yes; then
|
||||
# We found a bogon in the path, so make sure we never use it.
|
||||
set dummy $ac_cv_prog_CC
|
||||
shift
|
||||
if test $# -gt 0; then
|
||||
# We chose a different compiler from the bogus one.
|
||||
# However, it has the same basename, so the bogon will be chosen
|
||||
# first if we set CC to just the basename; use the full file name.
|
||||
shift
|
||||
set dummy "$ac_dir/$ac_word" "$@"
|
||||
shift
|
||||
ac_cv_prog_CC="$@"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:1238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1248 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_prog_cc_cross=no
|
||||
else
|
||||
ac_cv_prog_cc_cross=yes
|
||||
fi
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
ac_cv_prog_cc_works=no
|
||||
fi
|
||||
rm -fr conftest*
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
|
||||
if test $ac_cv_prog_cc_works = no; then
|
||||
cross_linkable=no
|
||||
ac_cv_prog_cc_cross=yes
|
||||
else
|
||||
cross_linkable=yes
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:1275: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:1281: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.c <<EOF
|
||||
#ifdef __GNUC__
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
|
||||
cat > conftest.c <<EOF
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if test -z "$CFLAGS"; then
|
||||
CFLAGS="-g -O2"
|
||||
fi
|
||||
else
|
||||
{ echo "configure: error: We require GNU CC version 2.7 or newer" 1>&2; exit 1; }
|
||||
fi
|
||||
else
|
||||
{ echo "configure: error: GNU libc must be compiled using GNU CC" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||
echo "configure:1115: checking build system type" >&5
|
||||
echo "configure:1319: checking build system type" >&5
|
||||
|
||||
build_alias=$build
|
||||
case "$build_alias" in
|
||||
@@ -1129,47 +1333,12 @@ build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
echo "$ac_t""$build" 1>&6
|
||||
|
||||
if test $host != $build; then
|
||||
ac_tool_prefix=${host_alias}-
|
||||
else
|
||||
ac_tool_prefix=
|
||||
fi
|
||||
|
||||
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}gcc; ac_word=$2
|
||||
for ac_prog in gcc cc
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1141: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}gcc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $host != $build; then
|
||||
# Extract the first word of "gcc cc", so it can be a program name with args.
|
||||
set dummy gcc cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1173: checking for $ac_word" >&5
|
||||
echo "configure:1342: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1180,7 +1349,7 @@ else
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_BUILD_CC=""
|
||||
ac_cv_prog_BUILD_CC="$ac_prog"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -1194,9 +1363,13 @@ else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -n "$BUILD_CC" && break
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:1200: checking how to run the C preprocessor" >&5
|
||||
echo "configure:1373: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
@@ -1211,13 +1384,13 @@ else
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1215 "configure"
|
||||
#line 1388 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@@ -1228,13 +1401,13 @@ else
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1232 "configure"
|
||||
#line 1405 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@@ -1256,10 +1429,16 @@ else
|
||||
fi
|
||||
echo "$ac_t""$CPP" 1>&6
|
||||
|
||||
if test $host != $build; then
|
||||
ac_tool_prefix=${host_alias}-
|
||||
else
|
||||
ac_tool_prefix=
|
||||
fi
|
||||
|
||||
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ar; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1263: checking for $ac_word" >&5
|
||||
echo "configure:1442: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1290,7 +1469,7 @@ fi
|
||||
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1294: checking for $ac_word" >&5
|
||||
echo "configure:1473: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1321,7 +1500,7 @@ if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1325: checking for $ac_word" >&5
|
||||
echo "configure:1504: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1356,7 +1535,7 @@ fi
|
||||
# Extract the first word of "bash", so it can be a program name with args.
|
||||
set dummy bash; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1360: checking for $ac_word" >&5
|
||||
echo "configure:1539: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1397,7 +1576,7 @@ if test "$BASH" = no; then
|
||||
# Extract the first word of "ksh", so it can be a program name with args.
|
||||
set dummy ksh; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1401: checking for $ac_word" >&5
|
||||
echo "configure:1580: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1439,7 +1618,7 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
|
||||
echo "configure:1443: checking for signed size_t type" >&5
|
||||
echo "configure:1622: checking for signed size_t type" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1463,12 +1642,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
|
||||
echo "configure:1467: checking for libc-friendly stddef.h" >&5
|
||||
echo "configure:1646: checking for libc-friendly stddef.h" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1472 "configure"
|
||||
#line 1651 "configure"
|
||||
#include "confdefs.h"
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
@@ -1483,7 +1662,7 @@ size_t size; wchar_t wchar;
|
||||
if (&size == NULL || &wchar == NULL) abort ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_friendly_stddef=yes
|
||||
else
|
||||
@@ -1502,7 +1681,7 @@ override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
|
||||
echo "configure:1506: checking whether we need to use -P to assemble .S files" >&5
|
||||
echo "configure:1685: checking whether we need to use -P to assemble .S files" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1524,8 +1703,46 @@ if test $libc_cv_need_minus_P = yes; then
|
||||
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
|
||||
fi
|
||||
|
||||
# gcc 2.7.x has a bug where if -pipe is set, the assembler will always
|
||||
# be told to read stdin. This causes the compiler to hang when fed an
|
||||
# .s file.
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
case `${CC-cc} -v 2>&1` in
|
||||
*2.7*)
|
||||
# We must check this even if -pipe is not given here, because the user
|
||||
# might do `make CFLAGS=-pipe'.
|
||||
echo $ac_n "checking for gcc 2.7.x -pipe bug""... $ac_c" 1>&6
|
||||
echo "configure:1716: checking for gcc 2.7.x -pipe bug" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_gcc_pipe_bug'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cp /dev/null conftest.s
|
||||
cat >conftest1.s <<EOF
|
||||
.nosuchdirective
|
||||
EOF
|
||||
if ${CC-cc} -pipe -c conftest.s <conftest1.s 2>/dev/null; then
|
||||
libc_cv_gcc_pipe_bug=no
|
||||
else
|
||||
libc_cv_gcc_pipe_bug=yes
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
echo "$ac_t""$libc_cv_gcc_pipe_bug" 1>&6
|
||||
if test $libc_cv_gcc_pipe_bug = yes; then
|
||||
makeCC="${CC-cc} -B\$(common-objpfx)"
|
||||
makeCFLAGS=$CFLAGS
|
||||
CFLAGS=`echo $CFLAGS |sed 's/-pipe//'`
|
||||
fi;;
|
||||
*) libc_cv_gcc_pipe_bug=no;;
|
||||
esac
|
||||
else
|
||||
libc_cv_gcc_pipe_bug=no
|
||||
fi
|
||||
|
||||
|
||||
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
|
||||
echo "configure:1529: checking for assembler global-symbol directive" >&5
|
||||
echo "configure:1746: checking for assembler global-symbol directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1534,7 +1751,7 @@ for ac_globl in .globl .global; do
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
${ac_globl} foo
|
||||
foo: .long 0
|
||||
foo:
|
||||
EOF
|
||||
if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
|
||||
libc_cv_asm_global_directive=${ac_globl}
|
||||
@@ -1555,7 +1772,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1559: checking for .set assembler directive" >&5
|
||||
echo "configure:1776: checking for .set assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1590,7 +1807,7 @@ fi
|
||||
|
||||
if test $elf = yes; then
|
||||
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1594: checking for .previous assembler directive" >&5
|
||||
echo "configure:1811: checking for .previous assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1598,7 +1815,7 @@ else
|
||||
.section foo_section
|
||||
.previous
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_asm_previous_directive=yes
|
||||
else
|
||||
libc_cv_asm_previous_directive=no
|
||||
@@ -1614,7 +1831,7 @@ EOF
|
||||
|
||||
else
|
||||
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1618: checking for .popsection assembler directive" >&5
|
||||
echo "configure:1835: checking for .popsection assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1622,7 +1839,7 @@ else
|
||||
.pushsection foo_section
|
||||
.popsection
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_asm_popsection_directive=yes
|
||||
else
|
||||
libc_cv_asm_popsection_directive=no
|
||||
@@ -1642,12 +1859,12 @@ fi
|
||||
|
||||
if test $elf != yes; then
|
||||
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
|
||||
echo "configure:1646: checking for .init and .fini sections" >&5
|
||||
echo "configure:1863: checking for .init and .fini sections" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1651 "configure"
|
||||
#line 1868 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
@@ -1656,7 +1873,7 @@ asm (".section .init");
|
||||
asm (".text");
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_have_initfini=yes
|
||||
else
|
||||
@@ -1677,23 +1894,26 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $elf = yes; then
|
||||
libc_cv_asm_underscores=no
|
||||
else
|
||||
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
|
||||
echo "configure:1685: checking for _ prefix on C symbol names" >&5
|
||||
if test $ac_cv_prog_cc_works = yes; then
|
||||
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
|
||||
echo "configure:1905: checking for _ prefix on C symbol names" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1690 "configure"
|
||||
#line 1910 "configure"
|
||||
#include "confdefs.h"
|
||||
asm ("_glibc_foobar:");
|
||||
int main() {
|
||||
glibc_foobar ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
libc_cv_asm_underscores=yes
|
||||
else
|
||||
@@ -1706,6 +1926,37 @@ rm -f conftest*
|
||||
fi
|
||||
|
||||
echo "$ac_t""$libc_cv_asm_underscores" 1>&6
|
||||
else
|
||||
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
|
||||
echo "configure:1932: checking for _ prefix on C symbol names" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1937 "configure"
|
||||
#include "confdefs.h"
|
||||
void underscore_test(void) {
|
||||
return; }
|
||||
EOF
|
||||
if { (eval echo configure:1942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if grep _underscore_test conftest* >/dev/null; then
|
||||
rm -f conftest*
|
||||
libc_cv_asm_underscores=yes
|
||||
else
|
||||
rm -f conftest*
|
||||
libc_cv_asm_underscores=no
|
||||
fi
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -f conftest*
|
||||
libc_cv_asm_underscores=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
echo "$ac_t""$libc_cv_asm_underscores" 1>&6
|
||||
fi
|
||||
fi
|
||||
if test $libc_cv_asm_underscores = no; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
@@ -1720,14 +1971,14 @@ if test $elf = yes; then
|
||||
libc_cv_asm_weakext_directive=no
|
||||
else
|
||||
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
|
||||
echo "configure:1724: checking for assembler .weak directive" >&5
|
||||
echo "configure:1975: checking for assembler .weak directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
${libc_cv_asm_global_directive} foo
|
||||
foo: .long 0
|
||||
foo:
|
||||
.weak foo
|
||||
.weak bar; bar = foo
|
||||
EOF
|
||||
@@ -1743,14 +1994,14 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
|
||||
|
||||
if test $libc_cv_asm_weak_directive = no; then
|
||||
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
|
||||
echo "configure:1747: checking for assembler .weakext directive" >&5
|
||||
echo "configure:1998: checking for assembler .weakext directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
${libc_cv_asm_global_directive} foo
|
||||
foo: .long 0
|
||||
foo:
|
||||
.weakext foo
|
||||
.weakext foo, bar
|
||||
EOF
|
||||
@@ -1780,7 +2031,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
|
||||
echo "configure:1784: checking for ld --no-whole-archive" >&5
|
||||
echo "configure:2035: checking for ld --no-whole-archive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1791,7 +2042,7 @@ __throw () {}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -Wl,--no-whole-archive
|
||||
-o conftest conftest.c'; { (eval echo configure:1795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c 1>&5'; { (eval echo configure:2046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_ld_no_whole_archive=yes
|
||||
else
|
||||
libc_cv_ld_no_whole_archive=no
|
||||
@@ -1802,7 +2053,7 @@ fi
|
||||
echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
|
||||
|
||||
echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6
|
||||
echo "configure:1806: checking for gcc -fno-exceptions" >&5
|
||||
echo "configure:2057: checking for gcc -fno-exceptions" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1813,7 +2064,7 @@ __throw () {}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -fno-exceptions
|
||||
-o conftest conftest.c'; { (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c 1>&5'; { (eval echo configure:2068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_gcc_no_exceptions=yes
|
||||
else
|
||||
libc_cv_gcc_no_exceptions=no
|
||||
@@ -1823,6 +2074,38 @@ fi
|
||||
|
||||
echo "$ac_t""$libc_cv_gcc_no_exceptions" 1>&6
|
||||
|
||||
if test "$base_machine" = alpha ; then
|
||||
echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6
|
||||
echo "configure:2080: checking for function ..ng prefix" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_gcc_alpha_ng_prefix'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.c <<\EOF
|
||||
foo () { }
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
|
||||
then
|
||||
libc_cv_gcc_alpha_ng_prefix=yes
|
||||
else
|
||||
libc_cv_gcc_alpha_ng_prefix=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
echo "$ac_t""$libc_cv_gcc_alpha_ng_prefix" 1>&6
|
||||
if test $libc_cv_gcc_alpha_ng_prefix = yes ; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define ASM_ALPHA_NG_SYMBOL_PREFIX "$"
|
||||
EOF
|
||||
|
||||
else
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define ASM_ALPHA_NG_SYMBOL_PREFIX ""
|
||||
EOF
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
### End of automated tests.
|
||||
### Now run sysdeps configure fragments.
|
||||
|
||||
@@ -1865,7 +2148,7 @@ if test "$uname" = generic; then
|
||||
fi
|
||||
|
||||
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
|
||||
echo "configure:1869: checking OS release for uname" >&5
|
||||
echo "configure:2152: checking OS release for uname" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1887,7 +2170,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6
|
||||
uname_release="$libc_cv_uname_release"
|
||||
|
||||
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
|
||||
echo "configure:1891: checking OS version for uname" >&5
|
||||
echo "configure:2174: checking OS version for uname" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1909,7 +2192,7 @@ else
|
||||
fi
|
||||
|
||||
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
|
||||
echo "configure:1913: checking stdio selection" >&5
|
||||
echo "configure:2196: checking stdio selection" >&5
|
||||
|
||||
case $stdio in
|
||||
libio) cat >> confdefs.h <<\EOF
|
||||
@@ -1970,6 +2253,21 @@ fi
|
||||
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
|
||||
|
||||
|
||||
if test $libc_cv_gcc_pipe_bug = yes; then
|
||||
realCC=$CC
|
||||
CC=$makeCC
|
||||
CFLAGS=$makeCFLAGS
|
||||
fi
|
||||
if test -r /vmunix; then
|
||||
kernel_id=`strings /vmunix | grep UNIX`
|
||||
elif test -r /dynix; then
|
||||
kernel_id=`strings /dynix | grep DYNIX`
|
||||
else
|
||||
kernel_id=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -1993,7 +2291,7 @@ EOF
|
||||
# Ultrix sh set writes to stderr and can't be redirected directly,
|
||||
# and sets the high bit in the cache file unless we assign to the vars.
|
||||
(set) 2>&1 |
|
||||
case `(ac_space=' '; set | grep ac_space) 2>&1` in
|
||||
case `(ac_space=' '; set) 2>&1` in
|
||||
*ac_space=\ *)
|
||||
# `set' does not quote correctly, so add quotes (double-quote substitution
|
||||
# turns \\\\ into \\, and sed turns \\ into \).
|
||||
@@ -2113,13 +2411,15 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@LN_S@%$LN_S%g
|
||||
s%@MSGFMT@%$MSGFMT%g
|
||||
s%@CC@%$CC%g
|
||||
s%@cross_linkable@%$cross_linkable%g
|
||||
s%@build@%$build%g
|
||||
s%@build_alias@%$build_alias%g
|
||||
s%@build_cpu@%$build_cpu%g
|
||||
s%@build_vendor@%$build_vendor%g
|
||||
s%@build_os@%$build_os%g
|
||||
s%@CC@%$CC%g
|
||||
s%@BUILD_CC@%$BUILD_CC%g
|
||||
s%@cross_compiling@%$cross_compiling%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@AR@%$AR%g
|
||||
s%@RANLIB@%$RANLIB%g
|
||||
@@ -2400,10 +2700,16 @@ while test -n "$ac_sources"; do
|
||||
done
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
realCC=$realCC
|
||||
echo '$config_vars' >> config.make
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
|
||||
if test "$realCC"; then
|
||||
sed -e 's/%{pipe:-}/%|/g' `$realCC -print-file-name=specs` >specsT
|
||||
mv specsT specs
|
||||
fi
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
chmod +x $CONFIG_STATUS
|
||||
|
||||
+165
-20
@@ -76,16 +76,37 @@ AC_ARG_ENABLE(omitfp, dnl
|
||||
[ --enable-omitfp build undebuggable optimized library [default=no]],
|
||||
omitfp=$enableval, omitfp=no)
|
||||
|
||||
dnl Some gcc versions have problems with omit-frame-pointer. Warn about this.
|
||||
if test $omitfp = yes; then
|
||||
echo "*** Not all versions of GCC compile code correctly when the"
|
||||
echo "*** -fomit-frame-pointer option is used. You are on your own"
|
||||
echo "*** if you use it."
|
||||
fi
|
||||
|
||||
dnl Generic infrastructure for drop-in additions to libc.
|
||||
AC_ARG_ENABLE(add-ons, dnl
|
||||
[ --enable-add-ons=DIR... configure and build named extra directories],
|
||||
[add_ons=`echo "$enableval" | sed 's/,/ /g'`],
|
||||
[add_ons=])
|
||||
[ --enable-add-ons[=DIR1,DIR2]... configure and build add-ons in DIR1,DIR2,...
|
||||
search for add-ons if no parameter given],
|
||||
[case "$enableval" in
|
||||
yes) if test "$srcdir" = "."; then
|
||||
add_ons=`echo */configure | sed -e 's!/configure!!g'`
|
||||
else
|
||||
add_ons=`echo $srcdir/*/configure | \
|
||||
sed -e "s!^$srcdir/!!g" -e 's!/configure!!g'`
|
||||
fi;;
|
||||
*) add_ons=`echo "$enableval" | sed 's/,/ /g'`;;
|
||||
esac],
|
||||
[add_ons=])
|
||||
AC_CONFIG_SUBDIRS($add_ons)
|
||||
add_ons_pfx=
|
||||
if test x"$add_ons" != x; then
|
||||
for f in $add_ons; do
|
||||
add_ons_pfx="$add_ons_pfx $f/"
|
||||
# Test whether such a subdir really exists.
|
||||
if test -d $srcdir/$f; then
|
||||
add_ons_pfx="$add_ons_pfx $f/"
|
||||
else
|
||||
AC_MSG_ERROR(add-on directory \"$f\" does not exist)
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -103,6 +124,30 @@ gnu*)
|
||||
host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
|
||||
;;
|
||||
esac
|
||||
###
|
||||
### I put this here to prevent those annoying emails from people who cannot
|
||||
### read and try to compile glibc on unsupported platforms. --drepper
|
||||
###
|
||||
### By using the undocumented --enable-hacker-mode option for configure
|
||||
### one can skip this test to make the configuration not fail for unsupported
|
||||
### platforms.
|
||||
###
|
||||
if test -z "$enable_hacker_mode"; then
|
||||
case "$host_os" in
|
||||
linux* | gnu*)
|
||||
;;
|
||||
*)
|
||||
echo "*** The GNU C library is currently not available for this platform."
|
||||
echo "*** So far nobody cared to port it and if there is no volunteer it"
|
||||
echo "*** might never happen. So, if you have interest to see glibc on"
|
||||
echo "*** this platform visit"
|
||||
echo "*** http://www.gnu.org/software/libc/porting.html"
|
||||
echo "*** and join the group of porters"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
# We keep the original values in `$config_*' and never modify them, so we
|
||||
# can write them unchanged into config.make. Everything else uses
|
||||
@@ -116,7 +161,8 @@ gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
|
||||
gnu_ld=yes gnu_as=yes ;;
|
||||
esac
|
||||
case "$host_os" in
|
||||
linux*ecoff*)
|
||||
# i586-linuxaout is mangled into i586-pc-linux-gnuaout
|
||||
linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
|
||||
;;
|
||||
gnu* | linux* | sysv4* | solaris2*)
|
||||
# These systems (almost) always use the ELF format.
|
||||
@@ -143,8 +189,11 @@ m88???) base_machine=m88k machine=m88k/$machine ;;
|
||||
m88k) base_machine=m88k machine=m88k/m88100 ;;
|
||||
mips*) base_machine=mips machine=mips/$machine ;;
|
||||
mips64*) base_machine=mips64 machine=mips/mips64/$machine ;;
|
||||
sparc[6789]) base_machine=sparc machine=sparc/$machine ;;
|
||||
supersparc) base_machine=sparc machine=sparc/sparc8 ;;
|
||||
sparc | sparcv[67])
|
||||
base_machine=sparc machine=sparc/sparc32 ;;
|
||||
sparcv8 | supersparc | hypersparc)
|
||||
base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
|
||||
sparc64) base_machine=sparc machine=sparc/sparc64 ;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
AC_SUBST(base_machine)
|
||||
@@ -201,7 +250,7 @@ while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do
|
||||
tail="$2"
|
||||
done
|
||||
|
||||
# For sparc/sparc9, try sparc/sparc9 and then sparc.
|
||||
# For sparc/sparcv9, try sparc/sparcv9 and then sparc.
|
||||
mach=
|
||||
tail=$machine
|
||||
while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
|
||||
@@ -351,15 +400,17 @@ AC_MSG_RESULT(sysdeps/generic sysdeps/stub)
|
||||
AC_PROG_INSTALL
|
||||
if test "$INSTALL" = "${srcdir}/install-sh -c"; then
|
||||
# The makefiles need to use a different form to find it in $srcdir.
|
||||
INSTALL='$(..)./install-sh -c'
|
||||
INSTALL='\$(..)./install-sh -c'
|
||||
fi
|
||||
AC_PROG_LN_S
|
||||
AC_CHECK_PROGS(MSGFMT, msgfmt gmsgfmt, :)
|
||||
|
||||
AC_CHECK_TOOL(CC, gcc)
|
||||
AC_PROG_CC_LOCAL
|
||||
AC_CANONICAL_BUILD
|
||||
if test $host != $build; then
|
||||
AC_CHECK_PROG(BUILD_CC, gcc cc)
|
||||
AC_CHECK_PROGS(BUILD_CC, gcc cc)
|
||||
fi
|
||||
AC_SUBST(cross_compiling)
|
||||
AC_PROG_CPP
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
@@ -441,6 +492,37 @@ if test $libc_cv_need_minus_P = yes; then
|
||||
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
|
||||
fi
|
||||
|
||||
# gcc 2.7.x has a bug where if -pipe is set, the assembler will always
|
||||
# be told to read stdin. This causes the compiler to hang when fed an
|
||||
# .s file.
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
case `${CC-cc} -v 2>&1` in
|
||||
*2.7*)
|
||||
# We must check this even if -pipe is not given here, because the user
|
||||
# might do `make CFLAGS=-pipe'.
|
||||
AC_CACHE_CHECK(for gcc 2.7.x -pipe bug, libc_cv_gcc_pipe_bug, [dnl
|
||||
cp /dev/null conftest.s
|
||||
cat >conftest1.s <<EOF
|
||||
.nosuchdirective
|
||||
EOF
|
||||
if ${CC-cc} -pipe -c conftest.s <conftest1.s 2>/dev/null; then
|
||||
libc_cv_gcc_pipe_bug=no
|
||||
else
|
||||
libc_cv_gcc_pipe_bug=yes
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test $libc_cv_gcc_pipe_bug = yes; then
|
||||
makeCC="${CC-cc} -B\$(common-objpfx)"
|
||||
makeCFLAGS=$CFLAGS
|
||||
CFLAGS=`echo $CFLAGS |sed 's/-pipe//'`
|
||||
fi;;
|
||||
*) libc_cv_gcc_pipe_bug=no;;
|
||||
esac
|
||||
else
|
||||
libc_cv_gcc_pipe_bug=no
|
||||
fi
|
||||
|
||||
|
||||
AC_CACHE_CHECK(for assembler global-symbol directive,
|
||||
libc_cv_asm_global_directive, [dnl
|
||||
libc_cv_asm_global_directive=UNKNOWN
|
||||
@@ -448,7 +530,7 @@ for ac_globl in .globl .global; do
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
${ac_globl} foo
|
||||
foo: .long 0
|
||||
foo:
|
||||
EOF
|
||||
if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
|
||||
libc_cv_asm_global_directive=${ac_globl}
|
||||
@@ -533,13 +615,45 @@ if test $elf != yes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl AC_CHECK_ASM_UNDERSCORE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
AC_DEFUN(AC_CHECK_ASM_UNDERSCORE,
|
||||
[cat > conftest.$ac_ext <<EOF
|
||||
dnl This sometimes fails to find confdefs.h, for some reason.
|
||||
dnl [#]line __oline__ "[$]0"
|
||||
[#]line __oline__ "configure"
|
||||
#include "confdefs.h"
|
||||
void underscore_test(void) {
|
||||
return; }
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
if grep _underscore_test conftest* >/dev/null; then
|
||||
ifelse([$1], , :, [rm -f conftest*
|
||||
$1])
|
||||
else
|
||||
ifelse([$2], , , [rm -f conftest*
|
||||
$2])
|
||||
fi
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
ifelse([$2], , , [rm -f conftest*
|
||||
$2])
|
||||
fi
|
||||
rm -f conftest*])
|
||||
|
||||
if test $elf = yes; then
|
||||
libc_cv_asm_underscores=no
|
||||
else
|
||||
AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
|
||||
[AC_TRY_LINK([asm ("_glibc_foobar:");], [glibc_foobar ();],
|
||||
libc_cv_asm_underscores=yes,
|
||||
libc_cv_asm_underscores=no)])
|
||||
if test $ac_cv_prog_cc_works = yes; then
|
||||
AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
|
||||
[AC_TRY_LINK([asm ("_glibc_foobar:");], [glibc_foobar ();],
|
||||
libc_cv_asm_underscores=yes,
|
||||
libc_cv_asm_underscores=no)])
|
||||
else
|
||||
AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
|
||||
[AC_CHECK_ASM_UNDERSCORE(libc_cv_asm_underscores=yes,
|
||||
libc_cv_asm_underscores=no)])
|
||||
fi
|
||||
fi
|
||||
if test $libc_cv_asm_underscores = no; then
|
||||
AC_DEFINE(NO_UNDERSCORES)
|
||||
@@ -555,7 +669,7 @@ else
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
${libc_cv_asm_global_directive} foo
|
||||
foo: .long 0
|
||||
foo:
|
||||
.weak foo
|
||||
.weak bar; bar = foo
|
||||
EOF
|
||||
@@ -573,7 +687,7 @@ if test $libc_cv_asm_weak_directive = no; then
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
${libc_cv_asm_global_directive} foo
|
||||
foo: .long 0
|
||||
foo:
|
||||
.weakext foo
|
||||
.weakext foo, bar
|
||||
EOF
|
||||
@@ -602,7 +716,7 @@ EOF
|
||||
dnl No \ in command here because it ends up inside ''.
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -Wl,--no-whole-archive
|
||||
-o conftest conftest.c]); then
|
||||
-o conftest conftest.c 1>&AC_FD_CC]); then
|
||||
libc_cv_ld_no_whole_archive=yes
|
||||
else
|
||||
libc_cv_ld_no_whole_archive=no
|
||||
@@ -619,7 +733,7 @@ EOF
|
||||
dnl No \ in command here because it ends up inside ''.
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -fno-exceptions
|
||||
-o conftest conftest.c]); then
|
||||
-o conftest conftest.c 1>&AC_FD_CC]); then
|
||||
libc_cv_gcc_no_exceptions=yes
|
||||
else
|
||||
libc_cv_gcc_no_exceptions=no
|
||||
@@ -627,6 +741,26 @@ fi
|
||||
rm -f conftest*])
|
||||
AC_SUBST(libc_cv_gcc_no_exceptions)dnl
|
||||
|
||||
if test "$base_machine" = alpha ; then
|
||||
AC_CACHE_CHECK(for function ..ng prefix, libc_cv_gcc_alpha_ng_prefix, [dnl
|
||||
cat > conftest.c <<\EOF
|
||||
foo () { }
|
||||
EOF
|
||||
dnl
|
||||
if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null]);
|
||||
then
|
||||
libc_cv_gcc_alpha_ng_prefix=yes
|
||||
else
|
||||
libc_cv_gcc_alpha_ng_prefix=no
|
||||
fi
|
||||
rm -f conftest* ])
|
||||
if test $libc_cv_gcc_alpha_ng_prefix = yes ; then
|
||||
AC_DEFINE(ASM_ALPHA_NG_SYMBOL_PREFIX, "$")
|
||||
else
|
||||
AC_DEFINE(ASM_ALPHA_NG_SYMBOL_PREFIX, "")
|
||||
fi
|
||||
fi
|
||||
|
||||
### End of automated tests.
|
||||
### Now run sysdeps configure fragments.
|
||||
|
||||
@@ -767,5 +901,16 @@ fi
|
||||
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
|
||||
AC_SUBST(VERSION)
|
||||
|
||||
if test $libc_cv_gcc_pipe_bug = yes; then
|
||||
realCC=$CC
|
||||
CC=$makeCC
|
||||
CFLAGS=$makeCFLAGS
|
||||
fi
|
||||
AC_OUTPUT_COMMANDS([
|
||||
if test "$realCC"; then
|
||||
sed -e 's/%{pipe:-}/%|/g' `$realCC -print-file-name=specs` >specsT
|
||||
mv specsT specs
|
||||
fi], [realCC=$realCC])
|
||||
|
||||
AC_OUTPUT(config.make glibcbug ${config_makefile} ${config_uname}, ,
|
||||
[echo '$config_vars' >> config.make])
|
||||
|
||||
+24
-21
@@ -1,6 +1,6 @@
|
||||
# Makefile for csu code for GNU C library.
|
||||
|
||||
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995, 1996, 1997 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
|
||||
@@ -36,7 +36,7 @@ omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \
|
||||
$(csu-dummies))
|
||||
install-lib = $(start-installed-name) g$(start-installed-name) \
|
||||
$(csu-dummies)
|
||||
distribute = initfini.c gmon-start.c start.c
|
||||
distribute = initfini.c gmon-start.c start.c defs.awk
|
||||
|
||||
all: # Make this the default target; it will be defined in Rules.
|
||||
|
||||
@@ -56,7 +56,7 @@ have-initfini = yes
|
||||
|
||||
endif
|
||||
|
||||
ifeq (yes,$(have-initfini))
|
||||
ifeq ($(have-initfini),yes)
|
||||
|
||||
CPPFLAGS += -DHAVE_INITFINI
|
||||
|
||||
@@ -67,27 +67,30 @@ crtstuff = crti crtn
|
||||
|
||||
install-lib += $(crtstuff:=.o)
|
||||
extra-objs += $(crtstuff:=.o)
|
||||
generated += $(crtstuff:=.s)
|
||||
generated += $(crtstuff:=.S) initfini.s align.h end.h
|
||||
omit-deps += $(crtstuff)
|
||||
|
||||
# Compile initfini.c to assembly code, which contains embedded shell
|
||||
# commands that produce crti.s-new and crtn.s-new when run. We need to
|
||||
# disable emission of .size directives and debugging information, since
|
||||
# they will get confused by the splitting of the output we do.
|
||||
$(objpfx)cr%i.s $(objpfx)cr%n.s: initfini.c; $(initfini)
|
||||
# Special rules for the building of crti.o and crtn.o
|
||||
$(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h
|
||||
$(CC) -c -fPIC -g0 -I$(..) -I$(common-objpfx) -DASSEMBLER $< -o $@
|
||||
|
||||
define initfini
|
||||
-rm -f $(objpfx)crtcommon.tmp
|
||||
(echo 'cat > crtcommon.tmp <<\EOF_common'; \
|
||||
$(CC) $< $(CPPFLAGS) $(CFLAGS) \
|
||||
-fPIC -finhibit-size-directive $(no-exceptions) -g0 -S -o -; \
|
||||
echo 'EOF_common') | (cd $(@D); $(SHELL))
|
||||
cat $(objpfx)crtcommon.tmp >> $(objpfx)crti.s-new
|
||||
cat $(objpfx)crtcommon.tmp >> $(objpfx)crtn.s-new
|
||||
rm -f $(objpfx)crtcommon.tmp
|
||||
mv -f $(objpfx)crti.s-new $(subst crtn,crti,$@)
|
||||
mv -f $(objpfx)crtn.s-new $(subst crti,crtn,$@)
|
||||
endef
|
||||
$(objpfx)initfini.s: initfini.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -g0 -S -fPIC -finhibit-size-directive \
|
||||
-fno-inline-functions $(no-exceptions) $< -o $@
|
||||
|
||||
$(objpfx)crti.S: $(objpfx)initfini.s
|
||||
sed -n -e '1,/@HEADER_ENDS/p' \
|
||||
-e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
|
||||
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
||||
|
||||
$(objpfx)crtn.S: $(objpfx)initfini.s
|
||||
sed -n -e '1,/@HEADER_ENDS/p' \
|
||||
-e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
|
||||
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
||||
|
||||
$(objpfx)defs.h: $(objpfx)initfini.s
|
||||
sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
|
||||
awk -f defs.awk > $@
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/.end/ { need_end = 1 }
|
||||
/.align/ { if($2 > max) max = $2; }
|
||||
|
||||
END {
|
||||
if(need_end)
|
||||
{
|
||||
print "#define END_INIT .end _init";
|
||||
print "#define END_FINI .end _fini";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "#define END_INIT";
|
||||
print "#define END_FINI";
|
||||
}
|
||||
if(max)
|
||||
print "#define ALIGN .align", max;
|
||||
else
|
||||
print "#define ALIGN";
|
||||
|
||||
print "#include <libc-symbols.h>";
|
||||
print "weak_extern (__gmon_start__)";
|
||||
}
|
||||
+47
-79
@@ -1,5 +1,5 @@
|
||||
/* Special .init and .fini section support.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it
|
||||
@@ -26,68 +26,40 @@
|
||||
write to the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file is compiled into assembly code which is then surrounded by the
|
||||
lines `cat > crtcommon.tmp <<\EOF_common' and `EOF_common' and thus
|
||||
becomes a shell script which creates three files of assembly code.
|
||||
/* This file is compiled into assembly code which is then munged by a sed
|
||||
script into two files: crti.s and crtn.s.
|
||||
|
||||
* The first file is crti.s-new; this puts a function prologue at the
|
||||
beginning of the .init and .fini sections and defines global symbols for
|
||||
* crti.s puts a function prologue at the beginning of the
|
||||
.init and .fini sections and defines global symbols for
|
||||
those addresses, so they can be called as functions.
|
||||
|
||||
* The second file is crtn.s-new; this puts the corresponding function
|
||||
epilogues in the .init and .fini sections.
|
||||
|
||||
* The third file is crtcommon.tmp, which is whatever miscellaneous cruft
|
||||
the compiler generated at the end; it should be appended to both crti.s-new
|
||||
and crtn.s-new. */
|
||||
* crtn.s puts the corresponding function epilogues
|
||||
in the .init and .fini sections. */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/* We use embedded asm for .section unconditionally, as this makes it
|
||||
easier to insert the necessary directives into crtn.S. */
|
||||
#define SECTION(x) asm (".section \"" x "\"");
|
||||
|
||||
#ifdef HAVE_ELF
|
||||
/* These declarations make the functions go in the right sections when
|
||||
we define them below. GCC syntax does not allow the attribute
|
||||
specifications to be in the function definitions themselves. */
|
||||
void _init (void) __attribute__ ((section (".init")));
|
||||
void _fini (void) __attribute__ ((section (".fini")));
|
||||
/* Embed an #include to pull in the alignment and .end directives. */
|
||||
asm ("\n#include \"defs.h\"");
|
||||
|
||||
#define SECTION(x) /* Put nothing extra before the defn. */
|
||||
/* The initial common code ends here. */
|
||||
asm ("\n/*@HEADER_ENDS*/");
|
||||
|
||||
#else
|
||||
/* Some non-ELF systems support .init and .fini sections,
|
||||
but the __attribute__ syntax only works for ELF. */
|
||||
#define SECTION(x) asm (".section " x);
|
||||
#endif
|
||||
|
||||
/* End the here document containing the initial common code.
|
||||
Then move the output file crtcommon.tmp to crti.s-new and crtn.s-new. */
|
||||
asm ("\nEOF_common\n\
|
||||
rm -f crti.s-new crtn.s-new\n\
|
||||
mv crtcommon.tmp crti.s-new\n\
|
||||
cp crti.s-new crtn.s-new");
|
||||
|
||||
/* Extract a `.end' if one is produced by the compiler. */
|
||||
asm ("fgrep .end >/dev/null 2>&1 <<\\EOF.end && need_end=yes");
|
||||
/* To determine whether we need .end and .align: */
|
||||
asm ("\n/*@TESTS_BEGIN*/");
|
||||
void
|
||||
useless_function (void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
asm ("\nEOF.end\n");
|
||||
|
||||
/* Find out how much alignment is produced by the compiler. */
|
||||
asm ("align=`awk '$1==\".align\" { if ($2>max) max=$2; } END { print max; }' \
|
||||
<<\\EOF.align");
|
||||
void
|
||||
useless_function2 (void (*foo) (void))
|
||||
dummy (void (*foo) (void))
|
||||
{
|
||||
if (foo)
|
||||
(*foo) ();
|
||||
}
|
||||
asm ("\nEOF.align\n`\n");
|
||||
asm ("\n/*@TESTS_END*/");
|
||||
|
||||
/* Append the .init prologue to crti.s-new. */
|
||||
asm ("cat >> crti.s-new <<\\EOF.crti.init");
|
||||
/* The beginning of _init: */
|
||||
asm ("\n/*@_init_PROLOG_BEGINS*/");
|
||||
|
||||
SECTION (".init")
|
||||
void
|
||||
@@ -99,38 +71,33 @@ _init (void)
|
||||
gcrt1.o to reference a symbol which would be defined by some library
|
||||
module which has a constructor; but then user code's constructors
|
||||
would come first, and not be profiled. */
|
||||
extern void __gmon_start__ (void); weak_extern (__gmon_start__)
|
||||
extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/
|
||||
|
||||
if (__gmon_start__)
|
||||
__gmon_start__ ();
|
||||
|
||||
/* End the here document containing the .init prologue code.
|
||||
Then fetch the .section directive just written and append that
|
||||
to crtn.s-new, followed by the function epilogue. */
|
||||
asm ("\n\
|
||||
EOF.crti.init\n\
|
||||
test -n \"$align\" && echo .align $align >> crti.s-new\n\
|
||||
test -n \"$need_end\" && echo .end _init >> crti.s-new\n\
|
||||
fgrep .init crti.s-new >>crtn.s-new\n\
|
||||
fgrep -v .end >> crtn.s-new <<\\EOF.crtn.init");
|
||||
asm ("ALIGN");
|
||||
asm("END_INIT");
|
||||
/* Now the epilog. */
|
||||
asm ("\n/*@_init_PROLOG_ENDS*/");
|
||||
asm ("\n/*@_init_EPILOG_BEGINS*/");
|
||||
SECTION(".init");
|
||||
}
|
||||
asm ("END_INIT");
|
||||
|
||||
/* End the here document containing the .init epilogue code.
|
||||
Then append the .fini prologue to crti.s-new. */
|
||||
asm ("\nEOF.crtn.init\
|
||||
\n\
|
||||
cat >> crti.s-new <<\\EOF.crti.fini");
|
||||
/* End of the _init epilog, beginning of the _fini prolog. */
|
||||
asm ("\n/*@_init_EPILOG_ENDS*/");
|
||||
asm ("\n/*@_fini_PROLOG_BEGINS*/");
|
||||
|
||||
SECTION (".fini")
|
||||
void
|
||||
_fini (void)
|
||||
{
|
||||
/* End the here document containing the .fini prologue code.
|
||||
Then fetch the .section directive just written and append that
|
||||
to crtn.s-new, followed by the function epilogue. */
|
||||
asm ("\nEOF.crti.fini\n\
|
||||
test -n \"$align\" && echo .align $align >> crti.s-new\n\
|
||||
test -n \"$need_end\" && echo .end _fini >> crti.s-new\n\
|
||||
cat > /dev/null <<\\EOF.fini.skip");
|
||||
|
||||
/* End of the _fini prolog. */
|
||||
asm ("ALIGN");
|
||||
asm ("END_FINI");
|
||||
asm ("\n/*@_fini_PROLOG_ENDS*/");
|
||||
|
||||
{
|
||||
/* Let GCC know that _fini is not a leaf function by having a dummy
|
||||
@@ -140,14 +107,15 @@ cat > /dev/null <<\\EOF.fini.skip");
|
||||
i_am_not_a_leaf ();
|
||||
}
|
||||
|
||||
asm ("\nEOF.fini.skip\
|
||||
\n\
|
||||
fgrep .fini crti.s-new >>crtn.s-new\n\
|
||||
fgrep -v .end >> crtn.s-new <<\\EOF.crtn.fini");
|
||||
/* Beginning of the _fini epilog. */
|
||||
asm ("\n/*@_fini_EPILOG_BEGINS*/");
|
||||
SECTION (".fini");
|
||||
}
|
||||
asm ("END_FINI");
|
||||
|
||||
/* End the here document containing the .fini epilogue code.
|
||||
Finally, put the remainder of the generated assembly into crtcommon.tmp. */
|
||||
asm ("\nEOF.crtn.fini\
|
||||
\n\
|
||||
cat > crtcommon.tmp <<\\EOF_common");
|
||||
/* End of the _fini epilog. Any further generated assembly (e.g. .ident)
|
||||
is shared between both crt files. */
|
||||
asm ("\n/*@_fini_EPILOG_ENDS*/");
|
||||
asm ("\n/*@TRAILER_BEGINS*/");
|
||||
|
||||
/* End of file. */
|
||||
|
||||
@@ -45,3 +45,8 @@ $(objpfx)makedb: $(objpfx)libdb.so$(libdb.so-version)
|
||||
else
|
||||
$(objpfx)makedb: $(objpfx)libdb.a
|
||||
endif
|
||||
|
||||
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
||||
# This ensures they will load libc.so for needed symbols if loaded by
|
||||
# a statically-linked program that hasn't already loaded it.
|
||||
$(objpfx)libdb.so: $(common-objpfx)libc.so
|
||||
|
||||
@@ -65,6 +65,7 @@ __bt_free(t, h)
|
||||
h->prevpg = P_INVALID;
|
||||
h->nextpg = t->bt_free;
|
||||
t->bt_free = h->pgno;
|
||||
F_SET(t, B_METADIRTY);
|
||||
|
||||
/* Make sure the page gets written back. */
|
||||
return (mpool_put(t->bt_mp, h, MPOOL_DIRTY));
|
||||
@@ -92,6 +93,7 @@ __bt_new(t, npg)
|
||||
(h = mpool_get(t->bt_mp, t->bt_free, 0)) != NULL) {
|
||||
*npg = t->bt_free;
|
||||
t->bt_free = h->nextpg;
|
||||
F_SET(t, B_METADIRTY);
|
||||
return (h);
|
||||
}
|
||||
return (mpool_new(t->bt_mp, npg));
|
||||
|
||||
@@ -249,7 +249,7 @@ __big_delete(hashp, bufp)
|
||||
bufp->flags |= BUF_MOD;
|
||||
if (rbufp)
|
||||
__free_ovflpage(hashp, rbufp);
|
||||
if (last_bfp != rbufp)
|
||||
if (last_bfp && last_bfp != rbufp)
|
||||
__free_ovflpage(hashp, last_bfp);
|
||||
|
||||
hashp->NKEYS--;
|
||||
|
||||
+17
-19
@@ -1,29 +1,27 @@
|
||||
/* Copyright (C) 1992 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
DEFUN(alphasort, (a, b),
|
||||
CONST PTR a AND CONST PTR b)
|
||||
alphasort (const void *a, const void *b)
|
||||
{
|
||||
return strcmp (((struct dirent *) a)->d_name,
|
||||
((struct dirent *) b)->d_name);
|
||||
return strcmp ((*(const struct dirent **) a)->d_name,
|
||||
(*(const struct dirent **) b)->d_name);
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992, 93, 94, 95, 96, 97 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
|
||||
@@ -46,6 +46,9 @@ scandir (dir, namelist, select, cmp)
|
||||
{
|
||||
size_t dsize;
|
||||
|
||||
/* Ignore errors from select or readdir */
|
||||
__set_errno (0);
|
||||
|
||||
if (i == vsize)
|
||||
{
|
||||
struct dirent **new;
|
||||
|
||||
+14
-2
@@ -1,5 +1,5 @@
|
||||
/* Look up a symbol in the loaded objects.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 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
|
||||
@@ -162,7 +162,7 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
|
||||
(*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
|
||||
{
|
||||
/* We could find no value for a strong reference. */
|
||||
const char msg[] = "undefined symbol: ";
|
||||
static const char msg[] = "undefined symbol: ";
|
||||
const size_t len = strlen (undef_name);
|
||||
char buf[sizeof msg + len];
|
||||
memcpy (buf, msg, sizeof msg - 1);
|
||||
@@ -206,6 +206,18 @@ _dl_lookup_symbol_skip (const char *undef_name, const ElfW(Sym) **ref,
|
||||
reference_name, skip_map, flags))
|
||||
break;
|
||||
|
||||
if (current_value.s == NULL &&
|
||||
(*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
|
||||
{
|
||||
/* We could find no value for a strong reference. */
|
||||
static const char msg[] = "undefined symbol: ";
|
||||
const size_t len = strlen (undef_name);
|
||||
char buf[sizeof msg + len];
|
||||
memcpy (buf, msg, sizeof msg - 1);
|
||||
memcpy (&buf[sizeof msg - 1], undef_name, len + 1);
|
||||
_dl_signal_error (0, reference_name, buf);
|
||||
}
|
||||
|
||||
*ref = current_value.s;
|
||||
return current_value.a;
|
||||
}
|
||||
|
||||
+6
-7
@@ -1,5 +1,5 @@
|
||||
/* Relocate a shared object and resolve its references to other loaded objects.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 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
|
||||
@@ -58,17 +58,16 @@ _dl_relocate_object (struct link_map *l, struct link_map *scope[], int lazy)
|
||||
|
||||
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
|
||||
#define RESOLVE(ref, flags) \
|
||||
(_dl_lookup_symbol (strtab + (*ref)->st_name, ref, scope, \
|
||||
l->l_name, flags))
|
||||
(((*ref)->st_shndx != SHN_UNDEF && \
|
||||
ELFW(ST_BIND) ((*ref)->st_info) == STB_LOCAL) \
|
||||
? l->l_addr \
|
||||
: _dl_lookup_symbol (strtab + (*ref)->st_name, ref, scope, \
|
||||
l->l_name, flags))
|
||||
|
||||
#include "dynamic-link.h"
|
||||
ELF_DYNAMIC_RELOCATE (l, lazy);
|
||||
}
|
||||
|
||||
/* Set up the PLT so its unrelocated entries will jump to
|
||||
_dl_runtime_resolve (dl-runtime.c), which will relocate them. */
|
||||
elf_machine_runtime_setup (l, lazy);
|
||||
|
||||
/* Mark the object so we know ths work has been done. */
|
||||
l->l_relocated = 1;
|
||||
|
||||
|
||||
+6
-3
@@ -97,8 +97,11 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn,
|
||||
|
||||
/* This can't just be an inline function because GCC is too dumb
|
||||
to inline functions containing inlines themselves. */
|
||||
#define ELF_DYNAMIC_RELOCATE(map, lazy) \
|
||||
do { ELF_DYNAMIC_DO_REL ((map), (lazy)); \
|
||||
ELF_DYNAMIC_DO_RELA ((map), (lazy)); } while (0)
|
||||
#define ELF_DYNAMIC_RELOCATE(map, lazy) \
|
||||
do { \
|
||||
int edr_lazy = elf_machine_runtime_setup((map), (lazy)); \
|
||||
ELF_DYNAMIC_DO_REL ((map), edr_lazy); \
|
||||
ELF_DYNAMIC_DO_RELA ((map), edr_lazy); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,13 +18,17 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _LINK_H
|
||||
|
||||
#define _LINK_H 1
|
||||
#include <features.h>
|
||||
|
||||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
|
||||
#include <elf.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* We use this macro to refer to ELF types independent of the native wordsize.
|
||||
`ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
|
||||
#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
|
||||
@@ -340,5 +344,6 @@ extern void _dl_debug_state (void);
|
||||
in the `r_ldbase' member. Returns the address of the structure. */
|
||||
extern struct r_debug *_dl_debug_initialize (ElfW(Addr) ldbase);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* link.h */
|
||||
|
||||
+13
-5
@@ -358,8 +358,10 @@ of this helper program; chances are you did not intend to run this program.\n",
|
||||
while ((p = strsep (&list, " ")) != NULL)
|
||||
if (! __libc_enable_secure || strchr (p, '/') == NULL)
|
||||
{
|
||||
(void) _dl_map_object (NULL, p, lt_library, 0);
|
||||
++npreloads;
|
||||
struct link_map *new_map = _dl_map_object (NULL, p, lt_library, 0);
|
||||
if (new_map->l_opencount == 1)
|
||||
/* It is no duplicate. */
|
||||
++npreloads;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,15 +415,21 @@ of this helper program; chances are you did not intend to run this program.\n",
|
||||
runp = file;
|
||||
while ((p = strsep (&runp, ": \t\n")) != NULL)
|
||||
{
|
||||
(void) _dl_map_object (NULL, p, lt_library, 0);
|
||||
++npreloads;
|
||||
struct link_map *new_map = _dl_map_object (NULL, p,
|
||||
lt_library, 0);
|
||||
if (new_map->l_opencount == 1)
|
||||
/* It is no duplicate. */
|
||||
++npreloads;
|
||||
}
|
||||
}
|
||||
|
||||
if (problem != NULL)
|
||||
{
|
||||
char *p = strndupa (problem, file_size - (problem - file));
|
||||
(void) _dl_map_object (NULL, p, lt_library, 0);
|
||||
struct link_map *new_map = _dl_map_object (NULL, p, lt_library, 0);
|
||||
if (new_map->l_opencount == 1)
|
||||
/* It is no duplicate. */
|
||||
++npreloads;
|
||||
}
|
||||
|
||||
/* We don't need the file anymore. */
|
||||
|
||||
+16
-2
@@ -6,8 +6,15 @@
|
||||
# these variables are filled in by configure
|
||||
#
|
||||
VERSION="@VERSION@"
|
||||
BUGGLIBC="bugs@gnu.ai.mit.edu"
|
||||
BUGGLIBC="bugs@gnu.org"
|
||||
ADDONS="@subdirs@"
|
||||
HOST="@host@"
|
||||
CC='@CC@'
|
||||
CFLAGS="@CFLAGS@"
|
||||
BUILD_SHARED="@shared@"
|
||||
BUILD_PROFILE="@profile@"
|
||||
BUILD_OMITFP="@omitfp@"
|
||||
STDIO="@stdio@"
|
||||
|
||||
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
|
||||
export PATH
|
||||
@@ -119,10 +126,17 @@ ${ORGANIZATION- $ORGANIZATION_C}
|
||||
>Release: libc-${VERSION}
|
||||
>Environment:
|
||||
$ENVIRONMENT_C
|
||||
`[ -n "$HOST" ] && echo Host type: $HOST`
|
||||
`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
|
||||
`[ -n "$ARCH" ] && echo Architecture: $ARCH`
|
||||
`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
|
||||
`[ -n "$ADDONS" ] && echo Addons: $ADDONS`
|
||||
`[ -n "$CFLAGS" ] && echo Build CFLAGS: $CFLAGS`
|
||||
`[ -n "$CC" ] && echo Build CC: $CC`
|
||||
`[ -n "$BUILD_SHARED" ] && echo Build shared: $BUILD_SHARED`
|
||||
`[ -n "$BUILD_PROFILE" ] && echo Build profile: $BUILD_PROFILE`
|
||||
`[ -n "$BUILD_OMITFP" ] && echo Build omitfp: $BUILD_OMITFP`
|
||||
`[ -n "$STDIO" ] && echo Stdio: $STDIO`
|
||||
|
||||
>Description:
|
||||
$DESCRIPTION_C
|
||||
@@ -232,7 +246,7 @@ sed -e "
|
||||
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
|
||||
" $TEMP > $TEMP.x
|
||||
|
||||
if $MAIL_AGENT $BUGGLIBC < $TEMP.x; then
|
||||
if $MAIL_AGENT < $TEMP.x; then
|
||||
echo "$COMMAND: problem report sent"
|
||||
xs=0; exit
|
||||
else
|
||||
|
||||
+108
-39
@@ -34,6 +34,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/gmon.h>
|
||||
#include <sys/gmon_out.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
@@ -62,6 +63,7 @@ void moncontrol __P ((int mode));
|
||||
static void write_hist __P ((int fd));
|
||||
static void write_call_graph __P ((int fd));
|
||||
static void write_bb_counts __P ((int fd));
|
||||
static void write_gmon __P ((void));
|
||||
|
||||
/*
|
||||
* Control profiling
|
||||
@@ -165,21 +167,26 @@ static void
|
||||
write_hist (fd)
|
||||
int fd;
|
||||
{
|
||||
const u_char tag = GMON_TAG_TIME_HIST;
|
||||
struct gmon_hist_hdr thdr;
|
||||
u_char tag = GMON_TAG_TIME_HIST;
|
||||
struct gmon_hist_hdr thdr __attribute__ ((aligned (__alignof__ (char *))));
|
||||
|
||||
if (_gmonparam.kcountsize > 0)
|
||||
{
|
||||
thdr.low_pc = _gmonparam.lowpc;
|
||||
thdr.high_pc = _gmonparam.highpc;
|
||||
thdr.hist_size = _gmonparam.kcountsize / sizeof(HISTCOUNTER);
|
||||
thdr.prof_rate = __profile_frequency();
|
||||
strncpy(thdr.dimen, "seconds", sizeof(thdr.dimen));
|
||||
struct iovec iov[3] =
|
||||
{
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &thdr, sizeof (struct gmon_hist_hdr) },
|
||||
{ _gmonparam.kcount, _gmonparam.kcountsize }
|
||||
};
|
||||
|
||||
*(char **) thdr.low_pc = (char *) _gmonparam.lowpc;
|
||||
*(char **) thdr.high_pc = (char *) _gmonparam.highpc;
|
||||
*(int *) thdr.hist_size = _gmonparam.kcountsize / sizeof (HISTCOUNTER);
|
||||
*(int *) thdr.prof_rate = __profile_frequency ();
|
||||
strncpy (thdr.dimen, "seconds", sizeof (thdr.dimen));
|
||||
thdr.dimen_abbrev = 's';
|
||||
|
||||
write(fd, &tag, sizeof(tag));
|
||||
write(fd, &thdr, sizeof(thdr));
|
||||
write(fd, _gmonparam.kcount, _gmonparam.kcountsize);
|
||||
__writev (fd, iov, 3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,12 +195,26 @@ static void
|
||||
write_call_graph (fd)
|
||||
int fd;
|
||||
{
|
||||
const u_char tag = GMON_TAG_CG_ARC;
|
||||
struct gmon_cg_arc_record raw_arc;
|
||||
u_char tag = GMON_TAG_CG_ARC;
|
||||
struct gmon_cg_arc_record raw_arc[4]
|
||||
__attribute__ ((aligned (__alignof__ (char*))));
|
||||
int from_index, to_index, from_len;
|
||||
u_long frompc;
|
||||
|
||||
from_len = _gmonparam.fromssize / sizeof(*_gmonparam.froms);
|
||||
struct iovec iov[8] =
|
||||
{
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &raw_arc[0], sizeof (struct gmon_cg_arc_record) },
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &raw_arc[1], sizeof (struct gmon_cg_arc_record) },
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &raw_arc[2], sizeof (struct gmon_cg_arc_record) },
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &raw_arc[3], sizeof (struct gmon_cg_arc_record) },
|
||||
};
|
||||
int nfilled = 0;
|
||||
|
||||
from_len = _gmonparam.fromssize / sizeof (*_gmonparam.froms);
|
||||
for (from_index = 0; from_index < from_len; ++from_index)
|
||||
{
|
||||
if (_gmonparam.froms[from_index] == 0)
|
||||
@@ -201,19 +222,24 @@ write_call_graph (fd)
|
||||
|
||||
frompc = _gmonparam.lowpc;
|
||||
frompc += (from_index * _gmonparam.hashfraction
|
||||
* sizeof(*_gmonparam.froms));
|
||||
* sizeof (*_gmonparam.froms));
|
||||
for (to_index = _gmonparam.froms[from_index];
|
||||
to_index != 0;
|
||||
to_index = _gmonparam.tos[to_index].link)
|
||||
{
|
||||
raw_arc.from_pc = frompc;
|
||||
raw_arc.self_pc = _gmonparam.tos[to_index].selfpc;
|
||||
raw_arc.count = _gmonparam.tos[to_index].count;
|
||||
|
||||
write(fd, &tag, sizeof(tag));
|
||||
write(fd, &raw_arc, sizeof(raw_arc));
|
||||
if (nfilled > 3)
|
||||
{
|
||||
__writev (fd, iov, 2 * nfilled);
|
||||
nfilled = 0;
|
||||
}
|
||||
*(char **) raw_arc[nfilled].from_pc = (char *)frompc;
|
||||
*(char **) raw_arc[nfilled].self_pc =
|
||||
(char *)_gmonparam.tos[to_index].selfpc;
|
||||
*(int *) raw_arc[nfilled].count = _gmonparam.tos[to_index].count;
|
||||
++nfilled;
|
||||
}
|
||||
}
|
||||
__writev (fd, iov, 2 * nfilled);
|
||||
}
|
||||
|
||||
|
||||
@@ -222,55 +248,98 @@ write_bb_counts (fd)
|
||||
int fd;
|
||||
{
|
||||
struct __bb *grp;
|
||||
const u_char tag = GMON_TAG_BB_COUNT;
|
||||
u_char tag = GMON_TAG_BB_COUNT;
|
||||
int ncounts;
|
||||
int i;
|
||||
|
||||
struct iovec bbhead[2] =
|
||||
{
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &ncounts, sizeof (ncounts) }
|
||||
};
|
||||
struct iovec bbbody[8];
|
||||
int nfilled;
|
||||
|
||||
for (i = 0; i < (sizeof (bbbody) / sizeof (bbbody[0])); i += 2)
|
||||
{
|
||||
bbbody[i].iov_len = sizeof (grp->addresses[0]);
|
||||
bbbody[i + 1].iov_len = sizeof (grp->counts[0]);
|
||||
}
|
||||
|
||||
/* Write each group of basic-block info (all basic-blocks in a
|
||||
compilation unit form a single group). */
|
||||
|
||||
nfilled = 0;
|
||||
for (grp = __bb_head; grp; grp = grp->next)
|
||||
{
|
||||
ncounts = grp->ncounts;
|
||||
write(fd, &tag, sizeof(tag));
|
||||
write(fd, &ncounts, sizeof(ncounts));
|
||||
__writev (fd, bbhead, 2);
|
||||
for (i = 0; i < ncounts; ++i)
|
||||
{
|
||||
write(fd, &grp->addresses[i], sizeof(grp->addresses[0]));
|
||||
write(fd, &grp->counts[i], sizeof(grp->counts[0]));
|
||||
if (nfilled > (sizeof (bbbody) / sizeof (bbbody[0])) - 2)
|
||||
{
|
||||
__writev (fd, bbbody, nfilled);
|
||||
nfilled = 0;
|
||||
}
|
||||
|
||||
bbbody[nfilled++].iov_base = (char *) &grp->addresses[i];
|
||||
bbbody[nfilled++].iov_base = &grp->counts[i];
|
||||
}
|
||||
if (nfilled > 0)
|
||||
__writev (fd, bbbody, nfilled);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_mcleanup ()
|
||||
static void
|
||||
write_gmon ()
|
||||
{
|
||||
struct gmon_hdr ghdr;
|
||||
struct gmon_hdr ghdr __attribute__ ((aligned (__alignof__ (int))));
|
||||
int fd;
|
||||
|
||||
moncontrol(0);
|
||||
fd = open("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
|
||||
fd = __open ("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
|
||||
if (fd < 0)
|
||||
{
|
||||
perror("_mcleanup: gmon.out");
|
||||
perror ("_mcleanup: gmon.out");
|
||||
return;
|
||||
}
|
||||
|
||||
/* write gmon.out header: */
|
||||
memset(&ghdr, 0, sizeof(ghdr));
|
||||
memcpy(&ghdr.cookie[0], GMON_MAGIC, sizeof(ghdr.cookie));
|
||||
ghdr.version = GMON_VERSION;
|
||||
write(fd, &ghdr, sizeof(ghdr));
|
||||
memset (&ghdr, 0, sizeof (struct gmon_hdr));
|
||||
memcpy (&ghdr.cookie[0], GMON_MAGIC, sizeof (ghdr.cookie));
|
||||
*(int *) ghdr.version = GMON_VERSION;
|
||||
__write (fd, &ghdr, sizeof (struct gmon_hdr));
|
||||
|
||||
/* write PC histogram: */
|
||||
write_hist(fd);
|
||||
write_hist (fd);
|
||||
|
||||
/* write call-graph: */
|
||||
write_call_graph(fd);
|
||||
write_call_graph (fd);
|
||||
|
||||
/* write basic-block execution counts: */
|
||||
write_bb_counts(fd);
|
||||
write_bb_counts (fd);
|
||||
|
||||
close(fd);
|
||||
__close (fd);
|
||||
}
|
||||
|
||||
void
|
||||
__write_profiling ()
|
||||
{
|
||||
int save = _gmonparam.state;
|
||||
_gmonparam.state = GMON_PROF_OFF;
|
||||
if (save == GMON_PROF_ON)
|
||||
write_gmon ();
|
||||
_gmonparam.state = save;
|
||||
}
|
||||
weak_alias (__write_profiling, write_profiling)
|
||||
|
||||
void
|
||||
_mcleanup ()
|
||||
{
|
||||
moncontrol (0);
|
||||
|
||||
write_gmon ();
|
||||
|
||||
/* free the memory. */
|
||||
free (_gmonparam.tos);
|
||||
}
|
||||
|
||||
@@ -174,6 +174,10 @@ void monstartup __P ((u_long lowpc, u_long highpc));
|
||||
/* Clean up profiling and write out gmon.out. */
|
||||
void _mcleanup __P ((void));
|
||||
|
||||
/* Write current profiling data to file. */
|
||||
void __write_profiling __P ((void));
|
||||
void write_profiling __P ((void));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_SYS_GMON_H_ */
|
||||
|
||||
+27
-21
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger <davidm@cs.arizona.edu>.
|
||||
|
||||
@@ -40,30 +40,36 @@ __BEGIN_DECLS
|
||||
* always comes first in gmon.out and is then followed by a series
|
||||
* records defined below.
|
||||
*/
|
||||
struct gmon_hdr {
|
||||
char cookie[4];
|
||||
int version;
|
||||
int spare[3];
|
||||
};
|
||||
struct gmon_hdr
|
||||
{
|
||||
char cookie[4];
|
||||
char version[4];
|
||||
char spare[3 * 4];
|
||||
};
|
||||
|
||||
/* types of records in this file: */
|
||||
typedef enum {
|
||||
GMON_TAG_TIME_HIST = 0, GMON_TAG_CG_ARC = 1, GMON_TAG_BB_COUNT = 2
|
||||
} GMON_Record_Tag;
|
||||
typedef enum
|
||||
{
|
||||
GMON_TAG_TIME_HIST = 0,
|
||||
GMON_TAG_CG_ARC = 1,
|
||||
GMON_TAG_BB_COUNT = 2
|
||||
} GMON_Record_Tag;
|
||||
|
||||
struct gmon_hist_hdr {
|
||||
unsigned long low_pc; /* base pc address of sample buffer */
|
||||
unsigned long high_pc; /* max pc address of sampled buffer */
|
||||
int hist_size; /* size of sample buffer */
|
||||
int prof_rate; /* profiling clock rate */
|
||||
char dimen[15]; /* phys. dim., usually "seconds" */
|
||||
char dimen_abbrev; /* usually 's' for "seconds" */
|
||||
};
|
||||
struct gmon_hist_hdr
|
||||
{
|
||||
char low_pc[sizeof (char *)]; /* base pc address of sample buffer */
|
||||
char high_pc[sizeof (char *)]; /* max pc address of sampled buffer */
|
||||
char hist_size[4]; /* size of sample buffer */
|
||||
char prof_rate[4]; /* profiling clock rate */
|
||||
char dimen[15]; /* phys. dim., usually "seconds" */
|
||||
char dimen_abbrev; /* usually 's' for "seconds" */
|
||||
};
|
||||
|
||||
struct gmon_cg_arc_record {
|
||||
unsigned long from_pc; /* address within caller's body */
|
||||
unsigned long self_pc; /* address within callee's body */
|
||||
int count; /* number of arc traversals */
|
||||
struct gmon_cg_arc_record
|
||||
{
|
||||
char from_pc[sizeof (char *)]; /* address within caller's body */
|
||||
char self_pc[sizeof (char *)]; /* address within callee's body */
|
||||
char count[4]; /* number of arc traversals */
|
||||
};
|
||||
|
||||
__END_DECLS
|
||||
|
||||
+58
-18
@@ -1,35 +1,75 @@
|
||||
/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <grp.h>
|
||||
#include <stdio.h>
|
||||
#include <libc-lock.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
/* We need to protect the dynamic buffer handling. */
|
||||
__libc_lock_define_initialized (static, lock);
|
||||
|
||||
/* Read one entry from the given stream. */
|
||||
struct group *
|
||||
fgetgrent (FILE *stream)
|
||||
{
|
||||
static char buffer[BUFSIZ];
|
||||
static char *buffer;
|
||||
static size_t buffer_size;
|
||||
static struct group resbuf;
|
||||
struct group *result;
|
||||
int save;
|
||||
|
||||
if (__fgetgrent_r (stream, &resbuf, buffer, sizeof buffer, &result) != 0)
|
||||
return NULL;
|
||||
/* Get lock. */
|
||||
__libc_lock_lock (lock);
|
||||
|
||||
/* Allocate buffer if not yet available. */
|
||||
if (buffer == NULL)
|
||||
{
|
||||
buffer_size = NSS_BUFLEN_GROUP;
|
||||
buffer = malloc (buffer_size);
|
||||
}
|
||||
|
||||
while (buffer != NULL
|
||||
&& __fgetgrent_r (stream, &resbuf, buffer, buffer_size, &result) != 0
|
||||
&& errno == ERANGE)
|
||||
{
|
||||
char *new_buf;
|
||||
buffer_size += NSS_BUFLEN_GROUP;
|
||||
new_buf = realloc (buffer, buffer_size);
|
||||
if (new_buf == NULL)
|
||||
{
|
||||
/* We are out of memory. Free the current buffer so that the
|
||||
process gets a chance for a normal termination. */
|
||||
save = errno;
|
||||
free (buffer);
|
||||
__set_errno (save);
|
||||
}
|
||||
buffer = new_buf;
|
||||
}
|
||||
|
||||
if (buffer == NULL)
|
||||
result = NULL;
|
||||
|
||||
/* Release lock. Preserve error value. */
|
||||
save = errno;
|
||||
__libc_lock_unlock (lock);
|
||||
__set_errno (save);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
+12
-3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1996, 1997 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
|
||||
@@ -56,6 +56,7 @@ __fgetgrent_r (FILE *stream, struct group *resbuf, char *buffer, size_t buflen,
|
||||
struct group **result)
|
||||
{
|
||||
char *p;
|
||||
int parse_result;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -69,10 +70,18 @@ __fgetgrent_r (FILE *stream, struct group *resbuf, char *buffer, size_t buflen,
|
||||
/* Skip leading blanks. */
|
||||
while (isspace (*p))
|
||||
++p;
|
||||
} while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */
|
||||
} while (*p == '\0' || *p == '#' /* Ignore empty and comment lines. */
|
||||
/* Parse the line. If it is invalid, loop to
|
||||
get the next line of the file to parse. */
|
||||
! parse_line (p, resbuf, (void *) buffer, buflen));
|
||||
|| ! (parse_result = parse_line (p, resbuf,
|
||||
(void *) buffer, buflen)));
|
||||
|
||||
if (parse_result == -1)
|
||||
{
|
||||
/* The parser ran out of space. */
|
||||
*result = NULL;
|
||||
return errno;
|
||||
}
|
||||
|
||||
*result = resbuf;
|
||||
return 0;
|
||||
|
||||
@@ -32,9 +32,6 @@ __BEGIN_DECLS
|
||||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
|
||||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
/* The group structure. */
|
||||
struct group
|
||||
|
||||
+41
-27
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1989, 1991, 1993, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1989, 1991, 1993, 1996, 1997 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
|
||||
@@ -17,10 +17,11 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <alloca.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <grp.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
@@ -32,7 +33,7 @@ initgroups (user, group)
|
||||
const char *user;
|
||||
gid_t group;
|
||||
{
|
||||
#if defined (NGROUPS_MAX) && NGROUPS_MAX == 0
|
||||
#if defined NGROUPS_MAX && NGROUPS_MAX == 0
|
||||
|
||||
/* No extra groups allowed. */
|
||||
return 0;
|
||||
@@ -42,9 +43,10 @@ initgroups (user, group)
|
||||
struct group grpbuf, *g;
|
||||
size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
|
||||
char *tmpbuf;
|
||||
register size_t n;
|
||||
size_t n;
|
||||
size_t ngroups;
|
||||
gid_t *groups;
|
||||
int status;
|
||||
#ifdef NGROUPS_MAX
|
||||
# define limit NGROUPS_MAX
|
||||
|
||||
@@ -67,32 +69,44 @@ initgroups (user, group)
|
||||
n = 0;
|
||||
groups[n++] = group;
|
||||
|
||||
while (__getgrent_r (&grpbuf, tmpbuf, buflen, &g) >= 0)
|
||||
if (g->gr_gid != group)
|
||||
{
|
||||
register char **m;
|
||||
do
|
||||
{
|
||||
while ((status = __getgrent_r (&grpbuf, tmpbuf, buflen, &g)) != 0
|
||||
&& errno == ERANGE)
|
||||
{
|
||||
buflen *= 2;
|
||||
tmpbuf = __alloca (buflen);
|
||||
}
|
||||
|
||||
for (m = g->gr_mem; *m != NULL; ++m)
|
||||
if (strcmp (*m, user) == 0)
|
||||
{
|
||||
/* Matches user. Insert this group. */
|
||||
if (n == ngroups && limit <= 0)
|
||||
{
|
||||
/* Need a bigger buffer. */
|
||||
groups = memcpy (__alloca (ngroups * 2 * sizeof *groups),
|
||||
groups, ngroups * sizeof *groups);
|
||||
ngroups *= 2;
|
||||
}
|
||||
if (status == 0 && g->gr_gid != group)
|
||||
{
|
||||
char **m;
|
||||
|
||||
groups[n++] = g->gr_gid;
|
||||
for (m = g->gr_mem; *m != NULL; ++m)
|
||||
if (strcmp (*m, user) == 0)
|
||||
{
|
||||
/* Matches user. Insert this group. */
|
||||
if (n == ngroups && limit <= 0)
|
||||
{
|
||||
/* Need a bigger buffer. */
|
||||
gid_t *newgrp;
|
||||
newgrp = __alloca (ngroups * 2 * sizeof *groups);
|
||||
groups = memcpy (newgrp, groups, ngroups * sizeof *groups);
|
||||
ngroups *= 2;
|
||||
}
|
||||
|
||||
if (n == limit)
|
||||
/* Can't take any more groups; stop searching. */
|
||||
goto done;
|
||||
groups[n++] = g->gr_gid;
|
||||
|
||||
if (n == limit)
|
||||
/* Can't take any more groups; stop searching. */
|
||||
goto done;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (status == 0);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
done:
|
||||
endgrent ();
|
||||
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ include ../Rules
|
||||
# from $(subdirs), and this rule arranges for the headers in question
|
||||
# to get installed.
|
||||
sunrpc-headers = netdb.h pmap_prot.h xdr.h types.h auth.h \
|
||||
rpc_msg.h auth_unix.h
|
||||
rpc_msg.h auth_unix.h clnt.h
|
||||
installed-sunrpc-headers = $(addprefix $(inst_includedir)/rpc/, \
|
||||
$(sunrpc-headers))
|
||||
install-headers-nosubdir: $(installed-sunrpc-headers)
|
||||
|
||||
+22
-17
@@ -1,22 +1,21 @@
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <unistd.h>
|
||||
#include <hurd.h>
|
||||
#include <hurd/fd.h>
|
||||
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA. */
|
||||
|
||||
/* Change the current root directory to FD. */
|
||||
int
|
||||
DEFUN(fchroot, (fd), int fd)
|
||||
fchroot (int fd)
|
||||
{
|
||||
error_t err;
|
||||
file_t dir;
|
||||
@@ -36,7 +35,13 @@ DEFUN(fchroot, (fd), int fd)
|
||||
}));
|
||||
|
||||
if (! err)
|
||||
_hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], dir);
|
||||
{
|
||||
file_t root;
|
||||
err = __file_reparent (dir, MACH_PORT_NULL, &root);
|
||||
__mach_port_deallocate (__mach_task_self (), dir);
|
||||
if (! err)
|
||||
_hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], root);
|
||||
}
|
||||
|
||||
return err ? __hurd_fail (err) : 0;
|
||||
}
|
||||
|
||||
+17
-16
@@ -1,26 +1,27 @@
|
||||
/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <hurd.h>
|
||||
|
||||
/* This is initialized in dtable.c when that gets linked in.
|
||||
If dtable.c is not linked in, it will be zero. */
|
||||
file_t (*_hurd_getdport_fn) (int fd);
|
||||
static file_t (*_default_hurd_getdport_fn) (int fd) = 0;
|
||||
weak_alias (_default_hurd_getdport_fn, _hurd_getdport_fn)
|
||||
|
||||
file_t
|
||||
__getdport (int fd)
|
||||
@@ -43,7 +44,7 @@ __getdport (int fd)
|
||||
errno = EBADF;
|
||||
return MACH_PORT_NULL;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
__mach_port_mod_refs (__mach_task_self (), _hurd_init_dtable[fd],
|
||||
MACH_PORT_RIGHT_SEND, 1);
|
||||
|
||||
+23
-17
@@ -1,20 +1,20 @@
|
||||
/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _HURD_H
|
||||
|
||||
@@ -109,11 +109,10 @@ extern pid_t _hurd_pid, _hurd_ppid, _hurd_pgrp;
|
||||
extern int _hurd_orphaned;
|
||||
|
||||
/* This variable is incremented every time the process IDs change. */
|
||||
|
||||
unsigned int _hurd_pids_changed_stamp;
|
||||
extern unsigned int _hurd_pids_changed_stamp;
|
||||
|
||||
/* This condition is broadcast every time the process IDs change. */
|
||||
struct condition _hurd_pids_changed_sync;
|
||||
extern struct condition _hurd_pids_changed_sync;
|
||||
|
||||
/* Unix `data break', for brk and sbrk.
|
||||
If brk and sbrk are not used, this info will not be initialized or used. */
|
||||
@@ -304,4 +303,11 @@ extern int hurd_check_cancel (void);
|
||||
extern io_t __getdport (int fd), getdport (int fd);
|
||||
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
/* Write formatted output to PORT, a Mach port supporting the i/o protocol,
|
||||
according to the format string FORMAT, using the argument list in ARG. */
|
||||
int vpprintf (io_t port, const char *format, va_list arg);
|
||||
|
||||
|
||||
#endif /* hurd.h */
|
||||
|
||||
+16
-15
@@ -1,21 +1,21 @@
|
||||
/* Internal per-thread variables for the Hurd.
|
||||
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _HURD_THREADVAR_H
|
||||
#define _HURD_THREADVAR_H
|
||||
@@ -33,7 +33,7 @@ Cambridge, MA 02139, USA. */
|
||||
stack pointer is ignored; and __hurd_threadvar_stack_offset gives the
|
||||
address of a small allocated region which contains the variables for the
|
||||
single thread. */
|
||||
|
||||
|
||||
extern unsigned long int __hurd_threadvar_stack_mask;
|
||||
extern unsigned long int __hurd_threadvar_stack_offset;
|
||||
|
||||
@@ -60,6 +60,7 @@ enum __hurd_threadvar_index
|
||||
_HURD_THREADVAR_ERRNO, /* `errno' value for this thread. */
|
||||
_HURD_THREADVAR_SIGSTATE, /* This thread's `struct hurd_sigstate'. */
|
||||
_HURD_THREADVAR_DYNAMIC_USER, /* Dynamically-assigned user variables. */
|
||||
_HURD_THREADVAR_MALLOC, /* For use of malloc. */
|
||||
_HURD_THREADVAR_MAX /* Default value for __hurd_threadvar_max. */
|
||||
};
|
||||
|
||||
|
||||
+130
-23
@@ -1,20 +1,20 @@
|
||||
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <hurd.h>
|
||||
#include <hurd/msg_server.h>
|
||||
@@ -37,17 +37,124 @@ _S_msg_add_auth (mach_port_t me,
|
||||
{
|
||||
error_t err;
|
||||
auth_t newauth;
|
||||
uid_t *genuids, *gengids, *auxuids, *auxgids;
|
||||
mach_msg_type_number_t ngenuids, ngengids, nauxuids, nauxgids;
|
||||
uid_t *newgenuids, *newgengids, *newauxuids, *newauxgids;
|
||||
mach_msg_type_number_t nnewgenuids, nnewgengids, nnewauxuids, nnewauxgids;
|
||||
|
||||
if (err = __USEPORT (AUTH,
|
||||
__auth_makeauth (port,
|
||||
&addauth, 1, MACH_MSG_TYPE_MOVE_SEND,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
&newauth)))
|
||||
/* Create a list of ids and store it in NEWLISTP, length NEWLISTLEN.
|
||||
Keep all the ids in EXIST (len NEXIST), adding in those from NEW
|
||||
(len NNEW) which are not already there. */
|
||||
error_t make_list (uid_t **newlistp, mach_msg_type_number_t *newlistlen,
|
||||
uid_t *exist, mach_msg_type_number_t nexist,
|
||||
uid_t *new, mach_msg_type_number_t nnew)
|
||||
{
|
||||
error_t urp;
|
||||
int i, j, k;
|
||||
vm_size_t offset;
|
||||
|
||||
urp = vm_allocate (mach_task_self (), (vm_address_t *) newlistp,
|
||||
nexist + nnew * sizeof (uid_t), 1);
|
||||
if (urp)
|
||||
return urp;
|
||||
|
||||
j = 0;
|
||||
for (i = 0; i < nexist; i++)
|
||||
(*newlistp)[j++] = exist[i];
|
||||
|
||||
for (i = 0; i < nnew; i++)
|
||||
{
|
||||
for (k = 0; k < nexist; k++)
|
||||
if (exist[k] == new[i])
|
||||
break;
|
||||
if (k < nexist)
|
||||
continue;
|
||||
|
||||
(*newlistp)[j++] = new[i];
|
||||
}
|
||||
|
||||
offset = (round_page (nexist + nnew * sizeof (uid_t))
|
||||
- round_page (j * sizeof (uid_t)));
|
||||
if (offset)
|
||||
vm_deallocate (mach_task_self (),
|
||||
(vm_address_t) (*newlistp
|
||||
+ (nexist + nnew * sizeof (uid_t))),
|
||||
offset);
|
||||
*newlistlen = j;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Find out what ids ADDAUTH refers to */
|
||||
|
||||
genuids = gengids = auxuids = auxgids = 0;
|
||||
ngenuids = ngengids = nauxuids = nauxgids = 0;
|
||||
err = __auth_getids (addauth,
|
||||
&genuids, &ngenuids,
|
||||
&auxuids, &nauxuids,
|
||||
&gengids, &ngengids,
|
||||
&auxgids, &nauxgids);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* OR in these ids to what we already have, creating a new list. */
|
||||
|
||||
HURD_CRITICAL_BEGIN;
|
||||
__mutex_lock (&_hurd_id.lock);
|
||||
_hurd_check_ids ();
|
||||
|
||||
#define MAKE(genaux,uidgid) \
|
||||
make_list (&new ## genaux ## uidgid ## s, \
|
||||
&nnew ## genaux ## uidgid ## s, \
|
||||
_hurd_id.genaux.uidgid ## s, \
|
||||
_hurd_id.genaux.n ## uidgid ## s, \
|
||||
genaux ## uidgid ## s, \
|
||||
n ## genaux ## uidgid ## s)
|
||||
|
||||
err = MAKE (gen, uid);
|
||||
if (!err)
|
||||
MAKE (aux, uid);
|
||||
if (!err)
|
||||
MAKE (gen, gid);
|
||||
if (!err)
|
||||
MAKE (aux, gid);
|
||||
#undef MAKE
|
||||
|
||||
__mutex_unlock (&_hurd_id.lock);
|
||||
HURD_CRITICAL_END;
|
||||
|
||||
|
||||
/* Create the new auth port */
|
||||
|
||||
if (!err)
|
||||
err = __USEPORT (AUTH,
|
||||
__auth_makeauth (port,
|
||||
&addauth, MACH_MSG_TYPE_MOVE_SEND, 1,
|
||||
newgenuids, nnewgenuids,
|
||||
newauxuids, nnewauxuids,
|
||||
newgengids, nnewgengids,
|
||||
newauxgids, nnewauxgids,
|
||||
&newauth));
|
||||
|
||||
#define freeup(array, len) \
|
||||
if (array) \
|
||||
vm_deallocate (mach_task_self (), (vm_address_t) array, \
|
||||
len * sizeof (uid_t));
|
||||
|
||||
freeup (genuids, ngenuids);
|
||||
freeup (auxuids, nauxuids);
|
||||
freeup (gengids, ngengids);
|
||||
freeup (auxgids, nauxgids);
|
||||
freeup (newgenuids, nnewgenuids);
|
||||
freeup (newauxuids, nnewauxuids);
|
||||
freeup (newgengids, nnewgengids);
|
||||
freeup (newauxgids, nnewauxgids);
|
||||
#undef freeup
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* And install it. */
|
||||
|
||||
err = __setauth (newauth);
|
||||
__mach_port_deallocate (__mach_task_self (), newauth);
|
||||
if (err)
|
||||
@@ -108,7 +215,7 @@ _S_msg_del_auth (mach_port_t me,
|
||||
|
||||
err = __USEPORT (AUTH, __auth_makeauth
|
||||
(port,
|
||||
NULL, 0, MACH_MSG_TYPE_COPY_SEND,
|
||||
NULL, MACH_MSG_TYPE_COPY_SEND, 0,
|
||||
newu, nu,
|
||||
_hurd_id.aux.uids, _hurd_id.aux.nuids,
|
||||
newg, ng,
|
||||
|
||||
+5
-2
@@ -1,5 +1,5 @@
|
||||
/* Handle faults in the signal thread.
|
||||
Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994, 1995, 1996, 1997 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
|
||||
@@ -29,7 +29,10 @@
|
||||
#include <assert.h>
|
||||
|
||||
jmp_buf _hurdsig_fault_env;
|
||||
struct hurd_signal_preemptor _hurdsig_fault_preemptor;
|
||||
struct hurd_signal_preemptor _hurdsig_fault_preemptor = {0};
|
||||
|
||||
/* XXX temporary to deal with spelling fix */
|
||||
weak_alias (_hurdsig_fault_preemptor, _hurdsig_fault_preempter)
|
||||
|
||||
static mach_port_t forward_sigexc;
|
||||
|
||||
|
||||
+16
-14
@@ -1,20 +1,20 @@
|
||||
/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
@@ -31,7 +31,9 @@ struct hurd_port *_hurd_ports;
|
||||
unsigned int _hurd_nports;
|
||||
mode_t _hurd_umask;
|
||||
sigset_t _hurdsig_traced;
|
||||
|
||||
char **__libc_argv;
|
||||
int __libc_argc;
|
||||
|
||||
|
||||
error_t
|
||||
|
||||
+22
-3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <hurd/signal.h>
|
||||
#include <cthreads.h> /* For `struct mutex'. */
|
||||
#include <string.h>
|
||||
#include <hurd/id.h>
|
||||
#include "hurdfault.h"
|
||||
#include "hurdmalloc.h" /* XXX */
|
||||
|
||||
@@ -39,6 +40,11 @@ thread_t _hurd_msgport_thread;
|
||||
/* Thread which receives task-global signals. */
|
||||
thread_t _hurd_sigthread;
|
||||
|
||||
/* These are set up by _hurdsig_init. */
|
||||
unsigned long int __hurd_sigthread_stack_base;
|
||||
unsigned long int __hurd_sigthread_stack_end;
|
||||
unsigned long int *__hurd_sigthread_variables;
|
||||
|
||||
/* Linked-list of per-thread signal state. */
|
||||
struct hurd_sigstate *_hurd_sigstates;
|
||||
|
||||
@@ -421,9 +427,12 @@ abort_all_rpcs (int signo, struct machine_thread_all_state *state, int live)
|
||||
}
|
||||
}
|
||||
|
||||
struct hurd_signal_preemptor *_hurdsig_preemptors;
|
||||
struct hurd_signal_preemptor *_hurdsig_preemptors = 0;
|
||||
sigset_t _hurdsig_preempted_set;
|
||||
|
||||
/* XXX temporary to deal with spelling fix */
|
||||
weak_alias (_hurdsig_preemptors, _hurdsig_preempters)
|
||||
|
||||
/* Mask of stop signals. */
|
||||
#define STOPSIGS (sigmask (SIGTTIN) | sigmask (SIGTTOU) | \
|
||||
sigmask (SIGSTOP) | sigmask (SIGTSTP))
|
||||
@@ -1186,7 +1195,7 @@ _hurdsig_init (void)
|
||||
err = __thread_create (__mach_task_self (), &_hurd_msgport_thread);
|
||||
assert_perror (err);
|
||||
|
||||
stacksize = __vm_page_size * 4; /* Small stack for signal thread. */
|
||||
stacksize = __vm_page_size * 8; /* Small stack for signal thread. */
|
||||
err = __mach_setup_thread (__mach_task_self (), _hurd_msgport_thread,
|
||||
_hurd_msgport_receive,
|
||||
(vm_address_t *) &__hurd_sigthread_stack_base,
|
||||
@@ -1229,6 +1238,16 @@ reauth_proc (mach_port_t new)
|
||||
__mach_port_deallocate (__mach_task_self (), ignore);
|
||||
__mach_port_destroy (__mach_task_self (), ref);
|
||||
|
||||
/* Set the owner of the process here too. */
|
||||
mutex_lock (&_hurd_id.lock);
|
||||
if (!_hurd_check_ids ())
|
||||
HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC],
|
||||
__proc_setowner (port,
|
||||
(_hurd_id.gen.nuids
|
||||
? _hurd_id.gen.uids[0] : 0),
|
||||
!_hurd_id.gen.nuids));
|
||||
mutex_unlock (&_hurd_id.lock);
|
||||
|
||||
(void) &reauth_proc; /* Silence compiler warning. */
|
||||
}
|
||||
text_set_element (_hurd_reauth_hook, reauth_proc);
|
||||
|
||||
+14
-23
@@ -1,21 +1,21 @@
|
||||
/* Initial program startup for running under the GNU Hurd.
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
@@ -35,15 +35,6 @@ Cambridge, MA 02139, USA. */
|
||||
mach_port_t *_hurd_init_dtable;
|
||||
mach_msg_type_number_t _hurd_init_dtablesize;
|
||||
|
||||
unsigned int __hurd_threadvar_max;
|
||||
unsigned long int __hurd_threadvar_stack_mask;
|
||||
unsigned long int __hurd_threadvar_stack_offset;
|
||||
|
||||
/* These are set up by _hurdsig_init. */
|
||||
unsigned long int __hurd_sigthread_stack_base;
|
||||
unsigned long int __hurd_sigthread_stack_end;
|
||||
unsigned long int *__hurd_sigthread_variables;
|
||||
|
||||
extern void __mach_init (void);
|
||||
|
||||
/* Entry point. This is the first thing in the text segment.
|
||||
|
||||
+24
-17
@@ -1,21 +1,21 @@
|
||||
/* Report on what a thread in our task is waiting for.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <hurd.h>
|
||||
#include <hurd/signal.h>
|
||||
@@ -93,8 +93,15 @@ describe_port (string_t description, mach_port_t port)
|
||||
}
|
||||
|
||||
|
||||
/* Common defn so we don't link in the itimer code unnecessarily. */
|
||||
thread_t _hurd_itimer_thread; /* XXX */
|
||||
/* We want _HURD_ITIMER_THREAD, but don't want to link in the itimer code
|
||||
unnecessarily. */
|
||||
#if 0 /* libc.so.0.0 needs this defined, so make it a weak alias for now. */
|
||||
extern thread_t _hurd_itimer_thread; /* XXX */
|
||||
weak_extern (_hurd_itimer_thread)
|
||||
#else
|
||||
static thread_t default_hurd_itimer_thread;
|
||||
weak_alias (default_hurd_itimer_thread, _hurd_itimer_thread)
|
||||
#endif
|
||||
|
||||
kern_return_t
|
||||
_S_msg_report_wait (mach_port_t msgport, thread_t thread,
|
||||
@@ -105,7 +112,7 @@ _S_msg_report_wait (mach_port_t msgport, thread_t thread,
|
||||
if (thread == _hurd_msgport_thread)
|
||||
/* Cute. */
|
||||
strcpy (description, "msgport");
|
||||
else if (thread == _hurd_itimer_thread)
|
||||
else if (&_hurd_msgport_thread && thread == _hurd_itimer_thread)
|
||||
strcpy (description, "itimer");
|
||||
else
|
||||
{
|
||||
|
||||
+15
-15
@@ -1,21 +1,21 @@
|
||||
/* Set a host configuration item kept as the whole contents of a file.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <hurd.h>
|
||||
@@ -28,7 +28,7 @@ _hurd_set_host_config (const char *item, const char *value, size_t valuelen)
|
||||
mach_msg_type_number_t nwrote;
|
||||
file_t new, dir;
|
||||
|
||||
dir = __file_name_split (item, &item);
|
||||
dir = __file_name_split (item, (char **)&item);
|
||||
if (dir == MACH_PORT_NULL)
|
||||
return -1;
|
||||
|
||||
|
||||
+23
-22
@@ -1,30 +1,30 @@
|
||||
/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1994, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <hurd.h>
|
||||
|
||||
static ssize_t
|
||||
DEFUN(pwrite, (cookie, buf, n),
|
||||
PTR cookie AND CONST char *buf AND size_t n)
|
||||
pwrite (void *cookie,
|
||||
const char *buf,
|
||||
size_t n)
|
||||
{
|
||||
error_t error = __io_write ((io_t) cookie, buf, n, -1,
|
||||
(mach_msg_type_number_t *) &n);
|
||||
@@ -37,24 +37,25 @@ DEFUN(pwrite, (cookie, buf, n),
|
||||
/* Write formatted output to PORT, a Mach port supporting the i/o protocol,
|
||||
according to the format string FORMAT, using the argument list in ARG. */
|
||||
int
|
||||
DEFUN(vpprintf, (port, format, arg),
|
||||
io_t port AND CONST char *format AND va_list arg)
|
||||
vpprintf (io_t port,
|
||||
const char *format,
|
||||
va_list arg)
|
||||
{
|
||||
int done;
|
||||
FILE f;
|
||||
|
||||
/* Create an unbuffered stream talking to PORT on the stack. */
|
||||
memset((PTR) &f, 0, sizeof(f));
|
||||
memset ((void *) &f, 0, sizeof (f));
|
||||
f.__magic = _IOMAGIC;
|
||||
f.__mode.__write = 1;
|
||||
f.__cookie = (PTR) port;
|
||||
f.__cookie = (void *) port;
|
||||
f.__room_funcs = __default_room_functions;
|
||||
f.__io_funcs.__write = pwrite;
|
||||
f.__seen = 1;
|
||||
f.__userbuf = 1;
|
||||
|
||||
/* vfprintf will use a buffer on the stack for the life of the call. */
|
||||
done = vfprintf(&f, format, arg);
|
||||
done = vfprintf (&f, format, arg);
|
||||
|
||||
return done;
|
||||
}
|
||||
|
||||
+86
-53
@@ -1,62 +1,95 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)inet.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
/* Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
#ifndef _INET_H_
|
||||
#define _INET_H_
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
/* External definitions for functions in inet(3) */
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ARPA_INET_H
|
||||
|
||||
#define _ARPA_INET_H 1
|
||||
#include <features.h>
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h> /* To define `struct in_addr'. */
|
||||
|
||||
__BEGIN_DECLS
|
||||
u_long inet_addr __P((const char *));
|
||||
int inet_aton __P((const char *, struct in_addr *));
|
||||
u_int32_t inet_lnaof __P((struct in_addr));
|
||||
struct in_addr inet_makeaddr __P((u_int32_t , u_int32_t));
|
||||
char * inet_neta __P((u_long, char *, size_t));
|
||||
u_int32_t inet_netof __P((struct in_addr));
|
||||
u_int32_t inet_network __P((const char *));
|
||||
char *inet_net_ntop __P((int, const void *, int, char *, size_t));
|
||||
int inet_net_pton __P((int, const char *, void *, size_t));
|
||||
char *inet_ntoa __P((struct in_addr));
|
||||
int inet_pton __P((int, const char *, void *));
|
||||
const char *inet_ntop __P((int, const void *, char *, size_t));
|
||||
u_int inet_nsap_addr __P((const char *, u_char *, int));
|
||||
char *inet_nsap_ntoa __P((int, const u_char *, char *));
|
||||
|
||||
/* Convert Internet host address from numbers-and-dots notation in CP
|
||||
into binary data in network byte order. */
|
||||
extern u_int32_t inet_addr __P ((__const char *__cp));
|
||||
|
||||
/* Convert Internet host address from numbers-and-dots notation in CP
|
||||
into binary data and store the result in the structure INP. */
|
||||
extern int inet_aton __P ((__const char *__cp, struct in_addr *__inp));
|
||||
|
||||
/* Return the local host address part of the Internet address in IN. */
|
||||
extern u_int32_t inet_lnaof __P ((struct in_addr __in));
|
||||
|
||||
/* Make Internet host address in network byte order by combining the
|
||||
network number NET with the local address HOST. */
|
||||
extern struct in_addr inet_makeaddr __P ((u_int32_t __net, u_int32_t __host));
|
||||
|
||||
/* Format a network number NET into presentation format and place result
|
||||
in buffer starting at BUF with length of LEN bytes. */
|
||||
extern char *inet_neta __P ((u_int32_t __net, char *__buf, size_t __len));
|
||||
|
||||
/* Return network number part of the Internet address IN. */
|
||||
extern u_int32_t inet_netof __P ((struct in_addr __in));
|
||||
|
||||
/* Extract the network number in network byte order from the address
|
||||
in numbers-and-dots natation starting at CP. */
|
||||
extern u_int32_t inet_network __P ((__const char *__cp));
|
||||
|
||||
/* Convert network number for interface type AF in buffer starting at
|
||||
CP to presentation format. The result will specifiy BITS bits of
|
||||
the number. */
|
||||
extern char *inet_net_ntop __P((int __af, __const void *__cp, int __bits,
|
||||
char *__buf, size_t __len));
|
||||
|
||||
/* Convert network number for interface type AF from presentation in
|
||||
buffer starting at CP to network format and store result int
|
||||
buffer starting at BUF of size LEN. */
|
||||
extern int inet_net_pton __P ((int __af, __const char *__cp,
|
||||
void *__buf, size_t __len));
|
||||
|
||||
/* Convert Internet number in IN to ASCII representation. The return value
|
||||
is a pointer to an internal array containing the string. */
|
||||
extern char *inet_ntoa __P ((struct in_addr __in));
|
||||
|
||||
/* Convert from presentation format of an Internet number in buffer
|
||||
starting at CP to the binary network format and store result for
|
||||
interface type AF in buffer starting at BUF. */
|
||||
extern int inet_pton __P ((int __af, __const char *__cp, void *__buf));
|
||||
|
||||
/* Convert a Internet address in binary network format for interface
|
||||
type AF in buffer starting at CP to presentation form and place
|
||||
result in buffer of length LEN astarting at BUF. */
|
||||
extern __const char *inet_ntop __P ((int __af, __const void *__cp,
|
||||
char *__buf, size_t __len));
|
||||
|
||||
/* Convert ASCII representation in hexadecimal form of the Internet
|
||||
address to binary form and place result in buffer of length LEN
|
||||
starting at BUF. */
|
||||
extern unsigned int inet_nsap_addr __P ((__const char *__cp,
|
||||
unsigned char *__buf, int __len));
|
||||
|
||||
/* Convert internet address in binary form in LEN bytes starting at CP
|
||||
a presentation form and place result in BUF. */
|
||||
extern char *inet_nsap_ntoa __P ((int __len, __const unsigned char *__cp,
|
||||
char *__buf));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_INET_H_ */
|
||||
#endif /* arpa/inet.h */
|
||||
|
||||
+13
-13
@@ -33,8 +33,8 @@
|
||||
* @(#)tftp.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
|
||||
#ifndef _TFTP_H_
|
||||
#define _TFTP_H_
|
||||
#ifndef _ARPA_TFTP_H
|
||||
#define _ARPA_TFTP_H 1
|
||||
|
||||
/*
|
||||
* Trivial File Transfer Protocol (IEN-133)
|
||||
@@ -44,20 +44,20 @@
|
||||
/*
|
||||
* Packet types.
|
||||
*/
|
||||
#define RRQ 01 /* read request */
|
||||
#define WRQ 02 /* write request */
|
||||
#define DATA 03 /* data packet */
|
||||
#define ACK 04 /* acknowledgement */
|
||||
#define ERROR 05 /* error code */
|
||||
#define RRQ 01 /* read request */
|
||||
#define WRQ 02 /* write request */
|
||||
#define DATA 03 /* data packet */
|
||||
#define ACK 04 /* acknowledgement */
|
||||
#define ERROR 05 /* error code */
|
||||
|
||||
struct tftphdr {
|
||||
short th_opcode; /* packet type */
|
||||
short th_opcode; /* packet type */
|
||||
union {
|
||||
short tu_block; /* block # */
|
||||
short tu_code; /* error code */
|
||||
char tu_stuff[1]; /* request packet stuff */
|
||||
unsigned short tu_block; /* block # */
|
||||
short tu_code; /* error code */
|
||||
char tu_stuff[1]; /* request packet stuff */
|
||||
} th_u;
|
||||
char th_data[1]; /* data or error string */
|
||||
char th_data[1]; /* data or error string */
|
||||
};
|
||||
|
||||
#define th_block th_u.tu_block
|
||||
@@ -77,4 +77,4 @@ struct tftphdr {
|
||||
#define EEXISTS 6 /* file already exists */
|
||||
#define ENOUSER 7 /* no such user */
|
||||
|
||||
#endif /* !_TFTP_H_ */
|
||||
#endif /* arpa/tftp.h */
|
||||
|
||||
+89
-51
@@ -1,59 +1,97 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* Convert Inet number to ASCII representation.
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/*
|
||||
* Convert network-format internet address
|
||||
* to base 256 d.d.d.d representation.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <libc-lock.h>
|
||||
|
||||
/* The interface of this function is completely stupid, it requires a
|
||||
static buffer. We relax this a bit in that we allow at least one
|
||||
buffer for each thread. */
|
||||
|
||||
/* This is the key for the thread specific memory. */
|
||||
static __libc_key_t key;
|
||||
|
||||
/* If nonzero the key allocation failed and we should better use a
|
||||
static buffer than fail. */
|
||||
static char local_buf[18];
|
||||
static char *static_buf;
|
||||
|
||||
/* Destructor for the thread-specific data. */
|
||||
static void init (void);
|
||||
static void free_key_mem (void *mem);
|
||||
|
||||
|
||||
char *
|
||||
inet_ntoa(in)
|
||||
struct in_addr in;
|
||||
inet_ntoa (struct in_addr in)
|
||||
{
|
||||
static char b[18];
|
||||
register char *p;
|
||||
__libc_once_define (static, once);
|
||||
char *buffer;
|
||||
unsigned char *bytes;
|
||||
|
||||
p = (char *)∈
|
||||
#define UC(b) (((int)b)&0xff)
|
||||
(void)snprintf(b, sizeof(b),
|
||||
"%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
|
||||
return (b);
|
||||
/* If we have not yet initialized the buffer do it now. */
|
||||
__libc_once (once, init);
|
||||
|
||||
if (static_buf != NULL)
|
||||
buffer = static_buf;
|
||||
else
|
||||
{
|
||||
/* We don't use the static buffer and so we have a key. Use it
|
||||
to get the thread-specific buffer. */
|
||||
buffer = __libc_getspecific (key);
|
||||
if (buffer == NULL)
|
||||
{
|
||||
/* No buffer allocated so far. */
|
||||
buffer = malloc (18);
|
||||
if (buffer == NULL)
|
||||
/* No more memory available. We use the static buffer. */
|
||||
buffer = local_buf;
|
||||
else
|
||||
__libc_setspecific (key, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
bytes = (unsigned char *) ∈
|
||||
snprintf (buffer, 18, "%d.%d.%d.%d", bytes[0], bytes[1], bytes[2], bytes[3]);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
/* Initialize buffer. */
|
||||
static void
|
||||
init (void)
|
||||
{
|
||||
if (__libc_key_create (&key, free_key_mem))
|
||||
/* Creating the key failed. This means something really went
|
||||
wrong. In any case use a static buffer which is better than
|
||||
nothing. */
|
||||
static_buf = local_buf;
|
||||
}
|
||||
|
||||
|
||||
/* free the thread specific data, this is done if a thread terminates. */
|
||||
static void
|
||||
free_key_mem (void *mem)
|
||||
{
|
||||
free (mem);
|
||||
__libc_setspecific (key, NULL);
|
||||
}
|
||||
|
||||
+29
-23
@@ -1,21 +1,21 @@
|
||||
/* Functions for storing Ethernet addresses in ASCII and mapping to hostnames.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef __NETINET_ETHER_H
|
||||
|
||||
@@ -25,24 +25,30 @@ Boston, MA 02111-1307, USA. */
|
||||
/* Get definition of `struct ether_addr'. */
|
||||
#include <netinet/if_ether.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Convert 48 bit Ethernet ADDRess to ASCII. */
|
||||
char *ether_ntoa __P ((const struct ether_addr *__addr));
|
||||
char *ether_ntoa_r __P ((const struct ether_addr *__addr, char *__buf));
|
||||
extern char *ether_ntoa __P ((__const struct ether_addr *__addr));
|
||||
extern char *ether_ntoa_r __P ((__const struct ether_addr *__addr,
|
||||
char *__buf));
|
||||
|
||||
/* Convert ASCII string S to 48 bit Ethernet address. */
|
||||
struct ether_addr *ether_aton __P ((const char *__asc));
|
||||
struct ether_addr *ether_aton_r __P ((const char *__asc,
|
||||
struct ether_addr *__addr));
|
||||
extern struct ether_addr *ether_aton __P ((__const char *__asc));
|
||||
extern struct ether_addr *ether_aton_r __P ((__const char *__asc,
|
||||
struct ether_addr *__addr));
|
||||
|
||||
/* Map 48 bit Ethernet number ADDR to HOSTNAME. */
|
||||
int ether_ntohost __P ((char *__hostname, const struct ether_addr *__addr));
|
||||
extern int ether_ntohost __P ((char *__hostname,
|
||||
__const struct ether_addr *__addr));
|
||||
|
||||
/* Map HOSTNAME to 48 bit Ethernet address. */
|
||||
int ether_hostton __P ((const char *__hostname, struct ether_addr *__addr));
|
||||
extern int ether_hostton __P ((__const char *__hostname,
|
||||
struct ether_addr *__addr));
|
||||
|
||||
/* Scan LINE and set ADDR and HOSTNAME. */
|
||||
int ether_line __P ((const char *__line, struct ether_addr *__addr,
|
||||
char *__hostname));
|
||||
extern int ether_line __P ((__const char *__line, struct ether_addr *__addr,
|
||||
char *__hostname));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* netinet/ether.h */
|
||||
|
||||
+33
-29
@@ -105,7 +105,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
else
|
||||
(void)fprintf(stderr, "rcmd: socket: %m\n");
|
||||
sigsetmask(oldmask);
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
fcntl(s, F_SETOWN, pid);
|
||||
sin.sin_family = hp->h_addrtype;
|
||||
@@ -140,7 +140,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
}
|
||||
(void)fprintf(stderr, "%s: %m\n", hp->h_name);
|
||||
sigsetmask(oldmask);
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
lport--;
|
||||
if (fd2p == 0) {
|
||||
@@ -149,7 +149,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
} else {
|
||||
char num[8];
|
||||
int s2 = rresvport(&lport), s3;
|
||||
int len = sizeof(from);
|
||||
size_t len = sizeof(from);
|
||||
|
||||
if (s2 < 0)
|
||||
goto bad;
|
||||
@@ -211,14 +211,14 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
goto bad2;
|
||||
}
|
||||
sigsetmask(oldmask);
|
||||
return (s);
|
||||
return s;
|
||||
bad2:
|
||||
if (lport)
|
||||
(void)close(*fd2p);
|
||||
bad:
|
||||
(void)close(s);
|
||||
sigsetmask(oldmask);
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -232,20 +232,20 @@ rresvport(alport)
|
||||
sin.sin_addr.s_addr = INADDR_ANY;
|
||||
s = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (s < 0)
|
||||
return (-1);
|
||||
return -1;
|
||||
for (;;) {
|
||||
sin.sin_port = htons((u_short)*alport);
|
||||
if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
|
||||
return (s);
|
||||
return s;
|
||||
if (errno != EADDRINUSE) {
|
||||
(void)close(s);
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
(*alport)--;
|
||||
if (*alport == IPPORT_RESERVED/2) {
|
||||
(void)close(s);
|
||||
__set_errno (EAGAIN); /* close */
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -282,9 +282,9 @@ ruserok(rhost, superuser, ruser, luser)
|
||||
for (ap = hp->h_addr_list; *ap; ++ap) {
|
||||
bcopy(*ap, &addr, sizeof(addr));
|
||||
if (iruserok(addr, superuser, ruser, luser) == 0)
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -306,7 +306,6 @@ iruserok(raddr, superuser, ruser, luser)
|
||||
struct stat sbuf;
|
||||
struct passwd pwdbuf, *pwd;
|
||||
FILE *hostf;
|
||||
uid_t uid;
|
||||
int first;
|
||||
|
||||
first = 1;
|
||||
@@ -315,7 +314,7 @@ again:
|
||||
if (hostf) {
|
||||
if (__ivaliduser(hostf, raddr, luser, ruser) == 0) {
|
||||
(void)fclose(hostf);
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
(void)fclose(hostf);
|
||||
}
|
||||
@@ -326,7 +325,7 @@ again:
|
||||
char *buffer = __alloca (buflen);
|
||||
|
||||
first = 0;
|
||||
if (getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) < 0)
|
||||
if (__getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) < 0)
|
||||
return -1;
|
||||
|
||||
dirlen = strlen (pwd->pw_dir);
|
||||
@@ -339,13 +338,18 @@ again:
|
||||
* reading an NFS mounted file system, can't read files that
|
||||
* are protected read/write owner only.
|
||||
*/
|
||||
uid = geteuid();
|
||||
(void)seteuid(pwd->pw_uid);
|
||||
hostf = fopen(pbuf, "r");
|
||||
(void)seteuid(uid);
|
||||
if (__access (pbuf, R_OK) != 0)
|
||||
hostf = NULL;
|
||||
else
|
||||
{
|
||||
uid_t uid = geteuid ();
|
||||
seteuid (pwd->pw_uid);
|
||||
hostf = fopen (pbuf, "r");
|
||||
seteuid (uid);
|
||||
}
|
||||
|
||||
if (hostf == NULL)
|
||||
return (-1);
|
||||
return -1;
|
||||
/*
|
||||
* If not a regular file, or is owned by someone other than
|
||||
* user or root or if writeable by anyone but the owner, quit.
|
||||
@@ -365,11 +369,11 @@ again:
|
||||
if (cp) {
|
||||
__rcmd_errstr = cp;
|
||||
(void)fclose(hostf);
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
goto again;
|
||||
}
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -390,7 +394,7 @@ __ivaliduser(hostf, raddr, luser, ruser)
|
||||
size_t bufsize = 0;
|
||||
ssize_t nread;
|
||||
|
||||
while ((nread = getline (&buf, &bufsize, hostf)) > 0) {
|
||||
while ((nread = __getline (&buf, &bufsize, hostf)) > 0) {
|
||||
buf[bufsize - 1] = '\0'; /* Make sure it's terminated. */
|
||||
p = buf;
|
||||
while (*p != '\n' && *p != ' ' && *p != '\t' && *p != '\0') {
|
||||
@@ -411,11 +415,11 @@ __ivaliduser(hostf, raddr, luser, ruser)
|
||||
if (__icheckhost(raddr, buf) &&
|
||||
strcmp(ruser, *user ? user : luser) == 0) {
|
||||
free (buf);
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
free (buf);
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -426,7 +430,7 @@ __icheckhost(raddr, lhost)
|
||||
u_int32_t raddr;
|
||||
register char *lhost;
|
||||
{
|
||||
register struct hostent hostbuf, *hp;
|
||||
struct hostent hostbuf, *hp;
|
||||
size_t buflen;
|
||||
char *buffer;
|
||||
register u_int32_t laddr;
|
||||
@@ -435,7 +439,7 @@ __icheckhost(raddr, lhost)
|
||||
|
||||
/* Try for raw ip address first. */
|
||||
if (isdigit(*lhost) && (int32_t)(laddr = inet_addr(lhost)) != -1)
|
||||
return (raddr == laddr);
|
||||
return raddr == laddr;
|
||||
|
||||
/* Better be a hostname. */
|
||||
buflen = 1024;
|
||||
@@ -448,14 +452,14 @@ __icheckhost(raddr, lhost)
|
||||
{
|
||||
/* Enlarge the buffer. */
|
||||
buflen *= 2;
|
||||
buflen = __alloca (buflen);
|
||||
buffer = __alloca (buflen);
|
||||
}
|
||||
|
||||
/* Spin through ip addresses. */
|
||||
for (pp = hp->h_addr_list; *pp; ++pp)
|
||||
if (!bcmp(&raddr, *pp, sizeof(u_int32_t)))
|
||||
return (1);
|
||||
return 1;
|
||||
|
||||
/* No match. */
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ int
|
||||
rexec(ahost, rport, name, pass, cmd, fd2p)
|
||||
char **ahost;
|
||||
int rport;
|
||||
char *name, *pass, *cmd;
|
||||
const char *name, *pass, *cmd;
|
||||
int *fd2p;
|
||||
{
|
||||
struct sockaddr_in sin, sin2, from;
|
||||
|
||||
+2
-1
@@ -206,7 +206,8 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
|
||||
? strlen (modifier) + 1 : 0)
|
||||
+ ((mask & CEN_SPECIAL) != 0
|
||||
? strlen (special) + 1 : 0)
|
||||
+ ((mask & (CEN_SPONSOR | CEN_REVISION) != 0)
|
||||
+ (((mask & CEN_SPONSOR) != 0
|
||||
|| (mask & CEN_REVISION) != 0)
|
||||
? (1 + ((mask & CEN_SPONSOR) != 0
|
||||
? strlen (sponsor) + 1 : 0)
|
||||
+ ((mask & CEN_REVISION) != 0
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/* loadmsgcat.c -- load needed message catalogs
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 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.
|
||||
@@ -94,7 +94,7 @@ _nl_load_domain (domain_file)
|
||||
|
||||
/* We must know about the size of the file. */
|
||||
if (fstat (fd, &st) != 0
|
||||
&& st.st_size < (off_t) sizeof (struct mo_file_header))
|
||||
|| st.st_size < (off_t) sizeof (struct mo_file_header))
|
||||
{
|
||||
/* Something went wrong. */
|
||||
close (fd);
|
||||
|
||||
+14
-12
@@ -1,5 +1,5 @@
|
||||
/* localealias.c -- handle aliases for locale names
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 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.
|
||||
@@ -229,6 +229,19 @@ read_alias_file (fname, fname_len)
|
||||
/* EOF reached. */
|
||||
break;
|
||||
|
||||
/* Possibly not the whole line fits into the buffer. Ignore
|
||||
the rest of the line. */
|
||||
if (strchr (buf, '\n') == NULL)
|
||||
{
|
||||
char altbuf[BUFSIZ];
|
||||
do
|
||||
if (fgets (altbuf, sizeof altbuf, fp) == NULL)
|
||||
/* Make sure the inner loop will be left. The outer loop
|
||||
will exit at the `feof' test. */
|
||||
break;
|
||||
while (strchr (altbuf, '\n') == NULL);
|
||||
}
|
||||
|
||||
cp = buf;
|
||||
/* Ignore leading white space. */
|
||||
while (isspace (cp[0]))
|
||||
@@ -296,17 +309,6 @@ read_alias_file (fname, fname_len)
|
||||
++added;
|
||||
}
|
||||
}
|
||||
|
||||
/* Possibly not the whole line fits into the buffer. Ignore
|
||||
the rest of the line. */
|
||||
while (strchr (cp, '\n') == NULL)
|
||||
{
|
||||
cp = buf;
|
||||
if (fgets (buf, BUFSIZ, fp) == NULL)
|
||||
/* Make sure the inner loop will be left. The outer loop
|
||||
will exit at the `feof' test. */
|
||||
*cp = '\n';
|
||||
}
|
||||
}
|
||||
|
||||
/* Should we test for ferror()? I think we have to silently ignore
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#define _FTW_H 1
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <statbuf.h>
|
||||
|
||||
/* The FLAG argument to the user function passed to ftw. */
|
||||
@@ -41,4 +43,6 @@ extern int ftw __P ((__const char *__dir,
|
||||
int __flag),
|
||||
int __descriptors));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* ftw.h */
|
||||
|
||||
+17
-14
@@ -1,25 +1,26 @@
|
||||
/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
/* lockf is a simplified interface to fcntl's locking facilities. */
|
||||
|
||||
@@ -28,6 +29,8 @@ lockf (int fd, int cmd, off_t len)
|
||||
{
|
||||
struct flock fl;
|
||||
|
||||
memset ((char *) &fl, '\0', sizeof (fl));
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case F_TEST:
|
||||
|
||||
+14
-7
@@ -138,8 +138,8 @@ DEFUN(_IO_file_close_it, (fp),
|
||||
}
|
||||
|
||||
void
|
||||
DEFUN(_IO_file_finish, (fp),
|
||||
register _IO_FILE* fp)
|
||||
DEFUN(_IO_file_finish, (fp, dummy),
|
||||
register _IO_FILE* fp AND int dummy)
|
||||
{
|
||||
if (_IO_file_is_open(fp))
|
||||
{
|
||||
@@ -147,7 +147,7 @@ DEFUN(_IO_file_finish, (fp),
|
||||
if (!(fp->_flags & _IO_DELETE_DONT_CLOSE))
|
||||
_IO_SYSCLOSE (fp);
|
||||
}
|
||||
_IO_default_finish(fp);
|
||||
_IO_default_finish(fp, 0);
|
||||
}
|
||||
|
||||
_IO_FILE *
|
||||
@@ -291,6 +291,15 @@ DEFUN(_IO_file_underflow, (fp),
|
||||
|
||||
_IO_switch_to_get_mode(fp);
|
||||
|
||||
/* This is very tricky. We have to adjust those
|
||||
pointers before we call _IO_SYSREAD () since
|
||||
we may longjump () out while waiting for
|
||||
input. Those pointers may be screwed up. H.J. */
|
||||
fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base;
|
||||
fp->_IO_read_end = fp->_IO_buf_base;
|
||||
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end
|
||||
= fp->_IO_buf_base;
|
||||
|
||||
count = _IO_SYSREAD (fp, fp->_IO_buf_base,
|
||||
fp->_IO_buf_end - fp->_IO_buf_base);
|
||||
if (count <= 0)
|
||||
@@ -300,10 +309,7 @@ DEFUN(_IO_file_underflow, (fp),
|
||||
else
|
||||
fp->_flags |= _IO_ERR_SEEN, count = 0;
|
||||
}
|
||||
fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base;
|
||||
fp->_IO_read_end = fp->_IO_buf_base + count;
|
||||
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end
|
||||
= fp->_IO_buf_base;
|
||||
fp->_IO_read_end += count;
|
||||
if (count == 0)
|
||||
return EOF;
|
||||
if (fp->_offset != _IO_pos_BAD)
|
||||
@@ -317,6 +323,7 @@ DEFUN(_IO_file_overflow, (f, ch),
|
||||
{
|
||||
if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
|
||||
{
|
||||
f->_flags |= _IO_ERR_SEEN;
|
||||
__set_errno (EBADF);
|
||||
return EOF;
|
||||
}
|
||||
|
||||
+3
-3
@@ -481,8 +481,8 @@ DEFUN(_IO_default_sync, (fp),
|
||||
current implementation, this function can get called twice! */
|
||||
|
||||
void
|
||||
DEFUN(_IO_default_finish, (fp),
|
||||
_IO_FILE *fp)
|
||||
DEFUN(_IO_default_finish, (fp, dummy),
|
||||
_IO_FILE *fp AND int dummy)
|
||||
{
|
||||
struct _IO_marker *mark;
|
||||
if (fp->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
|
||||
@@ -615,7 +615,7 @@ DEFUN_VOID(_IO_flush_all_linebuffered)
|
||||
{
|
||||
_IO_FILE *fp;
|
||||
for (fp = _IO_list_all; fp != NULL; fp = fp->_chain)
|
||||
if (fp->_flags & _IO_LINE_BUF)
|
||||
if ((fp->_flags & _IO_NO_WRITES) == 0 && fp->_flags & _IO_LINE_BUF)
|
||||
_IO_OVERFLOW (fp, EOF);
|
||||
}
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ the executable file might be covered by the GNU General Public License. */
|
||||
#define _IO_CURRENTLY_PUTTING 0x800
|
||||
#define _IO_IS_APPENDING 0x1000
|
||||
#define _IO_IS_FILEBUF 0x2000
|
||||
#define _IO_BAD_SEEN 0x4000
|
||||
|
||||
/* These are "formatting flags" matching the iostream fmtflags enum values. */
|
||||
#define _IO_SKIPWS 01
|
||||
@@ -145,6 +146,7 @@ the executable file might be covered by the GNU General Public License. */
|
||||
#define _IO_UNITBUF 020000
|
||||
#define _IO_STDIO 040000
|
||||
#define _IO_DONT_CLOSE 0100000
|
||||
#define _IO_BOOLALPHA 0200000
|
||||
|
||||
|
||||
struct _IO_jump_t; struct _IO_FILE;
|
||||
|
||||
+5
-5
@@ -101,8 +101,8 @@ extern "C" {
|
||||
/* The 'finish' function does any final cleaning up of an _IO_FILE object.
|
||||
It does not delete (free) it, but does everything else to finalize it/
|
||||
It matches the streambuf::~streambuf virtual destructor. */
|
||||
typedef void (*_IO_finish_t) __P((_IO_FILE*)); /* finalize */
|
||||
#define _IO_FINISH(FP) JUMP0(__finish, FP)
|
||||
typedef void (*_IO_finish_t) __P((_IO_FILE*, int)); /* finalize */
|
||||
#define _IO_FINISH(FP) JUMP1(__finish, FP, 0)
|
||||
|
||||
/* The 'overflow' hook flushes the buffer.
|
||||
The second argument is a character, or EOF.
|
||||
@@ -295,7 +295,7 @@ extern int _IO_seekmark __P((_IO_FILE *, struct _IO_marker *, int));
|
||||
extern int _IO_default_underflow __P((_IO_FILE*));
|
||||
extern int _IO_default_uflow __P((_IO_FILE*));
|
||||
extern int _IO_default_doallocate __P((_IO_FILE*));
|
||||
extern void _IO_default_finish __P((_IO_FILE *));
|
||||
extern void _IO_default_finish __P((_IO_FILE *, int));
|
||||
extern int _IO_default_pbackfail __P((_IO_FILE*, int));
|
||||
extern _IO_FILE* _IO_default_setbuf __P((_IO_FILE *, char*, _IO_ssize_t));
|
||||
extern _IO_size_t _IO_default_xsputn __P((_IO_FILE *, const void*, _IO_size_t));
|
||||
@@ -352,7 +352,7 @@ extern _IO_ssize_t _IO_file_read __P((_IO_FILE*, void*, _IO_ssize_t));
|
||||
extern int _IO_file_sync __P((_IO_FILE*));
|
||||
extern int _IO_file_close_it __P((_IO_FILE*));
|
||||
extern _IO_fpos_t _IO_file_seek __P((_IO_FILE *, _IO_off_t, int));
|
||||
extern void _IO_file_finish __P((_IO_FILE*));
|
||||
extern void _IO_file_finish __P((_IO_FILE*, int));
|
||||
|
||||
/* Other file functions. */
|
||||
extern _IO_FILE* _IO_file_attach __P((_IO_FILE *, int));
|
||||
@@ -366,7 +366,7 @@ extern int _IO_str_underflow __P((_IO_FILE*));
|
||||
extern int _IO_str_overflow __P((_IO_FILE *, int));
|
||||
extern int _IO_str_pbackfail __P((_IO_FILE*, int));
|
||||
extern _IO_fpos_t _IO_str_seekoff __P((_IO_FILE*,_IO_off_t,int,int));
|
||||
extern void _IO_str_finish __P ((_IO_FILE*));
|
||||
extern void _IO_str_finish __P ((_IO_FILE*, int));
|
||||
|
||||
/* Other strfile functions */
|
||||
extern void _IO_str_init_static __P((_IO_FILE *, char*, int, char*));
|
||||
|
||||
+18
-17
@@ -1,20 +1,20 @@
|
||||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "libioP.h"
|
||||
#include "strfile.h"
|
||||
@@ -31,7 +31,7 @@ struct _IO_FILE_memstream
|
||||
|
||||
|
||||
static int _IO_mem_sync __P ((_IO_FILE* fp));
|
||||
static void _IO_mem_finish __P ((_IO_FILE* fp));
|
||||
static void _IO_mem_finish __P ((_IO_FILE* fp, int));
|
||||
|
||||
|
||||
static const struct _IO_jump_t _IO_mem_jumps =
|
||||
@@ -124,8 +124,9 @@ _IO_mem_sync (fp)
|
||||
|
||||
|
||||
static void
|
||||
_IO_mem_finish (fp)
|
||||
_IO_mem_finish (fp, dummy)
|
||||
_IO_FILE* fp;
|
||||
int dummy;
|
||||
{
|
||||
struct _IO_FILE_memstream *mp = (struct _IO_FILE_memstream *) fp;
|
||||
|
||||
@@ -139,5 +140,5 @@ _IO_mem_finish (fp)
|
||||
|
||||
fp->_IO_buf_base = NULL;
|
||||
|
||||
_IO_default_finish (fp);
|
||||
_IO_default_finish (fp, 0);
|
||||
}
|
||||
|
||||
@@ -48,3 +48,10 @@ DEF_STDFILE(_IO_stderr_, 2, &_IO_stdout_.file,
|
||||
_IO_NO_READS+_IO_UNBUFFERED);
|
||||
|
||||
_IO_FILE *_IO_list_all = &_IO_stderr_.file;
|
||||
|
||||
#ifdef _G_USING_THUNKS
|
||||
#if defined(__GNUC__) && __GNUC__ >= 2
|
||||
const
|
||||
#endif
|
||||
int _libio_using_thunks = 1;
|
||||
#endif
|
||||
|
||||
+8
-6
@@ -176,7 +176,7 @@ extern int obstack_printf __P ((struct obstack *__obstack, __const char *__fmt,
|
||||
...));
|
||||
#endif
|
||||
|
||||
#if !defined(__STRICT_ANSI__) || defined(_POSIX_SOURCE)
|
||||
#if !defined(__STRICT_ANSI__) || defined(__USE_POSIX)
|
||||
extern FILE *fdopen __P ((int, __const char *));
|
||||
extern int fileno __P ((FILE*));
|
||||
extern FILE* popen __P ((__const char*, __const char*));
|
||||
@@ -192,15 +192,17 @@ extern char *ctermid __P ((char *__buf));
|
||||
extern char *cuserid __P ((char * __buf));
|
||||
#endif
|
||||
|
||||
#ifdef __USE_GNU
|
||||
extern _IO_ssize_t getdelim __P ((char **, size_t *, int, FILE*));
|
||||
extern _IO_ssize_t getline __P ((char **, size_t *, FILE *));
|
||||
extern _IO_ssize_t __getline __P ((char **, size_t *, FILE *));
|
||||
|
||||
#if defined __USE_BSD
|
||||
extern int snprintf __P ((char *, size_t, __const char *, ...));
|
||||
extern int __snprintf __P ((char *, size_t, __const char *, ...));
|
||||
extern int vsnprintf __P ((char *, size_t, __const char *, _G_va_list));
|
||||
extern int __vsnprintf __P ((char *, size_t, __const char *, _G_va_list));
|
||||
#endif
|
||||
|
||||
#ifdef __USE_GNU
|
||||
extern _IO_ssize_t getdelim __P ((char **, size_t *, int, FILE*));
|
||||
extern _IO_ssize_t getline __P ((char **, size_t *, FILE *));
|
||||
extern _IO_ssize_t __getline __P ((char **, size_t *, FILE *));
|
||||
|
||||
extern int asprintf __P ((char **, const char *, ...));
|
||||
extern int vasprintf __P ((char **, const char *, _G_va_list));
|
||||
|
||||
+5
-5
@@ -88,7 +88,7 @@ DEFUN(_IO_str_init_static, (fp, ptr, size, pstart),
|
||||
if (pstart)
|
||||
{
|
||||
fp->_IO_write_ptr = pstart;
|
||||
fp->_IO_write_end = ptr+size;
|
||||
fp->_IO_write_end = ptr + size;
|
||||
fp->_IO_read_end = pstart;
|
||||
}
|
||||
else
|
||||
@@ -193,7 +193,7 @@ _IO_ssize_t
|
||||
DEFUN(_IO_str_count, (fp),
|
||||
register _IO_FILE *fp)
|
||||
{
|
||||
return (fp->_IO_write_ptr > fp->_IO_read_end ? fp->_IO_write_ptr
|
||||
return (fp->_IO_write_end > fp->_IO_read_end ? fp->_IO_write_end
|
||||
: fp->_IO_read_end)
|
||||
- fp->_IO_read_base;
|
||||
}
|
||||
@@ -258,14 +258,14 @@ DEFUN(_IO_str_pbackfail, (fp, c),
|
||||
}
|
||||
|
||||
void
|
||||
DEFUN (_IO_str_finish, (fp),
|
||||
register _IO_FILE* fp)
|
||||
DEFUN (_IO_str_finish, (fp, dummy),
|
||||
register _IO_FILE* fp AND int dummy)
|
||||
{
|
||||
if (fp->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
|
||||
(((_IO_strfile*)fp)->_s._free_buffer)(fp->_IO_buf_base);
|
||||
fp->_IO_buf_base = NULL;
|
||||
|
||||
_IO_default_finish(fp);
|
||||
_IO_default_finish(fp, 0);
|
||||
}
|
||||
|
||||
struct _IO_jump_t _IO_str_jumps = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1996, 1997 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
|
||||
@@ -43,6 +43,12 @@
|
||||
#define _LIBC_LIMITS_H_ /* This tells it not to look for another. */
|
||||
#endif
|
||||
#ifndef _GCC_LIMITS_H_ /* This is what GCC's file defines. */
|
||||
|
||||
/* Maximum length of any multibyte character in any locale. We
|
||||
define this here to prevent the value from the gcc value (which is
|
||||
one) to take effect. */
|
||||
#define MB_LEN_MAX 6
|
||||
|
||||
#include_next <limits.h>
|
||||
#endif
|
||||
|
||||
|
||||
+87
-87
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
@@ -95,92 +95,92 @@ const char _nl_C_LC_CTYPE_class[768] =
|
||||
/* 0xfa */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
|
||||
;
|
||||
const char _nl_C_LC_CTYPE_class32[1024] =
|
||||
/* 0x00 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x03 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x06 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x09 */ "\000\000\003\040" "\000\000\002\040" "\000\000\002\040"
|
||||
/* 0x0c */ "\000\000\002\040" "\000\000\002\040" "\000\000\002\000"
|
||||
/* 0x0f */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x12 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x15 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x18 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x1b */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x1e */ "\000\000\002\000" "\000\000\002\000" "\000\000\001\140"
|
||||
/* 0x21 */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
|
||||
/* 0x24 */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
|
||||
/* 0x27 */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
|
||||
/* 0x2a */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
|
||||
/* 0x2d */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
|
||||
/* 0x30 */ "\000\000\010\330" "\000\000\010\330" "\000\000\010\330"
|
||||
/* 0x33 */ "\000\000\010\330" "\000\000\010\330" "\000\000\010\330"
|
||||
/* 0x36 */ "\000\000\010\330" "\000\000\010\330" "\000\000\010\330"
|
||||
/* 0x39 */ "\000\000\010\330" "\000\000\004\300" "\000\000\004\300"
|
||||
/* 0x3c */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
|
||||
/* 0x3f */ "\000\000\004\300" "\000\000\004\300" "\000\000\010\325"
|
||||
/* 0x42 */ "\000\000\010\325" "\000\000\010\325" "\000\000\010\325"
|
||||
/* 0x45 */ "\000\000\010\325" "\000\000\010\325" "\000\000\010\305"
|
||||
/* 0x48 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
|
||||
/* 0x4b */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
|
||||
/* 0x4e */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
|
||||
/* 0x51 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
|
||||
/* 0x54 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
|
||||
/* 0x57 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
|
||||
/* 0x5a */ "\000\000\010\305" "\000\000\004\300" "\000\000\004\300"
|
||||
/* 0x5d */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
|
||||
/* 0x60 */ "\000\000\004\300" "\000\000\010\326" "\000\000\010\326"
|
||||
/* 0x63 */ "\000\000\010\326" "\000\000\010\326" "\000\000\010\326"
|
||||
/* 0x66 */ "\000\000\010\326" "\000\000\010\306" "\000\000\010\306"
|
||||
/* 0x69 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
|
||||
/* 0x6c */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
|
||||
/* 0x6f */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
|
||||
/* 0x72 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
|
||||
/* 0x75 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
|
||||
/* 0x78 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
|
||||
/* 0x7b */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
|
||||
/* 0x7e */ "\000\000\004\300" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x81 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x84 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x87 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x8a */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x8d */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x90 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x93 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x96 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x99 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x9c */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0x9f */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xa2 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xa5 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xa8 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xab */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xae */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xb1 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xb4 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xb7 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xba */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xbd */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xc0 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xc3 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xc6 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xc9 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xcc */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xcf */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xd2 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xd5 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xd8 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xdb */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xde */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xe1 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xe4 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xe7 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xea */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xed */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xf0 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xf3 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xf6 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xf9 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xfc */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
|
||||
/* 0xff */ "\000\000\002\000"
|
||||
/* 0x00 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x03 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x06 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x09 */ "\003\040\000\000" "\002\040\000\000" "\002\040\000\000"
|
||||
/* 0x0c */ "\002\040\000\000" "\002\040\000\000" "\002\000\000\000"
|
||||
/* 0x0f */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x12 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x15 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x18 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x1b */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x1e */ "\002\000\000\000" "\002\000\000\000" "\001\140\000\000"
|
||||
/* 0x21 */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
|
||||
/* 0x24 */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
|
||||
/* 0x27 */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
|
||||
/* 0x2a */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
|
||||
/* 0x2d */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
|
||||
/* 0x30 */ "\010\330\000\000" "\010\330\000\000" "\010\330\000\000"
|
||||
/* 0x33 */ "\010\330\000\000" "\010\330\000\000" "\010\330\000\000"
|
||||
/* 0x36 */ "\010\330\000\000" "\010\330\000\000" "\010\330\000\000"
|
||||
/* 0x39 */ "\010\330\000\000" "\004\300\000\000" "\004\300\000\000"
|
||||
/* 0x3c */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
|
||||
/* 0x3f */ "\004\300\000\000" "\004\300\000\000" "\010\325\000\000"
|
||||
/* 0x42 */ "\010\325\000\000" "\010\325\000\000" "\010\325\000\000"
|
||||
/* 0x45 */ "\010\325\000\000" "\010\325\000\000" "\010\305\000\000"
|
||||
/* 0x48 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
|
||||
/* 0x4b */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
|
||||
/* 0x4e */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
|
||||
/* 0x51 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
|
||||
/* 0x54 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
|
||||
/* 0x57 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
|
||||
/* 0x5a */ "\010\305\000\000" "\004\300\000\000" "\004\300\000\000"
|
||||
/* 0x5d */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
|
||||
/* 0x60 */ "\004\300\000\000" "\010\326\000\000" "\010\326\000\000"
|
||||
/* 0x63 */ "\010\326\000\000" "\010\326\000\000" "\010\326\000\000"
|
||||
/* 0x66 */ "\010\326\000\000" "\010\306\000\000" "\010\306\000\000"
|
||||
/* 0x69 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
|
||||
/* 0x6c */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
|
||||
/* 0x6f */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
|
||||
/* 0x72 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
|
||||
/* 0x75 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
|
||||
/* 0x78 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
|
||||
/* 0x7b */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
|
||||
/* 0x7e */ "\004\300\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x81 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x84 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x87 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x8a */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x8d */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x90 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x93 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x96 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x99 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x9c */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0x9f */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xa2 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xa5 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xa8 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xab */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xae */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xb1 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xb4 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xb7 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xba */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xbd */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xc0 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xc3 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xc6 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xc9 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xcc */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xcf */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xd2 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xd5 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xd8 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xdb */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xde */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xe1 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xe4 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xe7 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xea */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xed */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xf0 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xf3 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xf6 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xf9 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xfc */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
|
||||
/* 0xff */ "\002\000\000\000"
|
||||
;
|
||||
const u_int32_t _nl_C_LC_CTYPE_toupper[384] =
|
||||
{
|
||||
|
||||
+2
-1
@@ -26,7 +26,7 @@ const struct locale_data _nl_C_LC_TIME =
|
||||
{
|
||||
_nl_C_name,
|
||||
NULL, 0, /* no file mapped */
|
||||
53,
|
||||
54,
|
||||
{
|
||||
{ string: "Sun" },
|
||||
{ string: "Mon" },
|
||||
@@ -79,6 +79,7 @@ const struct locale_data _nl_C_LC_TIME =
|
||||
{ string: "" },
|
||||
{ string: "" },
|
||||
{ word: 0 },
|
||||
{ word: 0 },
|
||||
{ string: "" },
|
||||
{ string: "" },
|
||||
}
|
||||
|
||||
+4
-3
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 1992, 1995, 1996, 1997 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
|
||||
@@ -73,12 +73,13 @@ localepath = "$(localedir):$(i18ndir)"
|
||||
|
||||
CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
|
||||
-DLOCALEDIR='"$(localedir)"' \
|
||||
-DLOCALE_ALIAS_PATH='"$(localedir):$(i18ndir)"' \
|
||||
-DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
|
||||
-DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
|
||||
-Iprograms $(CPPFLAGS)
|
||||
|
||||
CFLAGS-charmap.c = -Wno-write-strings
|
||||
CFLAGS-locfile.c = -Wno-write-strings
|
||||
CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
|
||||
CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
|
||||
|
||||
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
||||
# This ensures they will load libc.so for needed symbols if loaded by
|
||||
|
||||
+159
-145
@@ -1,171 +1,185 @@
|
||||
/*
|
||||
* Defines the valid international currency symbols according to ISO-4217.
|
||||
* Defines the valid international currency symbols according to ISO 4217.
|
||||
* This is used in monetary.c(monetary_check).
|
||||
*
|
||||
* If you find something missing or wrong contact <bug-glibc@prep.ai.mit.edu>
|
||||
*
|
||||
* !!! The list has to be sorted !!!
|
||||
*/
|
||||
DEFINE_INT_CURR("AED ") /* United Arab Emirates */
|
||||
DEFINE_INT_CURR("AFA ") /* Afghanistan */
|
||||
DEFINE_INT_CURR("ALL ") /* Albania */
|
||||
DEFINE_INT_CURR("ADP ") /* Andorran Peseta */
|
||||
DEFINE_INT_CURR("AED ") /* United Arab Emirates Dirham */
|
||||
DEFINE_INT_CURR("AFA ") /* Afghanistan Afgani */
|
||||
DEFINE_INT_CURR("ALL ") /* Albanian Lek */
|
||||
DEFINE_INT_CURR("AMD ") /* Armenia Dram */
|
||||
DEFINE_INT_CURR("ANG ") /* Netherlands Antilles */
|
||||
DEFINE_INT_CURR("AOK ") /* Angola */
|
||||
DEFINE_INT_CURR("ARP ") /* Argentina */
|
||||
DEFINE_INT_CURR("ATS ") /* Austria */
|
||||
DEFINE_INT_CURR("AUD ") /* Australia */
|
||||
DEFINE_INT_CURR("BBD ") /* Barbados */
|
||||
DEFINE_INT_CURR("BDT ") /* Bangladesh */
|
||||
DEFINE_INT_CURR("BEF ") /* Belgium */
|
||||
DEFINE_INT_CURR("BGL ") /* Bulgaria */
|
||||
DEFINE_INT_CURR("BHD ") /* Bahrain */
|
||||
DEFINE_INT_CURR("AOK ") /* Angolan Kwanza */
|
||||
DEFINE_INT_CURR("ARP ") /* Argentine Peso */
|
||||
DEFINE_INT_CURR("ATS ") /* Austrian Schilling */
|
||||
DEFINE_INT_CURR("AUD ") /* Australian Dollar */
|
||||
DEFINE_INT_CURR("AZM ") /* Azerbaijan Manat */
|
||||
DEFINE_INT_CURR("BBD ") /* Barbados Dollar */
|
||||
DEFINE_INT_CURR("BDT ") /* Bangladesh Taka */
|
||||
DEFINE_INT_CURR("BEF ") /* Belgian Franc */
|
||||
DEFINE_INT_CURR("BGL ") /* Bulgarian Lev */
|
||||
DEFINE_INT_CURR("BHD ") /* Bahraini Dinar */
|
||||
DEFINE_INT_CURR("BIF ") /* Burundi */
|
||||
DEFINE_INT_CURR("BMD ") /* Burmuda */
|
||||
DEFINE_INT_CURR("BND ") /* Brunei */
|
||||
DEFINE_INT_CURR("BOP ") /* Bolivia */
|
||||
DEFINE_INT_CURR("BRC ") /* Brazil */
|
||||
DEFINE_INT_CURR("BSD ") /* Bahamas */
|
||||
DEFINE_INT_CURR("BMD ") /* Burmudian Dollar */
|
||||
DEFINE_INT_CURR("BND ") /* Brunei Dollar */
|
||||
DEFINE_INT_CURR("BOP ") /* Bolivian Boliviano */
|
||||
DEFINE_INT_CURR("BPS ") /* Canton and Enderbury Islands */
|
||||
DEFINE_INT_CURR("BRC ") /* Brazil Real */
|
||||
DEFINE_INT_CURR("BSD ") /* Bahamas Dollar */
|
||||
DEFINE_INT_CURR("BTN ") /* Bhutan Ngultrum */
|
||||
DEFINE_INT_CURR("BUK ") /* Burma */
|
||||
DEFINE_INT_CURR("BWP ") /* Botswana */
|
||||
DEFINE_INT_CURR("BZD ") /* Belize */
|
||||
DEFINE_INT_CURR("CAD ") /* Canada */
|
||||
DEFINE_INT_CURR("CHF ") /* Switzerland, Liechtenstein */
|
||||
DEFINE_INT_CURR("CLP ") /* Chile */
|
||||
DEFINE_INT_CURR("CNY ") /* China */
|
||||
DEFINE_INT_CURR("COP ") /* Colombia */
|
||||
DEFINE_INT_CURR("CRC ") /* Costa Rica */
|
||||
DEFINE_INT_CURR("CSK ") /* Czechoslovakia */
|
||||
DEFINE_INT_CURR("CUP ") /* Cuba */
|
||||
DEFINE_INT_CURR("CVE ") /* Cape Verde */
|
||||
DEFINE_INT_CURR("CYP ") /* Cyprus */
|
||||
DEFINE_INT_CURR("DEM ") /* Germany */
|
||||
DEFINE_INT_CURR("DJF ") /* Djibouti */
|
||||
DEFINE_INT_CURR("DKK ") /* Denmark */
|
||||
DEFINE_INT_CURR("BWP ") /* Botswana Pula */
|
||||
DEFINE_INT_CURR("BZD ") /* Belize Dollar */
|
||||
DEFINE_INT_CURR("CAD ") /* Canadian Dollar */
|
||||
DEFINE_INT_CURR("CFP ") /* French Pacific Island Franc */
|
||||
DEFINE_INT_CURR("CHF ") /* Swiss Franc (Liechtenstein) */
|
||||
DEFINE_INT_CURR("CLP ") /* Chilean Peso */
|
||||
DEFINE_INT_CURR("CNY ") /* China Renminbi */
|
||||
DEFINE_INT_CURR("COP ") /* Colombian Peso */
|
||||
DEFINE_INT_CURR("CRC ") /* Costa Rican Colon */
|
||||
DEFINE_INT_CURR("CUP ") /* Cuban Peso */
|
||||
DEFINE_INT_CURR("CVE ") /* Cape Verde Escudo */
|
||||
DEFINE_INT_CURR("CYP ") /* Cypriot Pound */
|
||||
DEFINE_INT_CURR("CZK ") /* Czech Koruna */
|
||||
DEFINE_INT_CURR("DEM ") /* German Mark */
|
||||
DEFINE_INT_CURR("DJF ") /* Djibouti Franc */
|
||||
DEFINE_INT_CURR("DKK ") /* Danish Krone (Faroe Islands) */
|
||||
DEFINE_INT_CURR("DOP ") /* Dominican Republic */
|
||||
DEFINE_INT_CURR("DZD ") /* Algeria */
|
||||
DEFINE_INT_CURR("ECS ") /* Ecuador */
|
||||
DEFINE_INT_CURR("EEK ") /* Estonia */
|
||||
DEFINE_INT_CURR("EGP ") /* Egypt */
|
||||
DEFINE_INT_CURR("ESP ") /* Spain */
|
||||
DEFINE_INT_CURR("ETB ") /* Ethiopia */
|
||||
DEFINE_INT_CURR("FIM ") /* Finland */
|
||||
DEFINE_INT_CURR("FJD ") /* Fiji */
|
||||
DEFINE_INT_CURR("FKP ") /* Falkland Islands (Malvinas) */
|
||||
DEFINE_INT_CURR("FRF ") /* France */
|
||||
DEFINE_INT_CURR("GBP ") /* Great Britain */
|
||||
DEFINE_INT_CURR("GHC ") /* Ghana */
|
||||
DEFINE_INT_CURR("GIP ") /* Gibraltar */
|
||||
DEFINE_INT_CURR("GMD ") /* Gambia */
|
||||
DEFINE_INT_CURR("GNS ") /* Guinea */
|
||||
DEFINE_INT_CURR("DZD ") /* Algerian Dinar */
|
||||
DEFINE_INT_CURR("ECS ") /* Ecuadoran Sucre */
|
||||
DEFINE_INT_CURR("EEK ") /* Estonian Kroon */
|
||||
DEFINE_INT_CURR("EGP ") /* Egyptian Pound */
|
||||
DEFINE_INT_CURR("ESP ") /* Spanish Peseta */
|
||||
DEFINE_INT_CURR("ETB ") /* Ethiopian Birr */
|
||||
DEFINE_INT_CURR("FIM ") /* Finnish Markka */
|
||||
DEFINE_INT_CURR("FJD ") /* Fiji Dollar */
|
||||
DEFINE_INT_CURR("FKP ") /* Falkland Islands Pound (Malvinas) */
|
||||
DEFINE_INT_CURR("FRF ") /* French Franc */
|
||||
DEFINE_INT_CURR("GBP ") /* British Pound */
|
||||
DEFINE_INT_CURR("GEK ") /* Georgia Lari */
|
||||
DEFINE_INT_CURR("GHC ") /* Ghana Cedi */
|
||||
DEFINE_INT_CURR("GIP ") /* Gibraltar Pound */
|
||||
DEFINE_INT_CURR("GMD ") /* Gambian Dalasi */
|
||||
DEFINE_INT_CURR("GNS ") /* Guinea Franc */
|
||||
DEFINE_INT_CURR("GQE ") /* Equatorial Guinea */
|
||||
DEFINE_INT_CURR("GRD ") /* Greece */
|
||||
DEFINE_INT_CURR("GTQ ") /* Guatemala */
|
||||
DEFINE_INT_CURR("GWP ") /* Guinea-Bissau */
|
||||
DEFINE_INT_CURR("GYD ") /* Guyana */
|
||||
DEFINE_INT_CURR("HKD ") /* Hong Kong */
|
||||
DEFINE_INT_CURR("HNL ") /* Honduras */
|
||||
DEFINE_INT_CURR("HRD ") /* Croatia */
|
||||
DEFINE_INT_CURR("HTG ") /* Haiti */
|
||||
DEFINE_INT_CURR("HUF ") /* Hungary */
|
||||
DEFINE_INT_CURR("IDR ") /* Indonesia */
|
||||
DEFINE_INT_CURR("IEP ") /* Ireland */
|
||||
DEFINE_INT_CURR("ILS ") /* Israel */
|
||||
DEFINE_INT_CURR("INR ") /* India, Bhutan */
|
||||
DEFINE_INT_CURR("IQD ") /* Iraq */
|
||||
DEFINE_INT_CURR("IRR ") /* Iran */
|
||||
DEFINE_INT_CURR("ISK ") /* Iceland */
|
||||
DEFINE_INT_CURR("ITL ") /* Italy */
|
||||
DEFINE_INT_CURR("JMD ") /* Jamaica */
|
||||
DEFINE_INT_CURR("JOD ") /* Jordan */
|
||||
DEFINE_INT_CURR("JPY ") /* Japan */
|
||||
DEFINE_INT_CURR("KES ") /* Kenya */
|
||||
DEFINE_INT_CURR("GRD ") /* Greek Drachma */
|
||||
DEFINE_INT_CURR("GTQ ") /* Guatemala Quetzal */
|
||||
DEFINE_INT_CURR("GWP ") /* Guinea-Bissau Peso */
|
||||
DEFINE_INT_CURR("GYD ") /* Guyana Dollar */
|
||||
DEFINE_INT_CURR("HKD ") /* Hong Kong Dollar */
|
||||
DEFINE_INT_CURR("HNL ") /* Honduras Lempira */
|
||||
DEFINE_INT_CURR("HRK ") /* Croatia Kuna */
|
||||
DEFINE_INT_CURR("HTG ") /* Haiti Gourde */
|
||||
DEFINE_INT_CURR("HUF ") /* Hungarian Forint */
|
||||
DEFINE_INT_CURR("IDR ") /* Indonesia Rupiah */
|
||||
DEFINE_INT_CURR("IEP ") /* Irish Punt */
|
||||
DEFINE_INT_CURR("ILS ") /* Israeli Shekel */
|
||||
DEFINE_INT_CURR("INR ") /* Indian Rupee (Bhutan) */
|
||||
DEFINE_INT_CURR("IQD ") /* Iraqi Dinar */
|
||||
DEFINE_INT_CURR("IRR ") /* Iranian Rial */
|
||||
DEFINE_INT_CURR("ISK ") /* Iceland Krona */
|
||||
DEFINE_INT_CURR("ITL ") /* Italian Lira (San Marino, Vatican City) */
|
||||
DEFINE_INT_CURR("JMD ") /* Jamaica Dollar */
|
||||
DEFINE_INT_CURR("JOD ") /* Jordanian Dollar */
|
||||
DEFINE_INT_CURR("JPY ") /* Japanese Yen */
|
||||
DEFINE_INT_CURR("KES ") /* Kenyan Shilling */
|
||||
DEFINE_INT_CURR("KGS ") /* Kyrgyzstan Som */
|
||||
DEFINE_INT_CURR("KHR ") /* Democratic Kampuchea */
|
||||
DEFINE_INT_CURR("KMF ") /* Comoros */
|
||||
DEFINE_INT_CURR("KMF ") /* Comoros Franc */
|
||||
DEFINE_INT_CURR("KPW ") /* Democratic People's of Korea */
|
||||
DEFINE_INT_CURR("KRW ") /* Republic of Korea */
|
||||
DEFINE_INT_CURR("KWD ") /* Kuwait */
|
||||
DEFINE_INT_CURR("KRW ") /* Republic of Korea Won */
|
||||
DEFINE_INT_CURR("KWD ") /* Kuwaiti Dinar */
|
||||
DEFINE_INT_CURR("KYD ") /* Cayman Islands */
|
||||
DEFINE_INT_CURR("LAK ") /* Lao People's Democratic Republic */
|
||||
DEFINE_INT_CURR("LBP ") /* Lebanon */
|
||||
DEFINE_INT_CURR("LKR ") /* Sri Lanka */
|
||||
DEFINE_INT_CURR("LRD ") /* Liberia */
|
||||
DEFINE_INT_CURR("LSM ") /* Lesotho */
|
||||
DEFINE_INT_CURR("LTL ") /* Lithuania */
|
||||
DEFINE_INT_CURR("LUF ") /* Luxembourg */
|
||||
DEFINE_INT_CURR("LVL ") /* Latvia */
|
||||
DEFINE_INT_CURR("LYD ") /* Libyan Arab Jamahiriya */
|
||||
DEFINE_INT_CURR("MAD ") /* Morocco */
|
||||
DEFINE_INT_CURR("KZT ") /* Kazakhstan Tenge */
|
||||
DEFINE_INT_CURR("LAK ") /* Lao People's Democratic Republic New Kip */
|
||||
DEFINE_INT_CURR("LBP ") /* Lebanese Pound */
|
||||
DEFINE_INT_CURR("LKR ") /* Sri Lankan Rupee */
|
||||
DEFINE_INT_CURR("LRD ") /* Liberian Dollar */
|
||||
DEFINE_INT_CURR("LSM ") /* Lesotho Loti */
|
||||
DEFINE_INT_CURR("LTL ") /* Lithuanian Lit */
|
||||
DEFINE_INT_CURR("LUF ") /* Luxembourg Franc */
|
||||
DEFINE_INT_CURR("LVL ") /* Latvia Lat */
|
||||
DEFINE_INT_CURR("LYD ") /* Libyan Arab Jamahiriya Dinar */
|
||||
DEFINE_INT_CURR("MAD ") /* Moroccan Dirham */
|
||||
DEFINE_INT_CURR("MDL ") /* Moldova Lei */
|
||||
DEFINE_INT_CURR("MGF ") /* Madagascar */
|
||||
DEFINE_INT_CURR("MLF ") /* Mali */
|
||||
DEFINE_INT_CURR("MNT ") /* Mongolia */
|
||||
DEFINE_INT_CURR("MOP ") /* Macau */
|
||||
DEFINE_INT_CURR("MRO ") /* Mauritania */
|
||||
DEFINE_INT_CURR("MTP ") /* Malta */
|
||||
DEFINE_INT_CURR("MUR ") /* Mauritius */
|
||||
DEFINE_INT_CURR("MMK ") /* Myanmar Kyat */
|
||||
DEFINE_INT_CURR("MNT ") /* Mongolia Tugrik */
|
||||
DEFINE_INT_CURR("MOP ") /* Macau Pataca */
|
||||
DEFINE_INT_CURR("MRO ") /* Mauritania Ouguiya */
|
||||
DEFINE_INT_CURR("MTP ") /* Maltese Lira */
|
||||
DEFINE_INT_CURR("MUR ") /* Mauritius Rupee */
|
||||
DEFINE_INT_CURR("MVR ") /* Maldives */
|
||||
DEFINE_INT_CURR("MWK ") /* Malawi */
|
||||
DEFINE_INT_CURR("MXP ") /* Mexico */
|
||||
DEFINE_INT_CURR("MYR ") /* Malaysia */
|
||||
DEFINE_INT_CURR("MZM ") /* Mozambique */
|
||||
DEFINE_INT_CURR("NGN ") /* Nigeria */
|
||||
DEFINE_INT_CURR("NIC ") /* Nicaragua */
|
||||
DEFINE_INT_CURR("NLG ") /* Netherlands */
|
||||
DEFINE_INT_CURR("NOK ") /* Norway */
|
||||
DEFINE_INT_CURR("MWK ") /* Malawi Kwacha */
|
||||
DEFINE_INT_CURR("MXP ") /* Mexican Peso */
|
||||
DEFINE_INT_CURR("MYR ") /* Malaysian Ringgit */
|
||||
DEFINE_INT_CURR("MZM ") /* Mozambique Metical */
|
||||
DEFINE_INT_CURR("NGN ") /* Nigeria Naira */
|
||||
DEFINE_INT_CURR("NIC ") /* Nicaragua Cordoba */
|
||||
DEFINE_INT_CURR("NLG ") /* Dutch Guilder */
|
||||
DEFINE_INT_CURR("NOK ") /* Norwegian Krone */
|
||||
DEFINE_INT_CURR("NPR ") /* Nepal */
|
||||
DEFINE_INT_CURR("NZD ") /* New Zealand */
|
||||
DEFINE_INT_CURR("OMR ") /* Oman */
|
||||
DEFINE_INT_CURR("PAB ") /* Panama */
|
||||
DEFINE_INT_CURR("PES ") /* Peru */
|
||||
DEFINE_INT_CURR("PGK ") /* Papau New Guinea */
|
||||
DEFINE_INT_CURR("PHP ") /* Philippines */
|
||||
DEFINE_INT_CURR("PKR ") /* Pakistan */
|
||||
DEFINE_INT_CURR("PLZ ") /* Poland */
|
||||
DEFINE_INT_CURR("PTE ") /* Portugal */
|
||||
DEFINE_INT_CURR("PYG ") /* Paraguay */
|
||||
DEFINE_INT_CURR("NZD ") /* New Zealand Dollar */
|
||||
DEFINE_INT_CURR("OMR ") /* Omani Rial */
|
||||
DEFINE_INT_CURR("PAB ") /* Panamaniam Balboa */
|
||||
DEFINE_INT_CURR("PEN ") /* Peruvian New Sol */
|
||||
DEFINE_INT_CURR("PGK ") /* Papau New Guinea Kina */
|
||||
DEFINE_INT_CURR("PHP ") /* Philippines Peso */
|
||||
DEFINE_INT_CURR("PKR ") /* Pakistan Rupee */
|
||||
DEFINE_INT_CURR("PLZ ") /* Polish Zloty */
|
||||
DEFINE_INT_CURR("PTE ") /* Portugese Escudo */
|
||||
DEFINE_INT_CURR("PYG ") /* Paraguay Guarani */
|
||||
DEFINE_INT_CURR("QAR ") /* Qatar */
|
||||
DEFINE_INT_CURR("ROL ") /* Romania */
|
||||
DEFINE_INT_CURR("RUR ") /* Russia */
|
||||
DEFINE_INT_CURR("RWF ") /* Rwanda */
|
||||
DEFINE_INT_CURR("SAR ") /* Saudi Arabia */
|
||||
DEFINE_INT_CURR("SBD ") /* Solomon Islands */
|
||||
DEFINE_INT_CURR("SCR ") /* Seychelles */
|
||||
DEFINE_INT_CURR("SDP ") /* Sudan */
|
||||
DEFINE_INT_CURR("SEK ") /* Sweden */
|
||||
DEFINE_INT_CURR("SGD ") /* Singapore */
|
||||
DEFINE_INT_CURR("SHP ") /* St. Helena */
|
||||
DEFINE_INT_CURR("SIT ") /* Slovenia */
|
||||
DEFINE_INT_CURR("SLL ") /* Sierra Leone */
|
||||
DEFINE_INT_CURR("SOS ") /* Somalia */
|
||||
DEFINE_INT_CURR("SRG ") /* Suriname */
|
||||
DEFINE_INT_CURR("STD ") /* Sao Tome and Principe */
|
||||
DEFINE_INT_CURR("ROL ") /* Romanian Leu */
|
||||
DEFINE_INT_CURR("RUR ") /* Russian Ruble */
|
||||
DEFINE_INT_CURR("RWF ") /* Rwanda Franc */
|
||||
DEFINE_INT_CURR("SAR ") /* Saudi Arabia Riyal */
|
||||
DEFINE_INT_CURR("SBD ") /* Solomon Islands Dollar */
|
||||
DEFINE_INT_CURR("SCR ") /* Seychelles Rupee */
|
||||
DEFINE_INT_CURR("SDP ") /* Sudanese Pound */
|
||||
DEFINE_INT_CURR("SEK ") /* Swedish Krona */
|
||||
DEFINE_INT_CURR("SGD ") /* Singapore Dollar */
|
||||
DEFINE_INT_CURR("SHP ") /* St. Helena Pound */
|
||||
DEFINE_INT_CURR("SIT ") /* Slovenian Tolar */
|
||||
DEFINE_INT_CURR("SKK ") /* Slovakian Koruna */
|
||||
DEFINE_INT_CURR("SLL ") /* Sierra Leone Leone */
|
||||
DEFINE_INT_CURR("SOS ") /* Somalia Schilling */
|
||||
DEFINE_INT_CURR("SRG ") /* Suriname Guilder */
|
||||
DEFINE_INT_CURR("STD ") /* Sao Tome and Principe Dobra */
|
||||
DEFINE_INT_CURR("SUR ") /* Ukrainian, Byelorussion */
|
||||
DEFINE_INT_CURR("SVC ") /* El Salvador */
|
||||
DEFINE_INT_CURR("SYP ") /* Syrian Arab Republic */
|
||||
DEFINE_INT_CURR("SZL ") /* Swaziland */
|
||||
DEFINE_INT_CURR("THB ") /* Thailand */
|
||||
DEFINE_INT_CURR("TND ") /* Tunisia */
|
||||
DEFINE_INT_CURR("TOP ") /* Tonga */
|
||||
DEFINE_INT_CURR("SVC ") /* El Salvador Colon */
|
||||
DEFINE_INT_CURR("SYP ") /* Syrian Arab Republic Pound */
|
||||
DEFINE_INT_CURR("SZL ") /* Swaziland Lilangeni */
|
||||
DEFINE_INT_CURR("THB ") /* Thai Baht */
|
||||
DEFINE_INT_CURR("TND ") /* Tunisian Dinar */
|
||||
DEFINE_INT_CURR("TOP ") /* Tonga Pa'Anga */
|
||||
DEFINE_INT_CURR("TPE ") /* East Timor */
|
||||
DEFINE_INT_CURR("TRL ") /* Turkey */
|
||||
DEFINE_INT_CURR("TRL ") /* Turkish Lira */
|
||||
DEFINE_INT_CURR("TTD ") /* Trinidad and Tobago */
|
||||
DEFINE_INT_CURR("TWD ") /* Taiwan, Province of China */
|
||||
DEFINE_INT_CURR("TZS ") /* United Republic of Tanzania */
|
||||
DEFINE_INT_CURR("UGS ") /* Uganda */
|
||||
DEFINE_INT_CURR("USD ") /* United States */
|
||||
DEFINE_INT_CURR("UYP ") /* Uruguay */
|
||||
DEFINE_INT_CURR("VEB ") /* Venezuela */
|
||||
DEFINE_INT_CURR("VND ") /* Viet Nam */
|
||||
DEFINE_INT_CURR("VUV ") /* Vanuatu */
|
||||
DEFINE_INT_CURR("TWD ") /* Taiwan, Province of China Dollar */
|
||||
DEFINE_INT_CURR("TZS ") /* United Republic of Tanzania Shilling */
|
||||
DEFINE_INT_CURR("UAK ") /* Ukraine Hryvna */
|
||||
DEFINE_INT_CURR("UGS ") /* Ugandan Shilling */
|
||||
DEFINE_INT_CURR("USD ") /* United States Dollar */
|
||||
DEFINE_INT_CURR("UYP ") /* Uruguay Peso */
|
||||
DEFINE_INT_CURR("UZS ") /* Uzbekistan Sum */
|
||||
DEFINE_INT_CURR("VEB ") /* Venezuelan Bolivar */
|
||||
DEFINE_INT_CURR("VND ") /* Viet Nam Dong */
|
||||
DEFINE_INT_CURR("VUV ") /* Vanuatu Dong */
|
||||
DEFINE_INT_CURR("WST ") /* Samoa */
|
||||
DEFINE_INT_CURR("XAF ") /* United Republic of Cameroon, Central African Republic, Chad, Congo, Gabon */
|
||||
DEFINE_INT_CURR("XCD ") /* Antiqua, Dominica, Grenada, Montserrat, St. Kitts-Nevis-Anguilla, Saint Lucia, Saint Vincent and the Grenadines */
|
||||
DEFINE_INT_CURR("XOF ") /* Benin, Ivory Coast, Niger, Senegal, Togo, Upper Volta */
|
||||
DEFINE_INT_CURR("XAF ") /* Central African Franc (United Republic of Cameroon, Central African Republic, Chad, Congo, Gabon) */
|
||||
DEFINE_INT_CURR("XCD ") /* East Caribbean Dollar (Antiqua, Dominica, Grenada, Montserrat, St. Kitts-Nevis-Anguilla, Saint Lucia, Saint Vincent and the Grenadines) */
|
||||
DEFINE_INT_CURR("XDS ") /* St. Christopher Dollar */
|
||||
DEFINE_INT_CURR("XOF ") /* West African Franc (Benin, Ivory Coast, Niger, Senegal, Togo, Upper Volta) */
|
||||
DEFINE_INT_CURR("XPF ") /* French polynesia, New Caledonia, Wallis and Futuna Islands */
|
||||
DEFINE_INT_CURR("YDD ") /* Democratic Yemen */
|
||||
DEFINE_INT_CURR("YER ") /* Yemen */
|
||||
DEFINE_INT_CURR("YUD ") /* Yugoslavia */
|
||||
DEFINE_INT_CURR("ZAL ") /* South Africa */
|
||||
DEFINE_INT_CURR("YDD ") /* Yemini Dinar (Democratic Yemen) */
|
||||
DEFINE_INT_CURR("YER ") /* Yemeni Rial */
|
||||
DEFINE_INT_CURR("ZAL ") /* South Africa Rand */
|
||||
DEFINE_INT_CURR("ZAR ") /* Lesotho, Namibia */
|
||||
DEFINE_INT_CURR("ZMK ") /* Zambia */
|
||||
DEFINE_INT_CURR("ZRZ ") /* Zaire */
|
||||
DEFINE_INT_CURR("ZWD ") /* Zimbabwe */
|
||||
DEFINE_INT_CURR("ZMK ") /* Zambian Kwacha */
|
||||
DEFINE_INT_CURR("ZRZ ") /* Zaire Zaire */
|
||||
DEFINE_INT_CURR("ZWD ") /* Zimbabwe Dollar */
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ extern const struct locale_data *_nl_current_##category;
|
||||
|
||||
extern const char *const _nl_category_names[LC_ALL + 1];
|
||||
extern const size_t _nl_category_name_sizes[LC_ALL + 1];
|
||||
extern const struct locale_data * *const _nl_current[LC_ALL];
|
||||
extern const struct locale_data * *const _nl_current[LC_ALL + 1];
|
||||
|
||||
/* Name of the standard locale. */
|
||||
extern const char _nl_C_name[];
|
||||
|
||||
@@ -72,7 +72,7 @@ charmap_read (const char *filename)
|
||||
|
||||
result = parse_charmap (pathnfile);
|
||||
|
||||
if (result == NULL)
|
||||
if (result == NULL && !be_quiet)
|
||||
error (0, errno, _("character map file `%s' not found"), filename);
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ parse_charmap (const char *filename)
|
||||
result->mb_cur_max = 1;
|
||||
if (result->mb_cur_min == 0)
|
||||
result->mb_cur_min = result->mb_cur_max;
|
||||
if (result->mb_cur_min > result->mb_cur_max)
|
||||
if (result->mb_cur_min > result->mb_cur_max && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("\
|
||||
%s: <mb_cur_max> must be greater than <mb_cur_min>\n"),
|
||||
@@ -596,7 +596,7 @@ only WIDTH definitions are allowed to follow the CHARMAP definition"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (state != 91)
|
||||
if (state != 91 && !be_quiet)
|
||||
error (0, 0, _("%s: premature end of file"), cmfile->fname);
|
||||
|
||||
lr_close (cmfile);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -56,6 +56,9 @@ struct charset_t
|
||||
#define ILLEGAL_CHAR_VALUE ((wchar_t) 0xffffffffu)
|
||||
|
||||
|
||||
/* Declared in localedef.c. */
|
||||
extern int be_quiet;
|
||||
|
||||
/* Prototypes for charmap handling functions. */
|
||||
struct charset_t *charmap_read (const char *filename);
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ collate_finish (struct localedef_t *locale, struct charset_t *charset)
|
||||
else
|
||||
value = 0;
|
||||
|
||||
if (value == 0)
|
||||
if (value == 0 && !be_quiet)
|
||||
error_at_line (0, 0, patch->fname, patch->lineno,
|
||||
_("no weight defined for symbol `%s'"), patch->token);
|
||||
else
|
||||
@@ -256,7 +256,8 @@ collate_finish (struct localedef_t *locale, struct charset_t *charset)
|
||||
\**************************************************************/
|
||||
u_int32_t weight;
|
||||
|
||||
error (0, 0, _("no definition of `UNDEFINED'"));
|
||||
if (!be_quiet)
|
||||
error (0, 0, _("no definition of `UNDEFINED'"));
|
||||
|
||||
collate->undefined.ordering_len = collate->nrules;
|
||||
weight = ++collate->order_cnt;
|
||||
@@ -324,9 +325,10 @@ collate_output (struct localedef_t *locale, struct charset_t *charset,
|
||||
level_best = 0xffff;
|
||||
|
||||
/* Compute table size. */
|
||||
fputs (_("\
|
||||
if (!be_quiet)
|
||||
fputs (_("\
|
||||
Computing table size for collation information might take a while..."),
|
||||
stderr);
|
||||
stderr);
|
||||
for (table_size = 256; table_size < sum_best; ++table_size)
|
||||
{
|
||||
size_t hits[table_size];
|
||||
@@ -357,7 +359,8 @@ Computing table size for collation information might take a while..."),
|
||||
}
|
||||
}
|
||||
assert (table_best != 0xffff || level_best != 0xffff);
|
||||
fputs (_(" done\n"), stderr);
|
||||
if (!be_quiet)
|
||||
fputs (_(" done\n"), stderr);
|
||||
|
||||
obstack_init (&non_simple);
|
||||
obstack_init (&string_pool);
|
||||
|
||||
+49
-39
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -56,6 +56,9 @@ void *xrealloc (void *__ptr, size_t __n);
|
||||
#define SWAPU16(w) \
|
||||
((((w) >> 8) & 0xff) | (((w) & 0xff) << 8))
|
||||
|
||||
#define XSWAPU32(w) \
|
||||
((((w) & 0xff00ff00) >> 8) | (((w) & 0xff00ff) << 8))
|
||||
|
||||
|
||||
/* To be compatible with former implementations we for now restrict
|
||||
the number of bits for character classes to 16. When compatibility
|
||||
@@ -63,7 +66,7 @@ void *xrealloc (void *__ptr, size_t __n);
|
||||
#define char_class_t u_int16_t
|
||||
#define CHAR_CLASS_TRANS SWAPU16
|
||||
#define char_class32_t u_int32_t
|
||||
#define CHAR_CLASS32_TRANS SWAPU32
|
||||
#define CHAR_CLASS32_TRANS XSWAPU32
|
||||
|
||||
|
||||
/* The real definition of the struct for the LC_CTYPE locale. */
|
||||
@@ -89,8 +92,8 @@ struct locale_ctype_t
|
||||
#define MAX_NR_CHARMAP 16
|
||||
const char *mapnames[MAX_NR_CHARMAP];
|
||||
u_int32_t *map_collection[MAX_NR_CHARMAP];
|
||||
u_int32_t map_collection_max[MAX_NR_CHARMAP];
|
||||
u_int32_t map_collection_act[MAX_NR_CHARMAP];
|
||||
size_t map_collection_max[MAX_NR_CHARMAP];
|
||||
size_t map_collection_act[MAX_NR_CHARMAP];
|
||||
size_t map_collection_nr;
|
||||
size_t last_map_idx;
|
||||
unsigned int from_map_char;
|
||||
@@ -262,10 +265,11 @@ ctype_finish (struct localedef_t *locale, struct charset_t *charset)
|
||||
cp += sprintf (cp, "\\%o", (value >> 8) & 0xff);
|
||||
sprintf (cp, "\\%o", value & 0xff);
|
||||
|
||||
error (0, 0, _("\
|
||||
if (!be_quiet)
|
||||
error (0, 0, _("\
|
||||
character %s'%s' in class `%s' must be in class `%s'"), value > 256 ? "L" : "",
|
||||
cp, valid_table[cls1].name,
|
||||
valid_table[cls2].name);
|
||||
cp, valid_table[cls1].name,
|
||||
valid_table[cls2].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -286,10 +290,12 @@ character %s'%s' in class `%s' must be in class `%s'"), value > 256 ? "L" : "",
|
||||
cp += sprintf (cp, "\\%o", (value >> 8) & 0xff);
|
||||
sprintf (cp, "\\%o", value & 0xff);
|
||||
|
||||
error (0, 0, _("\
|
||||
if (!be_quiet)
|
||||
error (0, 0, _("\
|
||||
character %s'%s' in class `%s' must not be in class `%s'"),
|
||||
value > 256 ? "L" : "", cp,
|
||||
valid_table[cls1].name, valid_table[cls2].name);
|
||||
value > 256 ? "L" : "", cp,
|
||||
valid_table[cls1].name,
|
||||
valid_table[cls2].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -306,23 +312,25 @@ character %s'%s' in class `%s' must not be in class `%s'"),
|
||||
|
||||
/* ... and now test <SP> as a special case. */
|
||||
space_value = charset_find_value (charset, "SP", 2);
|
||||
if ((wchar_t) space_value == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) space_value == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
error (0, 0, _("character <SP> not defined in character map"));
|
||||
else if ((cnt = BITPOS (tok_space),
|
||||
(ELEM (ctype, class_collection, , space_value)
|
||||
& BIT (tok_space)) == 0)
|
||||
|| (cnt = BITPOS (tok_blank),
|
||||
(ELEM (ctype, class_collection, , space_value)
|
||||
& BIT (tok_blank)) == 0))
|
||||
else if (((cnt = BITPOS (tok_space),
|
||||
(ELEM (ctype, class_collection, , space_value)
|
||||
& BIT (tok_space)) == 0)
|
||||
|| (cnt = BITPOS (tok_blank),
|
||||
(ELEM (ctype, class_collection, , space_value)
|
||||
& BIT (tok_blank)) == 0))
|
||||
&& !be_quiet)
|
||||
error (0, 0, _("<SP> character not in class `%s'"),
|
||||
valid_table[cnt].name);
|
||||
else if ((cnt = BITPOS (tok_punct),
|
||||
(ELEM (ctype, class_collection, , space_value)
|
||||
& BIT (tok_punct)) != 0)
|
||||
|| (cnt = BITPOS (tok_graph),
|
||||
(ELEM (ctype, class_collection, , space_value)
|
||||
& BIT (tok_graph))
|
||||
!= 0))
|
||||
else if (((cnt = BITPOS (tok_punct),
|
||||
(ELEM (ctype, class_collection, , space_value)
|
||||
& BIT (tok_punct)) != 0)
|
||||
|| (cnt = BITPOS (tok_graph),
|
||||
(ELEM (ctype, class_collection, , space_value)
|
||||
& BIT (tok_graph))
|
||||
!= 0))
|
||||
&& !be_quiet)
|
||||
error (0, 0, _("<SP> character must not be in class `%s'"),
|
||||
valid_table[cnt].name);
|
||||
else
|
||||
@@ -934,7 +942,7 @@ set_class_defaults (struct locale_ctype_t *ctype, struct charset_t *charset)
|
||||
tmp[0] = ch;
|
||||
|
||||
value = charset_find_value (charset, tmp, 1);
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
@@ -998,7 +1006,7 @@ character `%s' not defined while needed as default value"),
|
||||
unsigned int value;
|
||||
|
||||
value = charset_find_value (charset, "space", 5);
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
"<space>");
|
||||
@@ -1006,7 +1014,7 @@ character `%s' not defined while needed as default value"),
|
||||
ELEM (ctype, class_collection, , value) |= BIT (tok_space);
|
||||
|
||||
value = charset_find_value (charset, "form-feed", 9);
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
"<form-feed>");
|
||||
@@ -1014,7 +1022,7 @@ character `%s' not defined while needed as default value"),
|
||||
ELEM (ctype, class_collection, , value) |= BIT (tok_space);
|
||||
|
||||
value = charset_find_value (charset, "newline", 7);
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
"<newline>");
|
||||
@@ -1022,7 +1030,7 @@ character `%s' not defined while needed as default value"),
|
||||
ELEM (ctype, class_collection, , value) |= BIT (tok_space);
|
||||
|
||||
value = charset_find_value (charset, "carriage-return", 15);
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
"<carriage-return>");
|
||||
@@ -1030,7 +1038,7 @@ character `%s' not defined while needed as default value"),
|
||||
ELEM (ctype, class_collection, , value) |= BIT (tok_space);
|
||||
|
||||
value = charset_find_value (charset, "tab", 3);
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
"<tab>");
|
||||
@@ -1038,7 +1046,7 @@ character `%s' not defined while needed as default value"),
|
||||
ELEM (ctype, class_collection, , value) |= BIT (tok_space);
|
||||
|
||||
value = charset_find_value (charset, "vertical-tab", 12);
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
"<vertical-tab>");
|
||||
@@ -1064,7 +1072,7 @@ character `%s' not defined while needed as default value"),
|
||||
unsigned int value;
|
||||
|
||||
value = charset_find_value (charset, "space", 5);
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
"<space>");
|
||||
@@ -1072,7 +1080,7 @@ character `%s' not defined while needed as default value"),
|
||||
ELEM (ctype, class_collection, , value) |= BIT (tok_blank);
|
||||
|
||||
value = charset_find_value (charset, "tab", 3);
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
"<tab>");
|
||||
@@ -1110,7 +1118,7 @@ character `%s' not defined while needed as default value"),
|
||||
ctype->class_collection[cnt] |= BIT (tok_print);
|
||||
|
||||
space = charset_find_value (charset, "space", 5);
|
||||
if (space == ILLEGAL_CHAR_VALUE)
|
||||
if (space == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
"<space>");
|
||||
@@ -1136,7 +1144,7 @@ character `%s' not defined while needed as default value"),
|
||||
tmp[1] = (char) ch;
|
||||
|
||||
value_from = charset_find_value (charset, &tmp[1], 1);
|
||||
if ((wchar_t) value_from == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value_from == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
@@ -1147,7 +1155,7 @@ character `%s' not defined while needed as default value"),
|
||||
/* This conversion is implementation defined. */
|
||||
tmp[1] = (char) (ch + ('A' - 'a'));
|
||||
value_to = charset_find_value (charset, &tmp[1], 1);
|
||||
if ((wchar_t) value_to == ILLEGAL_CHAR_VALUE)
|
||||
if ((wchar_t) value_to == ILLEGAL_CHAR_VALUE && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("\
|
||||
character `%s' not defined while needed as default value"),
|
||||
@@ -1195,9 +1203,10 @@ allocate_arrays (struct locale_ctype_t *ctype, struct charset_t *charset)
|
||||
size_t min_total = UINT_MAX;
|
||||
size_t act_size = 256;
|
||||
|
||||
fputs (_("\
|
||||
if (!be_quiet)
|
||||
fputs (_("\
|
||||
Computing table size for character classes might take a while..."),
|
||||
stderr);
|
||||
stderr);
|
||||
|
||||
while (act_size < min_total)
|
||||
{
|
||||
@@ -1232,7 +1241,8 @@ Computing table size for character classes might take a while..."),
|
||||
++act_size;
|
||||
}
|
||||
|
||||
fprintf (stderr, _(" done\n"));
|
||||
if (!be_quiet)
|
||||
fprintf (stderr, _(" done\n"));
|
||||
|
||||
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -77,7 +77,7 @@ messages_finish (struct localedef_t *locale)
|
||||
= locale->categories[LC_MESSAGES].messages;
|
||||
|
||||
/* The fields YESSTR and NOSTR are optional. */
|
||||
if (messages->yesexpr == NULL)
|
||||
if (messages->yesexpr == NULL && !be_quiet)
|
||||
error (0, 0, _("field `%s' in category `%s' undefined"),
|
||||
"yesexpr", "LC_MESSAGES");
|
||||
else
|
||||
@@ -87,7 +87,7 @@ messages_finish (struct localedef_t *locale)
|
||||
|
||||
/* Test whether it are correct regular expressions. */
|
||||
result = regcomp (&re, messages->yesexpr, REG_EXTENDED);
|
||||
if (result != 0)
|
||||
if (result != 0 && !be_quiet)
|
||||
{
|
||||
char errbuf[BUFSIZ];
|
||||
|
||||
@@ -98,7 +98,7 @@ no correct regular expression for field `%s' in category `%s': %s"),
|
||||
}
|
||||
}
|
||||
|
||||
if (messages->noexpr == NULL)
|
||||
if (messages->noexpr == NULL && !be_quiet)
|
||||
error (0, 0, _("field `%s' in category `%s' undefined"),
|
||||
"noexpr", "LC_MESSAGES");
|
||||
else
|
||||
@@ -108,7 +108,7 @@ no correct regular expression for field `%s' in category `%s': %s"),
|
||||
|
||||
/* Test whether it are correct regular expressions. */
|
||||
result = regcomp (&re, messages->noexpr, REG_EXTENDED);
|
||||
if (result != 0)
|
||||
if (result != 0 && !be_quiet)
|
||||
{
|
||||
char errbuf[BUFSIZ];
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -115,7 +115,7 @@ monetary_finish (struct localedef_t *locale)
|
||||
= locale->categories[LC_MONETARY].monetary;
|
||||
|
||||
#define TEST_ELEM(cat) \
|
||||
if (monetary->cat == NULL) \
|
||||
if (monetary->cat == NULL && !be_quiet) \
|
||||
error (0, 0, _("field `%s' in category `%s' not defined"), \
|
||||
#cat, "LC_MONETARY")
|
||||
|
||||
@@ -129,12 +129,13 @@ monetary_finish (struct localedef_t *locale)
|
||||
/* The international currency symbol must come from ISO 4217. */
|
||||
if (monetary->int_curr_symbol != NULL)
|
||||
{
|
||||
if (strlen (monetary->int_curr_symbol) != 4)
|
||||
if (strlen (monetary->int_curr_symbol) != 4 && !be_quiet)
|
||||
error (0, 0, _("\
|
||||
value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length"));
|
||||
else if (bsearch (monetary->int_curr_symbol, valid_int_curr,
|
||||
NR_VALID_INT_CURR, sizeof (const char *),
|
||||
(comparison_fn_t) curr_strcmp) == NULL)
|
||||
(comparison_fn_t) curr_strcmp) == NULL
|
||||
&& !be_quiet)
|
||||
error (0, 0, _("\
|
||||
value of field `int_curr_symbol' in category `LC_MONETARY' does \
|
||||
not correspond to a valid name in ISO 4217"));
|
||||
@@ -143,23 +144,23 @@ not correspond to a valid name in ISO 4217"));
|
||||
/* The decimal point must not be empty. This is not said explicitly
|
||||
in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be
|
||||
!= "". */
|
||||
if (monetary->mon_decimal_point[0] == '\0')
|
||||
if (monetary->mon_decimal_point[0] == '\0' && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("\
|
||||
value for field `%s' in category `%s' must not be the empty string"),
|
||||
"mon_decimal_point", "LC_MONETARY");
|
||||
}
|
||||
|
||||
if (monetary->mon_grouping_act == 0)
|
||||
if (monetary->mon_grouping_act == 0 && !be_quiet)
|
||||
error (0, 0, _("field `%s' in category `%s' not defined"),
|
||||
"mon_grouping", "LC_MONETARY");
|
||||
|
||||
#undef TEST_ELEM
|
||||
#define TEST_ELEM(cat, min, max) \
|
||||
if (monetary->cat == -2) \
|
||||
if (monetary->cat == -2 && !be_quiet) \
|
||||
error (0, 0, _("field `%s' in category `%s' not defined"), \
|
||||
#cat, "LC_MONETARY"); \
|
||||
else if (monetary->cat < min || monetary->cat > max) \
|
||||
else if ((monetary->cat < min || monetary->cat > max) && !be_quiet) \
|
||||
error (0, 0, _("\
|
||||
value for field `%s' in category `%s' must be in range %d...%d"), \
|
||||
#cat, "LC_MONETARY", min, max)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -74,7 +74,7 @@ numeric_finish (struct localedef_t *locale)
|
||||
struct locale_numeric_t *numeric = locale->categories[LC_NUMERIC].numeric;
|
||||
|
||||
#define TEST_ELEM(cat) \
|
||||
if (numeric->cat == NULL) \
|
||||
if (numeric->cat == NULL && !be_quiet) \
|
||||
error (0, 0, _("field `%s' in category `%s' not defined"), \
|
||||
#cat, "LC_NUMERIC")
|
||||
|
||||
@@ -84,14 +84,14 @@ numeric_finish (struct localedef_t *locale)
|
||||
/* The decimal point must not be empty. This is not said explicitly
|
||||
in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be
|
||||
!= "". */
|
||||
if (numeric->decimal_point[0] == '\0')
|
||||
if (numeric->decimal_point[0] == '\0' && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("\
|
||||
value for field `%s' in category `%s' must not be the empty string"),
|
||||
"decimal_point", "LC_NUMERIC");
|
||||
}
|
||||
|
||||
if (numeric->grouping_act == 0)
|
||||
if (numeric->grouping_act == 0 && !be_quiet)
|
||||
error (0, 0, _("field `%s' in category `%s' not defined"),
|
||||
"grouping", "LC_NUMERIC");
|
||||
}
|
||||
|
||||
+31
-29
@@ -106,10 +106,10 @@ time_finish (struct localedef_t *locale)
|
||||
struct locale_time_t *time = locale->categories[LC_TIME].time;
|
||||
|
||||
#define TESTARR_ELEM(cat, max) \
|
||||
if (time->cur_num_##cat == 0) \
|
||||
if (time->cur_num_##cat == 0 && !be_quiet) \
|
||||
error (0, 0, _("field `%s' in category `%s' not defined"), \
|
||||
#cat, "LC_TIME"); \
|
||||
else if (time->cur_num_##cat != max) \
|
||||
else if (time->cur_num_##cat != max && !be_quiet) \
|
||||
error (0, 0, _("field `%s' in category `%s' has not enough values"), \
|
||||
#cat, "LC_TIME")
|
||||
|
||||
@@ -120,7 +120,7 @@ time_finish (struct localedef_t *locale)
|
||||
TESTARR_ELEM (am_pm, 2);
|
||||
|
||||
#define TEST_ELEM(cat) \
|
||||
if (time->cat == NULL) \
|
||||
if (time->cat == NULL && !be_quiet) \
|
||||
error (0, 0, _("field `%s' in category `%s' not defined"), \
|
||||
#cat, "LC_TIME")
|
||||
|
||||
@@ -149,7 +149,7 @@ time_finish (struct localedef_t *locale)
|
||||
memcpy (str, time->era[idx], era_len + 1);
|
||||
|
||||
/* First character must be + or - for the direction. */
|
||||
if (*str != '+' && *str != '-')
|
||||
if (*str != '+' && *str != '-' && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("direction flag in string %d in `era' field"
|
||||
" in category `%s' is not '+' nor '-'"),
|
||||
@@ -159,7 +159,7 @@ time_finish (struct localedef_t *locale)
|
||||
}
|
||||
else
|
||||
time->era_entries[idx].direction = *str;
|
||||
if (*++str != ':')
|
||||
if (*++str != ':' && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("direction flag in string %d in `era' field"
|
||||
" in category `%s' is not a single character"),
|
||||
@@ -171,14 +171,14 @@ time_finish (struct localedef_t *locale)
|
||||
|
||||
/* Now the offset year. */
|
||||
time->era_entries[idx].offset = strtol (str, &endp, 10);
|
||||
if (endp == str)
|
||||
if (endp == str && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("illegal number for offset in string %d in"
|
||||
" `era' field in category `%s'"),
|
||||
idx + 1, "LC_TIME");
|
||||
(void) strsep (&str, ":");
|
||||
}
|
||||
else if (*endp != ':')
|
||||
else if (*endp != ':' && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("garbage at end of offset value in string %d in"
|
||||
" `era' field in category `%s'"),
|
||||
@@ -224,7 +224,7 @@ time_finish (struct localedef_t *locale)
|
||||
time->era_entries[idx].start_date[1] -= 1;
|
||||
|
||||
time->era_entries[idx].start_date[2] = strtol (str, &endp, 10);
|
||||
if (endp == str)
|
||||
if (endp == str && !be_quiet)
|
||||
{
|
||||
invalid_start_date:
|
||||
error (0, 0, _("illegal starting date in string %d in"
|
||||
@@ -232,7 +232,7 @@ time_finish (struct localedef_t *locale)
|
||||
idx + 1, "LC_TIME");
|
||||
(void) strsep (&str, ":");
|
||||
}
|
||||
else if (*endp != ':')
|
||||
else if (*endp != ':' && !be_quiet)
|
||||
{
|
||||
garbage_start_date:
|
||||
error (0, 0, _("garbage at end of starting date in string %d"
|
||||
@@ -245,14 +245,15 @@ time_finish (struct localedef_t *locale)
|
||||
str = endp + 1;
|
||||
|
||||
/* Check for valid value. */
|
||||
if (time->era_entries[idx].start_date[1] < 0
|
||||
|| time->era_entries[idx].start_date[1] >= 12
|
||||
|| time->era_entries[idx].start_date[2] < 0
|
||||
|| (time->era_entries[idx].start_date[2]
|
||||
> days_per_month[time->era_entries[idx].start_date[1]])
|
||||
|| (time->era_entries[idx].start_date[1] == 2
|
||||
&& time->era_entries[idx].start_date[2] == 29
|
||||
&& !__isleap (time->era_entries[idx].start_date[0])))
|
||||
if ((time->era_entries[idx].start_date[1] < 0
|
||||
|| time->era_entries[idx].start_date[1] >= 12
|
||||
|| time->era_entries[idx].start_date[2] < 0
|
||||
|| (time->era_entries[idx].start_date[2]
|
||||
> days_per_month[time->era_entries[idx].start_date[1]])
|
||||
|| (time->era_entries[idx].start_date[1] == 2
|
||||
&& time->era_entries[idx].start_date[2] == 29
|
||||
&& !__isleap (time->era_entries[idx].start_date[0])))
|
||||
&& !be_quiet)
|
||||
error (0, 0, _("starting date is illegal in"
|
||||
" string %d in `era' field in"
|
||||
" category `%s'"),
|
||||
@@ -296,7 +297,7 @@ time_finish (struct localedef_t *locale)
|
||||
time->era_entries[idx].stop_date[1] -= 1;
|
||||
|
||||
time->era_entries[idx].stop_date[2] = strtol (str, &endp, 10);
|
||||
if (endp == str)
|
||||
if (endp == str && !be_quiet)
|
||||
{
|
||||
invalid_stop_date:
|
||||
error (0, 0, _("illegal stopping date in string %d in"
|
||||
@@ -304,7 +305,7 @@ time_finish (struct localedef_t *locale)
|
||||
idx + 1, "LC_TIME");
|
||||
(void) strsep (&str, ":");
|
||||
}
|
||||
else if (*endp != ':')
|
||||
else if (*endp != ':' && !be_quiet)
|
||||
{
|
||||
garbage_stop_date:
|
||||
error (0, 0, _("garbage at end of stopping date in string %d"
|
||||
@@ -317,14 +318,15 @@ time_finish (struct localedef_t *locale)
|
||||
str = endp + 1;
|
||||
|
||||
/* Check for valid value. */
|
||||
if (time->era_entries[idx].stop_date[1] < 0
|
||||
|| time->era_entries[idx].stop_date[1] >= 12
|
||||
|| time->era_entries[idx].stop_date[2] < 0
|
||||
|| (time->era_entries[idx].stop_date[2]
|
||||
> days_per_month[time->era_entries[idx].stop_date[1]])
|
||||
|| (time->era_entries[idx].stop_date[1] == 2
|
||||
&& time->era_entries[idx].stop_date[2] == 29
|
||||
&& !__isleap (time->era_entries[idx].stop_date[0])))
|
||||
if ((time->era_entries[idx].stop_date[1] < 0
|
||||
|| time->era_entries[idx].stop_date[1] >= 12
|
||||
|| time->era_entries[idx].stop_date[2] < 0
|
||||
|| (time->era_entries[idx].stop_date[2]
|
||||
> days_per_month[time->era_entries[idx].stop_date[1]])
|
||||
|| (time->era_entries[idx].stop_date[1] == 2
|
||||
&& time->era_entries[idx].stop_date[2] == 29
|
||||
&& !__isleap (time->era_entries[idx].stop_date[0])))
|
||||
&& !be_quiet)
|
||||
error (0, 0, _("stopping date is illegal in"
|
||||
" string %d in `era' field in"
|
||||
" category `%s'"),
|
||||
@@ -332,7 +334,7 @@ time_finish (struct localedef_t *locale)
|
||||
}
|
||||
}
|
||||
|
||||
if (str == NULL || *str == '\0')
|
||||
if ((str == NULL || *str == '\0') && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("missing era name in string %d in `era' field"
|
||||
" in category `%s'"), idx + 1, "LC_TIME");
|
||||
@@ -343,7 +345,7 @@ time_finish (struct localedef_t *locale)
|
||||
{
|
||||
time->era_entries[idx].name = strsep (&str, ":");
|
||||
|
||||
if (str == NULL || *str == '\0')
|
||||
if ((str == NULL || *str == '\0') && !be_quiet)
|
||||
{
|
||||
error (0, 0, _("missing era format in string %d in `era'"
|
||||
" field in category `%s'"),
|
||||
|
||||
+201
-14
@@ -22,6 +22,8 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <argz.h>
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <error.h>
|
||||
#include <getopt.h>
|
||||
@@ -29,11 +31,13 @@
|
||||
#include <libintl.h>
|
||||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <search.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "localeinfo.h"
|
||||
|
||||
@@ -201,12 +205,13 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
||||
/* `-a' requests the names of all available locales. */
|
||||
if (do_all != 0)
|
||||
{
|
||||
setlocale (LC_COLLATE, "");
|
||||
write_locales ();
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/* `m' requests the names of all available charmaps. The names can be
|
||||
used for the -f argument to localedef(3). */
|
||||
used for the -f argument to localedef(1). */
|
||||
if (do_charmaps != 0)
|
||||
{
|
||||
write_charmaps ();
|
||||
@@ -263,31 +268,165 @@ Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"),
|
||||
}
|
||||
|
||||
|
||||
/* Write the names of all available locales to stdout. */
|
||||
/* Simple action function which prints arguments as strings. */
|
||||
static void
|
||||
print_names (const void *nodep, VISIT value, int level)
|
||||
{
|
||||
if (value == postorder || value == leaf)
|
||||
puts (*(char **) nodep);
|
||||
}
|
||||
|
||||
|
||||
/* Write the names of all available locales to stdout. We have some
|
||||
sources of the information: the contents of the locale directory
|
||||
and the locale.alias file. To avoid duplicates and print the
|
||||
result is a reasonable order we put all entries is a search tree
|
||||
and print them afterwards. */
|
||||
static void
|
||||
write_locales (void)
|
||||
{
|
||||
void *all_data = NULL;
|
||||
DIR *dir;
|
||||
struct dirent *dirent;
|
||||
char *alias_path;
|
||||
size_t alias_path_len;
|
||||
char *entry;
|
||||
|
||||
/* `POSIX' locale is always available (POSIX.2 4.34.3). */
|
||||
puts ("POSIX");
|
||||
#define PUT(name) tsearch ((name), &all_data, \
|
||||
(int (*) (const void *, const void *)) strcoll)
|
||||
|
||||
dir = opendir (LOCALE_PATH);
|
||||
dir = opendir (LOCALEDIR);
|
||||
if (dir == NULL)
|
||||
{
|
||||
error (1, errno, gettext ("cannot read locale directory `%s'"),
|
||||
LOCALE_PATH);
|
||||
LOCALEDIR);
|
||||
return;
|
||||
}
|
||||
|
||||
/* `POSIX' locale is always available (POSIX.2 4.34.3). */
|
||||
PUT ("POSIX");
|
||||
/* And so is the "C" locale. */
|
||||
PUT ("C");
|
||||
|
||||
/* Now we can look for all files in the directory. */
|
||||
while ((dirent = readdir (dir)) != NULL)
|
||||
if (strcmp (dirent->d_name, ".") != 0
|
||||
&& strcmp (dirent->d_name, "..") != 0)
|
||||
puts (dirent->d_name);
|
||||
{
|
||||
mode_t mode;
|
||||
#ifdef _DIRENT_HAVE_D_TYPE
|
||||
if (dirent->d_type != DT_UNKNOWN)
|
||||
mode = DTTOIF (dirent->d_type);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
struct stat st;
|
||||
char buf[sizeof (LOCALEDIR) + strlen (dirent->d_name) + 1];
|
||||
|
||||
stpcpy (stpcpy (stpcpy (buf, LOCALEDIR), "/"), dirent->d_name);
|
||||
|
||||
if (stat (buf, &st) < 0)
|
||||
continue;
|
||||
mode = st.st_mode;
|
||||
}
|
||||
|
||||
if (S_ISDIR (mode))
|
||||
PUT (strdup (dirent->d_name));
|
||||
}
|
||||
|
||||
closedir (dir);
|
||||
|
||||
/* Now read the locale.alias files. */
|
||||
if (argz_create_sep (LOCALE_ALIAS_PATH, ':', &alias_path, &alias_path_len))
|
||||
error (1, errno, gettext ("while preparing output"));
|
||||
|
||||
entry = NULL;
|
||||
while ((entry = argz_next (alias_path, alias_path_len, entry)))
|
||||
{
|
||||
static const char aliasfile[] = "/locale.alias";
|
||||
FILE *fp;
|
||||
char full_name[strlen (entry) + sizeof aliasfile];
|
||||
|
||||
stpcpy (stpcpy (full_name, entry), aliasfile);
|
||||
fp = fopen (full_name, "r");
|
||||
if (fp == NULL)
|
||||
/* Ignore non-existing files. */
|
||||
continue;
|
||||
|
||||
while (! feof (fp))
|
||||
{
|
||||
/* It is a reasonable approach to use a fix buffer here
|
||||
because
|
||||
a) we are only interested in the first two fields
|
||||
b) these fields must be usable as file names and so must
|
||||
not be that long */
|
||||
char buf[BUFSIZ];
|
||||
char *alias;
|
||||
char *value;
|
||||
char *cp;
|
||||
|
||||
if (fgets (buf, BUFSIZ, fp) == NULL)
|
||||
/* EOF reached. */
|
||||
break;
|
||||
|
||||
cp = buf;
|
||||
/* Ignore leading white space. */
|
||||
while (isspace (cp[0]))
|
||||
++cp;
|
||||
|
||||
/* A leading '#' signals a comment line. */
|
||||
if (cp[0] != '\0' && cp[0] != '#')
|
||||
{
|
||||
alias = cp++;
|
||||
while (cp[0] != '\0' && !isspace (cp[0]))
|
||||
++cp;
|
||||
/* Terminate alias name. */
|
||||
if (cp[0] != '\0')
|
||||
*cp++ = '\0';
|
||||
|
||||
/* Now look for the beginning of the value. */
|
||||
while (isspace (cp[0]))
|
||||
++cp;
|
||||
|
||||
if (cp[0] != '\0')
|
||||
{
|
||||
value = cp++;
|
||||
while (cp[0] != '\0' && !isspace (cp[0]))
|
||||
++cp;
|
||||
/* Terminate value. */
|
||||
if (cp[0] == '\n')
|
||||
{
|
||||
/* This has to be done to make the following
|
||||
test for the end of line possible. We are
|
||||
looking for the terminating '\n' which do not
|
||||
overwrite here. */
|
||||
*cp++ = '\0';
|
||||
*cp = '\n';
|
||||
}
|
||||
else if (cp[0] != '\0')
|
||||
*cp++ = '\0';
|
||||
|
||||
/* Add the alias. */
|
||||
PUT (strdup (alias));
|
||||
}
|
||||
}
|
||||
|
||||
/* Possibly not the whole line fits into the buffer.
|
||||
Ignore the rest of the line. */
|
||||
while (strchr (cp, '\n') == NULL)
|
||||
{
|
||||
cp = buf;
|
||||
if (fgets (buf, BUFSIZ, fp) == NULL)
|
||||
/* Make sure the inner loop will be left. The outer
|
||||
loop will exit at the `feof' test. */
|
||||
*cp = '\n';
|
||||
}
|
||||
}
|
||||
|
||||
fclose (fp);
|
||||
}
|
||||
|
||||
twalk (all_data, print_names);
|
||||
}
|
||||
|
||||
|
||||
@@ -295,6 +434,7 @@ write_locales (void)
|
||||
static void
|
||||
write_charmaps (void)
|
||||
{
|
||||
void *all_data = NULL;
|
||||
DIR *dir;
|
||||
struct dirent *dirent;
|
||||
|
||||
@@ -310,9 +450,31 @@ write_charmaps (void)
|
||||
while ((dirent = readdir (dir)) != NULL)
|
||||
if (strcmp (dirent->d_name, ".") != 0
|
||||
&& strcmp (dirent->d_name, "..") != 0)
|
||||
puts (dirent->d_name);
|
||||
{
|
||||
mode_t mode;
|
||||
#ifdef _DIRENT_HAVE_D_TYPE
|
||||
if (dirent->d_type != DT_UNKNOWN)
|
||||
mode = DTTOIF (dirent->d_type);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
struct stat st;
|
||||
char buf[sizeof (CHARMAP_PATH) + strlen (dirent->d_name) + 1];
|
||||
|
||||
stpcpy (stpcpy (stpcpy (buf, CHARMAP_PATH), "/"), dirent->d_name);
|
||||
|
||||
if (stat (buf, &st) < 0)
|
||||
continue;
|
||||
mode = st.st_mode;
|
||||
}
|
||||
|
||||
if (S_ISREG (mode))
|
||||
PUT (strdup (dirent->d_name));
|
||||
}
|
||||
|
||||
closedir (dir);
|
||||
|
||||
twalk (all_data, print_names);
|
||||
}
|
||||
|
||||
|
||||
@@ -347,6 +509,25 @@ show_locale_vars (void)
|
||||
}
|
||||
|
||||
|
||||
/* Some of the "string" we print contain non-printable characters. We
|
||||
encode them here. */
|
||||
static void
|
||||
print_escaped (const char *string)
|
||||
{
|
||||
const unsigned char *ch;
|
||||
|
||||
ch = string;
|
||||
while ('\0' != *ch)
|
||||
{
|
||||
if (isprint (*ch))
|
||||
putchar (*ch);
|
||||
else
|
||||
printf("<0x%02x>", *ch);
|
||||
++ch;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Show the information request for NAME. */
|
||||
static void
|
||||
show_info (const char *name)
|
||||
@@ -361,9 +542,11 @@ show_info (const char *name)
|
||||
switch (item->value_type)
|
||||
{
|
||||
case string:
|
||||
printf ("%s%s%s", show_keyword_name ? "\"" : "",
|
||||
nl_langinfo (item->item_id) ? : "",
|
||||
show_keyword_name ? "\"" : "");
|
||||
if (show_keyword_name)
|
||||
putchar ('"');
|
||||
print_escaped (nl_langinfo (item->item_id) ? : "");
|
||||
if (show_keyword_name)
|
||||
putchar ('"');
|
||||
break;
|
||||
case stringarray:
|
||||
{
|
||||
@@ -376,11 +559,14 @@ show_info (const char *name)
|
||||
for (cnt = 0; cnt < item->max - 1; ++cnt)
|
||||
{
|
||||
val = nl_langinfo (item->item_id + cnt);
|
||||
printf ("%s;", val ? : "");
|
||||
if (val != NULL)
|
||||
print_escaped (val);
|
||||
putchar (';');
|
||||
}
|
||||
|
||||
val = nl_langinfo (item->item_id + cnt);
|
||||
printf ("%s", val ? : "");
|
||||
if (val != NULL)
|
||||
print_escaped (val);
|
||||
|
||||
if (show_keyword_name)
|
||||
putchar ('"');
|
||||
@@ -411,7 +597,8 @@ show_info (const char *name)
|
||||
break;
|
||||
case word:
|
||||
{
|
||||
unsigned int val = (unsigned int) nl_langinfo (item->item_id);
|
||||
unsigned int val =
|
||||
(unsigned int) (unsigned long int) nl_langinfo (item->item_id);
|
||||
printf ("%d", val);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -70,6 +70,8 @@ int posix_conformance;
|
||||
/* If not zero give a lot more messages. */
|
||||
int verbose;
|
||||
|
||||
/* If not zero don't print warnings. */
|
||||
int be_quiet;
|
||||
|
||||
|
||||
/* Long options. */
|
||||
@@ -81,6 +83,7 @@ static const struct option long_options[] =
|
||||
{ "force", no_argument, NULL, 'c' },
|
||||
{ "inputfile", required_argument, NULL, 'i' },
|
||||
{ "posix", no_argument, &posix_conformance, 1 },
|
||||
{ "quiet", no_argument, &be_quiet, 1 },
|
||||
{ "verbose", no_argument, &verbose, 1},
|
||||
{ "version", no_argument, NULL, 'V' },
|
||||
{ NULL, 0, NULL, 0 }
|
||||
@@ -252,27 +255,31 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
||||
{
|
||||
avail = act_add_locdef->locale->categories[cat].generic != NULL;
|
||||
if (avail)
|
||||
localedef->categories[cat].generic
|
||||
= act_add_locdef->locale->categories[cat].generic;
|
||||
{
|
||||
localedef->categories[cat].generic
|
||||
= act_add_locdef->locale->categories[cat].generic;
|
||||
localedef->avail |= 1 << cat;
|
||||
}
|
||||
}
|
||||
|
||||
if (! avail)
|
||||
{
|
||||
const char *locale_names[] = { "LC_COLLATE", "LC_CTYPE",
|
||||
"LC_MONETARY", "LC_NUMERIC",
|
||||
"LC_TIME", "LC_MESSAGES" };
|
||||
static const char *locale_names[] =
|
||||
{ "LC_COLLATE", "LC_CTYPE", "LC_MONETARY",
|
||||
"LC_NUMERIC", "LC_TIME", "LC_MESSAGES"
|
||||
};
|
||||
char *fname;
|
||||
int fd;
|
||||
struct stat st;
|
||||
|
||||
asprintf (&fname, LOCALE_PATH "/%s/%s", act_add_locdef->name,
|
||||
asprintf (&fname, LOCALEDIR "/%s/%s", act_add_locdef->name,
|
||||
locale_names[cat]);
|
||||
fd = open (fname, O_RDONLY);
|
||||
if (fd == -1)
|
||||
{
|
||||
free (fname);
|
||||
|
||||
asprintf (&fname, LOCALE_PATH "/%s/%s/SYS_%s",
|
||||
asprintf (&fname, LOCALEDIR "/%s/%s/SYS_%s",
|
||||
act_add_locdef->name, locale_names[cat],
|
||||
locale_names[cat]);
|
||||
|
||||
|
||||
+53
-19
@@ -1,6 +1,6 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <locale.h>
|
||||
#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -76,10 +77,31 @@ locfile_read (const char *filename, struct charset_t *charset)
|
||||
{
|
||||
if (filename[0] != '/')
|
||||
{
|
||||
char path[strlen (filename) + 1 + sizeof (LOCSRCDIR)];
|
||||
char *i18npath = __secure_getenv ("I18NPATH");
|
||||
if (i18npath != NULL && *i18npath != '\0')
|
||||
{
|
||||
char path[strlen (filename) + 1 + strlen (i18npath) + 1];
|
||||
char *next;
|
||||
i18npath = strdupa (i18npath);
|
||||
|
||||
stpcpy (stpcpy (stpcpy (path, LOCSRCDIR), "/"), filename);
|
||||
ldfile = lr_open (path, locfile_hash);
|
||||
|
||||
while (ldfile == NULL
|
||||
&& (next = strsep (&i18npath, ":")) != NULL)
|
||||
{
|
||||
stpcpy (stpcpy (stpcpy (path, next), "/"), filename);
|
||||
|
||||
ldfile = lr_open (path, locfile_hash);
|
||||
}
|
||||
}
|
||||
|
||||
/* Test in the default directory. */
|
||||
if (ldfile == NULL)
|
||||
{
|
||||
char path[strlen (filename) + 1 + sizeof (LOCSRCDIR)];
|
||||
|
||||
stpcpy (stpcpy (stpcpy (path, LOCSRCDIR), "/"), filename);
|
||||
ldfile = lr_open (path, locfile_hash);
|
||||
}
|
||||
}
|
||||
|
||||
if (ldfile == NULL)
|
||||
@@ -898,17 +920,23 @@ void
|
||||
check_all_categories (struct localedef_t *locale, struct charset_t *charset)
|
||||
{
|
||||
/* Call the finishing functions for all locales. */
|
||||
if ((locale->binary & (1 << LC_CTYPE)) == 0)
|
||||
if ((locale->avail & (1 << LC_CTYPE)) != 0
|
||||
&& (locale->binary & (1 << LC_CTYPE)) == 0)
|
||||
ctype_finish (locale, charset);
|
||||
if ((locale->binary & (1 << LC_COLLATE)) == 0)
|
||||
if ((locale->avail & (1 << LC_COLLATE)) != 0
|
||||
&& (locale->binary & (1 << LC_COLLATE)) == 0)
|
||||
collate_finish (locale, charset);
|
||||
if ((locale->binary & (1 << LC_MONETARY)) == 0)
|
||||
if ((locale->avail & (1 << LC_MONETARY)) != 0
|
||||
&& (locale->binary & (1 << LC_MONETARY)) == 0)
|
||||
monetary_finish (locale);
|
||||
if ((locale->binary & (1 << LC_NUMERIC)) == 0)
|
||||
if ((locale->avail & (1 << LC_NUMERIC)) != 0
|
||||
&& (locale->binary & (1 << LC_NUMERIC)) == 0)
|
||||
numeric_finish (locale);
|
||||
if ((locale->binary & (1 << LC_TIME)) == 0)
|
||||
if ((locale->avail & (1 << LC_TIME)) != 0
|
||||
&& (locale->binary & (1 << LC_TIME)) == 0)
|
||||
time_finish (locale);
|
||||
if ((locale->binary & (1 << LC_MESSAGES)) == 0)
|
||||
if ((locale->avail & (1 << LC_MESSAGES)) != 0
|
||||
&& (locale->binary & (1 << LC_MESSAGES)) == 0)
|
||||
messages_finish (locale);
|
||||
}
|
||||
|
||||
@@ -918,12 +946,18 @@ write_all_categories (struct localedef_t *locale, struct charset_t *charset,
|
||||
const char *output_path)
|
||||
{
|
||||
/* Call all functions to write locale data. */
|
||||
ctype_output (locale, charset, output_path);
|
||||
collate_output (locale, charset, output_path);
|
||||
monetary_output (locale, output_path);
|
||||
numeric_output (locale, output_path);
|
||||
time_output (locale, output_path);
|
||||
messages_output (locale, output_path);
|
||||
if ((locale->avail & (1 << LC_CTYPE)) != 0)
|
||||
ctype_output (locale, charset, output_path);
|
||||
if ((locale->avail & (1 << LC_COLLATE)) != 0)
|
||||
collate_output (locale, charset, output_path);
|
||||
if ((locale->avail & (1 << LC_MONETARY)) != 0)
|
||||
monetary_output (locale, output_path);
|
||||
if ((locale->avail & (1 << LC_NUMERIC)) != 0)
|
||||
numeric_output (locale, output_path);
|
||||
if ((locale->avail & (1 << LC_TIME)) != 0)
|
||||
time_output (locale, output_path);
|
||||
if ((locale->avail & (1 << LC_MESSAGES)) != 0)
|
||||
messages_output (locale, output_path);
|
||||
}
|
||||
|
||||
|
||||
@@ -981,7 +1015,7 @@ write_locale_data (const char *output_path, const char *category,
|
||||
save_err = errno;
|
||||
}
|
||||
|
||||
if (fd == -1)
|
||||
if (fd == -1 && !be_quiet)
|
||||
{
|
||||
error (0, save_err, _("\
|
||||
cannot open output file `%s' for category `%s'"),
|
||||
@@ -1005,7 +1039,7 @@ cannot open output file `%s' for category `%s'"),
|
||||
if (maxiov > 0)
|
||||
step = MIN (maxiov, step);
|
||||
|
||||
if (writev (fd, &vec[cnt], step) < 0)
|
||||
if (writev (fd, &vec[cnt], step) < 0 && !be_quiet)
|
||||
{
|
||||
error (0, errno, _("failure while writing data for category `%s'"),
|
||||
category);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -53,6 +53,8 @@ struct localedef_t
|
||||
size_t len[6];
|
||||
};
|
||||
|
||||
/* Declared in localedef.c. */
|
||||
extern int be_quiet;
|
||||
|
||||
/* Found in localedef.c. */
|
||||
void def_to_process (const char *name, int category);
|
||||
|
||||
+27
-16
@@ -1,20 +1,20 @@
|
||||
/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <alloca.h>
|
||||
#include <argz.h>
|
||||
@@ -49,6 +49,9 @@ static const struct locale_data * *const _nl_current[] =
|
||||
[category] = &_nl_current_##category,
|
||||
#include "categories.def"
|
||||
#undef DEFINE_CATEGORY
|
||||
/* We need this additional element to simplify the code. It must
|
||||
simply be != NULL. */
|
||||
[LC_ALL] = (const struct locale_data **) ~0ul
|
||||
};
|
||||
|
||||
/* Array indexed by category of pointers to _nl_C_CATEGORY slots.
|
||||
@@ -201,8 +204,10 @@ new_composite_name (int category, char *newnames[LC_ALL])
|
||||
static inline void
|
||||
setname (int category, const char *name)
|
||||
{
|
||||
if (_nl_current[category] == NULL
|
||||
&& _nl_current_names[category] != _nl_C_name)
|
||||
if (_nl_current_names[category] == name)
|
||||
return;
|
||||
|
||||
if (category == LC_ALL && _nl_current_names[category] != _nl_C_name)
|
||||
free ((void *) _nl_current_names[category]);
|
||||
|
||||
_nl_current_names[category] = name;
|
||||
@@ -352,6 +357,9 @@ setlocale (int category, const char *locale)
|
||||
/* Critical section left. */
|
||||
__libc_lock_unlock (__libc_setlocale_lock);
|
||||
|
||||
/* Free the resources (the locale path variable. */
|
||||
free (locale_path);
|
||||
|
||||
return composite;
|
||||
}
|
||||
else
|
||||
@@ -391,6 +399,9 @@ setlocale (int category, const char *locale)
|
||||
/* Critical section left. */
|
||||
__libc_lock_unlock (__libc_setlocale_lock);
|
||||
|
||||
/* Free the resources (the locale path variable. */
|
||||
free (locale_path);
|
||||
|
||||
return newname;
|
||||
}
|
||||
}
|
||||
|
||||
+7
-9
@@ -55,8 +55,8 @@ typedef struct weight_t
|
||||
((u_int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_RULES))
|
||||
|
||||
|
||||
static __inline int get_weight (const STRING_TYPE **str, weight_t *result);
|
||||
static __inline int
|
||||
static __inline void get_weight (const STRING_TYPE **str, weight_t *result);
|
||||
static __inline void
|
||||
get_weight (const STRING_TYPE **str, weight_t *result)
|
||||
{
|
||||
unsigned int ch = *((USTRING_TYPE *) (*str))++;
|
||||
@@ -86,7 +86,7 @@ get_weight (const STRING_TYPE **str, weight_t *result)
|
||||
result->data[cnt].value = &__collate_extra[idx];
|
||||
idx += result->data[cnt].number;
|
||||
}
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
slot += level_size;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ get_weight (const STRING_TYPE **str, weight_t *result)
|
||||
result->data[cnt].number = 1;
|
||||
result->data[cnt].value = &__collate_table[slot + 1 + cnt];
|
||||
}
|
||||
return ch == 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* We now look for any collation element which starts with CH.
|
||||
@@ -135,14 +135,12 @@ get_weight (const STRING_TYPE **str, weight_t *result)
|
||||
result->data[cnt].value = &__collate_extra[idx];
|
||||
idx += result->data[cnt].number;
|
||||
}
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* To next entry in list. */
|
||||
slot += __collate_extra[slot];
|
||||
}
|
||||
/* NOTREACHED */
|
||||
return 0; /* To calm down gcc. */
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +153,7 @@ get_weight (const STRING_TYPE **str, weight_t *result)
|
||||
do \
|
||||
{ \
|
||||
weight_t *newp; \
|
||||
do \
|
||||
while (*str != '\0') \
|
||||
{ \
|
||||
newp = (weight_t *) alloca (sizeof (weight_t) \
|
||||
+ (collate_nrules \
|
||||
@@ -168,7 +166,7 @@ get_weight (const STRING_TYPE **str, weight_t *result)
|
||||
backw->next = newp; \
|
||||
newp->next = NULL; \
|
||||
backw = newp; \
|
||||
get_weight (&str, newp); \
|
||||
} \
|
||||
while (get_weight (&str, newp) == 0); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
+7
-3
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1997 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,7 @@ subdir := login
|
||||
headers := utmp.h utmpbits.h lastlog.h pty.h
|
||||
|
||||
routines := getutent getutent_r getutid getutline getutid_r getutline_r \
|
||||
utmp_file utmp_db
|
||||
utmp_file updwtmp utmpname
|
||||
|
||||
distribute := utmp-private.h
|
||||
|
||||
@@ -35,5 +35,9 @@ extra-libs-others := $(extra-libs)
|
||||
|
||||
libutil-routines:= login login_tty logout logwtmp pty
|
||||
|
||||
|
||||
include ../Rules
|
||||
|
||||
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
||||
# This ensures they will load libc.so for needed symbols if loaded by
|
||||
# a statically-linked program that hasn't already loaded it.
|
||||
$(objpfx)libutil.so: $(common-objpfx)libc.so
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
@@ -25,7 +25,7 @@ static struct utmp buffer;
|
||||
|
||||
|
||||
struct utmp *
|
||||
getutent (void)
|
||||
__getutent (void)
|
||||
{
|
||||
struct utmp *result;
|
||||
|
||||
@@ -34,3 +34,4 @@ getutent (void)
|
||||
|
||||
return result;
|
||||
}
|
||||
weak_alias (__getutent, getutent)
|
||||
|
||||
+98
-114
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>
|
||||
and Paul Janzen <pcj@primenet.com>, 1996.
|
||||
@@ -18,102 +18,126 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <assert.h>
|
||||
#include <db.h>
|
||||
#include <fcntl.h>
|
||||
#include <libc-lock.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <utmp.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "utmp-private.h"
|
||||
|
||||
|
||||
/* The various backends we have. */
|
||||
static int __setutent_unknown (int reset);
|
||||
static int __getutent_r_unknown (struct utmp *buffer, struct utmp **result);
|
||||
static struct utmp *__pututline_unknown (const struct utmp *data);
|
||||
static void __endutent_unknown (void);
|
||||
/* Functions defined here. */
|
||||
static int setutent_unknown (void);
|
||||
static int getutent_r_unknown (struct utmp *buffer, struct utmp **result);
|
||||
static int getutid_r_unknown (const struct utmp *line, struct utmp *buffer,
|
||||
struct utmp **result);
|
||||
static int getutline_r_unknown (const struct utmp *id, struct utmp *buffer,
|
||||
struct utmp **result);
|
||||
static struct utmp *pututline_unknown (const struct utmp *data);
|
||||
static void endutent_unknown (void);
|
||||
|
||||
|
||||
/* We have three jump tables: unknown, db, or file. */
|
||||
static struct utfuncs unknown_functions =
|
||||
/* Initial Jump table. */
|
||||
struct utfuncs __libc_utmp_unknown_functions =
|
||||
{
|
||||
__setutent_unknown,
|
||||
__getutent_r_unknown,
|
||||
NULL,
|
||||
NULL,
|
||||
__pututline_unknown,
|
||||
__endutent_unknown,
|
||||
setutent_unknown,
|
||||
getutent_r_unknown,
|
||||
getutid_r_unknown,
|
||||
getutline_r_unknown,
|
||||
pututline_unknown,
|
||||
endutent_unknown,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Currently selected backend. */
|
||||
struct utfuncs *__libc_utmp_jump_table = &unknown_functions;
|
||||
|
||||
/* The tables from the services. */
|
||||
extern struct utfuncs __libc_utmp_db_functions;
|
||||
extern struct utfuncs __libc_utmp_file_functions;
|
||||
|
||||
struct utfuncs *__libc_utmp_jump_table = &__libc_utmp_unknown_functions;
|
||||
|
||||
/* We need to protect the opening of the file. */
|
||||
__libc_lock_define_initialized (, __libc_utmp_lock)
|
||||
|
||||
|
||||
static int
|
||||
setutent_unknown (void)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (*__libc_utmp_file_functions.setutent) ();
|
||||
if (result)
|
||||
__libc_utmp_jump_table = &__libc_utmp_file_functions;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
getutent_r_unknown (struct utmp *buffer, struct utmp **result)
|
||||
{
|
||||
/* The backend was not yet initialized. */
|
||||
if (setutent_unknown ())
|
||||
return (*__libc_utmp_jump_table->getutent_r) (buffer, result);
|
||||
|
||||
/* Not available. */
|
||||
*result = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
getutid_r_unknown (const struct utmp *id, struct utmp *buffer,
|
||||
struct utmp **result)
|
||||
{
|
||||
/* The backend was not yet initialized. */
|
||||
if (setutent_unknown ())
|
||||
return (*__libc_utmp_jump_table->getutid_r) (id, buffer, result);
|
||||
|
||||
/* Not available. */
|
||||
*result = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
getutline_r_unknown (const struct utmp *line, struct utmp *buffer,
|
||||
struct utmp **result)
|
||||
{
|
||||
/* The backend was not yet initialized. */
|
||||
if (setutent_unknown ())
|
||||
return (*__libc_utmp_jump_table->getutline_r) (line, buffer, result);
|
||||
|
||||
/* Not available. */
|
||||
*result = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
static struct utmp *
|
||||
pututline_unknown (const struct utmp *data)
|
||||
{
|
||||
/* The backend was not yet initialized. */
|
||||
if (setutent_unknown ())
|
||||
return (*__libc_utmp_jump_table->pututline) (data);
|
||||
|
||||
/* Not available. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
endutent_unknown (void)
|
||||
{
|
||||
/* Nothing to do. */
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
__setutent (void)
|
||||
{
|
||||
__libc_lock_lock (__libc_utmp_lock);
|
||||
|
||||
(void) (*__libc_utmp_jump_table->setutent) (1);
|
||||
(*__libc_utmp_jump_table->setutent) ();
|
||||
|
||||
__libc_lock_unlock (__libc_utmp_lock);
|
||||
}
|
||||
weak_alias (__setutent, setutent)
|
||||
|
||||
|
||||
static int
|
||||
__setutent_unknown (int reset)
|
||||
{
|
||||
/* We have to test whether it is still not decided which backend to use. */
|
||||
assert (__libc_utmp_jump_table == &unknown_functions);
|
||||
|
||||
/* See whether utmp db file exists. */
|
||||
if ((*__libc_utmp_db_functions.setutent) (reset))
|
||||
__libc_utmp_jump_table = &__libc_utmp_db_functions;
|
||||
else
|
||||
{
|
||||
/* Either the db file does not exist or we have other
|
||||
problems. So use the normal file. */
|
||||
(*__libc_utmp_file_functions.setutent) (reset);
|
||||
__libc_utmp_jump_table = &__libc_utmp_file_functions;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
__endutent (void)
|
||||
{
|
||||
__libc_lock_lock (__libc_utmp_lock);
|
||||
|
||||
(*__libc_utmp_jump_table->endutent) ();
|
||||
|
||||
__libc_lock_unlock (__libc_utmp_lock);
|
||||
}
|
||||
weak_alias (__endutent, endutent)
|
||||
|
||||
|
||||
static void
|
||||
__endutent_unknown (void)
|
||||
{
|
||||
/* Huh, how do we came here? Nothing to do. */
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
__getutent_r (struct utmp *buffer, struct utmp **result)
|
||||
{
|
||||
@@ -130,16 +154,6 @@ __getutent_r (struct utmp *buffer, struct utmp **result)
|
||||
weak_alias (__getutent_r, getutent_r)
|
||||
|
||||
|
||||
static int
|
||||
__getutent_r_unknown (struct utmp *buffer, struct utmp **result)
|
||||
{
|
||||
/* It is not yet initialized. */
|
||||
__setutent_unknown (0);
|
||||
|
||||
return (*__libc_utmp_jump_table->getutent_r) (buffer, result);
|
||||
}
|
||||
|
||||
|
||||
struct utmp *
|
||||
__pututline (const struct utmp *data)
|
||||
{
|
||||
@@ -156,44 +170,14 @@ __pututline (const struct utmp *data)
|
||||
weak_alias (__pututline, pututline)
|
||||
|
||||
|
||||
static struct utmp *
|
||||
__pututline_unknown (const struct utmp *data)
|
||||
void
|
||||
__endutent (void)
|
||||
{
|
||||
/* It is not yet initialized. */
|
||||
__setutent_unknown (0);
|
||||
|
||||
return (*__libc_utmp_jump_table->pututline) (data);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
__utmpname (const char *file)
|
||||
{
|
||||
int result = -1;
|
||||
|
||||
__libc_lock_lock (__libc_utmp_lock);
|
||||
|
||||
/* Close the old file. */
|
||||
(*__libc_utmp_jump_table->endutent) ();
|
||||
|
||||
/* Store new names. */
|
||||
if ((*__libc_utmp_file_functions.utmpname) (file) == 0
|
||||
&& !(*__libc_utmp_db_functions.utmpname) (file) == 0)
|
||||
{
|
||||
/* Try to find out whether we are supposed to work with a db
|
||||
file or not. Do this by looking for the extension ".db". */
|
||||
const char *ext = strrchr (file, '.');
|
||||
|
||||
if (ext != NULL && strcmp (ext, ".db") == 0)
|
||||
__libc_utmp_jump_table = &__libc_utmp_db_functions;
|
||||
else
|
||||
__libc_utmp_jump_table = &unknown_functions;
|
||||
|
||||
result = 0;
|
||||
}
|
||||
__libc_utmp_jump_table = &__libc_utmp_unknown_functions;
|
||||
|
||||
__libc_lock_unlock (__libc_utmp_lock);
|
||||
|
||||
return result;
|
||||
}
|
||||
weak_alias (__utmpname, utmpname)
|
||||
weak_alias (__endutent, endutent)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user