mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-09 05:59:27 +08:00
Compare commits
378
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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,7 +1,7 @@
|
||||
List of known bugs (certainly very incomplete)
|
||||
----------------------------------------------
|
||||
|
||||
Time-stamp: <02/09/30 13:49:48 drepper>
|
||||
Time-stamp: <2005-09-23 13:25:42 drepper>
|
||||
|
||||
This following list contains those bugs which I'm aware of. Please
|
||||
make sure that bugs you report are not listed here. If you can fix one
|
||||
@@ -10,7 +10,7 @@ of these bugs/limitations I'll certainly be glad to receive a patch.
|
||||
Another source of information about bugs is the problem data base of the
|
||||
GNU project. There is an easy to use WWW interface available at
|
||||
|
||||
http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl
|
||||
http://sourceware.org/bugzilla/
|
||||
|
||||
I would appreciate it very much if you could verify the problem was not
|
||||
reported before by looking through the database. To make the information
|
||||
@@ -27,19 +27,9 @@ Severity: [ *] to [***]
|
||||
[ **] Closing shared objects in statically linked binaries most of the
|
||||
times leads to crashes during the dlopen(). Hard to fix.
|
||||
|
||||
[ **] There are problems with signal handling when using LinuxThreads.
|
||||
|
||||
[ **] The RPC code is not 64 bit clean. This is getting slowly fixed
|
||||
but expect incompatible changes on 64 bit platforms like Alpha.
|
||||
|
||||
[ **] If a DSO is using implicitly libpthread and the application itself
|
||||
does not there is a name lookup problem. E.g., the function fork()
|
||||
will be found in the libc.so instead of libpthread since the thread
|
||||
library is behind the libc. To correct this problem it must *not*
|
||||
be relied on the currently still enabled handling of weak symbols
|
||||
in the dynamic linker. Instead explicit tests for the availability
|
||||
of the libpthread version are needed. [PR libc/2325]
|
||||
|
||||
[ *] The precision of the `sinhl' and/or `asinhl' function do not seem
|
||||
to be the best.
|
||||
|
||||
|
||||
@@ -1352,6 +1352,11 @@
|
||||
* sysdeps/unix/sysv/linux/mips/sys/tas.h: Add missing .mips0 at the
|
||||
end of inline assembler code.
|
||||
|
||||
2000-10-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sunrpc/svc_udp.c (svcudp_recv): Set msg_controllen to all
|
||||
remaining xp_pad space.
|
||||
|
||||
2000-10-02 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* include/features.h [__USE_FILE_OFFSET && !__REDIRECT]: Define
|
||||
@@ -9280,6 +9285,12 @@
|
||||
syscall.
|
||||
* sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise.
|
||||
|
||||
2000-05-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* resolv/res_query.c (res_nsearch): Remove unused variable
|
||||
root_on_list. If dots >= statp->ndots and as is querydomain
|
||||
fails, keep searching.
|
||||
|
||||
2000-05-30 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/alpha/oldglob.c (__old_glob): Loose __P.
|
||||
@@ -9480,6 +9491,11 @@
|
||||
* sysdeps/i386/fpu/bits/mathinline.h: Define expm1 inline only if
|
||||
__FAST_MATH__ is defined.
|
||||
|
||||
2000-05-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/i386/fpu/bits/mathinline.h (__expm1_code): Avoid using ?:
|
||||
with omitted middle operand.
|
||||
|
||||
2000-05-22 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* math/Makefile: Add -D__FAST_MATH__ to CFLAGS-test-ifloat.c,
|
||||
@@ -9718,6 +9734,11 @@
|
||||
* manual/arith.texi (Parsing of Integers): Fix typo.
|
||||
Closes PR libc/1744, reported by blp@gnu.org.
|
||||
|
||||
2000-05-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* inet/rcmd.c (rcmd_af): If *ahost cannot be resolved, include
|
||||
unresolved hostname in the message.
|
||||
|
||||
2000-05-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/arm/bits/huge_val.h (HUGE_VAL, HUGE_VALF): Add
|
||||
|
||||
@@ -7729,6 +7729,13 @@
|
||||
|
||||
* Versions.def [ld]: Add GLIBC_2.2.1.
|
||||
|
||||
2001-01-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* malloc/memusage.c (me): If not SUID/SGID, allow creating new
|
||||
$MEMUSAGE_OUTPUT file.
|
||||
* sysdeps/generic/segfault.c (segfault.c): If not SUID/SGID, allow
|
||||
creating new $SEGFAULT_OUTPUT_NAME file.
|
||||
|
||||
2001-01-10 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* elf/dl-libc.c (do_dlopen): Call DL_STATIC_INIT for static binaries.
|
||||
@@ -8130,6 +8137,11 @@
|
||||
* sysdeps/powerpc/soft-fp/Versions: Likewise.
|
||||
* sysdeps/sparc/sparc64/soft-fp/Versions: Likewise.
|
||||
|
||||
2001-01-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* locale/setlocale.c (setlocale): Don't allocate/free category name
|
||||
unnecessarily.
|
||||
|
||||
2001-01-02 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
|
||||
|
||||
* sysdeps/powerpc/dl-machine.c (__process_machine_rela): Fix typo.
|
||||
|
||||
+5525
File diff suppressed because it is too large
Load Diff
+13478
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -6911,9 +6911,9 @@ Sat Sep 30 11:47:05 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
Fri Sep 29 15:07:10 1995 Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
|
||||
|
||||
* sysdeps/unix/sysv/linux/adjtime.c (__adjtime):
|
||||
Change name of field `mode' in `struct timex' to `modes'.
|
||||
Linux-1.3.28 updates this name according to RFC 1489.
|
||||
* sysdeps/unix/sysv/linux/adjtime.c (__adjtime):
|
||||
Change name of field `mode' in `struct timex' to `modes'.
|
||||
Linux-1.3.28 updates this name according to RFC 1589.
|
||||
|
||||
Thu Sep 28 13:05:54 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ please let me know.
|
||||
malloc/libmemprof.so. How can I fix this?
|
||||
1.20. Which tools should I use for MIPS?
|
||||
1.21. Which compiler should I use for powerpc64?
|
||||
1.22. `make' fails when running rpcgen the first time,
|
||||
what is going on? How do I fix this?
|
||||
|
||||
2. Installation and configuration issues
|
||||
|
||||
@@ -573,6 +575,20 @@ For details check also my page <http://www.suse.de/~aj/glibc-mips.html>.
|
||||
{SM} You want to use at least gcc 3.2 (together with the right versions
|
||||
of all the other tools, of course).
|
||||
|
||||
|
||||
1.22. `make' fails when running rpcgen the first time,
|
||||
what is going on? How do I fix this?
|
||||
|
||||
{CO} The first invocation of rpcgen is also the first use of the recently
|
||||
compiled dynamic loader. If there is any problem with the dynamic loader
|
||||
it will more than likely fail to run rpcgen properly. This could be due to
|
||||
any number of problems.
|
||||
|
||||
The only real solution is to debug the loader and determine the problem
|
||||
yourself. Please remember that for each architecture there may be various
|
||||
patches required to get glibc HEAD into a runnable state. The best course
|
||||
of action is to determine if you have all the required patches.
|
||||
|
||||
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
@@ -374,6 +374,19 @@ For details check also my page <http://www.suse.de/~aj/glibc-mips.html>.
|
||||
{SM} You want to use at least gcc 3.2 (together with the right versions
|
||||
of all the other tools, of course).
|
||||
|
||||
?? `make' fails when running rpcgen the first time,
|
||||
what is going on? How do I fix this?
|
||||
|
||||
{CO} The first invocation of rpcgen is also the first use of the recently
|
||||
compiled dynamic loader. If there is any problem with the dynamic loader
|
||||
it will more than likely fail to run rpcgen properly. This could be due to
|
||||
any number of problems.
|
||||
|
||||
The only real solution is to debug the loader and determine the problem
|
||||
yourself. Please remember that for each architecture there may be various
|
||||
patches required to get glibc HEAD into a runnable state. The best course
|
||||
of action is to determine if you have all the required patches.
|
||||
|
||||
? Installation and configuration issues
|
||||
|
||||
?? Can I replace the libc on my Linux system with GNU libc?
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Appendix A Installing the GNU C Library
|
||||
***************************************
|
||||
Installing the GNU C Library
|
||||
****************************
|
||||
|
||||
Before you do anything else, you should read the file `FAQ' located at
|
||||
the top level of the source tree. This file answers common questions
|
||||
@@ -9,46 +9,37 @@ installation. It is updated more frequently than this manual.
|
||||
Features can be added to GNU Libc via "add-on" bundles. These are
|
||||
separate tar files, which you unpack into the top level of the source
|
||||
tree. Then you give `configure' the `--enable-add-ons' option to
|
||||
activate them, and they will be compiled into the library. As of the
|
||||
2.2 release, one important component of glibc is distributed as
|
||||
"official" add-ons: the linuxthreads add-on. Unless you are doing an
|
||||
unusual installation, you should get this.
|
||||
|
||||
Support for POSIX threads is maintained by someone else, so it's in a
|
||||
separate package. It is only available for GNU/Linux systems, but this
|
||||
will change in the future. Get it from the same place you got the main
|
||||
bundle; the file is `glibc-linuxthreads-VERSION.tar.gz'.
|
||||
activate them, and they will be compiled into the library.
|
||||
|
||||
You will need recent versions of several GNU tools: definitely GCC
|
||||
and GNU Make, and possibly others. *Note Tools for Compilation::,
|
||||
below.
|
||||
|
||||
A.1 Configuring and compiling GNU Libc
|
||||
======================================
|
||||
Configuring and compiling GNU Libc
|
||||
==================================
|
||||
|
||||
GNU libc can be compiled in the source directory, but we strongly advise
|
||||
building it in a separate build directory. For example, if you have
|
||||
unpacked the glibc sources in `/src/gnu/glibc-2.3', create a directory
|
||||
GNU libc cannot be compiled in the source directory. You must build it
|
||||
in a separate build directory. For example, if you have unpacked the
|
||||
glibc sources in `/src/gnu/glibc-2.4', create a directory
|
||||
`/src/gnu/glibc-build' to put the object files in. This allows
|
||||
removing the whole build directory in case an error occurs, which is the
|
||||
safest way to get a fresh start and should always be done.
|
||||
removing the whole build directory in case an error occurs, which is
|
||||
the safest way to get a fresh start and should always be done.
|
||||
|
||||
From your object directory, run the shell script `configure' located
|
||||
at the top level of the source tree. In the scenario above, you'd type
|
||||
|
||||
$ ../glibc-2.3/configure ARGS...
|
||||
$ ../glibc-2.4/configure ARGS...
|
||||
|
||||
Please note that even if you're building in a separate build
|
||||
Please note that even though you're building in a separate build
|
||||
directory, the compilation needs to modify a few files in the source
|
||||
directory, especially some files in the manual subdirectory.
|
||||
|
||||
`configure' takes many options, but you can get away with knowing only
|
||||
two: `--prefix' and `--enable-add-ons'. The `--prefix' option tells
|
||||
`configure' where you want glibc installed. This defaults to
|
||||
`/usr/local'. The `--enable-add-ons' option tells `configure' to use
|
||||
all the add-on bundles it finds in the source directory. Since
|
||||
important functionality is provided in add-ons, you should always
|
||||
specify this option.
|
||||
`configure' takes many options, but the only one that is usually
|
||||
mandatory is `--prefix'. This option tells `configure' where you want
|
||||
glibc installed. This defaults to `/usr/local', but the normal setting
|
||||
to install as the standard system library is `--prefix=/usr' for
|
||||
GNU/Linux systems and `--prefix=' (an empty prefix) for GNU/Hurd
|
||||
systems.
|
||||
|
||||
It may also be useful to set the CC and CFLAGS variables in the
|
||||
environment when running `configure'. CC selects the C compiler that
|
||||
@@ -80,12 +71,16 @@ will be used, and CFLAGS sets optimization options for the compiler.
|
||||
ones found in `/usr/include'.
|
||||
|
||||
`--enable-add-ons[=LIST]'
|
||||
Enable add-on packages in your source tree. If this option is
|
||||
Specify add-on packages to include in the build. If this option is
|
||||
specified with no list, it enables all the add-on packages it
|
||||
finds. If you do not wish to use some add-on packages that you
|
||||
have present in your source tree, give this option a list of the
|
||||
add-ons that you _do_ want used, like this:
|
||||
`--enable-add-ons=linuxthreads'
|
||||
finds in the main source directory; this is the default behavior.
|
||||
You may specify an explicit list of add-ons to use in LIST,
|
||||
separated by spaces or commas (if you use spaces, remember to
|
||||
quote them from the shell). Each add-on in LIST can be an
|
||||
absolute directory name or can be a directory name relative to the
|
||||
main source directory, or relative to the build directory (that
|
||||
is, the current working directory). For example,
|
||||
`--enable-add-ons=nptl,../glibc-libidn-2.4'.
|
||||
|
||||
`--enable-kernel=VERSION'
|
||||
This option is currently only useful on GNU/Linux systems. The
|
||||
@@ -168,11 +163,10 @@ produce a lot of output, some of which may look like errors from `make'
|
||||
but isn't. Look for error messages from `make' containing `***'.
|
||||
Those indicate that something is seriously wrong.
|
||||
|
||||
The compilation process can take several hours. Expect at least two
|
||||
hours for the default configuration on i586 for GNU/Linux. For Hurd,
|
||||
times are much longer. Some complex modules may take a very long time
|
||||
to compile, as much as several minutes on slower machines. Do not
|
||||
panic if the compiler appears to hang.
|
||||
The compilation process can take a long time, depending on the
|
||||
configuration and the speed of your machine. Some complex modules may
|
||||
take a very long time to compile, as much as several minutes on slower
|
||||
machines. Do not panic if the compiler appears to hang.
|
||||
|
||||
If you want to run a parallel make, simply pass the `-j' option with
|
||||
an appropriate numeric parameter to `make'. You need a recent GNU
|
||||
@@ -214,8 +208,8 @@ library. You may need to set `AR' and `RANLIB' to cross-compiling
|
||||
versions of `ar' and `ranlib' if the native tools are not configured to
|
||||
work with object files for the target you configured for.
|
||||
|
||||
A.2 Installing the C Library
|
||||
============================
|
||||
Installing the C Library
|
||||
========================
|
||||
|
||||
To install the library and its header files, and the Info files of the
|
||||
manual, type `env LANGUAGE=C LC_ALL=C make install'. This will build
|
||||
@@ -288,8 +282,8 @@ which is in `/usr/share/zoneinfo' to the file `/etc/localtime'. For
|
||||
Germany, you might execute `ln -s /usr/share/zoneinfo/Europe/Berlin
|
||||
/etc/localtime'.
|
||||
|
||||
A.3 Recommended Tools for Compilation
|
||||
=====================================
|
||||
Recommended Tools for Compilation
|
||||
=================================
|
||||
|
||||
We recommend installing the following GNU tools before attempting to
|
||||
build the GNU C library:
|
||||
@@ -302,11 +296,18 @@ build the GNU C library:
|
||||
recommend GNU `make' version 3.79. All earlier versions have
|
||||
severe bugs or lack features.
|
||||
|
||||
* GCC 3.2 or newer
|
||||
* GCC 3.4 or newer, GCC 4.1 recommended
|
||||
|
||||
The GNU C library can only be compiled with the GNU C compiler
|
||||
family. As of the 2.3 release, GCC 3.2 or higher is required. As
|
||||
of this writing, GCC 3.2 is the compiler we advise to use.
|
||||
family. For the 2.3 releases, GCC 3.2 or higher is required; GCC
|
||||
3.4 is the compiler we advise to use for 2.3 versions. For the
|
||||
2.4 release, GCC 3.4 or higher is required; as of this writing,
|
||||
GCC 4.1 is the compiler we advise to use for current versions. On
|
||||
certain machines including `powerpc64', compilers prior to GCC 4.0
|
||||
have bugs that prevent them compiling the C library code in the
|
||||
2.4 release. On other machines, GCC 4.1 is required to build the C
|
||||
library with support for the correct `long double' type format;
|
||||
these include `powerpc' (32 bit), `s390' and `s390x'.
|
||||
|
||||
You can use whatever compiler you like to compile programs that
|
||||
use GNU libc, but be aware that both GCC 2.7 and 2.8 have bugs in
|
||||
@@ -316,7 +317,7 @@ build the GNU C library:
|
||||
Check the FAQ for any special compiler issues on particular
|
||||
platforms.
|
||||
|
||||
* GNU `binutils' 2.13 or later
|
||||
* GNU `binutils' 2.15 or later
|
||||
|
||||
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
|
||||
@@ -330,11 +331,10 @@ build the GNU C library:
|
||||
installation mechanism for the info files is not present or works
|
||||
differently.
|
||||
|
||||
* GNU `awk' 3.0, or some other POSIX awk
|
||||
* GNU `awk' 3.0, or higher
|
||||
|
||||
`Awk' is used in several places to generate files. The scripts
|
||||
should work with any POSIX-compliant `awk' implementation; `gawk'
|
||||
3.0 and `mawk' 1.3 are known to work.
|
||||
`Awk' is used in several places to generate files. `gawk' 3.0 is
|
||||
known to work.
|
||||
|
||||
* Perl 5
|
||||
|
||||
@@ -362,80 +362,8 @@ and if you change any of the message translation files you will need
|
||||
You may also need these packages if you upgrade your source tree using
|
||||
patches, although we try to avoid this.
|
||||
|
||||
A.4 Supported Configurations
|
||||
============================
|
||||
|
||||
The GNU C Library currently supports configurations that match the
|
||||
following patterns:
|
||||
|
||||
alpha*-*-linux
|
||||
arm-*-linux
|
||||
cris-*-linux
|
||||
hppa-*-linux
|
||||
iX86-*-gnu
|
||||
iX86-*-linux
|
||||
ia64-*-linux
|
||||
m68k-*-linux
|
||||
mips*-*-linux
|
||||
powerpc-*-linux
|
||||
s390-*-linux
|
||||
s390x-*-linux
|
||||
sparc-*-linux
|
||||
sparc64-*-linux
|
||||
x86_64-*-linux
|
||||
|
||||
Former releases of this library (version 2.1 and/or 2.0) used to run
|
||||
on the following configurations:
|
||||
|
||||
arm-*-linuxaout
|
||||
arm-*-none
|
||||
|
||||
Very early releases (version 1.09.1 and perhaps earlier versions)
|
||||
used to run on the following configurations:
|
||||
|
||||
alpha-dec-osf1
|
||||
alpha-*-linuxecoff
|
||||
iX86-*-bsd4.3
|
||||
iX86-*-isc2.2
|
||||
iX86-*-isc3.N
|
||||
iX86-*-sco3.2
|
||||
iX86-*-sco3.2v4
|
||||
iX86-*-sysv
|
||||
iX86-*-sysv4
|
||||
iX86-force_cpu386-none
|
||||
iX86-sequent-bsd
|
||||
i960-nindy960-none
|
||||
m68k-hp-bsd4.3
|
||||
m68k-mvme135-none
|
||||
m68k-mvme136-none
|
||||
m68k-sony-newsos3
|
||||
m68k-sony-newsos4
|
||||
m68k-sun-sunos4.N
|
||||
mips-dec-ultrix4.N
|
||||
mips-sgi-irix4.N
|
||||
sparc-sun-solaris2.N
|
||||
sparc-sun-sunos4.N
|
||||
|
||||
Since no one has volunteered to test and fix these configurations,
|
||||
they are not supported at the moment. They probably don't compile;
|
||||
they definitely don't work anymore. Porting the library is not hard.
|
||||
If you are interested in doing a port, please contact the glibc
|
||||
maintainers. Start at `http://www.gnu.org/software/libc/' and read the
|
||||
references there on how to go about getting involved and contacting the
|
||||
developers.
|
||||
|
||||
Valid cases of `iX86' include `i386', `i486', `i586', and `i686'.
|
||||
All of those configurations produce a library that can run on this
|
||||
processor and newer processors. The GCC compiler by default generates
|
||||
code that's optimized for the machine it's configured for and will use
|
||||
the instructions available on that machine. For example if your GCC is
|
||||
configured for `i686', gcc will optimize for `i686' and might issue
|
||||
some `i686' specific instructions. To generate code for other models,
|
||||
you have to configure for that model and give GCC the appropriate
|
||||
`-march=' and `-mcpu=' compiler switches via CFLAGS.
|
||||
|
||||
A.5 Specific advice for GNU/Linux systems
|
||||
=========================================
|
||||
Specific advice for GNU/Linux systems
|
||||
=====================================
|
||||
|
||||
If you are installing GNU libc on a GNU/Linux system, you need to have
|
||||
the header files from a 2.2 or newer kernel around for reference. For
|
||||
@@ -489,8 +417,8 @@ kernel-side thread support. `nscd' happens to hit these bugs
|
||||
particularly hard, but you might have problems with any threaded
|
||||
program.
|
||||
|
||||
A.6 Reporting Bugs
|
||||
==================
|
||||
Reporting Bugs
|
||||
==============
|
||||
|
||||
There are probably bugs in the GNU C library. There are certainly
|
||||
errors and omissions in this manual. If you report them, they will get
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
# Make the TAGS files.
|
||||
# Copyright (C) 1992,1994,1995,1996,1998,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; if not, write to the Free
|
||||
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
# 02111-1307 USA.
|
||||
|
||||
# Make this the default goal.
|
||||
TAGS:
|
||||
|
||||
ifdef subdir
|
||||
.. := ../
|
||||
endif
|
||||
|
||||
include $(..)Makeconfig
|
||||
|
||||
# Pass these to $(MAKE) calls to avoid source generation and such.
|
||||
sub-make-vars = generating=t no_deps=t
|
||||
|
||||
ifndef tags_sources
|
||||
ifeq ($(subdir),ctype)
|
||||
# In most cases, we want the C source files to come before
|
||||
# the header files so tags for optimizing #define's in the
|
||||
# headers won't be put in the tags files, but for ctype,
|
||||
# the functions are just backup for the #define's in the header.
|
||||
tags_sources = $(all-headers) $(all-sources) $(all-dist)
|
||||
else # Not ctype.
|
||||
tags_sources = $(all-sources) $(all-headers) $(all-dist)
|
||||
endif # ctype
|
||||
endif # No tags_sources
|
||||
|
||||
sysdep-dirs := $(full_config_sysdirs)
|
||||
|
||||
ifndef sysdep_dirs
|
||||
# Find all sysdep directories.
|
||||
sysdep_dirs := $(shell find $(..)sysdeps \
|
||||
$(wildcard \
|
||||
$(patsubst %,$(..)%/sysdeps,$(add-ons))) \
|
||||
-type d ! -name RCS ! -name CVS \
|
||||
! -name SCCS -print)
|
||||
endif
|
||||
|
||||
# Find all sysdep dirs there are, but putting the ones
|
||||
# we are configured to use first and preserving their order.
|
||||
all-dirs := $(subdir-dirs) \
|
||||
$(objdir) \
|
||||
$(sysdep-dirs) \
|
||||
$(source_dirs) \
|
||||
$(filter-out $(sysdep-dirs),$(sysdep_dirs))
|
||||
|
||||
# Find all the subdirs there are, but putting the ones
|
||||
# we are configured to use first and preserving their order.
|
||||
ifndef subdir
|
||||
subdirs := $(subdirs) \
|
||||
$(filter-out $(subdirs),\
|
||||
$(sort \
|
||||
$(shell sed -e 's/\#.*$$//' \
|
||||
$(wildcard $(addsuffix /Subdirs,\
|
||||
$(all-dirs)))\
|
||||
/dev/null)))
|
||||
all-dist = $(foreach Dist,$(wildcard $(all-dirs:%=%/Dist)),\
|
||||
$(addprefix $(Dist:%/Dist=%)/,\
|
||||
$(filter %.c %.h %.S %.s,\
|
||||
$(shell cat $(Dist)))))
|
||||
tags_sources = $(all-sources) $(all-headers) $(all-dist)
|
||||
else
|
||||
all-dist = $(distribute)
|
||||
endif
|
||||
|
||||
# sources and headers must be simply expanded variables
|
||||
sources := $(sources) $(filter %.c %.s %.S,$(all-dist))
|
||||
headers := $(headers) $(filter %.h,$(all-dist))
|
||||
all-dist := $(filter-out %.h %.c %.s %.S,$(all-dist))
|
||||
|
||||
sources += $(foreach lib,$(extra-libs),$($(lib)-routines:=.c))
|
||||
|
||||
# All different versions of $(sources), preserving the configured sysdep
|
||||
# directory order.
|
||||
# Files that are found in the current directory cannot occur in
|
||||
# sysdep directories, so don't bother searching them.
|
||||
sysdep-sources := $(filter-out $(wildcard $(sources)), $(sources))
|
||||
all-sources = $(wildcard $(sort $(sources) $(sources:.c=.S) $(sources:.c=.s) \
|
||||
$(others:=.c) $(tests:=.c) $(xtests:=.c) \
|
||||
$(test-srcs:=.c))) \
|
||||
$(foreach dir,$(all-dirs),\
|
||||
$(wildcard \
|
||||
$(addprefix $(dir)/,\
|
||||
$(sort $(sysdep-sources) \
|
||||
$(sysdep-sources:.c=.S) \
|
||||
$(sysdep-sources:.c=.s)))))
|
||||
|
||||
sysdep-headers := $(filter-out $(wildcard $(headers)), $(headers))
|
||||
all-headers = $(wildcard $(headers)) \
|
||||
$(foreach dir,$(all-dirs),\
|
||||
$(wildcard $(addprefix $(dir)/,$(sysdep-headers))))
|
||||
|
||||
tags_sources := $(strip $(tags_sources))
|
||||
|
||||
TAGS: $(tags_sources)
|
||||
ifdef subdir
|
||||
ifdef tags_sources
|
||||
$(ETAGS) -o $@ $^
|
||||
else
|
||||
# No sources. Create a dummy file.
|
||||
touch $@
|
||||
endif # tags_sources
|
||||
else # parent
|
||||
TAGS: subdir_TAGS
|
||||
# Note that this uses the -i switch, and thus requires v19 etags.
|
||||
$(ETAGS) -o $@ \
|
||||
$(subdirs:%=-i %/TAGS) \
|
||||
$(filter-out subdir_TAGS,$^)
|
||||
|
||||
.PHONY: subdir_TAGS $(subdirs:%=%/TAGS)
|
||||
subdir_TAGS: $(subdirs:%=%/TAGS)
|
||||
$(subdirs:%=%/TAGS):
|
||||
$(MAKE) -C $(@D) $(sub-make-vars) $(@F)
|
||||
|
||||
endif # subdir
|
||||
|
||||
ifndef XGETTEXT
|
||||
XGETTEXT = xgettext
|
||||
endif
|
||||
|
||||
P = $(..)po
|
||||
|
||||
ifdef subdir
|
||||
domain = $(subdir)
|
||||
else
|
||||
domain = libc-top
|
||||
endif
|
||||
|
||||
define extract
|
||||
@rm -f $@.new
|
||||
$(XGETTEXT) --keyword=_ --keyword=N_ --add-comments=TRANS --sort-by-file \
|
||||
--omit-header -E -n -d - $(XGETTEXTFLAGS-$(@F)) > $@.new $^
|
||||
mv -f $@.new $@
|
||||
endef
|
||||
|
||||
text-srcs := $(filter %.c %.h %.cc %.C,$(tags_sources))
|
||||
$P/$(domain).pot: $(text-srcs)
|
||||
ifeq (,$(text-srcs))
|
||||
cp /dev/null $@
|
||||
else
|
||||
$(extract)
|
||||
endif
|
||||
|
||||
all-pot = $P/libc-top.pot $P/subdirs.pot
|
||||
|
||||
ifndef subdir
|
||||
# Collect all the subdir messages, massaging the file names in comments
|
||||
# to include the subdir name.
|
||||
$P/subdirs.pot: $(subdirs:%=$P/%.pot)
|
||||
@rm -f $@.new
|
||||
(for d in $(subdirs); \
|
||||
do sed "/^#:/s% % $$d/%g" $P/$$d.pot; done) > $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
# Combine all the messages into the final sorted template translation file.
|
||||
# The following code requires GNU date.
|
||||
$P/libc.pot: $(all-pot)
|
||||
@rm -f $@.new
|
||||
set `date -R`; disp="$$6"; \
|
||||
sed -e 's/VERSION/$(version)/' \
|
||||
-e "s/DATE/`date +'%Y-%m-%d %H:%M'$$disp`/" \
|
||||
po/header.pot > $@.new
|
||||
$(XGETTEXT) -d - --omit-header -E -n $^ >> $@.new
|
||||
mv -f $@.new $@
|
||||
ifeq ($(with-cvs),yes)
|
||||
test ! -d CVS || cvs $(CVSOPTS) ci -m'Regenerated from source files' $@
|
||||
endif
|
||||
|
||||
$(subdirs:%=$P/%.pot): $P/%.pot: FORCE
|
||||
$(MAKE) -C $* $(sub-make-vars) ../$@
|
||||
FORCE:
|
||||
endif
|
||||
+122
-179
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991-2003, 2004 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991-2003,2004,2005,2006 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
|
||||
@@ -99,7 +99,21 @@ binfmt-subdir = aout
|
||||
endif
|
||||
|
||||
# Complete path to sysdep dirs.
|
||||
export full_config_sysdirs := $(addprefix $(..),$(config-sysdirs))
|
||||
# `configure' writes a definition of `config-sysdirs' in `config.make'.
|
||||
sysdirs := $(foreach D,$(config-sysdirs),$(firstword $(filter /%,$D) $(..)$D))
|
||||
|
||||
# Add-ons that contribute sysdeps trees get added to the include list
|
||||
# after sysdeps/generic. This makes #include <sysdeps/...> work right
|
||||
# to find specific add-on files without assuming the add-on directory name.
|
||||
# It also means that headers can go into an add-on's base directory
|
||||
# instead of the add-on needing a sysdeps/generic of its own.
|
||||
sysdeps-srcdirs := $(foreach add-on,$(sysdeps-add-ons),\
|
||||
$(firstword $(filter /%,$(add-on)) \
|
||||
$(..)$(add-on)))
|
||||
+sysdep_dirs = $(sysdirs) $(sysdeps-srcdirs)
|
||||
ifdef objdir
|
||||
+sysdep_dirs := $(objdir) $(+sysdep_dirs)
|
||||
endif
|
||||
|
||||
# Run config.status to update config.make and config.h. We don't show the
|
||||
# dependence of config.h to Make, because it is only touched when it
|
||||
@@ -113,16 +127,16 @@ $(common-objpfx)config.make: $(common-objpfx)config.status \
|
||||
# Find all the add-on and sysdeps configure fragments, to make sure we
|
||||
# re-run configure when any of them changes.
|
||||
$(common-objpfx)config.status: $(..)version.h $(..)configure \
|
||||
$(foreach dir,$(full_config_sysdirs),\
|
||||
$(wildcard \
|
||||
$(dir)/Implies) \
|
||||
$(foreach dir,$(sysdirs),\
|
||||
$(wildcard $(dir)/Implies) \
|
||||
$(patsubst %.in,%,\
|
||||
$(firstword $(wildcard \
|
||||
$(addprefix $(dir)/,configure configure.in))))) \
|
||||
$(patsubst %.in,%,\
|
||||
$(foreach dir,$(add-ons),\
|
||||
$(foreach add-on,$(add-ons),\
|
||||
$(firstword $(wildcard \
|
||||
$(addprefix $(..)$(dir)/,configure configure.in)))))
|
||||
$(addprefix $(firstword $(filter /%,$(add-on)) $(..)$(add-on))/,\
|
||||
configure configure.in)))))
|
||||
@cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \
|
||||
echo The GNU C library has not been configured. >&2; \
|
||||
echo Run \`configure\' to configure it before building. >&2; \
|
||||
@@ -399,11 +413,20 @@ LDFLAGS.so += $(relro-LDFLAGS)
|
||||
LDFLAGS-rtld += $(relro-LDFLAGS)
|
||||
endif
|
||||
|
||||
ifeq (yes,$(have-hash-style))
|
||||
# For the time being we unconditionally use 'both'. At some time we
|
||||
# should declare statically linked code as 'out of luck' and compile
|
||||
# with --hash-style=gnu only.
|
||||
hashstyle-LDFLAGS = -Wl,--hash-style=both
|
||||
LDFLAGS.so += $(hashstyle-LDFLAGS)
|
||||
LDFLAGS-rtld += $(hashstyle-LDFLAGS)
|
||||
endif
|
||||
|
||||
# Command for linking programs with the C library.
|
||||
ifndef +link
|
||||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||||
$(combreloc-LDFLAGS) $(relro-LDFLAGS) \
|
||||
$(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
|
||||
$(addprefix $(csu-objpfx),$(start-installed-name)) \
|
||||
$(+preinit) $(+prector) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||||
@@ -415,7 +438,7 @@ endif
|
||||
# Command for statically linking programs with the C library.
|
||||
ifndef +link-static
|
||||
+link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \
|
||||
$(sysdep-LDFLAGS) $(LDFLAGS) \
|
||||
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||||
$(addprefix $(csu-objpfx),$(static-start-installed-name)) \
|
||||
$(+preinit) $(+prector) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||||
@@ -452,12 +475,6 @@ link-libc = -Wl,-rpath-link=$(rpath-link) \
|
||||
$(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
|
||||
# This is how to find at build-time things that will be installed there.
|
||||
rpath-dirs = math elf dlfcn nss nis rt resolv crypt
|
||||
else
|
||||
ifneq (,$(filter aix aix%,$(config-os)))
|
||||
link-libc = $(common-objpfx)libc.a \
|
||||
$(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
|
||||
rpath-dirs = math dlfcn nss nis rt resolv crypt
|
||||
endif
|
||||
endif
|
||||
rpath-link = \
|
||||
$(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%)))
|
||||
@@ -475,13 +492,6 @@ LDFLAGS-rpath-ORIGIN = -Wl,-rpath,'$$ORIGIN'
|
||||
LDFLAGS-soname-fname = -Wl,-soname,$(@F)
|
||||
LDFLAGS-rdynamic = -rdynamic
|
||||
LDFLAGS-Bsymbolic = -Bsymbolic
|
||||
else
|
||||
ifneq (,$(filter aix aix%,$(config-os)))
|
||||
LDFLAGS-rpath-ORIGIN =
|
||||
LDFLAGS-soname-fname =
|
||||
LDFLAGS-rdynamic = -Wl,-bdynamic
|
||||
LDFLAGS-Bsymbolic = -Wl,-bsymbolic
|
||||
endif
|
||||
endif
|
||||
|
||||
# Choose the default search path for the dynamic linker based on
|
||||
@@ -493,46 +503,36 @@ default-rpath = $(libdir)
|
||||
endif
|
||||
|
||||
ifndef link-extra-libs
|
||||
ifeq (yes,$(build-shared))
|
||||
ifneq ($(common-objpfx),$(objpfx))
|
||||
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),\
|
||||
$(wildcard $(common-objpfx)$(lib).so$($(notdir $(lib)).so-version) \
|
||||
$(objpfx)$(lib).so$($(notdir $(lib)).so-version)))
|
||||
else
|
||||
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).so$($(notdir $(lib)).so-version))
|
||||
endif
|
||||
else
|
||||
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).a)
|
||||
endif
|
||||
link-extra-libs = $(LDLIBS-$(@F))
|
||||
link-extra-libs-static = $(link-extra-libs)
|
||||
link-extra-libs-bounded = $(link-extra-libs)
|
||||
endif
|
||||
|
||||
# The static libraries.
|
||||
ifeq (yes,$(build-static))
|
||||
link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
|
||||
link-extra-libs-static = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).a)
|
||||
else
|
||||
ifeq (yes,$(build-shared))
|
||||
# We can try to link the programs with lib*_pic.a...
|
||||
link-libc-static = $(static-gnulib) $(common-objpfx)libc_pic.a
|
||||
link-extra-libs-static = $(link-extra-libs)
|
||||
endif
|
||||
endif
|
||||
link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a
|
||||
link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F:%-bp=%)),$(common-objpfx)$(lib)_b.a)
|
||||
|
||||
ifndef gnulib
|
||||
ifneq ($(have-as-needed),yes)
|
||||
libgcc_eh := -lgcc_eh
|
||||
else
|
||||
libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) -Wl,--no-as-needed
|
||||
endif
|
||||
ifneq ($(have-cc-with-libunwind),yes)
|
||||
gnulib := -lgcc $(libgcc_eh)
|
||||
static-gnulib := -lgcc -lgcc_eh
|
||||
libunwind =
|
||||
else
|
||||
gnulib := -lgcc $(libgcc_eh) -lunwind
|
||||
static-gnulib := -lgcc -lgcc_eh -lunwind
|
||||
libunwind = -lunwind
|
||||
endif
|
||||
ifneq ($(have-as-needed),yes)
|
||||
libgcc_eh := -lgcc_eh $(libunwind)
|
||||
else
|
||||
libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
|
||||
endif
|
||||
gnulib := -lgcc $(libgcc_eh)
|
||||
static-gnulib := -lgcc -lgcc_eh $(libunwind)
|
||||
libc.so-gnulib := -lgcc
|
||||
endif
|
||||
ifeq ($(elf),yes)
|
||||
+preinit = $(addprefix $(csu-objpfx),crti.o)
|
||||
@@ -554,7 +554,7 @@ $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
|
||||
$(filter -Wl$(comma)-rpath-link=%,\
|
||||
$(sysdep-LDFLAGS)))))
|
||||
run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\
|
||||
$(tests-static)),, \
|
||||
$(tests-static) $(xtests-static)),, \
|
||||
$(elf-objpfx)$(rtld-installed-name) \
|
||||
--library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
|
||||
else
|
||||
@@ -575,10 +575,15 @@ endif
|
||||
|
||||
# Extra flags to pass to GCC.
|
||||
ifeq ($(all-warnings),yes)
|
||||
+gccwarn := -Wall -Wwrite-strings -Winline -Wstrict-prototypes -Wcast-qual -Wbad-function-cast -Wmissing-noreturn -Wmissing-prototypes -Wmissing-declarations -Wcomment -Wcomments -Wtrigraphs -Wsign-compare -Wfloat-equal -Wmultichar
|
||||
+gccwarn := -Wall -Wwrite-strings -Winline -Wcast-qual -Wbad-function-cast -Wmissing-noreturn -Wmissing-prototypes -Wmissing-declarations -Wcomment -Wcomments -Wtrigraphs -Wsign-compare -Wfloat-equal -Wmultichar
|
||||
else
|
||||
+gccwarn := -Wall -Wwrite-strings -Winline -Wstrict-prototypes
|
||||
+gccwarn := -Wall -Wwrite-strings -Winline
|
||||
endif
|
||||
+gccwarn-c = -Wstrict-prototypes
|
||||
|
||||
# We do not depend on the address of constants in different files to be
|
||||
# actually different, so allow the compiler to merge them all.
|
||||
+merge-constants = -fmerge-all-constants
|
||||
|
||||
# This is the program that generates makefile dependencies from C source files.
|
||||
# The -MP flag tells GCC >= 3.2 (which we now require) to produce dummy
|
||||
@@ -590,6 +595,11 @@ endif
|
||||
# The program that makes Emacs-style TAGS files.
|
||||
ETAGS := etags
|
||||
|
||||
# The `xgettext' program for producing .pot files from sources.
|
||||
ifndef XGETTEXT
|
||||
XGETTEXT = xgettext
|
||||
endif
|
||||
|
||||
# The `m4' macro processor; this is used by sysdeps/sparc/Makefile (and
|
||||
# perhaps others) to preprocess assembly code in some cases.
|
||||
M4 = m4
|
||||
@@ -634,21 +644,21 @@ ifeq "$(strip $(+cflags))" ""
|
||||
+cflags := $(default_cflags)
|
||||
endif # $(+cflags) == ""
|
||||
|
||||
+cflags := $(+cflags) $(+gccwarn)
|
||||
+cflags += $(addprefix -mcpu=,$(with-cpu)) $(+gccwarn) $(+merge-constants)
|
||||
+gcc-nowarn := -w
|
||||
|
||||
# Don't duplicate options if we inherited variables from the parent.
|
||||
+cflags := $(sort $(+cflags))
|
||||
|
||||
|
||||
# These are flags given to the C compiler to tell it to look for include
|
||||
# files (including ones given in angle brackets) in the current directory,
|
||||
# in the parent library source directory and in the include directory.
|
||||
# `+sysdep-includes' will be defined by Makerules.
|
||||
+includes = -I$(..)include -I. \
|
||||
$(patsubst %/,-I%,$(objpfx)) $(patsubst %/,-I%,$(..)) \
|
||||
$(libio-include) $(includes) \
|
||||
$(+sysdep-includes) $(sysincludes)
|
||||
# These are flags given to the C compiler to tell it to look for
|
||||
# include files (including ones given in angle brackets) in the parent
|
||||
# library source directory, in the include directory, and in the
|
||||
# current directory.
|
||||
+sysdep-includes = $(addprefix -I,$(+sysdep_dirs))
|
||||
+includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \
|
||||
$(+sysdep-includes) $(includes) \
|
||||
$(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
|
||||
|
||||
# Since libio has several internal header files, we use a -I instead
|
||||
# of many little headers in the include directory.
|
||||
@@ -665,8 +675,12 @@ CPPFLAGS = $($(subdir)-CPPFLAGS) $(+includes) $(defines) \
|
||||
$(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
|
||||
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
|
||||
override CFLAGS = -std=gnu99 \
|
||||
$(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
|
||||
$(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
|
||||
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
|
||||
$(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
|
||||
$(CFLAGS-$(@F))
|
||||
override CXXFLAGS = $(c++-sysincludes) \
|
||||
$(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
|
||||
$(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
|
||||
|
||||
# If everything is compiled with -fPIC (implicitly) we must tell this by
|
||||
# defining the PIC symbol.
|
||||
@@ -755,20 +769,16 @@ endif
|
||||
endif
|
||||
ASFLAGS += $(ASFLAGS-config)
|
||||
|
||||
+gnu-stabs = $(shell echo>&2 '*** BARF ON ME')
|
||||
|
||||
ifndef BUILD_CC
|
||||
BUILD_CC = $(CC)
|
||||
endif
|
||||
|
||||
move-if-change = $(SHELL) $(..)scripts/move-if-change
|
||||
|
||||
-include $(common-objpfx)sysd-dirs
|
||||
|
||||
ifeq ($(sysd-dirs-done),t)
|
||||
-include $(common-objpfx)sysd-sorted
|
||||
subdirs = $(sorted-subdirs)
|
||||
endif
|
||||
subdir-srcdirs = $(foreach dir,$(subdirs),\
|
||||
$(firstword $($(dir)-srcdir) $(..)$(dir)))
|
||||
|
||||
ifeq (yes, $(build-shared))
|
||||
|
||||
@@ -782,8 +792,7 @@ ifeq (yes, $(build-shared))
|
||||
# (but no commands).
|
||||
%.v.i: $(common-objpfx)config.h
|
||||
sed '/^[ ]*#/d;s/^[ ]*%/#/' $(filter-out FORCE %.h,$^) \
|
||||
| $(CC) -E -undef $(CPPFLAGS) \
|
||||
-DASSEMBLER -x assembler-with-cpp - \
|
||||
| $(CC) -E -undef $(CPPFLAGS) -x assembler-with-cpp - \
|
||||
> $@T
|
||||
mv -f $@T $@
|
||||
%.v: %.v.i
|
||||
@@ -799,29 +808,26 @@ ifndef avoid-generated
|
||||
# This lets add-ons give more-specific matches that override defaults
|
||||
# in the top-level file.
|
||||
$(common-objpfx)shlib-versions.v.i: \
|
||||
$(wildcard $(patsubst %, $(..)%/shlib-versions,$(add-ons) $(subdirs)))\
|
||||
$(wildcard $(+sysdep_dirs:=/shlib-versions) \
|
||||
$(subdir-srcdirs:=/shlib-versions)) \
|
||||
$(..)shlib-versions
|
||||
$(common-objpfx)soversions.i: $(common-objpfx)shlib-versions.v
|
||||
default_setname='$(filter-out %_default,$(oldest-abi:%=GLIBC_%))'; \
|
||||
while read conf version setname; do \
|
||||
test -n "$$version" && \
|
||||
test `expr '$(config-machine)-$(config-vendor)-$(config-os)' \
|
||||
: "$$conf"` != 0 || continue; \
|
||||
if test "x$$version" = xDEFAULT; then \
|
||||
default_setname="$$setname"; \
|
||||
else \
|
||||
$(abi-default_setname) \
|
||||
lib=`echo $$version | sed 's/=.*$$//'`; \
|
||||
if eval test -z "\$${versioned_$${lib}}"; then \
|
||||
eval versioned_$${lib}=yes; \
|
||||
number=`echo $$version | sed "s/^.*=//"`; \
|
||||
echo $$lib $$number $${setname:-$${default_setname}}; \
|
||||
fi; \
|
||||
fi; \
|
||||
done < $< > $@T; exit 0
|
||||
|
||||
soversions-default-setname = $(patsubst %, %,\
|
||||
$(filter-out %_default,\
|
||||
$(oldest-abi:%=GLIBC_%)))
|
||||
$(common-objpfx)soversions.i: $(..)scripts/soversions.awk \
|
||||
$(common-objpfx)shlib-versions.v
|
||||
$(AWK) -v default_setname='$(soversions-default-setname)' \
|
||||
-v cpu='$(config-machine)' \
|
||||
-v vendor='$(config-vendor)' \
|
||||
-v os='$(config-os)' \
|
||||
-f $^ > $@T
|
||||
mv -f $@T $@
|
||||
$(common-objpfx)soversions.mk: $(common-objpfx)soversions.i
|
||||
(while read lib number setname; do \
|
||||
$(common-objpfx)soversions.mk: $(common-objpfx)soversions.i $(..)Makeconfig
|
||||
(seen_DEFAULT=0; seen_WORDSIZE32=0; seen_WORDSIZE64=0; \
|
||||
while read which lib number setname; do \
|
||||
eval seen_$$which=1; \
|
||||
test x"$$which" = xDEFAULT || continue; \
|
||||
case $$number in \
|
||||
[0-9]*) echo "$$lib.so-version=.$$number"; \
|
||||
echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";;\
|
||||
@@ -829,6 +835,12 @@ $(common-objpfx)soversions.mk: $(common-objpfx)soversions.i
|
||||
echo "all-sonames+=$$lib=\$$($$lib.so-version)";;\
|
||||
esac; \
|
||||
done; \
|
||||
case "$$seen_DEFAULT$$seen_WORDSIZE32$$seen_WORDSIZE64" in \
|
||||
100) echo biarch = no;; \
|
||||
101) echo biarch = 32;; \
|
||||
?1?) echo biarch = 64;; \
|
||||
*) echo >&2 BUG; exit 2;; \
|
||||
esac; \
|
||||
echo soversions.mk-done = t;) < $< > $@T; exit 0
|
||||
mv -f $@T $@
|
||||
endif
|
||||
@@ -838,46 +850,18 @@ postclean-generated += soversions.mk soversions.i \
|
||||
shlib-versions.v shlib-versions.v.i
|
||||
|
||||
# Generate the header containing the names of all shared libraries.
|
||||
# We use a stamp file to avoid uncessary recompilations.
|
||||
# We use a stamp file to avoid unnecessary recompilations.
|
||||
before-compile += $(common-objpfx)gnu/lib-names.h
|
||||
ifeq ($(soversions.mk-done),t)
|
||||
$(common-objpfx)gnu/lib-names.h: $(common-objpfx)gnu/lib-names.stmp; @:
|
||||
ifneq (,$(findstring aix,$(config-os)))
|
||||
$(common-objpfx)gnu/lib-names.stmp: $(..)sysdeps/unix/sysv/aix/gnu/lib-names.h
|
||||
$(common-objpfx)gnu/lib-names.stmp: $(..)scripts/lib-names.awk \
|
||||
$(common-objpfx)soversions.i
|
||||
$(make-target-directory)
|
||||
@rm -f ${@:stmp=T} $@
|
||||
@cp $(..)sysdeps/unix/sysv/aix/gnu/lib-names.h $(common-objpfx)gnu
|
||||
touch $@
|
||||
else
|
||||
$(common-objpfx)gnu/lib-names.stmp: $(common-objpfx)soversions.mk
|
||||
$(make-target-directory)
|
||||
@rm -f ${@:stmp=T} $@
|
||||
(echo '/* This file is automatically generated.';\
|
||||
echo ' It defines macros to allow user program to find the shared';\
|
||||
echo ' library files which come as part of GNU libc. */';\
|
||||
echo '#ifndef __GNU_LIB_NAMES_H'; \
|
||||
echo '#define __GNU_LIB_NAMES_H 1'; \
|
||||
echo; \
|
||||
(libs='$(all-sonames)';\
|
||||
for l in $$libs; do \
|
||||
name=`echo $$l | sed 's/.*=//'`; \
|
||||
upname=`echo $$l | sed 's/=.*//' | \
|
||||
tr 'abcdefghijklmnopqrstuvwxyz-' \
|
||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
|
||||
upname2=`echo $$name | sed 's/[.]so.*//' | \
|
||||
tr 'abcdefghijklmnopqrstuvwxyz-' \
|
||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
|
||||
echo "#define $${upname}_SO \"$$name\""; \
|
||||
if test $$upname != $$upname2; then \
|
||||
echo "#define $${upname2}_SO \"$$name\""; \
|
||||
fi; \
|
||||
done;) | sort; \
|
||||
echo; \
|
||||
echo '#endif /* gnu/lib-names.h */';) > ${@:stmp=T}
|
||||
$(AWK) -f $^ > ${@:stmp=T}
|
||||
$(move-if-change) ${@:stmp=T} ${@:stmp=h}
|
||||
touch $@
|
||||
endif
|
||||
endif
|
||||
|
||||
common-generated += gnu/lib-names.h gnu/lib-names.stmp
|
||||
|
||||
@@ -925,80 +909,39 @@ endif
|
||||
|
||||
# These are the subdirectories containing the library source. The order
|
||||
# is more or less arbitrary. The sorting step will take care of the
|
||||
# dependencies. Only the $(binfmt-subdir) should always be kept at the
|
||||
# end of the list.
|
||||
# dependencies.
|
||||
all-subdirs = csu assert ctype locale intl catgets math setjmp signal \
|
||||
stdlib stdio-common libio malloc string wcsmbs time dirent \
|
||||
stdlib stdio-common libio malloc string wcsmbs time dirent \
|
||||
grp pwd posix io termios resource misc socket sysvipc gmon \
|
||||
gnulib iconv iconvdata wctype manual shadow po argp \
|
||||
crypt $(add-ons) nss localedata timezone rt conform debug \
|
||||
$(sysdep-subdirs) $(dlfcn) $(binfmt-subdir)
|
||||
all-subdirs := $(filter-out $(sysdep-inhibit-subdirs),$(all-subdirs))
|
||||
|
||||
# The mach and hurd subdirectories have many generated header files which
|
||||
# much of the rest of the library depends on, so it is best to build them
|
||||
# first (and mach before hurd, at that). The before-compile additions in
|
||||
# sysdeps/{mach,hurd}/Makefile should make it reliably work for these files
|
||||
# not to exist when making in other directories, but it will be slower that
|
||||
# way with more somewhat expensive `make' invocations.
|
||||
subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
|
||||
$(filter-out mach hurd,$(subdirs))
|
||||
crypt nss localedata timezone rt conform debug \
|
||||
$(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
|
||||
|
||||
ifndef avoid-generated
|
||||
all-Subdirs-files = $(wildcard $(config-sysdirs:%=$(..)%/Subdirs))
|
||||
$(common-objpfx)sysd-dirs: $(common-objpfx)config.make $(all-Subdirs-files)
|
||||
$(AWK) 'BEGIN { subdirs = ""; inhibit = "" }; \
|
||||
/^#/ { next }; \
|
||||
/^[^-]/ { subdirs = subdirs " " $$0 }; \
|
||||
/^-/ { inhibit = inhibit " " substr($$0, 2) }; \
|
||||
END { printf "sysdep-subdirs =%s\n", subdirs; \
|
||||
printf "sysdep-inhibit-subdirs =%s\n", inhibit; \
|
||||
print "sysd-dirs-done = t" }' \
|
||||
$(patsubst $<,/dev/null,$^) > $@-tmp
|
||||
mv -f $@-tmp $@
|
||||
|
||||
all-Depend-files = $(wildcard $(..)*/Depend)
|
||||
$(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk $(all-Depend-files) \
|
||||
$(common-objpfx)sysd-dirs $(..)Makeconfig
|
||||
{ { dirs='$(patsubst $(..)%/Depend,%,$(filter %/Depend,$^))'; \
|
||||
for d in $$dirs; do \
|
||||
while read on; do \
|
||||
echo "depend $$d $$on"; \
|
||||
done < $(..)$$d/Depend; \
|
||||
done; \
|
||||
for f in $(all-subdirs); do \
|
||||
echo $$f; \
|
||||
done; \
|
||||
} | $(AWK) -f $< && \
|
||||
echo sysd-sorted-done = t; \
|
||||
} > $@-tmp
|
||||
all-Depend-files := $(wildcard $(foreach dir,$(all-subdirs),\
|
||||
$(firstword $($(dir)-srcdir) \
|
||||
$(..)$(dir))/Depend))
|
||||
$(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk \
|
||||
$(common-objpfx)config.make $(..)Makeconfig \
|
||||
$(wildcard $(sysdirs:=/Subdirs)) \
|
||||
$(all-Depend-files)
|
||||
$(AWK) -f $< \
|
||||
-v subdirs='$(all-subdirs)' \
|
||||
-v srcpfx='$(..)' \
|
||||
$(filter %/Subdirs %/Depend,$^) > $@-tmp
|
||||
mv -f $@-tmp $@
|
||||
$(all-Depend-files): ;
|
||||
endif
|
||||
|
||||
# Let sysdeps/ subdirs contain a Makeconfig fragment for us to include here.
|
||||
sysdep-makeconfigs := $(wildcard $(patsubst %,$(..)%/Makeconfig,\
|
||||
$(config-sysdirs) $(add-ons)))
|
||||
|
||||
sysdep-makeconfigs := $(wildcard $(+sysdep_dirs:=/Makeconfig))
|
||||
ifneq (,$(sysdep-makeconfigs))
|
||||
Makeconfig-doing-sysdep := $(sysdep-makeconfigs)
|
||||
# Before each one, include ourselves again to do the bit below that
|
||||
# will set `Makeconfig-add-on' in an add-on's Makeconfig fragment.
|
||||
include $(foreach M,$(sysdep-makeconfigs),$(..)Makeconfig $M)
|
||||
include $(sysdep-makeconfigs)
|
||||
endif
|
||||
|
||||
|
||||
endif # Makeconfig not yet included
|
||||
|
||||
# The whole body above didn't run when we are included as a subroutine
|
||||
# of ourselves in the sysdep-makeconfigs include line. This bit runs.
|
||||
ifneq (,$(Makeconfig-doing-sysdep))
|
||||
sysdep-Makeconfig := $(firstword $(Makeconfig-doing-sysdep))
|
||||
Makeconfig-doing-sysdep := $(filter-out $(sysdep-Makeconfig),\
|
||||
$(Makeconfig-doing-sysdep))
|
||||
Makeconfig-add-on := $(filter $(add-ons),$(patsubst $(..)%/Makeconfig,%,\
|
||||
$(sysdep-Makeconfig)))
|
||||
endif
|
||||
|
||||
# Local Variables:
|
||||
# mode: makefile
|
||||
# End:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991-2002,2003,2004,2005,2006 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
|
||||
@@ -50,6 +50,7 @@ endef
|
||||
|
||||
configure: configure.in aclocal.m4; $(autoconf-it)
|
||||
%/configure: %/configure.in aclocal.m4; $(autoconf-it)
|
||||
%/preconfigure: %/preconfigure.in aclocal.m4; $(autoconf-it)
|
||||
|
||||
endif # $(AUTOCONF) = no
|
||||
|
||||
@@ -64,7 +65,7 @@ endif # $(AUTOCONF) = no
|
||||
subdir_update-abi subdir_check-abi \
|
||||
subdir_echo-headers \
|
||||
subdir_install \
|
||||
subdir_testclean \
|
||||
subdir_objs subdir_stubs subdir_testclean \
|
||||
$(addprefix install-, no-libc.a bin lib data headers others)
|
||||
|
||||
headers := limits.h values.h features.h gnu-versions.h bits/libc-lock.h \
|
||||
@@ -157,13 +158,26 @@ others: $(common-objpfx)testrun.sh
|
||||
|
||||
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
|
||||
|
||||
ifeq ($(biarch),no)
|
||||
installed-stubs = $(inst_includedir)/gnu/stubs.h
|
||||
else
|
||||
installed-stubs = $(inst_includedir)/gnu/stubs-$(biarch).h
|
||||
|
||||
$(inst_includedir)/gnu/stubs.h: include/stubs-biarch.h $(+force)
|
||||
$(make-target-directory)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
install-others-nosubdir: $(installed-stubs)
|
||||
endif
|
||||
|
||||
|
||||
# Since stubs.h is never needed when building the library, we simplify the
|
||||
# hairy installation process by producing it in place only as the last part
|
||||
# of the top-level `make install'. It depends on subdir_install, which
|
||||
# iterates over all the subdirs; subdir_install in each subdir depends on
|
||||
# the subdir's stubs file. Having more direct dependencies would result in
|
||||
# extra iterations over the list for subdirs and many recursive makes.
|
||||
$(inst_includedir)/gnu/stubs.h: include/stubs-prologue.h subdir_install
|
||||
$(installed-stubs): include/stubs-prologue.h subdir_install
|
||||
$(make-target-directory)
|
||||
@rm -f $(objpfx)stubs.h
|
||||
(sed '/^@/d' $<; LC_ALL=C sort $(subdir-stubs)) > $(objpfx)stubs.h
|
||||
@@ -189,7 +203,13 @@ all-subdirs-targets := $(foreach dir,$(subdirs),\
|
||||
# The action for each of those is to cd into the directory and make the
|
||||
# target there.
|
||||
$(all-subdirs-targets):
|
||||
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
|
||||
$(MAKE) $(PARALLELMFLAGS) $(subdir-target-args) $(@F)
|
||||
|
||||
define subdir-target-args
|
||||
subdir=$(@D)$(if $($(@D)-srcdir),\
|
||||
-C $($(@D)-srcdir) ..=`pwd`/,\
|
||||
-C $(@D) ..=../)
|
||||
endef
|
||||
|
||||
.PHONY: $(+subdir_targets) $(all-subdirs-targets)
|
||||
|
||||
@@ -223,14 +243,14 @@ mostlyclean: parent-mostlyclean
|
||||
tests-clean:
|
||||
@$(MAKE) subdir_testclean no_deps=t
|
||||
|
||||
tests: $(objpfx)c++-types-check.out
|
||||
tests: $(objpfx)c++-types-check.out $(objpfx)check-local-headers.out
|
||||
ifneq ($(CXX),no)
|
||||
check-data := $(firstword $(wildcard \
|
||||
$(foreach M,$(config-machine) $(base-machine),\
|
||||
scripts/data/c++-types-$M-$(config-os).data)))
|
||||
ifneq (,$(check-data))
|
||||
$(objpfx)c++-types-check.out: $(check-data)
|
||||
scripts/check-c++-types.sh $^ $(CXX) $(filter-out -std=gnu99 -Wstrict-prototypes,$(CFLAGS)) $(CPPFLAGS) > $@
|
||||
$(objpfx)c++-types-check.out: $(check-data) scripts/check-c++-types.sh
|
||||
scripts/check-c++-types.sh $< $(CXX) $(filter-out -std=gnu99 -Wstrict-prototypes,$(CFLAGS)) $(CPPFLAGS) > $@
|
||||
else
|
||||
$(objpfx)c++-types-check.out:
|
||||
@echo 'WARNING C++ tests not run; create a c++-types-XXX file'
|
||||
@@ -238,6 +258,59 @@ $(objpfx)c++-types-check.out:
|
||||
endif
|
||||
endif
|
||||
|
||||
$(objpfx)check-local-headers.out: scripts/check-local-headers.sh
|
||||
scripts/check-local-headers.sh "$(includedir)" "$(objpfx)" > $@
|
||||
|
||||
ifneq ($(PERL),no)
|
||||
installed-headers = argp/argp.h assert/assert.h catgets/nl_types.h \
|
||||
crypt/crypt.h ctype/ctype.h debug/execinfo.h \
|
||||
dirent/dirent.h dlfcn/dlfcn.h elf/elf.h elf/link.h \
|
||||
gmon/sys/gmon.h gmon/sys/gmon_out.h gmon/sys/profil.h \
|
||||
grp/grp.h iconv/iconv.h iconv/gconv.h \
|
||||
$(wildcard inet/netinet/*.h) \
|
||||
$(wildcard inet/arpa/*.h inet/protocols/*.h) \
|
||||
inet/aliases.h inet/ifaddrs.h inet/netinet/ip6.h \
|
||||
inet/netinet/icmp6.h intl/libintl.h io/sys/stat.h \
|
||||
io/sys/statfs.h io/sys/vfs.h io/sys/statvfs.h \
|
||||
io/fcntl.h io/sys/fcntl.h io/poll.h io/sys/poll.h \
|
||||
io/utime.h io/ftw.h io/fts.h io/sys/sendfile.h \
|
||||
libio/stdio.h libio/libio.h locale/locale.h \
|
||||
locale/langinfo.h locale/xlocale.h login/utmp.h \
|
||||
login/lastlog.h login/pty.h malloc/malloc.h \
|
||||
malloc/obstack.h malloc/mcheck.h math/math.h \
|
||||
math/complex.h math/fenv.h math/tgmath.h misc/sys/uio.h \
|
||||
$(wildcard nis/rpcsvc/*.h) nptl_db/thread_db.h \
|
||||
nptl/sysdeps/pthread/pthread.h nptl/semaphore.h \
|
||||
nss/nss.h posix/sys/utsname.h posix/sys/times.h \
|
||||
posix/sys/wait.h posix/sys/types.h posix/unistd.h \
|
||||
posix/glob.h posix/regex.h posix/wordexp.h posix/fnmatch.h\
|
||||
posix/getopt.h posix/tar.h posix/sys/unistd.h \
|
||||
posix/sched.h posix/re_comp.h posix/wait.h \
|
||||
posix/cpio.h posix/spawn.h pwd/pwd.h resolv/resolv.h \
|
||||
resolv/netdb.h $(wildcard resolv/arpa/*.h) \
|
||||
resource/sys/resource.h resource/sys/vlimit.h \
|
||||
resource/sys/vtimes.h resource/ulimit.h rt/aio.h \
|
||||
rt/mqueue.h setjmp/setjmp.h shadow/shadow.h \
|
||||
signal/signal.h signal/sys/signal.h socket/sys/socket.h \
|
||||
socket/sys/un.h stdio-common/printf.h \
|
||||
stdio-common/stdio_ext.h stdlib/stdlib.h stdlib/alloca.h \
|
||||
stdlib/monetary.h stdlib/fmtmsg.h stdlib/ucontext.h \
|
||||
sysdeps/generic/inttypes.h sysdeps/generic/stdint.h \
|
||||
stdlib/errno.h stdlib/sys/errno.h string/string.h \
|
||||
string/strings.h string/memory.h string/endian.h \
|
||||
string/argz.h string/envz.h string/byteswap.h \
|
||||
$(wildcard sunrpc/rpc/*.h sunrpc/rpcsvc/*.h) \
|
||||
sysvipc/sys/ipc.h sysvipc/sys/msg.h sysvipc/sys/sem.h \
|
||||
sysvipc/sys/shm.h termios/termios.h \
|
||||
termios/sys/termios.h termios/sys/ttychars.h time/time.h \
|
||||
time/sys/time.h time/sys/timeb.h wcsmbs/wchar.h \
|
||||
wctype/wctype.h
|
||||
|
||||
tests: $(objpfx)begin-end-check.out
|
||||
$(objpfx)begin-end-check.out: scripts/begin-end-check.pl
|
||||
$(PERL) scripts/begin-end-check.pl $(installed-headers) > $@
|
||||
endif
|
||||
|
||||
# The realclean target is just like distclean for the parent, but we want
|
||||
# the subdirs to know the difference in case they care.
|
||||
realclean distclean: parent-clean
|
||||
@@ -259,6 +332,15 @@ ifdef objdir
|
||||
endif
|
||||
-rm -f $(sysdep-$(distclean-1))
|
||||
|
||||
# Make the TAGS file for Emacs users.
|
||||
|
||||
.PHONY: TAGS
|
||||
TAGS:
|
||||
scripts/list-sources.sh | sed -n '/Makefile/p;\
|
||||
$(foreach S,[chsSyl] cxx sh bash pl,\
|
||||
$(subst .,\.,/.$S\(.in\)*$$/p;))' \
|
||||
| $(ETAGS) -o $@ -
|
||||
|
||||
# Make the distribution tarfile.
|
||||
.PHONY: dist tag-for-dist
|
||||
|
||||
@@ -276,32 +358,33 @@ endif
|
||||
files-for-dist := README FAQ INSTALL NOTES configure
|
||||
|
||||
tag-of-stem = glibc-$(subst .,_,$*)
|
||||
dist-selector = -r $(tag-of-stem)
|
||||
|
||||
# Add-ons in the main repository but distributed in their own tar files.
|
||||
dist-separate = libidn linuxthreads
|
||||
|
||||
# Directories in each add-on.
|
||||
dist-separate-libidn = libidn
|
||||
dist-separate-linuxthreads = linuxthreads linuxthreads_db
|
||||
dist-separate = libidn
|
||||
|
||||
glibc-%.tar $(dist-separate:%=glibc-%-%.tar): $(files-for-dist) \
|
||||
$(foreach D,$(dist-separate),\
|
||||
$D/configure)
|
||||
@rm -fr glibc-$*
|
||||
cvs $(CVSOPTS) -Q export -d glibc-$* -r $(tag-of-stem) libc
|
||||
$(MAKE) -q `find sysdeps $(addsuffix /sysdeps,$(sysdeps-add-ons)) \
|
||||
-name configure`
|
||||
cvs $(CVSOPTS) -Q export -d glibc-$* $(dist-selector) libc
|
||||
# Touch all the configure scripts going into the tarball since cvs export
|
||||
# might have delivered configure.in newer than configure.
|
||||
find glibc-$* -name configure -print | xargs touch
|
||||
$(dist-do-separate-dirs)
|
||||
tar cf glibc-$*.tar glibc-$*
|
||||
rm -fr glibc-$*
|
||||
define dist-do-separate-dirs
|
||||
$(foreach dir,$(dist-separate),
|
||||
tar cf glibc-$(dir)-$*.tar -C glibc-$* $(dist-separate-$(dir))
|
||||
rm -rf $(addprefix glibc-$*/,$(dist-separate-$(dir)))
|
||||
@rm -fr glibc-$(dir)-$*
|
||||
mv glibc-$*/$(dir) glibc-$(dir)-$*
|
||||
tar cf glibc-$(dir)-$*.tar glibc-$(dir)-$*
|
||||
rm -fr glibc-$(dir)-$*
|
||||
)
|
||||
endef
|
||||
|
||||
%.bz2: %; bzip2 -9vk $<
|
||||
%.gz: %; gzip -9vnc $< > $@.new && mv -f $@.new $@
|
||||
|
||||
# Do `make dist dist-version=X.Y.Z' to make tar files of an older version.
|
||||
dist-version = $(version)
|
||||
|
||||
@@ -316,7 +399,7 @@ tag-%: $(files-for-dist)
|
||||
|
||||
define format-me
|
||||
@rm -f $@
|
||||
makeinfo --no-validate --no-warn --no-headers $< -o $@
|
||||
makeinfo --no-validate --plaintext --no-number-sections $< -o $@
|
||||
-chmod a-w $@
|
||||
endef
|
||||
INSTALL: manual/install.texi; $(format-me)
|
||||
@@ -330,7 +413,7 @@ ifeq ($(with-cvs),yes)
|
||||
endif
|
||||
FORCE:
|
||||
|
||||
iconvdata/% localedata/% po/% manual/%:
|
||||
iconvdata/% localedata/% po/% manual/%: FORCE
|
||||
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
|
||||
|
||||
# glibc 2.0 contains some header files which aren't used with glibc 2.1
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Generated from $Id$.
|
||||
|
||||
srcdir = @srcdir@
|
||||
|
||||
# Uncomment the line below if you want to do parallel build.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991-2002,2003,2004,2005,2006 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,22 +56,6 @@ ifndef +included-Makeconfig
|
||||
include $(..)Makeconfig
|
||||
endif
|
||||
|
||||
# `configure' writes a definition of `config-sysdirs' in `config.make'.
|
||||
sysdirs = $(strip $(full_config_sysdirs))
|
||||
|
||||
+sysdir_pfx = $(common-objpfx)
|
||||
|
||||
export sysdirs := $(sysdirs)
|
||||
|
||||
+sysdep_dirs := $(full_config_sysdirs)
|
||||
ifdef objdir
|
||||
+sysdep_dirs := $(objdir) $(+sysdep_dirs)
|
||||
endif
|
||||
|
||||
# Add -I switches to get the right sysdep directories.
|
||||
# `+includes' in Makeconfig references $(+sysdep-includes).
|
||||
+sysdep-includes := $(addprefix -I,$(+sysdep_dirs))
|
||||
|
||||
# This variable is used in ``include $(o-iterator)'' after defining
|
||||
# $(o-iterator-doit) to produce some desired rule using $o for the object
|
||||
# suffix, and setting $(object-suffixes-left) to $(object-suffixes); a copy
|
||||
@@ -94,7 +78,7 @@ vpath %.x $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
|
||||
# being included individually by a subdir makefile (hurd/Makefile needs this).
|
||||
in-Makerules := yes
|
||||
|
||||
sysdep-makefiles := $(wildcard $(full_config_sysdirs:=/Makefile))
|
||||
sysdep-makefiles := $(wildcard $(sysdirs:=/Makefile))
|
||||
ifneq (,$(sysdep-makefiles))
|
||||
include $(sysdep-makefiles)
|
||||
endif
|
||||
@@ -165,7 +149,7 @@ ifndef subdir
|
||||
$(common-objpfx)%.make: $(..)%.make.c $(..)Makerules $(common-before-compile)
|
||||
rm -f $@T $@.dT
|
||||
(echo '# Generated from $*.make.c by Makerules.'; \
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -E $< \
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -E -DASSEMBLER $< \
|
||||
-MD -MP -MT '$$(common-objpfx)$*.make' -MF $@.dT \
|
||||
| sed -n '/@@@/{s/@@@[ ]*\(.*\)@@@/\1/;s/[ ]*$$//p;}'; \
|
||||
echo 'common-generated += $(@F)'; \
|
||||
@@ -183,6 +167,7 @@ sed-remove-dotdot := -e 's@ *\([^ \/$$][^ \]*\)@ $$(..)\1@g' \
|
||||
endif
|
||||
|
||||
|
||||
ifdef gen-as-const-headers
|
||||
# Generating headers for assembly constants.
|
||||
# We need this defined early to get into before-compile before
|
||||
# it's used in sysd-rules, below.
|
||||
@@ -201,6 +186,16 @@ $(common-objpfx)%.h $(common-objpfx)%.h.d: $(..)scripts/gen-as-const.awk \
|
||||
mv -f $(@:.h.d=.h)T $(@:.h.d=.h)
|
||||
vpath %.sym $(sysdirs)
|
||||
before-compile += $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)
|
||||
|
||||
tests += $(gen-as-const-headers:%.sym=test-as-const-%)
|
||||
generated += $(gen-as-const-headers:%.sym=test-as-const-%.c)
|
||||
$(objpfx)test-as-const-%.c: $(..)scripts/gen-as-const.awk $(..)Makerules \
|
||||
%.sym $(common-objpfx)%.h
|
||||
($(AWK) '{ sub(/^/, "asconst_", $$2); print; }' $(filter %.h,$^); \
|
||||
$(AWK) -v test=1 -f $< $(filter %.sym,$^); \
|
||||
echo '#include "$(..)test-skeleton.c"') > $@T
|
||||
mv -f $@T $@
|
||||
endif
|
||||
|
||||
# Generate an ordered list of implicit rules which find the source files in
|
||||
# each sysdep directory. The old method was to use vpath to search all the
|
||||
@@ -208,11 +203,71 @@ before-compile += $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)
|
||||
# later directory would be chosen over a .c file in an earlier directory,
|
||||
# which does not preserve the desired sysdeps ordering behavior.
|
||||
|
||||
# It matters that this set of rules, for compiling from sources in
|
||||
# the current directory (the $srcdir/$subdir) come before the
|
||||
# generated sysdep rules in included from sysd-rules below. When
|
||||
# compiling in the source tree, generated sources go into the current
|
||||
# directory, and those should be chosen before any sources in sysdeps.
|
||||
# System-dependent makefiles can put in `inhibit-sysdep-asm' wildcard
|
||||
# patterns matching sysdep directories whose assembly source files should
|
||||
# be suppressed.
|
||||
ifdef inhibit-sysdep-asm
|
||||
define open-check-inhibit-asm
|
||||
case $$sysdir in $(subst $(empty) ,|,$(inhibit-sysdep-asm))) : ;; *)
|
||||
endef
|
||||
close-check-inhibit-asm = ;; esac ;
|
||||
endif
|
||||
|
||||
-include $(common-objpfx)sysd-rules
|
||||
ifneq ($(sysd-rules-sysdirs),$(config-sysdirs))
|
||||
# The value of $(+sysdep_dirs) the sysd-rules was computed for
|
||||
# differs from the one we are using now. So force a rebuild of sysd-rules.
|
||||
sysd-rules-force = FORCE
|
||||
FORCE:
|
||||
endif
|
||||
$(common-objpfx)sysd-rules: $(common-objpfx)config.make $(..)Makerules \
|
||||
$(sysdep-makefiles) $(sysd-rules-force)
|
||||
-@rm -f $@T
|
||||
(echo 'sysd-rules-sysdirs := $(config-sysdirs)'; \
|
||||
for dir in $(config-sysdirs); do \
|
||||
case "$$dir" in \
|
||||
/*) ;; \
|
||||
*) dir="\$$(..)$$dir" ;; \
|
||||
esac; \
|
||||
for o in $(all-object-suffixes); do \
|
||||
$(open-check-inhibit-asm) \
|
||||
echo "\$$(objpfx)%$$o: $$dir/%.S \$$(before-compile); \
|
||||
\$$(compile-command.S)"; \
|
||||
echo "\$$(objpfx)%$$o: $$dir/%.s \$$(before-compile); \
|
||||
\$$(compile-command.s)"; \
|
||||
echo "\$$(objpfx)rtld-%$$o: $$dir/%.S \$$(before-compile); \
|
||||
\$$(compile-command.S)"; \
|
||||
echo "\$$(objpfx)rtld-%$$o: $$dir/%.s \$$(before-compile); \
|
||||
\$$(compile-command.s)"; \
|
||||
echo "\$$(objpfx)ptw-%$$o: $$dir/%.S \$$(before-compile); \
|
||||
\$$(compile-command.S)"; \
|
||||
echo "\$$(objpfx)ptw-%$$o: $$dir/%.s \$$(before-compile); \
|
||||
\$$(compile-command.s)"; \
|
||||
echo "\$$(objpfx)m_%$$o: $$dir/s_%.S \$$(before-compile); \
|
||||
\$$(compile-command.S)"; \
|
||||
echo "\$$(objpfx)m_%$$o: $$dir/s_%.s \$$(before-compile); \
|
||||
\$$(compile-command.s)"; \
|
||||
$(close-check-inhibit-asm) \
|
||||
echo "\$$(objpfx)%$$o: $$dir/%.c \$$(before-compile); \
|
||||
\$$(compile-command.c)"; \
|
||||
echo "\$$(objpfx)rtld-%$$o: $$dir/%.c \$$(before-compile); \
|
||||
\$$(compile-command.c)"; \
|
||||
echo "\$$(objpfx)ptw-%$$o: $$dir/%.c \$$(before-compile); \
|
||||
\$$(compile-command.c)"; \
|
||||
echo "\$$(objpfx)m_%$$o: $$dir/s_%.c \$$(before-compile); \
|
||||
\$$(compile-command.c)"; \
|
||||
done; \
|
||||
echo "\$$(inst_includedir)/%.h: $$dir/%.h \$$(+force); \
|
||||
\$$(do-install)"; \
|
||||
done; \
|
||||
echo 'sysd-rules-done = t') > $@T
|
||||
mv -f $@T $@
|
||||
|
||||
ifndef sysd-rules-done
|
||||
# Don't do deps until this exists, because it provides rules to make the deps.
|
||||
no_deps=t
|
||||
endif
|
||||
|
||||
define o-iterator-doit
|
||||
$(objpfx)%$o: %.S $(before-compile); $$(compile-command.S)
|
||||
endef
|
||||
@@ -231,6 +286,12 @@ endef
|
||||
object-suffixes-left := $(all-object-suffixes)
|
||||
include $(o-iterator)
|
||||
|
||||
define o-iterator-doit
|
||||
$(objpfx)%$o: %.cc $(before-compile); $$(compile-command.cc)
|
||||
endef
|
||||
object-suffixes-left := $(all-object-suffixes)
|
||||
include $(o-iterator)
|
||||
|
||||
# Omit the objpfx rules when building in the source tree, because
|
||||
# objpfx is empty and so these rules just override the ones above.
|
||||
ifdef objpfx
|
||||
@@ -255,69 +316,6 @@ object-suffixes-left := $(all-object-suffixes)
|
||||
include $(o-iterator)
|
||||
endif
|
||||
|
||||
# System-dependent makefiles can put in `inhibit-sysdep-asm' wildcard
|
||||
# patterns matching sysdep directories whose assembly source files should
|
||||
# be suppressed.
|
||||
ifdef inhibit-sysdep-asm
|
||||
define open-check-inhibit-asm
|
||||
case $$sysdir in $(subst $(empty) ,|,$(inhibit-sysdep-asm))) : ;; *)
|
||||
endef
|
||||
close-check-inhibit-asm = ;; esac ;
|
||||
endif
|
||||
|
||||
-include $(+sysdir_pfx)sysd-rules
|
||||
ifneq ($(sysd-rules-sysdirs),$(config-sysdirs))
|
||||
# The value of $(+sysdep_dirs) the sysd-rules was computed for
|
||||
# differs from the one we are using now. So force a rebuild of sysd-rules.
|
||||
sysd-rules-force = FORCE
|
||||
FORCE:
|
||||
endif
|
||||
$(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \
|
||||
$(wildcard $(foreach dir,$(sysdirs),\
|
||||
$(dir)/Makefile))\
|
||||
$(sysd-rules-force)
|
||||
-@rm -f $@T
|
||||
(echo 'sysd-rules-sysdirs := $(config-sysdirs)'; \
|
||||
for dir in $(config-sysdirs:%='$$(..)%'); do \
|
||||
for o in $(all-object-suffixes); do \
|
||||
$(open-check-inhibit-asm) \
|
||||
echo "\$$(objpfx)%$$o: $$dir/%.S \$$(before-compile); \
|
||||
\$$(compile-command.S)"; \
|
||||
echo "\$$(objpfx)%$$o: $$dir/%.s \$$(before-compile); \
|
||||
\$$(compile-command.s)"; \
|
||||
echo "\$$(objpfx)rtld-%$$o: $$dir/%.S \$$(before-compile); \
|
||||
\$$(compile-command.S)"; \
|
||||
echo "\$$(objpfx)rtld-%$$o: $$dir/%.s \$$(before-compile); \
|
||||
\$$(compile-command.s)"; \
|
||||
echo "\$$(objpfx)ptw-%$$o: $$dir/%.S \$$(before-compile); \
|
||||
\$$(compile-command.S)"; \
|
||||
echo "\$$(objpfx)ptw-%$$o: $$dir/%.s \$$(before-compile); \
|
||||
\$$(compile-command.s)"; \
|
||||
$(close-check-inhibit-asm) \
|
||||
echo "\$$(objpfx)%$$o: $$dir/%.c \$$(before-compile); \
|
||||
\$$(compile-command.c)"; \
|
||||
echo "\$$(objpfx)rtld-%$$o: $$dir/%.c \$$(before-compile); \
|
||||
\$$(compile-command.c)"; \
|
||||
echo "\$$(objpfx)ptw-%$$o: $$dir/%.c \$$(before-compile); \
|
||||
\$$(compile-command.c)"; \
|
||||
done; \
|
||||
echo "\$$(objpfx)m_%.S: $$dir/s_%.S; \$$(+make-include-of-dep)"; \
|
||||
echo "\$$(objpfx)m_%.c: $$dir/s_%.c; \$$(+make-include-of-dep)"; \
|
||||
done; \
|
||||
echo 'sysd-rules-done = t') > $@T
|
||||
mv -f $@T $@
|
||||
|
||||
ifndef sysd-rules-done
|
||||
# Don't do deps until this exists, because it provides rules to make the deps.
|
||||
no_deps=t
|
||||
endif
|
||||
|
||||
# This is used by the m_%.[Sc] pattern rules in sysd-rules.
|
||||
define +make-include-of-dep
|
||||
echo '#include <$<>' > $@T
|
||||
mv -f $@T $@
|
||||
endef
|
||||
|
||||
# Generate version maps, but wait until sysdep-subdirs is known
|
||||
ifeq ($(sysd-sorted-done),t)
|
||||
ifeq ($(versioning),yes)
|
||||
@@ -328,7 +326,7 @@ postclean-generated += sysd-versions Versions.all abi-versions.h \
|
||||
Versions.def.v.i Versions.def.v Versions.v.i Versions.v
|
||||
|
||||
ifndef avoid-generated
|
||||
ifneq ($(sysd-versions-subdirs),$(all-subdirs) $(config-sysdirs))
|
||||
ifneq ($(sysd-versions-subdirs),$(sorted-subdirs) $(config-sysdirs))
|
||||
sysd-versions-force = FORCE
|
||||
FORCE:
|
||||
endif
|
||||
@@ -338,21 +336,22 @@ $(common-objpfx)Versions.def.v.i: $(..)Versions.def \
|
||||
$(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \
|
||||
$(common-objpfx)soversions.i \
|
||||
$(common-objpfx)Versions.def.v
|
||||
{ while read lib version setname; do \
|
||||
{ while read which lib version setname; do \
|
||||
test x"$$which" = xDEFAULT || continue; \
|
||||
test -z "$$setname" || echo "$$lib : $$setname"; \
|
||||
done < $(word 2,$^); \
|
||||
cat $(word 3,$^); \
|
||||
} | LC_ALL=C $(AWK) -f $< > $@T
|
||||
mv -f $@T $@
|
||||
# See %.v/%.v.i implicit rules in Makeconfig.
|
||||
$(common-objpfx)Versions.v.i: $(wildcard $(all-subdirs:%=$(..)%/Versions)) \
|
||||
$(common-objpfx)Versions.v.i: $(wildcard $(subdirs:%=$(..)%/Versions)) \
|
||||
$(wildcard $(sysdirs:%=%/Versions)) \
|
||||
$(common-objpfx)abi-versions.h \
|
||||
$(sysd-versions-force)
|
||||
$(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \
|
||||
$(common-objpfx)Versions.v \
|
||||
$(..)scripts/versions.awk
|
||||
( echo 'sysd-versions-subdirs = $(all-subdirs) $(config-sysdirs)' ; \
|
||||
( echo 'sysd-versions-subdirs = $(subdirs) $(config-sysdirs)' ; \
|
||||
cat $(word 2,$^) \
|
||||
| LC_ALL=C $(AWK) -v buildroot=$(common-objpfx) -v defsfile=$< \
|
||||
-v move_if_change='$(move-if-change)' \
|
||||
@@ -368,9 +367,11 @@ compile-mkdep-flags = -MD -MP -MF $@.dt -MT $@
|
||||
compile-command.S = $(compile.S) $(OUTPUT_OPTION) $(compile-mkdep-flags)
|
||||
compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION) $(compile-mkdep-flags)
|
||||
compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
|
||||
compile-command.cc = $(compile.cc) $(OUTPUT_OPTION) $(compile-mkdep-flags)
|
||||
|
||||
# GCC can grok options after the file name, and it looks nicer that way.
|
||||
compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
|
||||
compile.cc = $(CXX) $< -c $(CXXFLAGS) $(CPPFLAGS)
|
||||
compile.S = $(CC) $< -c $(CPPFLAGS) $(S-CPPFLAGS) \
|
||||
$(ASFLAGS) $(ASFLAGS-$(suffix $@))
|
||||
COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
|
||||
@@ -491,7 +492,7 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
|
||||
PROVIDE(__start___libc_freeres_ptrs = .); \
|
||||
*(__libc_freeres_ptrs) \
|
||||
PROVIDE(__stop___libc_freeres_ptrs = .);/'\
|
||||
-e 's/^.*\*(\.jcr).*$$/& \
|
||||
-e 's@^.*\*(\.jcr).*$$@& \
|
||||
PROVIDE(__start___libc_subfreeres = .);\
|
||||
__libc_subfreeres : { *(__libc_subfreeres) }\
|
||||
PROVIDE(__stop___libc_subfreeres = .);\
|
||||
@@ -500,7 +501,8 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
|
||||
PROVIDE(__stop___libc_atexit = .);\
|
||||
PROVIDE(__start___libc_thread_subfreeres = .);\
|
||||
__libc_thread_subfreeres : { *(__libc_thread_subfreeres) }\
|
||||
PROVIDE(__stop___libc_thread_subfreeres = .);/'
|
||||
PROVIDE(__stop___libc_thread_subfreeres = .);\
|
||||
/DISCARD/ : { *(.gnu.glibc-stub.*) }@'
|
||||
mv -f $@T $@
|
||||
common-generated += shlib.lds
|
||||
|
||||
@@ -550,6 +552,11 @@ define build-module
|
||||
$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
|
||||
$(csu-objpfx)abi-note.o $(build-module-objlist)
|
||||
endef
|
||||
define build-module-asneeded
|
||||
$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
|
||||
$(csu-objpfx)abi-note.o \
|
||||
-Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed
|
||||
endef
|
||||
else
|
||||
ifneq (,$(findstring aix,$(config-os)))
|
||||
define build-module
|
||||
@@ -581,8 +588,8 @@ build-shlib-objlist = $(build-module-helper-objlist) \
|
||||
# Also omits crti.o and crtn.o, which we do not want
|
||||
# since we define our own `.init' section specially.
|
||||
LDFLAGS-c.so = -nostdlib -nostartfiles
|
||||
# But we still want to link libc.so against $(static-gnulib).
|
||||
LDLIBS-c.so += $(static-gnulib)
|
||||
# But we still want to link libc.so against $(libc.so-gnulib).
|
||||
LDLIBS-c.so += $(libc.so-gnulib)
|
||||
# Give libc.so an entry point and make it directly runnable itself.
|
||||
LDFLAGS-c.so += -e __libc_main
|
||||
# If lazy relocation is disabled add the -z now flag.
|
||||
@@ -663,18 +670,25 @@ include $(patsubst %,$(..)extra-lib.mk,$(extra-libs))
|
||||
endif
|
||||
|
||||
|
||||
# The makefile may define $(modules-names) # to build additional
|
||||
# modules.
|
||||
# The makefile may define $(modules-names) to build additional modules.
|
||||
# These are built with $(build-module), except any in $(modules-names-nobuild).
|
||||
ifdef modules-names
|
||||
# extra-lib.mk is included once for each extra lib to define rules
|
||||
# to build it, and to add its objects to the various variables.
|
||||
# During its evaluation, $(lib) is set to the name of the library.
|
||||
extra-modules-left := $(modules-names)
|
||||
include $(patsubst %,$(..)extra-modules.mk,$(modules-names))
|
||||
|
||||
extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
|
||||
$(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
|
||||
$(objpfx)%.os $(common-objpfx)shlib.lds \
|
||||
$(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
|
||||
$(build-module)
|
||||
endif
|
||||
|
||||
+depfiles := $(sources:.c=.d) \
|
||||
$(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \
|
||||
$(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \
|
||||
$(addsuffix .d,$(tests) $(xtests) $(test-srcs))
|
||||
ifeq ($(build-programs),yes)
|
||||
+depfiles += $(addsuffix .d,$(others) $(sysdep-others))
|
||||
@@ -970,7 +984,7 @@ $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
|
||||
cat $<; \
|
||||
echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
|
||||
'$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
|
||||
')' \
|
||||
' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
|
||||
) > $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
@@ -1093,8 +1107,21 @@ $(addprefix $(inst_datadir)/,$(install-data)): $(inst_datadir)/%: % $(+force)
|
||||
endif
|
||||
headers := $(strip $(headers))
|
||||
ifdef headers
|
||||
$(addprefix $(inst_includedir)/,$(headers)): $(inst_includedir)/%: % $(+force)
|
||||
# This implicit rule installs headers from the source directory.
|
||||
# It may be ignored in preference to rules from sysd-rules to find
|
||||
# headers in the sysdeps tree.
|
||||
$(inst_includedir)/%.h: $(objpfx)%.h $(+force)
|
||||
$(do-install)
|
||||
$(inst_includedir)/%.h: %.h $(+force)
|
||||
$(do-install)
|
||||
$(inst_includedir)/%.h: $(..)include/%.h $(+force)
|
||||
$(do-install)
|
||||
headers-nonh := $(filter-out %.h,$(headers))
|
||||
ifdef headers-nonh
|
||||
$(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
|
||||
% $(+force)
|
||||
$(do-install)
|
||||
endif # headers-nonh
|
||||
endif # headers
|
||||
|
||||
.PHONY: install-bin-nosubdir install-bin-script-nosubdir \
|
||||
@@ -1160,9 +1187,9 @@ xcheck: xtests
|
||||
|
||||
all-nonlib = $(strip $(tests) $(xtests) $(test-srcs) $(test-extras) $(others))
|
||||
ifneq (,$(all-nonlib))
|
||||
cpp-srcs-left = $(all-nonlib:=.c)
|
||||
cpp-srcs-left = $(all-nonlib:=.c) $(all-nonlib:=.cc)
|
||||
lib := nonlib
|
||||
include $(patsubst %,$(..)cppflags-iterator.mk,$(all-nonlib))
|
||||
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
|
||||
endif
|
||||
|
||||
# The include magic above causes those files to use this variable for flags.
|
||||
@@ -1261,18 +1288,12 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
# There's no good place to put this - here will do.
|
||||
ifeq ($(filter %posix, $(sysdirs)),)
|
||||
L_tmpnam = 1
|
||||
TMP_MAX = 0
|
||||
L_ctermid = 1
|
||||
L_cuserid = 1
|
||||
else
|
||||
L_tmpnam = 20
|
||||
TMP_MAX = 238328
|
||||
L_ctermid = 9
|
||||
L_cuserid = 9
|
||||
endif
|
||||
# These will have been set by sysdeps/posix/Makefile.
|
||||
L_tmpnam ?= 1
|
||||
TMP_MAX ?= 0
|
||||
L_ctermid ?= 1
|
||||
L_cuserid ?= 1
|
||||
|
||||
stdio_lim = $(common-objpfx)bits/stdio_lim.h
|
||||
|
||||
$(stdio_lim:lim.h=%.h) $(stdio_lim:lim.h=%.d): $(stdio_lim:lim.h=%.st); @:
|
||||
@@ -1315,19 +1336,14 @@ ifndef no_deps
|
||||
endif
|
||||
common-generated += bits/stdio_lim.h bits/stdio_lim.d bits/stdio_lim.st
|
||||
|
||||
.PHONY: TAGS
|
||||
TAGS: $(objpfx)distinfo $(..)MakeTAGS
|
||||
$(MAKE) $(addprefix -f ,$^) $@
|
||||
|
||||
$(..)po/%.pot: $(objpfx)distinfo $(..)MakeTAGS FORCE
|
||||
$(MAKE) $(addprefix -f ,$(filter-out FORCE,$^)) $@
|
||||
FORCE:
|
||||
|
||||
|
||||
.PHONY: echo-headers
|
||||
echo-headers:
|
||||
@echo $(headers)
|
||||
|
||||
%.bz2: %; bzip2 -9vk $<
|
||||
%.gz: %; gzip -9vnc $< > $@.new && mv -f $@.new $@
|
||||
|
||||
# Common cleaning targets.
|
||||
|
||||
@@ -1354,8 +1370,8 @@ common-mostlyclean:
|
||||
$(test-srcs)) \
|
||||
$(addsuffix -bp.out,$(tests) $(xtests) \
|
||||
$(test-srcs)))
|
||||
-rm -f $(addprefix $(objpfx),$(extra-objs) $(install-lib) \
|
||||
$(install-lib.so) \
|
||||
-rm -f $(addprefix $(objpfx),$(extra-objs) $(extra-test-objs) \
|
||||
$(install-lib) $(install-lib.so) \
|
||||
$(install-lib.so:%.so=%_pic.a))
|
||||
-rm -f core
|
||||
-rm -f $(objpfx)rtld-*.os
|
||||
@@ -1371,7 +1387,6 @@ common-clean: common-mostlyclean
|
||||
-rm -f $(objpfx)*.d $(objpfx)*.dt
|
||||
-rm -fr $(addprefix $(objpfx),$(generated-dirs))
|
||||
-rm -f $(addprefix $(common-objpfx),$(common-generated))
|
||||
-rm -f $(objpfx)distinfo
|
||||
|
||||
# Produce a file `stubs' which contains `#define __stub_FUNCTION'
|
||||
# for each function which is a stub. We grovel over all the .d files
|
||||
@@ -1382,44 +1397,20 @@ ifdef objpfx
|
||||
.PHONY: stubs # The parent Makefile calls this target.
|
||||
stubs: $(objpfx)stubs
|
||||
endif
|
||||
$(objpfx)stubs: $(+depfiles)
|
||||
ifneq (,$(strip $(+depfiles)))
|
||||
# Use /dev/null since `...` might expand to empty.
|
||||
c=`($(patsubst %/,cd % &&,$(objpfx)) \
|
||||
sed -n -e 's@\$$(common-objpfx)@$(common-objpfx)@g' \
|
||||
-e 's@\$$(objpfx)@$(objpfx)@g' \
|
||||
-e '/stub-tag\.h/{; g; s/./&/p; }' \
|
||||
-e '/:/{x; s/^.*$$//; x; }' \
|
||||
-e 's/^.*://;s/\\$$//;s/^ *\([^ ][^ ]*\) .*$$/\1/' \
|
||||
-e '/^[^ ][^ ]*$$/{G;s/^.*\n\(..*\)/\1/;s/\n//;h; }' \
|
||||
$(patsubst $(objpfx)%,%,$^)) | sort | uniq`; \
|
||||
sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
|
||||
$$c /dev/null > $@T
|
||||
objs-for-stubs := $(foreach o,$(object-suffixes-for-libc),$(o-objects)) \
|
||||
$(addprefix $(objpfx),$(extra-objs))
|
||||
$(objpfx)stubs: $(objs-for-stubs)
|
||||
ifneq (,$(strip $(objs-for-stubs)))
|
||||
(cd $(objpfx).; $(OBJDUMP) -h $(patsubst $(objpfx)%,%,$^)) | \
|
||||
$(AWK) '/\.gnu\.glibc-stub\./ { \
|
||||
sub(/\.gnu\.glibc-stub\./, "", $$2); \
|
||||
stubs[$$2] = 1; } \
|
||||
END { for (s in stubs) print "#define __stub_" s }' > $@T
|
||||
mv -f $@T $@
|
||||
else
|
||||
> $@
|
||||
endif
|
||||
|
||||
# This information is not used for making distributions any more.
|
||||
# But it's used by MakeTAGS for making TAGS files and the .pot files.
|
||||
$(objpfx)distinfo: Makefile $(..)Makerules \
|
||||
$(wildcard $(foreach dir,$(sysdirs),$(dir)/Makefile))
|
||||
$(make-target-directory)
|
||||
$(distinfo-vars)
|
||||
mv -f $@.new $@
|
||||
|
||||
define distinfo-vars
|
||||
rm -f $@.new
|
||||
echo > $@.new 'subdir := $(subdir)'
|
||||
$(foreach var,subdir-dirs sources elided-routines sysdep_routines \
|
||||
headers sysdep_headers distribute dont_distribute generated \
|
||||
others tests xtests test-srcs extra-libs versioned \
|
||||
$(extra-libs:%=%-routines) \
|
||||
$(addprefix install-,lib lib.so data bin bin-script sbin others),
|
||||
echo >> $@.new '$(subdir)-$(var) := $($(var))'
|
||||
echo >> $@.new '$(var) = $$($(subdir)-$(var))')
|
||||
endef
|
||||
|
||||
ifneq (,$(strip $(gpl2lgpl)))
|
||||
ifneq (,$(wildcard $(..)gpl2lgpl.sed))
|
||||
# Snarf from the master source and frob the copying notice.
|
||||
|
||||
@@ -1,10 +1,111 @@
|
||||
GNU C Library NEWS -- history of user-visible changes. 2004-8-5
|
||||
Copyright (C) 1992-2002,2003,2004 Free Software Foundation, Inc.
|
||||
GNU C Library NEWS -- history of user-visible changes. 2006-08-14
|
||||
Copyright (C) 1992-2002,2003,2004,2005,2006 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.5
|
||||
|
||||
* For Linux, the sorting of addresses returned by getaddrinfo now also
|
||||
handles rules 3 and 7 from RFC 3484. Implemented by Ulrich Drepper.
|
||||
|
||||
* Allow system admin to configure getaddrinfo with the /etc/gai.conf file.
|
||||
Implemented by Ulrich Drepper.
|
||||
|
||||
* New Linux interfaces: splice, tee, sync_file_range, vmsplice.
|
||||
|
||||
* New iconv module for MIK. Contributed by Alexander Shopov.
|
||||
|
||||
* For sites with broken group and/or passwd database, the auto-propagate
|
||||
option of nscd can prevent creating ID lookup entries from the results
|
||||
of a name lookup and vice versa. This usually is no problem but some
|
||||
site might have problems with default behavior.
|
||||
Implemented by Ulrich Drepper.
|
||||
|
||||
* Iterating over entire database in NIS can be slow. With the
|
||||
SETENT_BATCH_READ option in /etc/default/nss a system admin can decide
|
||||
to trade time for memory. The entire database will be read at once.
|
||||
Implemented by Ulrich Drepper.
|
||||
|
||||
* The interfaces introduced in RFC 3542 have been implemented by
|
||||
Ulrich Drepper.
|
||||
|
||||
* Support for the new ELF hash table format was added by Ulrich Drepper.
|
||||
|
||||
* Support for priority inheritance mutexes added by Jakub Jelinek and
|
||||
Ulrich Drepper.
|
||||
|
||||
* Support for priority protected mutexes added by Jakub Jelinek.
|
||||
|
||||
|
||||
Version 2.4
|
||||
|
||||
* More overflow detection functions.
|
||||
|
||||
* New iconv converters for IBM1025, IBM1122, IBM1137, IBM1153,
|
||||
IBM1154, IBM1155, IBM1156, IBM1157, and IBM1158 contributed by Jiro Sekiba.
|
||||
|
||||
More converters for IBM803, IBM901, IBM902, IBM921, IBM1008, IBM1097,
|
||||
IBM1112, IBM1123, IBM1130, IBM1140, IBM1141, IBM1142, IBM1143, IBM1144,
|
||||
IBM1145, IBM1146, IBM1147, IBM1148, IBM1149, IBM1166, IBM1167, IBM4517,
|
||||
IBM4899, IBM4909, IBM4971, IBM5347, IBM9030, IBM9066, IBM9448, IBM12712,
|
||||
IBM16804, IBM1364, IBM1371, IBM1388, IBM1390, and IBM1399 contributed
|
||||
by Masahide Washizawa.
|
||||
|
||||
* It is now possible to install audit libraries for the dynamic linker using
|
||||
LD_AUDIT. Implemented by Ulrich Drepper.
|
||||
|
||||
* The LinuxThreads add-on, providing pthreads on Linux 2.4 kernels, is no
|
||||
longer supported. The new NPTL implementation requires Linux 2.6 kernels.
|
||||
For a libc and libpthread that works well on Linux 2.4 kernels, we
|
||||
recommend using the stable 2.3 branch.
|
||||
|
||||
* The new function open_wmemstream acts like open_memstream,
|
||||
but uses a wchar_t wide character buffer.
|
||||
|
||||
* The new function ppoll is an improved version of poll, similar to pselect.
|
||||
|
||||
* New interfaces: fdopendir, openat, fstatat, fchmodat, fchownat,
|
||||
futimesat, faccessat, mkdirat, mkfifoat, mknodat,
|
||||
renameat, unlinkat, linkat, symlinkat, readlinkat.
|
||||
|
||||
* New Linux kernel system calls: unshare,
|
||||
inotify_init, inotify_add_watch, inotify_rm_watch.
|
||||
|
||||
* The euidaccess function is now also known by the alias eaccess,
|
||||
for compatibility with some other systems.
|
||||
|
||||
* Timezone data updated to 2006b version.
|
||||
|
||||
Version 2.3.6
|
||||
|
||||
* The following bugs are resolved with this release:
|
||||
|
||||
38, 253, 549, 622, 653, 721, 758, 851, 877, 915, 934, 955, 961,
|
||||
1016, 1037, 1076, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086,
|
||||
1087, 1088, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098,
|
||||
1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109,
|
||||
1110, 1111, 1112, 1113, 1125, 1137, 1138, 1249, 1250, 1251, 1252,
|
||||
1253, 1254, 1350, 1358, 1394, 1438, 1498, 1534
|
||||
|
||||
Visit <http://sources.redhat.com/bugzilla/> for the details of each bug.
|
||||
|
||||
* As of this release, GCC 4 can be used to compile the C Library.
|
||||
|
||||
* Timezone data updated to 2005m version.
|
||||
|
||||
Version 2.3.5
|
||||
|
||||
* The following bugs are resolved with this release:
|
||||
|
||||
284, 592, 602, 626, 633, 640, 650, 661, 671, 681, 693, 700, 710, 719,
|
||||
722, 723, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
|
||||
737, 738, 739, 740, 741, 742, 743, 744, 745, 765, 767, 768, 769, 776,
|
||||
777, 787, 821, 822, 823, 825
|
||||
|
||||
Visit <http://sources.redhat.com/bugzilla/> for the details of each bug.
|
||||
|
||||
Version 2.3.4
|
||||
|
||||
* Support for RFC 3678. Real implementations exist only for Linux so far.
|
||||
@@ -17,7 +118,7 @@ Version 2.3.4
|
||||
* nscd can now perform SELinux checks.
|
||||
Implemented by Matthew Rickard <mjricka@epoch.ncsc.mil>.
|
||||
|
||||
* getaddrinfo queries are not cached. Canonical name lookup is performed
|
||||
* getaddrinfo queries are now cached. Canonical name lookup is performed
|
||||
efficiently.
|
||||
Implemented by Ulrich Drepper.
|
||||
|
||||
@@ -27,10 +128,26 @@ Version 2.3.4
|
||||
|
||||
* The malloc functions perform more error checking and are stricter when
|
||||
it comes to reacting on errors. The default action is to terminate
|
||||
the process after showing an error message.
|
||||
the process after showing an error message. Implemented by Ulrich Drepper.
|
||||
|
||||
* Reverse lookups of IPv6 addresses does not use bit string or .ip6.int
|
||||
lookups anymore unless explicitly requested.
|
||||
lookups anymore unless explicitly requested. Implemented by Ulrich Drepper.
|
||||
|
||||
* Namespaces in ld.so are implemented. DSOs can be loaded in separate
|
||||
namespaces using the new function dlmopen(). This feature is of course,
|
||||
like most other dynamic loading functionality, not available in statically
|
||||
linked applications. Implemented by Ulrich Drepper.
|
||||
|
||||
* Low-overhead boundary checking variants of string and some stdio functions
|
||||
were added. These are to be used in conjunction with a gcc patch by
|
||||
Jakub Jelinek which adds calls to these functions if possible.
|
||||
Implemented by Jakub Jelinek and Ulrich Drepper.
|
||||
|
||||
* Old code for several operating systems and machine architectures that
|
||||
have not been in working condition in a long time have been removed from
|
||||
the main source tree maintained by the GNU C Library's maintainers.
|
||||
These files are now reside in the separate `ports' source module
|
||||
that is usable as an add-on when building the library.
|
||||
|
||||
Version 2.3.3
|
||||
|
||||
@@ -1468,7 +1585,8 @@ Version 1.04
|
||||
----------------------------------------------------------------------
|
||||
Copyright information:
|
||||
|
||||
Copyright (C) 1992-1999,2000,2001,2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-1999,2000,2001,2002,2003,2004,2005,2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to anyone to make or distribute verbatim copies
|
||||
of this document as received, in any medium, provided that the
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Feature Test Macros
|
||||
-------------------
|
||||
|
||||
The exact set of features available when you compile a source file
|
||||
is controlled by which "feature test macros" you define.
|
||||
The exact set of features available when you compile a source file is
|
||||
controlled by which "feature test macros" you define.
|
||||
|
||||
If you compile your programs using `gcc -ansi', you get only the
|
||||
ISO C library features, unless you explicitly request additional
|
||||
@@ -32,7 +32,7 @@ limited standard. It is insufficient for this purpose, as it will not
|
||||
protect you from including header files outside the standard, or
|
||||
relying on semantics undefined within the standard.
|
||||
|
||||
- Macro: _POSIX_SOURCE
|
||||
-- Macro: _POSIX_SOURCE
|
||||
If you define this macro, then the functionality from the POSIX.1
|
||||
standard (IEEE Standard 1003.1) is available, as well as all of the
|
||||
ISO C facilities.
|
||||
@@ -40,7 +40,7 @@ relying on semantics undefined within the standard.
|
||||
The state of `_POSIX_SOURCE' is irrelevant if you define the macro
|
||||
`_POSIX_C_SOURCE' to a positive integer.
|
||||
|
||||
- Macro: _POSIX_C_SOURCE
|
||||
-- Macro: _POSIX_C_SOURCE
|
||||
Define this macro to a positive integer to control which POSIX
|
||||
functionality is made available. The greater the value of this
|
||||
macro, the more functionality is made available.
|
||||
@@ -65,12 +65,7 @@ relying on semantics undefined within the standard.
|
||||
greater than or equal to `199506L', then the functionality from
|
||||
the 1996 edition is made available.
|
||||
|
||||
The Single Unix Specification specify that setting this macro to
|
||||
the value `199506L' selects all the values specified by the POSIX
|
||||
standards plus those of the Single Unix Specification, i.e., is the
|
||||
same as if `_XOPEN_SOURCE' is set to `500' (see below).
|
||||
|
||||
- Macro: _BSD_SOURCE
|
||||
-- Macro: _BSD_SOURCE
|
||||
If you define this macro, functionality derived from 4.3 BSD Unix
|
||||
is included as well as the ISO C, POSIX.1, and POSIX.2 material.
|
||||
|
||||
@@ -88,15 +83,15 @@ relying on semantics undefined within the standard.
|
||||
must give the option `-lbsd-compat' to the compiler or linker when
|
||||
linking the program, to tell it to find functions in this special
|
||||
compatibility library before looking for them in the normal C
|
||||
library.
|
||||
library.
|
||||
|
||||
- Macro: _SVID_SOURCE
|
||||
-- Macro: _SVID_SOURCE
|
||||
If you define this macro, functionality derived from SVID is
|
||||
included as well as the ISO C, POSIX.1, POSIX.2, and X/Open
|
||||
material.
|
||||
|
||||
- Macro: _XOPEN_SOURCE
|
||||
- Macro: _XOPEN_SOURCE_EXTENDED
|
||||
-- Macro: _XOPEN_SOURCE
|
||||
-- Macro: _XOPEN_SOURCE_EXTENDED
|
||||
If you define this macro, functionality described in the X/Open
|
||||
Portability Guide is included. This is a superset of the POSIX.1
|
||||
and POSIX.2 functionality and in fact `_POSIX_SOURCE' and
|
||||
@@ -113,10 +108,10 @@ relying on semantics undefined within the standard.
|
||||
functionality described so far plus some new definitions from the
|
||||
Single Unix Specification, version 2.
|
||||
|
||||
- Macro: _LARGEFILE_SOURCE
|
||||
-- Macro: _LARGEFILE_SOURCE
|
||||
If this macro is defined some extra functions are available which
|
||||
rectify a few shortcomings in all previous standards. More
|
||||
concrete the functions `fseeko' and `ftello' are available.
|
||||
rectify a few shortcomings in all previous standards.
|
||||
Specifically, the functions `fseeko' and `ftello' are available.
|
||||
Without these functions the difference between the ISO C interface
|
||||
(`fseek', `ftell') and the low-level POSIX interface (`lseek')
|
||||
would lead to problems.
|
||||
@@ -124,8 +119,8 @@ relying on semantics undefined within the standard.
|
||||
This macro was introduced as part of the Large File Support
|
||||
extension (LFS).
|
||||
|
||||
- Macro: _LARGEFILE64_SOURCE
|
||||
If you define this macro an additional set of function is made
|
||||
-- Macro: _LARGEFILE64_SOURCE
|
||||
If you define this macro an additional set of functions is made
|
||||
available which enables 32 bit systems to use files of sizes beyond
|
||||
the usual limit of 2GB. This interface is not available if the
|
||||
system does not support files that large. On systems where the
|
||||
@@ -138,13 +133,13 @@ relying on semantics undefined within the standard.
|
||||
`off64_t' and `fseeko' vs. `fseeko64'.
|
||||
|
||||
This macro was introduced as part of the Large File Support
|
||||
extension (LFS). It is a transition interface for the time 64 bit
|
||||
offsets are not generally used (see `_FILE_OFFSET_BITS'.
|
||||
extension (LFS). It is a transition interface for the period when
|
||||
64 bit offsets are not generally used (see `_FILE_OFFSET_BITS').
|
||||
|
||||
- Macro: _FILE_OFFSET_BITS
|
||||
-- Macro: _FILE_OFFSET_BITS
|
||||
This macro determines which file system interface shall be used,
|
||||
one replacing the other. While `_LARGEFILE64_SOURCE' makes the
|
||||
64 bit interface available as an additional interface
|
||||
one replacing the other. Whereas `_LARGEFILE64_SOURCE' makes the
|
||||
64 bit interface available as an additional interface,
|
||||
`_FILE_OFFSET_BITS' allows the 64 bit interface to replace the old
|
||||
interface.
|
||||
|
||||
@@ -154,9 +149,10 @@ relying on semantics undefined within the standard.
|
||||
|
||||
If the macro is defined to the value `64', the large file interface
|
||||
replaces the old interface. I.e., the functions are not made
|
||||
available under different names as `_LARGEFILE64_SOURCE' does.
|
||||
Instead the old function names now reference the new functions,
|
||||
e.g., a call to `fseeko' now indeed calls `fseeko64'.
|
||||
available under different names (as they are with
|
||||
`_LARGEFILE64_SOURCE'). Instead the old function names now
|
||||
reference the new functions, e.g., a call to `fseeko' now indeed
|
||||
calls `fseeko64'.
|
||||
|
||||
This macro should only be selected if the system provides
|
||||
mechanisms for handling large files. On 64 bit systems this macro
|
||||
@@ -166,13 +162,13 @@ relying on semantics undefined within the standard.
|
||||
This macro was introduced as part of the Large File Support
|
||||
extension (LFS).
|
||||
|
||||
- Macro: _ISOC99_SOURCE
|
||||
-- Macro: _ISOC99_SOURCE
|
||||
Until the revised ISO C standard is widely adopted the new features
|
||||
are not automatically enabled. The GNU libc nevertheless has a
|
||||
complete implementation of the new standard and to enable the new
|
||||
features the macro `_ISOC99_SOURCE' should be defined.
|
||||
|
||||
- Macro: _GNU_SOURCE
|
||||
-- Macro: _GNU_SOURCE
|
||||
If you define this macro, everything is included: ISO C89,
|
||||
ISO C99, POSIX.1, POSIX.2, BSD, SVID, X/Open, LFS, and GNU
|
||||
extensions. In the cases where POSIX.1 conflicts with BSD, the
|
||||
@@ -191,8 +187,8 @@ relying on semantics undefined within the standard.
|
||||
compiler or linker. *Note:* If you forget to do this, you may get
|
||||
very strange errors at run time.
|
||||
|
||||
- Macro: _REENTRANT
|
||||
- Macro: _THREAD_SAFE
|
||||
-- Macro: _REENTRANT
|
||||
-- Macro: _THREAD_SAFE
|
||||
If you define one of these macros, reentrant versions of several
|
||||
functions get declared. Some of the functions are specified in
|
||||
POSIX.1c but many others are only available on a few other systems
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Open jobs for finishing GNU libc:
|
||||
---------------------------------
|
||||
Status: September 2002
|
||||
Status: October 2004
|
||||
|
||||
If you have time and talent to take over any of the jobs below please
|
||||
contact <bug-glibc@gnu.org>.
|
||||
@@ -53,7 +53,7 @@ contact <bug-glibc@gnu.org>.
|
||||
|
||||
|
||||
[11] Write access function for netmasks, bootparams, and automount
|
||||
databases for nss_files and nss_db module.
|
||||
databases for nss_files, nss_nis, and nss_nisplus modules.
|
||||
The functions should be embedded in the nss scheme. This is not
|
||||
hard and not all services must be supported at once.
|
||||
|
||||
@@ -76,7 +76,7 @@ contact <bug-glibc@gnu.org>.
|
||||
[18] Based on the sprof program we need tools to analyze the output. The
|
||||
result should be a link map which specifies in which order the .o
|
||||
files are placed in the shared object. This should help to improve
|
||||
code locality and result in a smaller foorprint (in code and data
|
||||
code locality and result in a smaller footprint (in code and data
|
||||
memory) since less pages are only used in small parts.
|
||||
|
||||
|
||||
@@ -93,29 +93,6 @@ contact <bug-glibc@gnu.org>.
|
||||
available.
|
||||
|
||||
|
||||
[21] The nscd program and the stubs in the libc should be changed so
|
||||
that each program uses only one socket connect. Take a look at
|
||||
http://people.redhat.com/drepper/nscd.html
|
||||
|
||||
An alternative approach is to use an mmap()ed file. The idea is
|
||||
the following:
|
||||
- the nscd creates the hash tables and the information it stores
|
||||
in it in a mmap()ed region. This means no pointers must be
|
||||
used, only offsets.
|
||||
OR
|
||||
if POSIX shared memory is available use a named shared memory
|
||||
region to put the data in
|
||||
- each program using NSS functionality tries to open the file
|
||||
with the data.
|
||||
- by checking some timestamp (which the nscd renews frequently)
|
||||
the programs can test whether the file is still valid
|
||||
- if the file is valid look through the nscd and locate the
|
||||
appropriate hash table for the database and lookup the data.
|
||||
If it is included we are set.
|
||||
- if the data is not yet in the database we contact the nscd using
|
||||
the currently implemented methods.
|
||||
|
||||
|
||||
[23] The `strptime' function needs to be completed. This includes among
|
||||
other things that it must get teached about timezones. The solution
|
||||
envisioned is to extract the timezones from the ADO timezone
|
||||
@@ -127,18 +104,4 @@ contact <bug-glibc@gnu.org>.
|
||||
Australia/Canberra or if the current locale is en_AU.
|
||||
|
||||
|
||||
[25] Sun's nscd version implements a feature where the nscd keeps N entries
|
||||
for each database current. I.e., if an entries lifespan is over and
|
||||
it is one of the N entries to be kept the nscd updates the information
|
||||
instead of removing the entry.
|
||||
|
||||
How to decide about which N entries to keep has to be examined.
|
||||
Factors should be number of uses (of course), influenced by aging.
|
||||
Just imagine a computer used by several people. The IDs of the current
|
||||
user should be preferred even if the last user spent more time.
|
||||
|
||||
|
||||
[27] We need a second test suite with tests which cannot run during a normal
|
||||
`make check' run. This test suite can require root priviledges and
|
||||
can test things like DNS (i.e., require network access),
|
||||
user-interaction, networking in general, and probably many other things.
|
||||
[27] ...deleted...
|
||||
|
||||
@@ -1,86 +1,99 @@
|
||||
This directory contains the version 2.3.3 release of the GNU C Library.
|
||||
Many bugs have been fixed since the last release.
|
||||
Some bugs surely remain.
|
||||
This directory contains the version 2.4 release of the GNU C Library.
|
||||
|
||||
As of this release, the GNU C library is known to run on the following
|
||||
configurations:
|
||||
The GNU C Library is the standard system C library for all GNU systems,
|
||||
and is an important part of what makes up a GNU system. It provides the
|
||||
system API for all programs written in C and C-compatible languages such
|
||||
as C++ and Objective C; the runtime facilities of other programming
|
||||
languages use the C library to access the underlying operating system.
|
||||
|
||||
*-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux-gnu Linux-2.x on Intel
|
||||
m68k-*-linux-gnu Linux-2.x on Motorola 680x0
|
||||
alpha*-*-linux-gnu Linux-2.x on DEC Alpha
|
||||
powerpc-*-linux-gnu Linux and MkLinux on PowerPC systems
|
||||
powerpc64-*-linux-gnu Linux-2.4.19+ on 64-bit PowerPC systems
|
||||
sparc-*-linux-gnu Linux-2.x on SPARC
|
||||
sparc64-*-linux-gnu Linux-2.x on UltraSPARC 64-bit
|
||||
arm-*-none ARM standalone systems
|
||||
arm-*-linux Linux-2.x on ARM
|
||||
arm-*-linuxaout Linux-2.x on ARM using a.out binaries
|
||||
mips*-*-linux-gnu Linux-2.x on MIPS
|
||||
ia64-*-linux-gnu Linux-2.x on ia64
|
||||
s390-*-linux-gnu Linux-2.x on IBM S/390
|
||||
s390x-*-linux-gnu Linux-2.4+ on IBM S/390 64-bit
|
||||
sh-*-linux-gnu Linux-2.x on Super Hitachi
|
||||
cris-*-linux-gnu Linux-2.4+ on CRIS
|
||||
x86-64-*-linux-gnu Linux-2.4+ on x86-64
|
||||
In GNU/Linux systems, the C library works with the Linux kernel to
|
||||
implement the operating system behavior seen by user applications.
|
||||
In GNU/Hurd systems, it works with a microkernel and Hurd servers.
|
||||
|
||||
Former releases of this library (version 1.09.1 and perhaps earlier
|
||||
versions) used to run on the following configurations:
|
||||
Version 2.4 is the first release after a long period of development, and
|
||||
introduces changes to the API and a new ABI for all configurations. It
|
||||
has been tested and deployed in new production systems, but should still
|
||||
be considered somewhat experimental. The stable 2.3 release series
|
||||
continues to be maintained, and implements a widely-deployed ABI.
|
||||
Version 2.3.6 is available, and we will release 2.3.7 with more bug fixes.
|
||||
|
||||
alpha-dec-osf1
|
||||
i[3456]86-*-bsd4.3
|
||||
i[3456]86-*-isc2.2
|
||||
i[3456]86-*-isc3
|
||||
i[3456]86-*-sco3.2
|
||||
i[3456]86-*-sco3.2v4
|
||||
i[3456]86-*-sysv
|
||||
i[3456]86-*-sysv4
|
||||
i[3456]86-force_cpu386-none
|
||||
i[3456]86-sequent-bsd
|
||||
i960-nindy960-none
|
||||
m68k-hp-bsd4.3
|
||||
m68k-mvme135-none
|
||||
m68k-mvme136-none
|
||||
m68k-sony-newsos3
|
||||
m68k-sony-newsos4
|
||||
m68k-sun-sunos4
|
||||
mips-dec-ultrix4
|
||||
mips-sgi-irix4
|
||||
sparc-sun-solaris2
|
||||
sparc-sun-sunos4
|
||||
The GNU C Library implements much of the POSIX.1 functionality in the
|
||||
GNU/Hurd system, using configurations i[34567]86-*-gnu.
|
||||
|
||||
Since no one has volunteered to test and fix the above configurations,
|
||||
these are not supported at the moment. It's expected that these don't
|
||||
work anymore. Porting the library is not hard. If you are interested
|
||||
in doing a port, please contact the glibc maintainers by sending
|
||||
electronic mail to <bug-glibc@gnu.org>.
|
||||
When working with Linux kernels, the GNU C Library version 2.4 is
|
||||
intended primarily for use with Linux kernel version 2.6.0 and later.
|
||||
We only support using the NPTL implementation of pthreads, which is now
|
||||
the default configuration. Most of the C library will continue to work
|
||||
on older Linux kernels and many programs will not require a 2.6 kernel
|
||||
to run correctly. However, pthreads and related functionality will not
|
||||
work at all on old kernels and we do not recommend using glibc 2.4 with
|
||||
any Linux kernel prior to 2.6.
|
||||
|
||||
There are some add-ons which can be used together with GNU libc. They
|
||||
are designed in a way to ease the installation by integrating them in
|
||||
the libc source tree. Simply get the add-ons you need and use the
|
||||
--enable-add-ons option of the `configure' script to tell where the
|
||||
add-ons are found. Please read the FAQ file for more details.
|
||||
All Linux kernel versions prior to 2.6.16 are known to have some bugs that
|
||||
may cause some of the tests related to pthreads in "make check" to fail.
|
||||
If you see such problems, please try the test suite on the most recent
|
||||
Linux kernel version that you can use, before pursuing those bugs further.
|
||||
|
||||
See the file INSTALL to find out how to configure, build, install, and port
|
||||
the GNU C library. You might also consider reading the WWW pages for the
|
||||
GNU libc at http://www.gnu.org/software/libc/libc.html.
|
||||
The old LinuxThreads add-on implementation of pthreads for older Linux
|
||||
kernels is no longer supported, and we are not distributing it with this
|
||||
release. Someone has volunteered to revive its maintenance unofficially
|
||||
for at least a short time for the benefit of those using Linux kernels
|
||||
older than 2.6, but a working version is not presently available. When
|
||||
it is in working condition, we will make it available alongside future
|
||||
glibc releases. LinuxThreads will not be supported.
|
||||
|
||||
The GNU C Library is completely documented by the Texinfo manual found
|
||||
in the `manual/' subdirectory. The manual is still being updated and
|
||||
contains some known errors and omissions; we regret that we do not
|
||||
have the resources to work on the manual as much as we would like.
|
||||
Please send comments on the manual to <bug-glibc-manual@gnu.org>, and
|
||||
not to the library bug-reporting address.
|
||||
The GNU C Library supports these configurations for using Linux kernels:
|
||||
|
||||
i[34567]86-*-linux-gnu
|
||||
x86_64-*-linux-gnu
|
||||
powerpc-*-linux-gnu
|
||||
powerpc64-*-linux-gnu
|
||||
s390-*-linux-gnu
|
||||
s390x-*-linux-gnu
|
||||
ia64-*-linux-gnu
|
||||
sparc*-*-linux-gnu
|
||||
sparc64*-*-linux-gnu
|
||||
|
||||
alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
|
||||
sh[34]-*-linux-gnu Requires Linux 2.6.11
|
||||
|
||||
The code for other CPU configurations supported by volunteers outside of
|
||||
the core glibc maintenance effort is contained in the separate `ports'
|
||||
add-on. You can find glibc-ports-2.4 distributed separately in the
|
||||
same place where you got the main glibc distribution files.
|
||||
Currently these configurations are known to work using the `ports' add-on:
|
||||
|
||||
arm-*-linux-gnu Requires Linux 2.6.15 for NPTL, no SMP support
|
||||
arm-*-linux-gnueabi Requires Linux 2.6.16-rc1 for NPTL, no SMP
|
||||
mips-*-linux-gnu Requires Linux 2.6.12 for NPTL
|
||||
mips64-*-linux-gnu Requires Linux 2.6.12 for NPTL
|
||||
|
||||
The ports distribution also contains code for other configurations that
|
||||
do not work or have not been maintained recently, but will be of use to
|
||||
anyone trying to make a new configuration work. If you are interested
|
||||
in doing a port, please contact the glibc maintainers; see
|
||||
http://www.gnu.org/software/libc/ for more information.
|
||||
|
||||
See the file INSTALL to find out how to configure, build, and install
|
||||
the GNU C Library. You might also consider reading the WWW pages for
|
||||
the C library at http://www.gnu.org/software/libc/.
|
||||
|
||||
The GNU C Library is (almost) completely documented by the Texinfo manual
|
||||
found in the `manual/' subdirectory. The manual is still being updated
|
||||
and contains some known errors and omissions; we regret that we do not
|
||||
have the resources to work on the manual as much as we would like. For
|
||||
corrections to the manual, please file a bug in the `manual' component,
|
||||
following the bug-reporting instructions below. Please be sure to check
|
||||
the manual in the current development sources to see if your problem has
|
||||
already been corrected.
|
||||
|
||||
The file NOTES contains a description of the feature-test macros used
|
||||
in the GNU C library, explaining how you can tell the library what
|
||||
facilities you want it to make available.
|
||||
|
||||
We prefer to get bug reports sent using the `glibcbug' shell script which
|
||||
is installed together with the rest of the GNU libc to <bugs@gnu.org>.
|
||||
Simply run this shell script and fill in the information. Nevertheless
|
||||
you can still send bug reports to <bug-glibc@gnu.org> as normal electronic
|
||||
mails.
|
||||
Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
|
||||
information. We are now using the Bugzilla system to track all bug reports.
|
||||
This web page gives detailed information on how to report bugs properly.
|
||||
|
||||
The GNU C Library is free software. See the file COPYING.LIB for copying
|
||||
conditions, and LICENSES for notices about a few contributions that require
|
||||
|
||||
-287
@@ -1,287 +0,0 @@
|
||||
GNU libc SNAPSHOT SYSTEM
|
||||
(general info)
|
||||
Updated 1997-9-26
|
||||
|
||||
WHAT ARE GNU libc SNAPSHOTS
|
||||
---------------------------
|
||||
|
||||
Snapshots are an "image" of the main glibc development tree, captured at a
|
||||
particular random instant in time. When you use the snapshots, you should be
|
||||
able to maintain a local copy of libc that is no more than one day older than
|
||||
the official source tree used by the libc maintainers.
|
||||
|
||||
The primary purpose of providing snapshots is to widen the group of motivated
|
||||
developers that would like to help test, debug, and enhance glibc, by providing
|
||||
you with access to the "latest and greatest" source. This has several
|
||||
advantages, and several disadvantages.
|
||||
|
||||
First the advantages:
|
||||
|
||||
o Once we have a large base of motivated testers using the snapshots,
|
||||
this should provide good coverage across all currently supported
|
||||
glibc hosts and targets. If a new bug is introduced in glibc due to
|
||||
fixing another bug or ongoing development, it should become
|
||||
obvious much more quickly and get fixed before the next general
|
||||
net release. This should help to reduce the chances of glibc being
|
||||
released to the general public with a major bug that went unnoticed
|
||||
during the release cycle testing because they are machine dependent.
|
||||
We hope to greatly improve glibc's stability and reliability by
|
||||
involving more people and more execution environments in the
|
||||
prerelease testing.
|
||||
|
||||
o With access to the latest source, any diffs that you send to fix
|
||||
bugs or add new features should be much easier for the glibc team
|
||||
to merge into the official source base (after suitable review
|
||||
of course). This encourages us to merge your changes quicker,
|
||||
while they are still "fresh".
|
||||
|
||||
o Once your diffs are merged, you can obtain a new copy of glibc
|
||||
containing your changes almost immediately. Thus you do not
|
||||
have to maintain local copies of your changes for any longer
|
||||
than it takes to get them merged into the official source base.
|
||||
This encourages you to send in changes quicker.
|
||||
|
||||
And the disadvantages:
|
||||
|
||||
o The snapshot you get will be largely untested and of unknown quality.
|
||||
It may fail to configure or compile. It may have serious bugs.
|
||||
You should always keep a copy of the last known working version
|
||||
before updating to the current snapshot, or at least be able to
|
||||
regenerate a working version if the latest snapshot is unusable
|
||||
in your environment for some reason.
|
||||
|
||||
If a production version of glibc has a bug and a snapshot has the fix,
|
||||
and you care about stability, you should put only the fix for that
|
||||
particular problem into your production version. Of course, if you
|
||||
are eager to test glibc, you can use the snapshot versions in your
|
||||
daily work, but users who have not been consulted about whether they
|
||||
feel like testing glibc should generally have something which is at
|
||||
least as bug free as the last released version.
|
||||
|
||||
o Providing timely response to your questions, bug reports, and
|
||||
submitted patches will require the glibc development team to allocate
|
||||
time from an already thin time budget. Please try to help us make
|
||||
this time as productive as possible. See the section below about
|
||||
how to submit changes.
|
||||
|
||||
|
||||
WHO SHOULD TRY THE SNAPSHOTS
|
||||
----------------------------
|
||||
|
||||
Remember, these are snapshots not tested versions. So if you use
|
||||
these versions you should be able to
|
||||
|
||||
o make sure your system stays usable
|
||||
|
||||
o locate and hopefully fix problems
|
||||
|
||||
o to port glibc to a new target yourself
|
||||
|
||||
You should not use the snapshots if
|
||||
|
||||
o your system is needed in a production environment which needs
|
||||
stability
|
||||
|
||||
o you expect us to fix your problems since you somehow depend on them.
|
||||
You must be willing to fix the problems yourself, we don't want to
|
||||
see "I have problems, fix this" messages.
|
||||
|
||||
|
||||
HOW TO GET THE SNAPSHOTS
|
||||
------------------------
|
||||
|
||||
At the moment we provide a full snapshot weekly (every sunday), so
|
||||
that users getting a snapshot for the first time, or updating after
|
||||
a long period of not updating, can get the latest version in a single
|
||||
operation. Along with the full snapshot, we will provide incremental
|
||||
diffs on a nearly daily basis (whenever code changes). Each daily
|
||||
diff will be relative to the source tree after applying all previous
|
||||
daily diffs. The daily diffs are for people who have relatively low
|
||||
bandwidth ftp or uucp connections.
|
||||
|
||||
The files will be available via anonymous ftp from alpha.gnu.org, in
|
||||
directory /gnu/libc and on linux.kernel.org in /pub/software/libs/glibc. The
|
||||
directories should look something like:
|
||||
|
||||
libc-970921.tar.gz
|
||||
libc-970917-970922.diff.gz
|
||||
libc-970922-970925.diff.gz
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
Please note that the snapshots on alpha.gnu.org and on
|
||||
linux.kernel.org are not always in sync. Patches to some files might
|
||||
appear a day a diff earlier or later on alpha than on kernel.
|
||||
Use always alpha or always kernel but don't mix them.
|
||||
|
||||
There are sometimes additionally test releases of the add-ons available in
|
||||
these directories. If a new version of an add-on is available it is normally
|
||||
required for the corresponding snapshot so always pay attention for these.
|
||||
|
||||
Note that we provide GNU gzip compressed files only. You can ftp gzip
|
||||
from ftp.gnu.org in directory pub/gnu.
|
||||
|
||||
In some cases the dates for diffs and snapshots do not match like in the
|
||||
example above. The full release is for 970921 but the patch is for
|
||||
970917-970922. This only means that nothing changed between 970917 and 970922
|
||||
and that you have to use this patch on top of the 970921 snapshot since the
|
||||
patch is made on 970922.
|
||||
|
||||
Also, as the gcc developers did with their gcc snapshot system, even though we
|
||||
will make the snapshots available on a publically accessible ftp area, we ask
|
||||
that recipients not widely publicise their availability. The motivation for
|
||||
this request is not to hoard them, but to avoid the situation where the
|
||||
general glibc user base naively attempts to use the snapshots, has trouble with
|
||||
them, complains publically, and the reputation of glibc declines because of a
|
||||
perception of instability or lack of quality control.
|
||||
|
||||
|
||||
GLIBC TEST SUITE
|
||||
----------------
|
||||
|
||||
A test suite is distributed as an integral part of the snapshots. A simple
|
||||
"make check" in your build directory is sufficient to run the tests. glibc
|
||||
should pass all tests and if any fails, please report it. A failure might not
|
||||
originate from a bug in glibc but also from bugs in the tools, e.g. with gcc
|
||||
2.7.2.x the math tests fail some of the tests because of compiler bugs.
|
||||
|
||||
Note that the test suite is still in its infancy. The tests themselves only
|
||||
cover a small portion of libc features, and where tests do exist for a feature
|
||||
they are not exhaustive. New tests are welcome.
|
||||
|
||||
|
||||
GETTING HELP, GLIBC DISCUSSIONS, etc
|
||||
------------------------------------
|
||||
|
||||
People who want to help with glibc and who test out snapshots
|
||||
regularly should get on the libc-alpha@sourceware.cygnus.com mailing
|
||||
list by sending an email to libc-alpha-subscribe@sourceware.cygnus.com.
|
||||
This list is meant (as the name suggests) for the discussion of test
|
||||
releases and also reports for them. People who are on this list are
|
||||
welcome to post questions of general interest.
|
||||
|
||||
People who are not only willing to test the snapshots but instead
|
||||
really want to help developing glibc should contact
|
||||
libc-hacker-subscribe@sourceware.cygnus.com.org to be put on the developers
|
||||
mailing list. This list is really only meant for developers. No
|
||||
questions about installation problems or other simple topics are
|
||||
wanted nor will they be answered.
|
||||
|
||||
Do *not* send any questions about the snapshots or patches specific to the
|
||||
snapshots to bug-glibc@gnu.org. Nobody there will have any idea what
|
||||
you are talking about and it will just cause confusion.
|
||||
|
||||
|
||||
BUG REPORTS
|
||||
-----------
|
||||
|
||||
Send bug reports directly to Ulrich Drepper <drepper@gnu.org>. Please
|
||||
do *not* use the glibcbug script for reporting bugs in the snapshots.
|
||||
glibcbug should only be used for problems with the official released versions.
|
||||
We don't like bug reports in the bug database because otherwise the impression
|
||||
of instability or lack of quality control of glibc as a whole might manifest
|
||||
in people's mind.
|
||||
|
||||
Note that since no testing is done on the snapshots, and snapshots may even be
|
||||
made when glibc is in an inconsistent state, it may not be unusual for an
|
||||
occasional snapshot to have a very obvious bug, such as failure to compile on
|
||||
*any* machine. It is likely that such bugs will be fixed by the next
|
||||
snapshot, so it really isn't necessary to report them unless they persist for
|
||||
a couple of days.
|
||||
|
||||
Missing files should always be reported, since they usually mean there is a
|
||||
problem with the snapshot-generating process and we won't know about them
|
||||
unless someone tells us.
|
||||
|
||||
Bugs which are non-obvious, such as failure to compile on only a specific
|
||||
machine, a new machine dependent or obscure bug (particularly one not detected
|
||||
by the testsuite), etc should be reported when you discover them, or have a
|
||||
suggested patch to fix them.
|
||||
|
||||
|
||||
FORMAT FOR PATCHES
|
||||
------------------
|
||||
|
||||
If you have a fix for a bug, or an enhancement to submit, send your patch to
|
||||
Ulrich Drepper <drepper@gnu.org>. Here are some simple guidelines for
|
||||
submitting patches:
|
||||
|
||||
o Use "unified diffs" for patches. A typical command for generating
|
||||
context diffs is "diff -ru glibc-old glibc-patched".
|
||||
|
||||
o Use the "minimalist approach" for patches. That is, each patch
|
||||
should address only one particular bug, new feature, etc. Do not
|
||||
save up many unrelated changes and submit them all in one big
|
||||
patch, since in general, the larger the patch the more difficult
|
||||
it is for us to decide if the patch is either correct or
|
||||
desirable. And if we find something about the patch that needs
|
||||
to be corrected before it can be installed, we would have to reject
|
||||
the entire patch, which might contain changes which otherwise would
|
||||
be accepted if submitted separately.
|
||||
|
||||
o Submit a sample ChangeLog entry with your patch. See the existing
|
||||
glibc ChangeLog for examples of what a ChangeLog entry should look
|
||||
like. The emacs command ^X4A will create a ChangeLog entry header
|
||||
for you.
|
||||
|
||||
|
||||
BUILDING SNAPSHOTS
|
||||
------------------
|
||||
|
||||
The `best' way to build glibc is to use an extra directory, e.g.:
|
||||
tar xzf libc-970921.tar.gz
|
||||
mkdir build-glibc
|
||||
cd build-glibc
|
||||
../libc-970921/configure ...
|
||||
|
||||
In this way you can easily clean up (since `make clean' doesn't work at
|
||||
the moment) and rebuild glibc.
|
||||
|
||||
|
||||
NECESSARY TOOLS
|
||||
---------------
|
||||
|
||||
For the recommended versions of gcc, binutils, make, texinfo, gettext,
|
||||
autoconf and other tools which might be especially needed when using patches,
|
||||
please read the file INSTALL.
|
||||
|
||||
|
||||
HOW CAN YOU HELP
|
||||
----------------
|
||||
|
||||
It helps already a lot if you just install glibc on your system and try to
|
||||
solve any problems. You might want to look at the file `PROJECTS' and help
|
||||
with one of those projects, fix some bugs (see `BUGS' or the bug database),
|
||||
port to an unsupported platform, ...
|
||||
|
||||
|
||||
FURTHER DOCUMENTATION
|
||||
---------------------
|
||||
|
||||
A lot of questions are answered in the FAQ. The files `INSTALL', `README' and
|
||||
`NOTES' contain the most important documentation. Furthermore glibc has its
|
||||
own 700+ pages info documentation, ...
|
||||
|
||||
|
||||
|
||||
And finally a word of caution: The libc is one of the most fundamental parts
|
||||
of your system - and these snapshots are untested and come without any
|
||||
guarantee or warranty. You might be lucky and everything works or you might
|
||||
crash your system. If you install a glibc snapshot as primary library, you
|
||||
should have a backup somewhere.
|
||||
|
||||
On many systems it is also a problem to replace the libc while the system is
|
||||
running. In the worst case on broken OSes some systems crash. On better
|
||||
systems you can move the old libc aside but removing it will cause problems
|
||||
since there are still processes using this libc image and so you might have to
|
||||
check the filesystem to get rid of the libc data. One good alternative (which
|
||||
is also safer) is to use a chroot'ed environment.
|
||||
|
||||
Thanks for your help and support.
|
||||
|
||||
Thanks to Fred Fish from Cygnus for the original version of this text
|
||||
(for GDB).
|
||||
|
||||
|
||||
Ulrich Drepper
|
||||
+82
-69
@@ -1,86 +1,99 @@
|
||||
This directory contains the version VERSION release of the GNU C Library.
|
||||
Many bugs have been fixed since the last release.
|
||||
Some bugs surely remain.
|
||||
|
||||
As of this release, the GNU C library is known to run on the following
|
||||
configurations:
|
||||
The GNU C Library is the standard system C library for all GNU systems,
|
||||
and is an important part of what makes up a GNU system. It provides the
|
||||
system API for all programs written in C and C-compatible languages such
|
||||
as C++ and Objective C; the runtime facilities of other programming
|
||||
languages use the C library to access the underlying operating system.
|
||||
|
||||
*-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux-gnu Linux-2.x on Intel
|
||||
m68k-*-linux-gnu Linux-2.x on Motorola 680x0
|
||||
alpha*-*-linux-gnu Linux-2.x on DEC Alpha
|
||||
powerpc-*-linux-gnu Linux and MkLinux on PowerPC systems
|
||||
powerpc64-*-linux-gnu Linux-2.4.19+ on 64-bit PowerPC systems
|
||||
sparc-*-linux-gnu Linux-2.x on SPARC
|
||||
sparc64-*-linux-gnu Linux-2.x on UltraSPARC 64-bit
|
||||
arm-*-none ARM standalone systems
|
||||
arm-*-linux Linux-2.x on ARM
|
||||
arm-*-linuxaout Linux-2.x on ARM using a.out binaries
|
||||
mips*-*-linux-gnu Linux-2.x on MIPS
|
||||
ia64-*-linux-gnu Linux-2.x on ia64
|
||||
s390-*-linux-gnu Linux-2.x on IBM S/390
|
||||
s390x-*-linux-gnu Linux-2.4+ on IBM S/390 64-bit
|
||||
sh-*-linux-gnu Linux-2.x on Super Hitachi
|
||||
cris-*-linux-gnu Linux-2.4+ on CRIS
|
||||
x86-64-*-linux-gnu Linux-2.4+ on x86-64
|
||||
In GNU/Linux systems, the C library works with the Linux kernel to
|
||||
implement the operating system behavior seen by user applications.
|
||||
In GNU/Hurd systems, it works with a microkernel and Hurd servers.
|
||||
|
||||
Former releases of this library (version 1.09.1 and perhaps earlier
|
||||
versions) used to run on the following configurations:
|
||||
Version 2.4 is the first release after a long period of development, and
|
||||
introduces changes to the API and a new ABI for all configurations. It
|
||||
has been tested and deployed in new production systems, but should still
|
||||
be considered somewhat experimental. The stable 2.3 release series
|
||||
continues to be maintained, and implements a widely-deployed ABI.
|
||||
Version 2.3.6 is available, and we will release 2.3.7 with more bug fixes.
|
||||
|
||||
alpha-dec-osf1
|
||||
i[3456]86-*-bsd4.3
|
||||
i[3456]86-*-isc2.2
|
||||
i[3456]86-*-isc3
|
||||
i[3456]86-*-sco3.2
|
||||
i[3456]86-*-sco3.2v4
|
||||
i[3456]86-*-sysv
|
||||
i[3456]86-*-sysv4
|
||||
i[3456]86-force_cpu386-none
|
||||
i[3456]86-sequent-bsd
|
||||
i960-nindy960-none
|
||||
m68k-hp-bsd4.3
|
||||
m68k-mvme135-none
|
||||
m68k-mvme136-none
|
||||
m68k-sony-newsos3
|
||||
m68k-sony-newsos4
|
||||
m68k-sun-sunos4
|
||||
mips-dec-ultrix4
|
||||
mips-sgi-irix4
|
||||
sparc-sun-solaris2
|
||||
sparc-sun-sunos4
|
||||
The GNU C Library implements much of the POSIX.1 functionality in the
|
||||
GNU/Hurd system, using configurations i[34567]86-*-gnu.
|
||||
|
||||
Since no one has volunteered to test and fix the above configurations,
|
||||
these are not supported at the moment. It's expected that these don't
|
||||
work anymore. Porting the library is not hard. If you are interested
|
||||
in doing a port, please contact the glibc maintainers by sending
|
||||
electronic mail to <bug-glibc@gnu.org>.
|
||||
When working with Linux kernels, the GNU C Library version 2.4 is
|
||||
intended primarily for use with Linux kernel version 2.6.0 and later.
|
||||
We only support using the NPTL implementation of pthreads, which is now
|
||||
the default configuration. Most of the C library will continue to work
|
||||
on older Linux kernels and many programs will not require a 2.6 kernel
|
||||
to run correctly. However, pthreads and related functionality will not
|
||||
work at all on old kernels and we do not recommend using glibc 2.4 with
|
||||
any Linux kernel prior to 2.6.
|
||||
|
||||
There are some add-ons which can be used together with GNU libc. They
|
||||
are designed in a way to ease the installation by integrating them in
|
||||
the libc source tree. Simply get the add-ons you need and use the
|
||||
--enable-add-ons option of the `configure' script to tell where the
|
||||
add-ons are found. Please read the FAQ file for more details.
|
||||
All Linux kernel versions prior to 2.6.16 are known to have some bugs that
|
||||
may cause some of the tests related to pthreads in "make check" to fail.
|
||||
If you see such problems, please try the test suite on the most recent
|
||||
Linux kernel version that you can use, before pursuing those bugs further.
|
||||
|
||||
See the file INSTALL to find out how to configure, build, install, and port
|
||||
the GNU C library. You might also consider reading the WWW pages for the
|
||||
GNU libc at http://www.gnu.org/software/libc/libc.html.
|
||||
The old LinuxThreads add-on implementation of pthreads for older Linux
|
||||
kernels is no longer supported, and we are not distributing it with this
|
||||
release. Someone has volunteered to revive its maintenance unofficially
|
||||
for at least a short time for the benefit of those using Linux kernels
|
||||
older than 2.6, but a working version is not presently available. When
|
||||
it is in working condition, we will make it available alongside future
|
||||
glibc releases. LinuxThreads will not be supported.
|
||||
|
||||
The GNU C Library is completely documented by the Texinfo manual found
|
||||
in the `manual/' subdirectory. The manual is still being updated and
|
||||
contains some known errors and omissions; we regret that we do not
|
||||
have the resources to work on the manual as much as we would like.
|
||||
Please send comments on the manual to <bug-glibc-manual@gnu.org>, and
|
||||
not to the library bug-reporting address.
|
||||
The GNU C Library supports these configurations for using Linux kernels:
|
||||
|
||||
i[34567]86-*-linux-gnu
|
||||
x86_64-*-linux-gnu
|
||||
powerpc-*-linux-gnu
|
||||
powerpc64-*-linux-gnu
|
||||
s390-*-linux-gnu
|
||||
s390x-*-linux-gnu
|
||||
ia64-*-linux-gnu
|
||||
sparc*-*-linux-gnu
|
||||
sparc64*-*-linux-gnu
|
||||
|
||||
alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
|
||||
sh[34]-*-linux-gnu Requires Linux 2.6.11
|
||||
|
||||
The code for other CPU configurations supported by volunteers outside of
|
||||
the core glibc maintenance effort is contained in the separate `ports'
|
||||
add-on. You can find glibc-ports-VERSION distributed separately in the
|
||||
same place where you got the main glibc distribution files.
|
||||
Currently these configurations are known to work using the `ports' add-on:
|
||||
|
||||
arm-*-linux-gnu Requires Linux 2.6.15 for NPTL, no SMP support
|
||||
arm-*-linux-gnueabi Requires Linux 2.6.16-rc1 for NPTL, no SMP
|
||||
mips-*-linux-gnu Requires Linux 2.6.12 for NPTL
|
||||
mips64-*-linux-gnu Requires Linux 2.6.12 for NPTL
|
||||
|
||||
The ports distribution also contains code for other configurations that
|
||||
do not work or have not been maintained recently, but will be of use to
|
||||
anyone trying to make a new configuration work. If you are interested
|
||||
in doing a port, please contact the glibc maintainers; see
|
||||
http://www.gnu.org/software/libc/ for more information.
|
||||
|
||||
See the file INSTALL to find out how to configure, build, and install
|
||||
the GNU C Library. You might also consider reading the WWW pages for
|
||||
the C library at http://www.gnu.org/software/libc/.
|
||||
|
||||
The GNU C Library is (almost) completely documented by the Texinfo manual
|
||||
found in the `manual/' subdirectory. The manual is still being updated
|
||||
and contains some known errors and omissions; we regret that we do not
|
||||
have the resources to work on the manual as much as we would like. For
|
||||
corrections to the manual, please file a bug in the `manual' component,
|
||||
following the bug-reporting instructions below. Please be sure to check
|
||||
the manual in the current development sources to see if your problem has
|
||||
already been corrected.
|
||||
|
||||
The file NOTES contains a description of the feature-test macros used
|
||||
in the GNU C library, explaining how you can tell the library what
|
||||
facilities you want it to make available.
|
||||
|
||||
We prefer to get bug reports sent using the `glibcbug' shell script which
|
||||
is installed together with the rest of the GNU libc to <bugs@gnu.org>.
|
||||
Simply run this shell script and fill in the information. Nevertheless
|
||||
you can still send bug reports to <bug-glibc@gnu.org> as normal electronic
|
||||
mails.
|
||||
Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
|
||||
information. We are now using the Bugzilla system to track all bug reports.
|
||||
This web page gives detailed information on how to report bugs properly.
|
||||
|
||||
The GNU C Library is free software. See the file COPYING.LIB for copying
|
||||
conditions, and LICENSES for notices about a few contributions that require
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright (C) 1991-2000,2002,2003, 2004 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991-2000,2002,2003,2004,2005,2006
|
||||
# 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,7 +27,7 @@ endif
|
||||
|
||||
all: # Don't let the default goal come from Makeconfig.
|
||||
|
||||
include ../Makeconfig
|
||||
include $(firstword $(..) ../)Makeconfig
|
||||
|
||||
ifndef subdir
|
||||
Each subdirectory makefile must define the `subdir' variable.
|
||||
@@ -64,7 +65,7 @@ endif
|
||||
# See below. This must be set before Makerules processes it.
|
||||
before-compile += $(common-objpfx)bits/stdio_lim.h
|
||||
|
||||
include ../Makerules
|
||||
include $(..)Makerules
|
||||
|
||||
.PHONY: subdir_lib
|
||||
subdir_lib: lib-noranlib
|
||||
@@ -104,7 +105,7 @@ endif
|
||||
|
||||
ifeq ($(build-programs),yes)
|
||||
binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs)
|
||||
binaries-static = $(others-static) $(tests-static)
|
||||
binaries-static = $(others-static) $(tests-static) $(xtests-static)
|
||||
else
|
||||
binaries-all = $(tests) $(xtests) $(test-srcs)
|
||||
binaries-static =
|
||||
@@ -165,8 +166,9 @@ distclean: clean
|
||||
.PHONY: subdir_install
|
||||
subdir_install: install-no-libc.a lib-noranlib stubs
|
||||
|
||||
.PHONY: subdir_TAGS
|
||||
subdir_TAGS: TAGS
|
||||
.PHONY: subdir_objs subdir_stubs
|
||||
subdir_objs: objs
|
||||
subdir_stubs: stubs
|
||||
|
||||
# Target required by the Hurd to ensure that all the MiG-generated
|
||||
# headers are in place before building a subdirectory.
|
||||
|
||||
@@ -20,6 +20,8 @@ libc {
|
||||
GLIBC_2.3.2
|
||||
GLIBC_2.3.3
|
||||
GLIBC_2.3.4
|
||||
GLIBC_2.4
|
||||
GLIBC_2.5
|
||||
%ifdef USE_IN_LIBIO
|
||||
HURD_CTHREADS_0.3
|
||||
%endif
|
||||
@@ -35,6 +37,7 @@ libdl {
|
||||
GLIBC_2.0
|
||||
GLIBC_2.1
|
||||
GLIBC_2.3.3
|
||||
GLIBC_2.3.4
|
||||
}
|
||||
libm {
|
||||
GLIBC_2.0
|
||||
@@ -42,6 +45,7 @@ libm {
|
||||
GLIBC_2.2
|
||||
GLIBC_2.2.3
|
||||
GLIBC_2.3.4
|
||||
GLIBC_2.4
|
||||
}
|
||||
libnsl {
|
||||
GLIBC_2.0
|
||||
@@ -77,6 +81,7 @@ libpthread {
|
||||
GLIBC_2.3.2
|
||||
GLIBC_2.3.3
|
||||
GLIBC_2.3.4
|
||||
GLIBC_2.4
|
||||
GLIBC_PRIVATE
|
||||
}
|
||||
libresolv {
|
||||
@@ -90,6 +95,8 @@ librt {
|
||||
GLIBC_2.2
|
||||
GLIBC_2.3
|
||||
GLIBC_2.3.3
|
||||
GLIBC_2.3.4
|
||||
GLIBC_2.4
|
||||
}
|
||||
libutil {
|
||||
GLIBC_2.0
|
||||
@@ -98,6 +105,7 @@ ld {
|
||||
GLIBC_2.0
|
||||
GLIBC_2.1
|
||||
GLIBC_2.3
|
||||
GLIBC_2.4
|
||||
GLIBC_PRIVATE
|
||||
}
|
||||
libthread_db {
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
<unistd.h>:
|
||||
|
||||
lssek: Probably should be __wur but lseek(fd,SEEK_SET,0) will succeed if
|
||||
the descriptor is fine.
|
||||
lseek64: same
|
||||
|
||||
setuid: will always succeed given correct privileges, so there might
|
||||
be places which don't check for it.
|
||||
setreuid: same
|
||||
seteuid: same
|
||||
setgid: same
|
||||
setregid: same
|
||||
setegid: same
|
||||
setresuid: same
|
||||
setresgid: same
|
||||
|
||||
|
||||
<stdio.h>:
|
||||
|
||||
setvbuf: if stream and buffer are fine and other parameters constant,
|
||||
it cannot really fail.
|
||||
fseek: see lseek
|
||||
fseeko: likewise
|
||||
fgetpos: similarly
|
||||
fsetpos: likewise
|
||||
|
||||
|
||||
<stdlib.h>:
|
||||
|
||||
atexit: it is guaranteed that a certain number of handlers can be
|
||||
registered, so some calls might need not be checked
|
||||
on_exit: same
|
||||
random functions: one might want to discard a number of results. In any
|
||||
case, no security problem
|
||||
|
||||
|
||||
putenv: probably SHOULD be marked, but we'll wait a bit.
|
||||
setenv: likewise
|
||||
unsetenv: likewise
|
||||
clearenv: likewise
|
||||
|
||||
mbstowcs: probably SHOULD be marked
|
||||
wcstombs: likewise
|
||||
|
||||
ptsname_r: probably SHOULD be marked
|
||||
@@ -24,5 +24,9 @@
|
||||
|
||||
.*-.*-freebsd.*-gnu.* 3 4.0.0 # earliest compatible kernel version
|
||||
|
||||
.*-.*-knetbsd.*-gnu.* 4 1.6.0 # earliest compatible kernel version
|
||||
|
||||
.*-.*-syllable.* 5 2.0.0 # just an arbitrary value
|
||||
|
||||
# There is no catch-all default here because every supported OS that uses
|
||||
# ELF must have its own unique ABI tag.
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1997, 2002, 2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997, 2002, 2003, 2006 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,10 +26,12 @@ distribute = argp-fmtstream.h argp-namefrob.h
|
||||
routines = $(addprefix argp-, ba fmtstream fs-xinl help parse pv \
|
||||
pvh xinl eexst)
|
||||
|
||||
tests = argp-test tst-argp1
|
||||
tests = argp-test tst-argp1 bug-argp1
|
||||
|
||||
CFLAGS-argp-help.c = $(uses-callbacks) -fexceptions
|
||||
CFLAGS-argp-parse.c = $(uses-callbacks)
|
||||
CFLAGS-argp-fmtstream.c = -fexceptions
|
||||
|
||||
bug-argp1-ARGS = -- --help
|
||||
|
||||
include ../Rules
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sysexits.h>
|
||||
|
||||
+18
-24
@@ -1,5 +1,5 @@
|
||||
/* Word-wrapping and line-truncating streams
|
||||
Copyright (C) 1997,1998,1999,2001,2002,2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
don't have that. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -102,11 +102,10 @@ __argp_fmtstream_free (argp_fmtstream_t fs)
|
||||
if (fs->p > fs->buf)
|
||||
{
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (fs->stream, 0) > 0)
|
||||
__fwprintf (fs->stream, L"%.*s", (int) (fs->p - fs->buf), fs->buf);
|
||||
else
|
||||
__fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
|
||||
#else
|
||||
fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
|
||||
#endif
|
||||
fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
|
||||
}
|
||||
free (fs->buf);
|
||||
free (fs);
|
||||
@@ -291,17 +290,15 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
else
|
||||
/* Output the first line so we can use the space. */
|
||||
{
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (fs->stream, 0) > 0)
|
||||
__fwprintf (fs->stream, L"%.*s\n",
|
||||
(int) (nl - fs->buf), fs->buf);
|
||||
else
|
||||
#ifdef _LIBC
|
||||
__fxprintf (fs->stream, "%.*s\n",
|
||||
(int) (nl - fs->buf), fs->buf);
|
||||
#else
|
||||
if (nl > fs->buf)
|
||||
fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream);
|
||||
putc_unlocked ('\n', fs->stream);
|
||||
#endif
|
||||
{
|
||||
if (nl > fs->buf)
|
||||
fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream);
|
||||
putc_unlocked ('\n', fs->stream);
|
||||
}
|
||||
|
||||
len += buf - fs->buf;
|
||||
nl = buf = fs->buf;
|
||||
}
|
||||
@@ -360,15 +357,12 @@ __argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
|
||||
/* Flush FS's buffer. */
|
||||
__argp_fmtstream_update (fs);
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (fs->stream, 0) > 0)
|
||||
{
|
||||
__fwprintf (fs->stream, L"%.*s", (int) (fs->p - fs->buf), fs->buf);
|
||||
wrote = fs->p - fs->buf;
|
||||
}
|
||||
else
|
||||
#ifdef _LIBC
|
||||
__fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
|
||||
wrote = fs->p - fs->buf;
|
||||
#else
|
||||
wrote = fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
|
||||
#endif
|
||||
wrote = fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
|
||||
if (wrote == fs->p - fs->buf)
|
||||
{
|
||||
fs->p = fs->buf;
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
#ifndef _ARGP_FMTSTREAM_H
|
||||
#define _ARGP_FMTSTREAM_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/* Real definitions for extern inline functions in argp-fmtstream.h
|
||||
Copyright (C) 1997, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define ARGP_FS_EI
|
||||
#undef __OPTIMIZE__
|
||||
#define __OPTIMIZE__
|
||||
#define __OPTIMIZE__ 1
|
||||
#include "argp-fmtstream.h"
|
||||
|
||||
#if 0
|
||||
|
||||
+85
-99
@@ -1,5 +1,5 @@
|
||||
/* Hierarchial argument parsing help output
|
||||
Copyright (C) 1995-2003, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -48,7 +48,8 @@ char *alloca ();
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#ifdef USE_IN_LIBIO
|
||||
#ifdef _LIBC
|
||||
# include <../libio/libioP.h>
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
@@ -127,40 +128,37 @@ struct uparams
|
||||
int header_col;
|
||||
int usage_indent;
|
||||
int rmargin;
|
||||
|
||||
int valid; /* True when the values in here are valid. */
|
||||
};
|
||||
|
||||
/* This is a global variable, as user options are only ever read once. */
|
||||
static struct uparams uparams = {
|
||||
DUP_ARGS, DUP_ARGS_NOTE,
|
||||
SHORT_OPT_COL, LONG_OPT_COL, DOC_OPT_COL, OPT_DOC_COL, HEADER_COL,
|
||||
USAGE_INDENT, RMARGIN,
|
||||
0
|
||||
USAGE_INDENT, RMARGIN
|
||||
};
|
||||
|
||||
/* A particular uparam, and what the user name is. */
|
||||
struct uparam_name
|
||||
{
|
||||
const char *name; /* User name. */
|
||||
int is_bool; /* Whether it's `boolean'. */
|
||||
size_t uparams_offs; /* Location of the (int) field in UPARAMS. */
|
||||
const char name[14]; /* User name. */
|
||||
bool is_bool; /* Whether it's `boolean'. */
|
||||
uint8_t uparams_offs; /* Location of the (int) field in UPARAMS. */
|
||||
};
|
||||
|
||||
/* The name-field mappings we know about. */
|
||||
static const struct uparam_name uparam_names[] =
|
||||
{
|
||||
{ "dup-args", 1, offsetof (struct uparams, dup_args) },
|
||||
{ "dup-args-note", 1, offsetof (struct uparams, dup_args_note) },
|
||||
{ "short-opt-col", 0, offsetof (struct uparams, short_opt_col) },
|
||||
{ "long-opt-col", 0, offsetof (struct uparams, long_opt_col) },
|
||||
{ "doc-opt-col", 0, offsetof (struct uparams, doc_opt_col) },
|
||||
{ "opt-doc-col", 0, offsetof (struct uparams, opt_doc_col) },
|
||||
{ "header-col", 0, offsetof (struct uparams, header_col) },
|
||||
{ "usage-indent", 0, offsetof (struct uparams, usage_indent) },
|
||||
{ "rmargin", 0, offsetof (struct uparams, rmargin) },
|
||||
{ 0 }
|
||||
{ "dup-args", true, offsetof (struct uparams, dup_args) },
|
||||
{ "dup-args-note", true, offsetof (struct uparams, dup_args_note) },
|
||||
{ "short-opt-col", false, offsetof (struct uparams, short_opt_col) },
|
||||
{ "long-opt-col", false, offsetof (struct uparams, long_opt_col) },
|
||||
{ "doc-opt-col", false, offsetof (struct uparams, doc_opt_col) },
|
||||
{ "opt-doc-col", false, offsetof (struct uparams, opt_doc_col) },
|
||||
{ "header-col", false, offsetof (struct uparams, header_col) },
|
||||
{ "usage-indent", false, offsetof (struct uparams, usage_indent) },
|
||||
{ "rmargin", false, offsetof (struct uparams, rmargin) }
|
||||
};
|
||||
#define nuparam_names (sizeof (uparam_names) / sizeof (uparam_names[0]))
|
||||
|
||||
/* Read user options from the environment, and fill in UPARAMS appropiately. */
|
||||
static void
|
||||
@@ -216,22 +214,27 @@ fill_in_uparams (const struct argp_state *state)
|
||||
SKIPWS (arg);
|
||||
}
|
||||
|
||||
for (un = uparam_names; un->name; un++)
|
||||
un = uparam_names;
|
||||
size_t u;
|
||||
for (u = 0; u < nuparam_names; ++un, ++u)
|
||||
if (strlen (un->name) == var_len
|
||||
&& strncmp (var, un->name, var_len) == 0)
|
||||
{
|
||||
if (unspec && !un->is_bool)
|
||||
__argp_failure (state, 0, 0,
|
||||
dgettext (state->root_argp->argp_domain, "\
|
||||
dgettext (state == NULL ? NULL
|
||||
: state->root_argp->argp_domain,
|
||||
"\
|
||||
%.*s: ARGP_HELP_FMT parameter requires a value"),
|
||||
(int) var_len, var);
|
||||
else
|
||||
*(int *)((char *)&uparams + un->uparams_offs) = val;
|
||||
break;
|
||||
}
|
||||
if (! un->name)
|
||||
if (u == nuparam_names)
|
||||
__argp_failure (state, 0, 0,
|
||||
dgettext (state->root_argp->argp_domain, "\
|
||||
dgettext (state == NULL ? NULL
|
||||
: state->root_argp->argp_domain, "\
|
||||
%.*s: Unknown ARGP_HELP_FMT parameter"),
|
||||
(int) var_len, var);
|
||||
|
||||
@@ -242,7 +245,8 @@ fill_in_uparams (const struct argp_state *state)
|
||||
else if (*var)
|
||||
{
|
||||
__argp_failure (state, 0, 0,
|
||||
dgettext (state->root_argp->argp_domain,
|
||||
dgettext (state == NULL ? NULL
|
||||
: state->root_argp->argp_domain,
|
||||
"Garbage in ARGP_HELP_FMT: %s"), var);
|
||||
break;
|
||||
}
|
||||
@@ -758,9 +762,9 @@ hol_entry_cmp (const struct hol_entry *entry1,
|
||||
const char *long2 = hol_entry_first_long (entry2);
|
||||
|
||||
if (doc1)
|
||||
doc1 = canon_doc_option (&long1);
|
||||
doc1 = long1 != NULL && canon_doc_option (&long1);
|
||||
if (doc2)
|
||||
doc2 = canon_doc_option (&long2);
|
||||
doc2 = long2 != NULL && canon_doc_option (&long2);
|
||||
|
||||
if (doc1 != doc2)
|
||||
/* `documentation' options always follow normal options (or
|
||||
@@ -1101,7 +1105,9 @@ hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
|
||||
__argp_fmtstream_putc (stream, '-');
|
||||
__argp_fmtstream_putc (stream, *so);
|
||||
if (!have_long_opt || uparams.dup_args)
|
||||
arg (real, " %s", "[%s]", state->root_argp->argp_domain, stream);
|
||||
arg (real, " %s", "[%s]",
|
||||
state == NULL ? NULL : state->root_argp->argp_domain,
|
||||
stream);
|
||||
else if (real->arg)
|
||||
hhstate->suppressed_dup_arg = 1;
|
||||
}
|
||||
@@ -1121,26 +1127,22 @@ hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
|
||||
have been done on the original; but documentation options
|
||||
should be pretty rare anyway... */
|
||||
__argp_fmtstream_puts (stream,
|
||||
dgettext (state->root_argp->argp_domain,
|
||||
dgettext (state == NULL ? NULL
|
||||
: state->root_argp->argp_domain,
|
||||
opt->name));
|
||||
}
|
||||
}
|
||||
else
|
||||
/* A real long option. */
|
||||
{
|
||||
int first_long_opt = 1;
|
||||
|
||||
__argp_fmtstream_set_wmargin (stream, uparams.long_opt_col);
|
||||
for (opt = real, num = entry->num; num > 0; opt++, num--)
|
||||
if (opt->name && ovisible (opt))
|
||||
{
|
||||
comma (uparams.long_opt_col, &pest);
|
||||
__argp_fmtstream_printf (stream, "--%s", opt->name);
|
||||
if (first_long_opt || uparams.dup_args)
|
||||
arg (real, "=%s", "[=%s]", state->root_argp->argp_domain,
|
||||
stream);
|
||||
else if (real->arg)
|
||||
hhstate->suppressed_dup_arg = 1;
|
||||
arg (real, "=%s", "[=%s]",
|
||||
state == NULL ? NULL : state->root_argp->argp_domain, stream);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1159,7 +1161,8 @@ hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *tstr = real->doc ? dgettext (state->root_argp->argp_domain,
|
||||
const char *tstr = real->doc ? dgettext (state == NULL ? NULL
|
||||
: state->root_argp->argp_domain,
|
||||
real->doc) : 0;
|
||||
const char *fstr = filter_doc (tstr, real->key, entry->argp, state);
|
||||
if (fstr && *fstr)
|
||||
@@ -1207,7 +1210,8 @@ hol_help (struct hol *hol, const struct argp_state *state,
|
||||
|
||||
if (hhstate.suppressed_dup_arg && uparams.dup_args_note)
|
||||
{
|
||||
const char *tstr = dgettext (state->root_argp->argp_domain, "\
|
||||
const char *tstr = dgettext (state == NULL ? NULL
|
||||
: state->root_argp->argp_domain, "\
|
||||
Mandatory or optional arguments to long options are also mandatory or \
|
||||
optional for any corresponding short options.");
|
||||
const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE,
|
||||
@@ -1554,8 +1558,7 @@ _help (const struct argp *argp, const struct argp_state *state, FILE *stream,
|
||||
__flockfile (stream);
|
||||
#endif
|
||||
|
||||
if (! uparams.valid)
|
||||
fill_in_uparams (state);
|
||||
fill_in_uparams (state);
|
||||
|
||||
fs = __argp_make_fmtstream (stream, 0, uparams.rmargin, 0);
|
||||
if (! fs)
|
||||
@@ -1763,33 +1766,26 @@ __argp_error (const struct argp_state *state, const char *fmt, ...)
|
||||
|
||||
va_start (ap, fmt);
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (stream, 0) > 0)
|
||||
{
|
||||
char *buf;
|
||||
#ifdef _LIBC
|
||||
char *buf;
|
||||
|
||||
if (__asprintf (&buf, fmt, ap) < 0)
|
||||
buf = NULL;
|
||||
if (_IO_vasprintf (&buf, fmt, ap) < 0)
|
||||
buf = NULL;
|
||||
|
||||
__fwprintf (stream, L"%s: %s\n",
|
||||
state ? state->name : __argp_short_program_name (),
|
||||
buf);
|
||||
__fxprintf (stream, "%s: %s\n",
|
||||
state ? state->name : __argp_short_program_name (), buf);
|
||||
|
||||
free (buf);
|
||||
}
|
||||
else
|
||||
free (buf);
|
||||
#else
|
||||
fputs_unlocked (state ? state->name : __argp_short_program_name (),
|
||||
stream);
|
||||
putc_unlocked (':', stream);
|
||||
putc_unlocked (' ', stream);
|
||||
|
||||
vfprintf (stream, fmt, ap);
|
||||
|
||||
putc_unlocked ('\n', stream);
|
||||
#endif
|
||||
{
|
||||
fputs_unlocked (state
|
||||
? state->name : __argp_short_program_name (),
|
||||
stream);
|
||||
putc_unlocked (':', stream);
|
||||
putc_unlocked (' ', stream);
|
||||
|
||||
vfprintf (stream, fmt, ap);
|
||||
|
||||
putc_unlocked ('\n', stream);
|
||||
}
|
||||
|
||||
__argp_state_help (state, stream, ARGP_HELP_STD_ERR);
|
||||
|
||||
@@ -1827,41 +1823,34 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
|
||||
__flockfile (stream);
|
||||
#endif
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (stream, 0) > 0)
|
||||
__fwprintf (stream, L"%s",
|
||||
state ? state->name : __argp_short_program_name ());
|
||||
else
|
||||
#ifdef _LIBC
|
||||
__fxprintf (stream, "%s",
|
||||
state ? state->name : __argp_short_program_name ());
|
||||
#else
|
||||
fputs_unlocked (state ? state->name : __argp_short_program_name (),
|
||||
stream);
|
||||
#endif
|
||||
fputs_unlocked (state
|
||||
? state->name : __argp_short_program_name (),
|
||||
stream);
|
||||
|
||||
if (fmt)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, fmt);
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (stream, 0) > 0)
|
||||
{
|
||||
char *buf;
|
||||
#ifdef _LIBC
|
||||
char *buf;
|
||||
|
||||
if (__asprintf (&buf, fmt, ap) < 0)
|
||||
buf = NULL;
|
||||
if (_IO_vasprintf (&buf, fmt, ap) < 0)
|
||||
buf = NULL;
|
||||
|
||||
__fwprintf (stream, L": %s", buf);
|
||||
__fxprintf (stream, ": %s", buf);
|
||||
|
||||
free (buf);
|
||||
}
|
||||
else
|
||||
free (buf);
|
||||
#else
|
||||
putc_unlocked (':', stream);
|
||||
putc_unlocked (' ', stream);
|
||||
|
||||
vfprintf (stream, fmt, ap);
|
||||
#endif
|
||||
{
|
||||
putc_unlocked (':', stream);
|
||||
putc_unlocked (' ', stream);
|
||||
|
||||
vfprintf (stream, fmt, ap);
|
||||
}
|
||||
|
||||
va_end (ap);
|
||||
}
|
||||
@@ -1870,21 +1859,18 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
|
||||
{
|
||||
char buf[200];
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (stream, 0) > 0)
|
||||
__fwprintf (stream, L": %s",
|
||||
__strerror_r (errnum, buf, sizeof (buf)));
|
||||
else
|
||||
#endif
|
||||
{
|
||||
putc_unlocked (':', stream);
|
||||
putc_unlocked (' ', stream);
|
||||
#if defined _LIBC || defined HAVE_STRERROR_R
|
||||
fputs (__strerror_r (errnum, buf, sizeof (buf)), stream);
|
||||
#ifdef _LIBC
|
||||
__fxprintf (stream, ": %s",
|
||||
__strerror_r (errnum, buf, sizeof (buf)));
|
||||
#else
|
||||
fputs (strerror (errnum), stream);
|
||||
putc_unlocked (':', stream);
|
||||
putc_unlocked (' ', stream);
|
||||
# ifdef HAVE_STRERROR_R
|
||||
fputs (__strerror_r (errnum, buf, sizeof (buf)), stream);
|
||||
# else
|
||||
fputs (strerror (errnum), stream);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/* Real definitions for extern inline functions in argp.h
|
||||
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if defined _LIBC || defined HAVE_FEATURES_H
|
||||
@@ -31,7 +31,7 @@
|
||||
#endif
|
||||
#define ARGP_EI
|
||||
#undef __OPTIMIZE__
|
||||
#define __OPTIMIZE__
|
||||
#define __OPTIMIZE__ 1
|
||||
#include "argp.h"
|
||||
|
||||
/* Add weak aliases. */
|
||||
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/* Hierarchial argument parsing, layered over getopt.
|
||||
Copyright (C) 1995-1999,2003,2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-1999,2003,2004,2005,2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define __need_error_t
|
||||
#include <errno.h>
|
||||
@@ -561,7 +562,7 @@ extern void *__argp_input (__const struct argp *__restrict __argp,
|
||||
# endif
|
||||
|
||||
ARGP_EI void
|
||||
__NTH (__argp_usage (__const struct argp_state *__state))
|
||||
__argp_usage (__const struct argp_state *__state)
|
||||
{
|
||||
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
|
||||
}
|
||||
@@ -574,7 +575,7 @@ __NTH (__option_is_short (__const struct argp_option *__opt))
|
||||
else
|
||||
{
|
||||
int __key = __opt->key;
|
||||
return __key > 0 && isprint (__key);
|
||||
return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#include <argp.h>
|
||||
|
||||
|
||||
static const struct argp_option test_options[] =
|
||||
{
|
||||
{ NULL, 'a', NULL, OPTION_DOC, NULL },
|
||||
{ NULL, 'b', NULL, OPTION_DOC, NULL },
|
||||
{ NULL, 0, NULL, 0, NULL }
|
||||
};
|
||||
|
||||
static struct argp test_argp =
|
||||
{
|
||||
test_options
|
||||
};
|
||||
|
||||
|
||||
static int
|
||||
do_test (int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
argp_parse (&test_argp, argc, argv, 0, &i, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define TEST_FUNCTION do_test (argc, argv)
|
||||
#include "../test-skeleton.c"
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1994-1998,2001,2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994-1998,2001,2002,2005 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
|
||||
@@ -61,13 +61,7 @@ __assert_perror_fail (int errnum,
|
||||
__strerror_r (errnum, errbuf, sizeof errbuf)) >= 0)
|
||||
{
|
||||
/* Print the message. */
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
(void) __fwprintf (stderr, L"%s", buf);
|
||||
else
|
||||
#endif
|
||||
(void) fputs (buf, stderr);
|
||||
|
||||
(void) __fxprintf (NULL, "%s", buf);
|
||||
(void) fflush (stderr);
|
||||
|
||||
/* We have to free the buffer since the appplication might catch the
|
||||
|
||||
+3
-8
@@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 1991,1994-1996,1998,2001,2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,1994-1996,1998,2001,2002,2005
|
||||
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
|
||||
@@ -60,13 +61,7 @@ __assert_fail (const char *assertion, const char *file, unsigned int line,
|
||||
assertion) >= 0)
|
||||
{
|
||||
/* Print the message. */
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
(void) __fwprintf (stderr, L"%s", buf);
|
||||
else
|
||||
#endif
|
||||
(void) fputs (buf, stderr);
|
||||
|
||||
(void) __fxprintf (NULL, "%s", buf);
|
||||
(void) fflush (stderr);
|
||||
|
||||
/* We have to free the buffer since the application might catch the
|
||||
|
||||
+11
-26
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,1992,1994-2001,2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,1992,1994-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
|
||||
@@ -84,33 +84,18 @@ extern void __assert (const char *__assertion, const char *__file, int __line)
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/* For the macro definition we use gcc's __builtin_expect if possible
|
||||
to generate good code for the non-error case. gcc 3.0 is a good
|
||||
enough estimate for when the feature became available. */
|
||||
# if __GNUC_PREREQ (3, 0)
|
||||
# define assert(expr) \
|
||||
(__ASSERT_VOID_CAST (__builtin_expect (!!(expr), 1) ? 0 : \
|
||||
(__assert_fail (__STRING(expr), __FILE__, __LINE__, \
|
||||
__ASSERT_FUNCTION), 0)))
|
||||
# else
|
||||
# define assert(expr) \
|
||||
(__ASSERT_VOID_CAST ((expr) ? 0 : \
|
||||
(__assert_fail (__STRING(expr), __FILE__, __LINE__, \
|
||||
__ASSERT_FUNCTION), 0)))
|
||||
# endif
|
||||
# define assert(expr) \
|
||||
((expr) \
|
||||
? __ASSERT_VOID_CAST (0) \
|
||||
: (__assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION), \
|
||||
__ASSERT_VOID_CAST (0)))
|
||||
|
||||
# ifdef __USE_GNU
|
||||
# if __GNUC_PREREQ (3, 0)
|
||||
# define assert_perror(errnum) \
|
||||
(__ASSERT_VOID_CAST (__builtin_expect (!(errnum), 1) ? 0 : \
|
||||
(__assert_perror_fail ((errnum), __FILE__, __LINE__, \
|
||||
__ASSERT_FUNCTION), 0)))
|
||||
# else
|
||||
# define assert_perror(errnum) \
|
||||
(__ASSERT_VOID_CAST (!(errnum) ? 0 : \
|
||||
(__assert_perror_fail ((errnum), __FILE__, __LINE__, \
|
||||
__ASSERT_FUNCTION), 0)))
|
||||
# endif
|
||||
# define assert_perror(errnum) \
|
||||
(!(errnum) \
|
||||
? __ASSERT_VOID_CAST (0) \
|
||||
: (__assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION), \
|
||||
__ASSERT_VOID_CAST (0)))
|
||||
# endif
|
||||
|
||||
/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
distinfo
|
||||
@@ -1,55 +0,0 @@
|
||||
# Copyright (C) 1994, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
|
||||
# On-Line Applications Research Corporation.
|
||||
#
|
||||
|
||||
# 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.
|
||||
|
||||
subdir := bare
|
||||
|
||||
bare-routines := brdinit console strtsupp
|
||||
routines = $(bare-routines)
|
||||
elided-routines = $(bare-routines)
|
||||
extra-objs = $(bare-routines:%=%.o)
|
||||
|
||||
install-lib = lib$(config-vendor).a
|
||||
|
||||
include ../Rules
|
||||
|
||||
#
|
||||
# For bare targets, the $(config-vendor) is the name of the board.
|
||||
# We will place the board dependent code ONLY in a library which
|
||||
# is board dependent. This way many target boards can share a
|
||||
# single libc.a. To resolve all symbols and successfully link
|
||||
# a program, the application must link against libc.a and libMY_TARGET.a.
|
||||
# For example, the target specific library for the Motorola MVME135
|
||||
# board will be named libmvme135.a. To link a program for the
|
||||
# MVME135, one must link against -lc and -lmvme135.
|
||||
#
|
||||
|
||||
lib: $(objpfx)lib$(config-vendor).a
|
||||
|
||||
$(objpfx)lib$(config-vendor).a: $(bare-routines:%=$(objpfx)%.o)
|
||||
# This library is small enough that it's simplest to recreate the archive
|
||||
# from scratch each time.
|
||||
rm -f $@
|
||||
ifdef objdir
|
||||
cd $(objpfx); $(AR) cq$(verbose) $(@:$(objpfx)%=%) $(^:$(objpfx)%=%)
|
||||
else
|
||||
$(AR) cq$(verbose) $@ $^
|
||||
endif
|
||||
$(RANLIB) $@
|
||||
+13
-10
@@ -1,5 +1,5 @@
|
||||
/* Macros to swap the order of bytes in integer values.
|
||||
Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997,1998,2000,2001,2002,2005 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -25,32 +25,35 @@
|
||||
#define _BITS_BYTESWAP_H 1
|
||||
|
||||
/* Swap bytes in 16 bit value. */
|
||||
#define __bswap_constant_16(x) \
|
||||
((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define __bswap_16(x) \
|
||||
(__extension__ \
|
||||
({ unsigned short int __bsx = (x); \
|
||||
((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }))
|
||||
({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); }))
|
||||
#else
|
||||
static __inline unsigned short int
|
||||
__bswap_16 (unsigned short int __bsx)
|
||||
{
|
||||
return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8));
|
||||
return __bswap_constant_16 (__bsx);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Swap bytes in 32 bit value. */
|
||||
#define __bswap_constant_32(x) \
|
||||
((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \
|
||||
(((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define __bswap_32(x) \
|
||||
(__extension__ \
|
||||
({ unsigned int __bsx = (x); \
|
||||
((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \
|
||||
(((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }))
|
||||
(__extension__ \
|
||||
({ register unsigned int __bsx = (x); __bswap_constant_32 (__bsx); }))
|
||||
#else
|
||||
static __inline unsigned int
|
||||
__bswap_32 (unsigned int __bsx)
|
||||
{
|
||||
return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) |
|
||||
(((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24));
|
||||
return __bswap_constant_32 (__bsx);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+6
-1
@@ -492,9 +492,14 @@ enum
|
||||
#define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE
|
||||
_SC_LEVEL4_CACHE_ASSOC,
|
||||
#define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC
|
||||
_SC_LEVEL4_CACHE_LINESIZE
|
||||
_SC_LEVEL4_CACHE_LINESIZE,
|
||||
#define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE
|
||||
/* Leave room here, maybe we need a few more cache levels some day. */
|
||||
|
||||
_SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
|
||||
#define _SC_IPV6 _SC_IPV6
|
||||
_SC_RAW_SOCKETS
|
||||
#define _SC_RAW_SOCKETS _SC_RAW_SOCKETS
|
||||
};
|
||||
|
||||
/* Values for the NAME argument to `confstr'. */
|
||||
|
||||
+2
-1
@@ -1,5 +1,5 @@
|
||||
/* System dependent definitions for run-time dynamic loading.
|
||||
Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-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
|
||||
@@ -26,6 +26,7 @@
|
||||
#define RTLD_NOW 0x00002 /* Immediate function call binding. */
|
||||
#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
|
||||
#define RTLD_NOLOAD 0x00004 /* Do not load the object. */
|
||||
#define RTLD_DEEPBIND 0x00008 /* Use deep binding. */
|
||||
|
||||
/* If the following bit is set in the MODE argument to `dlopen',
|
||||
the symbols of the loaded object and its dependencies are made
|
||||
|
||||
+4
-1
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999, 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
|
||||
@@ -72,4 +72,7 @@
|
||||
# define _XBS5_LP64_OFF64 -1
|
||||
# define _XBS5_LPBIG_OFFBIG -1
|
||||
|
||||
/* CFLAGS. */
|
||||
#define __ILP32_OFFBIG_CFLAGS "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
|
||||
#endif /* __WORDSIZE == 32 */
|
||||
|
||||
+1
-4
@@ -1,4 +1 @@
|
||||
struct link_map_machine
|
||||
{
|
||||
/* empty by default */
|
||||
};
|
||||
#error "Architecture-specific definition needed."
|
||||
|
||||
+7
-1
@@ -1,5 +1,5 @@
|
||||
/* Definitions for BSD-style memory management.
|
||||
Copyright (C) 1994-1998,2000,01,02 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-1998,2000,01,02,05 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
|
||||
@@ -85,6 +85,12 @@
|
||||
#define MS_SYNC 0 /* Synchronous memory sync. */
|
||||
#define MS_INVALIDATE 2 /* Invalidate the caches. */
|
||||
|
||||
/* Flags for `mremap'. */
|
||||
#ifdef __USE_GNU
|
||||
# define MREMAP_MAYMOVE 1 /* Mapping address may change. */
|
||||
# define MREMAP_FIXED 2 /* Fifth argument sets new address. */
|
||||
#endif
|
||||
|
||||
/* Flags for `mlockall' (can be OR'd together). */
|
||||
#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
|
||||
#define MCL_FUTURE 2 /* Lock all additions to address
|
||||
|
||||
+9
-1
@@ -1,5 +1,5 @@
|
||||
/* Bit values & structures for resource limits. 4.4 BSD/generic GNU version.
|
||||
Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994,1996,1997,1998,2006 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
|
||||
@@ -63,6 +63,14 @@ enum __rlimit_resource
|
||||
RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */
|
||||
#define RLIMIT_OFILE RLIMIT_OFILE
|
||||
#define RLIMIT_NOFILE RLIMIT_NOFILE
|
||||
/* Maximum size of all socket buffers. */
|
||||
RLIMIT_SBSIZE,
|
||||
#define RLIMIT_SBSIZE RLIMIT_SBSIZE
|
||||
/* Maximum size in bytes of the process address space. */
|
||||
RLIMIT_AS,
|
||||
RLIMIT_VMEM = RLIMIT_AS, /* Another name for the same thing. */
|
||||
#define RLIMIT_AS RLIMIT_AS
|
||||
#define RLIMIT_VMEM RLIMIT_AS
|
||||
|
||||
RLIMIT_NLIMITS, /* Number of limit flavors. */
|
||||
RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ enum
|
||||
{
|
||||
ILL_ILLOPC = 1, /* Illegal opcode. */
|
||||
# define ILL_ILLOPC ILL_ILLOPC
|
||||
ILL_ILL_OPN, /* Illegal operand. */
|
||||
ILL_ILLOPN, /* Illegal operand. */
|
||||
# define ILL_ILLOPN ILL_ILLOPN
|
||||
ILL_ILLADR, /* Illegal addressing mode. */
|
||||
# define ILL_ILLADR ILL_ILLADR
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/* <bits/syslog-path.h> -- _PATH_LOG definition
|
||||
Copyright (C) 2006 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; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifndef _SYS_SYSLOG_H
|
||||
# error "Never include this file directly. Use <sys/syslog.h> instead"
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_SYSLOG_PATH_H
|
||||
#define _BITS_SYSLOG_PATH_H 1
|
||||
|
||||
#define _PATH_LOG "/dev/log"
|
||||
|
||||
#endif /* bits/syslog-path.h */
|
||||
+8
-7
@@ -1,5 +1,5 @@
|
||||
/* bits/types.h -- definitions of __*_t types underlying *_t types.
|
||||
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003, 2004, 2005 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
|
||||
@@ -106,14 +106,17 @@ typedef struct
|
||||
#define __SLONGWORD_TYPE long int
|
||||
#define __ULONGWORD_TYPE unsigned long int
|
||||
#if __WORDSIZE == 32
|
||||
# define __SQUAD_TYPE long long int
|
||||
# define __UQUAD_TYPE unsigned long long int
|
||||
# define __SQUAD_TYPE __quad_t
|
||||
# define __UQUAD_TYPE __u_quad_t
|
||||
# define __SWORD_TYPE int
|
||||
# define __UWORD_TYPE unsigned int
|
||||
# define __SLONG32_TYPE long int
|
||||
# define __ULONG32_TYPE unsigned long int
|
||||
# define __S64_TYPE __quad_t
|
||||
# define __U64_TYPE __u_quad_t
|
||||
/* We want __extension__ before typedef's that use nonstandard base types
|
||||
such as `long long' in C89 mode. */
|
||||
# define __STD_TYPE __extension__ typedef
|
||||
#elif __WORDSIZE == 64
|
||||
# define __SQUAD_TYPE long int
|
||||
# define __UQUAD_TYPE unsigned long int
|
||||
@@ -123,15 +126,13 @@ typedef struct
|
||||
# define __ULONG32_TYPE unsigned int
|
||||
# define __S64_TYPE long int
|
||||
# define __U64_TYPE unsigned long int
|
||||
/* No need to mark the typedef with __extension__. */
|
||||
# define __STD_TYPE typedef
|
||||
#else
|
||||
# error
|
||||
#endif
|
||||
#include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */
|
||||
|
||||
/* We want __extension__ before typedef's that use nonstandard base types
|
||||
such as `long long' in C89 mode. */
|
||||
#define __STD_TYPE __extension__ typedef
|
||||
|
||||
|
||||
__STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */
|
||||
__STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */
|
||||
|
||||
+10
-8
@@ -1,5 +1,5 @@
|
||||
/* Definitions of status bits for `wait' et al.
|
||||
Copyright (C) 1992, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992,1994,1996,1997,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
|
||||
@@ -38,23 +38,25 @@
|
||||
#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
|
||||
|
||||
/* Nonzero if STATUS indicates termination by a signal. */
|
||||
#ifdef __GNUC__
|
||||
# define __WIFSIGNALED(status) \
|
||||
(__extension__ ({ int __status = (status); \
|
||||
!__WIFSTOPPED(__status) && !__WIFEXITED(__status); }))
|
||||
#else /* Not GCC. */
|
||||
# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status))
|
||||
#endif /* GCC. */
|
||||
#define __WIFSIGNALED(status) \
|
||||
(((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
|
||||
|
||||
/* Nonzero if STATUS indicates the child is stopped. */
|
||||
#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
|
||||
|
||||
/* Nonzero if STATUS indicates the child continued after a stop. We only
|
||||
define this if <bits/waitflags.h> provides the WCONTINUED flag bit. */
|
||||
#ifdef WCONTINUED
|
||||
# define __WIFCONTINUED(status) ((status) == __W_CONTINUED)
|
||||
#endif
|
||||
|
||||
/* Nonzero if STATUS indicates the child dumped core. */
|
||||
#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
|
||||
|
||||
/* Macros for constructing status values. */
|
||||
#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
|
||||
#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
|
||||
#define __W_CONTINUED 0xffff
|
||||
#define __WCOREFLAG 0x80
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
+12
-14
@@ -1,24 +1,22 @@
|
||||
/* Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996-2005, 2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 1996.
|
||||
|
||||
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.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU 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. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <argp.h>
|
||||
@@ -248,7 +246,7 @@ print_version (FILE *stream, struct argp_state *state)
|
||||
Copyright (C) %s Free Software Foundation, Inc.\n\
|
||||
This is free software; see the source for copying conditions. There is NO\n\
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
||||
"), "2004");
|
||||
"), "2006");
|
||||
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/* @configure_input@ -*- C -*-
|
||||
Generated from $Id$.
|
||||
|
||||
This is used only by the generic `uname' function for systems with no real
|
||||
`uname' call. If this data is not correct, it does not matter much. */
|
||||
|
||||
+12
-23
@@ -8,11 +8,6 @@
|
||||
# error "glibc must not be compiled with -ffast-math"
|
||||
#endif
|
||||
|
||||
/* Define if using GNU ld, with support for weak symbols in a.out,
|
||||
and for symbol set and warning messages extensions in a.out and ELF.
|
||||
This implies HAVE_WEAK_SYMBOLS; set by --with-gnu-ld. */
|
||||
#undef HAVE_GNU_LD
|
||||
|
||||
/* Define if using ELF, which supports weak symbols.
|
||||
This implies HAVE_ASM_WEAK_DIRECTIVE and NO_UNDERSCORES; set by
|
||||
--with-elf. */
|
||||
@@ -21,6 +16,9 @@
|
||||
/* Define if building with SELinux support. Set by --with-selinux. */
|
||||
#undef HAVE_SELINUX
|
||||
|
||||
/* Defined if building with SELinux support & audit libs are detected. */
|
||||
#undef HAVE_LIBAUDIT
|
||||
|
||||
/* Define if using XCOFF. Set by --with-xcoff. */
|
||||
#undef HAVE_XCOFF
|
||||
|
||||
@@ -47,9 +45,6 @@
|
||||
/* Define if __attribute__((section("foo"))) puts quotes around foo. */
|
||||
#undef HAVE_SECTION_QUOTES
|
||||
|
||||
/* Define if using the GNU assembler, gas. */
|
||||
#undef HAVE_GNU_AS
|
||||
|
||||
/* Define if the assembler supports the `.set' directive. */
|
||||
#undef HAVE_ASM_SET_DIRECTIVE
|
||||
|
||||
@@ -94,13 +89,6 @@
|
||||
/* Define if static NSS modules are wanted. */
|
||||
#undef DO_STATIC_NSS
|
||||
|
||||
/* Define if gcc uses DWARF2 unwind information for exception support. */
|
||||
#undef HAVE_DWARF2_UNWIND_INFO
|
||||
|
||||
/* Define if gcc uses DWARF2 unwind information for exception support
|
||||
with static variable. */
|
||||
#undef HAVE_DWARF2_UNWIND_INFO_STATIC
|
||||
|
||||
/* Define if the compiler supports __builtin_expect. */
|
||||
#undef HAVE_BUILTIN_EXPECT
|
||||
|
||||
@@ -155,10 +143,6 @@
|
||||
/* Define if binutils support TLS handling. */
|
||||
#undef HAVE_TLS_SUPPORT
|
||||
|
||||
/* Define if the linker supports .preinit_array/.init_array/.fini_array
|
||||
sections. */
|
||||
#undef HAVE_INITFINI_ARRAY
|
||||
|
||||
/* Define if the compiler's exception support is based on libunwind. */
|
||||
#undef HAVE_CC_WITH_LIBUNWIND
|
||||
|
||||
@@ -183,10 +167,6 @@
|
||||
/* Override abi-tags ABI version if necessary. */
|
||||
#undef __ABI_TAG_VERSION
|
||||
|
||||
/* An extension in gcc 2.96 and up allows the subtraction of two
|
||||
local labels. */
|
||||
#undef HAVE_SUBTRACT_LOCAL_LABELS
|
||||
|
||||
/* bash 2.0 introduced the _XXX_GNU_nonoption_argv_flags_ variable to help
|
||||
getopt determine whether a parameter is a flag or not. This features
|
||||
was disabled later since it caused trouble. We are by default therefore
|
||||
@@ -217,6 +197,15 @@
|
||||
/* Define if inlined system calls are available. */
|
||||
#undef HAVE_INLINED_SYSCALLS
|
||||
|
||||
/* Define if your assembler and linker support R_PPC_REL16* relocs. */
|
||||
#undef HAVE_ASM_PPC_REL16
|
||||
|
||||
/* Define if your compiler defaults to -msecure-plt mode on ppc. */
|
||||
#undef HAVE_PPC_SECURE_PLT
|
||||
|
||||
/* Define if __stack_chk_guard canary should be randomized at program startup. */
|
||||
#undef ENABLE_STACKGUARD_RANDOMIZE
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
||||
+8
-5
@@ -1,5 +1,4 @@
|
||||
# @configure_input@
|
||||
# From $Id$.
|
||||
# Don't edit this file. Put configuration parameters in configparms instead.
|
||||
|
||||
version = @VERSION@
|
||||
@@ -31,9 +30,11 @@ base-machine = @base_machine@
|
||||
config-vendor = @host_vendor@
|
||||
config-os = @host_os@
|
||||
config-sysdirs = @sysnames@
|
||||
with-cpu = @submachine@
|
||||
|
||||
defines = @DEFINES@
|
||||
sysincludes = @SYSINCLUDES@
|
||||
c++-sysincludes = @CXX_SYSINCLUDES@
|
||||
all-warnings = @all_warnings@
|
||||
|
||||
elf = @elf@
|
||||
@@ -53,15 +54,18 @@ with-fp = @with_fp@
|
||||
with-cvs = @with_cvs@
|
||||
old-glibc-headers = @old_glibc_headers@
|
||||
unwind-find-fde = @libc_cv_gcc_unwind_find_fde@
|
||||
have-initfini-array = @libc_cv_initfinit_array@
|
||||
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@
|
||||
have-ssp = @libc_cv_ssp@
|
||||
have-selinux = @have_selinux@
|
||||
have-libaudit = @have_libaudit@
|
||||
have-libcap = @have_libcap@
|
||||
have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
|
||||
fno-unit-at-a-time = @fno_unit_at_a_time@
|
||||
bind-now = @bindnow@
|
||||
have-hash-style = @libc_cv_hashstyle@
|
||||
|
||||
static-libgcc = @libc_cv_gcc_static_libgcc@
|
||||
|
||||
@@ -69,7 +73,6 @@ versioning = @VERSIONING@
|
||||
oldest-abi = @oldest_abi@
|
||||
no-whole-archive = @no_whole_archive@
|
||||
exceptions = @exceptions@
|
||||
have_doors = @linux_doors@
|
||||
|
||||
mach-interface-list = @mach_interface_list@
|
||||
|
||||
@@ -79,8 +82,6 @@ have-ksh = @libc_cv_have_ksh@
|
||||
sizeof-long-double = @sizeof_long_double@
|
||||
|
||||
# Configuration options.
|
||||
gnu-as = @gnu_as@
|
||||
gnu-ld = @gnu_ld@
|
||||
build-static = @static@
|
||||
build-shared = @shared@
|
||||
build-pic-default= @pic_default@
|
||||
@@ -89,6 +90,8 @@ build-omitfp = @omitfp@
|
||||
build-bounded = @bounded@
|
||||
build-static-nss = @static_nss@
|
||||
add-ons = @add_ons@
|
||||
add-on-subdirs = @add_on_subdirs@
|
||||
sysdeps-add-ons = @sysdeps_add_ons@
|
||||
cross-compiling = @cross_compiling@
|
||||
force-install = @force_install@
|
||||
|
||||
|
||||
+296
-303
@@ -13,18 +13,6 @@ fi
|
||||
# This will get text that should go into config.make.
|
||||
config_vars=
|
||||
|
||||
# Check for a --with-gmp argument and set gmp-srcdir in config.make.
|
||||
AC_ARG_WITH([gmp],
|
||||
AC_HELP_STRING([--with-gmp=DIRECTORY],
|
||||
[find GMP source code in DIRECTORY (not needed)]),
|
||||
[
|
||||
case "$with_gmp" in
|
||||
yes) AC_MSG_ERROR([--with-gmp requires an argument; use --with-gmp=DIRECTORY]) ;;
|
||||
''|no) ;;
|
||||
*) config_vars="$config_vars
|
||||
gmp-srcdir = $withval" ;;
|
||||
esac
|
||||
])
|
||||
# Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
|
||||
AC_ARG_WITH([gd],
|
||||
AC_HELP_STRING([--with-gd=DIR],
|
||||
@@ -174,18 +162,21 @@ else
|
||||
fi
|
||||
AC_SUBST(oldest_abi)
|
||||
|
||||
AC_ARG_ENABLE([stackguard-randomization],
|
||||
AC_HELP_STRING([--enable-stackguard-randomization],
|
||||
[initialize __stack_chk_guard canary with a random number at program start]),
|
||||
[enable_stackguard_randomize=$enableval],
|
||||
[enable_stackguard_randomize=no])
|
||||
if test "$enable_stackguard_randomize" = yes; then
|
||||
AC_DEFINE(ENABLE_STACKGUARD_RANDOMIZE)
|
||||
fi
|
||||
|
||||
dnl Generic infrastructure for drop-in additions to libc.
|
||||
AC_ARG_ENABLE([add-ons],
|
||||
AC_HELP_STRING([--enable-add-ons@<:@=DIRS...@:>@],
|
||||
[configure and build add-ons in DIR1,DIR2,... search for add-ons if no parameter given]),
|
||||
[case "$enableval" in
|
||||
yes) add_ons=`cd $srcdir && echo */configure | sed -e 's!/configure!!g'`
|
||||
add_ons_automatic=yes
|
||||
test "$add_ons" = "*" && add_ons= ;;
|
||||
*) add_ons=`echo "$enableval" | sed 's/,/ /g'`
|
||||
add_ons_automatic=no ;;
|
||||
esac],
|
||||
[add_ons= add_ons_automatic=no])
|
||||
[configure and build add-ons in DIR1,DIR2,...
|
||||
search for add-ons if no parameter given]),
|
||||
, [enable_add_ons=yes])
|
||||
|
||||
dnl Let the user avoid using TLS. Don't know why but...
|
||||
AC_ARG_WITH([tls],
|
||||
@@ -289,11 +280,6 @@ config_os="`echo $config_os | sed 's/^unknown-//'`"
|
||||
|
||||
# Some configurations imply other options.
|
||||
case "$host_os" in
|
||||
gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
|
||||
# These systems always use GNU tools.
|
||||
gnu_ld=yes gnu_as=yes ;;
|
||||
esac
|
||||
case "$host_os" in
|
||||
# i586-linuxaout is mangled into i586-pc-linux-gnuaout
|
||||
linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
|
||||
;;
|
||||
@@ -328,8 +314,19 @@ case "$machine-$host_os" in
|
||||
;;
|
||||
esac
|
||||
|
||||
submachine=
|
||||
AC_ARG_WITH([cpu],
|
||||
AS_HELP_STRING([--with-cpu=CPU], [select code for CPU variant]),
|
||||
[dnl
|
||||
case "$withval" in
|
||||
yes|'') AC_MSG_ERROR([--with-cpu requires an argument]) ;;
|
||||
no) ;;
|
||||
*) submachine="$withval" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# An add-on can set this when it the tuple to disable the sanity check below.
|
||||
|
||||
# An add-on can set this when it wants to disable the sanity check below.
|
||||
libc_config_ok=no
|
||||
|
||||
dnl Having this here, though empty, makes sure that if add-ons' fragments
|
||||
@@ -337,6 +334,18 @@ dnl do AC_CONFIG_SUBDIRS([some-dir]), which just sets $subdirs, then
|
||||
dnl our AC_OUTPUT will actually use it.
|
||||
AC_CONFIG_SUBDIRS()
|
||||
|
||||
case "$enable_add_ons" in
|
||||
''|no) add_ons= ;;
|
||||
yes|'*')
|
||||
add_ons=`cd $srcdir && ls -d 2> /dev/null */configure */sysdeps |
|
||||
sed 's@/[[^/]]*$@@' | sort | uniq`
|
||||
add_ons_automatic=yes
|
||||
;;
|
||||
*) add_ons=`echo "$enable_add_ons" | sed 's/,/ /g'`
|
||||
add_ons_automatic=no ;;
|
||||
esac
|
||||
|
||||
configured_add_ons=
|
||||
add_ons_sfx=
|
||||
add_ons_pfx=
|
||||
if test x"$add_ons" != x; then
|
||||
@@ -358,11 +367,6 @@ if test x"$add_ons" != x; then
|
||||
*** \`localedata' add-on.])
|
||||
;;
|
||||
esac
|
||||
|
||||
# Test whether such a subdir really exists.
|
||||
test -d $srcdir/$f || {
|
||||
AC_MSG_ERROR(add-on directory \"$f\" does not exist)
|
||||
}
|
||||
done
|
||||
|
||||
# Now source each add-on's configure fragment.
|
||||
@@ -372,23 +376,81 @@ if test x"$add_ons" != x; then
|
||||
# whether it goes into the list to be actually used in the build.
|
||||
use_add_ons=
|
||||
for libc_add_on in $add_ons; do
|
||||
libc_add_on_frag=$srcdir/$libc_add_on/configure
|
||||
if test -r $libc_add_on_frag; then
|
||||
AC_MSG_RESULT(running configure fragment for add-on $libc_add_on)
|
||||
. $libc_add_on_frag
|
||||
else
|
||||
AC_MSG_WARN(add-on fragment $libc_add_on_frag missing)
|
||||
# Test whether such a directory really exists.
|
||||
# It can be absolute, or relative to $srcdir, or relative to the build dir.
|
||||
case "$libc_add_on" in
|
||||
/*)
|
||||
libc_add_on_srcdir=$libc_add_on
|
||||
;;
|
||||
*)
|
||||
test -d "$srcdir/$libc_add_on" || {
|
||||
if test -d "$libc_add_on"; then
|
||||
libc_add_on="`pwd`/$libc_add_on"
|
||||
else
|
||||
AC_MSG_ERROR(add-on directory \"$libc_add_on\" does not exist)
|
||||
fi
|
||||
}
|
||||
libc_add_on_srcdir=$srcdir/$libc_add_on
|
||||
;;
|
||||
esac
|
||||
|
||||
libc_add_on_frag=$libc_add_on_srcdir/configure
|
||||
libc_add_on_canonical=
|
||||
if test -r "$libc_add_on_frag"; then
|
||||
AC_MSG_NOTICE(running configure fragment for add-on $libc_add_on)
|
||||
libc_add_on_canonical=unknown
|
||||
libc_add_on_subdirs=
|
||||
. "$libc_add_on_frag"
|
||||
test -z "$libc_add_on" || {
|
||||
configured_add_ons="$configured_add_ons $libc_add_on"
|
||||
if test "x$libc_add_on_canonical" = xunknown; then
|
||||
AC_MSG_ERROR(fragment must set \$libc_add_on_canonical)
|
||||
fi
|
||||
for d in $libc_add_on_subdirs; do
|
||||
case "$libc_add_on" in
|
||||
/*) subdir_srcdir="$libc_add_on" ;;
|
||||
*) subdir_srcdir="\$(..)$libc_add_on" ;;
|
||||
esac
|
||||
case "$d" in
|
||||
.)
|
||||
d="${libc_add_on_canonical:-$libc_add_on}"
|
||||
;;
|
||||
/*)
|
||||
subdir_srcdir="$d"
|
||||
;;
|
||||
*)
|
||||
subdir_srcdir="$subdir_srcdir/$d"
|
||||
;;
|
||||
esac
|
||||
d=`echo "$d" | sed 's@/*$@@;s@^.*/@@'`
|
||||
add_on_subdirs="$add_on_subdirs $d"
|
||||
test "$subdir_srcdir" = "\$(..)$d" || config_vars="$config_vars
|
||||
$d-srcdir = $subdir_srcdir"
|
||||
done
|
||||
}
|
||||
fi
|
||||
if test -n "$libc_add_on"; then
|
||||
if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
|
||||
then
|
||||
AC_MSG_CHECKING(add-on $libc_add_on for preconfigure fragments)
|
||||
for frag in $frags; do
|
||||
name=`echo "$frag" | sed 's@/[[^/]]*$@@;s@^.*/@@'`
|
||||
echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD
|
||||
. "$frag"
|
||||
done
|
||||
AC_MSG_RESULT()
|
||||
fi
|
||||
use_add_ons="$use_add_ons $libc_add_on"
|
||||
add_ons_pfx="$add_ons_pfx $libc_add_on/"
|
||||
add_ons_sfx="$add_ons_sfx /$libc_add_on"
|
||||
test -z "$libc_add_on_canonical" ||
|
||||
add_ons_sfx="$add_ons_sfx /$libc_add_on_canonical"
|
||||
fi
|
||||
done
|
||||
# Use echo to strip excess whitespace.
|
||||
add_ons="`echo $use_add_ons`"
|
||||
fi
|
||||
AC_SUBST(add_ons)
|
||||
AC_SUBST(add_on_subdirs)
|
||||
|
||||
|
||||
###
|
||||
@@ -423,44 +485,12 @@ changequote(,)dnl
|
||||
test -n "$base_machine" || case "$machine" in
|
||||
a29k | am29000) base_machine=a29k machine=a29k ;;
|
||||
alpha*) base_machine=alpha machine=alpha/$machine ;;
|
||||
arm*) base_machine=arm machine=arm/arm32/$machine ;;
|
||||
c3[012]) base_machine=cx0 machine=cx0/c30 ;;
|
||||
c4[04]) base_machine=cx0 machine=cx0/c40 ;;
|
||||
hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
|
||||
hppa*) base_machine=hppa machine=hppa/hppa1.1 ;;
|
||||
i[34567]86) base_machine=i386 machine=i386/$machine ;;
|
||||
ia64) base_machine=ia64 machine=ia64 ;;
|
||||
m680?0) base_machine=m68k machine=m68k/$machine ;;
|
||||
m68k) base_machine=m68k machine=m68k/m68020 ;;
|
||||
m88???) base_machine=m88k machine=m88k/$machine ;;
|
||||
m88k) base_machine=m88k machine=m88k/m88100 ;;
|
||||
mips64*) base_machine=mips64
|
||||
case "$CC $CFLAGS $CPPFLAGS " in
|
||||
*" -mabi=n32 "*) mips_cc_abi=n32 ;;
|
||||
*" -mabi=64 "*|*" -mabi=n64 "*) mips_cc_abi=64 ;;
|
||||
*" -mabi=32 "*|*" -mabi=o32 "*) mips_cc_abi=32 ;;
|
||||
*) mips_cc_abi=default ;;
|
||||
esac
|
||||
case $config_os in
|
||||
*abin32*) mips_config_abi=n32 ;;
|
||||
*abi64*|*abin64*) mips_config_abi=64 ;;
|
||||
*abi32*|*abio32*) mips_config_abi=32 ;;
|
||||
*) mips_config_abi=$mips_cc_abi ;;
|
||||
esac
|
||||
case $mips_config_abi in
|
||||
default) machine=mips/mips64/n32 mips_config_abi=n32 ;;
|
||||
n32) machine=mips/mips64/n32 ;;
|
||||
64) machine=mips/mips64/n64 ;;
|
||||
32) machine=mips/mips32/kern64 ;;
|
||||
esac
|
||||
machine=$machine/$config_machine
|
||||
if test $mips_config_abi != $mips_cc_abi; then
|
||||
# This won't make it to config.make, but we want to
|
||||
# set this in case configure tests depend on it.
|
||||
CPPFLAGS="$CPPFLAGS -mabi=$mips_config_abi"
|
||||
fi
|
||||
;;
|
||||
mips*) base_machine=mips machine=mips/mips32/$machine ;;
|
||||
powerpc) base_machine=powerpc machine=powerpc/powerpc32 ;;
|
||||
powerpc64) base_machine=powerpc machine=powerpc/powerpc64 ;;
|
||||
s390) base_machine=s390 machine=s390/s390-32 ;;
|
||||
@@ -474,12 +504,15 @@ sparcv8 | supersparc | hypersparc)
|
||||
sparcv8plus | sparcv8plusa | sparcv9)
|
||||
base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
|
||||
sparcv8plusb | sparcv9b)
|
||||
base_machine=sparc machine=sparc/sparc32/sparcv9b ;;
|
||||
sparc64 | ultrasparc)
|
||||
base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9b ;;
|
||||
sparcv9v)
|
||||
base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v ;;
|
||||
sparc64)
|
||||
base_machine=sparc machine=sparc/sparc64 ;;
|
||||
sparc64b | ultrasparc3)
|
||||
sparc64b)
|
||||
base_machine=sparc machine=sparc/sparc64/sparcv9b ;;
|
||||
thumb*) base_machine=thumb machine=arm/thumb/$machine ;;
|
||||
sparc64v)
|
||||
base_machine=sparc machine=sparc/sparc64/sparcv9v ;;
|
||||
*) base_machine=$machine ;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
@@ -549,7 +582,7 @@ done
|
||||
|
||||
# For sparc/sparc32, try sparc/sparc32 and then sparc.
|
||||
mach=
|
||||
tail=$machine
|
||||
tail=$machine${submachine:+/$submachine}
|
||||
while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
|
||||
set $m
|
||||
# Prepend the machine's FPU directory unless --without-fp.
|
||||
@@ -566,25 +599,38 @@ dnl We are done with glob and regexp uses of [ and ]; return to autoconf.
|
||||
changequote([,])dnl
|
||||
|
||||
# Find what sysdep directories exist.
|
||||
sysnames_add_ons=
|
||||
sysnames=
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for d in $add_ons_pfx ''; do
|
||||
for b in $base ''; do
|
||||
for m0 in $mach ''; do
|
||||
for v in /$vendor ''; do
|
||||
test "$v" = / && continue
|
||||
for o in /$ostry ''; do
|
||||
test "$o" = / && continue
|
||||
for m in $mach ''; do
|
||||
for b in $base ''; do
|
||||
for m0 in $mach ''; do
|
||||
for v in /$vendor ''; do
|
||||
test "$v" = / && continue
|
||||
for o in /$ostry ''; do
|
||||
test "$o" = / && continue
|
||||
for m in $mach ''; do
|
||||
for d in $add_ons_pfx ''; do
|
||||
for a in $add_ons_sfx ''; do
|
||||
if test "$m0$b$v$o$m"; then
|
||||
try="${d}sysdeps$m0$b$v$o$m$a"
|
||||
if test -n "$m0$m0sub$b$v$o$m$msub"; then
|
||||
try_srcdir="${srcdir}/"
|
||||
case "$d" in
|
||||
/*) try_srcdir= ;;
|
||||
esac
|
||||
try="${d}sysdeps$m0$m0sub$b$v$o$m$msub$a"
|
||||
test -n "$enable_debug_configure" &&
|
||||
echo "$0 [DEBUG]: try $try" >&2
|
||||
if test -d $srcdir/$try; then
|
||||
if test -d "$try_srcdir$try"; then
|
||||
sysnames="$sysnames $try"
|
||||
{ test -n "$o" || test -n "$b"; } && os_used=t
|
||||
{ test -n "$m" || test -n "$m0"; } && machine_used=t
|
||||
case x${m0:-$m} in
|
||||
x*/$submachine) submachine_used=t ;;
|
||||
esac
|
||||
if test -n "$d"; then
|
||||
case "$sysnames_add_ons" in
|
||||
*" $d "*) ;;
|
||||
*|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -594,7 +640,6 @@ for d in $add_ons_pfx ''; do
|
||||
done
|
||||
done
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
|
||||
if test -z "$os_used" && test "$os" != none; then
|
||||
AC_MSG_ERROR(Operating system $os is not supported.)
|
||||
@@ -602,6 +647,10 @@ fi
|
||||
if test -z "$machine_used" && test "$machine" != none; then
|
||||
AC_MSG_ERROR(The $machine is not supported.)
|
||||
fi
|
||||
if test -z "$submachine_used" && test -n "$submachine"; then
|
||||
AC_MSG_ERROR(The $submachine subspecies of $host_cpu is not supported.)
|
||||
fi
|
||||
AC_SUBST(submachine)
|
||||
|
||||
# We have now validated the configuration.
|
||||
|
||||
@@ -671,6 +720,10 @@ while test $# -gt 0; do
|
||||
then
|
||||
implied="$implied $try"
|
||||
found=yes
|
||||
case "$sysnames_add_ons" in
|
||||
*" $d "*) ;;
|
||||
*|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
if test $found = no; then
|
||||
@@ -710,6 +763,61 @@ AC_SUBST(sysnames)
|
||||
# The other names were emitted during the scan.
|
||||
AC_MSG_RESULT($default_sysnames)
|
||||
|
||||
# Collect the list of add-ons that supply partial sysdeps trees.
|
||||
sysdeps_add_ons=
|
||||
for add_on in $add_ons; do
|
||||
case "$add_on" in
|
||||
/*) xsrcdir= ;;
|
||||
*) xsrcdir="$srcdir/" ;;
|
||||
esac
|
||||
|
||||
test -d "$xsrcdir$add_on/sysdeps" || {
|
||||
case "$configured_add_ons " in
|
||||
*" $add_on "*) ;;
|
||||
*|'')
|
||||
AC_MSG_ERROR(add-on $add_on has no configure fragment or sysdeps tree)
|
||||
;;
|
||||
esac
|
||||
continue
|
||||
}
|
||||
|
||||
sysdeps_add_ons="$sysdeps_add_ons $add_on"
|
||||
case "$sysnames_add_ons" in
|
||||
*" $add_on/ "*) ;;
|
||||
*|'')
|
||||
AC_MSG_WARN(add-on $add_on contributed no sysdeps directories)
|
||||
continue ;;
|
||||
esac
|
||||
|
||||
found=no
|
||||
for d in $sysnames; do
|
||||
case "$d" in
|
||||
$add_on/sysdeps/*) ;;
|
||||
*) continue ;;
|
||||
esac
|
||||
(cd "$xsrcdir$d" && for f in *[[!~]]; do
|
||||
case "$f" in
|
||||
sys|bits)
|
||||
for ff in $f/*.h; do
|
||||
test -d "$ff" || { test -e "$ff" && exit 88; }
|
||||
done
|
||||
;;
|
||||
*)
|
||||
test -d "$f" || { test -e "$f" && exit 88; }
|
||||
;;
|
||||
esac
|
||||
done)
|
||||
if test $? -eq 88; then
|
||||
found=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test $found = no; then
|
||||
AC_MSG_WARN(add-on $add_on contributed no useful sysdeps directories)
|
||||
fi
|
||||
done
|
||||
AC_SUBST(sysdeps_add_ons)
|
||||
|
||||
|
||||
### Locate tools.
|
||||
|
||||
@@ -752,7 +860,7 @@ fi
|
||||
# These programs are version sensitive.
|
||||
AC_CHECK_TOOL_PREFIX
|
||||
AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
|
||||
[version \([egcygnustpi-]*[0-9.]*\)], [3.[2-9]* | 4.[0-9]* ],
|
||||
[version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ],
|
||||
critic_missing="$critic_missing gcc")
|
||||
AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
|
||||
[GNU Make[^0-9]*\([0-9][0-9.]*\)],
|
||||
@@ -806,8 +914,16 @@ if test -n "$sysheaders"; then
|
||||
ccheaders=`$CC -print-file-name=include`
|
||||
SYSINCLUDES="-nostdinc -isystem $ccheaders \
|
||||
-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
|
||||
if test -n "$CXX"; then
|
||||
cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
|
||||
cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
|
||||
cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
|
||||
CXX_SYSINCLUDES="-isystem $cxxheaders \
|
||||
-isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(SYSINCLUDES)
|
||||
AC_SUBST(CXX_SYSINCLUDES)
|
||||
|
||||
# check if ranlib is necessary
|
||||
AC_CACHE_CHECK(whether ranlib is necessary, libc_cv_ranlib_necessary, [dnl
|
||||
@@ -1218,12 +1334,12 @@ EOF
|
||||
AC_DEFINE(HAVE_BROKEN_ALIAS_ATTRIBUTE)
|
||||
fi
|
||||
|
||||
if test $libc_cv_visibility_attribute = yes -a $gnu_ld = yes; then
|
||||
if test $libc_cv_visibility_attribute = yes; then
|
||||
AC_CACHE_CHECK(whether to put _rtld_local into .sdata section,
|
||||
libc_cv_have_sdata_section,
|
||||
[echo "int i;" > conftest.c
|
||||
libc_cv_have_sdata_section=no
|
||||
if ${CC-cc} $LDFLAGS -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \
|
||||
if ${CC-cc} $LDFLAGS -fPIC -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \
|
||||
| grep '\.sdata' >/dev/null; then
|
||||
libc_cv_have_sdata_section=yes
|
||||
fi
|
||||
@@ -1235,7 +1351,7 @@ EOF
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
|
||||
libc_cv_initfinit_array, [dnl
|
||||
libc_cv_initfini_array, [dnl
|
||||
cat > conftest.c <<EOF
|
||||
int _start (void) { return 0; }
|
||||
int __start (void) { return 0; }
|
||||
@@ -1246,27 +1362,30 @@ EOF
|
||||
-static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
|
||||
libc_cv_initfinit_array=yes
|
||||
libc_cv_initfini_array=yes
|
||||
else
|
||||
libc_cv_initfinit_array=no
|
||||
libc_cv_initfini_array=no
|
||||
fi
|
||||
else
|
||||
libc_cv_initfinit_array=no
|
||||
libc_cv_initfini_array=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
AC_SUBST(libc_cv_initfinit_array)
|
||||
if test $libc_cv_initfinit_array = yes; then
|
||||
AC_DEFINE(HAVE_INITFINI_ARRAY)
|
||||
if test $libc_cv_initfini_array != yes; then
|
||||
AC_MSG_ERROR([Need linker with .init_array/.fini_array support.])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for libunwind-support in compiler,
|
||||
libc_cv_cc_with_libunwind, [dnl
|
||||
AC_TRY_LINK([#include <libunwind.h>], [
|
||||
unw_context_t uc;
|
||||
unw_cursor_t c;
|
||||
unw_getcontext (&uc);
|
||||
unw_init_local (&c, &uc)],
|
||||
libc_cv_cc_with_libunwind=yes, libc_cv_cc_with_libunwind=no)])
|
||||
libc_cv_cc_with_libunwind, [
|
||||
cat > conftest.c <<EOF
|
||||
int main (void) { return 0; }
|
||||
EOF
|
||||
if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
|
||||
conftest.c -v 2>&1 >/dev/null | grep -q " -lunwind "; then
|
||||
libc_cv_cc_with_libunwind=yes
|
||||
else
|
||||
libc_cv_cc_with_libunwind=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
AC_SUBST(libc_cv_cc_with_libunwind)
|
||||
if test $libc_cv_cc_with_libunwind = yes; then
|
||||
AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)
|
||||
@@ -1278,7 +1397,7 @@ EOF
|
||||
int _start (void) { return 42; }
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
|
||||
-shared -o conftest.so conftest.c
|
||||
-fPIC -shared -o conftest.so conftest.c
|
||||
-nostartfiles -nostdlib
|
||||
-Wl,--enable-new-dtags,-z,nodelete 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
@@ -1295,7 +1414,7 @@ EOF
|
||||
int _start (void) { return 42; }
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
|
||||
-shared -o conftest.so conftest.c
|
||||
-fPIC -shared -o conftest.so conftest.c
|
||||
-nostartfiles -nostdlib
|
||||
-Wl,--enable-new-dtags,-z,nodlopen 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
@@ -1312,7 +1431,7 @@ EOF
|
||||
int _start (void) { return 42; }
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
|
||||
-shared -o conftest.so conftest.c
|
||||
-fPIC -shared -o conftest.so conftest.c
|
||||
-nostartfiles -nostdlib
|
||||
-Wl,--enable-new-dtags,-z,initfirst 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
@@ -1344,7 +1463,7 @@ EOF
|
||||
int _start (void) { return 42; }
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
|
||||
-shared -o conftest.so conftest.c
|
||||
-fPIC -shared -o conftest.so conftest.c
|
||||
-Wl,-Bgroup -nostdlib 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
libc_cv_Bgroup=yes
|
||||
@@ -1361,7 +1480,7 @@ int main (void) { return 0; }
|
||||
EOF
|
||||
changequote(,)dnl
|
||||
libc_cv_libgcc_s_suffix=`${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
|
||||
-shared -shared-libgcc -o conftest.so \
|
||||
-fPIC -shared -shared-libgcc -o conftest.so \
|
||||
conftest.c -v 2>&1 >/dev/null \
|
||||
| sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'`
|
||||
changequote([,])dnl
|
||||
@@ -1374,7 +1493,7 @@ changequote([,])dnl
|
||||
int main (void) { return 0; }
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
|
||||
-shared -o conftest.so conftest.c
|
||||
-fPIC -shared -o conftest.so conftest.c
|
||||
-lgcc_s$libc_cv_libgcc_s_suffix -Wl,--as-needed
|
||||
-nostdlib 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
@@ -1415,7 +1534,7 @@ extern int mumble;
|
||||
int foo (void) { return bar (mumble); }
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
|
||||
-shared -o conftest.so conftest.c
|
||||
-fPIC -shared -o conftest.so conftest.c
|
||||
-nostdlib -nostartfiles
|
||||
-Wl,-z,combreloc 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
@@ -1444,7 +1563,7 @@ dnl look for a section named .rel.dyn.
|
||||
int _start (void) { return 42; }
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
|
||||
-shared -o conftest.so conftest.c
|
||||
-fPIC -shared -o conftest.so conftest.c
|
||||
-Wl,-z,execstack -nostdlib
|
||||
1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
@@ -1470,25 +1589,58 @@ EOF
|
||||
rm -f conftest*])
|
||||
|
||||
AC_SUBST(libc_cv_fpie)
|
||||
|
||||
AC_CACHE_CHECK(for --hash-style option,
|
||||
libc_cv_hashstyle, [dnl
|
||||
cat > conftest.c <<EOF
|
||||
int _start (void) { return 42; }
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
|
||||
-fPIC -shared -o conftest.so conftest.c
|
||||
-Wl,--hash-style=both -nostdlib 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
libc_cv_hashstyle=yes
|
||||
else
|
||||
libc_cv_hashstyle=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
AC_SUBST(libc_cv_hashstyle)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for -fno-unit-at-a-time, libc_cv_fno_unit_at_a_time, [dnl
|
||||
AC_CACHE_CHECK(for -fno-toplevel-reorder, libc_cv_fno_toplevel_reorder, [dnl
|
||||
cat > conftest.c <<EOF
|
||||
int foo;
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -fno-unit-at-a-time
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -fno-toplevel-reorder
|
||||
conftest.c 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
libc_cv_fno_unit_at_a_time=yes
|
||||
libc_cv_fno_toplevel_reorder=yes
|
||||
else
|
||||
libc_cv_fno_unit_at_a_time=no
|
||||
libc_cv_fno_toplevel_reorder=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test $libc_cv_fno_unit_at_a_time = yes; then
|
||||
if test $libc_cv_fno_toplevel_reorder = yes; then
|
||||
fno_unit_at_a_time=-fno-toplevel-reorder
|
||||
else
|
||||
fno_unit_at_a_time=-fno-unit-at-a-time
|
||||
fi
|
||||
AC_SUBST(fno_unit_at_a_time)
|
||||
|
||||
AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
|
||||
cat > conftest.c <<EOF
|
||||
int foo;
|
||||
main () { return 0;}
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
|
||||
-o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
libc_cv_ssp=yes
|
||||
else
|
||||
libc_cv_ssp=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
AC_SUBST(libc_cv_ssp)
|
||||
|
||||
if test $elf != yes; then
|
||||
AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
|
||||
[AC_TRY_COMPILE(, [asm (".section .init");
|
||||
@@ -1502,7 +1654,7 @@ if test $elf != yes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $elf = yes -a $gnu_ld = yes; then
|
||||
if test $elf = yes; then
|
||||
AC_CACHE_CHECK(whether cc puts quotes around section names,
|
||||
libc_cv_have_section_quotes,
|
||||
[cat > conftest.c <<EOF
|
||||
@@ -1617,43 +1769,18 @@ elif test $libc_cv_asm_weakext_directive = yes; then
|
||||
AC_DEFINE(HAVE_ASM_WEAKEXT_DIRECTIVE)
|
||||
fi
|
||||
|
||||
dnl The standard hppa assembler uses `;' to start comments and `!'
|
||||
dnl as a line separator. CRIS uses `;' to start comments and `@' for
|
||||
dnl line separator.
|
||||
case "${host_cpu}-${host_os}" in
|
||||
cris*)
|
||||
libc_cv_asm_line_sep='@'
|
||||
AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
|
||||
;;
|
||||
hppa*linux*)
|
||||
AC_CACHE_CHECK(for assembler line separator,
|
||||
libc_cv_asm_line_sep, [dnl
|
||||
cat > conftest.s <<EOF
|
||||
nop ; is_old_puffin
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
libc_cv_asm_line_sep='!'
|
||||
else
|
||||
if test -z "$enable_hacker_mode"; then
|
||||
echo "*** You need a newer assembler to compile glibc"
|
||||
rm -f conftest*
|
||||
exit 1
|
||||
fi
|
||||
libc_cv_asm_line_sep=';'
|
||||
fi
|
||||
rm -f conftest*])
|
||||
AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CACHE_CHECK(whether CFI directives are supported, libc_cv_asm_cfi_directives, [dnl
|
||||
case $machine in
|
||||
sparc/sparc64*) cfi_offset=2047;;
|
||||
*) cfi_offset=0;;
|
||||
esac
|
||||
cat > conftest.s <<EOF
|
||||
.text
|
||||
.type func,@function
|
||||
.type func,%function
|
||||
func:
|
||||
.cfi_startproc
|
||||
.cfi_remember_state
|
||||
.cfi_rel_offset 1, 0
|
||||
.cfi_rel_offset 1, $cfi_offset
|
||||
.cfi_endproc
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
@@ -1666,39 +1793,6 @@ if test $libc_cv_asm_cfi_directives = yes; then
|
||||
AC_DEFINE(HAVE_ASM_CFI_DIRECTIVES)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
|
||||
libc_cv_cpp_asm_debuginfo, [dnl
|
||||
cat > conftest.S <<EOF
|
||||
#include "confdefs.h"
|
||||
|
||||
/* comment on
|
||||
two lines */
|
||||
${libc_cv_dot_text}
|
||||
${libc_cv_asm_global_directive} foo
|
||||
foo:
|
||||
/* Unfortunately this test only works for a real instruction,
|
||||
not for any of the machine-independent pseudo-ops.
|
||||
So we just have to assume everybody has a "nop". */
|
||||
nop
|
||||
/* comment */
|
||||
nop
|
||||
/* comment */
|
||||
nop
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
|
||||
ac_pattern='conftest\.S'
|
||||
AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
|
||||
grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
|
||||
}; then
|
||||
libc_cv_cpp_asm_debuginfo=yes
|
||||
else
|
||||
libc_cv_cpp_asm_debuginfo=no
|
||||
fi
|
||||
rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
|
||||
if test $libc_cv_cpp_asm_debuginfo = yes; then
|
||||
AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl
|
||||
cat > conftest.c <<\EOF
|
||||
_start () {}
|
||||
@@ -1751,71 +1845,6 @@ if test "$libc_cv_c_asmcr0_bug" != 'no'; then
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for DWARF2 unwind info support, libc_cv_gcc_dwarf2_unwind_info,
|
||||
[cat > conftest.c <<EOF
|
||||
#line $LINENO "configure"
|
||||
static char *__EH_FRAME_BEGIN__;
|
||||
_start ()
|
||||
{
|
||||
#ifdef CHECK__register_frame
|
||||
__register_frame (__EH_FRAME_BEGIN__);
|
||||
__deregister_frame (__EH_FRAME_BEGIN__);
|
||||
#endif
|
||||
#ifdef CHECK__register_frame_info
|
||||
__register_frame_info (__EH_FRAME_BEGIN__);
|
||||
__deregister_frame_info (__EH_FRAME_BEGIN__);
|
||||
#endif
|
||||
}
|
||||
int __eh_pc;
|
||||
__throw () {}
|
||||
/* FIXME: this is fragile. */
|
||||
malloc () {}
|
||||
strcmp () {}
|
||||
strlen () {}
|
||||
memcpy () {}
|
||||
memset () {}
|
||||
free () {}
|
||||
abort () {}
|
||||
__bzero () {}
|
||||
dl_iterate_phdr () {}
|
||||
EOF
|
||||
libc_unwind_check="${CC-cc} $CFLAGS $CPPFLAGS -DCHECK__register_frame_info \
|
||||
$LDFLAGS \
|
||||
-nostdlib -nostartfiles -o conftest conftest.c \
|
||||
-lgcc"
|
||||
# Some platforms' specs put -lgcc first. The second one doesn't hurt.
|
||||
if AC_TRY_COMMAND([$libc_unwind_check >&AS_MESSAGE_LOG_FD]) ||
|
||||
AC_TRY_COMMAND([$libc_unwind_check -lgcc_eh -lgcc >&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
if $libc_unwind_check -v 2>&1 >/dev/null \
|
||||
| grep -- --eh-frame-hdr 2>&1 >/dev/null; then
|
||||
libc_cv_gcc_dwarf2_unwind_info=no_registry_needed
|
||||
else
|
||||
libc_cv_gcc_dwarf2_unwind_info=static
|
||||
fi
|
||||
else
|
||||
libc_cv_gcc_dwarf2_unwind_info=no
|
||||
fi
|
||||
if test $libc_cv_gcc_dwarf2_unwind_info = no; then
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -DCHECK__register_frame
|
||||
$LDFLAGS -nostdlib -nostartfiles
|
||||
-o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then
|
||||
libc_cv_gcc_dwarf2_unwind_info=yes
|
||||
else
|
||||
libc_cv_gcc_dwarf2_unwind_info=no
|
||||
fi
|
||||
fi
|
||||
rm -f conftest*])
|
||||
case $libc_cv_gcc_dwarf2_unwind_info in
|
||||
yes)
|
||||
AC_DEFINE(HAVE_DWARF2_UNWIND_INFO)
|
||||
;;
|
||||
static)
|
||||
AC_DEFINE(HAVE_DWARF2_UNWIND_INFO)
|
||||
AC_DEFINE(HAVE_DWARF2_UNWIND_INFO_STATIC)
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Check whether compiler understands __builtin_expect.
|
||||
AC_CACHE_CHECK(for __builtin_expect, libc_cv_gcc_builtin_expect,
|
||||
[cat > conftest.c <<EOF
|
||||
@@ -1877,35 +1906,6 @@ if test "$libc_cv_gcc_builtin_redirection" = yes ; then
|
||||
AC_DEFINE(HAVE_BUILTIN_REDIRECTION)
|
||||
fi
|
||||
|
||||
dnl Check whether the compiler supports subtraction of local labels.
|
||||
AC_CACHE_CHECK(for local label subtraction, libc_cv_gcc_subtract_local_labels,
|
||||
[cat > conftest.c <<EOF
|
||||
changequote(,)dnl
|
||||
#line $LINENO "configure"
|
||||
int foo (int a)
|
||||
{
|
||||
static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
|
||||
void *p = &&l1 + ar[a];
|
||||
goto *p;
|
||||
l1:
|
||||
return 1;
|
||||
l2:
|
||||
return 2;
|
||||
}
|
||||
changequote([,])dnl
|
||||
EOF
|
||||
dnl No \ in command here because it ends up inside ''.
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
|
||||
-o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then
|
||||
libc_cv_gcc_subtract_local_labels=yes
|
||||
else
|
||||
libc_cv_gcc_subtract_local_labels=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test "$libc_cv_gcc_subtract_local_labels" = yes; then
|
||||
AC_DEFINE(HAVE_SUBTRACT_LOCAL_LABELS)
|
||||
fi
|
||||
|
||||
dnl Check whether the compiler supports the __thread keyword.
|
||||
if test "x$use__thread" != xno; then
|
||||
AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread,
|
||||
@@ -1989,7 +1989,22 @@ else
|
||||
fi
|
||||
# Check if we're building with SELinux support.
|
||||
if test "x$have_selinux" = xyes; then
|
||||
AC_DEFINE(HAVE_SELINUX,1,[SELinux support])
|
||||
AC_DEFINE(HAVE_SELINUX, 1, [SELinux support])
|
||||
|
||||
# See if we have the libaudit library
|
||||
AC_CHECK_LIB(audit, audit_log_user_avc_message,
|
||||
have_libaudit=yes, have_libaudit=no)
|
||||
if test "x$have_libaudit" = xyes; then
|
||||
AC_DEFINE(HAVE_LIBAUDIT, 1, [SELinux libaudit support])
|
||||
fi
|
||||
AC_SUBST(have_libaudit)
|
||||
|
||||
# See if we have the libcap library
|
||||
AC_CHECK_LIB(cap, cap_init, have_libcap=yes, have_libcap=no)
|
||||
if test "x$have_libcap" = xyes; then
|
||||
AC_DEFINE(HAVE_LIBCAP, 1, [SELinux libcap support])
|
||||
fi
|
||||
AC_SUBST(have_libcap)
|
||||
fi
|
||||
AC_SUBST(have_selinux)
|
||||
|
||||
@@ -2123,13 +2138,7 @@ AC_SUBST(libc_cv_forced_unwind)
|
||||
AC_SUBST(use_ldconfig)
|
||||
AC_SUBST(ldd_rewrite_script)
|
||||
|
||||
AC_SUBST(gnu_ld) AC_SUBST(gnu_as) AC_SUBST(elf) AC_SUBST(xcoff)
|
||||
if test $gnu_ld = yes; then
|
||||
AC_DEFINE(HAVE_GNU_LD)
|
||||
fi
|
||||
if test $gnu_as = yes; then
|
||||
AC_DEFINE(HAVE_GNU_AS)
|
||||
fi
|
||||
AC_SUBST(elf) AC_SUBST(xcoff)
|
||||
if test $elf = yes; then
|
||||
AC_DEFINE(HAVE_ELF)
|
||||
fi
|
||||
@@ -2140,17 +2149,7 @@ fi
|
||||
AC_SUBST(static)
|
||||
AC_SUBST(shared)
|
||||
if test $shared = default; then
|
||||
if test $gnu_ld = yes; then
|
||||
shared=$elf
|
||||
else
|
||||
# For now we do not assume shared libs are available. In future more
|
||||
# tests might become available.
|
||||
shared=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$libc_cv_idn" = xyes; then
|
||||
AC_DEFINE(HAVE_LIBIDN)
|
||||
shared=$elf
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([whether -fPIC is default], pic_default,
|
||||
@@ -2174,12 +2173,6 @@ AC_SUBST(nopic_initfini)
|
||||
|
||||
AC_SUBST(DEFINES)
|
||||
|
||||
case "$add_ons" in
|
||||
*door*) linux_doors=yes ;;
|
||||
*) linux_doors=no ;;
|
||||
esac
|
||||
AC_SUBST(linux_doors)
|
||||
|
||||
dnl See sysdeps/mach/configure.in for this variable.
|
||||
AC_SUBST(mach_interface_list)
|
||||
|
||||
|
||||
+3
-5
@@ -23,17 +23,15 @@ subdir := crypt
|
||||
|
||||
headers := crypt.h
|
||||
|
||||
distribute := md5.h
|
||||
|
||||
extra-libs := libcrypt
|
||||
extra-libs-others := $(extra-libs)
|
||||
|
||||
libcrypt-routines := crypt-entry md5-crypt md5 crypt crypt_util
|
||||
|
||||
tests = cert md5test md5c-test
|
||||
tests := cert md5test md5c-test
|
||||
|
||||
distribute = ufc-crypt.h crypt-private.h ufc.c speeds.c README.ufc-crypt \
|
||||
Banner md5.h
|
||||
distribute := ufc-crypt.h crypt-private.h ufc.c speeds.c README.ufc-crypt \
|
||||
Banner md5.h
|
||||
|
||||
include ../Makeconfig
|
||||
|
||||
|
||||
+1
-1
@@ -902,7 +902,7 @@ __setkey_r(__key, __data)
|
||||
c = c << 1 | *__key++;
|
||||
ktab[i] = c >> 1;
|
||||
}
|
||||
_ufc_mk_keytab_r(ktab, __data);
|
||||
_ufc_mk_keytab_r((char *) ktab, __data);
|
||||
}
|
||||
weak_alias (__setkey_r, setkey_r)
|
||||
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
/* Functions to compute MD5 message digest of files or memory blocks.
|
||||
according to the definition of MD5 in RFC 1321 from April 1992.
|
||||
Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995,1996,1997,1999,2000,2001,2005
|
||||
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
|
||||
@@ -31,7 +32,7 @@
|
||||
# include <string.h>
|
||||
#else
|
||||
# ifndef HAVE_MEMCPY
|
||||
# define memcpy(d, s, n) bcopy ((s), (d), (n))
|
||||
# define memcpy(d, s, n) (bcopy ((s), (d), (n)), (d))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
+5
-1
@@ -1,6 +1,7 @@
|
||||
/* Declaration of functions and data types used for MD5 sum computing
|
||||
library functions.
|
||||
Copyright (C) 1995-1997,1999,2000,2001,2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-1997,1999,2000,2001,2004,2005
|
||||
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
|
||||
@@ -27,6 +28,9 @@
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#define MD5_DIGEST_SIZE 16
|
||||
#define MD5_BLOCK_SIZE 64
|
||||
|
||||
/* The following contortions are an attempt to use the C preprocessor
|
||||
to determine an unsigned integral type that is 32 bits wide. An
|
||||
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
|
||||
|
||||
+10
-20
@@ -1,5 +1,5 @@
|
||||
# Makefile for csu code for GNU C library.
|
||||
# Copyright (C) 1995-2003, 2004 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995-2004, 2005, 2006 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
|
||||
@@ -39,8 +39,8 @@ omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \
|
||||
b$(start-installed-name) $(csu-dummies) \
|
||||
S$(start-installed-name))
|
||||
install-lib = $(start-installed-name) g$(start-installed-name) $(csu-dummies)
|
||||
distribute = initfini.c gmon-start.c start.c defs.awk munch.awk \
|
||||
abi-note.S init.c munch-tmpl.c not-cancel.h
|
||||
distribute = initfini.c gmon-start.c start.c defs.awk \
|
||||
abi-note.S init.c c not-cancel.h
|
||||
generated = version-info.h
|
||||
before-compile = $(objpfx)version-info.h
|
||||
|
||||
@@ -54,11 +54,13 @@ include ../Makeconfig
|
||||
ifeq (yes,$(build-shared))
|
||||
extra-objs += S$(start-installed-name)
|
||||
install-lib += S$(start-installed-name)
|
||||
generated += start.os
|
||||
endif
|
||||
|
||||
ifeq (yes,$(build-bounded))
|
||||
extra-objs += b$(start-installed-name)
|
||||
install-lib += b$(start-installed-name)
|
||||
generated += start.ob
|
||||
endif
|
||||
|
||||
ifneq ($(start-installed-name),$(static-start-installed-name))
|
||||
@@ -73,19 +75,6 @@ before-compile += $(objpfx)abi-tag.h
|
||||
generated += abi-tag.h
|
||||
endif
|
||||
|
||||
ifneq (yes,$(gnu-ld))
|
||||
libc-init = munch-init
|
||||
$(objpfx)munch-init.c: munch.awk munch-tmpl.c $(+subdir_inits)
|
||||
$(AWK) -f $< subdirs='$(+init_subdirs)' $(word 2,$^) > $@-t
|
||||
mv -f $@-t $@
|
||||
generated += munch-init.c
|
||||
|
||||
# All initialization source files.
|
||||
+subdir_inits := $(wildcard $(foreach dir,$(subdirs),$(dir)/init-$(dir).c))
|
||||
# All subdirectories containing initialization source files.
|
||||
+init_subdirs := $(patsubst %/,%,$(dir $(+subdir_inits)))
|
||||
endif
|
||||
|
||||
ifeq ($(have-initfini),yes)
|
||||
|
||||
CPPFLAGS += -DHAVE_INITFINI
|
||||
@@ -106,7 +95,7 @@ $(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
|
||||
|
||||
CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
|
||||
|
||||
vpath initfini.c $(full_config_sysdirs)
|
||||
vpath initfini.c $(sysdirs)
|
||||
|
||||
$(objpfx)initfini.s: initfini.c $(before-compile)
|
||||
$(compile.c) -S $(CFLAGS-initfini.s) -finhibit-size-directive \
|
||||
@@ -211,8 +200,9 @@ $(objpfx)abi-tag.h: $(..)abi-tags
|
||||
if test -r $@.new; then mv -f $@.new $@; \
|
||||
else echo >&2 'This configuration not matched in $<'; exit 1; fi
|
||||
|
||||
all-Banner-files = $(wildcard $(addsuffix /Banner, \
|
||||
$(addprefix $(..), $(subdirs))))
|
||||
all-Banner-files = $(wildcard $(addsuffix /Banner,\
|
||||
$(sort $(subdir-srcdirs) \
|
||||
$(sysdeps-srcdirs))))
|
||||
$(objpfx)version-info.h: $(common-objpfx)config.make $(all-Banner-files)
|
||||
$(make-target-directory)
|
||||
(case $(config-os) in \
|
||||
@@ -239,7 +229,7 @@ $(objpfx)version-info.h: $(common-objpfx)config.make $(all-Banner-files)
|
||||
esac; \
|
||||
files="$(all-Banner-files)"; \
|
||||
if test -n "$$files"; then \
|
||||
echo "\"Available extensions:\\n\""; \
|
||||
printf '"Available extensions:\\n"\n'; \
|
||||
sed -e '/^#/d' -e 's/^[[:space:]]*/ /' \
|
||||
-e 's/^\(.*\)$$/\"\1\\n\"/' $$files; \
|
||||
fi) > $@T
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000, 2002, 2003, 2005 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
|
||||
@@ -44,12 +44,26 @@ check_one_fd (int fd, int mode)
|
||||
if (__builtin_expect (__libc_fcntl (fd, F_GETFD), 0) == -1
|
||||
&& errno == EBADF)
|
||||
{
|
||||
struct stat64 st;
|
||||
const char *name;
|
||||
dev_t dev;
|
||||
|
||||
/* For writable descriptors we use /dev/full. */
|
||||
if ((mode & O_ACCMODE) == O_WRONLY)
|
||||
{
|
||||
name = _PATH_DEV "full";
|
||||
dev = makedev (DEV_FULL_MAJOR, DEV_FULL_MINOR);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = _PATH_DEVNULL;
|
||||
dev = makedev (DEV_NULL_MAJOR, DEV_NULL_MINOR);
|
||||
}
|
||||
|
||||
/* Something is wrong with this descriptor, it's probably not
|
||||
opened. Open /dev/null so that the SUID program we are
|
||||
about to start does not accidently use this descriptor. */
|
||||
int nullfd = open_not_cancel (_PATH_DEVNULL, mode, 0);
|
||||
int nullfd = open_not_cancel (name, mode, 0);
|
||||
|
||||
/* We are very paranoid here. With all means we try to ensure
|
||||
that we are actually opening the /dev/null device and nothing
|
||||
else.
|
||||
@@ -57,13 +71,11 @@ check_one_fd (int fd, int mode)
|
||||
Note that the following code assumes that STDIN_FILENO,
|
||||
STDOUT_FILENO, STDERR_FILENO are the three lowest file
|
||||
decsriptor numbers, in this order. */
|
||||
struct stat64 st;
|
||||
if (__builtin_expect (nullfd != fd, 0)
|
||||
|| __builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) != 0
|
||||
|| __builtin_expect (S_ISCHR (st.st_mode), 1) == 0
|
||||
#if defined DEV_NULL_MAJOR && defined DEV_NULL_MINOR
|
||||
|| st.st_rdev != makedev (DEV_NULL_MAJOR, DEV_NULL_MINOR)
|
||||
#endif
|
||||
)
|
||||
|| st.st_rdev != dev)
|
||||
/* We cannot even give an error message here since it would
|
||||
run into the same problems. */
|
||||
while (1)
|
||||
@@ -84,7 +96,7 @@ __libc_check_standard_fds (void)
|
||||
# define O_NOFOLLOW 0
|
||||
#endif
|
||||
/* Check all three standard file descriptors. */
|
||||
check_one_fd (STDIN_FILENO, O_RDONLY | O_NOFOLLOW);
|
||||
check_one_fd (STDOUT_FILENO, O_RDWR | O_NOFOLLOW);
|
||||
check_one_fd (STDERR_FILENO, O_RDWR | O_NOFOLLOW);
|
||||
check_one_fd (STDIN_FILENO, O_WRONLY | O_NOFOLLOW);
|
||||
check_one_fd (STDOUT_FILENO, O_RDONLY | O_NOFOLLOW);
|
||||
check_one_fd (STDERR_FILENO, O_RDONLY | O_NOFOLLOW);
|
||||
}
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2005 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
|
||||
@@ -18,4 +18,5 @@
|
||||
|
||||
/* We have to define __dso_handle ourselves since we do not use gcc's
|
||||
crtbegin files. */
|
||||
void *__dso_handle __attribute__ ((__visibility__ ("hidden"))) = &__dso_handle;
|
||||
const void *const __dso_handle __attribute__ ((__visibility__ ("hidden")))
|
||||
= &__dso_handle;
|
||||
|
||||
+38
-21
@@ -1,5 +1,5 @@
|
||||
/* Startup support for ELF initializers/finalizers in the main executable.
|
||||
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -36,16 +36,37 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef HAVE_INITFINI_ARRAY
|
||||
|
||||
/* These magic symbols are provided by the linker. */
|
||||
extern void (*__preinit_array_start []) (void) attribute_hidden;
|
||||
extern void (*__preinit_array_end []) (void) attribute_hidden;
|
||||
extern void (*__init_array_start []) (void) attribute_hidden;
|
||||
extern void (*__init_array_end []) (void) attribute_hidden;
|
||||
extern void (*__preinit_array_start []) (int, char **, char **)
|
||||
attribute_hidden;
|
||||
extern void (*__preinit_array_end []) (int, char **, char **)
|
||||
attribute_hidden;
|
||||
extern void (*__init_array_start []) (int, char **, char **)
|
||||
attribute_hidden;
|
||||
extern void (*__init_array_end []) (int, char **, char **)
|
||||
attribute_hidden;
|
||||
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. */
|
||||
extern void _init (void);
|
||||
@@ -57,43 +78,39 @@ extern void _fini (void);
|
||||
the libc.a module in that it doesn't call the preinit array. */
|
||||
|
||||
void
|
||||
__libc_csu_init (void)
|
||||
__libc_csu_init (int argc, char **argv, char **envp)
|
||||
{
|
||||
#ifdef HAVE_INITFINI_ARRAY
|
||||
/* For dynamically linked executables the preinit array is executed by
|
||||
the dynamic linker (before initializing any shared object. */
|
||||
|
||||
# ifndef LIBC_NONSHARED
|
||||
#ifndef LIBC_NONSHARED
|
||||
/* For static executables, preinit happens rights before init. */
|
||||
{
|
||||
const size_t size = __preinit_array_end - __preinit_array_start;
|
||||
size_t i;
|
||||
for (i = 0; i < size; i++)
|
||||
(*__preinit_array_start [i]) ();
|
||||
(*__preinit_array_start [i]) (argc, argv, envp);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
_init ();
|
||||
|
||||
#ifdef HAVE_INITFINI_ARRAY
|
||||
{
|
||||
const size_t size = __init_array_end - __init_array_start;
|
||||
size_t i;
|
||||
for (i = 0; i < size; i++)
|
||||
(*__init_array_start [i]) ();
|
||||
}
|
||||
#endif
|
||||
const size_t size = __init_array_end - __init_array_start;
|
||||
for (size_t i = 0; i < size; i++)
|
||||
(*__init_array_start [i]) (argc, argv, envp);
|
||||
}
|
||||
|
||||
/* This function should not be used anymore. We run the executable's
|
||||
destructor now just like any other. We cannot remove the function,
|
||||
though. */
|
||||
void
|
||||
__libc_csu_fini (void)
|
||||
{
|
||||
#ifdef HAVE_INITFINI_ARRAY
|
||||
#ifndef LIBC_NONSHARED
|
||||
size_t i = __fini_array_end - __fini_array_start;
|
||||
while (i-- > 0)
|
||||
(*__fini_array_start [i]) ();
|
||||
#endif
|
||||
|
||||
_fini ();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/* MT support function to get address of `errno' variable, non-threaded
|
||||
version.
|
||||
Copyright (C) 1996, 1998, 2002, 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 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 <tls.h>
|
||||
|
||||
#if ! USE___THREAD && !RTLD_PRIVATE_ERRNO
|
||||
#undef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
int *
|
||||
#if ! USE___THREAD
|
||||
weak_const_function
|
||||
#endif
|
||||
__errno_location (void)
|
||||
{
|
||||
return &errno;
|
||||
}
|
||||
libc_hidden_def (__errno_location)
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/* Definition of `errno' variable. Canonical version.
|
||||
Copyright (C) 2002, 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 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 <tls.h>
|
||||
#include <dl-sysdep.h>
|
||||
#undef errno
|
||||
|
||||
#if RTLD_PRIVATE_ERRNO
|
||||
|
||||
/* Code compiled for rtld refers only to this name. */
|
||||
int rtld_errno attribute_hidden;
|
||||
|
||||
#elif USE___THREAD
|
||||
|
||||
__thread int errno;
|
||||
extern __thread int __libc_errno __attribute__ ((alias ("errno")))
|
||||
attribute_hidden;
|
||||
|
||||
#else
|
||||
|
||||
/* This differs from plain `int errno;' in that it doesn't create
|
||||
a common definition, but a plain symbol that resides in .bss,
|
||||
which can have an alias. */
|
||||
int errno __attribute__ ((nocommon));
|
||||
strong_alias (errno, _errno)
|
||||
|
||||
/* We declare these with compat_symbol so that they are not visible at
|
||||
link time. Programs must use the accessor functions. RTLD is special,
|
||||
since it's not exported from there at any time. */
|
||||
# if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
|
||||
# include <shlib-compat.h>
|
||||
compat_symbol (libc, errno, errno, GLIBC_2_0);
|
||||
compat_symbol (libc, _errno, _errno, GLIBC_2_0);
|
||||
# endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,263 @@
|
||||
/* Copyright (C) 1998-2003, 2004, 2005 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; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <ldsodefs.h>
|
||||
#include <bp-start.h>
|
||||
#include <bp-sym.h>
|
||||
|
||||
extern void __libc_init_first (int argc, char **argv, char **envp);
|
||||
|
||||
extern int __libc_multiple_libcs;
|
||||
|
||||
#include <tls.h>
|
||||
#ifndef SHARED
|
||||
# include <dl-osinfo.h>
|
||||
extern void __pthread_initialize_minimal (void)
|
||||
# if !(USE_TLS - 0) && !defined NONTLS_INIT_TP
|
||||
__attribute__ ((weak))
|
||||
# endif
|
||||
;
|
||||
# ifndef THREAD_SET_STACK_GUARD
|
||||
/* Only exported for architectures that don't store the stack guard canary
|
||||
in thread local area. */
|
||||
uintptr_t __stack_chk_guard attribute_relro;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PTR_NTHREADS
|
||||
/* We need atomic operations. */
|
||||
# include <atomic.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LIBC_START_MAIN
|
||||
# ifdef LIBC_START_DISABLE_INLINE
|
||||
# define STATIC static
|
||||
# else
|
||||
# define STATIC static inline __attribute__ ((always_inline))
|
||||
# endif
|
||||
#else
|
||||
# define STATIC
|
||||
# define LIBC_START_MAIN BP_SYM (__libc_start_main)
|
||||
#endif
|
||||
|
||||
#ifdef MAIN_AUXVEC_ARG
|
||||
/* main gets passed a pointer to the auxiliary. */
|
||||
# define MAIN_AUXVEC_DECL , void *
|
||||
# define MAIN_AUXVEC_PARAM , auxvec
|
||||
#else
|
||||
# define MAIN_AUXVEC_DECL
|
||||
# define MAIN_AUXVEC_PARAM
|
||||
#endif
|
||||
|
||||
STATIC int LIBC_START_MAIN (int (*main) (int, char **, char **
|
||||
MAIN_AUXVEC_DECL),
|
||||
int argc,
|
||||
char *__unbounded *__unbounded ubp_av,
|
||||
#ifdef LIBC_START_MAIN_AUXVEC_ARG
|
||||
ElfW(auxv_t) *__unbounded auxvec,
|
||||
#endif
|
||||
__typeof (main) init,
|
||||
void (*fini) (void),
|
||||
void (*rtld_fini) (void),
|
||||
void *__unbounded stack_end)
|
||||
__attribute__ ((noreturn));
|
||||
|
||||
|
||||
/* Note: the fini parameter is ignored here for shared library. It
|
||||
is registered with __cxa_atexit. This had the disadvantage that
|
||||
finalizers were called in more than one place. */
|
||||
STATIC int
|
||||
LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
|
||||
int argc, char *__unbounded *__unbounded ubp_av,
|
||||
#ifdef LIBC_START_MAIN_AUXVEC_ARG
|
||||
ElfW(auxv_t) *__unbounded auxvec,
|
||||
#endif
|
||||
__typeof (main) init,
|
||||
void (*fini) (void),
|
||||
void (*rtld_fini) (void), void *__unbounded stack_end)
|
||||
{
|
||||
#if __BOUNDED_POINTERS__
|
||||
char **argv;
|
||||
#else
|
||||
# define argv ubp_av
|
||||
#endif
|
||||
|
||||
/* Result of the 'main' function. */
|
||||
int result;
|
||||
|
||||
__libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up;
|
||||
|
||||
#ifndef SHARED
|
||||
char *__unbounded *__unbounded ubp_ev = &ubp_av[argc + 1];
|
||||
|
||||
INIT_ARGV_and_ENVIRON;
|
||||
|
||||
/* Store the lowest stack address. This is done in ld.so if this is
|
||||
the code for the DSO. */
|
||||
__libc_stack_end = stack_end;
|
||||
|
||||
# ifdef HAVE_AUX_VECTOR
|
||||
/* First process the auxiliary vector since we need to find the
|
||||
program header to locate an eventually present PT_TLS entry. */
|
||||
# ifndef LIBC_START_MAIN_AUXVEC_ARG
|
||||
ElfW(auxv_t) *__unbounded auxvec;
|
||||
{
|
||||
char *__unbounded *__unbounded evp = ubp_ev;
|
||||
while (*evp++ != NULL)
|
||||
;
|
||||
auxvec = (ElfW(auxv_t) *__unbounded) evp;
|
||||
}
|
||||
# endif
|
||||
_dl_aux_init (auxvec);
|
||||
# endif
|
||||
# ifdef DL_SYSDEP_OSCHECK
|
||||
if (!__libc_multiple_libcs)
|
||||
{
|
||||
/* This needs to run to initiliaze _dl_osversion before TLS
|
||||
setup might check it. */
|
||||
DL_SYSDEP_OSCHECK (__libc_fatal);
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Initialize the thread library at least a bit since the libgcc
|
||||
functions are using thread functions if these are available and
|
||||
we need to setup errno. If there is no thread library and we
|
||||
handle TLS the function is defined in the libc to initialized the
|
||||
TLS handling. */
|
||||
# if !(USE_TLS - 0) && !defined NONTLS_INIT_TP
|
||||
if (__pthread_initialize_minimal)
|
||||
# endif
|
||||
__pthread_initialize_minimal ();
|
||||
#endif
|
||||
|
||||
# ifndef SHARED
|
||||
/* Set up the stack checker's canary. */
|
||||
uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
|
||||
# ifdef THREAD_SET_STACK_GUARD
|
||||
THREAD_SET_STACK_GUARD (stack_chk_guard);
|
||||
# else
|
||||
__stack_chk_guard = stack_chk_guard;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Register the destructor of the dynamic linker if there is any. */
|
||||
if (__builtin_expect (rtld_fini != NULL, 1))
|
||||
__cxa_atexit ((void (*) (void *)) rtld_fini, NULL, NULL);
|
||||
|
||||
#ifndef SHARED
|
||||
/* Call the initializer of the libc. This is only needed here if we
|
||||
are compiling for the static library in which case we haven't
|
||||
run the constructors in `_dl_start_user'. */
|
||||
__libc_init_first (argc, argv, __environ);
|
||||
|
||||
/* Register the destructor of the program, if any. */
|
||||
if (fini)
|
||||
__cxa_atexit ((void (*) (void *)) fini, NULL, NULL);
|
||||
|
||||
/* Some security at this point. Prevent starting a SUID binary where
|
||||
the standard file descriptors are not opened. We have to do this
|
||||
only for statically linked applications since otherwise the dynamic
|
||||
loader did the work already. */
|
||||
if (__builtin_expect (__libc_enable_secure, 0))
|
||||
__libc_check_standard_fds ();
|
||||
#endif
|
||||
|
||||
/* Call the initializer of the program, if any. */
|
||||
#ifdef SHARED
|
||||
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
|
||||
GLRO(dl_debug_printf) ("\ninitialize program: %s\n\n", argv[0]);
|
||||
#endif
|
||||
if (init)
|
||||
(*init) (argc, argv, __environ MAIN_AUXVEC_PARAM);
|
||||
|
||||
#ifdef SHARED
|
||||
/* Auditing checkpoint: we have a new object. */
|
||||
if (__builtin_expect (GLRO(dl_naudit) > 0, 0))
|
||||
{
|
||||
struct audit_ifaces *afct = GLRO(dl_audit);
|
||||
struct link_map *head = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
|
||||
for (unsigned int cnt = 0; cnt < GLRO(dl_naudit); ++cnt)
|
||||
{
|
||||
if (afct->preinit != NULL)
|
||||
afct->preinit (&head->l_audit[cnt].cookie);
|
||||
|
||||
afct = afct->next;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SHARED
|
||||
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
|
||||
GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CLEANUP_JMP_BUF
|
||||
/* Memory for the cancellation buffer. */
|
||||
struct pthread_unwind_buf unwind_buf;
|
||||
|
||||
int not_first_call;
|
||||
not_first_call = setjmp ((struct __jmp_buf_tag *) unwind_buf.cancel_jmp_buf);
|
||||
if (__builtin_expect (! not_first_call, 1))
|
||||
{
|
||||
struct pthread *self = THREAD_SELF;
|
||||
|
||||
/* Store old info. */
|
||||
unwind_buf.priv.data.prev = THREAD_GETMEM (self, cleanup_jmp_buf);
|
||||
unwind_buf.priv.data.cleanup = THREAD_GETMEM (self, cleanup);
|
||||
|
||||
/* Store the new cleanup handler info. */
|
||||
THREAD_SETMEM (self, cleanup_jmp_buf, &unwind_buf);
|
||||
|
||||
/* Run the program. */
|
||||
result = main (argc, argv, __environ MAIN_AUXVEC_PARAM);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Remove the thread-local data. */
|
||||
# ifdef SHARED
|
||||
__libc_pthread_functions.ptr__nptl_deallocate_tsd ();
|
||||
# else
|
||||
extern void __nptl_deallocate_tsd (void) __attribute ((weak));
|
||||
__nptl_deallocate_tsd ();
|
||||
# endif
|
||||
|
||||
/* One less thread. Decrement the counter. If it is zero we
|
||||
terminate the entire process. */
|
||||
result = 0;
|
||||
# ifdef SHARED
|
||||
unsigned int *const ptr = __libc_pthread_functions.ptr_nthreads;
|
||||
# else
|
||||
extern unsigned int __nptl_nthreads __attribute ((weak));
|
||||
unsigned int *const ptr = &__nptl_nthreads;
|
||||
# endif
|
||||
|
||||
if (! atomic_decrement_and_test (ptr))
|
||||
/* Not much left to do but to exit the thread, not the process. */
|
||||
__exit_thread (0);
|
||||
}
|
||||
#else
|
||||
/* Nothing fancy, just call the function. */
|
||||
result = main (argc, argv, __environ MAIN_AUXVEC_PARAM);
|
||||
#endif
|
||||
|
||||
exit (result);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Initialization code for TLS in statically linked application.
|
||||
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003, 2004, 2005 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
|
||||
@@ -34,8 +34,7 @@ extern ElfW(Phdr) *_dl_phdr;
|
||||
extern size_t _dl_phnum;
|
||||
|
||||
|
||||
/* DTV with just one element plus overhead. */
|
||||
static dtv_t static_dtv[3];
|
||||
static dtv_t static_dtv[2 + TLS_SLOTINFO_SURPLUS];
|
||||
|
||||
|
||||
static struct
|
||||
@@ -61,8 +60,9 @@ bool _dl_tls_dtv_gaps;
|
||||
struct dtv_slotinfo_list *_dl_tls_dtv_slotinfo_list;
|
||||
/* Number of modules in the static TLS block. */
|
||||
size_t _dl_tls_static_nelem;
|
||||
/* Size of the static TLS block. */
|
||||
size_t _dl_tls_static_size;
|
||||
/* Size of the static TLS block. Giving this initialized value
|
||||
preallocates some surplus bytes in the static TLS area. */
|
||||
size_t _dl_tls_static_size = 2048;
|
||||
/* Size actually allocated in the static TLS block. */
|
||||
size_t _dl_tls_static_used;
|
||||
/* Alignment requirement of the static TLS block. */
|
||||
@@ -134,17 +134,6 @@ __libc_setup_tls (size_t tcbsize, size_t tcbalign)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef TLS_INIT_TP_EXPENSIVE
|
||||
if (memsz == 0 && tcbsize <= TLS_INIT_TCB_SIZE)
|
||||
{
|
||||
/* We do not need a TLS block and no thread descriptor. */
|
||||
# ifdef NONTLS_INIT_TP
|
||||
NONTLS_INIT_TP;
|
||||
# endif
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* We have to set up the TCB block which also (possibly) contains
|
||||
'errno'. Therefore we avoid 'malloc' which might touch 'errno'.
|
||||
Instead we use 'sbrk' which would only uses 'errno' if it fails.
|
||||
@@ -173,22 +162,23 @@ __libc_setup_tls (size_t tcbsize, size_t tcbalign)
|
||||
& ~(max_align - 1));
|
||||
|
||||
/* Initialize the dtv. [0] is the length, [1] the generation counter. */
|
||||
static_dtv[0].counter = 1;
|
||||
static_dtv[0].counter = (sizeof (static_dtv) / sizeof (static_dtv[0])) - 2;
|
||||
// static_dtv[1].counter = 0; would be needed if not already done
|
||||
|
||||
/* Initialize the TLS block. */
|
||||
# if TLS_TCB_AT_TP
|
||||
static_dtv[2].pointer = ((char *) tlsblock + tcb_offset
|
||||
- roundup (memsz, align ?: 1));
|
||||
static_dtv[2].pointer.val = ((char *) tlsblock + tcb_offset
|
||||
- roundup (memsz, align ?: 1));
|
||||
static_map.l_tls_offset = roundup (memsz, align ?: 1);
|
||||
# elif TLS_DTV_AT_TP
|
||||
static_dtv[2].pointer = (char *) tlsblock + tcb_offset;
|
||||
static_dtv[2].pointer.val = (char *) tlsblock + tcb_offset;
|
||||
static_map.l_tls_offset = tcb_offset;
|
||||
# else
|
||||
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
|
||||
# endif
|
||||
static_dtv[2].pointer.is_static = true;
|
||||
/* sbrk gives us zero'd memory, so we don't need to clear the remainder. */
|
||||
memcpy (static_dtv[2].pointer, initimage, filesz);
|
||||
memcpy (static_dtv[2].pointer.val, initimage, filesz);
|
||||
|
||||
/* Install the pointer to the dtv. */
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
/* Copyright (C) 1991, 1995, 1997, 2000 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; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
EXTERNS
|
||||
|
||||
void
|
||||
__libc_init (int argc, char **argv, char **envp)
|
||||
{
|
||||
CALLS
|
||||
|
||||
#ifdef HAVE_INITFINI
|
||||
{
|
||||
/* These functions are defined in crti.o to run the .init and .fini
|
||||
sections, which are used for initializers and finalizers. */
|
||||
extern void _init (void), _fini (void);
|
||||
atexit (&_fini); /* Arrange for _fini to run at exit. */
|
||||
_init ();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
BEGIN { special = 0 }
|
||||
|
||||
/EXTERNS/ { ndirs = split(subdirs, dirs)
|
||||
for (i = 1; i <= ndirs; ++i)
|
||||
printf "extern void __init_%s (int argc, char **argv, char **envp);\n", dirs[i]
|
||||
special = 1 }
|
||||
/CALLS/ { ndirs = split(subdirs, dirs)
|
||||
for (i = 1; i <= ndirs; ++i) printf " __init_%s (argc, argv, envp);\n", dirs[i]
|
||||
special = 1 }
|
||||
|
||||
{ if (special == 0) print $0; special = 0 }
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1992-2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992-2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -25,7 +25,7 @@ static const char __libc_version[] = VERSION;
|
||||
|
||||
static const char banner[] =
|
||||
"GNU C Library "RELEASE" release version "VERSION", by Roland McGrath et al.\n\
|
||||
Copyright (C) 2004 Free Software Foundation, Inc.\n\
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.\n\
|
||||
This is free software; see the source for copying conditions.\n\
|
||||
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
|
||||
PARTICULAR PURPOSE.\n\
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,1997,1999,2000,2002,2005 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
|
||||
@@ -20,9 +20,9 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#define __ctype_tolower \
|
||||
((uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128)
|
||||
((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128)
|
||||
#define __ctype_toupper \
|
||||
((uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128)
|
||||
((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128)
|
||||
|
||||
/* Real function versions of the non-ANSI ctype functions. isblank is
|
||||
now in ISO C99 but we leave it here. */
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
localedata
|
||||
+60
-5
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1998-2001,2004,2005,2006 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
|
||||
@@ -24,11 +24,63 @@ subdir := debug
|
||||
headers := execinfo.h
|
||||
distribute = sigcontextinfo.h register-dump.h frame.h
|
||||
|
||||
routines := backtrace backtracesyms backtracesymsfd noophooks
|
||||
routines = backtrace backtracesyms backtracesymsfd noophooks \
|
||||
memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \
|
||||
strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \
|
||||
sprintf_chk vsprintf_chk snprintf_chk vsnprintf_chk \
|
||||
printf_chk fprintf_chk vprintf_chk vfprintf_chk \
|
||||
gets_chk chk_fail readonly-area fgets_chk fgets_u_chk \
|
||||
read_chk pread_chk pread64_chk recv_chk recvfrom_chk \
|
||||
readlink_chk readlinkat_chk getwd_chk getcwd_chk \
|
||||
realpath_chk ptsname_r_chk \
|
||||
wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk \
|
||||
wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk \
|
||||
wcpncpy_chk \
|
||||
swprintf_chk vswprintf_chk wprintf_chk fwprintf_chk \
|
||||
vwprintf_chk vfwprintf_chk fgetws_chk fgetws_u_chk \
|
||||
confstr_chk getgroups_chk ttyname_r_chk getlogin_r_chk \
|
||||
gethostname_chk getdomainname_chk wcrtomb_chk mbsnrtowcs_chk \
|
||||
wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk \
|
||||
wcstombs_chk \
|
||||
stack_chk_fail \
|
||||
$(static-only-routines)
|
||||
static-only-routines := warning-nop stack_chk_fail_local
|
||||
|
||||
CFLAGS-backtrace.c = -fno-omit-frame-pointer
|
||||
CFLAGS-sprintf_chk.c = -D_IO_MTSAFE_IO
|
||||
CFLAGS-snprintf_chk.c = -D_IO_MTSAFE_IO
|
||||
CFLAGS-vsprintf_chk.c = -D_IO_MTSAFE_IO
|
||||
CFLAGS-vsnprintf_chk.c = -D_IO_MTSAFE_IO
|
||||
CFLAGS-printf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-fprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-vprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-vfprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-gets_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-fgets_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-fgets_u_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-swprintf_chk.c = -D_IO_MTSAFE_IO
|
||||
CFLAGS-vswprintf_chk.c = -D_IO_MTSAFE_IO
|
||||
CFLAGS-wprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-fwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-vwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-vfwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-fgetws_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-fgetws_u_chk.c = -D_IO_MTSAFE_IO $(exceptions)
|
||||
CFLAGS-read_chk.c = -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-pread_chk.c = -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-pread64_chk.c = -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-recv_chk.c = -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-recvfrom_chk.c = -fexceptions -fasynchronous-unwind-tables
|
||||
|
||||
tests = backtrace-tst
|
||||
tst-chk1-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
tst-chk2-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
tst-chk3-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
tst-lfschk1-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
tst-lfschk2-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
tst-lfschk3-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
|
||||
tests = backtrace-tst tst-chk1 tst-chk2 tst-chk3 \
|
||||
tst-lfschk1 tst-lfschk2 tst-lfschk3 test-strcpy_chk test-stpcpy_chk
|
||||
|
||||
extra-libs = libSegFault libpcprofile
|
||||
extra-libs-others = $(extra-libs)
|
||||
@@ -55,9 +107,12 @@ generated = catchsegv xtrace
|
||||
|
||||
include ../Rules
|
||||
|
||||
sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,')
|
||||
|
||||
$(objpfx)catchsegv: catchsegv.sh $(common-objpfx)soversions.mk \
|
||||
$(common-objpfx)config.make
|
||||
sed -e 's|@VERSION@|$(version)|' -e 's|@SLIB@|$(slibdir)|' $< > $@.new
|
||||
slibpfx=`echo $(slibdir)|sed 's/lib\(64\|\)$$/\\\\\\\\$$LIB/'`; \
|
||||
sed -e 's|@VERSION@|$(version)|' -e "s|@SLIB@|$$slibpfx|" $< > $@.new
|
||||
chmod 555 $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
@@ -66,7 +121,7 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
|
||||
$(objpfx)xtrace: xtrace.sh
|
||||
rm -f $@.new
|
||||
sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
|
||||
-e 's|@SLIBDIR@|$(slibdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \
|
||||
-e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \
|
||||
&& rm -f $@ && mv $@.new $@ && chmod +x $@
|
||||
|
||||
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
||||
|
||||
@@ -10,4 +10,33 @@ libc {
|
||||
# These are to support some gcc features.
|
||||
__cyg_profile_func_enter; __cyg_profile_func_exit;
|
||||
}
|
||||
GLIBC_2.3.4 {
|
||||
__chk_fail;
|
||||
__memcpy_chk; __memmove_chk; __mempcpy_chk; __memset_chk; __stpcpy_chk;
|
||||
__strcat_chk; __strcpy_chk; __strncat_chk; __strncpy_chk;
|
||||
__sprintf_chk; __vsprintf_chk; __snprintf_chk; __vsnprintf_chk;
|
||||
__printf_chk; __fprintf_chk; __vprintf_chk; __vfprintf_chk;
|
||||
__gets_chk;
|
||||
}
|
||||
GLIBC_2.4 {
|
||||
__fgets_chk; __fgets_unlocked_chk;
|
||||
__read_chk; __pread_chk; __pread64_chk;
|
||||
__readlink_chk; __getcwd_chk; __getwd_chk;
|
||||
__recv_chk; __recvfrom_chk;
|
||||
__realpath_chk; __ptsname_r_chk; __wctomb_chk;
|
||||
__stpncpy_chk;
|
||||
__wcscpy_chk; __wmemcpy_chk; __wmemmove_chk; __wmempcpy_chk; __wcpcpy_chk;
|
||||
__wcsncpy_chk; __wcscat_chk; __wcsncat_chk; __wmemset_chk; __wcpncpy_chk;
|
||||
__swprintf_chk; __vswprintf_chk; __wprintf_chk; __fwprintf_chk;
|
||||
__vwprintf_chk; __vfwprintf_chk; __fgetws_chk; __fgetws_unlocked_chk;
|
||||
__confstr_chk; __getgroups_chk; __ttyname_r_chk; __getlogin_r_chk;
|
||||
__gethostname_chk; __getdomainname_chk; __wcrtomb_chk; __mbsnrtowcs_chk;
|
||||
__wcsnrtombs_chk; __mbsrtowcs_chk; __wcsrtombs_chk; __mbstowcs_chk;
|
||||
__wcstombs_chk;
|
||||
|
||||
__stack_chk_fail;
|
||||
}
|
||||
GLIBC_2.5 {
|
||||
__readlinkat_chk;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Return backtrace of current program state. Generic version.
|
||||
Copyright (C) 1998, 2000, 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 2000, 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||
|
||||
@@ -91,3 +91,4 @@ __backtrace (array, size)
|
||||
return cnt;
|
||||
}
|
||||
weak_alias (__backtrace, backtrace)
|
||||
libc_hidden_def (__backtrace)
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Write formatted list with names for addresses in backtrace to a file.
|
||||
Copyright (C) 1998, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 2003, 2005 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||
|
||||
@@ -61,3 +61,4 @@ __backtrace_symbols_fd (array, size, fd)
|
||||
}
|
||||
}
|
||||
weak_alias (__backtrace_symbols_fd, backtrace_symbols_fd)
|
||||
libc_hidden_def (__backtrace_symbols_fd)
|
||||
+5
-7
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1998,1999,2001,2003,2004,2006 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
# Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||
|
||||
@@ -39,7 +39,7 @@ if test $# -eq 0; then
|
||||
;;
|
||||
--v | --ve | --ver | --vers | --versi | --versio | --version)
|
||||
echo 'catchsegv (GNU libc) @VERSION@'
|
||||
echo 'Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
echo 'Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
Written by Ulrich Drepper.'
|
||||
@@ -50,9 +50,7 @@ Written by Ulrich Drepper.'
|
||||
esac
|
||||
fi
|
||||
|
||||
segv_output=`basename "$prog"`.segv.$$
|
||||
# Make sure this output file does not exist.
|
||||
rm -f "$segv_output"
|
||||
segv_output=`mktemp ${TMPDIR:-/tmp}/segv_output.XXXXXX` || exit
|
||||
|
||||
# Redirect stderr to avoid termination message from shell.
|
||||
(exec 3>&2 2>/dev/null
|
||||
@@ -65,7 +63,7 @@ exval=$?
|
||||
# Check for output. Even if the program terminated correctly it might
|
||||
# be that a minor process (clone) failed. Therefore we do not check the
|
||||
# exit code.
|
||||
if test -f "$segv_output"; then
|
||||
if test -s "$segv_output"; then
|
||||
# The program caught a signal. The output is in the file with the
|
||||
# name we have in SEGFAULT_OUTPUT_NAME. In the output the names of
|
||||
# functions in shared objects are available, but names in the static
|
||||
@@ -102,7 +100,7 @@ if test -f "$segv_output"; then
|
||||
;;
|
||||
esac
|
||||
done)
|
||||
rm -f "$segv_output"
|
||||
fi
|
||||
rm -f "$segv_output"
|
||||
|
||||
exit $exval
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* Copyright (C) 2004, 2005 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; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
extern char **__libc_argv attribute_hidden;
|
||||
|
||||
void
|
||||
__attribute__ ((noreturn))
|
||||
__chk_fail (void)
|
||||
{
|
||||
/* The loop is added only to keep gcc happy. */
|
||||
while (1)
|
||||
__libc_message (2, "*** buffer overflow detected ***: %s terminated\n",
|
||||
__libc_argv[0] ?: "<unknown>");
|
||||
}
|
||||
libc_hidden_def (__chk_fail)
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@readhat.com>, 20055.
|
||||
|
||||
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 <unistd.h>
|
||||
|
||||
|
||||
size_t
|
||||
__confstr_chk (int name, char *buf, size_t len, size_t buflen)
|
||||
{
|
||||
if (__builtin_expect (buflen < len, 0))
|
||||
__chk_fail ();
|
||||
|
||||
return confstr (name, buf, len);
|
||||
}
|
||||
+3
-4
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1998, 1999, 2004, 2005 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -25,7 +25,7 @@ __BEGIN_DECLS
|
||||
|
||||
/* Store up to SIZE return address of the current program state in
|
||||
ARRAY and return the exact number of values stored. */
|
||||
extern int backtrace (void **__array, int __size) __THROW __nonnull ((1));
|
||||
extern int backtrace (void **__array, int __size) __nonnull ((1));
|
||||
|
||||
|
||||
/* Return names of functions from the backtrace list in ARRAY in a newly
|
||||
@@ -35,8 +35,7 @@ extern char **backtrace_symbols (void *__const *__array, int __size)
|
||||
|
||||
|
||||
/* This function is similar to backtrace_symbols() but it writes the result
|
||||
immediately to a file and can therefore also be used in situations where
|
||||
malloc() is not usable anymore. */
|
||||
immediately to a file. */
|
||||
extern void backtrace_symbols_fd (void *__const *__array, int __size, int __fd)
|
||||
__THROW __nonnull ((1));
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2005
|
||||
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; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link the code in this file with
|
||||
files compiled with a GNU compiler to produce an executable,
|
||||
that does not cause the resulting executable to be covered by
|
||||
the GNU Lesser General Public License. This exception does not
|
||||
however invalidate any other reasons why the executable file
|
||||
might be covered by the GNU Lesser General Public License.
|
||||
This exception applies to code released by its copyright holders
|
||||
in files containing the exception. */
|
||||
|
||||
#include "libioP.h"
|
||||
#include <stdio.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
char *
|
||||
__fgets_chk (buf, size, n, fp)
|
||||
char *buf;
|
||||
size_t size;
|
||||
int n;
|
||||
_IO_FILE *fp;
|
||||
{
|
||||
_IO_size_t count;
|
||||
char *result;
|
||||
CHECK_FILE (fp, NULL);
|
||||
if (n <= 0)
|
||||
return NULL;
|
||||
_IO_acquire_lock (fp);
|
||||
/* This is very tricky since a file descriptor may be in the
|
||||
non-blocking mode. The error flag doesn't mean much in this
|
||||
case. We return an error only when there is a new error. */
|
||||
int old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
|
||||
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
|
||||
count = INTUSE(_IO_getline) (fp, buf, MIN ((size_t) n - 1, size), '\n', 1);
|
||||
/* If we read in some bytes and errno is EAGAIN, that error will
|
||||
be reported for next read. */
|
||||
if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
|
||||
&& errno != EAGAIN))
|
||||
result = NULL;
|
||||
else if (count >= size)
|
||||
__chk_fail ();
|
||||
else
|
||||
{
|
||||
buf[count] = '\0';
|
||||
result = buf;
|
||||
}
|
||||
fp->_IO_file_flags |= old_error;
|
||||
_IO_release_lock (fp);
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2005
|
||||
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; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link the code in this file with
|
||||
files compiled with a GNU compiler to produce an executable,
|
||||
that does not cause the resulting executable to be covered by
|
||||
the GNU Lesser General Public License. This exception does not
|
||||
however invalidate any other reasons why the executable file
|
||||
might be covered by the GNU Lesser General Public License.
|
||||
This exception applies to code released by its copyright holders
|
||||
in files containing the exception. */
|
||||
|
||||
#include "libioP.h"
|
||||
#include <stdio.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
char *
|
||||
__fgets_unlocked_chk (buf, size, n, fp)
|
||||
char *buf;
|
||||
size_t size;
|
||||
int n;
|
||||
_IO_FILE *fp;
|
||||
{
|
||||
_IO_size_t count;
|
||||
char *result;
|
||||
CHECK_FILE (fp, NULL);
|
||||
if (n <= 0)
|
||||
return NULL;
|
||||
/* This is very tricky since a file descriptor may be in the
|
||||
non-blocking mode. The error flag doesn't mean much in this
|
||||
case. We return an error only when there is a new error. */
|
||||
int old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
|
||||
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
|
||||
count = INTUSE(_IO_getline) (fp, buf, MIN ((size_t) n - 1, size), '\n', 1);
|
||||
/* If we read in some bytes and errno is EAGAIN, that error will
|
||||
be reported for next read. */
|
||||
if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
|
||||
&& errno != EAGAIN))
|
||||
result = NULL;
|
||||
else if (count >= size)
|
||||
__chk_fail ();
|
||||
else
|
||||
{
|
||||
buf[count] = '\0';
|
||||
result = buf;
|
||||
}
|
||||
fp->_IO_file_flags |= old_error;
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2001, 2005
|
||||
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; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include "libioP.h"
|
||||
#include <wchar.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
wchar_t *
|
||||
__fgetws_chk (wchar_t *buf, size_t size, int n, _IO_FILE *fp)
|
||||
{
|
||||
_IO_size_t count;
|
||||
wchar_t *result;
|
||||
int old_error;
|
||||
CHECK_FILE (fp, NULL);
|
||||
if (n <= 0)
|
||||
return NULL;
|
||||
_IO_acquire_lock (fp);
|
||||
/* This is very tricky since a file descriptor may be in the
|
||||
non-blocking mode. The error flag doesn't mean much in this
|
||||
case. We return an error only when there is a new error. */
|
||||
old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
|
||||
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
|
||||
count = _IO_getwline (fp, buf, MIN ((size_t) n - 1, size), L'\n', 1);
|
||||
/* If we read in some bytes and errno is EAGAIN, that error will
|
||||
be reported for next read. */
|
||||
if (count == 0 || (_IO_ferror_unlocked (fp) && errno != EAGAIN))
|
||||
result = NULL;
|
||||
else if (count >= size)
|
||||
__chk_fail ();
|
||||
else
|
||||
{
|
||||
buf[count] = '\0';
|
||||
result = buf;
|
||||
}
|
||||
fp->_IO_file_flags |= old_error;
|
||||
_IO_release_lock (fp);
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Copyright (C) 1993, 95, 96, 97, 98, 99, 2005 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; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link the code in this file with
|
||||
files compiled with a GNU compiler to produce an executable,
|
||||
that does not cause the resulting executable to be covered by
|
||||
the GNU Lesser General Public License. This exception does not
|
||||
however invalidate any other reasons why the executable file
|
||||
might be covered by the GNU Lesser General Public License.
|
||||
This exception applies to code released by its copyright holders
|
||||
in files containing the exception. */
|
||||
|
||||
#include "libioP.h"
|
||||
#include <wchar.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
wchar_t *
|
||||
__fgetws_unlocked_chk (wchar_t *buf, size_t size, int n, _IO_FILE *fp)
|
||||
{
|
||||
_IO_size_t count;
|
||||
wchar_t *result;
|
||||
int old_error;
|
||||
CHECK_FILE (fp, NULL);
|
||||
if (n <= 0)
|
||||
return NULL;
|
||||
/* This is very tricky since a file descriptor may be in the
|
||||
non-blocking mode. The error flag doesn't mean much in this
|
||||
case. We return an error only when there is a new error. */
|
||||
old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
|
||||
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
|
||||
count = _IO_getwline (fp, buf, MIN ((size_t) n - 1, size), L'\n', 1);
|
||||
/* If we read in some bytes and errno is EAGAIN, that error will
|
||||
be reported for next read. */
|
||||
if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
|
||||
&& errno != EAGAIN))
|
||||
result = NULL;
|
||||
else if (count >= size)
|
||||
__chk_fail ();
|
||||
else
|
||||
{
|
||||
buf[count] = '\0';
|
||||
result = buf;
|
||||
}
|
||||
fp->_IO_file_flags |= old_error;
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2006
|
||||
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; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include "../libio/libioP.h"
|
||||
|
||||
|
||||
/* Write formatted output to FP from the format string FORMAT. */
|
||||
int
|
||||
___fprintf_chk (FILE *fp, int flag, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int done;
|
||||
|
||||
_IO_acquire_lock (fp);
|
||||
if (flag > 0)
|
||||
fp->_flags2 |= _IO_FLAGS2_FORTIFY;
|
||||
|
||||
va_start (ap, format);
|
||||
done = vfprintf (fp, format, ap);
|
||||
va_end (ap);
|
||||
|
||||
if (flag > 0)
|
||||
fp->_flags2 &= ~_IO_FLAGS2_FORTIFY;
|
||||
_IO_release_lock (fp);
|
||||
|
||||
return done;
|
||||
}
|
||||
ldbl_strong_alias (___fprintf_chk, __fprintf_chk)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user