mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-08 23:58:31 +08:00
Compare commits
812
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d5a26bd7d | ||
|
|
ac07dac47a | ||
|
|
d14e6b09d6 | ||
|
|
3a33e487ee | ||
|
|
a8f09f4347 | ||
|
|
255eab5f5e | ||
|
|
92111c6332 | ||
|
|
04d5ab182b | ||
|
|
9796df9ff2 | ||
|
|
cfe71f9619 | ||
|
|
745cb72f04 | ||
|
|
5657e17a40 | ||
|
|
1489c92cf2 | ||
|
|
c86e42c53f | ||
|
|
a5030ca9dc | ||
|
|
dcb52a4a9c | ||
|
|
66c60fc87d | ||
|
|
9ed213c6ce | ||
|
|
647691a92f | ||
|
|
d1d5508011 | ||
|
|
24990266ba | ||
|
|
482d2a54b9 | ||
|
|
1802b016e7 | ||
|
|
8cef0b4a12 | ||
|
|
f925c225e4 | ||
|
|
4838fdcfdc | ||
|
|
de2ef7733c | ||
|
|
9959526a47 | ||
|
|
08031ce5e3 | ||
|
|
00b4cc7aef | ||
|
|
63ed86a37f | ||
|
|
e939403de1 | ||
|
|
e389efdffd | ||
|
|
4279c4fbbb | ||
|
|
0430b37c1b | ||
|
|
5fc312669a | ||
|
|
12ba2c9c8c | ||
|
|
5e6ce90dbd | ||
|
|
ac25f45efa | ||
|
|
a0ad547936 | ||
|
|
2a61649854 | ||
|
|
3c67580663 | ||
|
|
b41a2ff361 | ||
|
|
74c7603d2b | ||
|
|
85e2eb8434 | ||
|
|
e7c44f822f | ||
|
|
f844fe667e | ||
|
|
36f5b87d0e | ||
|
|
a182ec598f | ||
|
|
2be1c3e6f3 | ||
|
|
57f69e95c9 | ||
|
|
e7ce843098 | ||
|
|
351b71fe63 | ||
|
|
b2b0cefb29 | ||
|
|
61219b9f6a | ||
|
|
8fb349ce44 | ||
|
|
5303a97bbf | ||
|
|
db1bf3f3fa | ||
|
|
5268b19356 | ||
|
|
230f03954f | ||
|
|
b200942785 | ||
|
|
edf2704cf8 | ||
|
|
d8a3c98ac7 | ||
|
|
be75fb29ec | ||
|
|
173ab210e3 | ||
|
|
9f51ea274f | ||
|
|
7393ab587b | ||
|
|
f6af4a89f5 | ||
|
|
5ee956f941 | ||
|
|
2232b90f0b | ||
|
|
d0c2399f06 | ||
|
|
fc0ed7b647 | ||
|
|
e6620c0a44 | ||
|
|
b422509e58 | ||
|
|
49f6afe59a | ||
|
|
31bb2ae1b5 | ||
|
|
fdae8096fe | ||
|
|
ed360154f2 | ||
|
|
7f72c0431a | ||
|
|
77f177b804 | ||
|
|
d8d583fc44 | ||
|
|
d48b760747 | ||
|
|
5305f9b09d | ||
|
|
6164128f1c | ||
|
|
e91943bf35 | ||
|
|
0639864f66 | ||
|
|
080c142f0e | ||
|
|
5fab284263 | ||
|
|
76acf5b8ab | ||
|
|
9a98163f26 | ||
|
|
edf8365a16 | ||
|
|
cea9bac7b2 | ||
|
|
d9c46d474b | ||
|
|
2e137729f0 | ||
|
|
aaad868015 | ||
|
|
6f8d0c6391 | ||
|
|
f29cabcd71 | ||
|
|
a0ba5dee69 | ||
|
|
6155a84f4a | ||
|
|
ea25a417dc | ||
|
|
0f67951a9a | ||
|
|
338fbf6f50 | ||
|
|
47e94cdf5a | ||
|
|
973746ccc0 | ||
|
|
303067e88d | ||
|
|
269f8e906b | ||
|
|
c267de33ba | ||
|
|
8c4cef8701 | ||
|
|
88e7f439db | ||
|
|
b4ee0fbd5e | ||
|
|
bb6d7d2384 | ||
|
|
2e76ab2332 | ||
|
|
8bff846221 | ||
|
|
3087d4a5de | ||
|
|
54627f3c15 | ||
|
|
1ef17274de | ||
|
|
4f7ee9b3d7 | ||
|
|
973dc1b24b | ||
|
|
1fd194fb75 | ||
|
|
4ac4e460b1 | ||
|
|
5246cf01a9 | ||
|
|
1080954fbc | ||
|
|
32e5e786da | ||
|
|
b44389edf1 | ||
|
|
fc7a0b487b | ||
|
|
7c156b9842 | ||
|
|
35be409292 | ||
|
|
7bea85290b | ||
|
|
d71abb557b | ||
|
|
eeca261a58 | ||
|
|
9ff92329a9 | ||
|
|
bc31219278 | ||
|
|
359bd850c5 | ||
|
|
5abc599d9e | ||
|
|
8404561b19 | ||
|
|
2b6e16c5e2 | ||
|
|
0c3f133ed1 | ||
|
|
4f56a79327 | ||
|
|
2770c2b088 | ||
|
|
65c56903bd | ||
|
|
6d46d0aae2 | ||
|
|
6a147cc6e4 | ||
|
|
addc93c31a | ||
|
|
299f2f92c8 | ||
|
|
8565786828 | ||
|
|
5229ffc381 | ||
|
|
b675f5a862 | ||
|
|
7d16e875fe | ||
|
|
f0dfc72f9d | ||
|
|
1795b73523 | ||
|
|
2384b50e7d | ||
|
|
e6073eebdd | ||
|
|
4ec90460fe | ||
|
|
9b0eb94309 | ||
|
|
2ee1283c60 | ||
|
|
16ea7828d7 | ||
|
|
764b7aa164 | ||
|
|
c14a0516db | ||
|
|
a5683508bc | ||
|
|
16a7541439 | ||
|
|
600f9723fc | ||
|
|
57596e7a12 | ||
|
|
7250035854 | ||
|
|
54ff413202 | ||
|
|
b127b8513f | ||
|
|
1476362866 | ||
|
|
13cada7470 | ||
|
|
4909e83159 | ||
|
|
bacf60ddef | ||
|
|
af6f813e1d | ||
|
|
b975c921d6 | ||
|
|
dcdbf85d97 | ||
|
|
4ed68fe3da | ||
|
|
74bad6a856 | ||
|
|
27a4a1d867 | ||
|
|
587045f460 | ||
|
|
56667c7b3f | ||
|
|
b0d7e71b8b | ||
|
|
017dd87448 | ||
|
|
f8e81cec78 | ||
|
|
c784aefd4b | ||
|
|
fbfb328dd2 | ||
|
|
e9721e1dec | ||
|
|
442b0131ab | ||
|
|
825776463b | ||
|
|
477dbc05f1 | ||
|
|
c0ca860c73 | ||
|
|
65179518b1 | ||
|
|
0c9cd95902 | ||
|
|
eeb0d60af4 | ||
|
|
a3852ddc2f | ||
|
|
90de9d3bfe | ||
|
|
d4ca383aa1 | ||
|
|
a28acf6b52 | ||
|
|
490aaca427 | ||
|
|
98f5a5bbf1 | ||
|
|
e6afe876da | ||
|
|
77b2bdde65 | ||
|
|
a31519cef9 | ||
|
|
85cf3748c6 | ||
|
|
ca9024296c | ||
|
|
317ff8d356 | ||
|
|
cf2e251913 | ||
|
|
3f3be09ae7 | ||
|
|
00cf698f76 | ||
|
|
91740ee0e6 | ||
|
|
b19ed4af95 | ||
|
|
a562fe3cdb | ||
|
|
62f946ade4 | ||
|
|
26e1d33af0 | ||
|
|
45f08acbda | ||
|
|
eddcfbbd7c | ||
|
|
f9bf9db04a | ||
|
|
8a344d4a3b | ||
|
|
02766bf000 | ||
|
|
19fe1be84e | ||
|
|
bc9dd948ff | ||
|
|
9aadad69ed | ||
|
|
255acd161c | ||
|
|
593eff0f9e | ||
|
|
2a6cd50734 | ||
|
|
4af7f59a26 | ||
|
|
859300345b | ||
|
|
9b26179acf | ||
|
|
3c16fc6d6e | ||
|
|
2b7f0f786d | ||
|
|
50f823e499 | ||
|
|
b870de510d | ||
|
|
ca2a37b64e | ||
|
|
63a24094be | ||
|
|
38090cfea3 | ||
|
|
b14f097d7e | ||
|
|
e1214916e7 | ||
|
|
e1a51361e3 | ||
|
|
9285e82ab3 | ||
|
|
cae1d96323 | ||
|
|
d4192d9bce | ||
|
|
a1f7be618c | ||
|
|
3aba072d90 | ||
|
|
64322469ec | ||
|
|
0457885b7e | ||
|
|
53924a77a2 | ||
|
|
8ecde8e8c2 | ||
|
|
33e6302cd4 | ||
|
|
8c9533e18f | ||
|
|
ffd515a6e7 | ||
|
|
851cb78b7d | ||
|
|
bb87239976 | ||
|
|
a879c2cb17 | ||
|
|
5f9df8e7b4 | ||
|
|
ce6a278482 | ||
|
|
8a598439b9 | ||
|
|
c38262349f | ||
|
|
0d02cb10e8 | ||
|
|
dfbbe67270 | ||
|
|
d237dcd93b | ||
|
|
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 |
@@ -1,3 +1,444 @@
|
||||
2010-12-13 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* version.h (VERSION): Bump for 2.12.2 release.
|
||||
|
||||
2010-12-10 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* wcsmbs/wchar.h (wcpcpy, wcpncpy): Only declare under
|
||||
_GNU_SOURCE.
|
||||
|
||||
2010-12-10 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* wcsmbs/wchar.h (wcpcpy, wcpncpy): Add __restrict.
|
||||
* wcsmbs/bits/wchar2.h (__wmemmove_chk_warn, wmemmove, wmemset):
|
||||
Remove __restrict.
|
||||
(wcscpy, __wcpcpy_chk, __wcpcpy_alias, wcpcpy, wcsncpy, wcpncpy)
|
||||
(wcscat, wcsncat, __wcrtomb_chk, wcrtomb): Add __restrict.
|
||||
|
||||
2010-12-09 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
[BZ #11655]
|
||||
* stdlib/msort.c (qsort_r): Make sure both phys_pages and pagesize
|
||||
are initialized.
|
||||
|
||||
2010-12-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* string/bits/string3.h (memmove, bcopy): Remove __restrict.
|
||||
|
||||
2010-08-11 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #11903]
|
||||
* sysdeps/generic/netinet/ip.h (IPTOS_CLASS): Fix definition.
|
||||
Patch by Evgeni Bikov <bikovevg@iitp.ru>.
|
||||
|
||||
2010-08-21 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* configure.in: Move assembler checks to before sysdep dir checking.
|
||||
|
||||
2010-11-24 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* resolv/nss_dns/dns-host.c (getanswer_r): Don't handle ttl == 0
|
||||
specially.
|
||||
(gaih_getanswer_slice): Likewise.
|
||||
|
||||
2010-05-31 Petr Baudis <pasky@suse.cz>
|
||||
|
||||
[BZ #11149]
|
||||
* elf/ldconfig.c (main): Allow aux_cache_file open()ing to fail
|
||||
silently even in the chroot mode.
|
||||
|
||||
2010-05-31 Petr Baudis <pasky@suse.cz>
|
||||
|
||||
[BZ #10085]
|
||||
* nis/nss_compat/compat-initgroups.c (internal_getgrent_r): Fix
|
||||
initialization of skip_initgroups_dyn.
|
||||
|
||||
2010-09-27 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
[BZ #11611]
|
||||
* sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS):
|
||||
Mask out sign-bit copies when constructing f_fsid.
|
||||
|
||||
2010-11-19 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/i386/bits/mman.h: Define MAP_HUGETLB.
|
||||
* sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise.
|
||||
|
||||
2010-11-16 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/sys/swap.h (SWAP_FLAG_DISCARD): Define.
|
||||
|
||||
2010-11-11 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* posix/fnmatch_loop.c (NEW_PATTERN): Fix use of alloca.
|
||||
* posix/Makefile (tests): Add $(objpfx)tst-fnmatch-mem.
|
||||
(tst-fnmatch-ENV): Set MALLOC_TRACE.
|
||||
($(objpfx)tst-fnmatch-mem): New rule.
|
||||
(generated): Add tst-fnmatch-mem and tst-fnmatch.mtrace.
|
||||
* posix/tst-fnmatch.c (main): Call mtrace.
|
||||
|
||||
2010-08-09 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #11883]
|
||||
* posix/fnmatch.c: Keep track of alloca use and fall back on malloc.
|
||||
* posix/fnmatch_loop.c: Likewise.
|
||||
|
||||
2010-11-10 Luis Machado <luisgpm@br.ibm.com>
|
||||
|
||||
* sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c (__ieee754_sqrtl): Force
|
||||
signed comparison.
|
||||
|
||||
2010-11-08 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
[BZ #12194]
|
||||
* sysdeps/i386/bits/byteswap.h: Avoid warning in __bswap_16.
|
||||
* sysdeps/x86_64/bits/byteswap.h: Likewise.
|
||||
|
||||
2010-08-31 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/sparc/sys/epoll.h (epoll_create2): Delete.
|
||||
(epoll_create1): Declare.
|
||||
|
||||
2010-09-06 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* manual/Makefile: Don't mix pattern rules with normal rules.
|
||||
|
||||
2010-08-12 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
[BZ #11904]
|
||||
* locale/programs/locale.c (print_assignment): New function.
|
||||
(show_locale_vars): Use it.
|
||||
|
||||
2010-10-26 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* elf/rtld.c (dl_main): Move assertion after the point where rtld map
|
||||
is added to the list.
|
||||
|
||||
2010-10-24 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #12140]
|
||||
* malloc/malloc.c (_int_free): Fill correct number of bytes when
|
||||
perturbing.
|
||||
|
||||
2010-09-09 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* Makeconfig (sysd-rules-patterns): Add rtld-%:rtld-%.
|
||||
(sysd-rules-targets): Remove duplicates.
|
||||
* elf/rtld-Rules ($(objpfx)rtld-%.os): Add pattern rules with
|
||||
rtld-%.$o dependency.
|
||||
|
||||
2010-10-18 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* elf/dl-open.c (dl_open_worker): Don't expand DST here, let
|
||||
_dl_map_object do it.
|
||||
|
||||
2010-10-15 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* scripts/data/localplt-s390-linux-gnu.data: New file.
|
||||
* scripts/data/localplt-s390x-linux-gnu.data: New file.
|
||||
|
||||
2010-10-12 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #12078]
|
||||
* posix/regcomp.c (parse_branch): One more memory leak plugged.
|
||||
* posix/bug-regex31.input: Add test case.
|
||||
|
||||
2010-10-11 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* posix/bug-regex31.c: Rewrite to run multiple tests from stdin.
|
||||
* posix/bug-regex31.input: New file.
|
||||
|
||||
[BZ #12078]
|
||||
* posix/regcomp.c (parse_branch): Free memory when allocation failed.
|
||||
(parse_sub_exp): Fix last change, use postorder.
|
||||
|
||||
2010-10-11 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* posix/bug-regex31.c: New file.
|
||||
* posix/Makefile: Add rules to build and run bug-regex31.
|
||||
|
||||
2010-10-11 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* posix/regcomp.c (parse_bracket_exp): Add missing re_free calls.
|
||||
|
||||
[BZ #12078]
|
||||
* posix/regcomp.c (parse_sub_exp): Free tree data when it is not used.
|
||||
|
||||
2010-10-11 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
[BZ #12093]
|
||||
* sysdeps/unix/sysv/linux/check_pf.c (__check_pf): ->ifa_addr might
|
||||
be NULL.
|
||||
|
||||
2010-10-03 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
[BZ #12005]
|
||||
* malloc/mcheck.c: Handle large requests.
|
||||
|
||||
2010-09-15 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): When
|
||||
implementing getdents64 using getdents syscall, set d_type if
|
||||
__ASSUME_GETDENTS32_D_TYPE.
|
||||
|
||||
2010-09-14 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* sysdeps/s390/s390-32/__longjmp.c (__longjmp): Define register
|
||||
variables after CHECK_SP call.
|
||||
* sysdeps/s390/s390-64/__longjmp.c (__longjmp): Likewise.
|
||||
|
||||
2010-09-08 Chung-Lin Tang <cltang@codesourcery.com>
|
||||
Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #11968]
|
||||
* sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
|
||||
(____longjmp_chk): Use %ebx for saving value across system call.
|
||||
Add unwind info.
|
||||
|
||||
2010-08-31 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/x86_64/sys/epoll.h: Fix typo.
|
||||
|
||||
2010-08-31 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
[BZ #7066]
|
||||
* stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix array overflow when
|
||||
shifting retval into place.
|
||||
|
||||
2010-09-14 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* resolv/res_init.c (__res_vinit): Count the default server we added.
|
||||
|
||||
2010-08-25 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #10851]
|
||||
* resolv/res_init.c (__res_vinit): When no server address at all
|
||||
is given default to loopback.
|
||||
|
||||
2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* sysdeps/i386/elf/Makefile: New file.
|
||||
|
||||
2010-07-31 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
* hurd/hurdselect.c (_hurd_select): Round timeout up instead of down
|
||||
when converting to ms.
|
||||
|
||||
2010-07-29 Roland McGrath <roland@redhat.com>
|
||||
|
||||
[BZ 11856]
|
||||
* manual/locale.texi (Yes-or-No Questions): Fix example code.
|
||||
|
||||
2010-07-27 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* manual/memory.texi (Malloc Tunable Parameters): Document
|
||||
M_PERTURB.
|
||||
|
||||
2010-07-26 Roland McGrath <roland@redhat.com>
|
||||
|
||||
[BZ #11840]
|
||||
* configure.in (-fgnu89-inline check): Set and substitute
|
||||
gnu89_inline, not libc_cv_gnu89_inline.
|
||||
* configure: Regenerated.
|
||||
* config.make.in (gnu89-inline-CFLAGS): Use @gnu89_inline@.
|
||||
|
||||
2010-07-20 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* elf/dl-sysdep.c (_dl_important_hwcaps): Add dsocaps mask to
|
||||
dl_hwcap_mask as well as dl_hwcap. Without this, dsocaps matching in
|
||||
ld.so.cache was broken. With it, there is no way to disable dsocaps
|
||||
like LD_HWCAP_MASK can disable hwcaps.
|
||||
|
||||
2010-07-05 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* manual/arith.texi (Rounding Functions): Fix rint description
|
||||
implicit in round description.
|
||||
|
||||
2010-07-02 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* elf/Makefile: Fix linking for a few tests to make recent linker
|
||||
happy.
|
||||
|
||||
2010-06-02 Emilio Pozuelo Monfort <pochu27@gmail.com>
|
||||
|
||||
* hurd/lookup-at.c (__file_name_lookup_at): Accept
|
||||
AT_SYMLINK_FOLLOW in AT_FLAGS. Fail with EINVAL if both
|
||||
AT_SYMLINK_FOLLOW and AT_SYMLINK_NOFOLLOW are present
|
||||
in AT_FLAGS.
|
||||
* hurd/hurd/fd.h (__file_name_lookup_at): Update comment.
|
||||
* sysdeps/mach/hurd/linkat.c (linkat): Pass O_NOLINK in FLAGS.
|
||||
|
||||
2010-11-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #12191]
|
||||
* sysdeps/i386/i686/cacheinfo.c (__x86_64_raw_data_cache_size): New.
|
||||
(__x86_64_raw_data_cache_size_half): Likewise.
|
||||
(__x86_64_raw_shared_cache_size): Likewise.
|
||||
(__x86_64_raw_shared_cache_size_half): Likewise.
|
||||
|
||||
* sysdeps/x86_64/cacheinfo.c (__x86_64_raw_data_cache_size): New.
|
||||
(__x86_64_raw_data_cache_size_half): Likewise.
|
||||
(__x86_64_raw_shared_cache_size): Likewise.
|
||||
(__x86_64_raw_shared_cache_size_half): Likewise.
|
||||
(init_cacheinfo): Set __x86_64_raw_data_cache_size,
|
||||
__x86_64_raw_data_cache_size_half, __x86_64_raw_shared_cache_size
|
||||
and __x86_64_raw_shared_cache_size_half. Round
|
||||
__x86_64_data_cache_size_half, __x86_64_data_cache_size
|
||||
__x86_64_shared_cache_size_half and __x86_64_shared_cache_size,
|
||||
to multiple of 256 bytes.
|
||||
|
||||
2010-11-03 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
[BZ #12167]
|
||||
* sysdeps/unix/sysv/linux/ttyname.c (ttyname): Recognize new mangling
|
||||
of inacessible symlinks. Verify result of symlink before returning it.
|
||||
* sysdeps/unix/sysv/linux/ttyname_r.c (__ttyname_r): Likewise.
|
||||
Patch mostly by Miklos Szeredi <miklos@szeredi.hu>.
|
||||
|
||||
2010-10-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||
Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* elf/dl-object.c (_dl_new_object): Don't append the new object to
|
||||
the global list here. Move code to...
|
||||
(_dl_add_to_namespace_list): ...here. New function.
|
||||
* elf/rtld.c (dl_main): Invoke _dl_add_to_namespace_list.
|
||||
* sysdeps/generic/ldsodefs.h (_dl_add_to_namespace_list): Declare.
|
||||
* elf/dl-load.c (lose): Don't remove the element from the list.
|
||||
(_dl_map_object_from_fd): Invoke _dl_add_to_namespace_list.
|
||||
(_dl_map_object): Likewise.
|
||||
|
||||
2010-10-25 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #12159]
|
||||
* sysdeps/x86_64/multiarch/strchr.S: Fix propagation of search byte
|
||||
into all bytes of SSE register.
|
||||
Patch by Richard Li <richardpku@gmail.com>.
|
||||
|
||||
2010-10-22 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* include/dlfcn.h (__RTLD_SECURE): Define.
|
||||
* elf/dl-load.c (_dl_map_object): Remove preloaded parameter. Use
|
||||
mode & __RTLD_SECURE instead.
|
||||
(open_path): Rename preloaded parameter to secure.
|
||||
* sysdeps/generic/ldsodefs.h (_dl_map_object): Adjust declaration.
|
||||
* elf/dl-open.c (dl_open_worker): Adjust call to _dl_map_object.
|
||||
* elf/dl-deps.c (openaux): Likewise.
|
||||
* elf/rtld.c (struct map_args): Remove is_preloaded.
|
||||
(map_doit): Don't use it.
|
||||
(dl_main): Likewise.
|
||||
(do_preload): Use __RTLD_SECURE instead of is_preloaded.
|
||||
(dlmopen_doit): Add __RTLD_SECURE to mode bits.
|
||||
|
||||
2010-12-13 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* elf/dl-object.c (_dl_new_object): Ignore origin of privileged
|
||||
program.
|
||||
|
||||
2010-10-06 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* string/bug-strstr1.c: New file.
|
||||
* string/Makefile: Add rules to build and run bug-strstr1.
|
||||
|
||||
2010-10-05 Eric Blake <eblake@redhat.com>
|
||||
|
||||
[BZ #12092]
|
||||
* string/str-two-way.h (two_way_long_needle): Always clear memory
|
||||
when skipping input due to the shift table.
|
||||
|
||||
2010-10-03 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
[BZ #12077]
|
||||
* sysdeps/x86_64/strcmp.S: Fix handling of remaining bytes in buffer
|
||||
for strncmp.
|
||||
* string/stratcliff.c: Add tests for strcmp and strncmp.
|
||||
* wcsmbs/wcsatcliff.c: Adjust for stratcliff change.
|
||||
|
||||
2010-08-19 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* sysdeps/i386/i686/multiarch/strspn.S [!SHARED]: Fix SSE4.2 check.
|
||||
|
||||
2010-08-06 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
|
||||
Also fail if tpwd after pwuid call is NULL.
|
||||
|
||||
2010-06-21 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
|
||||
Restore proper fallback handling.
|
||||
|
||||
2010-06-19 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid): Handle
|
||||
OOM in getpwuid_r correctly. Return error number when the caller
|
||||
should return, otherwise -1.
|
||||
(getlogin_r): Adjust to return also for result of __getlogin_r_loginuid
|
||||
call returning > 0 value.
|
||||
* sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise.
|
||||
|
||||
2010-07-27 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* version.h (VERSION): Bump for 2.12.1 release.
|
||||
|
||||
2010-06-21 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* sysdeps/i386/i686/Makefile: Don't pass -mtune to assembler.
|
||||
|
||||
2010-06-02 Kirill A. Shutemov <kirill@shutemov.name>
|
||||
|
||||
* elf/dl-reloc.c: Flush cache after solving TEXTRELs if arch
|
||||
requires it.
|
||||
|
||||
2010-06-02 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* nis/nss_nis/nis-initgroups.c (get_uid): Properly resize buffer.
|
||||
|
||||
2010-06-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* libio/stdio.h (sscanf, vsscanf): Use __REDIRECT_NTH instead of
|
||||
__REDIRECT followed by __THROW.
|
||||
* wcsmbs/wchar.h (swscanf, vswscanf): Likewise.
|
||||
* posix/getopt.h (getopt): Likewise.
|
||||
|
||||
2010-05-26 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #11640]
|
||||
* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
|
||||
Properly check family and model.
|
||||
|
||||
2010-05-26 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: Fix iov[] size.
|
||||
|
||||
2010-05-21 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* elf/dl-runtime.c (_dl_profile_fixup): Don't crash on unresolved weak
|
||||
symbol reference.
|
||||
|
||||
2010-05-19 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* elf/dl-runtime.c (_dl_fixup): Don't crash on unresolved weak
|
||||
symbol reference.
|
||||
|
||||
2010-05-21 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add recvmmsg
|
||||
and internal_recvmmsg.
|
||||
* sysdeps/unix/sysv/linux/recvmmsg.c: New file.
|
||||
* sysdeps/unix/sysv/linux/internal_recvmmsg.S: New file.
|
||||
* sysdeps/unix/sysv/linux/socketcall.h (SOCKOP_recvmmsg): Define.
|
||||
* sysdeps/unix/sysv/linux/syscalls.list (recvmmsg): Remove.
|
||||
|
||||
2010-05-21 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* sunrpc/clnt_tcp.c (clnttcp_control): Add missing break.
|
||||
* sunrpc/clnt_udp.c (clntudp_control): Likewise.
|
||||
* sunrpc/clnt_unix.c (clntunix_control): Likewise.
|
||||
|
||||
2010-05-20 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/sys/timex.h: Use __REDIRECT_NTH.
|
||||
|
||||
2010-05-12 Andrew Stubbs <ams@codesourcery.com>
|
||||
|
||||
* sysdeps/sh/sh4/fpu/feholdexcpt.c (feholdexcept): Really disable all
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2042,6 +2042,9 @@
|
||||
(__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT
|
||||
followed by __THROW.
|
||||
|
||||
* sysdeps/unix/sysv/linux/futimesat.c (futimesat): If
|
||||
file == NULL, use __futimes unconditionally.
|
||||
|
||||
2006-02-02 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat]
|
||||
@@ -2101,6 +2104,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>.
|
||||
@@ -8922,6 +8930,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 +9060,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]
|
||||
|
||||
@@ -256,6 +256,12 @@
|
||||
|
||||
* Makerules (libc-abis): Fix search for libc-abis in add-ons.
|
||||
|
||||
2010-04-06 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/posix/getaddrinfo.c (default_scopes): Assign global
|
||||
scope to RFC 1918 addresses.
|
||||
* posix/gai.conf: Document difference from RFC 3484.
|
||||
|
||||
2010-04-05 Thomas Schwinge <thomas@schwinge.name>
|
||||
|
||||
* sysdeps/gnu/unwind-resume.c: New, moved from nptl/sysdeps/pthread/.
|
||||
@@ -1010,6 +1016,19 @@
|
||||
* sysdeps/x86_64/fpu/fegetenv.c: Likewise
|
||||
* sysdeps/s390/fpu/fegetenv.c: Likewise. Remove unused headers.
|
||||
|
||||
2009-10-27 Aurelien Jarno <aurelien@aurel32.net>
|
||||
|
||||
[BZ #10855]
|
||||
* locale/programs/locarchive.c: use MMAP_SHARED to reserve memory
|
||||
used later with MMAP_FIXED | MMAP_SHARED to cope with different
|
||||
alignment restrictions.
|
||||
|
||||
2010-02-08 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
[BZ #11155]
|
||||
* sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c: Include i386
|
||||
version.
|
||||
|
||||
2010-02-05 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #11230]
|
||||
@@ -2953,6 +2972,11 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
|
||||
* sysdeps/generic/ldsodefs.h (struct rtld_global): The map element in
|
||||
the unique symbol hash table should not be const.
|
||||
|
||||
2009-07-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* Makeconfig (ASFLAGS): Append $(sysdep-ASFLAGS).
|
||||
* sysdeps/i386/Makefile (sysdep-ASFLAGS): Add -U__i686.
|
||||
|
||||
2009-07-21 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/x86_64/multiarch/strstr.c: Minor cleanups. Remove
|
||||
@@ -3218,6 +3242,11 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
|
||||
out common code into new function get_common_indeces. Determine
|
||||
extended family and model for Intel processors.
|
||||
|
||||
2009-06-26 Andreas Schwab <aschwab@redhat.com>
|
||||
|
||||
* timezone/zic.c (stringzone): Don't try to generate a POSIX TZ
|
||||
string when the timezone ends in DST.
|
||||
|
||||
2009-06-26 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* resolv/resolv.h: Define RES_SNGLKUPREOP.
|
||||
@@ -11911,6 +11940,10 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
|
||||
[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]
|
||||
@@ -13168,6 +13201,15 @@ d2009-10-30 Ulrich Drepper <drepper@redhat.com>
|
||||
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]
|
||||
|
||||
@@ -317,11 +317,12 @@ build the GNU C library:
|
||||
Check the FAQ for any special compiler issues on particular
|
||||
platforms.
|
||||
|
||||
* GNU `binutils' 2.15 or later
|
||||
* GNU `binutils'
|
||||
|
||||
You must use GNU `binutils' (as and ld) to build the GNU C library.
|
||||
No other assembler or linker has the necessary functionality at the
|
||||
moment.
|
||||
moment. The configure scripts checks for the appropriate version
|
||||
for the platform. Too-old versions will prevent building glibc.
|
||||
|
||||
* GNU `texinfo' 3.12f
|
||||
|
||||
@@ -460,4 +461,3 @@ or the manual has a bug, so report the disagreement. If you find any
|
||||
errors or omissions in this manual, please report them to the bug
|
||||
database. If you refer to specific sections of the manual, please
|
||||
include the section names for easier identification.
|
||||
|
||||
|
||||
+7
-7
@@ -695,7 +695,7 @@ CPPFLAGS = $($(subdir)-CPPFLAGS) $(+includes) $(defines) \
|
||||
-include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
|
||||
$(CPPFLAGS-$(suffix $@)) \
|
||||
$(foreach lib,$(libof-$(basename $(@F))) \
|
||||
$(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
|
||||
$(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
|
||||
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
|
||||
override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
|
||||
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
|
||||
@@ -789,12 +789,12 @@ endif
|
||||
# The assembler can generate debug information too.
|
||||
ifndef ASFLAGS
|
||||
ifeq ($(have-cpp-asm-debuginfo),yes)
|
||||
ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
|
||||
ASFLAGS = $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
|
||||
else
|
||||
ASFLAGS :=
|
||||
ASFLAGS =
|
||||
endif
|
||||
endif
|
||||
ASFLAGS += $(ASFLAGS-config) $(asflags-cpu)
|
||||
ASFLAGS += $(ASFLAGS-config) $(asflags-cpu) $(sysdep-ASFLAGS)
|
||||
|
||||
ifndef BUILD_CC
|
||||
BUILD_CC = $(CC)
|
||||
@@ -966,7 +966,7 @@ endif
|
||||
# emitted into sysd-rules. A sysdeps Makeconfig fragment can
|
||||
# add its own special object file prefix to this list with e.g. foo-%:%
|
||||
# to have foo-*.? compiled from *.? using $(foo-CPPFLAGS).
|
||||
sysd-rules-patterns := %:% rtld-%:% m_%:s_%
|
||||
sysd-rules-patterns := %:% rtld-%:rtld-% rtld-%:% m_%:s_%
|
||||
|
||||
# Let sysdeps/ subdirs contain a Makeconfig fragment for us to include here.
|
||||
sysdep-makeconfigs := $(wildcard $(+sysdep_dirs:=/Makeconfig))
|
||||
@@ -975,8 +975,8 @@ include $(sysdep-makeconfigs)
|
||||
endif
|
||||
|
||||
# Compute just the target patterns. Makeconfig has set sysd-rules-patterns.
|
||||
sysd-rules-targets := $(foreach p,$(sysd-rules-patterns),\
|
||||
$(firstword $(subst :, ,$p)))
|
||||
sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\
|
||||
$(firstword $(subst :, ,$p))))
|
||||
|
||||
endif # Makeconfig not yet included
|
||||
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
GNU C Library NEWS -- history of user-visible changes. 2010-5-4
|
||||
GNU C Library NEWS -- history of user-visible changes. 2010-12-13
|
||||
Copyright (C) 1992-2009, 2010 Free Software Foundation, Inc.
|
||||
See the end for copying conditions.
|
||||
|
||||
Please send GNU C library bug reports via <http://sources.redhat.com/bugzilla/>
|
||||
using `glibc' in the "product" field.
|
||||
|
||||
Version 2.12.2
|
||||
|
||||
* The following bugs are resolved with this release:
|
||||
|
||||
12077, 12092, 12113, 12159, 12167, 12191, 11840, 11856, 10851, 7066,
|
||||
11968, 12005, 12093, 12078, 12140, 11904, 12194, 11883, 11611,
|
||||
10085, 11149, 11903, 11655
|
||||
|
||||
Version 2.12.1
|
||||
|
||||
* The following bugs are resolved with this release:
|
||||
|
||||
11571, 11640
|
||||
|
||||
Version 2.12
|
||||
|
||||
* The following bugs are resolved with this release:
|
||||
|
||||
@@ -184,7 +184,7 @@ relying on semantics undefined within the standard.
|
||||
|
||||
Note that if you do this, you must link your program with the BSD
|
||||
compatibility library by passing the `-lbsd-compat' option to the
|
||||
compiler or linker. *Note:* If you forget to do this, you may get
|
||||
compiler or linker. *NB:* If you forget to do this, you may get
|
||||
very strange errors at run time.
|
||||
|
||||
-- Macro: _REENTRANT
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
+1
-1
@@ -59,7 +59,7 @@ have-cpp-asm-debuginfo = @libc_cv_cpp_asm_debuginfo@
|
||||
enable-check-abi = @enable_check_abi@
|
||||
have-forced-unwind = @libc_cv_forced_unwind@
|
||||
have-fpie = @libc_cv_fpie@
|
||||
gnu89-inline-CFLAGS = @libc_cv_gnu89_inline@
|
||||
gnu89-inline-CFLAGS = @gnu89_inline@
|
||||
have-ssp = @libc_cv_ssp@
|
||||
have-selinux = @have_selinux@
|
||||
have-libaudit = @have_libaudit@
|
||||
|
||||
@@ -682,7 +682,7 @@ libc_cv_cc_submachine
|
||||
exceptions
|
||||
no_whole_archive
|
||||
libc_cv_have_initfini
|
||||
libc_cv_gnu89_inline
|
||||
gnu89_inline
|
||||
libc_cv_ssp
|
||||
fno_unit_at_a_time
|
||||
libc_cv_hashstyle
|
||||
@@ -3805,9 +3805,6 @@ else
|
||||
multi_arch=default
|
||||
fi
|
||||
|
||||
if test x"$multi_arch" != xno; then
|
||||
multi_arch_d=/multiarch
|
||||
fi
|
||||
|
||||
# Check whether --enable-experimental-malloc was given.
|
||||
if test "${enable_experimental_malloc+set}" = set; then
|
||||
@@ -4241,6 +4238,140 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
# For the multi-arch option we need support in the assembler.
|
||||
{ $as_echo "$as_me:$LINENO: checking for assembler gnu_indirect_function symbol type support" >&5
|
||||
$as_echo_n "checking for assembler gnu_indirect_function symbol type support... " >&6; }
|
||||
if test "${libc_cv_asm_gnu_indirect_function+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat > conftest.s <<EOF
|
||||
.type foo,%gnu_indirect_function
|
||||
EOF
|
||||
if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5;
|
||||
then
|
||||
libc_cv_asm_gnu_indirect_function=yes
|
||||
else
|
||||
libc_cv_asm_gnu_indirect_function=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_gnu_indirect_function" >&5
|
||||
$as_echo "$libc_cv_asm_gnu_indirect_function" >&6; }
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether .text pseudo-op must be used" >&5
|
||||
$as_echo_n "checking whether .text pseudo-op must be used... " >&6; }
|
||||
if test "${libc_cv_dot_text+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
EOF
|
||||
libc_cv_dot_text=
|
||||
if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
libc_cv_dot_text=.text
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
if test -z "$libc_cv_dot_text"; then
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for assembler global-symbol directive" >&5
|
||||
$as_echo_n "checking for assembler global-symbol directive... " >&6; }
|
||||
if test "${libc_cv_asm_global_directive+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
libc_cv_asm_global_directive=UNKNOWN
|
||||
for ac_globl in .globl .global .EXPORT; do
|
||||
cat > conftest.s <<EOF
|
||||
${libc_cv_dot_text}
|
||||
${ac_globl} foo
|
||||
foo:
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
libc_cv_asm_global_directive=${ac_globl}
|
||||
fi
|
||||
rm -f conftest*
|
||||
test $libc_cv_asm_global_directive != UNKNOWN && break
|
||||
done
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_global_directive" >&5
|
||||
$as_echo "$libc_cv_asm_global_directive" >&6; }
|
||||
if test $libc_cv_asm_global_directive = UNKNOWN; then
|
||||
{ { $as_echo "$as_me:$LINENO: error: cannot determine asm global directive" >&5
|
||||
$as_echo "$as_me: error: cannot determine asm global directive" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define ASM_GLOBAL_DIRECTIVE ${libc_cv_asm_global_directive}
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for assembler .type directive prefix" >&5
|
||||
$as_echo_n "checking for assembler .type directive prefix... " >&6; }
|
||||
if test "${libc_cv_asm_type_prefix+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
libc_cv_asm_type_prefix=no
|
||||
for ac_try_prefix in '@' '%' '#'; do
|
||||
cat > conftest.s <<EOF
|
||||
${libc_cv_dot_text}
|
||||
${libc_cv_asm_global_directive} foo
|
||||
.type foo, ${ac_try_prefix}object
|
||||
.size foo, 1
|
||||
foo:
|
||||
.byte 1
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
libc_cv_asm_type_prefix=${ac_try_prefix}
|
||||
fi
|
||||
rm -f conftest*
|
||||
test "x$libc_cv_asm_type_prefix" != xno && break
|
||||
done
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_type_prefix" >&5
|
||||
$as_echo "$libc_cv_asm_type_prefix" >&6; }
|
||||
if test "x$libc_cv_asm_type_prefix" != xno; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define ASM_TYPE_DIRECTIVE_PREFIX ${libc_cv_asm_type_prefix}
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
if test x"$libc_cv_asm_gnu_indirect_function" != xyes -a x"$libc_cv_asm_type_prefix" = xno; then
|
||||
if test x"$multi_arch" = xyes; then
|
||||
{ { $as_echo "$as_me:$LINENO: error: --enable-multi-arch support requires assembler and linker support" >&5
|
||||
$as_echo "$as_me: error: --enable-multi-arch support requires assembler and linker support" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
multi_arch=no
|
||||
fi
|
||||
fi
|
||||
if test x"$multi_arch" != xno; then
|
||||
multi_arch_d=/multiarch
|
||||
fi
|
||||
|
||||
# Compute the list of sysdep directories for this configuration.
|
||||
# This can take a while to compute.
|
||||
sysdep_dir=$srcdir/sysdeps
|
||||
@@ -4357,35 +4488,14 @@ done
|
||||
|
||||
# If the assembler supports gnu_indirect_function symbol type and the
|
||||
# architecture supports multi-arch, we enable multi-arch by default.
|
||||
if test "$multi_arch" = default; then
|
||||
{ $as_echo "$as_me:$LINENO: checking for assembler gnu_indirect_function symbol type support" >&5
|
||||
$as_echo_n "checking for assembler gnu_indirect_function symbol type support... " >&6; }
|
||||
if test "${libc_cv_asm_gnu_indirect_function+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat > conftest.s <<EOF
|
||||
.type foo,%gnu_indirect_function
|
||||
EOF
|
||||
if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5;
|
||||
then
|
||||
libc_cv_asm_gnu_indirect_function=yes
|
||||
else
|
||||
libc_cv_asm_gnu_indirect_function=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_gnu_indirect_function" >&5
|
||||
$as_echo "$libc_cv_asm_gnu_indirect_function" >&6; }
|
||||
case $sysnames_add_ons$sysnames in
|
||||
*"$multi_arch_d"*)
|
||||
;;
|
||||
*)
|
||||
multi_arch=no
|
||||
if test "$libc_cv_asm_gnu_indirect_function" = yes; then
|
||||
case $sysnames_add_ons$sysnames in
|
||||
*"$multi_arch_d"*)
|
||||
multi_arch=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test x"$multi_arch" = xyes; then
|
||||
;;
|
||||
esac
|
||||
if test x"$multi_arch" != xno; then
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define USE_MULTIARCH 1
|
||||
_ACEOF
|
||||
@@ -5916,71 +6026,6 @@ if test $libc_cv_need_minus_P = yes; then
|
||||
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether .text pseudo-op must be used" >&5
|
||||
$as_echo_n "checking whether .text pseudo-op must be used... " >&6; }
|
||||
if test "${libc_cv_dot_text+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
EOF
|
||||
libc_cv_dot_text=
|
||||
if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
libc_cv_dot_text=.text
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
if test -z "$libc_cv_dot_text"; then
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for assembler global-symbol directive" >&5
|
||||
$as_echo_n "checking for assembler global-symbol directive... " >&6; }
|
||||
if test "${libc_cv_asm_global_directive+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
libc_cv_asm_global_directive=UNKNOWN
|
||||
for ac_globl in .globl .global .EXPORT; do
|
||||
cat > conftest.s <<EOF
|
||||
${libc_cv_dot_text}
|
||||
${ac_globl} foo
|
||||
foo:
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
libc_cv_asm_global_directive=${ac_globl}
|
||||
fi
|
||||
rm -f conftest*
|
||||
test $libc_cv_asm_global_directive != UNKNOWN && break
|
||||
done
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_global_directive" >&5
|
||||
$as_echo "$libc_cv_asm_global_directive" >&6; }
|
||||
if test $libc_cv_asm_global_directive = UNKNOWN; then
|
||||
{ { $as_echo "$as_me:$LINENO: error: cannot determine asm global directive" >&5
|
||||
$as_echo "$as_me: error: cannot determine asm global directive" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define ASM_GLOBAL_DIRECTIVE ${libc_cv_asm_global_directive}
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for .set assembler directive" >&5
|
||||
$as_echo_n "checking for .set assembler directive... " >&6; }
|
||||
if test "${libc_cv_asm_set_directive+set}" = set; then
|
||||
@@ -6016,42 +6061,6 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for assembler .type directive prefix" >&5
|
||||
$as_echo_n "checking for assembler .type directive prefix... " >&6; }
|
||||
if test "${libc_cv_asm_type_prefix+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
libc_cv_asm_type_prefix=no
|
||||
for ac_try_prefix in '@' '%' '#'; do
|
||||
cat > conftest.s <<EOF
|
||||
${libc_cv_dot_text}
|
||||
${libc_cv_asm_global_directive} foo
|
||||
.type foo, ${ac_try_prefix}object
|
||||
.size foo, 1
|
||||
foo:
|
||||
.byte 1
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
libc_cv_asm_type_prefix=${ac_try_prefix}
|
||||
fi
|
||||
rm -f conftest*
|
||||
test "x$libc_cv_asm_type_prefix" != xno && break
|
||||
done
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_type_prefix" >&5
|
||||
$as_echo "$libc_cv_asm_type_prefix" >&6; }
|
||||
if test "x$libc_cv_asm_type_prefix" != xno; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define ASM_TYPE_DIRECTIVE_PREFIX ${libc_cv_asm_type_prefix}
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for assembler gnu_unique_object symbol type" >&5
|
||||
$as_echo_n "checking for assembler gnu_unique_object symbol type... " >&6; }
|
||||
if test "${libc_cv_asm_unique_object+set}" = set; then
|
||||
@@ -6078,37 +6087,6 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
# For the multi-arch option we need support in the assembler.
|
||||
if test "$multi_arch" = yes; then
|
||||
if test "x$libc_cv_asm_type_prefix" != xno; then
|
||||
{ $as_echo "$as_me:$LINENO: checking for assembler gnu_indirect_function symbol type support" >&5
|
||||
$as_echo_n "checking for assembler gnu_indirect_function symbol type support... " >&6; }
|
||||
if test "${libc_cv_asm_gnu_indirect_function+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat > conftest.s <<EOF
|
||||
.type foo,%gnu_indirect_function
|
||||
EOF
|
||||
if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5;
|
||||
then
|
||||
libc_cv_asm_gnu_indirect_function=yes
|
||||
else
|
||||
libc_cv_asm_gnu_indirect_function=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_gnu_indirect_function" >&5
|
||||
$as_echo "$libc_cv_asm_gnu_indirect_function" >&6; }
|
||||
else
|
||||
libc_cv_asm_gnu_indirect_function=no
|
||||
fi
|
||||
if test x"$libc_cv_asm_gnu_indirect_function" != xyes; then
|
||||
{ { $as_echo "$as_me:$LINENO: error: --enable-multi-arch support requires assembler and linker support" >&5
|
||||
$as_echo "$as_me: error: --enable-multi-arch support requires assembler and linker support" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for .symver assembler directive" >&5
|
||||
$as_echo_n "checking for .symver assembler directive... " >&6; }
|
||||
if test "${libc_cv_asm_symver_directive+set}" = set; then
|
||||
@@ -6924,9 +6902,9 @@ fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $libc_cv_gnu89_inline" >&5
|
||||
$as_echo "$libc_cv_gnu89_inline" >&6; }
|
||||
if test $libc_cv_gnu89_inline = yes; then
|
||||
libc_cv_gnu89_inline=-fgnu89-inline
|
||||
gnu89_inline=-fgnu89-inline
|
||||
else
|
||||
libc_cv_gnu89_inline=
|
||||
gnu89_inline=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
+94
-110
@@ -273,9 +273,6 @@ AC_ARG_ENABLE([multi-arch],
|
||||
[enable single DSO with optimizations for multiple architectures]),
|
||||
[multi_arch=$enableval],
|
||||
[multi_arch=default])
|
||||
if test x"$multi_arch" != xno; then
|
||||
multi_arch_d=/multiarch
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([experimental-malloc],
|
||||
AC_HELP_STRING([--enable-experimental-malloc],
|
||||
@@ -603,6 +600,90 @@ if test "$base_machine" = "i386"; then
|
||||
AC_DEFINE(USE_REGPARMS)
|
||||
fi
|
||||
|
||||
# For the multi-arch option we need support in the assembler.
|
||||
AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
|
||||
libc_cv_asm_gnu_indirect_function, [dnl
|
||||
cat > conftest.s <<EOF
|
||||
.type foo,%gnu_indirect_function
|
||||
EOF
|
||||
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
|
||||
then
|
||||
libc_cv_asm_gnu_indirect_function=yes
|
||||
else
|
||||
libc_cv_asm_gnu_indirect_function=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
|
||||
AC_MSG_CHECKING(whether .text pseudo-op must be used)
|
||||
AC_CACHE_VAL(libc_cv_dot_text, [dnl
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
EOF
|
||||
libc_cv_dot_text=
|
||||
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
libc_cv_dot_text=.text
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test -z "$libc_cv_dot_text"; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for assembler global-symbol directive,
|
||||
libc_cv_asm_global_directive, [dnl
|
||||
libc_cv_asm_global_directive=UNKNOWN
|
||||
for ac_globl in .globl .global .EXPORT; do
|
||||
cat > conftest.s <<EOF
|
||||
${libc_cv_dot_text}
|
||||
${ac_globl} foo
|
||||
foo:
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
libc_cv_asm_global_directive=${ac_globl}
|
||||
fi
|
||||
rm -f conftest*
|
||||
test $libc_cv_asm_global_directive != UNKNOWN && break
|
||||
done])
|
||||
if test $libc_cv_asm_global_directive = UNKNOWN; then
|
||||
AC_MSG_ERROR(cannot determine asm global directive)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(ASM_GLOBAL_DIRECTIVE, ${libc_cv_asm_global_directive})
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for assembler .type directive prefix,
|
||||
libc_cv_asm_type_prefix, [dnl
|
||||
libc_cv_asm_type_prefix=no
|
||||
for ac_try_prefix in '@' '%' '#'; do
|
||||
cat > conftest.s <<EOF
|
||||
${libc_cv_dot_text}
|
||||
${libc_cv_asm_global_directive} foo
|
||||
.type foo, ${ac_try_prefix}object
|
||||
.size foo, 1
|
||||
foo:
|
||||
.byte 1
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
libc_cv_asm_type_prefix=${ac_try_prefix}
|
||||
fi
|
||||
rm -f conftest*
|
||||
test "x$libc_cv_asm_type_prefix" != xno && break
|
||||
done])
|
||||
if test "x$libc_cv_asm_type_prefix" != xno; then
|
||||
AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
|
||||
fi
|
||||
|
||||
if test x"$libc_cv_asm_gnu_indirect_function" != xyes -a x"$libc_cv_asm_type_prefix" = xno; then
|
||||
if test x"$multi_arch" = xyes; then
|
||||
AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
|
||||
else
|
||||
multi_arch=no
|
||||
fi
|
||||
fi
|
||||
if test x"$multi_arch" != xno; then
|
||||
multi_arch_d=/multiarch
|
||||
fi
|
||||
|
||||
# Compute the list of sysdep directories for this configuration.
|
||||
# This can take a while to compute.
|
||||
sysdep_dir=$srcdir/sysdeps
|
||||
@@ -722,29 +803,14 @@ done
|
||||
|
||||
# If the assembler supports gnu_indirect_function symbol type and the
|
||||
# architecture supports multi-arch, we enable multi-arch by default.
|
||||
if test "$multi_arch" = default; then
|
||||
AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
|
||||
libc_cv_asm_gnu_indirect_function, [dnl
|
||||
cat > conftest.s <<EOF
|
||||
.type foo,%gnu_indirect_function
|
||||
EOF
|
||||
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
|
||||
then
|
||||
libc_cv_asm_gnu_indirect_function=yes
|
||||
else
|
||||
libc_cv_asm_gnu_indirect_function=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
case $sysnames_add_ons$sysnames in
|
||||
*"$multi_arch_d"*)
|
||||
;;
|
||||
*)
|
||||
multi_arch=no
|
||||
if test "$libc_cv_asm_gnu_indirect_function" = yes; then
|
||||
case $sysnames_add_ons$sysnames in
|
||||
*"$multi_arch_d"*)
|
||||
multi_arch=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test x"$multi_arch" = xyes; then
|
||||
;;
|
||||
esac
|
||||
if test x"$multi_arch" != xno; then
|
||||
AC_DEFINE(USE_MULTIARCH)
|
||||
fi
|
||||
AC_SUBST(multi_arch)
|
||||
@@ -1172,43 +1238,6 @@ if test $libc_cv_need_minus_P = yes; then
|
||||
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether .text pseudo-op must be used)
|
||||
AC_CACHE_VAL(libc_cv_dot_text, [dnl
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
EOF
|
||||
libc_cv_dot_text=
|
||||
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
libc_cv_dot_text=.text
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test -z "$libc_cv_dot_text"; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for assembler global-symbol directive,
|
||||
libc_cv_asm_global_directive, [dnl
|
||||
libc_cv_asm_global_directive=UNKNOWN
|
||||
for ac_globl in .globl .global .EXPORT; do
|
||||
cat > conftest.s <<EOF
|
||||
${libc_cv_dot_text}
|
||||
${ac_globl} foo
|
||||
foo:
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
libc_cv_asm_global_directive=${ac_globl}
|
||||
fi
|
||||
rm -f conftest*
|
||||
test $libc_cv_asm_global_directive != UNKNOWN && break
|
||||
done])
|
||||
if test $libc_cv_asm_global_directive = UNKNOWN; then
|
||||
AC_MSG_ERROR(cannot determine asm global directive)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(ASM_GLOBAL_DIRECTIVE, ${libc_cv_asm_global_directive})
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for .set assembler directive, libc_cv_asm_set_directive, [dnl
|
||||
cat > conftest.s <<EOF
|
||||
${libc_cv_dot_text}
|
||||
@@ -1234,28 +1263,6 @@ if test $libc_cv_asm_set_directive = yes; then
|
||||
AC_DEFINE(HAVE_ASM_SET_DIRECTIVE)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for assembler .type directive prefix,
|
||||
libc_cv_asm_type_prefix, [dnl
|
||||
libc_cv_asm_type_prefix=no
|
||||
for ac_try_prefix in '@' '%' '#'; do
|
||||
cat > conftest.s <<EOF
|
||||
${libc_cv_dot_text}
|
||||
${libc_cv_asm_global_directive} foo
|
||||
.type foo, ${ac_try_prefix}object
|
||||
.size foo, 1
|
||||
foo:
|
||||
.byte 1
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
libc_cv_asm_type_prefix=${ac_try_prefix}
|
||||
fi
|
||||
rm -f conftest*
|
||||
test "x$libc_cv_asm_type_prefix" != xno && break
|
||||
done])
|
||||
if test "x$libc_cv_asm_type_prefix" != xno; then
|
||||
AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for assembler gnu_unique_object symbol type,
|
||||
libc_cv_asm_unique_object, [dnl
|
||||
cat > conftest.s <<EOF
|
||||
@@ -1273,29 +1280,6 @@ if test $libc_cv_asm_unique_object = yes; then
|
||||
AC_DEFINE(HAVE_ASM_UNIQUE_OBJECT)
|
||||
fi
|
||||
|
||||
# For the multi-arch option we need support in the assembler.
|
||||
if test "$multi_arch" = yes; then
|
||||
if test "x$libc_cv_asm_type_prefix" != xno; then
|
||||
AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
|
||||
libc_cv_asm_gnu_indirect_function, [dnl
|
||||
cat > conftest.s <<EOF
|
||||
.type foo,%gnu_indirect_function
|
||||
EOF
|
||||
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
|
||||
then
|
||||
libc_cv_asm_gnu_indirect_function=yes
|
||||
else
|
||||
libc_cv_asm_gnu_indirect_function=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
else
|
||||
libc_cv_asm_gnu_indirect_function=no
|
||||
fi
|
||||
if test x"$libc_cv_asm_gnu_indirect_function" != xyes; then
|
||||
AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for .symver assembler directive, libc_cv_asm_symver_directive,
|
||||
[cat > conftest.s <<EOF
|
||||
${libc_cv_dot_text}
|
||||
@@ -1803,11 +1787,11 @@ else
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test $libc_cv_gnu89_inline = yes; then
|
||||
libc_cv_gnu89_inline=-fgnu89-inline
|
||||
gnu89_inline=-fgnu89-inline
|
||||
else
|
||||
libc_cv_gnu89_inline=
|
||||
gnu89_inline=
|
||||
fi
|
||||
AC_SUBST(libc_cv_gnu89_inline)
|
||||
AC_SUBST(gnu89_inline)
|
||||
|
||||
if test $elf != yes; then
|
||||
AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
|
||||
|
||||
+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)
|
||||
|
||||
|
||||
@@ -63,6 +63,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. */
|
||||
|
||||
+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
|
||||
|
||||
+3
-3
@@ -759,11 +759,11 @@ $(objpfx)tst-tls8.out: $(objpfx)tst-tlsmod3.so $(objpfx)tst-tlsmod4.so
|
||||
$(objpfx)tst-tls9: $(libdl)
|
||||
$(objpfx)tst-tls9.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
|
||||
|
||||
$(objpfx)tst-tls10: $(objpfx)tst-tlsmod8.so
|
||||
$(objpfx)tst-tls10: $(objpfx)tst-tlsmod8.so $(objpfx)tst-tlsmod7.so
|
||||
|
||||
$(objpfx)tst-tls11: $(objpfx)tst-tlsmod10.so
|
||||
$(objpfx)tst-tls11: $(objpfx)tst-tlsmod10.so $(objpfx)tst-tlsmod9.so
|
||||
|
||||
$(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so
|
||||
$(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so $(objpfx)tst-tlsmod11.so
|
||||
|
||||
$(objpfx)tst-tls13: $(libdl)
|
||||
$(objpfx)tst-tls13.out: $(objpfx)tst-tlsmod13a.so
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ openaux (void *a)
|
||||
{
|
||||
struct openaux_args *args = (struct openaux_args *) a;
|
||||
|
||||
args->aux = _dl_map_object (args->map, args->name, 0,
|
||||
args->aux = _dl_map_object (args->map, args->name,
|
||||
(args->map->l_type == lt_executable
|
||||
? lt_library : args->map->l_type),
|
||||
args->trace_mode, args->open_mode,
|
||||
|
||||
+22
-26
@@ -801,22 +801,7 @@ lose (int code, int fd, const char *name, char *realname, struct link_map *l,
|
||||
/* The file might already be closed. */
|
||||
if (fd != -1)
|
||||
(void) __close (fd);
|
||||
if (l != NULL)
|
||||
{
|
||||
/* We modify the list of loaded objects. */
|
||||
__rtld_lock_lock_recursive (GL(dl_load_write_lock));
|
||||
/* Remove the stillborn object from the list and free it. */
|
||||
assert (l->l_next == NULL);
|
||||
if (l->l_prev == NULL)
|
||||
/* No other module loaded. This happens only in the static library,
|
||||
or in rtld under --verify. */
|
||||
GL(dl_ns)[l->l_ns]._ns_loaded = NULL;
|
||||
else
|
||||
l->l_prev->l_next = NULL;
|
||||
--GL(dl_ns)[l->l_ns]._ns_nloaded;
|
||||
free (l);
|
||||
__rtld_lock_unlock_recursive (GL(dl_load_write_lock));
|
||||
}
|
||||
free (l);
|
||||
free (realname);
|
||||
|
||||
if (r != NULL)
|
||||
@@ -901,6 +886,9 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
|
||||
never be unloaded. */
|
||||
__close (fd);
|
||||
|
||||
/* Add the map for the mirrored object to the object list. */
|
||||
_dl_add_to_namespace_list (l, nsid);
|
||||
|
||||
return l;
|
||||
}
|
||||
#endif
|
||||
@@ -1495,6 +1483,9 @@ cannot enable executable stack as shared object requires");
|
||||
add_name_to_object (l, ((const char *) D_PTR (l, l_info[DT_STRTAB])
|
||||
+ l->l_info[DT_SONAME]->d_un.d_val));
|
||||
|
||||
/* Now that the object is fully initialized add it to the object list. */
|
||||
_dl_add_to_namespace_list (l, nsid);
|
||||
|
||||
#ifdef SHARED
|
||||
/* Auditing checkpoint: we have a new object. */
|
||||
if (__builtin_expect (GLRO(dl_naudit) > 0, 0)
|
||||
@@ -1815,7 +1806,7 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
|
||||
if MAY_FREE_DIRS is true. */
|
||||
|
||||
static int
|
||||
open_path (const char *name, size_t namelen, int preloaded,
|
||||
open_path (const char *name, size_t namelen, int secure,
|
||||
struct r_search_path_struct *sps, char **realname,
|
||||
struct filebuf *fbp, struct link_map *loader, int whatcode,
|
||||
bool *found_other_class)
|
||||
@@ -1897,7 +1888,7 @@ open_path (const char *name, size_t namelen, int preloaded,
|
||||
/* Remember whether we found any existing directory. */
|
||||
here_any |= this_dir->status[cnt] != nonexisting;
|
||||
|
||||
if (fd != -1 && __builtin_expect (preloaded, 0)
|
||||
if (fd != -1 && __builtin_expect (secure, 0)
|
||||
&& INTUSE(__libc_enable_secure))
|
||||
{
|
||||
/* This is an extra security effort to make sure nobody can
|
||||
@@ -1966,7 +1957,7 @@ open_path (const char *name, size_t namelen, int preloaded,
|
||||
|
||||
struct link_map *
|
||||
internal_function
|
||||
_dl_map_object (struct link_map *loader, const char *name, int preloaded,
|
||||
_dl_map_object (struct link_map *loader, const char *name,
|
||||
int type, int trace_mode, int mode, Lmid_t nsid)
|
||||
{
|
||||
int fd;
|
||||
@@ -2070,7 +2061,8 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
|
||||
for (l = loader; l; l = l->l_loader)
|
||||
if (cache_rpath (l, &l->l_rpath_dirs, DT_RPATH, "RPATH"))
|
||||
{
|
||||
fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs,
|
||||
fd = open_path (name, namelen, mode & __RTLD_SECURE,
|
||||
&l->l_rpath_dirs,
|
||||
&realname, &fb, loader, LA_SER_RUNPATH,
|
||||
&found_other_class);
|
||||
if (fd != -1)
|
||||
@@ -2085,14 +2077,15 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
|
||||
&& main_map != NULL && main_map->l_type != lt_loaded
|
||||
&& cache_rpath (main_map, &main_map->l_rpath_dirs, DT_RPATH,
|
||||
"RPATH"))
|
||||
fd = open_path (name, namelen, preloaded, &main_map->l_rpath_dirs,
|
||||
fd = open_path (name, namelen, mode & __RTLD_SECURE,
|
||||
&main_map->l_rpath_dirs,
|
||||
&realname, &fb, loader ?: main_map, LA_SER_RUNPATH,
|
||||
&found_other_class);
|
||||
}
|
||||
|
||||
/* Try the LD_LIBRARY_PATH environment variable. */
|
||||
if (fd == -1 && env_path_list.dirs != (void *) -1)
|
||||
fd = open_path (name, namelen, preloaded, &env_path_list,
|
||||
fd = open_path (name, namelen, mode & __RTLD_SECURE, &env_path_list,
|
||||
&realname, &fb,
|
||||
loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded,
|
||||
LA_SER_LIBPATH, &found_other_class);
|
||||
@@ -2101,12 +2094,12 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
|
||||
if (fd == -1 && loader != NULL
|
||||
&& cache_rpath (loader, &loader->l_runpath_dirs,
|
||||
DT_RUNPATH, "RUNPATH"))
|
||||
fd = open_path (name, namelen, preloaded,
|
||||
fd = open_path (name, namelen, mode & __RTLD_SECURE,
|
||||
&loader->l_runpath_dirs, &realname, &fb, loader,
|
||||
LA_SER_RUNPATH, &found_other_class);
|
||||
|
||||
if (fd == -1
|
||||
&& (__builtin_expect (! preloaded, 1)
|
||||
&& (__builtin_expect (! (mode & __RTLD_SECURE), 1)
|
||||
|| ! INTUSE(__libc_enable_secure)))
|
||||
{
|
||||
/* Check the list of libraries in the file /etc/ld.so.cache,
|
||||
@@ -2172,7 +2165,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
|
||||
&& ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
|
||||
|| __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
|
||||
&& rtld_search_dirs.dirs != (void *) -1)
|
||||
fd = open_path (name, namelen, preloaded, &rtld_search_dirs,
|
||||
fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
|
||||
&realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
|
||||
|
||||
/* Add another newline when we are tracing the library loading. */
|
||||
@@ -2217,7 +2210,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
|
||||
have. */
|
||||
static const Elf_Symndx dummy_bucket = STN_UNDEF;
|
||||
|
||||
/* Enter the new object in the list of loaded objects. */
|
||||
/* Allocate a new object map. */
|
||||
if ((name_copy = local_strdup (name)) == NULL
|
||||
|| (l = _dl_new_object (name_copy, name, type, loader,
|
||||
mode, nsid)) == NULL)
|
||||
@@ -2235,6 +2228,9 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
|
||||
l->l_nbuckets = 1;
|
||||
l->l_relocated = 1;
|
||||
|
||||
/* Enter the object in the object list. */
|
||||
_dl_add_to_namespace_list (l, nsid);
|
||||
|
||||
return l;
|
||||
}
|
||||
else if (found_other_class)
|
||||
|
||||
+34
-25
@@ -1,5 +1,5 @@
|
||||
/* Storage management for the chain of loaded shared objects.
|
||||
Copyright (C) 1995-2002,2004,2006-2008,2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2002,2004,2006-2009,2010 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
|
||||
@@ -26,16 +26,41 @@
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
/* Add the new link_map NEW to the end of the namespace list. */
|
||||
void
|
||||
internal_function
|
||||
_dl_add_to_namespace_list (struct link_map *new, Lmid_t nsid)
|
||||
{
|
||||
/* We modify the list of loaded objects. */
|
||||
__rtld_lock_lock_recursive (GL(dl_load_write_lock));
|
||||
|
||||
if (GL(dl_ns)[nsid]._ns_loaded != NULL)
|
||||
{
|
||||
struct link_map *l = GL(dl_ns)[nsid]._ns_loaded;
|
||||
while (l->l_next != NULL)
|
||||
l = l->l_next;
|
||||
new->l_prev = l;
|
||||
/* new->l_next = NULL; Would be necessary but we use calloc. */
|
||||
l->l_next = new;
|
||||
}
|
||||
else
|
||||
GL(dl_ns)[nsid]._ns_loaded = new;
|
||||
++GL(dl_ns)[nsid]._ns_nloaded;
|
||||
new->l_serial = GL(dl_load_adds);
|
||||
++GL(dl_load_adds);
|
||||
|
||||
__rtld_lock_unlock_recursive (GL(dl_load_write_lock));
|
||||
}
|
||||
|
||||
|
||||
/* Allocate a `struct link_map' for a new object being loaded,
|
||||
and enter it into the _dl_loaded list. */
|
||||
|
||||
struct link_map *
|
||||
internal_function
|
||||
_dl_new_object (char *realname, const char *libname, int type,
|
||||
struct link_map *loader, int mode, Lmid_t nsid)
|
||||
{
|
||||
struct link_map *l;
|
||||
int idx;
|
||||
size_t libname_len = strlen (libname) + 1;
|
||||
struct link_map *new;
|
||||
struct libname_list *newname;
|
||||
@@ -93,31 +118,12 @@ _dl_new_object (char *realname, const char *libname, int type,
|
||||
new->l_scope = new->l_scope_mem;
|
||||
new->l_scope_max = sizeof (new->l_scope_mem) / sizeof (new->l_scope_mem[0]);
|
||||
|
||||
/* We modify the list of loaded objects. */
|
||||
__rtld_lock_lock_recursive (GL(dl_load_write_lock));
|
||||
|
||||
/* Counter for the scopes we have to handle. */
|
||||
idx = 0;
|
||||
int idx = 0;
|
||||
|
||||
if (GL(dl_ns)[nsid]._ns_loaded != NULL)
|
||||
{
|
||||
l = GL(dl_ns)[nsid]._ns_loaded;
|
||||
while (l->l_next != NULL)
|
||||
l = l->l_next;
|
||||
new->l_prev = l;
|
||||
/* new->l_next = NULL; Would be necessary but we use calloc. */
|
||||
l->l_next = new;
|
||||
|
||||
/* Add the global scope. */
|
||||
new->l_scope[idx++] = &GL(dl_ns)[nsid]._ns_loaded->l_searchlist;
|
||||
}
|
||||
else
|
||||
GL(dl_ns)[nsid]._ns_loaded = new;
|
||||
++GL(dl_ns)[nsid]._ns_nloaded;
|
||||
new->l_serial = GL(dl_load_adds);
|
||||
++GL(dl_load_adds);
|
||||
|
||||
__rtld_lock_unlock_recursive (GL(dl_load_write_lock));
|
||||
/* Add the global scope. */
|
||||
new->l_scope[idx++] = &GL(dl_ns)[nsid]._ns_loaded->l_searchlist;
|
||||
|
||||
/* If we have no loader the new object acts as it. */
|
||||
if (loader == NULL)
|
||||
@@ -214,6 +220,9 @@ _dl_new_object (char *realname, const char *libname, int type,
|
||||
out:
|
||||
new->l_origin = origin;
|
||||
}
|
||||
else if (INTUSE(__libc_enable_secure) && type == lt_executable)
|
||||
/* The origin of a privileged program cannot be trusted. */
|
||||
new->l_origin = (char *) -1;
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
+1
-30
@@ -221,38 +221,9 @@ dl_open_worker (void *a)
|
||||
|
||||
assert (_dl_debug_initialize (0, args->nsid)->r_state == RT_CONSISTENT);
|
||||
|
||||
/* Maybe we have to expand a DST. */
|
||||
if (__builtin_expect (dst != NULL, 0))
|
||||
{
|
||||
size_t len = strlen (file);
|
||||
|
||||
/* Determine how much space we need. We have to allocate the
|
||||
memory locally. */
|
||||
size_t required = DL_DST_REQUIRED (call_map, file, len,
|
||||
_dl_dst_count (dst, 0));
|
||||
|
||||
/* Get space for the new file name. */
|
||||
char *new_file = (char *) alloca (required + 1);
|
||||
|
||||
/* Generate the new file name. */
|
||||
_dl_dst_substitute (call_map, file, new_file, 0);
|
||||
|
||||
/* If the substitution failed don't try to load. */
|
||||
if (*new_file == '\0')
|
||||
_dl_signal_error (0, "dlopen", NULL,
|
||||
N_("empty dynamic string token substitution"));
|
||||
|
||||
/* Now we have a new file name. */
|
||||
file = new_file;
|
||||
|
||||
/* It does not matter whether call_map is set even if we
|
||||
computed it only because of the DST. Since the path contains
|
||||
a slash the value is not used. See dl-load.c. */
|
||||
}
|
||||
|
||||
/* Load the named object. */
|
||||
struct link_map *new;
|
||||
args->map = new = _dl_map_object (call_map, file, 0, lt_loaded, 0,
|
||||
args->map = new = _dl_map_object (call_map, file, lt_loaded, 0,
|
||||
mode | __RTLD_CALLMAP, args->nsid);
|
||||
|
||||
/* If the pointer returned is NULL this means the RTLD_NOLOAD flag is
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/* Relocate a shared object and resolve its references to other loaded objects.
|
||||
Copyright (C) 1995-2006, 2008, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2006, 2008, 2009, 2010 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
|
||||
@@ -307,6 +307,10 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
||||
goto call_error;
|
||||
}
|
||||
|
||||
#ifdef CLEAR_CACHE
|
||||
CLEAR_CACHE (textrels->start, textrels->start + textrels->len);
|
||||
#endif
|
||||
|
||||
textrels = textrels->next;
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -1,5 +1,5 @@
|
||||
/* On-demand PLT fixup for shared objects.
|
||||
Copyright (C) 1995-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2009, 2010 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
|
||||
@@ -144,7 +144,8 @@ _dl_fixup (
|
||||
/* And now perhaps the relocation addend. */
|
||||
value = elf_machine_plt_value (l, reloc, value);
|
||||
|
||||
if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0))
|
||||
if (sym != NULL
|
||||
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0))
|
||||
value = ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (value)) ();
|
||||
|
||||
/* Finally, fix up the plt itself. */
|
||||
@@ -231,8 +232,9 @@ _dl_profile_fixup (
|
||||
? LOOKUP_VALUE_ADDRESS (result)
|
||||
+ defsym->st_value : 0);
|
||||
|
||||
if (__builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
|
||||
== STT_GNU_IFUNC, 0))
|
||||
if (defsym != NULL
|
||||
&& __builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
|
||||
== STT_GNU_IFUNC, 0))
|
||||
value = ((DL_FIXUP_VALUE_TYPE (*) (void))
|
||||
DL_FIXUP_VALUE_ADDR (value)) ();
|
||||
}
|
||||
@@ -369,7 +371,7 @@ _dl_profile_fixup (
|
||||
struct audit_ifaces *afct = GLRO(dl_audit);
|
||||
for (unsigned int cnt = 0; cnt < GLRO(dl_naudit); ++cnt)
|
||||
{
|
||||
if (afct->ARCH_LA_PLTENTER != NULL
|
||||
if (afct->ARCH_LA_PLTENTER != NULL
|
||||
&& (reloc_result->enterexit
|
||||
& (LA_SYMB_NOPLTENTER << (2 * (cnt + 1)))) == 0)
|
||||
{
|
||||
|
||||
@@ -425,6 +425,11 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
|
||||
{
|
||||
const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1];
|
||||
GLRO(dl_hwcap) |= (uint64_t) mask << _DL_FIRST_EXTRA;
|
||||
/* Note that we add the dsocaps to the set already chosen by the
|
||||
LD_HWCAP_MASK environment variable (or default HWCAP_IMPORTANT).
|
||||
So there is no way to request ignoring an OS-supplied dsocap
|
||||
string and bit like you can ignore an OS-supplied HWCAP bit. */
|
||||
GLRO(dl_hwcap_mask) |= (uint64_t) mask << _DL_FIRST_EXTRA;
|
||||
size_t len;
|
||||
for (const char *p = dsocaps; p < dsocaps + dsocapslen; p += len + 1)
|
||||
{
|
||||
|
||||
+23
-14
@@ -1031,17 +1031,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)
|
||||
{
|
||||
@@ -1102,7 +1104,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]))
|
||||
{
|
||||
@@ -1165,7 +1174,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,
|
||||
@@ -1197,7 +1206,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;
|
||||
|
||||
@@ -1240,6 +1249,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);
|
||||
@@ -1349,24 +1360,21 @@ 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);
|
||||
}
|
||||
|
||||
const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
|
||||
if (opt_chroot)
|
||||
{
|
||||
aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
|
||||
if (aux_cache_file == NULL)
|
||||
error (EXIT_FAILURE, errno, _("Can't open cache file %s\n"),
|
||||
_PATH_LDCONFIG_AUX_CACHE);
|
||||
}
|
||||
aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
|
||||
|
||||
if (! opt_ignore_aux_cache)
|
||||
if (! opt_ignore_aux_cache && aux_cache_file)
|
||||
load_aux_cache (aux_cache_file);
|
||||
else
|
||||
init_aux_cache ();
|
||||
@@ -1376,7 +1384,8 @@ main (int argc, char **argv)
|
||||
if (opt_build_cache)
|
||||
{
|
||||
save_cache (cache_file);
|
||||
save_aux_cache (aux_cache_file);
|
||||
if (aux_cache_file)
|
||||
save_aux_cache (aux_cache_file);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
+11
-2
@@ -1,6 +1,6 @@
|
||||
# Subroutine makefile for compiling libc modules linked into dynamic linker.
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002,2003,2005,2006,2008,2010 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -56,7 +56,7 @@ $(objpfx)rtld-libc.a: $(foreach dir,$(rtld-subdirs),\
|
||||
# Use the verbose option of ar and tar when not running silently.
|
||||
ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
|
||||
verbose := v
|
||||
else # -s
|
||||
else # -s
|
||||
verbose :=
|
||||
endif # not -s
|
||||
|
||||
@@ -93,6 +93,12 @@ else
|
||||
# These are the basic compilation rules corresponding to the Makerules ones.
|
||||
# The sysd-rules generated makefile already defines pattern rules for rtld-%
|
||||
# targets built from sysdeps source files.
|
||||
$(objpfx)rtld-%.os: rtld-%.S $(before-compile)
|
||||
$(compile-command.S) $(rtld-CPPFLAGS)
|
||||
$(objpfx)rtld-%.os: rtld-%.s $(before-compile)
|
||||
$(compile-command.s) $(rtld-CPPFLAGS)
|
||||
$(objpfx)rtld-%.os: rtld-%.c $(before-compile)
|
||||
$(compile-command.c) $(rtld-CPPFLAGS)
|
||||
$(objpfx)rtld-%.os: %.S $(before-compile)
|
||||
$(compile-command.S) $(rtld-CPPFLAGS)
|
||||
$(objpfx)rtld-%.os: %.s $(before-compile)
|
||||
@@ -101,6 +107,9 @@ $(objpfx)rtld-%.os: %.c $(before-compile)
|
||||
$(compile-command.c) $(rtld-CPPFLAGS)
|
||||
|
||||
# The rules for generated source files.
|
||||
$(objpfx)rtld-%.os: $(objpfx)rtld-%.S $(before-compile); $(compile-command.S)
|
||||
$(objpfx)rtld-%.os: $(objpfx)rtld-%.s $(before-compile); $(compile-command.s)
|
||||
$(objpfx)rtld-%.os: $(objpfx)rtld-%.c $(before-compile); $(compile-command.c)
|
||||
$(objpfx)rtld-%.os: $(objpfx)%.S $(before-compile); $(compile-command.S)
|
||||
$(objpfx)rtld-%.os: $(objpfx)%.s $(before-compile); $(compile-command.s)
|
||||
$(objpfx)rtld-%.os: $(objpfx)%.c $(before-compile); $(compile-command.c)
|
||||
|
||||
+16
-11
@@ -589,7 +589,6 @@ struct map_args
|
||||
/* Argument to map_doit. */
|
||||
char *str;
|
||||
struct link_map *loader;
|
||||
int is_preloaded;
|
||||
int mode;
|
||||
/* Return value of map_doit. */
|
||||
struct link_map *map;
|
||||
@@ -627,16 +626,17 @@ static void
|
||||
map_doit (void *a)
|
||||
{
|
||||
struct map_args *args = (struct map_args *) a;
|
||||
args->map = _dl_map_object (args->loader, args->str,
|
||||
args->is_preloaded, lt_library, 0, args->mode,
|
||||
LM_ID_BASE);
|
||||
args->map = _dl_map_object (args->loader, args->str, lt_library, 0,
|
||||
args->mode, LM_ID_BASE);
|
||||
}
|
||||
|
||||
static void
|
||||
dlmopen_doit (void *a)
|
||||
{
|
||||
struct dlmopen_args *args = (struct dlmopen_args *) a;
|
||||
args->map = _dl_open (args->fname, RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT,
|
||||
args->map = _dl_open (args->fname,
|
||||
(RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT
|
||||
| __RTLD_SECURE),
|
||||
dl_main, LM_ID_NEWLM, _dl_argc, INTUSE(_dl_argv),
|
||||
__environ);
|
||||
}
|
||||
@@ -806,8 +806,7 @@ do_preload (char *fname, struct link_map *main_map, const char *where)
|
||||
|
||||
args.str = fname;
|
||||
args.loader = main_map;
|
||||
args.is_preloaded = 1;
|
||||
args.mode = 0;
|
||||
args.mode = __RTLD_SECURE;
|
||||
|
||||
unsigned int old_nloaded = GL(dl_ns)[LM_ID_BASE]._ns_nloaded;
|
||||
|
||||
@@ -1054,7 +1053,6 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
|
||||
args.str = rtld_progname;
|
||||
args.loader = NULL;
|
||||
args.is_preloaded = 0;
|
||||
args.mode = __RTLD_OPENEXEC;
|
||||
(void) _dl_catch_error (&objname, &err_str, &malloced, map_doit,
|
||||
&args);
|
||||
@@ -1066,7 +1064,7 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
else
|
||||
{
|
||||
HP_TIMING_NOW (start);
|
||||
_dl_map_object (NULL, rtld_progname, 0, lt_library, 0,
|
||||
_dl_map_object (NULL, rtld_progname, lt_library, 0,
|
||||
__RTLD_OPENEXEC, LM_ID_BASE);
|
||||
HP_TIMING_NOW (stop);
|
||||
|
||||
@@ -1110,11 +1108,15 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
main_map = _dl_new_object ((char *) "", "", lt_executable, NULL,
|
||||
__RTLD_OPENEXEC, LM_ID_BASE);
|
||||
assert (main_map != NULL);
|
||||
assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded);
|
||||
main_map->l_phdr = phdr;
|
||||
main_map->l_phnum = phnum;
|
||||
main_map->l_entry = *user_entry;
|
||||
|
||||
/* Even though the link map is not yet fully initialized we can add
|
||||
it to the map list since there are no possible users running yet. */
|
||||
_dl_add_to_namespace_list (main_map, LM_ID_BASE);
|
||||
assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded);
|
||||
|
||||
/* At this point we are in a bit of trouble. We would have to
|
||||
fill in the values for l_dev and l_ino. But in general we
|
||||
do not know where the file is. We also do not handle AT_EXECFD
|
||||
@@ -1257,7 +1259,7 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
/* We were invoked directly, so the program might not have a
|
||||
PT_INTERP. */
|
||||
_dl_rtld_libname.name = GL(dl_rtld_map).l_name;
|
||||
/* _dl_rtld_libname.next = NULL; Already zero. */
|
||||
/* _dl_rtld_libname.next = NULL; Already zero. */
|
||||
GL(dl_rtld_map).l_libname = &_dl_rtld_libname;
|
||||
}
|
||||
else
|
||||
@@ -1382,6 +1384,9 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
l->l_libname->name = memcpy (copy, dsoname, len);
|
||||
}
|
||||
|
||||
/* Add the vDSO to the object list. */
|
||||
_dl_add_to_namespace_list (l, LM_ID_BASE);
|
||||
|
||||
/* Rearrange the list so this DSO appears after rtld_map. */
|
||||
assert (l->l_next == NULL);
|
||||
assert (l->l_prev == main_map);
|
||||
|
||||
@@ -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
|
||||
+178
@@ -0,0 +1,178 @@
|
||||
# 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 := http://ftp.gnu.org/pub/gnu/glibc/
|
||||
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 -C - -O $(releases-url)/$@; \
|
||||
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 "_topdir ." \
|
||||
--define "_sourcedir %{_topdir}" \
|
||||
--define "_specdir %{_topdir}" \
|
||||
--define "_srcrpmdir %{_topdir}" \
|
||||
--define "_rpmdir %{_topdir}" \
|
||||
--define "_builddir %{_topdir}" \
|
||||
--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-13
|
||||
|
||||
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,632 @@
|
||||
#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 != NULL)
|
||||
{
|
||||
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;
|
||||
if (strchr (d->d_name, '_') == NULL)
|
||||
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 (0, 0, "too many directories in \"%s\"", loc_path);
|
||||
break;
|
||||
}
|
||||
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,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.
|
||||
#
|
||||
# Valid entries include:
|
||||
#
|
||||
# nisplus Use NIS+ (NIS version 3)
|
||||
# nis 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,273 @@
|
||||
/* 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");
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#define m1 0x5555555555555555L
|
||||
#define m2 0x3333333333333333L
|
||||
#define m3 0x0f0f0f0f0f0f0f0fL
|
||||
#else
|
||||
#define m1 0x55555555
|
||||
#define m2 0x33333333
|
||||
#define m3 0x0f0f0f0f
|
||||
#endif
|
||||
|
||||
static inline unsigned long
|
||||
popcntb (unsigned long n)
|
||||
{
|
||||
n -= (n >> 1) & m1;
|
||||
n = (n & m2) + ((n >> 2) & m2);
|
||||
n = (n + (n >> 4)) & m3;
|
||||
return 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;
|
||||
}
|
||||
if ((insn & 0xfc00ffff) == 0x7c0000f4) /* popcntb */
|
||||
{
|
||||
unsigned long *regs = (unsigned long *) ctx->regs;
|
||||
unsigned dest = (insn >> 16) & 0x1f;
|
||||
unsigned src = (insn >> 21) & 0x1f;
|
||||
unsigned long res = 0;
|
||||
int i;
|
||||
|
||||
regs[dest] = popcntb (regs[src]);
|
||||
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,609 @@
|
||||
#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];
|
||||
|
||||
static int
|
||||
simple_memcmp (const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
while (n--
|
||||
&& (ret = *(unsigned char *) s1++ - *(unsigned char *) s2++) == 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
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
|
||||
&& simple_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);
|
||||
}
|
||||
|
||||
static char *
|
||||
simple_strchr (const char *s, int c)
|
||||
{
|
||||
for (; *s != (char) c; ++s)
|
||||
if (*s == '\0')
|
||||
return NULL;
|
||||
return (char *) s;
|
||||
}
|
||||
|
||||
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 (simple_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 (simple_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 = simple_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;
|
||||
}
|
||||
+3
-2
@@ -254,8 +254,9 @@ extern int _hurd_select (int nfds, struct pollfd *pollfds,
|
||||
const sigset_t *sigmask);
|
||||
|
||||
/* Variant of file_name_lookup used in *at function implementations.
|
||||
AT_FLAGS should contain only AT_SYMLINK_NOFOLLOW; other bits
|
||||
cause EINVAL. */
|
||||
AT_FLAGS may only contain AT_SYMLINK_FOLLOW or AT_SYMLINK_NOFOLLOW,
|
||||
which will remove and add O_NOLINK from FLAGS respectively.
|
||||
Other bits cause EINVAL. */
|
||||
extern file_t __file_name_lookup_at (int fd, int at_flags,
|
||||
const char *file_name,
|
||||
int flags, mode_t mode);
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ _hurd_select (int nfds,
|
||||
int firstfd, lastfd;
|
||||
mach_msg_timeout_t to = (timeout != NULL ?
|
||||
(timeout->tv_sec * 1000 +
|
||||
timeout->tv_nsec / 1000000) :
|
||||
(timeout->tv_nsec + 999999) / 1000000) :
|
||||
0);
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -30,8 +30,14 @@ __file_name_lookup_at (int fd, int at_flags,
|
||||
error_t err;
|
||||
file_t result;
|
||||
|
||||
if ((at_flags & AT_SYMLINK_FOLLOW) && (at_flags & AT_SYMLINK_NOFOLLOW))
|
||||
return (__hurd_fail (EINVAL), MACH_PORT_NULL);
|
||||
|
||||
flags |= (at_flags & AT_SYMLINK_NOFOLLOW) ? O_NOLINK : 0;
|
||||
at_flags &= ~AT_SYMLINK_NOFOLLOW;
|
||||
if (at_flags & AT_SYMLINK_FOLLOW)
|
||||
flags &= ~O_NOLINK;
|
||||
at_flags &= ~AT_SYMLINK_FOLLOW;
|
||||
if (at_flags != 0)
|
||||
return (__hurd_fail (EINVAL), MACH_PORT_NULL);
|
||||
|
||||
|
||||
+25202
-25613
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
#include <stdlib/bits/stdlib-ldbl.h>
|
||||
@@ -0,0 +1 @@
|
||||
#include <wcsmbs/bits/wchar-ldbl.h>
|
||||
@@ -9,6 +9,7 @@
|
||||
#define __RTLD_OPENEXEC 0x20000000
|
||||
#define __RTLD_CALLMAP 0x10000000
|
||||
#define __RTLD_AUDIT 0x08000000
|
||||
#define __RTLD_SECURE 0x04000000 /* Apply additional security checks. */
|
||||
|
||||
#define __LM_ID_CALLER -2
|
||||
|
||||
|
||||
+7
-2
@@ -308,8 +308,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
|
||||
|
||||
@@ -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
|
||||
|
||||
+10
-8
@@ -165,10 +165,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. */
|
||||
@@ -447,9 +449,9 @@ extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
|
||||
__isoc99_fscanf) __wur;
|
||||
extern int __REDIRECT (scanf, (__const char *__restrict __format, ...),
|
||||
__isoc99_scanf) __wur;
|
||||
extern int __REDIRECT (sscanf, (__const char *__restrict __s,
|
||||
__const char *__restrict __format, ...),
|
||||
__isoc99_sscanf) __THROW;
|
||||
extern int __REDIRECT_NTH (sscanf, (__const char *__restrict __s,
|
||||
__const char *__restrict __format, ...),
|
||||
__isoc99_sscanf);
|
||||
# else
|
||||
extern int __isoc99_fscanf (FILE *__restrict __stream,
|
||||
__const char *__restrict __format, ...) __wur;
|
||||
@@ -501,11 +503,11 @@ extern int __REDIRECT (vfscanf,
|
||||
extern int __REDIRECT (vscanf, (__const char *__restrict __format,
|
||||
_G_va_list __arg), __isoc99_vscanf)
|
||||
__attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
|
||||
extern int __REDIRECT (vsscanf,
|
||||
(__const char *__restrict __s,
|
||||
__const char *__restrict __format, _G_va_list __arg),
|
||||
__isoc99_vsscanf)
|
||||
__THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
|
||||
extern int __REDIRECT_NTH (vsscanf,
|
||||
(__const char *__restrict __s,
|
||||
__const char *__restrict __format,
|
||||
_G_va_list __arg), __isoc99_vsscanf)
|
||||
__attribute__ ((__format__ (__scanf__, 2, 0)));
|
||||
# else
|
||||
extern int __isoc99_vfscanf (FILE *__restrict __s,
|
||||
__const char *__restrict __format,
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -762,6 +762,29 @@ write_charmaps (void)
|
||||
twalk (all_data, print_names);
|
||||
}
|
||||
|
||||
/* Print a properly quoted assignment of NAME with VAL, using double
|
||||
quotes iff DQUOTE is true. */
|
||||
static void
|
||||
print_assignment (const char *name, const char *val, bool dquote)
|
||||
{
|
||||
printf ("%s=", name);
|
||||
if (dquote)
|
||||
putchar ('"');
|
||||
while (*val != '\0')
|
||||
{
|
||||
size_t segment
|
||||
= strcspn (val, dquote ? "$`\"\\" : "~|&;<>()$`\\\"' \t\n");
|
||||
printf ("%.*s", (int) segment, val);
|
||||
val += segment;
|
||||
if (*val == '\0')
|
||||
break;
|
||||
putchar ('\\');
|
||||
putchar (*val++);
|
||||
}
|
||||
if (dquote)
|
||||
putchar ('"');
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
/* We have to show the contents of the environments determining the
|
||||
locale. */
|
||||
@@ -769,7 +792,7 @@ static void
|
||||
show_locale_vars (void)
|
||||
{
|
||||
size_t cat_no;
|
||||
const char *lcall = getenv ("LC_ALL");
|
||||
const char *lcall = getenv ("LC_ALL") ? : "";
|
||||
const char *lang = getenv ("LANG") ? : "";
|
||||
|
||||
auto void get_source (const char *name);
|
||||
@@ -778,15 +801,15 @@ show_locale_vars (void)
|
||||
{
|
||||
char *val = getenv (name);
|
||||
|
||||
if ((lcall ?: "")[0] != '\0' || val == NULL)
|
||||
printf ("%s=\"%s\"\n", name,
|
||||
(lcall ?: "")[0] ? lcall : (lang ?: "")[0] ? lang : "POSIX");
|
||||
if (lcall[0] != '\0' || val == NULL)
|
||||
print_assignment (name, lcall[0] ? lcall : lang[0] ? lang : "POSIX",
|
||||
true);
|
||||
else
|
||||
printf ("%s=%s\n", name, val);
|
||||
print_assignment (name, val, false);
|
||||
}
|
||||
|
||||
/* LANG has to be the first value. */
|
||||
printf ("LANG=%s\n", lang);
|
||||
print_assignment ("LANG", lang, false);
|
||||
|
||||
/* Now all categories in an unspecified order. */
|
||||
for (cat_no = 0; cat_no < NCATEGORIES; ++cat_no)
|
||||
@@ -794,7 +817,7 @@ show_locale_vars (void)
|
||||
get_source (category[cat_no].name);
|
||||
|
||||
/* The last is the LC_ALL value. */
|
||||
printf ("LC_ALL=%s\n", lcall ? : "");
|
||||
print_assignment ("LC_ALL", lcall, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ create_archive (const char *archivefname, struct locarhandle *ah)
|
||||
size_t reserved = RESERVE_MMAP_SIZE;
|
||||
int xflags = 0;
|
||||
if (total < reserved
|
||||
&& ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
|
||||
&& ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
|
||||
-1, 0)) != MAP_FAILED))
|
||||
xflags = MAP_FIXED;
|
||||
else
|
||||
@@ -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
|
||||
@@ -396,7 +396,7 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
|
||||
size_t reserved = RESERVE_MMAP_SIZE;
|
||||
int xflags = 0;
|
||||
if (total < reserved
|
||||
&& ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
|
||||
&& ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
|
||||
-1, 0)) != MAP_FAILED))
|
||||
xflags = MAP_FIXED;
|
||||
else
|
||||
@@ -614,7 +614,7 @@ open_archive (struct locarhandle *ah, bool readonly)
|
||||
int xflags = 0;
|
||||
void *p;
|
||||
if (st.st_size < reserved
|
||||
&& ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
|
||||
&& ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
|
||||
-1, 0)) != MAP_FAILED))
|
||||
xflags = MAP_FIXED;
|
||||
else
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -227,6 +227,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'; \
|
||||
|
||||
@@ -85,6 +85,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 \
|
||||
@@ -116,6 +117,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 \
|
||||
@@ -131,6 +133,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 \
|
||||
@@ -307,6 +310,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 \
|
||||
@@ -367,6 +372,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
|
||||
|
||||
@@ -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"
|
||||
%
|
||||
|
||||
+2
-2
@@ -4850,7 +4850,7 @@ _int_free(mstate av, mchunkptr p)
|
||||
}
|
||||
|
||||
if (__builtin_expect (perturb_byte, 0))
|
||||
free_perturb (chunk2mem(p), size - SIZE_SZ);
|
||||
free_perturb (chunk2mem(p), size - 2 * SIZE_SZ);
|
||||
|
||||
set_fastchunks(av);
|
||||
unsigned int idx = fastbin_index(size);
|
||||
@@ -4954,7 +4954,7 @@ _int_free(mstate av, mchunkptr p)
|
||||
}
|
||||
|
||||
if (__builtin_expect (perturb_byte, 0))
|
||||
free_perturb (chunk2mem(p), size - SIZE_SZ);
|
||||
free_perturb (chunk2mem(p), size - 2 * SIZE_SZ);
|
||||
|
||||
/* consolidate backward */
|
||||
if (!prev_inuse(p)) {
|
||||
|
||||
+44
-8
@@ -1,5 +1,6 @@
|
||||
/* Standard debugging hooks for `malloc'.
|
||||
Copyright (C) 1990-1997,1999,2000-2002,2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-1997,1999,2000-2002,2007,2010
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written May 1989 by Mike Haertel.
|
||||
|
||||
@@ -24,7 +25,24 @@
|
||||
# include <mcheck.h>
|
||||
# include <stdint.h>
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <libintl.h>
|
||||
# include <errno.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. */
|
||||
@@ -197,7 +215,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;
|
||||
}
|
||||
|
||||
@@ -209,12 +227,18 @@ mallochook (__malloc_size_t size, const __ptr_t caller)
|
||||
if (pedantic)
|
||||
mcheck_check_all ();
|
||||
|
||||
if (size > ~((size_t) 0) - (sizeof (struct hdr) + 1))
|
||||
{
|
||||
__set_errno (ENOMEM);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
__malloc_hook = old_malloc_hook;
|
||||
if (old_malloc_hook != NULL)
|
||||
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;
|
||||
@@ -241,11 +265,17 @@ memalignhook (__malloc_size_t alignment, __malloc_size_t size,
|
||||
|
||||
slop = (sizeof *hdr + alignment - 1) & -alignment;
|
||||
|
||||
if (size > ~((size_t) 0) - (slop + 1))
|
||||
{
|
||||
__set_errno (ENOMEM);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
__memalign_hook = old_memalign_hook;
|
||||
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;
|
||||
@@ -276,6 +306,12 @@ reallochook (__ptr_t ptr, __malloc_size_t size, const __ptr_t caller)
|
||||
if (pedantic)
|
||||
mcheck_check_all ();
|
||||
|
||||
if (size > ~((size_t) 0) - (sizeof (struct hdr) + 1))
|
||||
{
|
||||
__set_errno (ENOMEM);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ptr)
|
||||
{
|
||||
hdr = ((struct hdr *) ptr) - 1;
|
||||
@@ -300,8 +336,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 +397,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;
|
||||
|
||||
+4
-1
@@ -232,7 +232,10 @@ ifdef objpfx
|
||||
.PHONY: stubs
|
||||
stubs: $(objpfx)stubs
|
||||
endif
|
||||
$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
|
||||
$(objpfx)stubs ../po/manual.pot:
|
||||
$(make-target-directory)
|
||||
touch $@
|
||||
$(objpfx)stamp%:
|
||||
$(make-target-directory)
|
||||
touch $@
|
||||
|
||||
|
||||
+2
-1
@@ -1407,7 +1407,8 @@ do not raise the inexact exception if @var{x} is not an integer.
|
||||
@comment ISO
|
||||
@deftypefunx {long double} roundl (long double @var{x})
|
||||
These functions are similar to @code{rint}, but they round halfway
|
||||
cases away from zero instead of to the nearest even integer.
|
||||
cases away from zero instead of to the nearest integer (or other
|
||||
current rounding mode).
|
||||
@end deftypefun
|
||||
|
||||
@comment math.h
|
||||
|
||||
+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
-1
@@ -1210,7 +1210,7 @@ This function would normally be used like this:
|
||||
/* @r{Prepare the @code{getline} call.} */
|
||||
line = NULL;
|
||||
len = 0;
|
||||
while (getline (&line, &len, stdout) >= 0)
|
||||
while (getline (&line, &len, stdin) >= 0)
|
||||
@{
|
||||
/* @r{Check the response.} */
|
||||
int res = rpmatch (line);
|
||||
|
||||
@@ -702,6 +702,11 @@ be allocated via @code{mmap}.
|
||||
@item M_MMAP_MAX
|
||||
The maximum number of chunks to allocate with @code{mmap}. Setting this
|
||||
to zero disables all use of @code{mmap}.
|
||||
@item M_PERTURB
|
||||
If non-zero, memory blocks are filled with values depending on some
|
||||
low order bits of this parameter when they are allocated (except when
|
||||
allocated by @code{calloc}) and freed. This can be used to debug the
|
||||
use of uninitialized or freed heap memory.
|
||||
@end table
|
||||
|
||||
@end deftypefun
|
||||
|
||||
+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,7 +25,7 @@
|
||||
# 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
|
||||
#
|
||||
# ADJUNCT_AS_SHADOW
|
||||
# If set to TRUE, the passwd routines in the NIS NSS module will not
|
||||
|
||||
@@ -474,18 +474,21 @@ internal_getgrent_r (ent_t *ent, char *buffer, size_t buflen, const char *user,
|
||||
/* If the selected module does not support getgrent_r or
|
||||
initgroups_dyn, abort. We cannot find the needed group
|
||||
entries. */
|
||||
if (nss_getgrent_r == NULL && nss_initgroups_dyn == NULL)
|
||||
if (nss_initgroups_dyn == NULL || nss_getgrgid_r == NULL)
|
||||
{
|
||||
if (nss_setgrent != NULL)
|
||||
{
|
||||
nss_setgrent (1);
|
||||
ent->need_endgrent = true;
|
||||
}
|
||||
ent->skip_initgroups_dyn = true;
|
||||
}
|
||||
|
||||
if (ent->skip_initgroups_dyn && nss_getgrent_r == NULL)
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
|
||||
ent->files = false;
|
||||
|
||||
if (nss_initgroups_dyn == NULL && nss_setgrent != NULL)
|
||||
{
|
||||
nss_setgrent (1);
|
||||
ent->need_endgrent = true;
|
||||
}
|
||||
ent->skip_initgroups_dyn = true;
|
||||
|
||||
return getgrent_next_nss (ent, buffer, buflen, user, group,
|
||||
start, size, groupsp, limit, errnop);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ get_uid (const char *user, uid_t *uidp)
|
||||
if (r != ERANGE)
|
||||
break;
|
||||
|
||||
extend_alloca (buf, buflen, 2 * buflen);
|
||||
buf = extend_alloca (buf, buflen, 2 * buflen);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -1,3 +1,57 @@
|
||||
2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
|
||||
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
|
||||
FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
|
||||
|
||||
2010-07-03 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* tst-abstime.c (do_test): Some more cleanups
|
||||
|
||||
2010-07-02 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* tst-abstime.c: Correct testing and add test for sem_timedwait.
|
||||
|
||||
2010-07-01 Andreas Schwab <schwab@redhat.com>
|
||||
Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* Makefile (tests): Add tst-abstime.
|
||||
* tst-abstime.c: New file.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
|
||||
(__lll_timedlock_wait): Check for timestamp before the Epoch.
|
||||
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
|
||||
(__lll_timedlock_wait): Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
|
||||
(__lll_robust_timedlock_wait): Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
|
||||
(__pthread_cond_timedwait): Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
|
||||
(pthread_rwlock_timedrdlock): Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
|
||||
(pthread_rwlock_timedwrlock): Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
|
||||
Likewise.
|
||||
|
||||
2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* nptl/sysdeps/unix/sysv/linux/i386/Makefile: New file.
|
||||
|
||||
2010-07-01 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
|
||||
|
||||
2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #12113]
|
||||
* sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
|
||||
* sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
|
||||
of "struct pthread".
|
||||
|
||||
2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
|
||||
location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
|
||||
|
||||
2010-04-09 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #11390]
|
||||
@@ -3884,6 +3938,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]
|
||||
@@ -4620,6 +4683,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.
|
||||
@@ -6694,6 +6762,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.
|
||||
|
||||
+11
-4
@@ -256,6 +256,7 @@ tests = tst-typesizes \
|
||||
tst-sched1 \
|
||||
tst-backtrace1 \
|
||||
tst-oddstacklimit \
|
||||
tst-abstime \
|
||||
tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
|
||||
tst-getpid1 tst-getpid2 tst-getpid3 \
|
||||
tst-initializers1 $(patsubst %,tst-initializers1-%,c89 gnu89 c99 gnu99)
|
||||
@@ -341,7 +342,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
|
||||
@@ -491,7 +493,8 @@ $(objpfx)tst-rwlock14: $(common-objpfx)rt/librt.so
|
||||
$(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so
|
||||
LDFLAGS-tst-_res1mod1.so = -Wl,-soname,tst-_res1mod1.so
|
||||
LDFLAGS-tst-_res1mod2.so = -Wl,-soname,tst-_res1mod2.so
|
||||
$(objpfx)tst-_res1: $(objpfx)tst-_res1mod2.so $(shared-thread-library)
|
||||
$(objpfx)tst-_res1: $(objpfx)tst-_res1mod1.so $(objpfx)tst-_res1mod2.so \
|
||||
$(shared-thread-library)
|
||||
else
|
||||
$(objpfx)tst-cond11: $(common-objpfx)rt/librt.a
|
||||
$(objpfx)tst-cond19: $(common-objpfx)rt/librt.a
|
||||
@@ -527,15 +530,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
|
||||
|
||||
@@ -189,4 +189,7 @@
|
||||
/* Typed memory objects are not available. */
|
||||
#define _POSIX_TYPED_MEMORY_OBJECTS -1
|
||||
|
||||
/* Streams are not available. */
|
||||
#define _XOPEN_STREAMS -1
|
||||
|
||||
#endif /* bits/posix_opt.h */
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
ifeq ($(subdir),nptl)
|
||||
CFLAGS-pt-initfini.s += -fno-asynchronous-unwind-tables
|
||||
endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002-2004,2006,2007,2009,2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@@ -188,6 +188,9 @@ __lll_timedlock_wait:
|
||||
je .Lreltmo
|
||||
# endif
|
||||
|
||||
cmpl $0, (%edx)
|
||||
js 8f
|
||||
|
||||
movl %ecx, %ebx
|
||||
movl %esi, %ecx
|
||||
movl %edx, %esi
|
||||
@@ -223,6 +226,9 @@ __lll_timedlock_wait:
|
||||
cfi_restore(%ebp)
|
||||
ret
|
||||
|
||||
8: movl $ETIMEDOUT, %eax
|
||||
jmp 7b
|
||||
|
||||
# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
||||
.Lreltmo:
|
||||
/* Check for a valid timeout value. */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002,2003,2004,2005,2007,2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002-2005,2007,2009,2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@@ -163,7 +163,6 @@ __pthread_cond_signal:
|
||||
#endif
|
||||
orl $FUTEX_WAKE, %ecx
|
||||
|
||||
xorl $(FUTEX_WAKE ^ FUTEX_WAKE_OP), %ecx
|
||||
movl $SYS_futex, %eax
|
||||
/* %edx should be 1 already from $FUTEX_WAKE_OP syscall.
|
||||
movl $1, %edx */
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#include_next <kernel-features.h>
|
||||
|
||||
/* NPTL can always assume all clone thread flags work. */
|
||||
#ifndef __ASSUME_CLONE_THREAD_FLAGS
|
||||
# define __ASSUME_CLONE_THREAD_FLAGS 1
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
|
||||
/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -282,6 +282,7 @@ __lll_timedlock_wait:
|
||||
rts
|
||||
mov.l @r15+, r12
|
||||
|
||||
# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
||||
.align 2
|
||||
# ifdef PIC
|
||||
.Lgot:
|
||||
@@ -293,7 +294,6 @@ __lll_timedlock_wait:
|
||||
.long __have_futex_clock_realtime
|
||||
# endif
|
||||
|
||||
# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
||||
.Lreltmo:
|
||||
/* Check for a valid timeout value. */
|
||||
mov.l @(4,r6), r1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002-2006, 2007, 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@@ -169,9 +169,13 @@ __lll_timedlock_wait:
|
||||
je .Lreltmo
|
||||
# endif
|
||||
|
||||
cmpq $0, (%rdx)
|
||||
js 5f
|
||||
|
||||
pushq %r9
|
||||
cfi_adjust_cfa_offset(8)
|
||||
cfi_rel_offset(%r9, 0)
|
||||
|
||||
movq %rdx, %r10
|
||||
movl $0xffffffff, %r9d
|
||||
LOAD_FUTEX_WAIT_ABS (%esi)
|
||||
@@ -202,6 +206,9 @@ __lll_timedlock_wait:
|
||||
cfi_restore(%r9)
|
||||
retq
|
||||
|
||||
5: movl $ETIMEDOUT, %eax
|
||||
retq
|
||||
|
||||
# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
||||
.Lreltmo:
|
||||
/* Check for a valid timeout value. */
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009
|
||||
Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002=2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@@ -125,6 +124,9 @@ __lll_robust_timedlock_wait:
|
||||
je .Lreltmo
|
||||
# endif
|
||||
|
||||
cmpq $0, (%rdx)
|
||||
js 7f
|
||||
|
||||
pushq %r9
|
||||
cfi_adjust_cfa_offset(8)
|
||||
cfi_rel_offset(%r9, 0)
|
||||
@@ -180,6 +182,9 @@ __lll_robust_timedlock_wait:
|
||||
cfi_adjust_cfa_offset(-8)
|
||||
cfi_restore(%r9)
|
||||
|
||||
7: movl $ETIMEDOUT, %eax
|
||||
retq
|
||||
|
||||
|
||||
# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
||||
.Lreltmo:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002-2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@@ -144,6 +144,10 @@ __pthread_cond_timedwait:
|
||||
movq %r9, 24(%rsp)
|
||||
movl %edx, 4(%rsp)
|
||||
|
||||
cmpq $0, (%r13)
|
||||
movq $-ETIMEDOUT, %r14
|
||||
js 36f
|
||||
|
||||
38: movl cond_futex(%rdi), %r12d
|
||||
|
||||
/* Unlock. */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002-2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@@ -102,6 +102,9 @@ pthread_rwlock_timedrdlock:
|
||||
je .Lreltmo
|
||||
#endif
|
||||
|
||||
cmpq $0, (%r13)
|
||||
js 16f /* Time is already up. */
|
||||
|
||||
movl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %esi
|
||||
xorl PSHARED(%r12), %esi
|
||||
movq %r13, %r10
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@@ -99,6 +99,9 @@ pthread_rwlock_timedwrlock:
|
||||
je .Lreltmo
|
||||
#endif
|
||||
|
||||
cmpq $0, (%r13)
|
||||
js 16f /* Time is already up. */
|
||||
|
||||
movl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %esi
|
||||
xorl PSHARED(%r12), %esi
|
||||
movq %r13, %r10
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002,2003,2005,2007,2009,2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@@ -77,6 +77,9 @@ sem_timedwait:
|
||||
je .Lreltmo
|
||||
#endif
|
||||
|
||||
cmpq $0, (%rsi)
|
||||
js 16f
|
||||
|
||||
/* This push is only needed to store the sem_t pointer for the
|
||||
exception handler. */
|
||||
pushq %rdi
|
||||
@@ -169,6 +172,19 @@ sem_timedwait:
|
||||
|
||||
retq
|
||||
|
||||
16:
|
||||
#if USE___THREAD
|
||||
movq errno@gottpoff(%rip), %rdx
|
||||
movl $ETIMEDOUT, %fs:(%rdx)
|
||||
#else
|
||||
callq __errno_location@plt
|
||||
movl $ETIMEDOUT, (%rax)
|
||||
#endif
|
||||
|
||||
orl $-1, %eax
|
||||
|
||||
retq
|
||||
|
||||
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
|
||||
.Lreltmo:
|
||||
pushq %r12
|
||||
|
||||
@@ -27,8 +27,9 @@
|
||||
/* Minimal stack size after allocating thread descriptor and guard size. */
|
||||
#define MINIMAL_REST_STACK 2048
|
||||
|
||||
/* Alignment requirement for TCB. */
|
||||
#define TCB_ALIGNMENT 16
|
||||
/* Alignment requirement for TCB. Need to store post-AVX vector registers
|
||||
in the TCB and we want the storage to be aligned at 32-byte. */
|
||||
#define TCB_ALIGNMENT 32
|
||||
|
||||
|
||||
/* Location of current stack frame. The frame pointer is not usable. */
|
||||
|
||||
@@ -117,12 +117,7 @@ typedef struct
|
||||
# define TLS_TCB_SIZE sizeof (struct pthread)
|
||||
|
||||
/* Alignment requirements for the TCB. */
|
||||
//# define TLS_TCB_ALIGN __alignof__ (struct pthread)
|
||||
// Normally the above would be correct But we have to store post-AVX
|
||||
// vector registers in the TCB and we want the storage to be aligned.
|
||||
// unfortunately there isn't yet a type for these values and hence no
|
||||
// 32-byte alignment requirement. Make this explicit, for now.
|
||||
# define TLS_TCB_ALIGN 32
|
||||
# define TLS_TCB_ALIGN __alignof__ (struct pthread)
|
||||
|
||||
/* The TCB can have any size and the memory following the address the
|
||||
thread pointer points to is unspecified. Allocate the TCB there. */
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
/* Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Andreas Schwab <schwab@redhat.com>, 2010.
|
||||
|
||||
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; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static pthread_cond_t c = PTHREAD_COND_INITIALIZER;
|
||||
static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_rwlock_t rw1 = PTHREAD_RWLOCK_INITIALIZER;
|
||||
static pthread_rwlock_t rw2 = PTHREAD_RWLOCK_INITIALIZER;
|
||||
static sem_t sem;
|
||||
|
||||
static void *
|
||||
th (void *arg)
|
||||
{
|
||||
long int res = 0;
|
||||
int r;
|
||||
struct timespec t = { -2, 0 };
|
||||
|
||||
r = pthread_mutex_timedlock (&m1, &t);
|
||||
if (r != ETIMEDOUT)
|
||||
{
|
||||
puts ("pthread_mutex_timedlock did not return ETIMEDOUT");
|
||||
res = 1;
|
||||
}
|
||||
r = pthread_rwlock_timedrdlock (&rw1, &t);
|
||||
if (r != ETIMEDOUT)
|
||||
{
|
||||
puts ("pthread_rwlock_timedrdlock did not return ETIMEDOUT");
|
||||
res = 1;
|
||||
}
|
||||
r = pthread_rwlock_timedwrlock (&rw2, &t);
|
||||
if (r != ETIMEDOUT)
|
||||
{
|
||||
puts ("pthread_rwlock_timedwrlock did not return ETIMEDOUT");
|
||||
res = 1;
|
||||
}
|
||||
return (void *) res;
|
||||
}
|
||||
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
int res = 0;
|
||||
int r;
|
||||
struct timespec t = { -2, 0 };
|
||||
pthread_t pth;
|
||||
|
||||
sem_init (&sem, 0, 0);
|
||||
r = sem_timedwait (&sem, &t);
|
||||
if (r != -1 || errno != ETIMEDOUT)
|
||||
{
|
||||
puts ("sem_timedwait did not fail with ETIMEDOUT");
|
||||
res = 1;
|
||||
}
|
||||
|
||||
pthread_mutex_lock (&m1);
|
||||
pthread_rwlock_wrlock (&rw1);
|
||||
pthread_rwlock_rdlock (&rw2);
|
||||
pthread_mutex_lock (&m2);
|
||||
if (pthread_create (&pth, 0, th, 0) != 0)
|
||||
{
|
||||
puts ("cannot create thread");
|
||||
return 1;
|
||||
}
|
||||
r = pthread_cond_timedwait (&c, &m2, &t);
|
||||
if (r != ETIMEDOUT)
|
||||
{
|
||||
puts ("pthread_cond_timedwait did not return ETIMEDOUT");
|
||||
res = 1;
|
||||
}
|
||||
void *thres;
|
||||
pthread_join (pth, &thres);
|
||||
return res | (thres != NULL);
|
||||
}
|
||||
|
||||
|
||||
#define TEST_FUNCTION do_test ()
|
||||
#include "../test-skeleton.c"
|
||||
@@ -190,17 +190,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");
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
# logfile /var/log/nscd.log
|
||||
# threads 4
|
||||
# max-threads 32
|
||||
# server-user nobody
|
||||
server-user nscd
|
||||
# stat-user somebody
|
||||
debug-level 0
|
||||
# reload-count 5
|
||||
|
||||
+13
-21
@@ -9,6 +9,7 @@
|
||||
# slow naming services like NIS, NIS+, LDAP, or hesiod.
|
||||
# processname: /usr/sbin/nscd
|
||||
# config: /etc/nscd.conf
|
||||
# config: /etc/sysconfig/nscd
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: nscd
|
||||
@@ -28,20 +29,8 @@
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
# nscd does not run on any kernel lower than 2.2.0 because of threading
|
||||
# problems, so we require that in first place.
|
||||
case $(uname -r) in
|
||||
2.[2-9].*)
|
||||
# this is okay
|
||||
;;
|
||||
[3-9]*)
|
||||
# these are of course also okay
|
||||
;;
|
||||
*)
|
||||
#this is not
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
# Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS.
|
||||
[ -r /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd
|
||||
|
||||
RETVAL=0
|
||||
prog=nscd
|
||||
@@ -50,7 +39,7 @@ start () {
|
||||
[ -d /var/run/nscd ] || mkdir /var/run/nscd
|
||||
[ -d /var/db/nscd ] || mkdir /var/db/nscd
|
||||
echo -n $"Starting $prog: "
|
||||
daemon /usr/sbin/nscd
|
||||
daemon /usr/sbin/nscd $NSCD_OPTIONS
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
|
||||
@@ -83,11 +72,11 @@ restart() {
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
[ -e /var/lock/subsys/nscd ] || start
|
||||
RETVAL=$?
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
[ ! -e /var/lock/subsys/nscd ] || stop
|
||||
RETVAL=$?
|
||||
;;
|
||||
status)
|
||||
@@ -99,14 +88,17 @@ case "$1" in
|
||||
RETVAL=$?
|
||||
;;
|
||||
try-restart | condrestart)
|
||||
[ -e /var/lock/subsys/nscd ] && restart
|
||||
[ ! -e /var/lock/subsys/nscd ] || restart
|
||||
RETVAL=$?
|
||||
;;
|
||||
force-reload | reload)
|
||||
echo -n $"Reloading $prog: "
|
||||
killproc /usr/sbin/nscd -HUP
|
||||
RETVAL=$?
|
||||
echo
|
||||
RETVAL=0
|
||||
/usr/sbin/nscd -i passwd || RETVAL=$?
|
||||
/usr/sbin/nscd -i group || RETVAL=$?
|
||||
/usr/sbin/nscd -i hosts || RETVAL=$?
|
||||
/usr/sbin/nscd -i services || RETVAL=$?
|
||||
echo
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
|
||||
|
||||
+20
-15
@@ -82,7 +82,7 @@ tests := tstgetopt testfnm runtests runptests \
|
||||
bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
|
||||
bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
|
||||
bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
|
||||
bug-regex29 bug-regex30 \
|
||||
bug-regex29 bug-regex30 bug-regex31 \
|
||||
tst-nice tst-nanosleep tst-regex2 \
|
||||
transbug tst-rxspencer tst-pcre tst-boost \
|
||||
bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
|
||||
@@ -111,10 +111,12 @@ generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
|
||||
annexc annexc.out wordexp-tst.out bug-regex2-mem \
|
||||
bug-regex2.mtrace bug-regex14-mem bug-regex14.mtrace \
|
||||
bug-regex21-mem bug-regex21.mtrace \
|
||||
bug-regex31-mem bug-regex31.mtrace \
|
||||
tst-rxspencer-mem tst-rxspencer.mtrace tst-getconf.out \
|
||||
tst-pcre-mem tst-pcre.mtrace tst-boost-mem tst-boost.mtrace \
|
||||
bug-ga2.mtrace bug-ga2-mem bug-glob2.mtrace bug-glob2-mem \
|
||||
tst-vfork3-mem tst-vfork3.mtrace getconf.speclist
|
||||
tst-vfork3-mem tst-vfork3.mtrace getconf.speclist \
|
||||
tst-fnmatch-mem tst-fnmatch.mtrace
|
||||
|
||||
include ../Rules
|
||||
|
||||
@@ -224,9 +226,9 @@ endif
|
||||
tests: $(objpfx)annexc.out
|
||||
ifeq (no,$(cross-compiling))
|
||||
tests: $(objpfx)bug-regex2-mem $(objpfx)bug-regex14-mem \
|
||||
$(objpfx)bug-regex21-mem $(objpfx)tst-rxspencer-mem \
|
||||
$(objpfx)bug-regex21-mem $(objpfx)bug-regex31-mem $(objpfx)tst-rxspencer-mem\
|
||||
$(objpfx)tst-pcre-mem $(objpfx)tst-boost-mem $(objpfx)tst-getconf.out \
|
||||
$(objpfx)bug-glob2-mem $(objpfx)tst-vfork3-mem
|
||||
$(objpfx)bug-glob2-mem $(objpfx)tst-vfork3-mem $(objpfx)tst-fnmatch-mem
|
||||
xtests: $(objpfx)bug-ga2-mem
|
||||
endif
|
||||
|
||||
@@ -238,6 +240,11 @@ annexc-CFLAGS = -O
|
||||
$(objpfx)annexc: annexc.c
|
||||
$(native-compile)
|
||||
|
||||
tst-fnmatch-ENV += MALLOC_TRACE=$(objpfx)tst-fnmatch.mtrace
|
||||
|
||||
$(objpfx)tst-fnmatch-mem: $(objpfx)tst-fnmatch.out
|
||||
$(common-objpfx)malloc/mtrace $(objpfx)tst-fnmatch.mtrace > $@
|
||||
|
||||
bug-regex2-ENV = MALLOC_TRACE=$(objpfx)bug-regex2.mtrace
|
||||
|
||||
$(objpfx)bug-regex2-mem: $(objpfx)bug-regex2.out
|
||||
@@ -253,6 +260,11 @@ bug-regex21-ENV = MALLOC_TRACE=$(objpfx)bug-regex21.mtrace
|
||||
$(objpfx)bug-regex21-mem: $(objpfx)bug-regex21.out
|
||||
$(common-objpfx)malloc/mtrace $(objpfx)bug-regex21.mtrace > $@
|
||||
|
||||
bug-regex31-ENV = MALLOC_TRACE=$(objpfx)bug-regex31.mtrace
|
||||
|
||||
$(objpfx)bug-regex31-mem: $(objpfx)bug-regex31.out
|
||||
$(common-objpfx)malloc/mtrace $(objpfx)bug-regex31.mtrace > $@
|
||||
|
||||
tst-vfork3-ENV = MALLOC_TRACE=$(objpfx)tst-vfork3.mtrace
|
||||
|
||||
$(objpfx)tst-vfork3-mem: $(objpfx)tst-vfork3.out
|
||||
@@ -305,15 +317,8 @@ $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
|
||||
mv -f $@/$$spec.new $@/$$spec; \
|
||||
done < $(objpfx)getconf.speclist
|
||||
|
||||
$(objpfx)getconf.speclist: $(objpfx)getconf
|
||||
ifeq (no,$(cross-compiling))
|
||||
LC_ALL=C GETCONF_DIR=/dev/null \
|
||||
$(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
|
||||
LC_ALL=C GETCONF_DIR=/dev/null \
|
||||
$(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
|
||||
LC_ALL=C GETCONF_DIR=/dev/null \
|
||||
$(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
|
||||
else
|
||||
> $@.new
|
||||
endif
|
||||
$(objpfx)getconf.speclist: getconf.speclist.h
|
||||
$(CC) -E $(CFLAGS) $(CPPFLAGS) $< \
|
||||
| sed -n -e '/START_OF_STRINGS/,$${/\(POSIX_V[67]\|_XBS5\)_/{s/^[^"]*"//;s/".*$$//;p}}' \
|
||||
> $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#include <mcheck.h>
|
||||
#include <regex.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
mtrace ();
|
||||
|
||||
int res = 0;
|
||||
char *buf = NULL;
|
||||
size_t len = 0;
|
||||
while (! feof (stdin))
|
||||
{
|
||||
ssize_t n = getline (&buf, &len, stdin);
|
||||
if (n <= 0)
|
||||
break;
|
||||
if (buf[n - 1] == '\n')
|
||||
buf[n - 1] = '\0';
|
||||
|
||||
regex_t regex;
|
||||
int rc = regcomp (®ex, buf, REG_EXTENDED);
|
||||
if (rc != 0)
|
||||
printf ("%s: Error %d (expected)\n", buf, rc);
|
||||
else
|
||||
{
|
||||
printf ("%s: succeeded !\n", buf);
|
||||
res = 1;
|
||||
}
|
||||
}
|
||||
|
||||
free (buf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
[[][
|
||||
([0]
|
||||
([0]a
|
||||
([0]([0])
|
||||
+44
-13
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2007
|
||||
/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2007,2010
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -41,6 +41,12 @@
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# include <alloca.h>
|
||||
#else
|
||||
# define alloca_account(size., var) alloca (size)
|
||||
#endif
|
||||
|
||||
/* For platform which support the ISO C amendement 1 functionality we
|
||||
support user defined character classes. */
|
||||
#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||
@@ -330,8 +336,11 @@ fnmatch (pattern, string, flags)
|
||||
mbstate_t ps;
|
||||
size_t n;
|
||||
const char *p;
|
||||
wchar_t *wpattern_malloc = NULL;
|
||||
wchar_t *wpattern;
|
||||
wchar_t *wstring_malloc = NULL;
|
||||
wchar_t *wstring;
|
||||
size_t alloca_used = 0;
|
||||
|
||||
/* Convert the strings into wide characters. */
|
||||
memset (&ps, '\0', sizeof (ps));
|
||||
@@ -343,7 +352,8 @@ fnmatch (pattern, string, flags)
|
||||
#endif
|
||||
if (__builtin_expect (n < 1024, 1))
|
||||
{
|
||||
wpattern = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
|
||||
wpattern = (wchar_t *) alloca_account ((n + 1) * sizeof (wchar_t),
|
||||
alloca_used);
|
||||
n = mbsrtowcs (wpattern, &p, n + 1, &ps);
|
||||
if (__builtin_expect (n == (size_t) -1, 0))
|
||||
/* Something wrong.
|
||||
@@ -365,8 +375,11 @@ fnmatch (pattern, string, flags)
|
||||
XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
already done? */
|
||||
return -1;
|
||||
wpattern = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
|
||||
wpattern_malloc = wpattern
|
||||
= (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
|
||||
assert (mbsinit (&ps));
|
||||
if (wpattern == NULL)
|
||||
return -2;
|
||||
(void) mbsrtowcs (wpattern, &pattern, n + 1, &ps);
|
||||
}
|
||||
|
||||
@@ -379,13 +392,18 @@ fnmatch (pattern, string, flags)
|
||||
p = string;
|
||||
if (__builtin_expect (n < 1024, 1))
|
||||
{
|
||||
wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
|
||||
wstring = (wchar_t *) alloca_account ((n + 1) * sizeof (wchar_t),
|
||||
alloca_used);
|
||||
n = mbsrtowcs (wstring, &p, n + 1, &ps);
|
||||
if (__builtin_expect (n == (size_t) -1, 0))
|
||||
/* Something wrong.
|
||||
XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
already done? */
|
||||
return -1;
|
||||
{
|
||||
/* Something wrong.
|
||||
XXX Do we have to set `errno' to something which
|
||||
mbsrtows hasn't already done? */
|
||||
free_return:
|
||||
free (wpattern_malloc);
|
||||
return -1;
|
||||
}
|
||||
if (p)
|
||||
{
|
||||
memset (&ps, '\0', sizeof (ps));
|
||||
@@ -400,19 +418,32 @@ fnmatch (pattern, string, flags)
|
||||
/* Something wrong.
|
||||
XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
already done? */
|
||||
return -1;
|
||||
wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
|
||||
goto free_return;
|
||||
|
||||
wstring_malloc = wstring
|
||||
= (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
|
||||
if (wstring == NULL)
|
||||
{
|
||||
free (wpattern_malloc);
|
||||
return -2;
|
||||
}
|
||||
assert (mbsinit (&ps));
|
||||
(void) mbsrtowcs (wstring, &string, n + 1, &ps);
|
||||
}
|
||||
|
||||
return internal_fnwmatch (wpattern, wstring, wstring + n,
|
||||
flags & FNM_PERIOD, flags, NULL);
|
||||
int res = internal_fnwmatch (wpattern, wstring, wstring + n,
|
||||
flags & FNM_PERIOD, flags, NULL,
|
||||
alloca_used);
|
||||
|
||||
free (wstring_malloc);
|
||||
free (wpattern_malloc);
|
||||
|
||||
return res;
|
||||
}
|
||||
# endif /* mbstate_t and mbsrtowcs or _LIBC. */
|
||||
|
||||
return internal_fnmatch (pattern, string, string + strlen (string),
|
||||
flags & FNM_PERIOD, flags, NULL);
|
||||
flags & FNM_PERIOD, flags, NULL, 0);
|
||||
}
|
||||
|
||||
# ifdef _LIBC
|
||||
|
||||
+82
-48
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991-1993,1996-2001,2003-2005,2007
|
||||
/* Copyright (C) 1991-1993,1996-2001,2003-2005,2007,2010
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -28,22 +28,24 @@ struct STRUCT
|
||||
it matches, nonzero if not. */
|
||||
static int FCT (const CHAR *pattern, const CHAR *string,
|
||||
const CHAR *string_end, int no_leading_period, int flags,
|
||||
struct STRUCT *ends)
|
||||
struct STRUCT *ends, size_t alloca_used)
|
||||
internal_function;
|
||||
static int EXT (INT opt, const CHAR *pattern, const CHAR *string,
|
||||
const CHAR *string_end, int no_leading_period, int flags)
|
||||
const CHAR *string_end, int no_leading_period, int flags,
|
||||
size_t alloca_used)
|
||||
internal_function;
|
||||
static const CHAR *END (const CHAR *patternp) internal_function;
|
||||
|
||||
static int
|
||||
internal_function
|
||||
FCT (pattern, string, string_end, no_leading_period, flags, ends)
|
||||
FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
|
||||
const CHAR *pattern;
|
||||
const CHAR *string;
|
||||
const CHAR *string_end;
|
||||
int no_leading_period;
|
||||
int flags;
|
||||
struct STRUCT *ends;
|
||||
size_t alloca_used;
|
||||
{
|
||||
register const CHAR *p = pattern, *n = string;
|
||||
register UCHAR c;
|
||||
@@ -67,10 +69,8 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends)
|
||||
case L('?'):
|
||||
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
|
||||
{
|
||||
int res;
|
||||
|
||||
res = EXT (c, p, n, string_end, no_leading_period,
|
||||
flags);
|
||||
int res = EXT (c, p, n, string_end, no_leading_period,
|
||||
flags, alloca_used);
|
||||
if (res != -1)
|
||||
return res;
|
||||
}
|
||||
@@ -99,10 +99,8 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends)
|
||||
case L('*'):
|
||||
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
|
||||
{
|
||||
int res;
|
||||
|
||||
res = EXT (c, p, n, string_end, no_leading_period,
|
||||
flags);
|
||||
int res = EXT (c, p, n, string_end, no_leading_period,
|
||||
flags, alloca_used);
|
||||
if (res != -1)
|
||||
return res;
|
||||
}
|
||||
@@ -191,7 +189,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends)
|
||||
|
||||
for (--p; n < endp; ++n, no_leading_period = 0)
|
||||
if (FCT (p, n, string_end, no_leading_period, flags2,
|
||||
&end) == 0)
|
||||
&end, alloca_used) == 0)
|
||||
goto found;
|
||||
}
|
||||
else if (c == L('/') && (flags & FNM_FILE_NAME))
|
||||
@@ -200,7 +198,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends)
|
||||
++n;
|
||||
if (n < string_end && *n == L('/')
|
||||
&& (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags,
|
||||
NULL) == 0))
|
||||
NULL, alloca_used) == 0))
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
@@ -214,7 +212,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends)
|
||||
for (--p; n < endp; ++n, no_leading_period = 0)
|
||||
if (FOLD ((UCHAR) *n) == c
|
||||
&& (FCT (p, n, string_end, no_leading_period, flags2,
|
||||
&end) == 0))
|
||||
&end, alloca_used) == 0))
|
||||
{
|
||||
found:
|
||||
if (end.pattern == NULL)
|
||||
@@ -749,7 +747,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends)
|
||||
_NL_COLLATE_SYMB_EXTRAMB);
|
||||
|
||||
/* Locate the character in the hashing
|
||||
table. */
|
||||
table. */
|
||||
hash = elem_hash (str, c1);
|
||||
|
||||
idx = 0;
|
||||
@@ -971,9 +969,8 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends)
|
||||
case L('!'):
|
||||
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
|
||||
{
|
||||
int res;
|
||||
|
||||
res = EXT (c, p, n, string_end, no_leading_period, flags);
|
||||
int res = EXT (c, p, n, string_end, no_leading_period, flags,
|
||||
alloca_used);
|
||||
if (res != -1)
|
||||
return res;
|
||||
}
|
||||
@@ -1052,26 +1049,32 @@ END (const CHAR *pattern)
|
||||
static int
|
||||
internal_function
|
||||
EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|
||||
int no_leading_period, int flags)
|
||||
int no_leading_period, int flags, size_t alloca_used)
|
||||
{
|
||||
const CHAR *startp;
|
||||
int level;
|
||||
struct patternlist
|
||||
{
|
||||
struct patternlist *next;
|
||||
CHAR malloced;
|
||||
CHAR str[0];
|
||||
} *list = NULL;
|
||||
struct patternlist **lastp = &list;
|
||||
size_t pattern_len = STRLEN (pattern);
|
||||
int any_malloced = 0;
|
||||
const CHAR *p;
|
||||
const CHAR *rs;
|
||||
int retval = 0;
|
||||
|
||||
/* Parse the pattern. Store the individual parts in the list. */
|
||||
level = 0;
|
||||
for (startp = p = pattern + 1; level >= 0; ++p)
|
||||
if (*p == L('\0'))
|
||||
/* This is an invalid pattern. */
|
||||
return -1;
|
||||
{
|
||||
/* This is an invalid pattern. */
|
||||
retval = -1;
|
||||
goto out;
|
||||
}
|
||||
else if (*p == L('['))
|
||||
{
|
||||
/* Handle brackets special. */
|
||||
@@ -1088,8 +1091,11 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|
||||
/* Skip over all characters of the list. */
|
||||
while (*p != L(']'))
|
||||
if (*p++ == L('\0'))
|
||||
/* This is no valid pattern. */
|
||||
return -1;
|
||||
{
|
||||
/* This is no valid pattern. */
|
||||
retval = -1;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
else if ((*p == L('?') || *p == L('*') || *p == L('+') || *p == L('@')
|
||||
|| *p == L('!')) && p[1] == L('('))
|
||||
@@ -1102,15 +1108,25 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|
||||
/* This means we found the end of the pattern. */
|
||||
#define NEW_PATTERN \
|
||||
struct patternlist *newp; \
|
||||
\
|
||||
if (opt == L('?') || opt == L('@')) \
|
||||
newp = alloca (sizeof (struct patternlist) \
|
||||
+ (pattern_len * sizeof (CHAR))); \
|
||||
size_t slen = (opt == L('?') || opt == L('@') \
|
||||
? pattern_len : (p - startp + 1)); \
|
||||
slen = sizeof (struct patternlist) + (slen * sizeof (CHAR)); \
|
||||
int malloced = ! __libc_use_alloca (alloca_used + slen); \
|
||||
if (__builtin_expect (malloced, 0)) \
|
||||
{ \
|
||||
newp = malloc (slen); \
|
||||
if (newp == NULL) \
|
||||
{ \
|
||||
retval = -2; \
|
||||
goto out; \
|
||||
} \
|
||||
any_malloced = 1; \
|
||||
} \
|
||||
else \
|
||||
newp = alloca (sizeof (struct patternlist) \
|
||||
+ ((p - startp + 1) * sizeof (CHAR))); \
|
||||
*((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L('\0'); \
|
||||
newp = alloca_account (slen, alloca_used); \
|
||||
newp->next = NULL; \
|
||||
newp->malloced = malloced; \
|
||||
*((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L('\0'); \
|
||||
*lastp = newp; \
|
||||
lastp = &newp->next
|
||||
NEW_PATTERN;
|
||||
@@ -1131,8 +1147,9 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|
||||
switch (opt)
|
||||
{
|
||||
case L('*'):
|
||||
if (FCT (p, string, string_end, no_leading_period, flags, NULL) == 0)
|
||||
return 0;
|
||||
if (FCT (p, string, string_end, no_leading_period, flags, NULL,
|
||||
alloca_used) == 0)
|
||||
goto success;
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case L('+'):
|
||||
@@ -1143,7 +1160,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|
||||
current pattern. */
|
||||
if (FCT (list->str, string, rs, no_leading_period,
|
||||
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
|
||||
NULL) == 0
|
||||
NULL, alloca_used) == 0
|
||||
/* This was successful. Now match the rest with the rest
|
||||
of the pattern. */
|
||||
&& (FCT (p, rs, string_end,
|
||||
@@ -1151,7 +1168,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|
||||
? no_leading_period
|
||||
: rs[-1] == '/' && NO_LEADING_PERIOD (flags) ? 1 : 0,
|
||||
flags & FNM_FILE_NAME
|
||||
? flags : flags & ~FNM_PERIOD, NULL) == 0
|
||||
? flags : flags & ~FNM_PERIOD, NULL, alloca_used) == 0
|
||||
/* This didn't work. Try the whole pattern. */
|
||||
|| (rs != string
|
||||
&& FCT (pattern - 1, rs, string_end,
|
||||
@@ -1160,18 +1177,21 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|
||||
: (rs[-1] == '/' && NO_LEADING_PERIOD (flags)
|
||||
? 1 : 0),
|
||||
flags & FNM_FILE_NAME
|
||||
? flags : flags & ~FNM_PERIOD, NULL) == 0)))
|
||||
? flags : flags & ~FNM_PERIOD, NULL,
|
||||
alloca_used) == 0)))
|
||||
/* It worked. Signal success. */
|
||||
return 0;
|
||||
goto success;
|
||||
}
|
||||
while ((list = list->next) != NULL);
|
||||
|
||||
/* None of the patterns lead to a match. */
|
||||
return FNM_NOMATCH;
|
||||
retval = FNM_NOMATCH;
|
||||
break;
|
||||
|
||||
case L('?'):
|
||||
if (FCT (p, string, string_end, no_leading_period, flags, NULL) == 0)
|
||||
return 0;
|
||||
if (FCT (p, string, string_end, no_leading_period, flags, NULL,
|
||||
alloca_used) == 0)
|
||||
goto success;
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case L('@'):
|
||||
@@ -1183,13 +1203,14 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|
||||
if (FCT (STRCAT (list->str, p), string, string_end,
|
||||
no_leading_period,
|
||||
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
|
||||
NULL) == 0)
|
||||
NULL, alloca_used) == 0)
|
||||
/* It worked. Signal success. */
|
||||
return 0;
|
||||
goto success;
|
||||
while ((list = list->next) != NULL);
|
||||
|
||||
/* None of the patterns lead to a match. */
|
||||
return FNM_NOMATCH;
|
||||
retval = FNM_NOMATCH;
|
||||
break;
|
||||
|
||||
case L('!'):
|
||||
for (rs = string; rs <= string_end; ++rs)
|
||||
@@ -1199,7 +1220,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|
||||
for (runp = list; runp != NULL; runp = runp->next)
|
||||
if (FCT (runp->str, string, rs, no_leading_period,
|
||||
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
|
||||
NULL) == 0)
|
||||
NULL, alloca_used) == 0)
|
||||
break;
|
||||
|
||||
/* If none of the patterns matched see whether the rest does. */
|
||||
@@ -1209,21 +1230,34 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|
||||
? no_leading_period
|
||||
: rs[-1] == '/' && NO_LEADING_PERIOD (flags) ? 1 : 0,
|
||||
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
|
||||
NULL) == 0))
|
||||
NULL, alloca_used) == 0))
|
||||
/* This is successful. */
|
||||
return 0;
|
||||
goto success;
|
||||
}
|
||||
|
||||
/* None of the patterns together with the rest of the pattern
|
||||
lead to a match. */
|
||||
return FNM_NOMATCH;
|
||||
retval = FNM_NOMATCH;
|
||||
break;
|
||||
|
||||
default:
|
||||
assert (! "Invalid extended matching operator");
|
||||
retval = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
return -1;
|
||||
success:
|
||||
out:
|
||||
if (any_malloced)
|
||||
while (list != NULL)
|
||||
{
|
||||
struct patternlist *old = list;
|
||||
list = list->next;
|
||||
if (old->malloced)
|
||||
free (old);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user