mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-09 11:58:23 +08:00
Compare commits
639
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b049214c5e | ||
|
|
f6f6447978 | ||
|
|
aa152ec6ad | ||
|
|
c8647a518b | ||
|
|
e0c138de04 | ||
|
|
c87c885303 | ||
|
|
a780093062 | ||
|
|
a584fc6a6b | ||
|
|
fce03b8c5b | ||
|
|
bdef10cb1e | ||
|
|
d2d7794b89 | ||
|
|
294eeff087 | ||
|
|
ac285df609 | ||
|
|
c97164f05b | ||
|
|
7ee7b70342 | ||
|
|
23d488f45e | ||
|
|
07e2253d98 | ||
|
|
b1cd3047ad | ||
|
|
87b8eeddb0 | ||
|
|
0a0ddbbe67 | ||
|
|
52d150a187 | ||
|
|
c432414bf8 | ||
|
|
d328df16a2 | ||
|
|
cba457a16f | ||
|
|
475cfe06fa | ||
|
|
e875bad50a | ||
|
|
a5cceee5d5 | ||
|
|
5c2c150929 | ||
|
|
ee38f2391d | ||
|
|
b2e2a03ffd | ||
|
|
51da0dcf51 | ||
|
|
870a58b0b6 | ||
|
|
7705c6c561 | ||
|
|
ef626d54ac | ||
|
|
cb8ad6d56a | ||
|
|
3f860e1ac8 | ||
|
|
9210e448bf | ||
|
|
6bdb5f22a0 | ||
|
|
d0f6ed789f | ||
|
|
626b157664 | ||
|
|
1f3ae5ae37 | ||
|
|
c9dab1b7ac | ||
|
|
9d1b9fcafd | ||
|
|
115aebcfb5 | ||
|
|
c8bfc69629 | ||
|
|
2a31410e40 | ||
|
|
3ff6565150 | ||
|
|
26330c1c48 | ||
|
|
4da50f4b07 | ||
|
|
e80cfa6941 | ||
|
|
0f1ea04f8a | ||
|
|
9cf557216c | ||
|
|
53f32b044f | ||
|
|
ac37d9836e | ||
|
|
e40d82c4ee | ||
|
|
e926cb1774 | ||
|
|
1e639628d1 | ||
|
|
a447f6830f | ||
|
|
10bf3b7655 | ||
|
|
8eccea8011 | ||
|
|
6e1f9be792 | ||
|
|
ffbb82ecfe | ||
|
|
dfbbe67270 | ||
|
|
d237dcd93b | ||
|
|
e38af591a8 | ||
|
|
297676350b | ||
|
|
5d45e59ea6 | ||
|
|
127bcb269a | ||
|
|
a1223d6604 | ||
|
|
917dc587df | ||
|
|
cd816bef95 | ||
|
|
94c11628f5 | ||
|
|
e856702a04 | ||
|
|
223e614daf | ||
|
|
4c7cb20430 | ||
|
|
b9e0df9847 | ||
|
|
f27dc66bb9 | ||
|
|
6dca80c9c7 | ||
|
|
6b23316e66 | ||
|
|
f84a1e4190 | ||
|
|
8573480189 | ||
|
|
b0a411e5dd | ||
|
|
5ccf88c235 | ||
|
|
9478a09b67 | ||
|
|
14795b319a | ||
|
|
4595c33e21 | ||
|
|
d79f04c30e | ||
|
|
8075bb0fc6 | ||
|
|
83489168c2 | ||
|
|
51211e710a | ||
|
|
8feaf01b21 | ||
|
|
7dec33c08e | ||
|
|
335206256c | ||
|
|
66f8b81220 | ||
|
|
dc3be966c0 | ||
|
|
ded8b949ca | ||
|
|
5cb5c2a335 | ||
|
|
0978e4c843 | ||
|
|
1ad9ccd18a | ||
|
|
d2aa96e13c | ||
|
|
11799e4168 | ||
|
|
1a6da537df | ||
|
|
ef860a878b | ||
|
|
d4c583b446 | ||
|
|
5c1d419918 | ||
|
|
48da74123e | ||
|
|
0f672aba04 | ||
|
|
f1f4f11bc3 | ||
|
|
cf22c5c9b3 | ||
|
|
73c5dd45bc | ||
|
|
23a4b43d6a | ||
|
|
e3e60f6bdc | ||
|
|
033b8b2d4d | ||
|
|
03c8e28744 | ||
|
|
c02fa54041 | ||
|
|
242bfefc41 | ||
|
|
911b70e719 | ||
|
|
6d8225fe1a | ||
|
|
315a43aa94 | ||
|
|
2fb513c600 | ||
|
|
c7045198ca | ||
|
|
c83494a925 | ||
|
|
1cb6b555a8 | ||
|
|
e6042ff1ee | ||
|
|
72d4ac2366 | ||
|
|
8ba7d5cebb | ||
|
|
e96fe50f0d | ||
|
|
21032d9230 | ||
|
|
4681f43596 | ||
|
|
78463734c1 | ||
|
|
ef73dbc130 | ||
|
|
14e44061ad | ||
|
|
a346458fa8 | ||
|
|
6fd3c3fe53 | ||
|
|
b0c50524f1 | ||
|
|
3a2e541ba3 | ||
|
|
e6e467b835 | ||
|
|
09b731ac2b | ||
|
|
f23e5ee26d | ||
|
|
d0b6ac6c50 | ||
|
|
1f345eba4e | ||
|
|
bda3e2dbc1 | ||
|
|
b87b7fc3e6 | ||
|
|
5c25449dd9 | ||
|
|
ff9e7e3fe2 | ||
|
|
359e8c63c9 | ||
|
|
7a5a58ec86 | ||
|
|
a21d44637e | ||
|
|
07b7d301cc | ||
|
|
1e44f485d2 | ||
|
|
f163450fc0 | ||
|
|
c5899b63eb | ||
|
|
1716edfc19 | ||
|
|
574e283890 | ||
|
|
a162e5955f | ||
|
|
e2ff293ba1 | ||
|
|
378e8bab96 | ||
|
|
68a071d274 | ||
|
|
a33c43a5ae | ||
|
|
4cee966cab | ||
|
|
fc2a4f5f83 | ||
|
|
75cb5a0d47 | ||
|
|
441097af93 | ||
|
|
62beba6902 | ||
|
|
7913ba4d91 | ||
|
|
cedf9b89dd | ||
|
|
8d599f5ab1 | ||
|
|
9abaa7d89f | ||
|
|
dd3394742b | ||
|
|
9b0cdd693e | ||
|
|
91ed9442ce | ||
|
|
c67c02731b | ||
|
|
39762d6a5c | ||
|
|
4839a27f73 | ||
|
|
a7db33c68f | ||
|
|
9d75f89c66 | ||
|
|
900bc6095a | ||
|
|
e65371aa0a | ||
|
|
9452e30a05 | ||
|
|
e08057b1ff | ||
|
|
4baf42dd00 | ||
|
|
8833066b12 | ||
|
|
fedca46896 | ||
|
|
61558c1a0d | ||
|
|
41dfb5c638 | ||
|
|
027dc27eb9 | ||
|
|
32c2052cf0 | ||
|
|
4021079f5e | ||
|
|
65302b6ec8 | ||
|
|
65d60af0a5 | ||
|
|
a1ce84f35f | ||
|
|
5daa061565 | ||
|
|
0906c26cc3 | ||
|
|
542ac2393c | ||
|
|
9542710f13 | ||
|
|
6f771fd26e | ||
|
|
2479aa48ad | ||
|
|
54854dd792 | ||
|
|
f80082355e | ||
|
|
d4dc668ab4 | ||
|
|
daae5dc5c8 | ||
|
|
619b79105b | ||
|
|
75831cc48d | ||
|
|
473e6b3f8f | ||
|
|
18b86433d0 | ||
|
|
e169ea9b56 | ||
|
|
6bad2cd171 | ||
|
|
96bad006f1 | ||
|
|
2a0a747e57 | ||
|
|
af5726aed8 | ||
|
|
e220c524c9 | ||
|
|
a891c7b0e0 | ||
|
|
eae077f1c3 | ||
|
|
6ce38a95a4 | ||
|
|
b428b742cf | ||
|
|
6c8cc2d304 | ||
|
|
ce28a8ab09 | ||
|
|
a544f6724f | ||
|
|
af98d46f5a | ||
|
|
1f09da09fe | ||
|
|
b51633c572 | ||
|
|
985d254c90 | ||
|
|
b0ec19ce6e | ||
|
|
7f65f3e392 | ||
|
|
2027fcad95 | ||
|
|
37582bc743 | ||
|
|
f12ca311c0 | ||
|
|
9a40233fa0 | ||
|
|
53a451c64a | ||
|
|
8ee3826218 | ||
|
|
362d67883f | ||
|
|
bff4b406f7 | ||
|
|
dddf300c35 | ||
|
|
2c72abb496 | ||
|
|
4820b91755 | ||
|
|
88a65bd83c | ||
|
|
8dd5fcaca8 | ||
|
|
48b752c9f6 | ||
|
|
21cb7ca55c | ||
|
|
16d1b47b4f | ||
|
|
af47bc499a | ||
|
|
5ed9cc7c21 | ||
|
|
0e4d91bd31 | ||
|
|
787b20e995 | ||
|
|
61d906ea38 | ||
|
|
3d6b6fbc1f | ||
|
|
894c14a496 | ||
|
|
03bea447b8 | ||
|
|
5d456f7eba | ||
|
|
effe3e2d1a | ||
|
|
b2adc86677 | ||
|
|
eaa2ea12a2 | ||
|
|
8021fca541 | ||
|
|
bdae521809 | ||
|
|
fcaea48fef | ||
|
|
4c7854d1dc | ||
|
|
936bb2647a | ||
|
|
2455d11258 | ||
|
|
0afdbd1873 | ||
|
|
b26033141c | ||
|
|
4473150984 | ||
|
|
4728cb6448 | ||
|
|
ab3017a58b | ||
|
|
977e1ac9af | ||
|
|
154a9b8709 | ||
|
|
3a2ba84afb | ||
|
|
2569265466 | ||
|
|
503d6a9585 | ||
|
|
98d2266156 | ||
|
|
6e3ba1514c | ||
|
|
eb090791c6 | ||
|
|
5d550e87dd | ||
|
|
ebe3a574be | ||
|
|
518b2177f6 | ||
|
|
ab5823b4b6 | ||
|
|
aa583d2ff9 | ||
|
|
df8843c5a8 | ||
|
|
ac7609f799 | ||
|
|
2774ea7724 | ||
|
|
e482d83fb7 | ||
|
|
5a04a4228c | ||
|
|
4cad81b6e7 | ||
|
|
3ec0d26c76 | ||
|
|
262cf6b3df | ||
|
|
3f898a85fc | ||
|
|
baba5d9461 | ||
|
|
410005dea3 | ||
|
|
45f1c052dc | ||
|
|
0ad70fc143 | ||
|
|
9b356005b4 | ||
|
|
03f7658035 | ||
|
|
dd8c67b33f | ||
|
|
cb5c27ecf3 | ||
|
|
217e7b931e | ||
|
|
1100b0e292 | ||
|
|
48f59b8e1a | ||
|
|
15b2849a0d | ||
|
|
d0145e0379 | ||
|
|
f5ce81c94c | ||
|
|
5a6a773f6c | ||
|
|
0c20be13c5 | ||
|
|
4f2b8b0271 | ||
|
|
9dc858f906 | ||
|
|
4133f08e15 | ||
|
|
d1e6d2178d | ||
|
|
5cde8cb028 | ||
|
|
be75ab8022 | ||
|
|
69fd14bc7d | ||
|
|
008a1add5e | ||
|
|
b3643a3858 | ||
|
|
51d2f6dd7f | ||
|
|
82a448ae7d | ||
|
|
65de2d72b0 | ||
|
|
4a22fa60cd | ||
|
|
a07552b6e0 | ||
|
|
a1ea66ea29 | ||
|
|
6a8c1091fd | ||
|
|
378b1353df | ||
|
|
9c09cd9359 | ||
|
|
7d8db4cd58 | ||
|
|
bb786851ed | ||
|
|
a734388953 | ||
|
|
d5c779c6b3 | ||
|
|
f085204b84 | ||
|
|
36dbaf9967 | ||
|
|
e6001d3152 | ||
|
|
9f57ac239b | ||
|
|
c3a8c11b0c | ||
|
|
8e3cf1ca61 | ||
|
|
f4c6bde95c | ||
|
|
344be7574a | ||
|
|
5eb4509a66 | ||
|
|
f13d04bae9 | ||
|
|
856d9bbc0f | ||
|
|
457f0e82a3 | ||
|
|
2904126b94 | ||
|
|
3e543bc563 | ||
|
|
06f313e361 | ||
|
|
bd09caaa27 | ||
|
|
d922671764 | ||
|
|
8c45a85e61 | ||
|
|
dd486f53ee | ||
|
|
04c414477b | ||
|
|
1df14a6af0 | ||
|
|
c77bdda8a0 | ||
|
|
0db2497936 | ||
|
|
b9ea6c3803 | ||
|
|
6b7af0b98b | ||
|
|
ef35bd89ff | ||
|
|
64cd3e83c9 | ||
|
|
e3173d2c99 | ||
|
|
baa0a2c9a4 | ||
|
|
2bf037b4e8 | ||
|
|
20a911071d | ||
|
|
24a640bf2a | ||
|
|
7d0bcd10a7 | ||
|
|
2c6cfe6853 | ||
|
|
3ccb96cd41 | ||
|
|
4854d89f81 | ||
|
|
8e8c8d3c87 | ||
|
|
b9616a4d2d | ||
|
|
7af1fc8277 | ||
|
|
29aa8a8190 | ||
|
|
22d7fbdbae | ||
|
|
1beea155ae | ||
|
|
b7071f6fc4 | ||
|
|
acfebba27b | ||
|
|
2a61a5442b | ||
|
|
74b2c78b92 | ||
|
|
0f83c07944 | ||
|
|
3b96d12791 | ||
|
|
a5a11654ea | ||
|
|
6543cff055 | ||
|
|
b881e6f83b | ||
|
|
78c17debb1 | ||
|
|
2b0f7faea4 | ||
|
|
5e6e144e09 | ||
|
|
753ea4414a | ||
|
|
203c77a45e | ||
|
|
9812f9c3fb | ||
|
|
b94097cb74 | ||
|
|
8bf34d8a27 | ||
|
|
d2b0f63442 | ||
|
|
8b0a52444c | ||
|
|
964f44e4d8 | ||
|
|
a6d1003497 | ||
|
|
c633e822b4 | ||
|
|
edf6300473 | ||
|
|
979da19ab8 | ||
|
|
1ce6c1300b | ||
|
|
6220c7e391 | ||
|
|
14c3168379 | ||
|
|
dcb585f3e5 | ||
|
|
8f26bde3f2 | ||
|
|
89126f58fd | ||
|
|
3bf0ae1ed2 | ||
|
|
8075c26a4c | ||
|
|
9b7265a794 | ||
|
|
c6dd3473c6 | ||
|
|
736e2ab430 | ||
|
|
366c71f353 | ||
|
|
a82e01cd19 | ||
|
|
67110ae729 | ||
|
|
cc93a15ac9 | ||
|
|
48f006fc65 | ||
|
|
03d65262fd | ||
|
|
5570fbd25a | ||
|
|
e4edec582d | ||
|
|
27424b2928 | ||
|
|
841d8c3466 | ||
|
|
3aaf3c46d4 | ||
|
|
4be21db2db | ||
|
|
65e9e98033 | ||
|
|
fa5b2af750 | ||
|
|
79fa824a27 | ||
|
|
7cfcf20b10 | ||
|
|
e975f7ef29 | ||
|
|
20e33a2a2a | ||
|
|
1e099837ad | ||
|
|
da947375a5 | ||
|
|
ee6630e651 | ||
|
|
9ebafd4bb2 | ||
|
|
cbeae26ce7 | ||
|
|
7563ff8b1f | ||
|
|
2cc5f1a08a | ||
|
|
31f622b5c7 | ||
|
|
ec325445c6 | ||
|
|
f6cc6cdf0b | ||
|
|
e759ccae88 | ||
|
|
c5636422a9 | ||
|
|
cd6fa64a21 | ||
|
|
eec65e81e7 | ||
|
|
a0971eefb7 | ||
|
|
7647ac7978 | ||
|
|
484a05dfdb | ||
|
|
4653df411d | ||
|
|
27bf484e98 | ||
|
|
44c3fe3909 | ||
|
|
35278cc7d7 | ||
|
|
536db0d3b5 | ||
|
|
6183d906dd | ||
|
|
a19fc30a4b | ||
|
|
bc783511b0 | ||
|
|
ff44b53b52 | ||
|
|
8fedcc4046 | ||
|
|
0d49410af1 | ||
|
|
d40d5d298a | ||
|
|
797de46345 | ||
|
|
d1a01a8176 | ||
|
|
e8eaba2b25 | ||
|
|
e3166b6660 | ||
|
|
11782bdb17 | ||
|
|
55a24b753a | ||
|
|
dfaef65dcf | ||
|
|
8f8ebbc438 | ||
|
|
f5c3480e83 | ||
|
|
e818d7d503 | ||
|
|
359f642662 | ||
|
|
723d2419d0 | ||
|
|
af1d845398 | ||
|
|
30dd715452 | ||
|
|
4474b9a1c3 | ||
|
|
beaa52cb4b | ||
|
|
82820f17b4 | ||
|
|
af2c08fa76 | ||
|
|
2a626c2bd2 | ||
|
|
e6826c2b97 | ||
|
|
1f53f6f82f | ||
|
|
a3f1b27bd6 | ||
|
|
d0fec8d06c | ||
|
|
00e4559b61 | ||
|
|
15d734b9a0 | ||
|
|
204a365170 | ||
|
|
831b6c6c90 | ||
|
|
ff245362e3 | ||
|
|
c397a00640 | ||
|
|
3a8051e58a | ||
|
|
231d429bea | ||
|
|
8a581cc8cf | ||
|
|
e35b009a0e | ||
|
|
88da3f5402 | ||
|
|
8426ecf6be | ||
|
|
b821229a10 | ||
|
|
28c85b32ab | ||
|
|
7ecaea1e8e | ||
|
|
b2e5c15083 | ||
|
|
bf8419b987 | ||
|
|
d4f7a4c095 | ||
|
|
79ed5577b8 | ||
|
|
0bac9ce531 | ||
|
|
d585b66fa4 | ||
|
|
e7cbcee498 | ||
|
|
f19db0eaff | ||
|
|
ae8e3bb8f3 | ||
|
|
6bb54d1be0 | ||
|
|
0ecfa2580d | ||
|
|
e4f5d077e9 | ||
|
|
f0bc541faa | ||
|
|
4b7c20f9d4 | ||
|
|
9b36a86525 | ||
|
|
861d5124ab | ||
|
|
973900e759 | ||
|
|
a7008c8e9d | ||
|
|
acea899bcb | ||
|
|
63f0fc945f | ||
|
|
1c714a10f0 | ||
|
|
a004c296d6 | ||
|
|
337cd636a1 | ||
|
|
6ec2d74438 | ||
|
|
203a56c61e | ||
|
|
d138a182cc | ||
|
|
95eb6211a1 | ||
|
|
4739365ace | ||
|
|
1494bc3fa2 | ||
|
|
7b77676c2f | ||
|
|
ac4d4092ac | ||
|
|
978044a70e | ||
|
|
14cbd70aa6 | ||
|
|
befe97e0d0 | ||
|
|
0d60d7de5d | ||
|
|
1b88b322d4 | ||
|
|
d3cfe8dd4e | ||
|
|
f9626feb2d | ||
|
|
e797f2e35c | ||
|
|
f2b016bfc9 | ||
|
|
0e7f328d08 | ||
|
|
fd74fc86fd | ||
|
|
ff4eb01a42 | ||
|
|
2f533068b9 | ||
|
|
94db648424 | ||
|
|
37756a8389 | ||
|
|
3b1744f208 | ||
|
|
53bfe35486 | ||
|
|
d5321ea34d | ||
|
|
2a561bf1e1 | ||
|
|
aa8a3b59b1 | ||
|
|
c1f8ef75d3 | ||
|
|
f94203900a | ||
|
|
945a6124b6 | ||
|
|
06bc2b63c8 | ||
|
|
b640e88eff | ||
|
|
f2fad0ae26 | ||
|
|
8a2f63b734 | ||
|
|
7894035e1c | ||
|
|
cc579e4358 | ||
|
|
802ea9dccd | ||
|
|
788b3f7f39 | ||
|
|
5a312412f2 | ||
|
|
3115c839ed | ||
|
|
1b7007d267 | ||
|
|
1c1465a4f7 | ||
|
|
4e2e518f6a | ||
|
|
8c508c82e7 | ||
|
|
19e033b5ff | ||
|
|
a52ef8e416 | ||
|
|
b3c20a361d | ||
|
|
87ffc9aca1 | ||
|
|
8899fb784a | ||
|
|
8ae4ba1c6d | ||
|
|
9abf55c24c | ||
|
|
3504bb650f | ||
|
|
cbf4bcd2b3 | ||
|
|
70ac15e052 | ||
|
|
5acf2e2cb4 | ||
|
|
bb21d92c36 | ||
|
|
80c96e8e6f | ||
|
|
0b5cfa4e0b | ||
|
|
aa85b49673 | ||
|
|
04e35f0daf | ||
|
|
dcd417d9e1 | ||
|
|
8eb6f95371 | ||
|
|
a4947a1a53 | ||
|
|
bba9c68822 | ||
|
|
ace3f2f951 | ||
|
|
c07cf2c353 | ||
|
|
75c95410b7 | ||
|
|
e9e4030ae5 | ||
|
|
c78cb58c50 | ||
|
|
0ad7eada7b | ||
|
|
1670c7cf0d | ||
|
|
be221e8df9 | ||
|
|
3c7dae119e | ||
|
|
56c4396a6e | ||
|
|
4ce1a5c971 | ||
|
|
5852f6de55 | ||
|
|
01682b1f05 | ||
|
|
82496aab64 | ||
|
|
9869e6ec91 | ||
|
|
3ee87ca7d4 | ||
|
|
7dbf6a6cd5 | ||
|
|
8802619dd4 | ||
|
|
8d5be89424 | ||
|
|
0caba1fbdb | ||
|
|
6fb78a8758 | ||
|
|
c25d26bbb4 | ||
|
|
ddbf09971d | ||
|
|
09c3bcb4ad | ||
|
|
fd63f7c6ce | ||
|
|
85148842d4 | ||
|
|
6d96590587 | ||
|
|
b7a09b9201 | ||
|
|
6a87697239 | ||
|
|
bd307f4e23 | ||
|
|
f9ff03a835 | ||
|
|
2b13f2ccc0 | ||
|
|
f1750fb9c6 | ||
|
|
efaf80c5d0 | ||
|
|
959f4c0547 | ||
|
|
627cc92643 | ||
|
|
1b16f19afc | ||
|
|
037c97bbc9 | ||
|
|
bd7c3bed54 | ||
|
|
338cc5101b | ||
|
|
04a9e7f251 | ||
|
|
fd8e1ac720 | ||
|
|
b402c96065 | ||
|
|
5ab387d33b | ||
|
|
ff9e0dc823 | ||
|
|
5d44b2ea72 | ||
|
|
1547e88a9a | ||
|
|
1a19a35223 | ||
|
|
237910315c | ||
|
|
a0d24ebc12 | ||
|
|
1e96287768 | ||
|
|
a1711aa2c9 | ||
|
|
996d168e57 | ||
|
|
05bb11efb2 | ||
|
|
0847bc6ef9 | ||
|
|
f66e5db9b0 | ||
|
|
dc60a4e495 | ||
|
|
c699a3bdd7 | ||
|
|
aaadc59ce1 | ||
|
|
a343cb0f24 | ||
|
|
b9bdb95c3f | ||
|
|
f67c6d9684 | ||
|
|
3cd7504450 | ||
|
|
59ae4124b7 | ||
|
|
ee414d57cf | ||
|
|
b5707b44d2 |
-29
@@ -1,29 +0,0 @@
|
||||
*.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz *.bz2
|
||||
=*
|
||||
TODO AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
|
||||
configparms
|
||||
|
||||
sun[43]* i[345]86* hp300*
|
||||
|
||||
ieeetest hppa-sysdeps regex
|
||||
|
||||
gpl2lgpl.sed
|
||||
distinfo
|
||||
distinfo
|
||||
|
||||
test-include
|
||||
analysis
|
||||
docs
|
||||
releases
|
||||
|
||||
libc.prj .libc.prcs_aux
|
||||
libc.proj .snprj
|
||||
|
||||
TODO.html
|
||||
|
||||
autom4te*.cache
|
||||
|
||||
rtkaio
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
*~
|
||||
*.d
|
||||
*.o
|
||||
*.so
|
||||
*.po
|
||||
*.go
|
||||
*.bo
|
||||
stamp.*
|
||||
*.stamp
|
||||
*.ustamp
|
||||
*.udeps
|
||||
*.gz
|
||||
*.Z
|
||||
*.tar
|
||||
*.tgz
|
||||
*.bz2
|
||||
=*
|
||||
TODO
|
||||
AUTHORS
|
||||
copyr-*
|
||||
copying.*
|
||||
glibc-*
|
||||
|
||||
configparms
|
||||
|
||||
ieeetest
|
||||
regex
|
||||
|
||||
gpl2lgpl.sed
|
||||
distinfo
|
||||
|
||||
test-include
|
||||
analysis
|
||||
docs
|
||||
releases
|
||||
|
||||
libc.prj
|
||||
.libc.prcs_aux
|
||||
libc.proj
|
||||
.snprj
|
||||
|
||||
TODO.html
|
||||
|
||||
autom4te*.cache
|
||||
|
||||
rtkaio
|
||||
@@ -1,3 +1,409 @@
|
||||
2009-07-25 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #10448]
|
||||
* sysdeps/posix/getaddrinfo.c (gaih_inet): If NSS module contains no
|
||||
callback we must touch the status to avoid using stale value.
|
||||
|
||||
2009-06-16 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* login/Makefile: Build pt_chown as PIE.
|
||||
|
||||
2009-06-16 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* login/Makefile: If necessary link pt_chown with -lcap.
|
||||
|
||||
2009-06-02 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* Makeconfig (+link-pie): Define.
|
||||
(+prectorS): Define.
|
||||
(+postctorS): Define.
|
||||
* elf/Makefile ($(objpfx)tst-pie1): Use $(+link-pie).
|
||||
* nscd/Makefile ($(objpfx)nscd): Likewise.
|
||||
|
||||
2009-05-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/accept4.c: Include kernel-features.h.
|
||||
(accept4): If __NR_accept4 is not defined, but __NR_socketcall
|
||||
is, either do nothing at all if __ASSUME_ACCEPT4, or
|
||||
call __internal_accept4 and handle EINVAL -> ENOSYS translation.
|
||||
* sysdeps/unix/sysv/linux/internal_accept4.S: New file.
|
||||
* sysdeps/unix/sysv/linux/i386/accept4.S (SOCKOP_accept4): Don't
|
||||
define.
|
||||
* sysdeps/unix/sysv/linux/i386/internal_accept4.S: New file.
|
||||
* sysdeps/unix/sysv/linux/Makefile (sysdep-routines): Add
|
||||
internal_accept4 in socket directory.
|
||||
|
||||
2009-07-26 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #10422]
|
||||
* sysdeps/unix/sysv/linux/eventfd.c: Add compatibility for old
|
||||
kernels, dropped when eventfd2 support was added.
|
||||
* sysdeps/unix/sysv/linux/signalfd.c: Add compatibility for old
|
||||
kernels, dropped when signalfd4 support was added.
|
||||
* sysdeps/unix/sysv/linux/kernel-features.h: More CLOEXEC syscalls
|
||||
added, name them.
|
||||
|
||||
[BZ #10452]
|
||||
* resolv/res_send.c (send_dg): Pass full SERVFAIL, NOTIMP, REFUSED
|
||||
replies up.
|
||||
|
||||
2009-07-16 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* nscd/cache.c (cache_add): Use atomic_compare_and_exchange_bool_rel
|
||||
instead of atomic_compare_and_exchange_bool_acq to ensure pointer
|
||||
is written before the list head update.
|
||||
Patch by Andreas Schwab <aschwab@redhat.com>.
|
||||
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* malloc/malloc.c [ATOMIC_FASTBINS] (_int_free): Make check for
|
||||
corruption thread-safe.
|
||||
|
||||
2009-07-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* include/atomic.h (catomic_compare_and_exchange_val_rel): If arch
|
||||
overrides atomic_compare_and_exchange_val_rel, define to
|
||||
atomic_compare_and_exchange_val_rel by default, otherwise default
|
||||
to catomic_compare_and_exchange_val_acq.
|
||||
(catomic_compare_and_exchange_bool_rel): If arch overrides
|
||||
atomic_compare_and_exchange_bool_rel, define to
|
||||
atomic_compare_and_exchange_bool_rel by default.
|
||||
* malloc/malloc.c (_int_free): Revert 2009-07-02 change.
|
||||
Use catomic_compare_and_exchange_val_rel instead of
|
||||
catomic_compare_and_exchange_val_acq.
|
||||
|
||||
2009-07-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf/Makefile: Don't build modules for tst-audit3 for anything
|
||||
but x86-64 targets.
|
||||
|
||||
2009-07-10 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/sys/epoll.h: Fix comment.
|
||||
|
||||
2009-07-03 Andreas Schwab <aschwab@redhat.com>
|
||||
|
||||
* sysdeps/powerpc/sysdep.h (PPC_FEATURE_ARCH_2_06): Fix value.
|
||||
(PPC_FEATURE_HAS_VSX): Likewise.
|
||||
|
||||
2009-06-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf/Makefile (distribute): Remove tst-audit.sh. Add
|
||||
tst-audit2.c, tst-audit3.c, tst-auditmod3a.c, tst-auditmod3b.c.
|
||||
(tests): Add tst-audit3 for x86_64.
|
||||
(modules-names): Add tst-auditmod3a, tst-auditmod3b.
|
||||
($(objpfx)tst-audit3): Define.
|
||||
($(objpfx)tst-audit3.out): Define.
|
||||
(tst-audit3-ENV): Define.
|
||||
* elf/tst-audit3.c: New file.
|
||||
* elf/tst-auditmod3a.c: New file.
|
||||
* elf/tst-auditmod3b.c: New file.
|
||||
* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Save
|
||||
and restore xmm6.
|
||||
|
||||
2009-07-02 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* malloc/malloc.c [ATOMIC_FASTBINS] (_int_free): Add full barrier when
|
||||
adding to fast bin list.
|
||||
|
||||
2009-07-01 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* nis/nss_nis/nis-network.c (_nss_nis_getnetbyaddr_r): Don't use
|
||||
inet_makeaddr. This worked only with class-based networks.
|
||||
* nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r):
|
||||
Likewise.
|
||||
|
||||
* nss/nss_files/files-network.c (netbyaddr): If type is AF_UNSPEC,
|
||||
recognize all types.
|
||||
* nss/getent.c (networks_keys): Pass AF_UNSPEC instead of AF_UNIX
|
||||
to getnetbyaddr. Fix network parameter to getnetbyaddr. It must
|
||||
be in host byte order.
|
||||
|
||||
2009-06-24 Andreas Schwab <aschwab@redhat.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S: Fix cfa offset
|
||||
for saved registers.
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S: Likewise.
|
||||
* sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S: Likewise.
|
||||
* sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S: Likewise.
|
||||
|
||||
2009-06-23 Andreas Schwab <aschwab@redhat.com>
|
||||
|
||||
* time/tzfile.c (__tzfile_read): Don't use an empty TZ string.
|
||||
|
||||
2009-06-18 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/bits/socket.h: Define PF_IEEE802154 and
|
||||
AF_IEEE802154.
|
||||
* sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/net/if_arp.h: Define ARPHRD_IEEE802154
|
||||
and ARPHRD_IEEE802154_PHY.
|
||||
|
||||
* sysdeps/unix/sysv/linux/sparc/bits/socket.h: Add missing definitions
|
||||
relative to generic Linux version.
|
||||
|
||||
2009-06-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/x86_64/memchr.S (memchr): Use unsigned instead of signed
|
||||
comparisons.
|
||||
* string/test-memchr.c (do_random_tests): Test very large lengths
|
||||
as well.
|
||||
|
||||
2009-04-22 Ryan S. Arnold <rsa@us.ibm.com>
|
||||
|
||||
[BZ #10107]
|
||||
* sysdeps/powerpc/powerpc32/power6/memcpy.S (memcpy): Replace cmpldi
|
||||
with cmplwi.
|
||||
* sysdeps/powerpc/powerpc32/power6/memset.S (memset): Likewise.
|
||||
|
||||
2009-06-15 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #10166]
|
||||
* sysdeps/unix/sysv/linux/grantpt.c: Remove shortcut which was used
|
||||
when the slave device is in devpts or devfs.
|
||||
|
||||
[BZ #10183]
|
||||
* posix/tst-cpucount.c: Don't try more than CPU_SETSIZE bits.
|
||||
|
||||
[BZ #10195]
|
||||
* inet/netinet/icmp6.h (struct nd_opt_home_agent_info): Change type
|
||||
of nd_opt_home_agent_info_preference to uint16_t.
|
||||
Patch by Arnaud Ebalard <arno@natisbad.org>.
|
||||
|
||||
[BZ #10203]
|
||||
* nis/nss_nis/nis-pwd.c (internal_nis_endpwent): Free all buffers,
|
||||
not just the currently used one and those which follow.
|
||||
Patch by Joe Landers <jlanders@vmware.com>.
|
||||
|
||||
[BZ #10196]
|
||||
* libio/tst-fgetwc.c (do_test): Use de_DE.UTF-8 as locale name.
|
||||
* libio/Makefile: Run tst-fgetwc with necessary envvar.
|
||||
Patch by Bruce Dubbs <bdubbs@linuxfromscratch.org>.
|
||||
|
||||
* time/tzfile.c (__tzfile_read): Correct computation of tzspec_len.
|
||||
|
||||
[BZ #10211]
|
||||
* time/tzfile.c (__tzfile_compute): If we use the envvar format still
|
||||
handle leap seconds if they are available.
|
||||
Patch by Akinori Hattori <hattya@gentoo.org>.
|
||||
|
||||
2009-06-11 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* resolv/res_send.c (send_dg): Remember we switched to
|
||||
single-request mode.
|
||||
|
||||
2009-06-09 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* dlfcn/dlfcn.h: Remove comma at end of enum.
|
||||
Patch by J.H.M. Dassen <rdassen@redhat.com>.
|
||||
|
||||
* libio/fileops.c (_IO_new_file_fopen): Don't prematurely stop
|
||||
parsing mode string.
|
||||
|
||||
2009-06-03 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* elf/dl-sysdep.c (_dl_show_auxv): Terminate correct string.
|
||||
|
||||
2009-05-30 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* configure.in: Move AC_CANONICAL_HOST before first use of $host
|
||||
and $build.
|
||||
* configure: Regenerated.
|
||||
|
||||
2009-05-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/ieee754/ldbl-128/s_expm1l.c: Include <errno.h>.
|
||||
(__expm1l): Set errno to ERANGE on overflow.
|
||||
* sysdeps/ieee754/ldbl-128/s_tanl.c: Include <errno.h>.
|
||||
(__tanl): Set errno to EDOM for ±Inf.
|
||||
* sysdeps/ieee754/ldbl-128/s_cosl.c: Include <errno.h>.
|
||||
(__cosl): Set errno to EDOM for ±Inf.
|
||||
* sysdeps/ieee754/ldbl-128/s_sinl.c: Include <errno.h>.
|
||||
(__sinl): Set errno to EDOM for ±Inf.
|
||||
|
||||
2009-05-22 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* sysdeps/ieee754/ldbl-128ibm/s_sinl.c: Set errno for ±Inf.
|
||||
* sysdeps/ieee754/ldbl-128ibm/s_cosl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128ibm/s_tanl.c: Likewise.
|
||||
* sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: Set errno for overflow.
|
||||
|
||||
2009-05-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #10162]
|
||||
* sysdeps/ia64/memchr.S: Use speculative load.
|
||||
|
||||
2009-05-21 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/kernel-features.h: Don't define
|
||||
__ASSUME_ACCEPT4 for IA-64.
|
||||
|
||||
2009-05-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/accept4.c (__NR_accept4): Don't define.
|
||||
|
||||
* sysdeps/unix/sysv/linux/socketcall.h (SOCKOP_paccept): Remove.
|
||||
(SOCKOP_accept4): Define.
|
||||
|
||||
2009-05-20 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
Sun approved the change of the license.
|
||||
* sunrpc/auth_des.c: Replace license text.
|
||||
* sunrpc/auth_none.c: Likewise.
|
||||
* sunrpc/auth_unix.c: Likewise.
|
||||
* sunrpc/authdes_prot.c: Likewise.
|
||||
* sunrpc/authuxprot.c: Likewise.
|
||||
* sunrpc/bindrsvprt.c: Likewise.
|
||||
* sunrpc/clnt_gen.c: Likewise.
|
||||
* sunrpc/clnt_perr.c: Likewise.
|
||||
* sunrpc/clnt_raw.c: Likewise.
|
||||
* sunrpc/clnt_simp.c: Likewise.
|
||||
* sunrpc/clnt_tcp.c: Likewise.
|
||||
* sunrpc/clnt_udp.c: Likewise.
|
||||
* sunrpc/clnt_unix.c: Likewise.
|
||||
* sunrpc/des_crypt.c: Likewise.
|
||||
* sunrpc/des_soft.c: Likewise.
|
||||
* sunrpc/get_myaddr.c: Likewise.
|
||||
* sunrpc/getrpcport.c: Likewise.
|
||||
* sunrpc/key_call.c: Likewise.
|
||||
* sunrpc/key_prot.c: Likewise.
|
||||
* sunrpc/openchild.c: Likewise.
|
||||
* sunrpc/pm_getmaps.c: Likewise.
|
||||
* sunrpc/pm_getport.c: Likewise.
|
||||
* sunrpc/pmap_clnt.c: Likewise.
|
||||
* sunrpc/pmap_prot.c: Likewise.
|
||||
* sunrpc/pmap_prot2.c: Likewise.
|
||||
* sunrpc/pmap_rmt.c: Likewise.
|
||||
* sunrpc/rpc/auth.h: Likewise.
|
||||
* sunrpc/rpc/auth_unix.h: Likewise.
|
||||
* sunrpc/rpc/clnt.h: Likewise.
|
||||
* sunrpc/rpc/des_crypt.h: Likewise.
|
||||
* sunrpc/rpc/key_prot.h: Likewise.
|
||||
* sunrpc/rpc/netdb.h: Likewise.
|
||||
* sunrpc/rpc/pmap_clnt.h: Likewise.
|
||||
* sunrpc/rpc/pmap_prot.h: Likewise.
|
||||
* sunrpc/rpc/pmap_rmt.h: Likewise.
|
||||
* sunrpc/rpc/rpc.h: Likewise.
|
||||
* sunrpc/rpc/rpc_des.h: Likewise.
|
||||
* sunrpc/rpc/rpc_msg.h: Likewise.
|
||||
* sunrpc/rpc/svc.h: Likewise.
|
||||
* sunrpc/rpc/svc_auth.h: Likewise.
|
||||
* sunrpc/rpc/types.h: Likewise.
|
||||
* sunrpc/rpc/xdr.h: Likewise.
|
||||
* sunrpc/rpc_clntout.c: Likewise.
|
||||
* sunrpc/rpc_cmsg.c: Likewise.
|
||||
* sunrpc/rpc_common.c: Likewise.
|
||||
* sunrpc/rpc_cout.c: Likewise.
|
||||
* sunrpc/rpc_dtable.c: Likewise.
|
||||
* sunrpc/rpc_hout.c: Likewise.
|
||||
* sunrpc/rpc_main.c: Likewise.
|
||||
* sunrpc/rpc_parse.c: Likewise.
|
||||
* sunrpc/rpc_parse.h: Likewise.
|
||||
* sunrpc/rpc_prot.c: Likewise.
|
||||
* sunrpc/rpc_sample.c: Likewise.
|
||||
* sunrpc/rpc_scan.c: Likewise.
|
||||
* sunrpc/rpc_scan.h: Likewise.
|
||||
* sunrpc/rpc_svcout.c: Likewise.
|
||||
* sunrpc/rpc_tblout.c: Likewise.
|
||||
* sunrpc/rpc_util.c: Likewise.
|
||||
* sunrpc/rpc_util.h: Likewise.
|
||||
* sunrpc/rpcinfo.c: Likewise.
|
||||
* sunrpc/rpcsvc/bootparam_prot.x: Likewise.
|
||||
* sunrpc/rpcsvc/key_prot.x: Likewise.
|
||||
* sunrpc/rpcsvc/klm_prot.x: Likewise.
|
||||
* sunrpc/rpcsvc/mount.x: Likewise.
|
||||
* sunrpc/rpcsvc/nfs_prot.x: Likewise.
|
||||
* sunrpc/rpcsvc/rex.x: Likewise.
|
||||
* sunrpc/rpcsvc/rstat.x: Likewise.
|
||||
* sunrpc/rpcsvc/rusers.x: Likewise.
|
||||
* sunrpc/rpcsvc/sm_inter.x: Likewise.
|
||||
* sunrpc/rpcsvc/spray.x: Likewise.
|
||||
* sunrpc/rpcsvc/yppasswd.x: Likewise.
|
||||
* sunrpc/rtime.c: Likewise.
|
||||
* sunrpc/svc.c: Likewise.
|
||||
* sunrpc/svc_auth.c: Likewise.
|
||||
* sunrpc/svc_authux.c: Likewise.
|
||||
* sunrpc/svc_raw.c: Likewise.
|
||||
* sunrpc/svc_run.c: Likewise.
|
||||
* sunrpc/svc_simple.c: Likewise.
|
||||
* sunrpc/svc_tcp.c: Likewise.
|
||||
* sunrpc/svc_udp.c: Likewise.
|
||||
* sunrpc/svc_unix.c: Likewise.
|
||||
* sunrpc/svcauth_des.c: Likewise.
|
||||
* sunrpc/xcrypt.c: Likewise.
|
||||
* sunrpc/xdr.c: Likewise.
|
||||
* sunrpc/xdr_array.c: Likewise.
|
||||
* sunrpc/xdr_float.c: Likewise.
|
||||
* sunrpc/xdr_mem.c: Likewise.
|
||||
* sunrpc/xdr_rec.c: Likewise.
|
||||
* sunrpc/xdr_ref.c: Likewise.
|
||||
* sunrpc/xdr_sizeof.c: Likewise.
|
||||
* sunrpc/xdr_stdio.c: Likewise.
|
||||
|
||||
2009-05-18 Jakub Jelinek <jakub@redhat.com>
|
||||
Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* nscd/nscd_helper.c (MINIMUM_HASHENTRY_SIZE): Define.
|
||||
(__nscd_cache_search): Assume each entry in the
|
||||
hash chain needs one hashentry and half of datahead. Use
|
||||
MINIMUM_HASHENTRY_SIZE instead of sizeof(hashentry).
|
||||
|
||||
2009-05-16 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #10159]
|
||||
* stdlib/stdlib.h (__WAIT_INT): Match the definition in <sys/wait.h>.
|
||||
|
||||
* nscd/nscd_helper.c (__nscd_cache_search): Fix exit condition in last
|
||||
patch.
|
||||
|
||||
2009-05-15 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* nscd/nscd_helper.c (__nscd_cache_search): Introduce loop counter.
|
||||
Use it if we absolutely cannot reach any more correct list elements
|
||||
because that many do not fit into the currently mapped database.
|
||||
|
||||
2009-05-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* nscd/nscd_helper.c: Include stddef.h.
|
||||
(__nscd_cache_search): Add datalen argument. Use atomic_forced_read
|
||||
in a couple of places. Return NULL if trail is not less than
|
||||
datasize, don't consider dataheads with length smaller than
|
||||
offsetof (struct datahead, data) + datalen.
|
||||
* nscd/nscd_client.h (__nscd_cache_search): Adjust prototype.
|
||||
* nscd/nscd_gethst_r.c (nscd_gethst_r): Adjust callers.
|
||||
* nscd/nscd_getpw_r.c (nscd_getpw_r): Likewise.
|
||||
* nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise.
|
||||
* nscd/nscd_getai.c (__nscd_getai): Likewise.
|
||||
* nscd/nscd_initgroups.c (__nscd_getgrouplist): Likewise.
|
||||
* nscd/nscd_getserv_r.c (nscd_getserv_r): Likewise.
|
||||
|
||||
* nscd/selinux.c (nscd_avc_destroy): Removed.
|
||||
* nscd/selinux.h (nscd_avc_destroy): Likewise.
|
||||
* nscd/nscd.c (termination_handler): Don't call
|
||||
nscd_avc_destroy.
|
||||
|
||||
2009-05-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* include/atomic.h: Formatting.
|
||||
(catomic_compare_and_exchange_val_acq): Don't define if already
|
||||
defined by bits/atomic.h.
|
||||
|
||||
2009-05-10 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* version.h (VERSION): Bump to 2.10.1.
|
||||
|
||||
* nss/getXXbyYY_r.c: If NO_COMPAT_NEEDED is defined don't define any
|
||||
compatibility functions.
|
||||
* nss/getXXent_r.c: Likewise.
|
||||
* gshadow/getsgent_r.c: Define NO_COMPAT_NEEDED.
|
||||
* gshadow/getsgnam_r.c: Likewise.
|
||||
* gshadow/Version: Remove duplicate entries.
|
||||
|
||||
* sysdeps/x86_64/cacheinfo.c (intel_02_cache_info): Add missing entries
|
||||
for recent processor.
|
||||
* sysdeps/unix/sysv/linux/i386/sysconf.c (intel_02_cache_info):
|
||||
Likewise.
|
||||
|
||||
2009-05-09 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* version.h (VERSION): Bump for 2.10 release.
|
||||
@@ -7660,6 +8066,13 @@
|
||||
* include/sys/cdefs.h: Redefine __nonnull so that test for
|
||||
incorrect parameters in the libc code itself are not omitted.
|
||||
|
||||
2006-07-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* nscd/connections.c (sighup_pending): New variable.
|
||||
(nscd_run): If sighup_pending, prune all 3 caches.
|
||||
(sighup_handler): Don't prune caches here, rather just set
|
||||
sighup_pending flag.
|
||||
|
||||
2007-05-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/ia64/fpu/fraiseexcpt.c (feraiseexcept): Don't raise overflow
|
||||
@@ -7955,6 +8368,10 @@
|
||||
[BZ #4368]
|
||||
* stdlib/stdlib.h: Remove obsolete part of comment for realpath.
|
||||
|
||||
2007-04-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* locale/programs/locarchive.c (add_alias, insert_name): Remove static.
|
||||
|
||||
2007-04-16 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #4364]
|
||||
@@ -9212,6 +9629,15 @@
|
||||
separators also if no non-zero digits found.
|
||||
* stdlib/Makefile (tests): Add tst-strtod3.
|
||||
|
||||
2006-12-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h
|
||||
if IFA_MAX is not defined.
|
||||
(IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not
|
||||
defined.
|
||||
* sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h
|
||||
instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h.
|
||||
|
||||
2006-12-09 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #3632]
|
||||
|
||||
@@ -475,6 +475,14 @@
|
||||
* sysdeps/generic/bits/confname.h: Define _SC_IPV6 and
|
||||
_SC_RAW_SOCKETS.
|
||||
|
||||
2004-11-26 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* posix/Makefile (generated: Add getconf.speclist.
|
||||
($(inst_libexecdir)/getconf): Use getconf.speclist instead of
|
||||
getconf output.
|
||||
($(objpfx)getconf.speclist): New rule.
|
||||
* posix/getconf.speclist.h: New file.
|
||||
|
||||
2004-11-26 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR.
|
||||
@@ -1103,6 +1111,13 @@
|
||||
* sysdeps/generic/tempname.c (__path_search): Add missing argument
|
||||
TRY_TMPDIR.
|
||||
|
||||
2004-11-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* include/features.h (__USE_FORTIFY_LEVEL): Also set for Red Hat
|
||||
GCC 3.4.x-RH >= 3.4.2-8.
|
||||
* debug/tst-chk1.c (do_test): Deal with GCC 3.4.x-RH not
|
||||
being able to recognize subobjects.
|
||||
|
||||
2004-10-31 Mariusz Mazur <mmazur@kernel.pl>
|
||||
|
||||
* sysdeps/unix/sysv/linux/alpha/setregid.c: New file.
|
||||
@@ -1443,6 +1458,11 @@
|
||||
* sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ...
|
||||
(__readonly_area): ... this.
|
||||
|
||||
2004-10-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* include/features.h (__USE_FORTIFY_LEVEL): Enable even with
|
||||
Red Hat gcc4 4.0.0 and above.
|
||||
|
||||
2004-10-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking
|
||||
@@ -3182,6 +3202,23 @@
|
||||
before return type.
|
||||
* locale/localename.c (__current_locale_name): Likewise.
|
||||
|
||||
2004-08-31 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* elf/ldconfig.c (parse_conf): Add prefix argument, prepend it
|
||||
before arguments to add_dir and pass to parse_conf_include.
|
||||
(parse_conf_include): Add prefix argument, pass it down to
|
||||
parse_conf.
|
||||
(main): Call arch_startup. Adjust parse_conf caller.
|
||||
Call add_arch_dirs.
|
||||
* sysdeps/generic/dl-cache.h (arch_startup, add_arch_dirs): Define.
|
||||
* sysdeps/unix/sysv/linux/i386/dl-cache.h: New file.
|
||||
* sysdeps/unix/sysv/linux/ia64/dl-cache.h (EMUL_HACK, arch_startup,
|
||||
add_arch_dirs): Define.
|
||||
* sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Prepend
|
||||
/emul/ia32-linux before the 32-bit ld.so pathname.
|
||||
* sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file.
|
||||
* sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file.
|
||||
|
||||
2004-08-30 Roland McGrath <roland@frob.com>
|
||||
|
||||
* scripts/extract-abilist.awk: If `lastversion' variable defined, omit
|
||||
|
||||
+101
@@ -171,6 +171,11 @@
|
||||
[BZ #2611]
|
||||
* stdio-common/renameat.c (renameat): Fix typo.
|
||||
|
||||
2006-04-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* nscd/connections.c (sighup_handler): Only run prune_cache on
|
||||
enabled databases.
|
||||
|
||||
2006-04-26 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* Makeconfig (%.v.i rule): Don't use -DASSEMBLER.
|
||||
@@ -1030,6 +1035,34 @@
|
||||
_SC_CPUTIME and _SC_THREAD_CPUTIME here.
|
||||
* sysdeps/unix/sysv/linux/x86_64/sysconf.c (__sysconf): Likewise.
|
||||
|
||||
2006-03-04 Jakub Jelinek <jakub@redhat.com>
|
||||
Roland McGrath <roland@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/i386/lowlevellock.h
|
||||
(LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
|
||||
LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
|
||||
(lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
|
||||
lll_robust_mutex_cond_lock, lll_mutex_timedlock,
|
||||
lll_robust_mutex_timedlock, lll_mutex_unlock,
|
||||
lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
|
||||
Add _L_*_ symbols around the subsection.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
|
||||
|
||||
2006-03-03 Jakub Jelinek <jakub@redhat.com>
|
||||
Roland McGrath <roland@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
|
||||
(LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
|
||||
LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
|
||||
(lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
|
||||
lll_robust_mutex_cond_lock, lll_mutex_timedlock,
|
||||
lll_robust_mutex_timedlock, lll_mutex_unlock,
|
||||
lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
|
||||
Add _L_*_ symbols around the subsection.
|
||||
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
|
||||
* sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
|
||||
|
||||
2006-03-05 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* malloc/malloc.c (MALLOC_ALIGNMENT): Revert to (2 * SIZE_SZ) value.
|
||||
@@ -2042,6 +2075,11 @@
|
||||
(__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT
|
||||
followed by __THROW.
|
||||
|
||||
* sysdeps/unix/sysv/linux/futimesat.c (futimesat): If
|
||||
file == NULL, use __futimes unconditionally.
|
||||
|
||||
* manual/filesys.texi (futimes): Fix prototype.
|
||||
|
||||
2006-02-02 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat]
|
||||
@@ -2101,6 +2139,11 @@
|
||||
* sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Fix a typo.
|
||||
* sysdeps/s390/fpu/libm-test-ulps: Remove llrint ulps.
|
||||
|
||||
2006-01-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* include/bits/stdlib-ldbl.h: New file.
|
||||
* include/bits/wchar-ldbl.h: New file.
|
||||
|
||||
2006-01-19 Thomas Schwinge <tschwinge@gnu.org>
|
||||
|
||||
* libio/genops.c: Include <stdbool.h>.
|
||||
@@ -4527,6 +4570,10 @@
|
||||
|
||||
* elf/order2mod2.c (init): Cast ignored value to void.
|
||||
|
||||
2005-12-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* elf/ldconfig.c (search_dir): Skip prelink temporaries.
|
||||
|
||||
2005-12-27 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* elf/tst-tls13.c (do_test): Avoid using the library path when
|
||||
@@ -4810,6 +4857,26 @@
|
||||
* sysdeps/unix/sysv/linux/time.c: If __NR_time is not defined,
|
||||
use sysdeps/unix/time.c implementation.
|
||||
|
||||
2005-12-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* malloc/mtrace.c (__libc_malloc, __libc_free, __libc_realloc,
|
||||
__libc_memalign): Add prototypes and libc_hidden_proto resp.
|
||||
defines for !_LIBC.
|
||||
(tr_freehook): Call __libc_free instead of free.
|
||||
(tr_mallochook): Call __libc_malloc instead of malloc.
|
||||
(tr_reallochook): Call __libc_realloc instead of realloc.
|
||||
(tr_memalignhook): Call __libc_memalign instead of memalign.
|
||||
* malloc/mcheck.c: Include stdlib.h.
|
||||
(__libc_malloc, __libc_free, __libc_realloc,
|
||||
__libc_memalign): Add prototypes and libc_hidden_proto resp.
|
||||
defines for !_LIBC.
|
||||
(freehook): Call __libc_free instead of free.
|
||||
(mallochook): Call __libc_malloc instead of malloc.
|
||||
(reallochook): Call __libc_realloc instead of realloc.
|
||||
(memalignhook): Call __libc_memalign instead of memalign.
|
||||
(mcheck): Call __libc_malloc and __libc_free instead of
|
||||
malloc and free.
|
||||
|
||||
2005-12-19 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #1955]
|
||||
@@ -7928,6 +7995,11 @@
|
||||
R_ARM_TLS_TPOFF32, R_ARM_TLS_GD32, R_ARM_TLS_LDM32,
|
||||
R_ARM_TLS_LDO32, R_ARM_TLS_IE32, R_ARM_TLS_LE32): New macros.
|
||||
|
||||
2005-10-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* nscd/selinux.c (audit_init): Print error string in the failure
|
||||
message.
|
||||
|
||||
2005-10-03 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* sysdeps/powerpc/nofpu: Directory removed, saved in ports repository.
|
||||
@@ -8922,6 +8994,12 @@
|
||||
* argp/argp-help.c (__argp_error): __asprintf -> vasprintf.
|
||||
(__argp_failure): Likewise.
|
||||
|
||||
2005-08-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard):
|
||||
Shift marked &errno down on big-endian instead of up.
|
||||
* elf/tst-stackguard1.c (do_test): Fix a typo.
|
||||
|
||||
2005-08-08 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* nscd/cache.c (cache_add): Commit hash table and header to disk.
|
||||
@@ -9046,6 +9124,17 @@
|
||||
__syslog_chk.
|
||||
* misc/Versions: Export __syslog_chk and __vsyslog_chk.
|
||||
|
||||
2005-07-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/dl-osinfo.h: Include errno.h, hp-timing.h,
|
||||
endian.h.
|
||||
(_dl_setup_stack_chk_guard): Even without
|
||||
--enable-stackguard-randomization attempt to do some guard
|
||||
randomization using hp-timing (if available) and kernel stack and
|
||||
mmap randomization.
|
||||
* elf/tst-stackguard1.c (do_test): Don't fail if the poor man's
|
||||
randomization doesn't work well enough.
|
||||
|
||||
2005-07-28 Thomas Schwinge <schwinge@nic-nac-project.de>
|
||||
|
||||
[BZ #1137]
|
||||
@@ -12106,6 +12195,18 @@
|
||||
|
||||
* scripts/soversions.awk: Fix default version set handling.
|
||||
|
||||
2005-02-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/bits/termios.h (CMSPAR): Define.
|
||||
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Add __USE_MISC
|
||||
and __USE_XOPEN guards to match linux/bits/termios.h.
|
||||
(CMSPAR): Define.
|
||||
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Add __USE_MISC
|
||||
and __USE_XOPEN guards to match linux/bits/termios.h.
|
||||
(CMSPAR): Define.
|
||||
* sysdeps/unix/sysv/linux/sparc/bits/termios.h: Add __USE_MISC
|
||||
and __USE_XOPEN guards to match linux/bits/termios.h.
|
||||
|
||||
2005-02-10 Roland McGrath <roland@redhat.com>
|
||||
|
||||
[BZ #157]
|
||||
|
||||
+16
@@ -434,6 +434,19 @@ ifndef +link
|
||||
$(common-objpfx)libc% $(+postinit),$^) \
|
||||
$(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
|
||||
endif
|
||||
# Command for linking PIE programs with the C library.
|
||||
ifndef +link-pie
|
||||
+link-pie = $(CC) -pie -Wl,-O1 -nostdlib -nostartfiles -o $@ \
|
||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||||
$(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
|
||||
$(addprefix $(csu-objpfx),S$(start-installed-name)) \
|
||||
$(+preinit) $(+prectorS) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||||
S$(start-installed-name))\
|
||||
$(+preinit) $(link-extra-libs) \
|
||||
$(common-objpfx)libc% $(+postinit),$^) \
|
||||
$(link-extra-libs) $(link-libc) $(+postctorS) $(+postinit)
|
||||
endif
|
||||
# Command for statically linking programs with the C library.
|
||||
ifndef +link-static
|
||||
+link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \
|
||||
@@ -538,6 +551,9 @@ ifeq ($(elf),yes)
|
||||
+postinit = $(addprefix $(csu-objpfx),crtn.o)
|
||||
+prector = `$(CC) --print-file-name=crtbegin.o`
|
||||
+postctor = `$(CC) --print-file-name=crtend.o`
|
||||
# Variants of the two previous definitions for linking PIE programs.
|
||||
+prectorS = `$(CC) --print-file-name=crtbeginS.o`
|
||||
+postctorS = `$(CC) --print-file-name=crtendS.o`
|
||||
+interp = $(addprefix $(elf-objpfx),interp.os)
|
||||
endif
|
||||
csu-objpfx = $(common-objpfx)csu/
|
||||
|
||||
@@ -47,6 +47,13 @@ Version 2.10
|
||||
* Handling for group shadow files has been added.
|
||||
Implemented by Ulrich Drepper.
|
||||
|
||||
* DNS IPv4-IPv6 parallel lookup now deals better with broken DNS
|
||||
servers (the case, e.g., for some people using the built-in DNS
|
||||
server in ADSL modems/routers). There is a once-per-process timeout
|
||||
in case of a broken server. To avoid it, users can run nscd or put
|
||||
'options single-request' in /etc/resolv.conf.
|
||||
Implemented by Ulrich Drepper.
|
||||
|
||||
|
||||
Version 2.9
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
@@ -0,0 +1 @@
|
||||
The C stubs add-on version 2.1.2.
|
||||
@@ -0,0 +1,482 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This 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 this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
@@ -0,0 +1,46 @@
|
||||
2006-03-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* configure (libc_add_on_canonical, libc_add_on_subdir): Set.
|
||||
|
||||
2001-08-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gconv_stubs.c (__gconv_lookup_alias): Remove.
|
||||
(__gconv_NOOP, __gconv_compare_alias, __gconv_release_cache,
|
||||
__gconv_release_step): New.
|
||||
|
||||
2001-06-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gconv_stubs.c (__gconv_lookup_alias): New.
|
||||
|
||||
2000-02-27 Cristian Gafton <gafton@redhat.com>
|
||||
|
||||
* gconv_stubs.c: Return __gconv_OK for:
|
||||
__gconv_transform_ascii_internal
|
||||
__gconv_transform_ucs2little_internal
|
||||
__gconv_transform_utf16_internal
|
||||
__gconv_transform_utf8_internal
|
||||
__gconv_transform_ucs2_internal
|
||||
|
||||
2000-02-25 Cristian Gafton <gafton@redhat.com>
|
||||
|
||||
* gconv_stubs.c: add __c_stubs_is_compiled_in so we can detect when
|
||||
the library is linked in.
|
||||
|
||||
Wed Dec 8 13:47:25 1999 Ivan Brunello <ivan.brunello@tiscalinet.it>
|
||||
|
||||
* Makefile (extra-objs): Changed stubs.o to gconv_stubs.o.
|
||||
|
||||
Sun Dec 5 11:32:17 1999 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* gconv_stubs.c: Renamed from stubs.c.
|
||||
Support glibc 2.1.x.
|
||||
|
||||
Mon Aug 23 16:42:05 1999 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* Banner: New.
|
||||
* COPYING.LIB: Likewise.
|
||||
* Makefile: Likewise.
|
||||
* README: Likewise.
|
||||
* configure: Likewise.
|
||||
* stubs.c: Likewise.
|
||||
* test-stdio.c: Likewise.
|
||||
@@ -0,0 +1,46 @@
|
||||
# Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
|
||||
# The GNU C Library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
#
|
||||
# Sub-makefile for the C stub add-on library.
|
||||
#
|
||||
subdir := c_stubs
|
||||
|
||||
tests-static := test-stdio
|
||||
tests := $(tests-static)
|
||||
|
||||
libc_stubs-objs := gconv_stubs.o
|
||||
|
||||
install-lib := libc_stubs.a
|
||||
non-lib.a := libc_stubs.a
|
||||
|
||||
extra-objs := gconv_stubs.o libc_stubs.a
|
||||
|
||||
include ../Makeconfig
|
||||
|
||||
CPPFLAGS += -I../iconv
|
||||
|
||||
include ../Rules
|
||||
|
||||
$(objpfx)libc_stubs.a: $(addprefix $(objpfx), $(libc_stubs-objs))
|
||||
-rm -f $@
|
||||
$(CC) -nostdlib -nostartfiles -r -o $@ $^
|
||||
|
||||
lib: $(objpfx)libc_stubs.a
|
||||
|
||||
$(objpfx)test-stdio: $(objpfx)libc_stubs.a
|
||||
@@ -0,0 +1,8 @@
|
||||
This is a stub add-on library for the GNU C library version 2.1.2 and
|
||||
above. It is used to create the smaller static binaries by stubbing
|
||||
out the gconv related functions. The resulting binaries may not have
|
||||
all the functionalities.
|
||||
|
||||
H.J. Lu
|
||||
hjl@gnu.org
|
||||
12/05/1999
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
# This is only to keep the GNU C library configure mechanism happy.
|
||||
# This is a shell script fragment sourced by the main configure script.
|
||||
|
||||
libc_add_on_canonical=
|
||||
libc_add_on_subdirs=.
|
||||
@@ -0,0 +1,126 @@
|
||||
/* Provide gconv stub functions for the minimum static binaries.
|
||||
Copyright (C) 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <features.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <bits/libc-lock.h>
|
||||
#if __GNUC_PREREQ(3, 3)
|
||||
# include <gconv_int.h>
|
||||
#else
|
||||
# include <gconv.h>
|
||||
#endif
|
||||
|
||||
__libc_lock_define_initialized (, __gconv_lock)
|
||||
|
||||
/* hack for self identification */
|
||||
int __c_stubs_is_compiled_in;
|
||||
|
||||
/* Don't drag in the dynamic linker. */
|
||||
void *__libc_stack_end;
|
||||
|
||||
int attribute_hidden
|
||||
__gconv_OK (void)
|
||||
{
|
||||
#if __GLIBC__ > 2 || __GLIBC_MINOR__ > 1
|
||||
return __GCONV_OK;
|
||||
#else
|
||||
return GCONV_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
int attribute_hidden
|
||||
__gconv_NOCONV (void)
|
||||
{
|
||||
#if __GLIBC__ > 2 || __GLIBC_MINOR__ > 1
|
||||
return __GCONV_NOCONV;
|
||||
#else
|
||||
return GCONV_NOCONV;
|
||||
#endif
|
||||
}
|
||||
|
||||
void attribute_hidden
|
||||
__gconv_NOOP (void)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
internal_function
|
||||
__gconv_compare_alias (const char *name1, const char *name2)
|
||||
{
|
||||
return strcmp (name1, name2);
|
||||
}
|
||||
|
||||
wint_t
|
||||
__gconv_btwoc_ascii (struct __gconv_step *step, unsigned char c)
|
||||
{
|
||||
if (c < 0x80)
|
||||
return c;
|
||||
else
|
||||
return WEOF;
|
||||
}
|
||||
|
||||
|
||||
#if __GNUC_PREREQ(3, 3)
|
||||
# undef strong_alias
|
||||
# define strong_alias(impl, name) \
|
||||
__typeof (name) name __attribute__ ((alias (#impl)))
|
||||
#endif
|
||||
|
||||
strong_alias (__gconv_OK,
|
||||
__gconv_close_transform);
|
||||
strong_alias (__gconv_OK,
|
||||
__gconv_close);
|
||||
|
||||
strong_alias (__gconv_NOCONV,
|
||||
__gconv);
|
||||
strong_alias (__gconv_NOCONV,
|
||||
__gconv_find_transform);
|
||||
strong_alias (__gconv_NOCONV,
|
||||
__gconv_open);
|
||||
|
||||
/* These transformations should not fail in normal conditions */
|
||||
strong_alias (__gconv_OK,
|
||||
__gconv_transform_ascii_internal);
|
||||
strong_alias (__gconv_OK,
|
||||
__gconv_transform_utf16_internal);
|
||||
strong_alias (__gconv_OK,
|
||||
__gconv_transform_utf8_internal);
|
||||
strong_alias (__gconv_OK,
|
||||
__gconv_transform_ucs2_internal);
|
||||
|
||||
/* We can assume no conversion for these ones */
|
||||
strong_alias (__gconv_NOCONV,
|
||||
__gconv_transform_internal_ascii);
|
||||
strong_alias (__gconv_NOCONV,
|
||||
__gconv_transform_internal_ucs2);
|
||||
strong_alias (__gconv_NOCONV,
|
||||
__gconv_transform_internal_ucs4);
|
||||
strong_alias (__gconv_NOCONV,
|
||||
__gconv_transform_internal_utf16);
|
||||
strong_alias (__gconv_NOCONV,
|
||||
__gconv_transform_internal_utf8);
|
||||
|
||||
strong_alias (__gconv_NOCONV,
|
||||
__gconv_transliterate);
|
||||
|
||||
strong_alias (__gconv_NOOP,
|
||||
__gconv_release_cache);
|
||||
strong_alias (__gconv_NOOP,
|
||||
__gconv_release_step);
|
||||
@@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
printf ("Hello world\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -726,14 +726,6 @@ base_machine
|
||||
add_on_subdirs
|
||||
add_ons
|
||||
subdirs
|
||||
host_os
|
||||
host_vendor
|
||||
host_cpu
|
||||
host
|
||||
build_os
|
||||
build_vendor
|
||||
build_cpu
|
||||
build
|
||||
libc_cv_nss_crypt
|
||||
experimental_malloc
|
||||
multi_arch
|
||||
@@ -756,6 +748,14 @@ CPPFLAGS
|
||||
LDFLAGS
|
||||
CFLAGS
|
||||
CC
|
||||
host_os
|
||||
host_vendor
|
||||
host_cpu
|
||||
host
|
||||
build_os
|
||||
build_vendor
|
||||
build_cpu
|
||||
build
|
||||
target_alias
|
||||
host_alias
|
||||
build_alias
|
||||
@@ -2011,6 +2011,90 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
|
||||
|
||||
|
||||
# Make sure we can run config.sub.
|
||||
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
|
||||
{ { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
|
||||
$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking build system type" >&5
|
||||
$as_echo_n "checking build system type... " >&6; }
|
||||
if test "${ac_cv_build+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_build_alias=$build_alias
|
||||
test "x$ac_build_alias" = x &&
|
||||
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
|
||||
test "x$ac_build_alias" = x &&
|
||||
{ { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
|
||||
$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
|
||||
{ { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
|
||||
$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
|
||||
$as_echo "$ac_cv_build" >&6; }
|
||||
case $ac_cv_build in
|
||||
*-*-*) ;;
|
||||
*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
|
||||
$as_echo "$as_me: error: invalid value of canonical build" >&2;}
|
||||
{ (exit 1); exit 1; }; };;
|
||||
esac
|
||||
build=$ac_cv_build
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
set x $ac_cv_build
|
||||
shift
|
||||
build_cpu=$1
|
||||
build_vendor=$2
|
||||
shift; shift
|
||||
# Remember, the first character of IFS is used to create $*,
|
||||
# except with old shells:
|
||||
build_os=$*
|
||||
IFS=$ac_save_IFS
|
||||
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking host system type" >&5
|
||||
$as_echo_n "checking host system type... " >&6; }
|
||||
if test "${ac_cv_host+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test "x$host_alias" = x; then
|
||||
ac_cv_host=$ac_cv_build
|
||||
else
|
||||
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
|
||||
{ { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
|
||||
$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
|
||||
$as_echo "$ac_cv_host" >&6; }
|
||||
case $ac_cv_host in
|
||||
*-*-*) ;;
|
||||
*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
|
||||
$as_echo "$as_me: error: invalid value of canonical host" >&2;}
|
||||
{ (exit 1); exit 1; }; };;
|
||||
esac
|
||||
host=$ac_cv_host
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
set x $ac_cv_host
|
||||
shift
|
||||
host_cpu=$1
|
||||
host_vendor=$2
|
||||
shift; shift
|
||||
# Remember, the first character of IFS is used to create $*,
|
||||
# except with old shells:
|
||||
host_os=$*
|
||||
IFS=$ac_save_IFS
|
||||
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
@@ -3844,90 +3928,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Make sure we can run config.sub.
|
||||
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
|
||||
{ { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
|
||||
$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking build system type" >&5
|
||||
$as_echo_n "checking build system type... " >&6; }
|
||||
if test "${ac_cv_build+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_build_alias=$build_alias
|
||||
test "x$ac_build_alias" = x &&
|
||||
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
|
||||
test "x$ac_build_alias" = x &&
|
||||
{ { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
|
||||
$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
|
||||
{ { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
|
||||
$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
|
||||
$as_echo "$ac_cv_build" >&6; }
|
||||
case $ac_cv_build in
|
||||
*-*-*) ;;
|
||||
*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
|
||||
$as_echo "$as_me: error: invalid value of canonical build" >&2;}
|
||||
{ (exit 1); exit 1; }; };;
|
||||
esac
|
||||
build=$ac_cv_build
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
set x $ac_cv_build
|
||||
shift
|
||||
build_cpu=$1
|
||||
build_vendor=$2
|
||||
shift; shift
|
||||
# Remember, the first character of IFS is used to create $*,
|
||||
# except with old shells:
|
||||
build_os=$*
|
||||
IFS=$ac_save_IFS
|
||||
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking host system type" >&5
|
||||
$as_echo_n "checking host system type... " >&6; }
|
||||
if test "${ac_cv_host+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test "x$host_alias" = x; then
|
||||
ac_cv_host=$ac_cv_build
|
||||
else
|
||||
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
|
||||
{ { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
|
||||
$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
|
||||
$as_echo "$ac_cv_host" >&6; }
|
||||
case $ac_cv_host in
|
||||
*-*-*) ;;
|
||||
*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
|
||||
$as_echo "$as_me: error: invalid value of canonical host" >&2;}
|
||||
{ (exit 1); exit 1; }; };;
|
||||
esac
|
||||
host=$ac_cv_host
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
set x $ac_cv_host
|
||||
shift
|
||||
host_cpu=$1
|
||||
host_vendor=$2
|
||||
shift; shift
|
||||
# Remember, the first character of IFS is used to create $*,
|
||||
# except with old shells:
|
||||
host_os=$*
|
||||
IFS=$ac_save_IFS
|
||||
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
|
||||
# The way shlib-versions is used to generate soversions.mk uses a
|
||||
# fairly simplistic model for name recognition that can't distinguish
|
||||
# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
|
||||
|
||||
+2
-2
@@ -6,6 +6,8 @@ AC_CONFIG_SRCDIR([include/features.h])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_AUX_DIR([scripts])
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AC_PROG_CC
|
||||
if test $host != $build; then
|
||||
AC_CHECK_PROGS(BUILD_CC, gcc cc)
|
||||
@@ -316,8 +318,6 @@ else
|
||||
fi
|
||||
AC_SUBST(libc_cv_nss_crypt)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# The way shlib-versions is used to generate soversions.mk uses a
|
||||
# fairly simplistic model for name recognition that can't distinguish
|
||||
# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
specs
|
||||
@@ -0,0 +1 @@
|
||||
specs
|
||||
+2
-1
@@ -93,7 +93,8 @@ omit-deps += $(crtstuff)
|
||||
$(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
|
||||
$(compile.S) -g0 $(ASFLAGS-.os) -o $@
|
||||
|
||||
CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
|
||||
CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
|
||||
-fno-asynchronous-unwind-tables
|
||||
|
||||
vpath initfini.c $(sysdirs)
|
||||
|
||||
|
||||
@@ -49,6 +49,23 @@ extern void (*__init_array_end []) (int, char **, char **)
|
||||
extern void (*__fini_array_start []) (void) attribute_hidden;
|
||||
extern void (*__fini_array_end []) (void) attribute_hidden;
|
||||
|
||||
#if defined HAVE_VISIBILITY_ATTRIBUTE \
|
||||
&& (defined SHARED || defined LIBC_NONSHARED)
|
||||
# define hidden_undef_2(x) #x
|
||||
# define hidden_undef_1(x) hidden_undef_2 (x)
|
||||
# define hidden_undef(x) \
|
||||
__asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \
|
||||
__asm (".hidden " #x);
|
||||
#else
|
||||
# define hidden_undef(x)
|
||||
#endif
|
||||
|
||||
hidden_undef (__preinit_array_start)
|
||||
hidden_undef (__preinit_array_end)
|
||||
hidden_undef (__init_array_start)
|
||||
hidden_undef (__init_array_end)
|
||||
hidden_undef (__fini_array_start)
|
||||
hidden_undef (__fini_array_end)
|
||||
|
||||
/* These function symbols are provided for the .init/.fini section entry
|
||||
points automagically by the linker. */
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
+5
-2
@@ -17,6 +17,9 @@
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
/* Hack: make sure GCC doesn't know __chk_fail () will not return. */
|
||||
#define __noreturn__
|
||||
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
@@ -242,7 +245,7 @@ do_test (void)
|
||||
if (memcmp (a.buf1, "aabcdabcjj", 10))
|
||||
FAIL ();
|
||||
|
||||
#if __USE_FORTIFY_LEVEL < 2
|
||||
#if __USE_FORTIFY_LEVEL < 2 || !__GNUC_PREREQ (4, 0)
|
||||
/* The following tests are supposed to crash with -D_FORTIFY_SOURCE=2
|
||||
and sufficient GCC support, as the string operations overflow
|
||||
from a.buf1 into a.buf2. */
|
||||
@@ -357,7 +360,7 @@ do_test (void)
|
||||
memset (a.buf1 + 9, 'j', l0 + 2);
|
||||
CHK_FAIL_END
|
||||
|
||||
# if __USE_FORTIFY_LEVEL >= 2
|
||||
# if __USE_FORTIFY_LEVEL >= 2 && __GNUC_PREREQ (4, 0)
|
||||
# define O 0
|
||||
# else
|
||||
# define O 1
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
+2
-3
@@ -1,6 +1,5 @@
|
||||
/* User functions for run-time dynamic loading.
|
||||
Copyright (C) 1995-1999,2000,2001,2003,2004,2006
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2001,2003,2004,2006,2009 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
|
||||
@@ -164,7 +163,7 @@ enum
|
||||
segment, or if the calling thread has not allocated a block for it. */
|
||||
RTLD_DI_TLS_DATA = 10,
|
||||
|
||||
RTLD_DI_MAX = 10,
|
||||
RTLD_DI_MAX = 10
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
+13
-9
@@ -89,7 +89,8 @@ distribute := rtld-Rules \
|
||||
unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \
|
||||
unload6mod1.c unload6mod2.c unload6mod3.c \
|
||||
unload7mod1.c unload7mod2.c \
|
||||
tst-auditmod1.c tst-audit.sh \
|
||||
tst-audit1.c tst-audit2.c tst-audit3.c \
|
||||
tst-auditmod1.c tst-auditmod3a.c tst-auditmod3b.c \
|
||||
order2mod1.c order2mod2.c order2mod3.c order2mod4.c \
|
||||
tst-stackguard1.c tst-stackguard1-static.c \
|
||||
tst-array5.c tst-array5-static.c tst-array5dep.c \
|
||||
@@ -176,6 +177,9 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
|
||||
# reldep9
|
||||
test-srcs = tst-pathopt
|
||||
tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
|
||||
ifeq (x86_64,$(config-machine))
|
||||
tests += tst-audit3
|
||||
endif
|
||||
endif
|
||||
ifeq (yesyes,$(have-fpie)$(build-shared))
|
||||
tests: $(objpfx)tst-pie1.out
|
||||
@@ -224,6 +228,9 @@ endif
|
||||
ifeq (yesyes,$(have-fpie)$(build-shared))
|
||||
modules-names += tst-piemod1
|
||||
endif
|
||||
ifeq (x86_64,$(config-machine))
|
||||
modules-names += tst-auditmod3a tst-auditmod3b
|
||||
endif
|
||||
modules-execstack-yes = tst-execstack-mod
|
||||
extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
|
||||
# We need this variable to be sure the test modules get the right CPPFLAGS.
|
||||
@@ -826,14 +833,7 @@ $(objpfx)tst-pie1.out: $(objpfx)tst-pie1
|
||||
$< > $@
|
||||
|
||||
$(objpfx)tst-pie1: $(objpfx)tst-pie1.o $(objpfx)tst-piemod1.so
|
||||
$(LINK.o) -pie -Wl,-O1 \
|
||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) \
|
||||
$(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
|
||||
$(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
|
||||
$(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||||
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
|
||||
-o $@ $(objpfx)tst-pie1.o $(objpfx)tst-piemod1.so \
|
||||
$(common-objpfx)libc_nonshared.a
|
||||
$(+link-pie)
|
||||
|
||||
generated += tst-pie1 tst-pie1.out tst-pie1.o
|
||||
endif
|
||||
@@ -914,6 +914,10 @@ tst-audit1-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
|
||||
$(objpfx)tst-audit2.out: $(objpfx)tst-auditmod1.so
|
||||
tst-audit2-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
|
||||
|
||||
$(objpfx)tst-audit3: $(objpfx)tst-auditmod3a.so
|
||||
$(objpfx)tst-audit3.out: $(objpfx)tst-auditmod3b.so
|
||||
tst-audit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod3b.so
|
||||
|
||||
$(objpfx)tst-global1: $(libdl)
|
||||
$(objpfx)tst-global1.out: $(objpfx)testobj6.so $(objpfx)testobj2.so
|
||||
|
||||
|
||||
+1
-1
@@ -335,7 +335,7 @@ _dl_show_auxv (void)
|
||||
|
||||
/* Unknown value: print a generic line. */
|
||||
char buf2[17];
|
||||
buf[sizeof (buf2) - 1] = '\0';
|
||||
buf2[sizeof (buf2) - 1] = '\0';
|
||||
const char *val2 = _itoa ((unsigned long int) av->a_un.a_val,
|
||||
buf2 + sizeof buf2 - 1, 16, 0);
|
||||
const char *val = _itoa ((unsigned long int) av->a_type,
|
||||
|
||||
+19
-6
@@ -1020,17 +1020,19 @@ search_dirs (void)
|
||||
|
||||
|
||||
static void parse_conf_include (const char *config_file, unsigned int lineno,
|
||||
bool do_chroot, const char *pattern);
|
||||
const char *prefix, bool do_chroot,
|
||||
const char *pattern);
|
||||
|
||||
/* Parse configuration file. */
|
||||
static void
|
||||
parse_conf (const char *filename, bool do_chroot)
|
||||
parse_conf (const char *filename, const char *prefix, bool do_chroot)
|
||||
{
|
||||
FILE *file = NULL;
|
||||
char *line = NULL;
|
||||
const char *canon;
|
||||
size_t len = 0;
|
||||
unsigned int lineno;
|
||||
size_t prefix_len = prefix ? strlen (prefix) : 0;
|
||||
|
||||
if (do_chroot && opt_chroot)
|
||||
{
|
||||
@@ -1091,7 +1093,14 @@ parse_conf (const char *filename, bool do_chroot)
|
||||
cp += 8;
|
||||
while ((dir = strsep (&cp, " \t")) != NULL)
|
||||
if (dir[0] != '\0')
|
||||
parse_conf_include (filename, lineno, do_chroot, dir);
|
||||
parse_conf_include (filename, lineno, prefix, do_chroot, dir);
|
||||
}
|
||||
else if (prefix != NULL)
|
||||
{
|
||||
size_t cp_len = strlen (cp);
|
||||
char new_cp [prefix_len + cp_len + 1];
|
||||
memcpy (mempcpy (new_cp, prefix, prefix_len), cp, cp_len + 1);
|
||||
add_dir (new_cp);
|
||||
}
|
||||
else if (!strncasecmp (cp, "hwcap", 5) && isblank (cp[5]))
|
||||
{
|
||||
@@ -1154,7 +1163,7 @@ parse_conf (const char *filename, bool do_chroot)
|
||||
config files to read. */
|
||||
static void
|
||||
parse_conf_include (const char *config_file, unsigned int lineno,
|
||||
bool do_chroot, const char *pattern)
|
||||
const char *prefix, bool do_chroot, const char *pattern)
|
||||
{
|
||||
if (opt_chroot && pattern[0] != '/')
|
||||
error (EXIT_FAILURE, 0,
|
||||
@@ -1184,7 +1193,7 @@ parse_conf_include (const char *config_file, unsigned int lineno,
|
||||
{
|
||||
case 0:
|
||||
for (size_t i = 0; i < gl.gl_pathc; ++i)
|
||||
parse_conf (gl.gl_pathv[i], false);
|
||||
parse_conf (gl.gl_pathv[i], prefix, false);
|
||||
globfree64 (&gl);
|
||||
break;
|
||||
|
||||
@@ -1227,6 +1236,8 @@ main (int argc, char **argv)
|
||||
/* Set the text message domain. */
|
||||
textdomain (_libc_intl_domainname);
|
||||
|
||||
arch_startup (argc, argv);
|
||||
|
||||
/* Parse and process arguments. */
|
||||
int remaining;
|
||||
argp_parse (&argp, argc, argv, 0, &remaining, NULL);
|
||||
@@ -1338,12 +1349,14 @@ main (int argc, char **argv)
|
||||
|
||||
if (!opt_only_cline)
|
||||
{
|
||||
parse_conf (config_file, true);
|
||||
parse_conf (config_file, NULL, true);
|
||||
|
||||
/* Always add the standard search paths. */
|
||||
add_system_dir (SLIBDIR);
|
||||
if (strcmp (SLIBDIR, LIBDIR))
|
||||
add_system_dir (LIBDIR);
|
||||
|
||||
add_arch_dirs (config_file);
|
||||
}
|
||||
|
||||
if (! opt_ignore_aux_cache)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/* Test case for x86-64 preserved registers in dynamic linker. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <emmintrin.h>
|
||||
|
||||
extern __m128i audit_test (__m128i, __m128i, __m128i, __m128i,
|
||||
__m128i, __m128i, __m128i, __m128i);
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
__m128i xmm = _mm_setzero_si128 ();
|
||||
__m128i ret = audit_test (xmm, xmm, xmm, xmm, xmm, xmm, xmm, xmm);
|
||||
|
||||
if (memcmp (&xmm, &ret, sizeof (ret)))
|
||||
abort ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/* Test case for x86-64 preserved registers in dynamic linker. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <emmintrin.h>
|
||||
|
||||
__m128i
|
||||
audit_test (__m128i x0, __m128i x1, __m128i x2, __m128i x3,
|
||||
__m128i x4, __m128i x5, __m128i x6, __m128i x7)
|
||||
{
|
||||
__m128i xmm = _mm_setzero_si128 ();
|
||||
|
||||
if (memcmp (&xmm, &x0, sizeof (xmm))
|
||||
|| memcmp (&xmm, &x1, sizeof (xmm))
|
||||
|| memcmp (&xmm, &x2, sizeof (xmm))
|
||||
|| memcmp (&xmm, &x3, sizeof (xmm))
|
||||
|| memcmp (&xmm, &x4, sizeof (xmm))
|
||||
|| memcmp (&xmm, &x5, sizeof (xmm))
|
||||
|| memcmp (&xmm, &x6, sizeof (xmm))
|
||||
|| memcmp (&xmm, &x7, sizeof (xmm)))
|
||||
abort ();
|
||||
|
||||
return xmm;
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
/* Verify that changing xmm registers in audit library won't affect
|
||||
function parameter passing/return. */
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <bits/wordsize.h>
|
||||
#include <gnu/lib-names.h>
|
||||
#include <emmintrin.h>
|
||||
|
||||
unsigned int
|
||||
la_version (unsigned int v)
|
||||
{
|
||||
setlinebuf (stdout);
|
||||
|
||||
printf ("version: %u\n", v);
|
||||
|
||||
char buf[20];
|
||||
sprintf (buf, "%u", v);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
void
|
||||
la_activity (uintptr_t *cookie, unsigned int flag)
|
||||
{
|
||||
if (flag == LA_ACT_CONSISTENT)
|
||||
printf ("activity: consistent\n");
|
||||
else if (flag == LA_ACT_ADD)
|
||||
printf ("activity: add\n");
|
||||
else if (flag == LA_ACT_DELETE)
|
||||
printf ("activity: delete\n");
|
||||
else
|
||||
printf ("activity: unknown activity %u\n", flag);
|
||||
}
|
||||
|
||||
char *
|
||||
la_objsearch (const char *name, uintptr_t *cookie, unsigned int flag)
|
||||
{
|
||||
char buf[100];
|
||||
const char *flagstr;
|
||||
if (flag == LA_SER_ORIG)
|
||||
flagstr = "LA_SET_ORIG";
|
||||
else if (flag == LA_SER_LIBPATH)
|
||||
flagstr = "LA_SER_LIBPATH";
|
||||
else if (flag == LA_SER_RUNPATH)
|
||||
flagstr = "LA_SER_RUNPATH";
|
||||
else if (flag == LA_SER_CONFIG)
|
||||
flagstr = "LA_SER_CONFIG";
|
||||
else if (flag == LA_SER_DEFAULT)
|
||||
flagstr = "LA_SER_DEFAULT";
|
||||
else if (flag == LA_SER_SECURE)
|
||||
flagstr = "LA_SER_SECURE";
|
||||
else
|
||||
{
|
||||
sprintf (buf, "unknown flag %d", flag);
|
||||
flagstr = buf;
|
||||
}
|
||||
printf ("objsearch: %s, %s\n", name, flagstr);
|
||||
|
||||
return (char *) name;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
la_objopen (struct link_map *l, Lmid_t lmid, uintptr_t *cookie)
|
||||
{
|
||||
printf ("objopen: %ld, %s\n", lmid, l->l_name);
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
void
|
||||
la_preinit (uintptr_t *cookie)
|
||||
{
|
||||
printf ("preinit\n");
|
||||
}
|
||||
|
||||
unsigned int
|
||||
la_objclose (uintptr_t *cookie)
|
||||
{
|
||||
printf ("objclose\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
uintptr_t
|
||||
la_symbind32 (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
||||
uintptr_t *defcook, unsigned int *flags, const char *symname)
|
||||
{
|
||||
printf ("symbind32: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
|
||||
symname, (long int) sym->st_value, ndx, *flags);
|
||||
|
||||
return sym->st_value;
|
||||
}
|
||||
|
||||
uintptr_t
|
||||
la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
|
||||
uintptr_t *defcook, unsigned int *flags, const char *symname)
|
||||
{
|
||||
printf ("symbind64: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
|
||||
symname, (long int) sym->st_value, ndx, *flags);
|
||||
|
||||
return sym->st_value;
|
||||
}
|
||||
|
||||
#define pltenter la_x86_64_gnu_pltenter
|
||||
#define pltexit la_x86_64_gnu_pltexit
|
||||
#define La_regs La_x86_64_regs
|
||||
#define La_retval La_x86_64_retval
|
||||
#define int_retval lrv_rax
|
||||
|
||||
#include <tst-audit.h>
|
||||
|
||||
ElfW(Addr)
|
||||
pltenter (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
|
||||
uintptr_t *defcook, La_regs *regs, unsigned int *flags,
|
||||
const char *symname, long int *framesizep)
|
||||
{
|
||||
printf ("pltenter: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n",
|
||||
symname, (long int) sym->st_value, ndx, *flags);
|
||||
|
||||
__m128i xmm = _mm_set1_epi32 (-1);
|
||||
asm volatile ("movdqa %0, %%xmm0" : : "x" (xmm) : "xmm0" );
|
||||
asm volatile ("movdqa %0, %%xmm1" : : "x" (xmm) : "xmm1" );
|
||||
asm volatile ("movdqa %0, %%xmm2" : : "x" (xmm) : "xmm2" );
|
||||
asm volatile ("movdqa %0, %%xmm3" : : "x" (xmm) : "xmm3" );
|
||||
asm volatile ("movdqa %0, %%xmm4" : : "x" (xmm) : "xmm4" );
|
||||
asm volatile ("movdqa %0, %%xmm5" : : "x" (xmm) : "xmm5" );
|
||||
asm volatile ("movdqa %0, %%xmm6" : : "x" (xmm) : "xmm6" );
|
||||
asm volatile ("movdqa %0, %%xmm7" : : "x" (xmm) : "xmm7" );
|
||||
|
||||
return sym->st_value;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
|
||||
uintptr_t *defcook, const La_regs *inregs, La_retval *outregs,
|
||||
const char *symname)
|
||||
{
|
||||
printf ("pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
|
||||
symname, (long int) sym->st_value, ndx, outregs->int_retval);
|
||||
|
||||
__m128i xmm = _mm_set1_epi32 (-1);
|
||||
asm volatile ("movdqa %0, %%xmm0" : : "x" (xmm) : "xmm0" );
|
||||
asm volatile ("movdqa %0, %%xmm1" : : "x" (xmm) : "xmm1" );
|
||||
asm volatile ("movdqa %0, %%xmm2" : : "x" (xmm) : "xmm2" );
|
||||
asm volatile ("movdqa %0, %%xmm3" : : "x" (xmm) : "xmm3" );
|
||||
asm volatile ("movdqa %0, %%xmm4" : : "x" (xmm) : "xmm4" );
|
||||
asm volatile ("movdqa %0, %%xmm5" : : "x" (xmm) : "xmm5" );
|
||||
asm volatile ("movdqa %0, %%xmm6" : : "x" (xmm) : "xmm6" );
|
||||
asm volatile ("movdqa %0, %%xmm7" : : "x" (xmm) : "xmm7" );
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -160,17 +160,21 @@ do_test (void)
|
||||
the 16 runs, something is very wrong. */
|
||||
int ndifferences = 0;
|
||||
int ndefaults = 0;
|
||||
int npartlyrandomized = 0;
|
||||
for (i = 0; i < N; ++i)
|
||||
{
|
||||
if (child_stack_chk_guards[i] != child_stack_chk_guards[i+1])
|
||||
ndifferences++;
|
||||
else if (child_stack_chk_guards[i] == default_guard)
|
||||
ndefaults++;
|
||||
else if (*(char *) &child_stack_chk_guards[i] == 0)
|
||||
npartlyrandomized++;
|
||||
}
|
||||
|
||||
printf ("differences %d defaults %d\n", ndifferences, ndefaults);
|
||||
printf ("differences %d defaults %d partly randomized %d\n",
|
||||
ndifferences, ndefaults, npartlyrandomized);
|
||||
|
||||
if (ndifferences < N / 2 && ndefaults < N / 2)
|
||||
if ((ndifferences + ndefaults + npartlyrandomized) < 3 * N / 4)
|
||||
{
|
||||
puts ("stack guard canaries are not randomized enough");
|
||||
puts ("nor equal to the default canary value");
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
*~
|
||||
glibc-*.tar.bz2
|
||||
glibc-*.src.rpm
|
||||
glibc-fedora.patch
|
||||
glibc.spec
|
||||
pkgs-import
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
# Makefile for maintaining Fedora branches and creating Fedora source RPMs.
|
||||
|
||||
glibc.spec: # The default target.
|
||||
|
||||
.PHONY: follow merge merge-base tag force-tag archive finish_archive srpm rpm
|
||||
|
||||
releases-url := ftp://sources.redhat.com/pub/glibc/releases/
|
||||
tag-prefix := fedora/
|
||||
branch-name := fedora
|
||||
|
||||
GIT ?= git
|
||||
git = $(shell $(GIT) $1 $2)
|
||||
gitconf = $(call git,config,--get $1)
|
||||
branchname = $(patsubst refs/heads/%,%,$1)
|
||||
|
||||
my-branch := $(call branchname,$(call git,symbolic-ref,HEAD))
|
||||
upstream-remote := $(call gitconf,branch.$(my-branch).remote)
|
||||
upstream-branch := $(call branchname,$(call gitconf,branch.$(my-branch).follow))
|
||||
|
||||
dep-my-branch := $(firstword $(wildcard ../.git/refs/heads/$(my-branch) \
|
||||
../.git/packed-refs))
|
||||
dep-upstream-branch := $(firstword $(wildcard \
|
||||
../.git/refs/remotes/$(upstream-remote)/$(upstream-branch) \
|
||||
../.git/packed-refs))
|
||||
|
||||
# Use 'make follow branch=release/3.14/master' to switch this checkout
|
||||
# to a new upstream branch to merge from.
|
||||
follow:
|
||||
ifeq (,$(branch))
|
||||
@echo "Use '$(MAKE) follow branch=NAME'"; exit 2
|
||||
else
|
||||
$(GIT) rev-parse --verify $(upstream-remote)/$(branch)
|
||||
$(GIT) config branch.$(my-branch).follow $(branch)
|
||||
@$(GIT) branch -v | grep "^. $(subst .,\\.,$(my-branch)) "
|
||||
endif
|
||||
|
||||
# Use this to merge upstream changes into this branch.
|
||||
# It will fail if conflict resolution is required.
|
||||
# Then you follow up with editting, 'git add FILE...', and git commit.
|
||||
merge:
|
||||
$(GIT) pull
|
||||
$(GIT) merge $(upstream-remote)/$(upstream-branch)
|
||||
|
||||
describe-merge = describe --match 'glibc-*'
|
||||
|
||||
merge-base-id := $(call git,merge-base,\
|
||||
HEAD $(upstream-remote)/$(upstream-branch))
|
||||
merge-base-name := $(call git,$(describe-merge) $(merge-base-id))
|
||||
|
||||
merge-base:
|
||||
@echo $(merge-base-id) $(merge-base-name)
|
||||
|
||||
snapshot-name := $(patsubst glibc-%,%,$(merge-base-name))
|
||||
|
||||
tar-name = $(merge-base-name)
|
||||
|
||||
upstream-pristine = \
|
||||
$(GIT) $(describe-merge) --exact-match > /dev/null 2>&1 $(merge-base-id)
|
||||
|
||||
glibc.spec: glibc.spec.in $(dep-my-branch)
|
||||
@rm -f $@.new
|
||||
echo '%define glibcsrcdir $(tar-name)' > $@.new
|
||||
if $(upstream-pristine); then \
|
||||
echo '%define glibc_release_url $(releases-url)' >> $@.new; \
|
||||
else : ; fi; \
|
||||
$(GIT) show $(my-branch):version.h \
|
||||
| sed -n '/VERSION/s/^.*"\([^"]*\)"$$/%define glibcversion \1/p' \
|
||||
>> $@.new
|
||||
echo '### $< follows:' >> $@.new
|
||||
cat $< >> $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
ifeq (,$(wildcard glibc.spec))
|
||||
Makefile: glibc.spec ;
|
||||
else
|
||||
|
||||
spec-nvr := $(shell rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}\n' \
|
||||
--specfile glibc.spec 2> /dev/null | sed 1q)
|
||||
spec-tag = $(spec-nvr)
|
||||
|
||||
tag-spec = -a -m'$(spec-nvr)' $(tag-prefix)$(spec-tag)
|
||||
|
||||
tag: glibc.spec
|
||||
$(GIT) tag $(tag-spec)
|
||||
|
||||
force-tag: glibc.spec
|
||||
$(GIT) tag -f $(tag-spec)
|
||||
|
||||
endif
|
||||
|
||||
# Omit these files from the patch and put them in a tar file.
|
||||
outside-patch = fedora/ c_stubs/ rtkaio/ \
|
||||
localedata/charmaps/GB18030 iconvdata/gb18030.c
|
||||
|
||||
glibc-$(branch-name).patch: glibc.spec Makefile $(dep-upstream-branch)
|
||||
@echo "Creating $@ from `$(git-describe) $(my-branch)`..."
|
||||
@$(GIT) diff -a --no-renames $(merge-base-id)..$(my-branch) \
|
||||
| awk '$$1 == "diff" && $$2 == "--git" { file = $$3 } \
|
||||
$$1 == "---" && $$2 == "/dev/null" { $$2 = file } \
|
||||
{ print }' \
|
||||
| filterdiff --remove-timestamps --clean --strip=1 \
|
||||
-x '*/.gitignore' \
|
||||
$(patsubst %,-x '*/%',$(patsubst %/,%/*,$(outside-patch)))\
|
||||
--addoldprefix='$(merge-base-name)/' \
|
||||
--addnewprefix='$(spec-nvr)/' \
|
||||
> patch.tmp
|
||||
@mv -f patch.tmp $@
|
||||
|
||||
git-describe = $(GIT) describe --long --always
|
||||
|
||||
define git-tar
|
||||
echo "Creating $@ from `$(git-describe) $1`..."; \
|
||||
(cd ..; $(GIT) archive --format=tar --prefix='$(tar-name)/' $1 $2) \
|
||||
| bzip2 -9 > $@.new && \
|
||||
mv -f $@.new $@
|
||||
endef
|
||||
|
||||
$(tar-name)-$(branch-name).tar.bz2: glibc.spec Makefile
|
||||
@$(call git-tar,$(my-branch),$(outside-patch))
|
||||
|
||||
$(tar-name).tar.bz2: $(dep-upstream-branch) Makefile
|
||||
@if $(upstream-pristine); then \
|
||||
echo 'Fetching from $(releases-url)...'; \
|
||||
curl $(addprefix -C - -O $(releases-url),\
|
||||
$@ $(@:glibc-%=glibc-libidn-%)); \
|
||||
else \
|
||||
$(call git-tar,$(merge-base-id)); \
|
||||
fi
|
||||
|
||||
archives = $(tar-name).tar.bz2 \
|
||||
$(tar-name)-$(branch-name).tar.bz2 \
|
||||
glibc-$(branch-name).patch
|
||||
|
||||
finish_archive: $(archives)
|
||||
|
||||
archive: glibc.spec
|
||||
$(MAKE) tag finish_archive
|
||||
|
||||
rpm srpm: $(spec-nvr).src.rpm
|
||||
$(spec-nvr).src.rpm: glibc.spec $(archives)
|
||||
rpmbuild --define "_sourcedir `pwd`" \
|
||||
--define "_specdir `pwd`" \
|
||||
--define "_srcrpmdir `pwd`" \
|
||||
--nodeps -bs $<
|
||||
|
||||
###
|
||||
# These rules are for dealing with the Fedora package repository
|
||||
# and build system.
|
||||
#
|
||||
# To use this, put in ~/.cvspkgsrc at least a line:
|
||||
# COMMON_DIR ?= /some/checkout/of/pkgs/common
|
||||
# We will find cvs-import.sh there and use its CVS/Root for where to commit.
|
||||
|
||||
.PHONY: dist-import
|
||||
|
||||
-include ~/.cvspkgsrc
|
||||
|
||||
ifdef COMMON_DIR
|
||||
DIST_BRANCH ?= F-11
|
||||
|
||||
pkgs-baseurl := cvs://cvs.fedoraproject.org/cvs/pkgs?rpms
|
||||
pkgs-url = $(pkgs-baseurl)/glibc/$(DIST_BRANCH)\#$(spec-tag)
|
||||
|
||||
pkgs-import: $(spec-nvr).src.rpm
|
||||
cd $(COMMON_DIR) && cvs -q update
|
||||
$(COMMON_DIR)/cvs-import.sh -b $(DIST_BRANCH) $<
|
||||
rpm -qp $< --queryformat '[%{FILEMD5S} %{FILENAMES}\n]' > $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
build: pkgs-import
|
||||
cd $(COMMON_DIR)/../glibc/$(DIST_BRANCH) && \
|
||||
cvs -q update && \
|
||||
$(MAKE) build
|
||||
|
||||
endif
|
||||
###
|
||||
@@ -0,0 +1,627 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <assert.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include "../locale/hashval.h"
|
||||
#define __LC_LAST 13
|
||||
#include "../locale/locarchive.h"
|
||||
#include "../crypt/md5.h"
|
||||
|
||||
const char *alias_file = DATADIR "/locale/locale.alias";
|
||||
const char *locar_file = PREFIX "/lib/locale/locale-archive";
|
||||
const char *tmpl_file = PREFIX "/lib/locale/locale-archive.tmpl";
|
||||
const char *loc_path = PREFIX "/lib/locale/";
|
||||
int be_quiet = 1;
|
||||
int verbose = 0;
|
||||
int max_locarchive_open_retry = 10;
|
||||
const char *output_prefix;
|
||||
|
||||
static const char *locnames[] =
|
||||
{
|
||||
#define DEFINE_CATEGORY(category, category_name, items, a) \
|
||||
[category] = category_name,
|
||||
#include "../locale/categories.def"
|
||||
#undef DEFINE_CATEGORY
|
||||
};
|
||||
|
||||
static int
|
||||
is_prime (unsigned long candidate)
|
||||
{
|
||||
/* No even number and none less than 10 will be passed here. */
|
||||
unsigned long int divn = 3;
|
||||
unsigned long int sq = divn * divn;
|
||||
|
||||
while (sq < candidate && candidate % divn != 0)
|
||||
{
|
||||
++divn;
|
||||
sq += 4 * divn;
|
||||
++divn;
|
||||
}
|
||||
|
||||
return candidate % divn != 0;
|
||||
}
|
||||
|
||||
unsigned long
|
||||
next_prime (unsigned long seed)
|
||||
{
|
||||
/* Make it definitely odd. */
|
||||
seed |= 1;
|
||||
|
||||
while (!is_prime (seed))
|
||||
seed += 2;
|
||||
|
||||
return seed;
|
||||
}
|
||||
|
||||
void
|
||||
error (int status, int errnum, const char *message, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, message);
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "%s: ", program_invocation_name);
|
||||
vfprintf (stderr, message, args);
|
||||
va_end (args);
|
||||
if (errnum)
|
||||
fprintf (stderr, ": %s", strerror (errnum));
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (errnum == EROFS ? 0 : status);
|
||||
}
|
||||
|
||||
void *
|
||||
xmalloc (size_t size)
|
||||
{
|
||||
void *p = malloc (size);
|
||||
if (p == NULL)
|
||||
error (EXIT_FAILURE, errno, "could not allocate %zd bytes of memory", size);
|
||||
return p;
|
||||
}
|
||||
|
||||
static void
|
||||
open_tmpl_archive (struct locarhandle *ah)
|
||||
{
|
||||
struct stat64 st;
|
||||
int fd;
|
||||
struct locarhead head;
|
||||
const char *archivefname = tmpl_file;
|
||||
|
||||
/* Open the archive. We must have exclusive write access. */
|
||||
fd = open64 (archivefname, O_RDONLY);
|
||||
if (fd == -1)
|
||||
error (EXIT_FAILURE, errno, "cannot open locale archive template file \"%s\"",
|
||||
archivefname);
|
||||
|
||||
if (fstat64 (fd, &st) < 0)
|
||||
error (EXIT_FAILURE, errno, "cannot stat locale archive template file \"%s\"",
|
||||
archivefname);
|
||||
|
||||
/* Read the header. */
|
||||
if (TEMP_FAILURE_RETRY (read (fd, &head, sizeof (head))) != sizeof (head))
|
||||
error (EXIT_FAILURE, errno, "cannot read archive header");
|
||||
|
||||
ah->fd = fd;
|
||||
ah->mmaped = (head.sumhash_offset
|
||||
+ head.sumhash_size * sizeof (struct sumhashent));
|
||||
if (ah->mmaped > (unsigned long) st.st_size)
|
||||
error (EXIT_FAILURE, 0, "locale archite template file truncated");
|
||||
ah->mmaped = st.st_size;
|
||||
ah->reserved = st.st_size;
|
||||
|
||||
/* Now we know how large the administrative information part is.
|
||||
Map all of it. */
|
||||
ah->addr = mmap64 (NULL, ah->mmaped, PROT_READ, MAP_SHARED, fd, 0);
|
||||
if (ah->addr == MAP_FAILED)
|
||||
error (EXIT_FAILURE, errno, "cannot map archive header");
|
||||
}
|
||||
|
||||
/* Open the locale archive. */
|
||||
extern void open_archive (struct locarhandle *ah, bool readonly);
|
||||
|
||||
/* Close the locale archive. */
|
||||
extern void close_archive (struct locarhandle *ah);
|
||||
|
||||
/* Add given locale data to the archive. */
|
||||
extern int add_locale_to_archive (struct locarhandle *ah, const char *name,
|
||||
locale_data_t data, bool replace);
|
||||
|
||||
extern void add_alias (struct locarhandle *ah, const char *alias,
|
||||
bool replace, const char *oldname,
|
||||
uint32_t *locrec_offset_p);
|
||||
|
||||
extern struct namehashent *
|
||||
insert_name (struct locarhandle *ah,
|
||||
const char *name, size_t name_len, bool replace);
|
||||
|
||||
struct nameent
|
||||
{
|
||||
char *name;
|
||||
struct locrecent *locrec;
|
||||
};
|
||||
|
||||
struct dataent
|
||||
{
|
||||
const unsigned char *sum;
|
||||
uint32_t file_offset;
|
||||
};
|
||||
|
||||
static int
|
||||
nameentcmp (const void *a, const void *b)
|
||||
{
|
||||
struct locrecent *la = ((const struct nameent *) a)->locrec;
|
||||
struct locrecent *lb = ((const struct nameent *) b)->locrec;
|
||||
uint32_t start_a = -1, end_a = 0;
|
||||
uint32_t start_b = -1, end_b = 0;
|
||||
int cnt;
|
||||
|
||||
for (cnt = 0; cnt < __LC_LAST; ++cnt)
|
||||
if (cnt != LC_ALL)
|
||||
{
|
||||
if (la->record[cnt].offset < start_a)
|
||||
start_a = la->record[cnt].offset;
|
||||
if (la->record[cnt].offset + la->record[cnt].len > end_a)
|
||||
end_a = la->record[cnt].offset + la->record[cnt].len;
|
||||
}
|
||||
assert (start_a != (uint32_t)-1);
|
||||
assert (end_a != 0);
|
||||
|
||||
for (cnt = 0; cnt < __LC_LAST; ++cnt)
|
||||
if (cnt != LC_ALL)
|
||||
{
|
||||
if (lb->record[cnt].offset < start_b)
|
||||
start_b = lb->record[cnt].offset;
|
||||
if (lb->record[cnt].offset + lb->record[cnt].len > end_b)
|
||||
end_b = lb->record[cnt].offset + lb->record[cnt].len;
|
||||
}
|
||||
assert (start_b != (uint32_t)-1);
|
||||
assert (end_b != 0);
|
||||
|
||||
if (start_a != start_b)
|
||||
return (int)start_a - (int)start_b;
|
||||
return (int)end_a - (int)end_b;
|
||||
}
|
||||
|
||||
static int
|
||||
dataentcmp (const void *a, const void *b)
|
||||
{
|
||||
if (((const struct dataent *) a)->file_offset
|
||||
< ((const struct dataent *) b)->file_offset)
|
||||
return -1;
|
||||
|
||||
if (((const struct dataent *) a)->file_offset
|
||||
> ((const struct dataent *) b)->file_offset)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
sumsearchfn (const void *key, const void *ent)
|
||||
{
|
||||
uint32_t keyn = *(uint32_t *)key;
|
||||
uint32_t entn = ((struct dataent *)ent)->file_offset;
|
||||
|
||||
if (keyn < entn)
|
||||
return -1;
|
||||
if (keyn > entn)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
compute_data (struct locarhandle *ah, struct nameent *name, size_t sumused,
|
||||
struct dataent *files, locale_data_t data)
|
||||
{
|
||||
int cnt;
|
||||
struct locrecent *locrec = name->locrec;
|
||||
struct dataent *file;
|
||||
data[LC_ALL].addr = ((char *) ah->addr) + locrec->record[LC_ALL].offset;
|
||||
data[LC_ALL].size = locrec->record[LC_ALL].len;
|
||||
for (cnt = 0; cnt < __LC_LAST; ++cnt)
|
||||
if (cnt != LC_ALL)
|
||||
{
|
||||
data[cnt].addr = ((char *) ah->addr) + locrec->record[cnt].offset;
|
||||
data[cnt].size = locrec->record[cnt].len;
|
||||
if (data[cnt].addr >= data[LC_ALL].addr
|
||||
&& data[cnt].addr + data[cnt].size
|
||||
<= data[LC_ALL].addr + data[LC_ALL].size)
|
||||
__md5_buffer (data[cnt].addr, data[cnt].size, data[cnt].sum);
|
||||
else
|
||||
{
|
||||
file = bsearch (&locrec->record[cnt].offset, files, sumused,
|
||||
sizeof (*files), sumsearchfn);
|
||||
if (file == NULL)
|
||||
error (EXIT_FAILURE, 0, "inconsistent template file");
|
||||
memcpy (data[cnt].sum, file->sum, sizeof (data[cnt].sum));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
fill_archive (struct locarhandle *tmpl_ah, size_t nlist, char *list[],
|
||||
const char *primary)
|
||||
{
|
||||
struct locarhandle ah;
|
||||
struct locarhead *head;
|
||||
int result = 0;
|
||||
struct nameent *names;
|
||||
struct namehashent *namehashtab;
|
||||
size_t cnt, used;
|
||||
struct dataent *files;
|
||||
struct sumhashent *sumhashtab;
|
||||
size_t sumused;
|
||||
struct locrecent *primary_locrec = NULL;
|
||||
struct nameent *primary_nameent = NULL;
|
||||
|
||||
head = tmpl_ah->addr;
|
||||
names = (struct nameent *) malloc (head->namehash_used
|
||||
* sizeof (struct nameent));
|
||||
files = (struct dataent *) malloc (head->sumhash_used
|
||||
* sizeof (struct dataent));
|
||||
if (names == NULL || files == NULL)
|
||||
error (EXIT_FAILURE, errno, "could not allocate tables");
|
||||
|
||||
namehashtab = (struct namehashent *) ((char *) tmpl_ah->addr
|
||||
+ head->namehash_offset);
|
||||
sumhashtab = (struct sumhashent *) ((char *) tmpl_ah->addr
|
||||
+ head->sumhash_offset);
|
||||
|
||||
for (cnt = used = 0; cnt < head->namehash_size; ++cnt)
|
||||
if (namehashtab[cnt].locrec_offset != 0)
|
||||
{
|
||||
assert (used < head->namehash_used);
|
||||
names[used].name = tmpl_ah->addr + namehashtab[cnt].name_offset;
|
||||
names[used++].locrec
|
||||
= (struct locrecent *) ((char *) tmpl_ah->addr +
|
||||
namehashtab[cnt].locrec_offset);
|
||||
}
|
||||
|
||||
/* Sort the names. */
|
||||
qsort (names, used, sizeof (struct nameent), nameentcmp);
|
||||
|
||||
for (cnt = sumused = 0; cnt < head->sumhash_size; ++cnt)
|
||||
if (sumhashtab[cnt].file_offset != 0)
|
||||
{
|
||||
assert (sumused < head->sumhash_used);
|
||||
files[sumused].sum = (const unsigned char *) sumhashtab[cnt].sum;
|
||||
files[sumused++].file_offset = sumhashtab[cnt].file_offset;
|
||||
}
|
||||
|
||||
/* Sort by file locations. */
|
||||
qsort (files, sumused, sizeof (struct dataent), dataentcmp);
|
||||
|
||||
/* Open the archive. This call never returns if we cannot
|
||||
successfully open the archive. */
|
||||
open_archive (&ah, false);
|
||||
|
||||
if (primary != NULL)
|
||||
{
|
||||
for (cnt = 0; cnt < used; ++cnt)
|
||||
if (strcmp (names[cnt].name, primary) == 0)
|
||||
break;
|
||||
if (cnt < used)
|
||||
{
|
||||
locale_data_t data;
|
||||
|
||||
compute_data (tmpl_ah, &names[cnt], sumused, files, data);
|
||||
result |= add_locale_to_archive (&ah, primary, data, 0);
|
||||
primary_locrec = names[cnt].locrec;
|
||||
primary_nameent = &names[cnt];
|
||||
}
|
||||
}
|
||||
|
||||
for (cnt = 0; cnt < used; ++cnt)
|
||||
if (&names[cnt] == primary_nameent)
|
||||
continue;
|
||||
else if ((cnt > 0 && names[cnt - 1].locrec == names[cnt].locrec)
|
||||
|| names[cnt].locrec == primary_locrec)
|
||||
{
|
||||
const char *oldname;
|
||||
struct namehashent *namehashent;
|
||||
uint32_t locrec_offset;
|
||||
|
||||
if (names[cnt].locrec == primary_locrec)
|
||||
oldname = primary;
|
||||
else
|
||||
oldname = names[cnt - 1].name;
|
||||
namehashent = insert_name (&ah, oldname, strlen (oldname), true);
|
||||
assert (namehashent->name_offset != 0);
|
||||
assert (namehashent->locrec_offset != 0);
|
||||
locrec_offset = namehashent->locrec_offset;
|
||||
add_alias (&ah, names[cnt].name, 0, oldname, &locrec_offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
locale_data_t data;
|
||||
|
||||
compute_data (tmpl_ah, &names[cnt], sumused, files, data);
|
||||
result |= add_locale_to_archive (&ah, names[cnt].name, data, 0);
|
||||
}
|
||||
|
||||
while (nlist-- > 0)
|
||||
{
|
||||
const char *fname = *list++;
|
||||
size_t fnamelen = strlen (fname);
|
||||
struct stat64 st;
|
||||
DIR *dirp;
|
||||
struct dirent64 *d;
|
||||
int seen;
|
||||
locale_data_t data;
|
||||
int cnt;
|
||||
|
||||
/* First see whether this really is a directory and whether it
|
||||
contains all the require locale category files. */
|
||||
if (stat64 (fname, &st) < 0)
|
||||
{
|
||||
error (0, 0, "stat of \"%s\" failed: %s: ignored", fname,
|
||||
strerror (errno));
|
||||
continue;
|
||||
}
|
||||
if (!S_ISDIR (st.st_mode))
|
||||
{
|
||||
error (0, 0, "\"%s\" is no directory; ignored", fname);
|
||||
continue;
|
||||
}
|
||||
|
||||
dirp = opendir (fname);
|
||||
if (dirp == NULL)
|
||||
{
|
||||
error (0, 0, "cannot open directory \"%s\": %s: ignored",
|
||||
fname, strerror (errno));
|
||||
continue;
|
||||
}
|
||||
|
||||
seen = 0;
|
||||
while ((d = readdir64 (dirp)) != NULL)
|
||||
{
|
||||
for (cnt = 0; cnt < __LC_LAST; ++cnt)
|
||||
if (cnt != LC_ALL)
|
||||
if (strcmp (d->d_name, locnames[cnt]) == 0)
|
||||
{
|
||||
unsigned char d_type;
|
||||
|
||||
/* We have an object of the required name. If it's
|
||||
a directory we have to look at a file with the
|
||||
prefix "SYS_". Otherwise we have found what we
|
||||
are looking for. */
|
||||
#ifdef _DIRENT_HAVE_D_TYPE
|
||||
d_type = d->d_type;
|
||||
|
||||
if (d_type != DT_REG)
|
||||
#endif
|
||||
{
|
||||
char fullname[fnamelen + 2 * strlen (d->d_name) + 7];
|
||||
|
||||
#ifdef _DIRENT_HAVE_D_TYPE
|
||||
if (d_type == DT_UNKNOWN)
|
||||
#endif
|
||||
{
|
||||
strcpy (stpcpy (stpcpy (fullname, fname), "/"),
|
||||
d->d_name);
|
||||
|
||||
if (stat64 (fullname, &st) == -1)
|
||||
/* We cannot stat the file, ignore it. */
|
||||
break;
|
||||
|
||||
d_type = IFTODT (st.st_mode);
|
||||
}
|
||||
|
||||
if (d_type == DT_DIR)
|
||||
{
|
||||
/* We have to do more tests. The file is a
|
||||
directory and it therefore must contain a
|
||||
regular file with the same name except a
|
||||
"SYS_" prefix. */
|
||||
char *t = stpcpy (stpcpy (fullname, fname), "/");
|
||||
strcpy (stpcpy (stpcpy (t, d->d_name), "/SYS_"),
|
||||
d->d_name);
|
||||
|
||||
if (stat64 (fullname, &st) == -1)
|
||||
/* There is no SYS_* file or we cannot
|
||||
access it. */
|
||||
break;
|
||||
|
||||
d_type = IFTODT (st.st_mode);
|
||||
}
|
||||
}
|
||||
|
||||
/* If we found a regular file (eventually after
|
||||
following a symlink) we are successful. */
|
||||
if (d_type == DT_REG)
|
||||
++seen;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
closedir (dirp);
|
||||
|
||||
if (seen != __LC_LAST - 1)
|
||||
{
|
||||
/* We don't have all locale category files. Ignore the name. */
|
||||
error (0, 0, "incomplete set of locale files in \"%s\"",
|
||||
fname);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Add the files to the archive. To do this we first compute
|
||||
sizes and the MD5 sums of all the files. */
|
||||
for (cnt = 0; cnt < __LC_LAST; ++cnt)
|
||||
if (cnt != LC_ALL)
|
||||
{
|
||||
char fullname[fnamelen + 2 * strlen (locnames[cnt]) + 7];
|
||||
int fd;
|
||||
|
||||
strcpy (stpcpy (stpcpy (fullname, fname), "/"), locnames[cnt]);
|
||||
fd = open64 (fullname, O_RDONLY);
|
||||
if (fd == -1 || fstat64 (fd, &st) == -1)
|
||||
{
|
||||
/* Cannot read the file. */
|
||||
if (fd != -1)
|
||||
close (fd);
|
||||
break;
|
||||
}
|
||||
|
||||
if (S_ISDIR (st.st_mode))
|
||||
{
|
||||
char *t;
|
||||
close (fd);
|
||||
t = stpcpy (stpcpy (fullname, fname), "/");
|
||||
strcpy (stpcpy (stpcpy (t, locnames[cnt]), "/SYS_"),
|
||||
locnames[cnt]);
|
||||
|
||||
fd = open64 (fullname, O_RDONLY);
|
||||
if (fd == -1 || fstat64 (fd, &st) == -1
|
||||
|| !S_ISREG (st.st_mode))
|
||||
{
|
||||
if (fd != -1)
|
||||
close (fd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Map the file. */
|
||||
data[cnt].addr = mmap64 (NULL, st.st_size, PROT_READ, MAP_SHARED,
|
||||
fd, 0);
|
||||
if (data[cnt].addr == MAP_FAILED)
|
||||
{
|
||||
/* Cannot map it. */
|
||||
close (fd);
|
||||
break;
|
||||
}
|
||||
|
||||
data[cnt].size = st.st_size;
|
||||
__md5_buffer (data[cnt].addr, st.st_size, data[cnt].sum);
|
||||
|
||||
/* We don't need the file descriptor anymore. */
|
||||
close (fd);
|
||||
}
|
||||
|
||||
if (cnt != __LC_LAST)
|
||||
{
|
||||
while (cnt-- > 0)
|
||||
if (cnt != LC_ALL)
|
||||
munmap (data[cnt].addr, data[cnt].size);
|
||||
|
||||
error (0, 0, "cannot read all files in \"%s\": ignored", fname);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
result |= add_locale_to_archive (&ah, basename (fname), data, 0);
|
||||
|
||||
for (cnt = 0; cnt < __LC_LAST; ++cnt)
|
||||
if (cnt != LC_ALL)
|
||||
munmap (data[cnt].addr, data[cnt].size);
|
||||
}
|
||||
|
||||
/* We are done. */
|
||||
close_archive (&ah);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
char path[4096];
|
||||
DIR *dirp;
|
||||
struct dirent64 *d;
|
||||
struct stat64 st;
|
||||
char *list[16384], *primary;
|
||||
unsigned int cnt = 0;
|
||||
struct locarhandle tmpl_ah;
|
||||
size_t loc_path_len = strlen (loc_path);
|
||||
|
||||
dirp = opendir (loc_path);
|
||||
if (dirp == NULL)
|
||||
error (EXIT_FAILURE, errno, "cannot open directory \"%s\"", loc_path);
|
||||
|
||||
open_tmpl_archive (&tmpl_ah);
|
||||
|
||||
unlink (locar_file);
|
||||
primary = getenv ("LC_ALL");
|
||||
if (primary == NULL)
|
||||
primary = getenv ("LANG");
|
||||
if (primary != NULL)
|
||||
{
|
||||
if (strncmp (primary, "ja", 2) != 0
|
||||
&& strncmp (primary, "ko", 2) != 0
|
||||
&& strncmp (primary, "zh", 2) != 0)
|
||||
{
|
||||
char *ptr = malloc (strlen (primary) + strlen (".utf8") + 1), *p, *q;
|
||||
|
||||
if (ptr)
|
||||
{
|
||||
p = ptr;
|
||||
q = primary;
|
||||
while (*q && *q != '.' && *q != '@')
|
||||
*p++ = *q++;
|
||||
if (*q == '.')
|
||||
while (*q && *q != '@')
|
||||
q++;
|
||||
p = stpcpy (p, ".utf8");
|
||||
strcpy (p, q);
|
||||
primary = ptr;
|
||||
}
|
||||
else
|
||||
primary = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy (path, loc_path, loc_path_len);
|
||||
|
||||
while ((d = readdir64 (dirp)) != NULL)
|
||||
{
|
||||
if (strcmp (d->d_name, ".") == 0 || strcmp (d->d_name, "..") == 0)
|
||||
continue;
|
||||
|
||||
size_t d_name_len = strlen (d->d_name);
|
||||
if (loc_path_len + d_name_len + 1 > sizeof (path))
|
||||
{
|
||||
error (0, 0, "too long filename \"%s\"", d->d_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
memcpy (path + loc_path_len, d->d_name, d_name_len + 1);
|
||||
if (stat64 (path, &st) < 0)
|
||||
{
|
||||
error (0, errno, "cannot stat \"%s\"", path);
|
||||
continue;
|
||||
}
|
||||
if (! S_ISDIR (st.st_mode))
|
||||
continue;
|
||||
if (cnt == 16384)
|
||||
error (EXIT_FAILURE, 0, "too many directories in \"%s\"", loc_path);
|
||||
list[cnt] = strdup (path);
|
||||
if (list[cnt] == NULL)
|
||||
{
|
||||
error (0, errno, "cannot add file to list \"%s\"", path);
|
||||
continue;
|
||||
}
|
||||
if (primary != NULL && cnt > 0 && strcmp (primary, d->d_name) == 0)
|
||||
{
|
||||
char *p = list[0];
|
||||
list[0] = list[cnt];
|
||||
list[cnt] = p;
|
||||
}
|
||||
cnt++;
|
||||
}
|
||||
closedir (dirp);
|
||||
fill_archive (&tmpl_ah, cnt, list, primary);
|
||||
close_archive (&tmpl_ah);
|
||||
truncate (tmpl_file, 0);
|
||||
char *argv[] = { "/usr/sbin/tzdata-update", NULL };
|
||||
execve (argv[0], (char *const *)argv, (char *const *)&argv[1]);
|
||||
exit (0);
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
2004-05-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/configure.in: Use */lib64 even for ia64.
|
||||
* sysdeps/unix/sysv/linux/configure: Rebuilt.
|
||||
* sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file.
|
||||
* sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file.
|
||||
* sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Change /lib64/ld*
|
||||
into /lib/ld*. Add LD_LIBRARY_VERSION.
|
||||
* sysdeps/unix/sysv/linux/ia64/ldconfig.h
|
||||
(SYSDEP_KNOWN_INTERPRETER_NAMES): Add /lib64/ld-linux-ia64.so.2.
|
||||
* sysdeps/unix/sysv/linux/ia64/dl-cache.h: Include sparc-linux
|
||||
dl-cache.h instead of generic dl-cache.h.
|
||||
|
||||
--- libc/sysdeps/unix/sysv/linux/configure.jj 2003-03-23 03:10:04.000000000 +0100
|
||||
+++ libc/sysdeps/unix/sysv/linux/configure 2004-05-14 15:54:35.669802684 +0200
|
||||
@@ -225,7 +225,7 @@ case "$prefix" in
|
||||
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
|
||||
case $machine in
|
||||
sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
|
||||
- mips/mips64/n64/* )
|
||||
+ mips/mips64/n64/* | ia64 )
|
||||
libc_cv_slibdir="/lib64"
|
||||
if test "$libdir" = '${exec_prefix}/lib'; then
|
||||
libdir='${exec_prefix}/lib64';
|
||||
--- libc/sysdeps/unix/sysv/linux/configure.in.jj 2003-03-23 03:10:04.000000000 +0100
|
||||
+++ libc/sysdeps/unix/sysv/linux/configure.in 2004-05-14 15:53:44.355998785 +0200
|
||||
@@ -158,7 +158,7 @@ case "$prefix" in
|
||||
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
|
||||
case $machine in
|
||||
sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
|
||||
- mips/mips64/n64/* )
|
||||
+ mips/mips64/n64/* | ia64 )
|
||||
libc_cv_slibdir="/lib64"
|
||||
if test "$libdir" = '${exec_prefix}/lib'; then
|
||||
libdir='${exec_prefix}/lib64';
|
||||
--- libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c.jj 2004-05-14 15:42:09.307560515 +0200
|
||||
+++ libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c 2003-09-30 00:23:24.000000000 +0200
|
||||
@@ -0,0 +1,5 @@
|
||||
+#ifdef IS_IN_ldconfig
|
||||
+#include <sysdeps/i386/dl-procinfo.c>
|
||||
+#else
|
||||
+#include <sysdeps/generic/dl-procinfo.c>
|
||||
+#endif
|
||||
--- libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed.jj 2002-01-17 07:49:28.000000000 +0100
|
||||
+++ libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed 2004-05-14 16:21:03.041325040 +0200
|
||||
@@ -1 +1,4 @@
|
||||
-s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_
|
||||
+/LD_TRACE_LOADED_OBJECTS=1/a\
|
||||
+add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
|
||||
+s_^\(RTLDLIST=\)/lib64/ld\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"/lib/ld\2-ia64\3 /lib/ld\2\3"_
|
||||
+s_^\(RTLDLIST=\)\([^"][^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_
|
||||
--- libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h.jj 2001-07-06 06:56:17.000000000 +0200
|
||||
+++ libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h 2004-05-14 15:45:40.103783087 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2001, 2004 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
|
||||
@@ -19,7 +19,8 @@
|
||||
#include <sysdeps/generic/ldconfig.h>
|
||||
|
||||
#define SYSDEP_KNOWN_INTERPRETER_NAMES \
|
||||
- { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 },
|
||||
+ { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, \
|
||||
+ { "/lib64/ld-linux-ia64.so.2", FLAG_ELF_LIBC6 },
|
||||
#define SYSDEP_KNOWN_LIBRARY_NAMES \
|
||||
{ "libc.so.6", FLAG_ELF_LIBC6 }, \
|
||||
{ "libm.so.6", FLAG_ELF_LIBC6 },
|
||||
--- libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h.jj 2001-07-06 06:56:17.000000000 +0200
|
||||
+++ libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h 2004-05-14 15:41:11.658891907 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
|
||||
- Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2000, 2004 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,4 +22,4 @@
|
||||
#define _dl_cache_check_flags(flags) \
|
||||
((flags) == _DL_CACHE_DEFAULT_ID)
|
||||
|
||||
-#include_next <dl-cache.h>
|
||||
+#include <sysdeps/unix/sysv/linux/sparc/dl-cache.h>
|
||||
--- libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h.jj 2004-05-14 15:42:13.018895395 +0200
|
||||
+++ libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h 2003-07-23 00:06:23.000000000 +0200
|
||||
@@ -0,0 +1,5 @@
|
||||
+#ifdef IS_IN_ldconfig
|
||||
+#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
|
||||
+#else
|
||||
+#include <sysdeps/generic/dl-procinfo.h>
|
||||
+#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,384 @@
|
||||
#if defined __sparc__ && defined __arch64__
|
||||
register void *__thread_self __asm ("g7");
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <dirent.h>
|
||||
#include <stddef.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <elf.h>
|
||||
|
||||
#define verbose_exec(failcode, path...) \
|
||||
do \
|
||||
{ \
|
||||
char *const arr[] = { path, NULL }; \
|
||||
vexec (failcode, arr); \
|
||||
} while (0)
|
||||
|
||||
__attribute__((noinline)) void vexec (int failcode, char *const path[]);
|
||||
__attribute__((noinline)) void says (const char *str);
|
||||
__attribute__((noinline)) void sayn (long num);
|
||||
__attribute__((noinline)) void message (char *const path[]);
|
||||
__attribute__((noinline)) int check_elf (const char *name);
|
||||
|
||||
#ifdef __i386__
|
||||
static int
|
||||
is_ia64 (void)
|
||||
{
|
||||
unsigned int fl1, fl2;
|
||||
|
||||
/* See if we can use cpuid. */
|
||||
__asm__ ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;"
|
||||
"pushl %0; popfl; pushfl; popl %0; popfl"
|
||||
: "=&r" (fl1), "=&r" (fl2)
|
||||
: "i" (0x00200000));
|
||||
if (((fl1 ^ fl2) & 0x00200000) == 0)
|
||||
return 0;
|
||||
|
||||
/* Host supports cpuid. See if cpuid gives capabilities, try
|
||||
CPUID(0). Preserve %ebx and %ecx; cpuid insn clobbers these, we
|
||||
don't need their CPUID values here, and %ebx may be the PIC
|
||||
register. */
|
||||
__asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
|
||||
: "=a" (fl1) : "0" (0) : "edx", "cc");
|
||||
if (fl1 == 0)
|
||||
return 0;
|
||||
|
||||
/* Invoke CPUID(1), return %edx; caller can examine bits to
|
||||
determine what's supported. */
|
||||
__asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
|
||||
: "=d" (fl2), "=a" (fl1) : "1" (1) : "cc");
|
||||
return (fl2 & (1 << 30)) != 0;
|
||||
}
|
||||
#else
|
||||
#define is_ia64() 0
|
||||
#endif
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
char initpath[256];
|
||||
|
||||
char buffer[4096];
|
||||
struct pref {
|
||||
char *p;
|
||||
int len;
|
||||
} prefix[] = { { "libc-", 5 }, { "libm-", 5 },
|
||||
{ "librt-", 6 }, { "libpthread-", 11 },
|
||||
{ "librtkaio-", 10 }, { "libthread_db-", 13 } };
|
||||
int i, j, fd;
|
||||
off_t base;
|
||||
ssize_t ret;
|
||||
#ifdef __i386__
|
||||
const char *remove_dirs[] = { "/lib/tls", "/lib/i686", "/lib/tls/i486", "/lib/tls/i586", "/lib/tls/i686" };
|
||||
#else
|
||||
#ifndef LIBTLS
|
||||
#define LIBTLS "/lib/tls"
|
||||
#endif
|
||||
const char *remove_dirs[] = { LIBTLS };
|
||||
#endif
|
||||
for (j = 0; j < sizeof (remove_dirs) / sizeof (remove_dirs[0]); ++j)
|
||||
{
|
||||
size_t rmlen = strlen (remove_dirs[j]);
|
||||
fd = open (remove_dirs[j], O_RDONLY);
|
||||
if (fd >= 0
|
||||
&& (ret = getdirentries (fd, buffer, sizeof (buffer), &base))
|
||||
>= (ssize_t) offsetof (struct dirent, d_name))
|
||||
{
|
||||
for (base = 0; base + offsetof (struct dirent, d_name) < ret; )
|
||||
{
|
||||
struct dirent *d = (struct dirent *) (buffer + base);
|
||||
|
||||
for (i = 0; i < sizeof (prefix) / sizeof (prefix[0]); i++)
|
||||
if (! strncmp (d->d_name, prefix[i].p, prefix[i].len))
|
||||
{
|
||||
char *p = d->d_name + prefix[i].len;
|
||||
|
||||
while (*p == '.' || (*p >= '0' && *p <= '9')) p++;
|
||||
if (p[0] == 's' && p[1] == 'o' && p[2] == '\0'
|
||||
&& p + 3 - d->d_name
|
||||
< sizeof (initpath) - rmlen - 1)
|
||||
{
|
||||
memcpy (initpath, remove_dirs[j], rmlen);
|
||||
initpath[rmlen] = '/';
|
||||
strcpy (initpath + rmlen + 1, d->d_name);
|
||||
unlink (initpath);
|
||||
break;
|
||||
}
|
||||
}
|
||||
base += d->d_reclen;
|
||||
}
|
||||
close (fd);
|
||||
}
|
||||
}
|
||||
|
||||
int ldsocfd = open (LD_SO_CONF, O_RDONLY);
|
||||
struct stat ldsocst;
|
||||
if (ldsocfd >= 0 && fstat (ldsocfd, &ldsocst) >= 0)
|
||||
{
|
||||
char p[ldsocst.st_size + 1];
|
||||
if (read (ldsocfd, p, ldsocst.st_size) == ldsocst.st_size)
|
||||
{
|
||||
p[ldsocst.st_size] = '\0';
|
||||
if (strstr (p, "include ld.so.conf.d/*.conf") == NULL)
|
||||
{
|
||||
close (ldsocfd);
|
||||
ldsocfd = open (LD_SO_CONF, O_WRONLY | O_TRUNC);
|
||||
if (ldsocfd >= 0)
|
||||
{
|
||||
size_t slen = strlen ("include ld.so.conf.d/*.conf\n");
|
||||
if (write (ldsocfd, "include ld.so.conf.d/*.conf\n", slen)
|
||||
!= slen
|
||||
|| write (ldsocfd, p, ldsocst.st_size) != ldsocst.st_size)
|
||||
_exit (109);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ldsocfd >= 0)
|
||||
close (ldsocfd);
|
||||
}
|
||||
|
||||
/* If installing bi-arch glibc, rpm sometimes doesn't unpack all files
|
||||
before running one of the lib's %post scriptlet. /sbin/ldconfig will
|
||||
then be run by the other arch's %post. */
|
||||
if (! access ("/sbin/ldconfig", X_OK))
|
||||
verbose_exec (110, "/sbin/ldconfig", "/sbin/ldconfig");
|
||||
|
||||
if (! utimes (GCONV_MODULES_DIR "/gconv-modules.cache", NULL))
|
||||
{
|
||||
#ifndef ICONVCONFIG
|
||||
#define ICONVCONFIG "/usr/sbin/iconvconfig"
|
||||
#endif
|
||||
const char *iconv_cache = GCONV_MODULES_DIR"/gconv-modules.cache";
|
||||
const char *iconv_dir = GCONV_MODULES_DIR;
|
||||
if (is_ia64 ())
|
||||
{
|
||||
iconv_cache = "/emul/ia32-linux"GCONV_MODULES_DIR"/gconv-modules.cache";
|
||||
iconv_dir = "/emul/ia32-linux"GCONV_MODULES_DIR;
|
||||
}
|
||||
verbose_exec (113, ICONVCONFIG, "/usr/sbin/iconvconfig",
|
||||
"-o", iconv_cache,
|
||||
"--nostdlib", iconv_dir);
|
||||
}
|
||||
|
||||
/* Check if telinit is available and either SysVInit fifo,
|
||||
or upstart telinit. */
|
||||
if (access ("/sbin/telinit", X_OK)
|
||||
|| ((!!access ("/dev/initctl", F_OK))
|
||||
^ !access ("/sbin/initctl", X_OK)))
|
||||
_exit (0);
|
||||
/* Check if we are not inside of some chroot, because we'd just
|
||||
timeout and leave /etc/initrunlvl. */
|
||||
if (readlink ("/proc/1/exe", initpath, 256) <= 0 ||
|
||||
readlink ("/proc/1/root", initpath, 256) <= 0)
|
||||
_exit (0);
|
||||
|
||||
if (check_elf ("/proc/1/exe"))
|
||||
verbose_exec (116, "/sbin/telinit", "/sbin/telinit", "u");
|
||||
|
||||
/* Check if we can safely condrestart sshd. */
|
||||
if (access ("/sbin/service", X_OK) == 0
|
||||
&& access ("/usr/sbin/sshd", X_OK) == 0
|
||||
&& access ("/etc/rc.d/init.d/sshd", X_OK) == 0
|
||||
&& access ("/bin/bash", X_OK) == 0)
|
||||
{
|
||||
if (check_elf ("/usr/sbin/sshd"))
|
||||
verbose_exec (-121, "/sbin/service", "/sbin/service", "sshd", "condrestart");
|
||||
}
|
||||
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
#ifndef NO_SIZE_OPTIMIZATION
|
||||
int __libc_multiple_threads __attribute__((nocommon));
|
||||
int __libc_enable_asynccancel (void) { return 0; }
|
||||
void __libc_disable_asynccancel (int x) { }
|
||||
void __libc_csu_init (void) { }
|
||||
void __libc_csu_fini (void) { }
|
||||
pid_t __fork (void) { return -1; }
|
||||
char thr_buf[65536];
|
||||
|
||||
# ifndef __powerpc__
|
||||
int
|
||||
__libc_start_main (int (*main) (void), int argc, char **argv,
|
||||
void (*init) (void), void (*fini) (void),
|
||||
void (*rtld_fini) (void), void * stack_end)
|
||||
# else
|
||||
struct startup_info
|
||||
{
|
||||
void *sda_base;
|
||||
int (*main) (int, char **, char **, void *);
|
||||
int (*init) (int, char **, char **, void *);
|
||||
void (*fini) (void);
|
||||
};
|
||||
|
||||
int
|
||||
__libc_start_main (int argc, char **ubp_av, char **ubp_ev,
|
||||
void *auxvec, void (*rtld_fini) (void),
|
||||
struct startup_info *stinfo,
|
||||
char **stack_on_entry)
|
||||
# endif
|
||||
{
|
||||
#if defined __ia64__ || defined __powerpc64__
|
||||
register void *r13 __asm ("r13") = thr_buf + 32768;
|
||||
__asm ("" : : "r" (r13));
|
||||
#elif defined __sparc__
|
||||
register void *g6 __asm ("g6") = thr_buf + 32768;
|
||||
# ifdef __arch64__
|
||||
__thread_self = thr_buf + 32768;
|
||||
# else
|
||||
register void *__thread_self __asm ("g7") = thr_buf + 32768;
|
||||
# endif
|
||||
__asm ("" : : "r" (g6), "r" (__thread_self));
|
||||
#elif defined __s390__ && !defined __s390x__
|
||||
__asm ("sar %%a0,%0" : : "d" (thr_buf + 32768));
|
||||
#elif defined __s390x__
|
||||
__asm ("sar %%a1,%0; srlg 0,%0,32; sar %%a0,0" : : "d" (thr_buf + 32768) : "0");
|
||||
#elif defined __powerpc__ && !defined __powerpc64__
|
||||
register void *r2 __asm ("r2") = thr_buf + 32768;
|
||||
__asm ("" : : "r" (r2));
|
||||
#endif
|
||||
main();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
vexec (int failcode, char *const path[])
|
||||
{
|
||||
pid_t pid;
|
||||
int status, save_errno;
|
||||
int devnull = 0;
|
||||
|
||||
if (failcode < 0)
|
||||
{
|
||||
devnull = 1;
|
||||
failcode = -failcode;
|
||||
}
|
||||
pid = vfork ();
|
||||
if (pid == 0)
|
||||
{
|
||||
int fd;
|
||||
if (devnull && (fd = open ("/dev/null", O_WRONLY)) >= 0)
|
||||
{
|
||||
dup2 (fd, 1);
|
||||
dup2 (fd, 2);
|
||||
close (fd);
|
||||
}
|
||||
execv (path[0], path + 1);
|
||||
save_errno = errno;
|
||||
message (path);
|
||||
says (" exec failed with errno ");
|
||||
sayn (save_errno);
|
||||
says ("\n");
|
||||
_exit (failcode);
|
||||
}
|
||||
else if (pid < 0)
|
||||
{
|
||||
save_errno = errno;
|
||||
message (path);
|
||||
says (" fork failed with errno ");
|
||||
sayn (save_errno);
|
||||
says ("\n");
|
||||
_exit (failcode + 1);
|
||||
}
|
||||
if (waitpid (0, &status, 0) != pid || !WIFEXITED (status))
|
||||
{
|
||||
message (path);
|
||||
says (" child terminated abnormally\n");
|
||||
_exit (failcode + 2);
|
||||
}
|
||||
if (WEXITSTATUS (status))
|
||||
{
|
||||
message (path);
|
||||
says (" child exited with exit code ");
|
||||
sayn (WEXITSTATUS (status));
|
||||
says ("\n");
|
||||
_exit (WEXITSTATUS (status));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
says (const char *str)
|
||||
{
|
||||
write (1, str, strlen (str));
|
||||
}
|
||||
|
||||
void
|
||||
sayn (long num)
|
||||
{
|
||||
char string[sizeof (long) * 3 + 1];
|
||||
char *p = string + sizeof (string) - 1;
|
||||
|
||||
*p = '\0';
|
||||
if (num == 0)
|
||||
*--p = '0';
|
||||
else
|
||||
while (num)
|
||||
{
|
||||
*--p = '0' + num % 10;
|
||||
num = num / 10;
|
||||
}
|
||||
|
||||
says (p);
|
||||
}
|
||||
|
||||
void
|
||||
message (char *const path[])
|
||||
{
|
||||
says ("/usr/sbin/glibc_post_upgrade: While trying to execute ");
|
||||
says (path[0]);
|
||||
}
|
||||
|
||||
int
|
||||
check_elf (const char *name)
|
||||
{
|
||||
/* Play safe, if we can't open or read, assume it might be
|
||||
ELF for the current arch. */
|
||||
int ret = 1;
|
||||
int fd = open (name, O_RDONLY);
|
||||
if (fd >= 0)
|
||||
{
|
||||
Elf32_Ehdr ehdr;
|
||||
if (read (fd, &ehdr, offsetof (Elf32_Ehdr, e_version))
|
||||
== offsetof (Elf32_Ehdr, e_version))
|
||||
{
|
||||
ret = 0;
|
||||
if (ehdr.e_ident[EI_CLASS]
|
||||
== (sizeof (long) == 8 ? ELFCLASS64 : ELFCLASS32))
|
||||
{
|
||||
#if defined __i386__
|
||||
ret = ehdr.e_machine == EM_386;
|
||||
#elif defined __x86_64__
|
||||
ret = ehdr.e_machine == EM_X86_64;
|
||||
#elif defined __ia64__
|
||||
ret = ehdr.e_machine == EM_IA_64;
|
||||
#elif defined __powerpc64__
|
||||
ret = ehdr.e_machine == EM_PPC64;
|
||||
#elif defined __powerpc__
|
||||
ret = ehdr.e_machine == EM_PPC;
|
||||
#elif defined __s390__ || defined __s390x__
|
||||
ret = ehdr.e_machine == EM_S390;
|
||||
#elif defined __x86_64__
|
||||
ret = ehdr.e_machine == EM_X86_64;
|
||||
#elif defined __sparc__
|
||||
if (sizeof (long) == 8)
|
||||
ret = ehdr.e_machine == EM_SPARCV9;
|
||||
else
|
||||
ret = (ehdr.e_machine == EM_SPARC
|
||||
|| ehdr.e_machine == EM_SPARC32PLUS);
|
||||
#else
|
||||
ret = 1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
close (fd);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,344 @@
|
||||
/* Copyright (C) 2001 Red Hat, Inc.
|
||||
|
||||
Written by Jakub Jelinek <jakub@redhat.com>.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; see the file COPYING. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Changes by Rémy Card to use constants and add option -n. */
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#define NHASH 131072 /* Must be a power of 2! */
|
||||
#define NAMELEN 4096
|
||||
#define NBUF 64
|
||||
|
||||
struct _f;
|
||||
typedef struct _h {
|
||||
struct _h *next;
|
||||
struct _f *chain;
|
||||
off_t size;
|
||||
time_t mtime;
|
||||
} h;
|
||||
|
||||
typedef struct _d {
|
||||
struct _d *next;
|
||||
char name[0];
|
||||
} d;
|
||||
|
||||
d *dirs;
|
||||
|
||||
h *hps[NHASH];
|
||||
|
||||
int no_link = 0;
|
||||
int verbose = 0;
|
||||
int content_only = 0;
|
||||
|
||||
typedef struct _f {
|
||||
struct _f *next;
|
||||
ino_t ino;
|
||||
dev_t dev;
|
||||
unsigned int cksum;
|
||||
char name[0];
|
||||
} f;
|
||||
|
||||
inline unsigned int hash(off_t size, time_t mtime)
|
||||
{
|
||||
return (size ^ mtime) & (NHASH - 1);
|
||||
}
|
||||
|
||||
inline int stcmp(struct stat *st1, struct stat *st2, int content_only)
|
||||
{
|
||||
if (content_only)
|
||||
return st1->st_size != st2->st_size;
|
||||
return st1->st_mode != st2->st_mode || st1->st_uid != st2->st_uid ||
|
||||
st1->st_gid != st2->st_gid || st1->st_size != st2->st_size ||
|
||||
st1->st_mtime != st2->st_mtime;
|
||||
}
|
||||
|
||||
long long ndirs, nobjects, nregfiles, nmmap, ncomp, nlinks, nsaved;
|
||||
|
||||
void doexit(int i)
|
||||
{
|
||||
if (verbose) {
|
||||
fprintf(stderr, "\n\n");
|
||||
fprintf(stderr, "Directories %lld\n", ndirs);
|
||||
fprintf(stderr, "Objects %lld\n", nobjects);
|
||||
fprintf(stderr, "IFREG %lld\n", nregfiles);
|
||||
fprintf(stderr, "Mmaps %lld\n", nmmap);
|
||||
fprintf(stderr, "Comparisons %lld\n", ncomp);
|
||||
fprintf(stderr, "%s %lld\n", (no_link ? "Would link" : "Linked"), nlinks);
|
||||
fprintf(stderr, "%s %lld\n", (no_link ? "Would save" : "saved"), nsaved);
|
||||
}
|
||||
exit(i);
|
||||
}
|
||||
|
||||
void usage(prog)
|
||||
{
|
||||
fprintf (stderr, "Usage: %s [-cnv] directories...\n", prog);
|
||||
exit(255);
|
||||
}
|
||||
|
||||
unsigned int buf[NBUF];
|
||||
char nambuf1[NAMELEN], nambuf2[NAMELEN];
|
||||
|
||||
void rf (char *name)
|
||||
{
|
||||
struct stat st, st2, st3;
|
||||
nobjects++;
|
||||
if (lstat (name, &st))
|
||||
return;
|
||||
if (S_ISDIR (st.st_mode)) {
|
||||
d * dp = malloc(sizeof(d) + 1 + strlen (name));
|
||||
if (!dp) {
|
||||
fprintf(stderr, "\nOut of memory 3\n");
|
||||
doexit(3);
|
||||
}
|
||||
strcpy (dp->name, name);
|
||||
dp->next = dirs;
|
||||
dirs = dp;
|
||||
} else if (S_ISREG (st.st_mode)) {
|
||||
int fd, i;
|
||||
f * fp, * fp2;
|
||||
h * hp;
|
||||
char *p, *q;
|
||||
char *n1, *n2;
|
||||
int cksumsize = sizeof(buf);
|
||||
unsigned int cksum;
|
||||
time_t mtime = content_only ? 0 : st.st_mtime;
|
||||
unsigned int hsh = hash (st.st_size, mtime);
|
||||
nregfiles++;
|
||||
if (verbose > 1)
|
||||
fprintf(stderr, " %s", name);
|
||||
fd = open (name, O_RDONLY);
|
||||
if (fd < 0) return;
|
||||
if (st.st_size < sizeof(buf)) {
|
||||
cksumsize = st.st_size;
|
||||
memset (((char *)buf) + cksumsize, 0, (sizeof(buf) - cksumsize) % sizeof(buf[0]));
|
||||
}
|
||||
if (read (fd, buf, cksumsize) != cksumsize) {
|
||||
close(fd);
|
||||
if (verbose > 1)
|
||||
fprintf(stderr, "\r%*s\r", (int)strlen(name)+2, "");
|
||||
return;
|
||||
}
|
||||
cksumsize = (cksumsize + sizeof(buf[0]) - 1) / sizeof(buf[0]);
|
||||
for (i = 0, cksum = 0; i < cksumsize; i++) {
|
||||
if (cksum + buf[i] < cksum)
|
||||
cksum += buf[i] + 1;
|
||||
else
|
||||
cksum += buf[i];
|
||||
}
|
||||
for (hp = hps[hsh]; hp; hp = hp->next)
|
||||
if (hp->size == st.st_size && hp->mtime == mtime)
|
||||
break;
|
||||
if (!hp) {
|
||||
hp = malloc(sizeof(h));
|
||||
if (!hp) {
|
||||
fprintf(stderr, "\nOut of memory 1\n");
|
||||
doexit(1);
|
||||
}
|
||||
hp->size = st.st_size;
|
||||
hp->mtime = mtime;
|
||||
hp->chain = NULL;
|
||||
hp->next = hps[hsh];
|
||||
hps[hsh] = hp;
|
||||
}
|
||||
for (fp = hp->chain; fp; fp = fp->next)
|
||||
if (fp->cksum == cksum)
|
||||
break;
|
||||
for (fp2 = fp; fp2 && fp2->cksum == cksum; fp2 = fp2->next)
|
||||
if (fp2->ino == st.st_ino && fp2->dev == st.st_dev) {
|
||||
close(fd);
|
||||
if (verbose > 1)
|
||||
fprintf(stderr, "\r%*s\r", (int)strlen(name)+2, "");
|
||||
return;
|
||||
}
|
||||
if (fp) {
|
||||
p = mmap (NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
nmmap++;
|
||||
if (p == (void *)-1) {
|
||||
close(fd);
|
||||
fprintf(stderr, "\nFailed to mmap %s\n", name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (fp2 = fp; fp2 && fp2->cksum == cksum; fp2 = fp2->next)
|
||||
if (!lstat (fp2->name, &st2) && S_ISREG (st2.st_mode) &&
|
||||
!stcmp (&st, &st2, content_only) &&
|
||||
st2.st_ino != st.st_ino &&
|
||||
st2.st_dev == st.st_dev) {
|
||||
int fd2 = open (fp2->name, O_RDONLY);
|
||||
if (fd2 < 0) continue;
|
||||
if (fstat (fd2, &st2) || !S_ISREG (st2.st_mode)) {
|
||||
close (fd2);
|
||||
continue;
|
||||
}
|
||||
ncomp++;
|
||||
q = mmap (NULL, st.st_size, PROT_READ, MAP_SHARED, fd2, 0);
|
||||
if (q == (void *)-1) {
|
||||
close(fd2);
|
||||
fprintf(stderr, "\nFailed to mmap %s\n", fp2->name);
|
||||
continue;
|
||||
}
|
||||
if (memcmp (p, q, st.st_size)) {
|
||||
munmap (q, st.st_size);
|
||||
close(fd2);
|
||||
continue;
|
||||
}
|
||||
munmap (q, st.st_size);
|
||||
close(fd2);
|
||||
if (lstat (name, &st3)) {
|
||||
fprintf(stderr, "\nCould not stat %s again\n", name);
|
||||
munmap (p, st.st_size);
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
st3.st_atime = st.st_atime;
|
||||
if (stcmp (&st, &st3, 0)) {
|
||||
fprintf(stderr, "\nFile %s changed underneath us\n", name);
|
||||
munmap (p, st.st_size);
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
n1 = fp2->name;
|
||||
n2 = name;
|
||||
if (!no_link) {
|
||||
strcpy (stpcpy (nambuf2, n2), ".$$$___cleanit___$$$");
|
||||
if (rename (n2, nambuf2)) {
|
||||
fprintf(stderr, "\nFailed to rename %s to %s\n", n2, nambuf2);
|
||||
continue;
|
||||
}
|
||||
if (link (n1, n2)) {
|
||||
fprintf(stderr, "\nFailed to hardlink %s to %s\n", n1, n2);
|
||||
if (rename (nambuf2, n2)) {
|
||||
fprintf(stderr, "\nBad bad - failed to rename back %s to %s\n", nambuf2, n2);
|
||||
}
|
||||
munmap (p, st.st_size);
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
unlink (nambuf2);
|
||||
}
|
||||
nlinks++;
|
||||
if (st3.st_nlink > 1) {
|
||||
/* We actually did not save anything this time, since the link second argument
|
||||
had some other links as well. */
|
||||
if (verbose > 1)
|
||||
fprintf(stderr, "\r%*s\r%s %s to %s\n", (int)strlen(name)+2, "", (no_link ? "Would link" : "Linked"), n1, n2);
|
||||
} else {
|
||||
nsaved+=st.st_size;
|
||||
if (verbose > 1)
|
||||
fprintf(stderr, "\r%*s\r%s %s to %s, %s %ld\n", (int)strlen(name)+2, "", (no_link ? "Would link" : "Linked"), n1, n2, (no_link ? "would save" : "saved"), st.st_size);
|
||||
}
|
||||
munmap (p, st.st_size);
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
if (fp)
|
||||
munmap (p, st.st_size);
|
||||
fp2 = malloc(sizeof(f) + 1 + strlen (name));
|
||||
if (!fp2) {
|
||||
fprintf(stderr, "\nOut of memory 2\n");
|
||||
doexit(2);
|
||||
}
|
||||
close(fd);
|
||||
fp2->ino = st.st_ino;
|
||||
fp2->dev = st.st_dev;
|
||||
fp2->cksum = cksum;
|
||||
strcpy(fp2->name, name);
|
||||
if (fp) {
|
||||
fp2->next = fp->next;
|
||||
fp->next = fp2;
|
||||
} else {
|
||||
fp2->next = hp->chain;
|
||||
hp->chain = fp2;
|
||||
}
|
||||
if (verbose > 1)
|
||||
fprintf(stderr, "\r%*s\r", (int)strlen(name)+2, "");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int ch;
|
||||
int i;
|
||||
char *p;
|
||||
d * dp;
|
||||
DIR *dh;
|
||||
struct dirent *di;
|
||||
while ((ch = getopt (argc, argv, "cnv")) != -1) {
|
||||
switch (ch) {
|
||||
case 'n':
|
||||
no_link++;
|
||||
break;
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
case 'c':
|
||||
content_only++;
|
||||
break;
|
||||
default:
|
||||
usage(argv[0]);
|
||||
}
|
||||
}
|
||||
if (optind >= argc)
|
||||
usage(argv[0]);
|
||||
for (i = optind; i < argc; i++)
|
||||
rf(argv[i]);
|
||||
while (dirs) {
|
||||
dp = dirs;
|
||||
dirs = dp->next;
|
||||
strcpy (nambuf1, dp->name);
|
||||
free (dp);
|
||||
strcat (nambuf1, "/");
|
||||
p = strchr (nambuf1, 0);
|
||||
dh = opendir (nambuf1);
|
||||
if (dh == NULL)
|
||||
continue;
|
||||
ndirs++;
|
||||
while ((di = readdir (dh)) != NULL) {
|
||||
if (!di->d_name[0])
|
||||
continue;
|
||||
if (di->d_name[0] == '.') {
|
||||
char *q;
|
||||
if (!di->d_name[1] || !strcmp (di->d_name, "..") || !strncmp (di->d_name, ".in.", 4))
|
||||
continue;
|
||||
q = strrchr (di->d_name, '.');
|
||||
if (q && strlen (q) == 7 && q != di->d_name) {
|
||||
*p = 0;
|
||||
if (verbose)
|
||||
fprintf(stderr, "Skipping %s%s\n", nambuf1, di->d_name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
strcpy (p, di->d_name);
|
||||
rf(nambuf1);
|
||||
}
|
||||
closedir(dh);
|
||||
}
|
||||
doexit(0);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,340 @@
|
||||
/* libc-internal interface for mutex locks. LinuxThreads version.
|
||||
Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
|
||||
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 Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2.1 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; 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 _BITS_LIBC_LOCK_H
|
||||
#define _BITS_LIBC_LOCK_H 1
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
/* Mutex type. */
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
typedef pthread_mutex_t __libc_lock_t;
|
||||
typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t;
|
||||
# ifdef __USE_UNIX98
|
||||
typedef pthread_rwlock_t __libc_rwlock_t;
|
||||
# else
|
||||
typedef struct __libc_rwlock_opaque__ __libc_rwlock_t;
|
||||
# endif
|
||||
typedef __libc_lock_recursive_t __rtld_lock_recursive_t;
|
||||
#else
|
||||
typedef struct __libc_lock_opaque__ __libc_lock_t;
|
||||
typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
|
||||
typedef struct __libc_rwlock_opaque__ __libc_rwlock_t;
|
||||
#endif
|
||||
|
||||
/* Type for key to thread-specific data. */
|
||||
typedef pthread_key_t __libc_key_t;
|
||||
|
||||
/* Define a lock variable NAME with storage class CLASS. The lock must be
|
||||
initialized with __libc_lock_init before it can be used (or define it
|
||||
with __libc_lock_define_initialized, below). Use `extern' for CLASS to
|
||||
declare a lock defined in another module. In public structure
|
||||
definitions you must use a pointer to the lock structure (i.e., NAME
|
||||
begins with a `*'), because its storage size will not be known outside
|
||||
of libc. */
|
||||
#define __libc_lock_define(CLASS,NAME) \
|
||||
CLASS __libc_lock_t NAME;
|
||||
#define __libc_rwlock_define(CLASS,NAME) \
|
||||
CLASS __libc_rwlock_t NAME;
|
||||
#define __libc_lock_define_recursive(CLASS,NAME) \
|
||||
CLASS __libc_lock_recursive_t NAME;
|
||||
#define __rtld_lock_define_recursive(CLASS,NAME) \
|
||||
CLASS __rtld_lock_recursive_t NAME;
|
||||
|
||||
/* Define an initialized lock variable NAME with storage class CLASS.
|
||||
|
||||
For the C library we take a deeper look at the initializer. For
|
||||
this implementation all fields are initialized to zero. Therefore
|
||||
we don't initialize the variable which allows putting it into the
|
||||
BSS section. (Except on PA-RISC and other odd architectures, where
|
||||
initialized locks must be set to one due to the lack of normal
|
||||
atomic operations.) */
|
||||
|
||||
#if __LT_SPINLOCK_INIT == 0
|
||||
# define __libc_lock_define_initialized(CLASS,NAME) \
|
||||
CLASS __libc_lock_t NAME;
|
||||
#else
|
||||
# define __libc_lock_define_initialized(CLASS,NAME) \
|
||||
CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER;
|
||||
#endif
|
||||
|
||||
#define __libc_rwlock_define_initialized(CLASS,NAME) \
|
||||
CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER;
|
||||
|
||||
/* Define an initialized recursive lock variable NAME with storage
|
||||
class CLASS. */
|
||||
#define __libc_lock_define_initialized_recursive(CLASS,NAME) \
|
||||
CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER;
|
||||
#define _LIBC_LOCK_RECURSIVE_INITIALIZER \
|
||||
{PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}
|
||||
|
||||
#define __rtld_lock_define_initialized_recursive(CLASS,NAME) \
|
||||
CLASS __rtld_lock_recursive_t NAME = _RTLD_LOCK_RECURSIVE_INITIALIZER;
|
||||
#define _RTLD_LOCK_RECURSIVE_INITIALIZER \
|
||||
{PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}
|
||||
|
||||
#if defined __PIC__
|
||||
# define __libc_maybe_call(FUNC, ARGS, ELSE) \
|
||||
(__extension__ ({ __typeof (FUNC) *_fn = (FUNC); \
|
||||
_fn != NULL ? (*_fn) ARGS : ELSE; }))
|
||||
#else
|
||||
# define __libc_maybe_call(FUNC, ARGS, ELSE) \
|
||||
(FUNC != NULL ? FUNC ARGS : ELSE)
|
||||
#endif
|
||||
#define __libc_maybe_call2(FUNC, ARGS, ELSE) __libc_maybe_call (__##FUNC, ARGS, ELSE)
|
||||
|
||||
/* Initialize the named lock variable, leaving it in a consistent, unlocked
|
||||
state. */
|
||||
#define __libc_lock_init(NAME) \
|
||||
(__libc_maybe_call2 (pthread_mutex_init, (&(NAME), NULL), 0))
|
||||
#define __libc_rwlock_init(NAME) \
|
||||
(__libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0));
|
||||
|
||||
/* Same as last but this time we initialize a recursive mutex. */
|
||||
#define __libc_lock_init_recursive(NAME) \
|
||||
do { \
|
||||
if (__pthread_mutex_init != NULL) \
|
||||
{ \
|
||||
pthread_mutexattr_t __attr; \
|
||||
__pthread_mutexattr_init (&__attr); \
|
||||
__pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \
|
||||
__pthread_mutex_init (&(NAME).mutex, &__attr); \
|
||||
__pthread_mutexattr_destroy (&__attr); \
|
||||
} \
|
||||
} while (0);
|
||||
#define __rtld_lock_init_recursive(NAME) \
|
||||
__libc_lock_init_recursive (NAME)
|
||||
|
||||
/* Finalize the named lock variable, which must be locked. It cannot be
|
||||
used again until __libc_lock_init is called again on it. This must be
|
||||
called on a lock variable before the containing storage is reused. */
|
||||
#define __libc_lock_fini(NAME) \
|
||||
(__libc_maybe_call2 (pthread_mutex_destroy, (&(NAME)), 0));
|
||||
#define __libc_rwlock_fini(NAME) \
|
||||
(__libc_maybe_call (__pthread_rwlock_destroy, (&(NAME)), 0));
|
||||
|
||||
/* Finalize recursive named lock. */
|
||||
#define __libc_lock_fini_recursive(NAME) __libc_lock_fini ((NAME).mutex)
|
||||
#define __rtld_lock_fini_recursive(NAME) __libc_lock_fini_recursive (NAME)
|
||||
|
||||
/* Lock the named lock variable. */
|
||||
#define __libc_lock_lock(NAME) \
|
||||
(__libc_maybe_call2 (pthread_mutex_lock, (&(NAME)), 0));
|
||||
#define __libc_rwlock_rdlock(NAME) \
|
||||
(__libc_maybe_call (__pthread_rwlock_rdlock, (&(NAME)), 0));
|
||||
#define __libc_rwlock_wrlock(NAME) \
|
||||
(__libc_maybe_call (__pthread_rwlock_wrlock, (&(NAME)), 0));
|
||||
|
||||
/* Lock the recursive named lock variable. */
|
||||
#define __libc_lock_lock_recursive(NAME) __libc_lock_lock ((NAME).mutex)
|
||||
|
||||
/* Try to lock the named lock variable. */
|
||||
#define __libc_lock_trylock(NAME) \
|
||||
(__libc_maybe_call2 (pthread_mutex_trylock, (&(NAME)), 0))
|
||||
#define __libc_rwlock_tryrdlock(NAME) \
|
||||
(__libc_maybe_call (__pthread_rwlock_tryrdlock, (&(NAME)), 0))
|
||||
#define __libc_rwlock_trywrlock(NAME) \
|
||||
(__libc_maybe_call (__pthread_rwlock_trywrlock, (&(NAME)), 0))
|
||||
|
||||
/* Try to lock the recursive named lock variable. */
|
||||
#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock ((NAME).mutex)
|
||||
#define __rtld_lock_trylock_recursive(NAME) \
|
||||
__libc_lock_trylock_recursive (NAME)
|
||||
|
||||
/* Unlock the named lock variable. */
|
||||
#define __libc_lock_unlock(NAME) \
|
||||
(__libc_maybe_call2 (pthread_mutex_unlock, (&(NAME)), 0));
|
||||
#define __libc_rwlock_unlock(NAME) \
|
||||
(__libc_maybe_call (__pthread_rwlock_unlock, (&(NAME)), 0));
|
||||
|
||||
/* Unlock the recursive named lock variable. */
|
||||
#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock ((NAME).mutex)
|
||||
|
||||
#define __rtld_lock_lock_recursive(NAME) __libc_lock_lock_recursive (NAME)
|
||||
#define __rtld_lock_unlock_recursive(NAME) __libc_lock_unlock_recursive (NAME)
|
||||
|
||||
/* Define once control variable. */
|
||||
#if PTHREAD_ONCE_INIT == 0
|
||||
/* Special case for static variables where we can avoid the initialization
|
||||
if it is zero. */
|
||||
# define __libc_once_define(CLASS, NAME) \
|
||||
CLASS pthread_once_t NAME
|
||||
#else
|
||||
# define __libc_once_define(CLASS, NAME) \
|
||||
CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT
|
||||
#endif
|
||||
|
||||
/* Call handler iff the first call. */
|
||||
#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
|
||||
do { \
|
||||
if (__pthread_once != NULL) \
|
||||
__pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \
|
||||
else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \
|
||||
INIT_FUNCTION (); \
|
||||
(ONCE_CONTROL) = 2; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* Start critical region with cleanup. */
|
||||
#define __libc_cleanup_region_start(DOIT, FCT, ARG) \
|
||||
{ struct _pthread_cleanup_buffer _buffer; \
|
||||
int _avail = (DOIT) && _pthread_cleanup_push_defer != NULL; \
|
||||
if (_avail) { \
|
||||
_pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \
|
||||
}
|
||||
|
||||
/* End critical region with cleanup. */
|
||||
#define __libc_cleanup_region_end(DOIT) \
|
||||
if (_avail) { \
|
||||
_pthread_cleanup_pop_restore (&_buffer, (DOIT)); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Sometimes we have to exit the block in the middle. */
|
||||
#define __libc_cleanup_end(DOIT) \
|
||||
if (_avail) { \
|
||||
_pthread_cleanup_pop_restore (&_buffer, (DOIT)); \
|
||||
}
|
||||
|
||||
#define __libc_cleanup_push(fct, arg) \
|
||||
{ struct _pthread_cleanup_buffer _buffer; \
|
||||
__libc_maybe_call (_pthread_cleanup_push, (&_buffer, (fct), (arg)), 0)
|
||||
|
||||
#define __libc_cleanup_pop(execute) \
|
||||
__libc_maybe_call (_pthread_cleanup_pop, (&_buffer, execute), 0); \
|
||||
}
|
||||
|
||||
/* Create thread-specific key. */
|
||||
#define __libc_key_create(KEY, DESTRUCTOR) \
|
||||
(__libc_maybe_call (__pthread_key_create, (KEY, DESTRUCTOR), 1))
|
||||
|
||||
/* Get thread-specific data. */
|
||||
#define __libc_getspecific(KEY) \
|
||||
(__libc_maybe_call (__pthread_getspecific, (KEY), NULL))
|
||||
|
||||
/* Set thread-specific data. */
|
||||
#define __libc_setspecific(KEY, VALUE) \
|
||||
(__libc_maybe_call (__pthread_setspecific, (KEY, VALUE), 0))
|
||||
|
||||
|
||||
/* Register handlers to execute before and after `fork'. */
|
||||
#define __libc_atfork(PREPARE, PARENT, CHILD) \
|
||||
(__libc_maybe_call (__pthread_atfork, (PREPARE, PARENT, CHILD), 0))
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer,
|
||||
void (*__routine) (void *),
|
||||
void *__arg) __THROW;
|
||||
|
||||
extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer,
|
||||
int __execute) __THROW;
|
||||
|
||||
|
||||
/* Functions that are used by this file and are internal to the GNU C
|
||||
library. */
|
||||
|
||||
extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
|
||||
__const pthread_mutexattr_t *__mutex_attr);
|
||||
|
||||
extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
|
||||
|
||||
extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
|
||||
|
||||
extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
|
||||
|
||||
extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
|
||||
|
||||
extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr);
|
||||
|
||||
extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr);
|
||||
|
||||
extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr,
|
||||
int __kind);
|
||||
|
||||
#ifdef __USE_UNIX98
|
||||
extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
|
||||
__const pthread_rwlockattr_t *__attr);
|
||||
|
||||
extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
|
||||
|
||||
extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
|
||||
|
||||
extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock);
|
||||
|
||||
extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock);
|
||||
|
||||
extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
|
||||
|
||||
extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
|
||||
#endif
|
||||
|
||||
extern int __pthread_key_create (pthread_key_t *__key,
|
||||
void (*__destr_function) (void *));
|
||||
|
||||
extern int __pthread_setspecific (pthread_key_t __key,
|
||||
__const void *__pointer);
|
||||
|
||||
extern void *__pthread_getspecific (pthread_key_t __key);
|
||||
|
||||
extern int __pthread_once (pthread_once_t *__once_control,
|
||||
void (*__init_routine) (void));
|
||||
|
||||
extern int __pthread_atfork (void (*__prepare) (void),
|
||||
void (*__parent) (void),
|
||||
void (*__child) (void));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/* Make the pthread functions weak so that we can elide them from
|
||||
single-threaded processes. */
|
||||
#ifndef __NO_WEAK_PTHREAD_ALIASES
|
||||
# pragma weak __pthread_mutex_init
|
||||
# pragma weak __pthread_mutex_destroy
|
||||
# pragma weak __pthread_mutex_lock
|
||||
# pragma weak __pthread_mutex_trylock
|
||||
# pragma weak __pthread_mutex_unlock
|
||||
# pragma weak __pthread_mutexattr_init
|
||||
# pragma weak __pthread_mutexattr_destroy
|
||||
# pragma weak __pthread_mutexattr_settype
|
||||
# pragma weak __pthread_rwlock_destroy
|
||||
# pragma weak __pthread_rwlock_rdlock
|
||||
# pragma weak __pthread_rwlock_tryrdlock
|
||||
# pragma weak __pthread_rwlock_wrlock
|
||||
# pragma weak __pthread_rwlock_trywrlock
|
||||
# pragma weak __pthread_rwlock_unlock
|
||||
# pragma weak __pthread_key_create
|
||||
# pragma weak __pthread_setspecific
|
||||
# pragma weak __pthread_getspecific
|
||||
# pragma weak __pthread_once
|
||||
# pragma weak __pthread_initialize
|
||||
# pragma weak __pthread_atfork
|
||||
# pragma weak _pthread_cleanup_push_defer
|
||||
# pragma weak _pthread_cleanup_pop_restore
|
||||
# pragma weak _pthread_cleanup_push
|
||||
# pragma weak _pthread_cleanup_pop
|
||||
#endif
|
||||
|
||||
/* We need portable names for some functions. E.g., when they are
|
||||
used as argument to __libc_cleanup_region_start. */
|
||||
#define __libc_mutex_unlock __pthread_mutex_unlock
|
||||
|
||||
#endif /* bits/libc-lock.h */
|
||||
@@ -0,0 +1,63 @@
|
||||
#
|
||||
# /etc/nsswitch.conf
|
||||
#
|
||||
# An example Name Service Switch config file. This file should be
|
||||
# sorted with the most-used services at the beginning.
|
||||
#
|
||||
# The entry '[NOTFOUND=return]' means that the search for an
|
||||
# entry should stop if the search in the previous entry turned
|
||||
# up nothing. Note that if the search failed due to some other reason
|
||||
# (like no NIS server responding) then the search continues with the
|
||||
# next entry.
|
||||
#
|
||||
# Legal entries are:
|
||||
#
|
||||
# nisplus or nis+ Use NIS+ (NIS version 3)
|
||||
# nis or yp Use NIS (NIS version 2), also called YP
|
||||
# dns Use DNS (Domain Name Service)
|
||||
# files Use the local files
|
||||
# db Use the local database (.db) files
|
||||
# compat Use NIS on compat mode
|
||||
# hesiod Use Hesiod for user lookups
|
||||
# [NOTFOUND=return] Stop searching if not found so far
|
||||
#
|
||||
|
||||
# To use db, put the "db" in front of "files" for entries you want to be
|
||||
# looked up first in the databases
|
||||
#
|
||||
# Example:
|
||||
#passwd: db files nisplus nis
|
||||
#shadow: db files nisplus nis
|
||||
#group: db files nisplus nis
|
||||
|
||||
passwd: files
|
||||
shadow: files
|
||||
group: files
|
||||
|
||||
#hosts: db files nisplus nis dns
|
||||
hosts: files dns
|
||||
|
||||
# Example - obey only what nisplus tells us...
|
||||
#services: nisplus [NOTFOUND=return] files
|
||||
#networks: nisplus [NOTFOUND=return] files
|
||||
#protocols: nisplus [NOTFOUND=return] files
|
||||
#rpc: nisplus [NOTFOUND=return] files
|
||||
#ethers: nisplus [NOTFOUND=return] files
|
||||
#netmasks: nisplus [NOTFOUND=return] files
|
||||
|
||||
bootparams: nisplus [NOTFOUND=return] files
|
||||
|
||||
ethers: files
|
||||
netmasks: files
|
||||
networks: files
|
||||
protocols: files
|
||||
rpc: files
|
||||
services: files
|
||||
|
||||
netgroup: nisplus
|
||||
|
||||
publickey: nisplus
|
||||
|
||||
automount: files nisplus
|
||||
aliases: files nisplus
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
/* Emulate power6 mf[tf]gpr and fri[zpmn] instructions.
|
||||
Copyright (C) 2006 Red Hat, Inc.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
It is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern double frip (double), friz (double), frin (double), frim (double);
|
||||
asm (".globl frip, friz, frin, frim\n.hidden frip, friz, frin, frim\n\t"
|
||||
#ifdef __powerpc64__
|
||||
".section \".toc\",\"aw\"\n"
|
||||
"8:" ".tc FD_43300000_0[TC],0x4330000000000000\n"
|
||||
"9:" ".tc FD_3fe00000_0[TC],0x3fe0000000000000\n\t"
|
||||
".previous\n\t"
|
||||
#else
|
||||
".rodata\n\t"
|
||||
".align 2\n"
|
||||
"8:" ".long 0x59800000\n"
|
||||
"9:" ".long 0x3f000000\n\t"
|
||||
".previous\n\t"
|
||||
#endif
|
||||
"# frip == ceil\n"
|
||||
"frip:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"lfs 13,8b-1b@l(9)\n\t"
|
||||
"mtlr 11\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,2\n\t"
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "bge- 6,3f\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n\t"
|
||||
"# friz == trunc\n"
|
||||
"friz:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"lfs 13,8b-1b@l(9)\n\t"
|
||||
"mtlr 11\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,1\n\t"
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "bge- 6,3f\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n\t"
|
||||
"# frin == round\n"
|
||||
"frin:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"addi 9,9,8b-1b@l\n\t"
|
||||
"mtlr 11\n\t"
|
||||
"lfs 13,0(9)\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,1\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 10,9b@toc(2)\n\t"
|
||||
#else
|
||||
"lfs 10,9b-8b(9)\n\t"
|
||||
#endif
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,10\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "fsub 9,1,10\n\t"
|
||||
"bge- 6,3f\n\t"
|
||||
"fsub 1,9,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n\t"
|
||||
"# frim == floor\n"
|
||||
"frim:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"lfs 13,8b-1b@l(9)\n\t"
|
||||
"mtlr 11\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,3\n\t"
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "bge- 6,3f\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n");
|
||||
|
||||
static void
|
||||
catch_sigill (int signal, struct sigcontext *ctx)
|
||||
{
|
||||
unsigned int insn = *(unsigned int *) (ctx->regs->nip);
|
||||
#ifdef __powerpc64__
|
||||
if ((insn & 0xfc1f07ff) == 0x7c0005be) /* mftgpr */
|
||||
{
|
||||
unsigned long *regs = (unsigned long *) ctx->regs;
|
||||
unsigned fpr = (insn >> 11) & 0x1f;
|
||||
unsigned gpr = (insn >> 21) & 0x1f;
|
||||
regs[gpr] = regs[fpr + 0x30];
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
if ((insn & 0xfc1f07ff) == 0x7c0004be) /*mffgpr */
|
||||
{
|
||||
unsigned long *regs = (unsigned long *) ctx->regs;
|
||||
unsigned fpr = (insn >> 21) & 0x1f;
|
||||
unsigned gpr = (insn >> 11) & 0x1f;
|
||||
regs[fpr + 0x30] = regs[gpr];
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if ((insn & 0xfc1f073f) == 0xfc000310) /* fri[pznm] */
|
||||
{
|
||||
#ifdef __powerpc64__
|
||||
double *regs = (double *) (((char *) ctx->regs) + 0x30 * 8);
|
||||
unsigned int *fpscr = (unsigned int *) (((char *) ctx->regs) + 0x50 * 8 + 4);
|
||||
#else
|
||||
double *regs = (double *) (((char *) ctx->regs) + 0x30 * 4);
|
||||
unsigned int *fpscr = (unsigned int *) (((char *) ctx->regs) + 0x30 * 4 + 0x20 * 8 + 4);
|
||||
#endif
|
||||
unsigned dest = (insn >> 21) & 0x1f;
|
||||
unsigned src = (insn >> 11) & 0x1f;
|
||||
switch (insn & 0xc0)
|
||||
{
|
||||
case 0:
|
||||
regs[dest] = frin (regs[src]);
|
||||
break;
|
||||
case 0x40:
|
||||
regs[dest] = friz (regs[src]);
|
||||
break;
|
||||
case 0x80:
|
||||
regs[dest] = frip (regs[src]);
|
||||
break;
|
||||
case 0xc0:
|
||||
regs[dest] = frim (regs[src]);
|
||||
break;
|
||||
}
|
||||
/* Update raised exceptions. */
|
||||
union { unsigned int i[2]; double d; } u;
|
||||
asm volatile ("mffs %0" : "=f" (u.d));
|
||||
u.i[1] &= 0xfffe0000; /* Is this correct? */
|
||||
*fpscr |= u.i[1];
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = SIG_DFL;
|
||||
sigemptyset (&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
sigaction (signal, &sa, NULL);
|
||||
raise (signal);
|
||||
}
|
||||
|
||||
static void
|
||||
__attribute__ ((constructor))
|
||||
install_handler (void)
|
||||
{
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = (void *) catch_sigill;
|
||||
sigemptyset (&sa.sa_mask);
|
||||
sa.sa_flags = SA_RESTART;
|
||||
sigaction (SIGILL, &sa, NULL);
|
||||
}
|
||||
@@ -0,0 +1,589 @@
|
||||
#ifdef __sparc__
|
||||
register void *__thread_self __asm ("g7");
|
||||
#endif
|
||||
#define _GNU_SOURCE 1
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined __i386__
|
||||
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
({ \
|
||||
register unsigned int resultvar; \
|
||||
asm volatile ( \
|
||||
"movl %1, %%eax\n\t" \
|
||||
"int $0x80\n\t" \
|
||||
: "=a" (resultvar) \
|
||||
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \
|
||||
(int) resultvar; })
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((unsigned int) (val) >= 0xfffff001u)
|
||||
# define ASMFMT_0()
|
||||
# define ASMFMT_1(arg1) \
|
||||
, "b" (arg1)
|
||||
# define ASMFMT_2(arg1, arg2) \
|
||||
, "b" (arg1), "c" (arg2)
|
||||
# define ASMFMT_3(arg1, arg2, arg3) \
|
||||
, "b" (arg1), "c" (arg2), "d" (arg3)
|
||||
#elif defined __x86_64__
|
||||
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
|
||||
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
|
||||
({ \
|
||||
unsigned long resultvar; \
|
||||
LOAD_ARGS_##nr (args) \
|
||||
LOAD_REGS_##nr \
|
||||
asm volatile ( \
|
||||
"syscall\n\t" \
|
||||
: "=a" (resultvar) \
|
||||
: "0" (name) ASM_ARGS_##nr : "memory", "cc", "r11", "cx"); \
|
||||
(long) resultvar; })
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((unsigned long) (val) >= -4095L)
|
||||
# define LOAD_ARGS_0()
|
||||
# define LOAD_REGS_0
|
||||
# define ASM_ARGS_0
|
||||
# define LOAD_ARGS_1(a1) \
|
||||
long int __arg1 = (long) (a1); \
|
||||
LOAD_ARGS_0 ()
|
||||
# define LOAD_REGS_1 \
|
||||
register long int _a1 asm ("rdi") = __arg1; \
|
||||
LOAD_REGS_0
|
||||
# define ASM_ARGS_1 ASM_ARGS_0, "r" (_a1)
|
||||
# define LOAD_ARGS_2(a1, a2) \
|
||||
long int __arg2 = (long) (a2); \
|
||||
LOAD_ARGS_1 (a1)
|
||||
# define LOAD_REGS_2 \
|
||||
register long int _a2 asm ("rsi") = __arg2; \
|
||||
LOAD_REGS_1
|
||||
# define ASM_ARGS_2 ASM_ARGS_1, "r" (_a2)
|
||||
# define LOAD_ARGS_3(a1, a2, a3) \
|
||||
long int __arg3 = (long) (a3); \
|
||||
LOAD_ARGS_2 (a1, a2)
|
||||
# define LOAD_REGS_3 \
|
||||
register long int _a3 asm ("rdx") = __arg3; \
|
||||
LOAD_REGS_2
|
||||
# define ASM_ARGS_3 ASM_ARGS_2, "r" (_a3)
|
||||
#elif defined __powerpc__
|
||||
# define INTERNAL_SYSCALL_DECL(err) long int err
|
||||
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
|
||||
({ \
|
||||
register long int r0 __asm__ ("r0"); \
|
||||
register long int r3 __asm__ ("r3"); \
|
||||
register long int r4 __asm__ ("r4"); \
|
||||
register long int r5 __asm__ ("r5"); \
|
||||
register long int r6 __asm__ ("r6"); \
|
||||
register long int r7 __asm__ ("r7"); \
|
||||
register long int r8 __asm__ ("r8"); \
|
||||
LOADARGS_##nr(name, args); \
|
||||
__asm__ __volatile__ \
|
||||
("sc\n\t" \
|
||||
"mfcr %0\n\t" \
|
||||
: "=&r" (r0), \
|
||||
"=&r" (r3), "=&r" (r4), "=&r" (r5), \
|
||||
"=&r" (r6), "=&r" (r7), "=&r" (r8) \
|
||||
: ASM_INPUT_##nr \
|
||||
: "r9", "r10", "r11", "r12", \
|
||||
"cr0", "ctr", "memory"); \
|
||||
err = r0; \
|
||||
(int) r3; \
|
||||
})
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((void) (val), __builtin_expect ((err) & (1 << 28), 0))
|
||||
# define LOADARGS_0(name, dummy) \
|
||||
r0 = name
|
||||
# define LOADARGS_1(name, __arg1) \
|
||||
long int arg1 = (long int) (__arg1); \
|
||||
LOADARGS_0(name, 0); \
|
||||
r3 = arg1
|
||||
# define LOADARGS_2(name, __arg1, __arg2) \
|
||||
long int arg2 = (long int) (__arg2); \
|
||||
LOADARGS_1(name, __arg1); \
|
||||
r4 = arg2
|
||||
# define LOADARGS_3(name, __arg1, __arg2, __arg3) \
|
||||
long int arg3 = (long int) (__arg3); \
|
||||
LOADARGS_2(name, __arg1, __arg2); \
|
||||
r5 = arg3
|
||||
# define ASM_INPUT_0 "0" (r0)
|
||||
# define ASM_INPUT_1 ASM_INPUT_0, "1" (r3)
|
||||
# define ASM_INPUT_2 ASM_INPUT_1, "2" (r4)
|
||||
# define ASM_INPUT_3 ASM_INPUT_2, "3" (r5)
|
||||
#elif defined __ia64__
|
||||
# define DO_INLINE_SYSCALL_NCS(name, nr, args...) \
|
||||
LOAD_ARGS_##nr (args) \
|
||||
register long _r8 asm ("r8"); \
|
||||
register long _r10 asm ("r10"); \
|
||||
register long _r15 asm ("r15") = name; \
|
||||
long _retval; \
|
||||
LOAD_REGS_##nr \
|
||||
__asm __volatile ("break 0x100000;;" \
|
||||
: "=r" (_r8), "=r" (_r10), "=r" (_r15) \
|
||||
ASM_OUTARGS_##nr \
|
||||
: "2" (_r15) ASM_ARGS_##nr \
|
||||
: "memory" ASM_CLOBBERS_##nr); \
|
||||
_retval = _r8;
|
||||
# define INTERNAL_SYSCALL_DECL(err) long int err
|
||||
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
|
||||
({ \
|
||||
DO_INLINE_SYSCALL_NCS (name, nr, args) \
|
||||
err = _r10; \
|
||||
_retval; })
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) (err == -1)
|
||||
# define LOAD_ARGS_0()
|
||||
# define LOAD_REGS_0
|
||||
# define LOAD_ARGS_1(a1) \
|
||||
long _arg1 = (long) (a1); \
|
||||
LOAD_ARGS_0 ()
|
||||
# define LOAD_REGS_1 \
|
||||
register long _out0 asm ("out0") = _arg1; \
|
||||
LOAD_REGS_0
|
||||
# define LOAD_ARGS_2(a1, a2) \
|
||||
long _arg2 = (long) (a2); \
|
||||
LOAD_ARGS_1 (a1)
|
||||
# define LOAD_REGS_2 \
|
||||
register long _out1 asm ("out1") = _arg2; \
|
||||
LOAD_REGS_1
|
||||
# define LOAD_ARGS_3(a1, a2, a3) \
|
||||
long _arg3 = (long) (a3); \
|
||||
LOAD_ARGS_2 (a1, a2)
|
||||
# define LOAD_REGS_3 \
|
||||
register long _out2 asm ("out2") = _arg3; \
|
||||
LOAD_REGS_2
|
||||
# define ASM_OUTARGS_0
|
||||
# define ASM_OUTARGS_1 ASM_OUTARGS_0, "=r" (_out0)
|
||||
# define ASM_OUTARGS_2 ASM_OUTARGS_1, "=r" (_out1)
|
||||
# define ASM_OUTARGS_3 ASM_OUTARGS_2, "=r" (_out2)
|
||||
# define ASM_ARGS_0
|
||||
# define ASM_ARGS_1 ASM_ARGS_0, "3" (_out0)
|
||||
# define ASM_ARGS_2 ASM_ARGS_1, "4" (_out1)
|
||||
# define ASM_ARGS_3 ASM_ARGS_2, "5" (_out2)
|
||||
# define ASM_CLOBBERS_0 ASM_CLOBBERS_1, "out0"
|
||||
# define ASM_CLOBBERS_1 ASM_CLOBBERS_2, "out1"
|
||||
# define ASM_CLOBBERS_2 ASM_CLOBBERS_3, "out2"
|
||||
# define ASM_CLOBBERS_3 ASM_CLOBBERS_4, "out3"
|
||||
# define ASM_CLOBBERS_4 ASM_CLOBBERS_5, "out4"
|
||||
# define ASM_CLOBBERS_5 ASM_CLOBBERS_6, "out5"
|
||||
# define ASM_CLOBBERS_6_COMMON , "out6", "out7", \
|
||||
/* Non-stacked integer registers, minus r8, r10, r15. */ \
|
||||
"r2", "r3", "r9", "r11", "r12", "r13", "r14", "r16", "r17", "r18", \
|
||||
"r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", \
|
||||
"r28", "r29", "r30", "r31", \
|
||||
/* Predicate registers. */ \
|
||||
"p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", \
|
||||
/* Non-rotating fp registers. */ \
|
||||
"f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
|
||||
/* Branch registers. */ \
|
||||
"b6"
|
||||
# define ASM_CLOBBERS_6 ASM_CLOBBERS_6_COMMON , "b7"
|
||||
#elif defined __s390__
|
||||
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
|
||||
# define INTERNAL_SYSCALL_DIRECT(name, err, nr, args...) \
|
||||
({ \
|
||||
DECLARGS_##nr(args) \
|
||||
register long _ret asm("2"); \
|
||||
asm volatile ( \
|
||||
"svc %b1\n\t" \
|
||||
: "=d" (_ret) \
|
||||
: "i" (__NR_##name) ASMFMT_##nr \
|
||||
: "memory" ); \
|
||||
_ret; })
|
||||
# define INTERNAL_SYSCALL_SVC0(name, err, nr, args...) \
|
||||
({ \
|
||||
DECLARGS_##nr(args) \
|
||||
register unsigned long _nr asm("1") = (unsigned long)(__NR_##name); \
|
||||
register long _ret asm("2"); \
|
||||
asm volatile ( \
|
||||
"svc 0\n\t" \
|
||||
: "=d" (_ret) \
|
||||
: "d" (_nr) ASMFMT_##nr \
|
||||
: "memory" ); \
|
||||
_ret; })
|
||||
# define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
(((__NR_##name) < 256) ? \
|
||||
INTERNAL_SYSCALL_DIRECT(name, err, nr, args) : \
|
||||
INTERNAL_SYSCALL_SVC0(name, err,nr, args))
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((unsigned long) (val) >= -4095UL)
|
||||
# define DECLARGS_0()
|
||||
# define DECLARGS_1(arg1) \
|
||||
register unsigned long gpr2 asm ("2") = (unsigned long)(arg1);
|
||||
# define DECLARGS_2(arg1, arg2) \
|
||||
DECLARGS_1(arg1) \
|
||||
register unsigned long gpr3 asm ("3") = (unsigned long)(arg2);
|
||||
# define DECLARGS_3(arg1, arg2, arg3) \
|
||||
DECLARGS_2(arg1, arg2) \
|
||||
register unsigned long gpr4 asm ("4") = (unsigned long)(arg3);
|
||||
# define ASMFMT_0
|
||||
# define ASMFMT_1 , "0" (gpr2)
|
||||
# define ASMFMT_2 , "0" (gpr2), "d" (gpr3)
|
||||
# define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4)
|
||||
#elif defined __sparc__
|
||||
# ifndef __arch64__
|
||||
# define __INTERNAL_SYSCALL_STRING \
|
||||
"ta 0x10;" \
|
||||
"bcs,a 1f;" \
|
||||
" sub %%g0, %%o0, %%o0;" \
|
||||
"1:"
|
||||
# define __SYSCALL_CLOBBERS "g2", "g3", "g4", "g5", "g6", \
|
||||
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
|
||||
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
|
||||
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
|
||||
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
|
||||
"cc", "memory"
|
||||
# else
|
||||
# define __INTERNAL_SYSCALL_STRING \
|
||||
"ta 0x6d;" \
|
||||
"bcs,a,pt %%xcc, 1f;" \
|
||||
" sub %%g0, %%o0, %%o0;" \
|
||||
"1:"
|
||||
# define __SYSCALL_CLOBBERS "g2", "g3", "g4", "g5", "g6", \
|
||||
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
|
||||
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
|
||||
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
|
||||
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
|
||||
"f32", "f34", "f36", "f38", "f40", "f42", "f44", "f46", \
|
||||
"f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62", \
|
||||
"cc", "memory"
|
||||
# endif
|
||||
#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
|
||||
#define INTERNAL_SYSCALL(name, err, nr, args...) \
|
||||
inline_syscall##nr(__INTERNAL_SYSCALL_STRING, __NR_##name, args)
|
||||
#define INTERNAL_SYSCALL_ERROR_P(val, err) \
|
||||
((unsigned long) (val) >= -515L)
|
||||
# define inline_syscall0(string,name,dummy...) \
|
||||
({ \
|
||||
register long __o0 __asm__ ("o0"); \
|
||||
register long __g1 __asm__ ("g1") = name; \
|
||||
__asm __volatile (string : "=r" (__g1), "=r" (__o0) : \
|
||||
"0" (__g1) : \
|
||||
__SYSCALL_CLOBBERS); \
|
||||
__o0; \
|
||||
})
|
||||
# define inline_syscall1(string,name,arg1) \
|
||||
({ \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
register long __g1 __asm__ ("g1") = name; \
|
||||
__asm __volatile (string : "=r" (__g1), "=r" (__o0) : \
|
||||
"0" (__g1), "1" (__o0) : \
|
||||
__SYSCALL_CLOBBERS); \
|
||||
__o0; \
|
||||
})
|
||||
# define inline_syscall2(string,name,arg1,arg2) \
|
||||
({ \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
register long __o1 __asm__ ("o1") = (long)(arg2); \
|
||||
register long __g1 __asm__ ("g1") = name; \
|
||||
__asm __volatile (string : "=r" (__g1), "=r" (__o0) : \
|
||||
"0" (__g1), "1" (__o0), "r" (__o1) : \
|
||||
__SYSCALL_CLOBBERS); \
|
||||
__o0; \
|
||||
})
|
||||
# define inline_syscall3(string,name,arg1,arg2,arg3) \
|
||||
({ \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
register long __o1 __asm__ ("o1") = (long)(arg2); \
|
||||
register long __o2 __asm__ ("o2") = (long)(arg3); \
|
||||
register long __g1 __asm__ ("g1") = name; \
|
||||
__asm __volatile (string : "=r" (__g1), "=r" (__o0) : \
|
||||
"0" (__g1), "1" (__o0), "r" (__o1), \
|
||||
"r" (__o2) : \
|
||||
__SYSCALL_CLOBBERS); \
|
||||
__o0; \
|
||||
})
|
||||
#elif defined __alpha__
|
||||
# define INTERNAL_SYSCALL(name, err_out, nr, args...) \
|
||||
INTERNAL_SYSCALL1(name, err_out, nr, args)
|
||||
# define INTERNAL_SYSCALL1(name, err_out, nr, args...) \
|
||||
INTERNAL_SYSCALL_NCS(__NR_##name, err_out, nr, args)
|
||||
# define INTERNAL_SYSCALL_NCS(name, err_out, nr, args...) \
|
||||
({ \
|
||||
long _sc_ret, _sc_err; \
|
||||
inline_syscall##nr(name, args); \
|
||||
err_out = _sc_err; \
|
||||
_sc_ret; \
|
||||
})
|
||||
# define INTERNAL_SYSCALL_DECL(err) long int err
|
||||
# define INTERNAL_SYSCALL_ERROR_P(val, err) err
|
||||
# define inline_syscall_clobbers \
|
||||
"$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \
|
||||
"$22", "$23", "$24", "$25", "$27", "$28", "memory"
|
||||
# define inline_syscall_r0_asm
|
||||
# define inline_syscall_r0_out_constraint "=v"
|
||||
# define inline_syscall0(name, args...) \
|
||||
{ \
|
||||
register long _sc_0 inline_syscall_r0_asm; \
|
||||
register long _sc_19 __asm__("$19"); \
|
||||
\
|
||||
_sc_0 = name; \
|
||||
__asm__ __volatile__ \
|
||||
("callsys # %0 %1 <= %2" \
|
||||
: inline_syscall_r0_out_constraint (_sc_0), \
|
||||
"=r"(_sc_19) \
|
||||
: "0"(_sc_0) \
|
||||
: inline_syscall_clobbers, \
|
||||
"$16", "$17", "$18", "$20", "$21"); \
|
||||
_sc_ret = _sc_0, _sc_err = _sc_19; \
|
||||
}
|
||||
# define inline_syscall1(name,arg1) \
|
||||
{ \
|
||||
register long _sc_0 inline_syscall_r0_asm; \
|
||||
register long _sc_16 __asm__("$16"); \
|
||||
register long _sc_19 __asm__("$19"); \
|
||||
\
|
||||
_sc_0 = name; \
|
||||
_sc_16 = (long) (arg1); \
|
||||
__asm__ __volatile__ \
|
||||
("callsys # %0 %1 <= %2 %3" \
|
||||
: inline_syscall_r0_out_constraint (_sc_0), \
|
||||
"=r"(_sc_19), "=r"(_sc_16) \
|
||||
: "0"(_sc_0), "2"(_sc_16) \
|
||||
: inline_syscall_clobbers, \
|
||||
"$17", "$18", "$20", "$21"); \
|
||||
_sc_ret = _sc_0, _sc_err = _sc_19; \
|
||||
}
|
||||
# define inline_syscall2(name,arg1,arg2) \
|
||||
{ \
|
||||
register long _sc_0 inline_syscall_r0_asm; \
|
||||
register long _sc_16 __asm__("$16"); \
|
||||
register long _sc_17 __asm__("$17"); \
|
||||
register long _sc_19 __asm__("$19"); \
|
||||
\
|
||||
_sc_0 = name; \
|
||||
_sc_16 = (long) (arg1); \
|
||||
_sc_17 = (long) (arg2); \
|
||||
__asm__ __volatile__ \
|
||||
("callsys # %0 %1 <= %2 %3 %4" \
|
||||
: inline_syscall_r0_out_constraint (_sc_0), \
|
||||
"=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \
|
||||
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \
|
||||
: inline_syscall_clobbers, \
|
||||
"$18", "$20", "$21"); \
|
||||
_sc_ret = _sc_0, _sc_err = _sc_19; \
|
||||
}
|
||||
# define inline_syscall3(name,arg1,arg2,arg3) \
|
||||
{ \
|
||||
register long _sc_0 inline_syscall_r0_asm; \
|
||||
register long _sc_16 __asm__("$16"); \
|
||||
register long _sc_17 __asm__("$17"); \
|
||||
register long _sc_18 __asm__("$18"); \
|
||||
register long _sc_19 __asm__("$19"); \
|
||||
\
|
||||
_sc_0 = name; \
|
||||
_sc_16 = (long) (arg1); \
|
||||
_sc_17 = (long) (arg2); \
|
||||
_sc_18 = (long) (arg3); \
|
||||
__asm__ __volatile__ \
|
||||
("callsys # %0 %1 <= %2 %3 %4 %5" \
|
||||
: inline_syscall_r0_out_constraint (_sc_0), \
|
||||
"=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
|
||||
"=r"(_sc_18) \
|
||||
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
|
||||
"4"(_sc_18) \
|
||||
: inline_syscall_clobbers, "$20", "$21"); \
|
||||
_sc_ret = _sc_0, _sc_err = _sc_19; \
|
||||
}
|
||||
#endif
|
||||
|
||||
char buffer[32768], data[32768];
|
||||
size_t datasize;
|
||||
char zonename[1024];
|
||||
|
||||
ssize_t
|
||||
readall (int fd, void *buf, size_t len)
|
||||
{
|
||||
INTERNAL_SYSCALL_DECL (err);
|
||||
size_t n = len;
|
||||
ssize_t ret;
|
||||
do
|
||||
{
|
||||
ret = INTERNAL_SYSCALL (read, err, 3, fd, buf, n);
|
||||
if (INTERNAL_SYSCALL_ERROR_P (ret, err))
|
||||
{
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
else if (ret == 0)
|
||||
break;
|
||||
buf = (char *) buf + ret;
|
||||
n -= ret;
|
||||
}
|
||||
while (n > 0);
|
||||
return ret < 0 ? ret : (ssize_t) (len - n);
|
||||
}
|
||||
|
||||
ssize_t
|
||||
writeall (int fd, const void *buf, size_t len)
|
||||
{
|
||||
INTERNAL_SYSCALL_DECL (err);
|
||||
size_t n = len;
|
||||
ssize_t ret;
|
||||
do
|
||||
{
|
||||
ret = INTERNAL_SYSCALL (write, err, 3, fd, buf, n);
|
||||
if (INTERNAL_SYSCALL_ERROR_P (ret, err))
|
||||
{
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
else if (ret == 0)
|
||||
break;
|
||||
buf = (const char *) buf + ret;
|
||||
n -= ret;
|
||||
}
|
||||
while (n > 0);
|
||||
return ret < 0 ? ret : (ssize_t) (len - n);
|
||||
}
|
||||
|
||||
void
|
||||
update (const char *filename)
|
||||
{
|
||||
INTERNAL_SYSCALL_DECL (err);
|
||||
long int fd = INTERNAL_SYSCALL (open, err, 2, filename, O_RDONLY);
|
||||
if (INTERNAL_SYSCALL_ERROR_P (fd, err))
|
||||
return;
|
||||
ssize_t ret = readall (fd, buffer, sizeof (buffer));
|
||||
INTERNAL_SYSCALL (close, err, 1, fd);
|
||||
if (ret <= 0 || (size_t) ret == sizeof (buffer))
|
||||
return;
|
||||
/* Don't update the file unnecessarily. */
|
||||
if ((size_t) ret == datasize && memcmp (buffer, data, datasize) == 0)
|
||||
return;
|
||||
size_t len = strlen (filename);
|
||||
char tempfilename[len + sizeof (".tzupdate")];
|
||||
memcpy (tempfilename, filename, len);
|
||||
memcpy (tempfilename + len, ".tzupdate", sizeof (".tzupdate"));
|
||||
|
||||
fd = INTERNAL_SYSCALL (open, err, 3, tempfilename, O_WRONLY | O_CREAT | O_EXCL, 0600);
|
||||
if (INTERNAL_SYSCALL_ERROR_P (fd, err))
|
||||
return;
|
||||
if (writeall (fd, data, datasize) != datasize)
|
||||
{
|
||||
clean_up:
|
||||
INTERNAL_SYSCALL (unlink, err, 1, tempfilename);
|
||||
INTERNAL_SYSCALL (close, err, 1, fd);
|
||||
return;
|
||||
}
|
||||
long int sret;
|
||||
sret = INTERNAL_SYSCALL (fchmod, err, 2, fd, 0644);
|
||||
if (INTERNAL_SYSCALL_ERROR_P (sret, err))
|
||||
goto clean_up;
|
||||
INTERNAL_SYSCALL (close, err, 1, fd);
|
||||
|
||||
sret = INTERNAL_SYSCALL (rename, err, 2, tempfilename, filename);
|
||||
if (INTERNAL_SYSCALL_ERROR_P (sret, err))
|
||||
INTERNAL_SYSCALL (unlink, err, 1, tempfilename);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
INTERNAL_SYSCALL_DECL (err);
|
||||
long int fd = INTERNAL_SYSCALL (open, err, 2, "/etc/sysconfig/clock", O_RDONLY);
|
||||
if (INTERNAL_SYSCALL_ERROR_P (fd, err))
|
||||
return 0;
|
||||
ssize_t ret = readall (fd, buffer, sizeof (buffer) - 1);
|
||||
INTERNAL_SYSCALL (close, err, 1, fd);
|
||||
if (ret <= 0 || (size_t) ret == sizeof (buffer) - 1)
|
||||
return 0;
|
||||
char *p = buffer;
|
||||
while (p != NULL)
|
||||
{
|
||||
while (*p == ' ' || *p == '\t') p++;
|
||||
if (memcmp (p, "ZONE", 4) == 0)
|
||||
{
|
||||
p += 4;
|
||||
while (*p == ' ' || *p == '\t') p++;
|
||||
if (*p == '=')
|
||||
{
|
||||
p++;
|
||||
while (*p == ' ' || *p == '\t') p++;
|
||||
if (*p == '"') p++;
|
||||
char *q = p;
|
||||
while (strchr (" \t\n\"", *p) == NULL) p++;
|
||||
const char path[] = "/usr/share/zoneinfo/";
|
||||
if (p - q >= sizeof (zonename) - sizeof (path))
|
||||
return 0;
|
||||
memcpy (zonename, path, sizeof (path) - 1);
|
||||
memcpy (zonename + sizeof (path) - 1, q, p - q);
|
||||
break;
|
||||
}
|
||||
}
|
||||
p = strchr (p, '\n');
|
||||
if (p) p++;
|
||||
}
|
||||
if (*zonename == '\0')
|
||||
return 0;
|
||||
fd = INTERNAL_SYSCALL (open, err, 2, zonename, O_RDONLY);
|
||||
if (INTERNAL_SYSCALL_ERROR_P (fd, err))
|
||||
return 0;
|
||||
ret = readall (fd, data, sizeof (data));
|
||||
INTERNAL_SYSCALL (close, err, 1, fd);
|
||||
if (ret <= 0 || (size_t) ret == sizeof (data))
|
||||
return 0;
|
||||
datasize = (size_t) ret;
|
||||
update ("/etc/localtime");
|
||||
update ("/var/spool/postfix/etc/localtime");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __libc_multiple_threads __attribute__((nocommon));
|
||||
int __libc_enable_asynccancel (void) { return 0; }
|
||||
void __libc_disable_asynccancel (int x) { }
|
||||
void __libc_csu_init (void) { }
|
||||
void __libc_csu_fini (void) { }
|
||||
pid_t __fork (void) { return -1; }
|
||||
char thr_buf[65536];
|
||||
|
||||
#ifndef __powerpc__
|
||||
int __libc_start_main (int (*main) (int argc, char **argv),
|
||||
int argc, char **argv,
|
||||
void (*init) (void), void (*fini) (void),
|
||||
void (*rtld_fini) (void), void * stack_end)
|
||||
#else
|
||||
struct startup_info
|
||||
{
|
||||
void *sda_base;
|
||||
int (*main) (int, char **, char **, void *);
|
||||
int (*init) (int, char **, char **, void *);
|
||||
void (*fini) (void);
|
||||
};
|
||||
|
||||
int __libc_start_main (int argc, char **argv, char **ev,
|
||||
void *auxvec, void (*rtld_fini) (void),
|
||||
struct startup_info *stinfo,
|
||||
char **stack_on_entry)
|
||||
#endif
|
||||
{
|
||||
#if defined __ia64__ || defined __powerpc64__
|
||||
register void *r13 __asm ("r13") = thr_buf + 32768;
|
||||
__asm ("" : : "r" (r13));
|
||||
#elif defined __sparc__
|
||||
register void *g6 __asm ("g6") = thr_buf + 32768;
|
||||
__thread_self = thr_buf + 32768;
|
||||
__asm ("" : : "r" (g6), "r" (__thread_self));
|
||||
#elif defined __s390__ && !defined __s390x__
|
||||
__asm ("sar %%a0,%0" : : "d" (thr_buf + 32768));
|
||||
#elif defined __s390x__
|
||||
__asm ("sar %%a1,%0; srlg 0,%0,32; sar %%a0,0" : : "d" (thr_buf + 32768) : "0");
|
||||
#elif defined __powerpc__ && !defined __powerpc64__
|
||||
register void *r2 __asm ("r2") = thr_buf + 32768;
|
||||
__asm ("" : : "r" (r2));
|
||||
#endif
|
||||
#ifdef __powerpc__
|
||||
argc = (long)*stack_on_entry;
|
||||
argv = stack_on_entry + 1;
|
||||
#endif
|
||||
long ret = main (argc, argv);
|
||||
INTERNAL_SYSCALL_DECL (err);
|
||||
INTERNAL_SYSCALL (exit, err, 1, ret);
|
||||
return 110;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
+1
-1
@@ -7,7 +7,7 @@ libc {
|
||||
fgetsgent; fgetsgent_r;
|
||||
|
||||
# g*
|
||||
getsgent; getsgent_r; getsgnam; getsgnam_r; getsgent_r; getsgnam_r;
|
||||
getsgent; getsgent_r; getsgnam; getsgnam_r;
|
||||
|
||||
# p*
|
||||
putsgent;
|
||||
|
||||
@@ -26,5 +26,6 @@
|
||||
#define ENDFUNC_NAME endsgent
|
||||
#define DATABASE_NAME gshadow
|
||||
#define BUFLEN 1024
|
||||
#define NO_COMPAT_NEEDED 1
|
||||
|
||||
#include "../nss/getXXent_r.c"
|
||||
|
||||
@@ -26,5 +26,6 @@
|
||||
#define ADD_PARAMS const char *name
|
||||
#define ADD_VARIABLES name
|
||||
#define BUFLEN 1024
|
||||
#define NO_COMPAT_NEEDED 1
|
||||
|
||||
#include "../nss/getXXbyYY_r.c"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
+25202
-25613
File diff suppressed because it is too large
Load Diff
+32
-21
@@ -95,14 +95,26 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined catomic_compare_and_exchange_val_acq \
|
||||
&& defined __arch_c_compare_and_exchange_val_32_acq
|
||||
# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
|
||||
#ifndef catomic_compare_and_exchange_val_acq
|
||||
# ifdef __arch_c_compare_and_exchange_val_32_acq
|
||||
# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
|
||||
__atomic_val_bysize (__arch_c_compare_and_exchange_val,acq, \
|
||||
mem, newval, oldval)
|
||||
#else
|
||||
# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
|
||||
# else
|
||||
# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
|
||||
atomic_compare_and_exchange_val_acq (mem, newval, oldval)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef catomic_compare_and_exchange_val_rel
|
||||
# ifndef atomic_compare_and_exchange_val_rel
|
||||
# define catomic_compare_and_exchange_val_rel(mem, newval, oldval) \
|
||||
catomic_compare_and_exchange_val_acq (mem, newval, oldval)
|
||||
# else
|
||||
# define catomic_compare_and_exchange_val_rel(mem, newval, oldval) \
|
||||
atomic_compare_and_exchange_val_rel (mem, newval, oldval)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -112,12 +124,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef catomic_compare_and_exchange_val_rel
|
||||
# define catomic_compare_and_exchange_val_rel(mem, newval, oldval) \
|
||||
atomic_compare_and_exchange_val_acq (mem, newval, oldval)
|
||||
#endif
|
||||
|
||||
|
||||
/* Atomically store NEWVAL in *MEM if *MEM is equal to OLDVAL.
|
||||
Return zero if *MEM was changed or non-zero if no exchange happened. */
|
||||
#ifndef atomic_compare_and_exchange_bool_acq
|
||||
@@ -125,8 +131,8 @@
|
||||
# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
|
||||
__atomic_bool_bysize (__arch_compare_and_exchange_bool,acq, \
|
||||
mem, newval, oldval)
|
||||
# else
|
||||
# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
|
||||
# else
|
||||
# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
|
||||
({ /* Cannot use __oldval here, because macros later in this file might \
|
||||
call this macro with __oldval argument. */ \
|
||||
__typeof (oldval) __atg3_old = (oldval); \
|
||||
@@ -142,8 +148,8 @@
|
||||
# define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
|
||||
__atomic_bool_bysize (__arch_c_compare_and_exchange_bool,acq, \
|
||||
mem, newval, oldval)
|
||||
# else
|
||||
# define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
|
||||
# else
|
||||
# define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
|
||||
({ /* Cannot use __oldval here, because macros later in this file might \
|
||||
call this macro with __oldval argument. */ \
|
||||
__typeof (oldval) __atg4_old = (oldval); \
|
||||
@@ -154,15 +160,20 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef atomic_compare_and_exchange_bool_rel
|
||||
# define atomic_compare_and_exchange_bool_rel(mem, newval, oldval) \
|
||||
atomic_compare_and_exchange_bool_acq (mem, newval, oldval)
|
||||
#ifndef catomic_compare_and_exchange_bool_rel
|
||||
# ifndef atomic_compare_and_exchange_bool_rel
|
||||
# define catomic_compare_and_exchange_bool_rel(mem, newval, oldval) \
|
||||
catomic_compare_and_exchange_bool_acq (mem, newval, oldval)
|
||||
# else
|
||||
# define catomic_compare_and_exchange_bool_rel(mem, newval, oldval) \
|
||||
atomic_compare_and_exchange_bool_rel (mem, newval, oldval)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef catomic_compare_and_exchange_bool_rel
|
||||
# define catomic_compare_and_exchange_bool_rel(mem, newval, oldval) \
|
||||
catomic_compare_and_exchange_bool_acq (mem, newval, oldval)
|
||||
#ifndef atomic_compare_and_exchange_bool_rel
|
||||
# define atomic_compare_and_exchange_bool_rel(mem, newval, oldval) \
|
||||
atomic_compare_and_exchange_bool_acq (mem, newval, oldval)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#include <stdlib/bits/stdlib-ldbl.h>
|
||||
@@ -0,0 +1 @@
|
||||
#include <wcsmbs/bits/wchar-ldbl.h>
|
||||
+7
-2
@@ -299,8 +299,13 @@
|
||||
#endif
|
||||
|
||||
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
|
||||
&& __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
|
||||
# if _FORTIFY_SOURCE > 1
|
||||
&& defined __OPTIMIZE__ && __OPTIMIZE__ > 0
|
||||
# if !__GNUC_PREREQ (4, 1)
|
||||
# ifdef __GNUC_RH_RELEASE__
|
||||
# warning _FORTIFY_SOURCE supported only with GCC 4.1 and later
|
||||
# endif
|
||||
# define __USE_FORTIFY_LEVEL 0
|
||||
# elif _FORTIFY_SOURCE > 1
|
||||
# define __USE_FORTIFY_LEVEL 2
|
||||
# else
|
||||
# define __USE_FORTIFY_LEVEL 1
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991-1997,2000,2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-1997,2000,2006,2009 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
|
||||
@@ -339,7 +339,7 @@ struct nd_opt_home_agent_info
|
||||
uint8_t nd_opt_home_agent_info_type;
|
||||
uint8_t nd_opt_home_agent_info_len;
|
||||
uint16_t nd_opt_home_agent_info_reserved;
|
||||
int16_t nd_opt_home_agent_info_preference;
|
||||
uint16_t nd_opt_home_agent_info_preference;
|
||||
uint16_t nd_opt_home_agent_info_lifetime;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
@@ -57,8 +57,6 @@ korean ko_KR.eucKR
|
||||
korean.euc ko_KR.eucKR
|
||||
ko_KR ko_KR.eucKR
|
||||
lithuanian lt_LT.ISO-8859-13
|
||||
no_NO nb_NO.ISO-8859-1
|
||||
no_NO.ISO-8859-1 nb_NO.ISO-8859-1
|
||||
norwegian nb_NO.ISO-8859-1
|
||||
nynorsk nn_NO.ISO-8859-1
|
||||
polish pl_PL.ISO-8859-2
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
@@ -1,8 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
|
||||
mpn-copy.mk
|
||||
distinfo
|
||||
@@ -153,6 +153,7 @@ tst-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
bug-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
bug-ftell-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
tst-fgetwc-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
|
||||
generated = tst-fopenloc.mtrace tst-fopenloc.check
|
||||
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008
|
||||
/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008, 2009
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Per Bothner <bothner@cygnus.com>.
|
||||
@@ -319,11 +319,11 @@ _IO_new_file_fopen (fp, filename, mode, is32not64)
|
||||
continue;
|
||||
case 'c':
|
||||
fp->_flags2 |= _IO_FLAGS2_NOTCANCEL;
|
||||
break;
|
||||
continue;
|
||||
#ifdef O_CLOEXEC
|
||||
case 'e':
|
||||
oflags |= O_CLOEXEC;
|
||||
break;
|
||||
continue;
|
||||
#endif
|
||||
default:
|
||||
/* Ignore. */
|
||||
|
||||
@@ -145,10 +145,12 @@ typedef _G_fpos64_t fpos64_t;
|
||||
extern struct _IO_FILE *stdin; /* Standard input stream. */
|
||||
extern struct _IO_FILE *stdout; /* Standard output stream. */
|
||||
extern struct _IO_FILE *stderr; /* Standard error output stream. */
|
||||
#ifdef __STDC__
|
||||
/* C89/C99 say they're macros. Make them happy. */
|
||||
#define stdin stdin
|
||||
#define stdout stdout
|
||||
#define stderr stderr
|
||||
#endif
|
||||
|
||||
__BEGIN_NAMESPACE_STD
|
||||
/* Remove file FILENAME. */
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
if (setlocale (LC_ALL, "de_DE.utf8") == NULL)
|
||||
if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
|
||||
{
|
||||
puts ("setlocale failed");
|
||||
return 1;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
@@ -8,6 +8,7 @@
|
||||
*
|
||||
* !!! The list has to be sorted !!!
|
||||
*/
|
||||
DEFINE_INT_CURR("ADP") /* Andorran Peseta -> EUR */
|
||||
DEFINE_INT_CURR("AED") /* United Arab Emirates Dirham */
|
||||
DEFINE_INT_CURR("AFN") /* Afghanistan Afgani */
|
||||
DEFINE_INT_CURR("ALL") /* Albanian Lek */
|
||||
@@ -15,12 +16,14 @@ DEFINE_INT_CURR("AMD") /* Armenia Dram */
|
||||
DEFINE_INT_CURR("ANG") /* Netherlands Antilles */
|
||||
DEFINE_INT_CURR("AOA") /* Angolan Kwanza */
|
||||
DEFINE_INT_CURR("ARS") /* Argentine Peso */
|
||||
DEFINE_INT_CURR("ATS") /* Austrian Schilling -> EUR */
|
||||
DEFINE_INT_CURR("AUD") /* Australian Dollar */
|
||||
DEFINE_INT_CURR("AWG") /* Aruba Guilder */
|
||||
DEFINE_INT_CURR("AZM") /* Azerbaijan Manat */
|
||||
DEFINE_INT_CURR("BAM") /* Bosnian and Herzegovina Convertible Mark */
|
||||
DEFINE_INT_CURR("BBD") /* Barbados Dollar */
|
||||
DEFINE_INT_CURR("BDT") /* Bangladesh Taka */
|
||||
DEFINE_INT_CURR("BEF") /* Belgian Franc -> EUR */
|
||||
DEFINE_INT_CURR("BGN") /* Bulgarian Lev */
|
||||
DEFINE_INT_CURR("BHD") /* Bahraini Dinar */
|
||||
DEFINE_INT_CURR("BIF") /* Burundi Franc */
|
||||
@@ -44,6 +47,7 @@ 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 -> EUR */
|
||||
DEFINE_INT_CURR("DJF") /* Djibouti Franc */
|
||||
DEFINE_INT_CURR("DKK") /* Danish Krone (Faroe Islands, Greenland) */
|
||||
DEFINE_INT_CURR("DOP") /* Dominican Republic */
|
||||
@@ -51,16 +55,20 @@ DEFINE_INT_CURR("DZD") /* Algerian Dinar */
|
||||
DEFINE_INT_CURR("EEK") /* Estonian Kroon */
|
||||
DEFINE_INT_CURR("EGP") /* Egyptian Pound */
|
||||
DEFINE_INT_CURR("ERN") /* Eritrean Nakfa */
|
||||
DEFINE_INT_CURR("ESP") /* Spanish Peseta -> EUR */
|
||||
DEFINE_INT_CURR("ETB") /* Ethiopian Birr */
|
||||
DEFINE_INT_CURR("EUR") /* European Union Euro */
|
||||
DEFINE_INT_CURR("FIM") /* Finnish Markka -> EUR */
|
||||
DEFINE_INT_CURR("FJD") /* Fiji Dollar */
|
||||
DEFINE_INT_CURR("FKP") /* Falkland Islands Pound (Malvinas) */
|
||||
DEFINE_INT_CURR("FRF") /* French Franc -> EUR */
|
||||
DEFINE_INT_CURR("GBP") /* British Pound */
|
||||
DEFINE_INT_CURR("GEL") /* Georgia Lari */
|
||||
DEFINE_INT_CURR("GHC") /* Ghana Cedi */
|
||||
DEFINE_INT_CURR("GIP") /* Gibraltar Pound */
|
||||
DEFINE_INT_CURR("GMD") /* Gambian Dalasi */
|
||||
DEFINE_INT_CURR("GNF") /* Guinea Franc */
|
||||
DEFINE_INT_CURR("GRD") /* Greek Drachma -> EUR */
|
||||
DEFINE_INT_CURR("GTQ") /* Guatemala Quetzal */
|
||||
DEFINE_INT_CURR("GYD") /* Guyana Dollar */
|
||||
DEFINE_INT_CURR("HKD") /* Hong Kong Dollar */
|
||||
@@ -69,12 +77,14 @@ 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 Pound -> EUR */
|
||||
DEFINE_INT_CURR("ILS") /* Israeli Shekel */
|
||||
DEFINE_INT_CURR("IMP") /* Isle of Man Pounds */
|
||||
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 -> EUR */
|
||||
DEFINE_INT_CURR("JEP") /* Jersey Pound */
|
||||
DEFINE_INT_CURR("JMD") /* Jamaican Dollar */
|
||||
DEFINE_INT_CURR("JOD") /* Jordanian Dinar */
|
||||
@@ -94,6 +104,7 @@ DEFINE_INT_CURR("LKR") /* Sri Lankan Rupee */
|
||||
DEFINE_INT_CURR("LRD") /* Liberian Dollar */
|
||||
DEFINE_INT_CURR("LSL") /* Lesotho Maloti */
|
||||
DEFINE_INT_CURR("LTL") /* Lithuanian Litas */
|
||||
DEFINE_INT_CURR("LUF") /* Luxembourg Franc -> EUR */
|
||||
DEFINE_INT_CURR("LVL") /* Latvia Lat */
|
||||
DEFINE_INT_CURR("LYD") /* Libyan Arab Jamahiriya Dinar */
|
||||
DEFINE_INT_CURR("MAD") /* Moroccan Dirham */
|
||||
@@ -114,6 +125,7 @@ DEFINE_INT_CURR("MZM") /* Mozambique Metical */
|
||||
DEFINE_INT_CURR("NAD") /* Namibia Dollar */
|
||||
DEFINE_INT_CURR("NGN") /* Nigeria Naira */
|
||||
DEFINE_INT_CURR("NIO") /* Nicaragua Cordoba Oro */
|
||||
DEFINE_INT_CURR("NLG") /* Netherlands Guilder -> EUR */
|
||||
DEFINE_INT_CURR("NOK") /* Norwegian Krone */
|
||||
DEFINE_INT_CURR("NPR") /* Nepalese Rupee */
|
||||
DEFINE_INT_CURR("NZD") /* New Zealand Dollar */
|
||||
@@ -124,6 +136,7 @@ DEFINE_INT_CURR("PGK") /* Papau New Guinea Kina */
|
||||
DEFINE_INT_CURR("PHP") /* Philippines Peso */
|
||||
DEFINE_INT_CURR("PKR") /* Pakistan Rupee */
|
||||
DEFINE_INT_CURR("PLN") /* Polish Zloty */
|
||||
DEFINE_INT_CURR("PTE") /* Portugese Escudo -> EUR */
|
||||
DEFINE_INT_CURR("PYG") /* Paraguay Guarani */
|
||||
DEFINE_INT_CURR("QAR") /* Qatar Rial */
|
||||
DEFINE_INT_CURR("ROL") /* Romanian Leu */
|
||||
|
||||
@@ -241,9 +241,9 @@ oldlocrecentcmp (const void *a, const void *b)
|
||||
/* forward decls for below */
|
||||
static uint32_t add_locale (struct locarhandle *ah, const char *name,
|
||||
locale_data_t data, bool replace);
|
||||
static void add_alias (struct locarhandle *ah, const char *alias,
|
||||
bool replace, const char *oldname,
|
||||
uint32_t *locrec_offset_p);
|
||||
void add_alias (struct locarhandle *ah, const char *alias,
|
||||
bool replace, const char *oldname,
|
||||
uint32_t *locrec_offset_p);
|
||||
|
||||
|
||||
static bool
|
||||
@@ -649,7 +649,7 @@ close_archive (struct locarhandle *ah)
|
||||
#include "../../intl/explodename.c"
|
||||
#include "../../intl/l10nflist.c"
|
||||
|
||||
static struct namehashent *
|
||||
struct namehashent *
|
||||
insert_name (struct locarhandle *ah,
|
||||
const char *name, size_t name_len, bool replace)
|
||||
{
|
||||
@@ -707,7 +707,7 @@ insert_name (struct locarhandle *ah,
|
||||
return &namehashtab[idx];
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
add_alias (struct locarhandle *ah, const char *alias, bool replace,
|
||||
const char *oldname, uint32_t *locrec_offset_p)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2009-06-16 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #10011]
|
||||
* locales/de_AT: Define week, first_weekday, first_workday.
|
||||
Patch by Paul Marcher <flyer@gmail.com>.
|
||||
|
||||
2009-05-04 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* localedata/locales/bn_BD: Remove comment about missing collation
|
||||
|
||||
@@ -225,6 +225,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-locales-dir
|
||||
echo -n '...'; \
|
||||
input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
|
||||
$(LOCALEDEF) --alias-file=../intl/locale.alias \
|
||||
--no-archive \
|
||||
-i locales/$$input -c -f charmaps/$$charset \
|
||||
$(addprefix --prefix=,$(install_root)) $$locale; \
|
||||
echo ' done'; \
|
||||
|
||||
@@ -84,6 +84,7 @@ cy_GB.UTF-8/UTF-8 \
|
||||
cy_GB/ISO-8859-14 \
|
||||
da_DK.UTF-8/UTF-8 \
|
||||
da_DK/ISO-8859-1 \
|
||||
da_DK.ISO-8859-15/ISO-8859-15 \
|
||||
de_AT.UTF-8/UTF-8 \
|
||||
de_AT/ISO-8859-1 \
|
||||
de_AT@euro/ISO-8859-15 \
|
||||
@@ -114,6 +115,7 @@ en_DK.UTF-8/UTF-8 \
|
||||
en_DK/ISO-8859-1 \
|
||||
en_GB.UTF-8/UTF-8 \
|
||||
en_GB/ISO-8859-1 \
|
||||
en_GB.ISO-8859-15/ISO-8859-15 \
|
||||
en_HK.UTF-8/UTF-8 \
|
||||
en_HK/ISO-8859-1 \
|
||||
en_IE.UTF-8/UTF-8 \
|
||||
@@ -129,6 +131,7 @@ en_SG.UTF-8/UTF-8 \
|
||||
en_SG/ISO-8859-1 \
|
||||
en_US.UTF-8/UTF-8 \
|
||||
en_US/ISO-8859-1 \
|
||||
en_US.ISO-8859-15/ISO-8859-15 \
|
||||
en_ZA.UTF-8/UTF-8 \
|
||||
en_ZA/ISO-8859-1 \
|
||||
en_ZW.UTF-8/UTF-8 \
|
||||
@@ -303,6 +306,8 @@ nl_NL/ISO-8859-1 \
|
||||
nl_NL@euro/ISO-8859-15 \
|
||||
nn_NO.UTF-8/UTF-8 \
|
||||
nn_NO/ISO-8859-1 \
|
||||
no_NO.UTF-8/UTF-8 \
|
||||
no_NO/ISO-8859-1 \
|
||||
nr_ZA/UTF-8 \
|
||||
nso_ZA/UTF-8 \
|
||||
oc_FR.UTF-8/UTF-8 \
|
||||
@@ -361,6 +366,7 @@ sv_FI/ISO-8859-1 \
|
||||
sv_FI@euro/ISO-8859-15 \
|
||||
sv_SE.UTF-8/UTF-8 \
|
||||
sv_SE/ISO-8859-1 \
|
||||
sv_SE.ISO-8859-15/ISO-8859-15 \
|
||||
ta_IN/UTF-8 \
|
||||
te_IN/UTF-8 \
|
||||
tg_TJ.UTF-8/UTF-8 \
|
||||
|
||||
+56310
-54721
File diff suppressed because it is too large
Load Diff
@@ -248,8 +248,11 @@ mon "<U0049><U006F><U006E><U0061><U0077><U0072>";/
|
||||
d_t_fmt "<U0044><U0079><U0064><U0064><U0020><U0025><U0041><U0020><U0025><U0064><U0020><U006d><U0069><U0073><U0020><U0025><U0042><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
|
||||
d_fmt "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0079>"
|
||||
t_fmt "<U0025><U0054>"
|
||||
am_pm "";""
|
||||
t_fmt_ampm ""
|
||||
am_pm "<U0041><U004D>";"<U0050><U004D>"
|
||||
t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
|
||||
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
|
||||
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
|
||||
<U0025><U005A><U0020><U0025><U0059>"
|
||||
END LC_TIME
|
||||
|
||||
LC_MESSAGES
|
||||
|
||||
@@ -121,6 +121,9 @@ t_fmt_ampm ""
|
||||
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
|
||||
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
|
||||
<U0025><U005A><U0020><U0025><U0059>"
|
||||
week 7;19971130;4
|
||||
first_weekday 2
|
||||
first_workday 2
|
||||
END LC_TIME
|
||||
|
||||
LC_PAPER
|
||||
|
||||
@@ -116,8 +116,8 @@ mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
|
||||
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
|
||||
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
|
||||
t_fmt "<U0025><U0054>"
|
||||
am_pm "";""
|
||||
t_fmt_ampm ""
|
||||
am_pm "<U0041><U004D>";"<U0050><U004D>"
|
||||
t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
|
||||
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
|
||||
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
|
||||
<U0025><U005A><U0020><U0025><U0059>"
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
escape_char /
|
||||
comment_char %
|
||||
|
||||
% Norwegian language locale for Norway
|
||||
% Source: Norsk Standardiseringsforbund
|
||||
% Address: University Library,
|
||||
% Drammensveien 41, N-9242 Oslo, Norge
|
||||
% Contact: Kolbjoern Aamboe
|
||||
% Tel: +47 - 22859109
|
||||
% Fax: +47 - 22434497
|
||||
% Email: kolbjorn.aambo@usit.uio.no
|
||||
% Language: no
|
||||
% Territory: NO
|
||||
% Revision: 4.3
|
||||
% Date: 1996-10-15
|
||||
% Application: general
|
||||
% Users: general
|
||||
% Repertoiremap: mnemonic.ds
|
||||
% Charset: ISO-8859-1
|
||||
% Distribution and use is free, also
|
||||
% for commercial purposes.
|
||||
|
||||
LC_IDENTIFICATION
|
||||
copy "nb_NO"
|
||||
END LC_IDENTIFICATION
|
||||
|
||||
LC_COLLATE
|
||||
copy "nb_NO"
|
||||
END LC_COLLATE
|
||||
|
||||
LC_CTYPE
|
||||
copy "nb_NO"
|
||||
END LC_CTYPE
|
||||
|
||||
LC_MONETARY
|
||||
copy "nb_NO"
|
||||
END LC_MONETARY
|
||||
|
||||
LC_NUMERIC
|
||||
copy "nb_NO"
|
||||
END LC_NUMERIC
|
||||
|
||||
LC_TIME
|
||||
copy "nb_NO"
|
||||
END LC_TIME
|
||||
|
||||
LC_MESSAGES
|
||||
copy "nb_NO"
|
||||
END LC_MESSAGES
|
||||
|
||||
LC_PAPER
|
||||
copy "nb_NO"
|
||||
END LC_PAPER
|
||||
|
||||
LC_TELEPHONE
|
||||
copy "nb_NO"
|
||||
END LC_TELEPHONE
|
||||
|
||||
LC_MEASUREMENT
|
||||
copy "nb_NO"
|
||||
END LC_MEASUREMENT
|
||||
|
||||
LC_NAME
|
||||
copy "nb_NO"
|
||||
END LC_NAME
|
||||
|
||||
LC_ADDRESS
|
||||
copy "nb_NO"
|
||||
END LC_ADDRESS
|
||||
@@ -1,7 +1,7 @@
|
||||
comment_char %
|
||||
escape_char /
|
||||
%
|
||||
% Chinese language locale for Taiwan R.O.C.
|
||||
% Chinese language locale for Taiwan
|
||||
% charmap: BIG5-CP950
|
||||
%
|
||||
% Original Author:
|
||||
@@ -17,7 +17,7 @@ escape_char /
|
||||
% Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
|
||||
|
||||
LC_IDENTIFICATION
|
||||
title "Chinese locale for Taiwan R.O.C."
|
||||
title "Chinese locale for Taiwan"
|
||||
source ""
|
||||
address ""
|
||||
contact ""
|
||||
@@ -25,7 +25,7 @@ email "bug-glibc-locales@gnu.org"
|
||||
tel ""
|
||||
fax ""
|
||||
language "Chinese"
|
||||
territory "Taiwan R.O.C."
|
||||
territory "Taiwan"
|
||||
revision "0.2"
|
||||
date "2000-08-02"
|
||||
%
|
||||
|
||||
+19
-1
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1996-1998,2000-2002,2003,2007 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-1998,2000-2003,2007, 2009 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
|
||||
@@ -54,6 +54,24 @@ otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
|
||||
$(resolvobjdir)/libresolv.a $(common-objpfx)libc.a
|
||||
endif
|
||||
|
||||
ifeq (yesyes,$(have-fpie)$(build-shared))
|
||||
pt_chown-cflags += $(pie-ccflag)
|
||||
endif
|
||||
ifeq (yes,$(have-ssp))
|
||||
pt_chown-cflags += -fstack-protector
|
||||
endif
|
||||
ifeq (yes,$(have-libcap))
|
||||
libcap = -lcap
|
||||
endif
|
||||
CFLAGS-pt_chown.c = $(pt_chown-cflags)
|
||||
LDLIBS-pt_chown = $(libcap)
|
||||
ifeq (yesyes,$(have-fpie)$(build-shared))
|
||||
LDFLAGS-pt_chown = -Wl,-z,now
|
||||
|
||||
$(objpfx)pt_chown: $(objpfx)pt_chown.o
|
||||
$(+link-pie)
|
||||
endif
|
||||
|
||||
# pt_chown needs to be setuid root.
|
||||
$(inst_libexecdir)/pt_chown: $(objpfx)pt_chown $(+force)
|
||||
$(make-target-directory)
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_LIBCAP
|
||||
# include <sys/capability.h>
|
||||
# include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
#include "pty-private.h"
|
||||
|
||||
@@ -99,7 +103,7 @@ static int
|
||||
do_pt_chown (void)
|
||||
{
|
||||
char *pty;
|
||||
struct stat st;
|
||||
struct stat64 st;
|
||||
struct group *p;
|
||||
gid_t gid;
|
||||
|
||||
@@ -110,7 +114,7 @@ do_pt_chown (void)
|
||||
|
||||
/* Check that the returned slave pseudo terminal is a
|
||||
character device. */
|
||||
if (stat (pty, &st) < 0 || !S_ISCHR(st.st_mode))
|
||||
if (stat64 (pty, &st) < 0 || !S_ISCHR (st.st_mode))
|
||||
return FAIL_EINVAL;
|
||||
|
||||
/* Get the group ID of the special `tty' group. */
|
||||
@@ -135,16 +139,43 @@ int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
uid_t euid = geteuid ();
|
||||
uid_t uid = getuid ();
|
||||
int remaining;
|
||||
|
||||
/* Normal invocation of this program is with no arguments and
|
||||
with privileges.
|
||||
FIXME: Should use capable (CAP_CHOWN|CAP_FOWNER). */
|
||||
if (argc == 1 && euid == 0)
|
||||
return do_pt_chown ();
|
||||
{
|
||||
#ifdef HAVE_LIBCAP
|
||||
/* Drop privileges. */
|
||||
if (uid != euid)
|
||||
{
|
||||
static const cap_value_t cap_list[] =
|
||||
{ CAP_CHOWN, CAP_FOWNER };
|
||||
# define ncap_list (sizeof (cap_list) / sizeof (cap_list[0]))
|
||||
cap_t caps = cap_init ();
|
||||
if (caps == NULL)
|
||||
error (FAIL_ENOMEM, errno,
|
||||
_("Failed to initialize drop of capabilities"));
|
||||
|
||||
/* There is no reason why these should not work. */
|
||||
cap_set_flag (caps, CAP_PERMITTED, ncap_list, cap_list, CAP_SET);
|
||||
cap_set_flag (caps, CAP_EFFECTIVE, ncap_list, cap_list, CAP_SET);
|
||||
|
||||
int res = cap_set_proc (caps);
|
||||
|
||||
cap_free (caps);
|
||||
|
||||
if (__builtin_expect (res != 0, 0))
|
||||
error (FAIL_EXEC, errno, _("cap_set_proc failed"));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Normal invocation of this program is with no arguments and
|
||||
with privileges. */
|
||||
return do_pt_chown ();
|
||||
}
|
||||
|
||||
/* We aren't going to be using privileges, so drop them right now. */
|
||||
setuid (getuid ());
|
||||
setuid (uid);
|
||||
|
||||
/* Set locale via LC_ALL. */
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
+24
-3
@@ -4779,8 +4779,29 @@ _int_free(mstate av, mchunkptr p)
|
||||
|| __builtin_expect (chunksize (chunk_at_offset (p, size))
|
||||
>= av->system_mem, 0))
|
||||
{
|
||||
errstr = "free(): invalid next size (fast)";
|
||||
goto errout;
|
||||
#ifdef ATOMIC_FASTBINS
|
||||
/* We might not have a lock at this point and concurrent modifications
|
||||
of system_mem might have let to a false positive. Redo the test
|
||||
after getting the lock. */
|
||||
if (have_lock
|
||||
|| ({ assert (locked == 0);
|
||||
mutex_lock(&av->mutex);
|
||||
locked = 1;
|
||||
chunk_at_offset (p, size)->size <= 2 * SIZE_SZ
|
||||
|| chunksize (chunk_at_offset (p, size)) >= av->system_mem;
|
||||
}))
|
||||
#endif
|
||||
{
|
||||
errstr = "free(): invalid next size (fast)";
|
||||
goto errout;
|
||||
}
|
||||
#ifdef ATOMIC_FASTBINS
|
||||
if (! have_lock)
|
||||
{
|
||||
(void)mutex_unlock(&av->mutex);
|
||||
locked = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (__builtin_expect (perturb_byte, 0))
|
||||
@@ -4803,7 +4824,7 @@ _int_free(mstate av, mchunkptr p)
|
||||
}
|
||||
p->fd = fd = old;
|
||||
}
|
||||
while ((old = catomic_compare_and_exchange_val_acq (fb, p, fd)) != fd);
|
||||
while ((old = catomic_compare_and_exchange_val_rel (fb, p, fd)) != fd);
|
||||
#else
|
||||
/* Another simple check: make sure the top of the bin is not the
|
||||
record we are going to add (i.e., double free). */
|
||||
|
||||
+23
-7
@@ -24,9 +24,25 @@
|
||||
# include <mcheck.h>
|
||||
# include <stdint.h>
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <libintl.h>
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
extern __typeof (malloc) __libc_malloc;
|
||||
extern __typeof (free) __libc_free;
|
||||
extern __typeof (realloc) __libc_realloc;
|
||||
libc_hidden_proto (__libc_malloc)
|
||||
libc_hidden_proto (__libc_realloc)
|
||||
libc_hidden_proto (__libc_free)
|
||||
libc_hidden_proto (__libc_memalign)
|
||||
#else
|
||||
# define __libc_malloc(sz) malloc (sz)
|
||||
# define __libc_free(ptr) free (ptr)
|
||||
# define __libc_realloc(ptr, sz) realloc (ptr, sz)
|
||||
# define __libc_memalign(al, sz) memalign (al, sz)
|
||||
#endif
|
||||
|
||||
/* Old hook values. */
|
||||
static void (*old_free_hook) (__ptr_t ptr, __const __ptr_t);
|
||||
static __ptr_t (*old_malloc_hook) (__malloc_size_t size, const __ptr_t);
|
||||
@@ -197,7 +213,7 @@ freehook (__ptr_t ptr, const __ptr_t caller)
|
||||
if (old_free_hook != NULL)
|
||||
(*old_free_hook) (ptr, caller);
|
||||
else
|
||||
free (ptr);
|
||||
__libc_free (ptr);
|
||||
__free_hook = freehook;
|
||||
}
|
||||
|
||||
@@ -214,7 +230,7 @@ mallochook (__malloc_size_t size, const __ptr_t caller)
|
||||
hdr = (struct hdr *) (*old_malloc_hook) (sizeof (struct hdr) + size + 1,
|
||||
caller);
|
||||
else
|
||||
hdr = (struct hdr *) malloc (sizeof (struct hdr) + size + 1);
|
||||
hdr = (struct hdr *) __libc_malloc (sizeof (struct hdr) + size + 1);
|
||||
__malloc_hook = mallochook;
|
||||
if (hdr == NULL)
|
||||
return NULL;
|
||||
@@ -245,7 +261,7 @@ memalignhook (__malloc_size_t alignment, __malloc_size_t size,
|
||||
if (old_memalign_hook != NULL)
|
||||
block = (*old_memalign_hook) (alignment, slop + size + 1, caller);
|
||||
else
|
||||
block = memalign (alignment, slop + size + 1);
|
||||
block = __libc_memalign (alignment, slop + size + 1);
|
||||
__memalign_hook = memalignhook;
|
||||
if (block == NULL)
|
||||
return NULL;
|
||||
@@ -300,8 +316,8 @@ reallochook (__ptr_t ptr, __malloc_size_t size, const __ptr_t caller)
|
||||
sizeof (struct hdr) + size + 1,
|
||||
caller);
|
||||
else
|
||||
hdr = (struct hdr *) realloc ((__ptr_t) hdr,
|
||||
sizeof (struct hdr) + size + 1);
|
||||
hdr = (struct hdr *) __libc_realloc ((__ptr_t) hdr,
|
||||
sizeof (struct hdr) + size + 1);
|
||||
__free_hook = freehook;
|
||||
__malloc_hook = mallochook;
|
||||
__memalign_hook = memalignhook;
|
||||
@@ -361,8 +377,8 @@ mcheck (func)
|
||||
if (__malloc_initialized <= 0 && !mcheck_used)
|
||||
{
|
||||
/* We call malloc() once here to ensure it is initialized. */
|
||||
void *p = malloc (0);
|
||||
free (p);
|
||||
void *p = __libc_malloc (0);
|
||||
__libc_free (p);
|
||||
|
||||
old_free_hook = __free_hook;
|
||||
__free_hook = freehook;
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz *.bz2
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
|
||||
*.dvi* *.info* *.c.texi *.ps *.pdf
|
||||
*.toc *.aux *.log *.tmp
|
||||
*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
|
||||
|
||||
texis top-menu.texi chapters.texi summary.texi stamp-*
|
||||
distinfo dir-add.texinfo dir-add.texi
|
||||
|
||||
libm-err.texi
|
||||
@@ -0,0 +1,29 @@
|
||||
*.aux
|
||||
*.c.texi
|
||||
*.cp
|
||||
*.cps
|
||||
*.dvi*
|
||||
*.fn
|
||||
*.fns
|
||||
*.info*
|
||||
*.ky
|
||||
*.kys
|
||||
*.log
|
||||
*.pdf
|
||||
*.pg
|
||||
*.pgs
|
||||
*.ps
|
||||
*.tmp
|
||||
*.toc
|
||||
*.tp
|
||||
*.tps
|
||||
*.vr
|
||||
*.vrs
|
||||
chapters.texi
|
||||
dir-add.texi
|
||||
dir-add.texinfo
|
||||
libm-err.texi
|
||||
stamp-*
|
||||
summary.texi
|
||||
texis
|
||||
top-menu.texi
|
||||
+1
-1
@@ -1234,7 +1234,7 @@ file_mbsrtowcs (int input, int output)
|
||||
/* @r{If any characters must be carried forward,}
|
||||
@r{put them at the beginning of @code{buffer}.} */
|
||||
if (filled > 0)
|
||||
memmove (inp, buffer, filled);
|
||||
memmove (buffer, inp, filled);
|
||||
@}
|
||||
|
||||
return 1;
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
@c setchapternewpage odd
|
||||
|
||||
@comment Tell install-info what to do.
|
||||
@dircategory Software libraries
|
||||
@dircategory Libraries
|
||||
@direntry
|
||||
* Libc: (libc). C library.
|
||||
@end direntry
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
+16
-4
@@ -132,7 +132,10 @@
|
||||
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
|
||||
#define __bos0(ptr) __builtin_object_size (ptr, 0)
|
||||
|
||||
#if __GNUC_PREREQ (4,3)
|
||||
#if __GNUC_PREREQ (4,3) \
|
||||
|| (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
|
||||
&& __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
|
||||
&& __GNUC_RH_RELEASE__ >= 31)
|
||||
# define __warndecl(name, msg) \
|
||||
extern void name (void) __attribute__((__warning__ (msg)))
|
||||
# define __warnattr(msg) __attribute__((__warning__ (msg)))
|
||||
@@ -291,10 +294,16 @@
|
||||
|
||||
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
|
||||
inline semantics, unless -fgnu89-inline is used. */
|
||||
#if !defined __cplusplus || __GNUC_PREREQ (4,3)
|
||||
#if !defined __cplusplus || __GNUC_PREREQ (4,3) \
|
||||
|| (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
|
||||
&& __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
|
||||
&& __GNUC_RH_RELEASE__ >= 31)
|
||||
# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
|
||||
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
|
||||
# if __GNUC_PREREQ (4,3)
|
||||
# if __GNUC_PREREQ (4,3) \
|
||||
|| (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
|
||||
&& __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
|
||||
&& __GNUC_RH_RELEASE__ >= 31)
|
||||
# define __extern_always_inline \
|
||||
extern __always_inline __attribute__ ((__gnu_inline__, __artificial__))
|
||||
# else
|
||||
@@ -314,7 +323,10 @@
|
||||
|
||||
/* GCC 4.3 and above allow passing all anonymous arguments of an
|
||||
__extern_always_inline function to some other vararg function. */
|
||||
#if __GNUC_PREREQ (4,3)
|
||||
#if __GNUC_PREREQ (4,3) \
|
||||
|| (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
|
||||
&& __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
|
||||
&& __GNUC_RH_RELEASE__ >= 31)
|
||||
# define __va_arg_pack() __builtin_va_arg_pack ()
|
||||
# define __va_arg_pack_len() __builtin_va_arg_pack_len ()
|
||||
#endif
|
||||
|
||||
@@ -25,4 +25,4 @@
|
||||
# memory with every getXXent() call. Otherwise each getXXent() call
|
||||
# might result into a network communication with the server to get
|
||||
# the next entry.
|
||||
#SETENT_BATCH_READ=TRUE
|
||||
SETENT_BATCH_READ=TRUE
|
||||
|
||||
@@ -241,7 +241,7 @@ _nss_nis_getnetbyaddr_r (uint32_t addr, int type, struct netent *net,
|
||||
if (__builtin_expect (yp_get_default_domain (&domain), 0))
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
|
||||
struct in_addr in = inet_makeaddr (addr, 0);
|
||||
struct in_addr in = { .s_addr = htonl (addr) };
|
||||
char *buf = inet_ntoa (in);
|
||||
size_t blen = strlen (buf);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996-1998,2001,2002,2003,2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996-1998,2001-2003,2006,2009 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
|
||||
|
||||
@@ -116,7 +116,7 @@ internal_nis_endpwent (void)
|
||||
oldkeylen = 0;
|
||||
}
|
||||
|
||||
struct response_t *curr = intern.next;
|
||||
struct response_t *curr = intern.start;
|
||||
|
||||
while (curr != NULL)
|
||||
{
|
||||
|
||||
@@ -433,7 +433,7 @@ _nss_nisplus_getnetbyaddr_r (uint32_t addr, const int type,
|
||||
char buf2[18];
|
||||
int olderr = errno;
|
||||
|
||||
struct in_addr in = inet_makeaddr (addr, 0);
|
||||
struct in_addr in = { .s_addr = htonl (addr) };
|
||||
strcpy (buf2, inet_ntoa (in));
|
||||
size_t b2len = strlen (buf2);
|
||||
|
||||
|
||||
@@ -1,3 +1,29 @@
|
||||
2009-07-27 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #10418]
|
||||
* pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
|
||||
instead of of _acq variants of cmpxchg.
|
||||
|
||||
2009-06-11 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #10262]
|
||||
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
|
||||
(LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
|
||||
cannot be assumed.
|
||||
Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
|
||||
|
||||
2009-05-15 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* cancellation.c (__pthread_disable_asynccancel): Correct the bits
|
||||
to test when deciding on the delay.
|
||||
* libc-cancellation.c (__libc_disable_asynccancel): Likewise.
|
||||
* pthread_cancel.c: Close race between deciding on sending a signal
|
||||
and setting the CANCELING_BIT bit.
|
||||
|
||||
* cancellation.c (__pthread_disable_asynccancel): Don't return if
|
||||
thread is canceled.
|
||||
* libc-cancellation.c (__libc_disable_asynccancel): Likewise.
|
||||
|
||||
2009-04-27 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
|
||||
@@ -3482,6 +3508,15 @@
|
||||
Use __sigfillset. Document that sigfillset does the right thing wrt
|
||||
to SIGSETXID.
|
||||
|
||||
2005-08-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* tst-stackguard1.c (do_test): Likewise.
|
||||
|
||||
2005-07-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* tst-stackguard1.c (do_test): Don't fail if the poor man's
|
||||
randomization doesn't work well enough.
|
||||
|
||||
2005-07-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
[BZ #1102]
|
||||
@@ -4218,6 +4253,11 @@
|
||||
Move definition inside libpthread, libc, librt check. Provide
|
||||
definition for rtld.
|
||||
|
||||
2004-09-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* pthread_cond_destroy.c (__pthread_cond_destroy): If there are
|
||||
waiters, awake all waiters on the associated mutex.
|
||||
|
||||
2004-09-02 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
|
||||
@@ -6292,6 +6332,11 @@
|
||||
|
||||
* Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
|
||||
|
||||
2003-07-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
|
||||
if __need_struct_pthread_size, instead define lll_lock_t.
|
||||
|
||||
2003-07-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* tst-cancel17.c (do_test): Check if aio_cancel failed.
|
||||
|
||||
+8
-3
@@ -339,7 +339,8 @@ endif
|
||||
extra-objs += $(crti-objs) $(crtn-objs)
|
||||
omit-deps += crti crtn
|
||||
|
||||
CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
|
||||
CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
|
||||
-fno-asynchronous-unwind-tables
|
||||
endif
|
||||
|
||||
CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
|
||||
@@ -523,15 +524,19 @@ $(addprefix $(objpfx), \
|
||||
$(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
|
||||
$(objpfx)libpthread_nonshared.a
|
||||
$(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
|
||||
# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
|
||||
# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
|
||||
# since otherwise libpthread.so comes before libc.so when linking.
|
||||
$(addprefix $(objpfx), $(tests-reverse)): \
|
||||
$(objpfx)../libc.so $(objpfx)libpthread.so \
|
||||
$(objpfx)linklibc.so $(objpfx)libpthread.so \
|
||||
$(objpfx)libpthread_nonshared.a
|
||||
$(objpfx)../libc.so: $(common-objpfx)libc.so ;
|
||||
$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
|
||||
|
||||
$(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
|
||||
|
||||
$(objpfx)linklibc.so: $(common-objpfx)libc.so
|
||||
ln -s ../libc.so $@
|
||||
generated += libclink.so
|
||||
else
|
||||
$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
|
||||
endif
|
||||
|
||||
+13
-5
@@ -70,15 +70,13 @@ __pthread_disable_asynccancel (int oldtype)
|
||||
return;
|
||||
|
||||
struct pthread *self = THREAD_SELF;
|
||||
int newval;
|
||||
|
||||
#ifdef THREAD_ATOMIC_AND
|
||||
THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK);
|
||||
#else
|
||||
int oldval = THREAD_GETMEM (self, cancelhandling);
|
||||
|
||||
while (1)
|
||||
{
|
||||
int newval = oldval & ~CANCELTYPE_BITMASK;
|
||||
newval = oldval & ~CANCELTYPE_BITMASK;
|
||||
|
||||
if (newval == oldval)
|
||||
break;
|
||||
@@ -91,5 +89,15 @@ __pthread_disable_asynccancel (int oldtype)
|
||||
/* Prepare the next round. */
|
||||
oldval = curval;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* We cannot return when we are being canceled. Upon return the
|
||||
thread might be things which would have to be undone. The
|
||||
following loop should loop until the cancellation signal is
|
||||
delivered. */
|
||||
while (__builtin_expect ((newval & (CANCELING_BITMASK | CANCELED_BITMASK))
|
||||
== CANCELING_BITMASK, 0))
|
||||
{
|
||||
lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE);
|
||||
newval = THREAD_GETMEM (self, cancelhandling);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,15 +86,13 @@ __libc_disable_asynccancel (int oldtype)
|
||||
return;
|
||||
|
||||
struct pthread *self = THREAD_SELF;
|
||||
int newval;
|
||||
|
||||
#ifdef THREAD_ATOMIC_AND
|
||||
THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK);
|
||||
#else
|
||||
int oldval = THREAD_GETMEM (self, cancelhandling);
|
||||
|
||||
while (1)
|
||||
{
|
||||
int newval = oldval & ~CANCELTYPE_BITMASK;
|
||||
newval = oldval & ~CANCELTYPE_BITMASK;
|
||||
|
||||
if (newval == oldval)
|
||||
break;
|
||||
@@ -107,7 +105,17 @@ __libc_disable_asynccancel (int oldtype)
|
||||
/* Prepare the next round. */
|
||||
oldval = curval;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* We cannot return when we are being canceled. Upon return the
|
||||
thread might be things which would have to be undone. The
|
||||
following loop should loop until the cancellation signal is
|
||||
delivered. */
|
||||
while (__builtin_expect ((newval & (CANCELING_BITMASK | CANCELED_BITMASK))
|
||||
== CANCELING_BITMASK, 0))
|
||||
{
|
||||
lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE);
|
||||
newval = THREAD_GETMEM (self, cancelhandling);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@@ -44,6 +44,7 @@ pthread_cancel (th)
|
||||
int newval;
|
||||
do
|
||||
{
|
||||
again:
|
||||
oldval = pd->cancelhandling;
|
||||
newval = oldval | CANCELING_BITMASK | CANCELED_BITMASK;
|
||||
|
||||
@@ -59,7 +60,10 @@ pthread_cancel (th)
|
||||
if (CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS (newval))
|
||||
{
|
||||
/* Mark the cancellation as "in progress". */
|
||||
atomic_bit_set (&pd->cancelhandling, CANCELING_BIT);
|
||||
if (atomic_compare_and_exchange_bool_acq (&pd->cancelhandling,
|
||||
oldval | CANCELING_BITMASK,
|
||||
oldval))
|
||||
goto again;
|
||||
|
||||
/* The cancellation handler will take care of marking the
|
||||
thread as canceled. */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user