mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-08 23:58:31 +08:00
Compare commits
409
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a92f117fec | ||
|
|
5b9ac69a65 | ||
|
|
654665b7c7 | ||
|
|
f0271955ec | ||
|
|
aa01a02424 | ||
|
|
620432767f | ||
|
|
752069ed74 | ||
|
|
b75d05951a | ||
|
|
104f19466b | ||
|
|
8c557d5e3e | ||
|
|
aff7685365 | ||
|
|
27bd4a1e78 | ||
|
|
0a5d42def7 | ||
|
|
4d3a95a6b6 | ||
|
|
fdc5571f25 | ||
|
|
0e04de001a | ||
|
|
5d42a4c2cc | ||
|
|
0ad9e46784 | ||
|
|
68b192d0dd | ||
|
|
c0a119316e | ||
|
|
ae2eaff13e | ||
|
|
6a5f96bfef | ||
|
|
98bec7469c | ||
|
|
4b4a00eb13 | ||
|
|
51b2586797 | ||
|
|
4e5f9db6ba | ||
|
|
6cfad51303 | ||
|
|
88c3891b7a | ||
|
|
2c606f0f92 | ||
|
|
62bb57925d | ||
|
|
f844eec463 | ||
|
|
0f1f93279b | ||
|
|
a83b0f09cb | ||
|
|
c6c955c542 | ||
|
|
9e1cbaf632 | ||
|
|
ee96242d57 | ||
|
|
db4703c178 | ||
|
|
6b280740cc | ||
|
|
22e8d11155 | ||
|
|
3ab24a1afb | ||
|
|
396e0415e4 | ||
|
|
3ff6d686a4 | ||
|
|
7f42b77318 | ||
|
|
9279ceae42 | ||
|
|
0ed18d6c0c | ||
|
|
f860dce906 | ||
|
|
7645b65271 | ||
|
|
079f7c691f | ||
|
|
00b97dc29c | ||
|
|
08ed359420 | ||
|
|
3090a1d9d9 | ||
|
|
ea72be0702 | ||
|
|
780f64dfed | ||
|
|
4360912968 | ||
|
|
57790ddd15 | ||
|
|
ae62f3fd1a | ||
|
|
a53b62005c | ||
|
|
4f81f15b9f | ||
|
|
caf512f51a | ||
|
|
f301b57542 | ||
|
|
ba11b11f3f | ||
|
|
6750d9b090 | ||
|
|
716a8a8a1a | ||
|
|
45ca822c29 | ||
|
|
5d08e3e8ab | ||
|
|
26753f62d6 | ||
|
|
48956dfd0f | ||
|
|
b7c667f2ff | ||
|
|
54a1813de5 | ||
|
|
402a46171b | ||
|
|
ae4b002f02 | ||
|
|
83817a84c3 | ||
|
|
09390d612a | ||
|
|
311e8a4a28 | ||
|
|
0d0f83ce42 | ||
|
|
12ef0fc101 | ||
|
|
6eb3b349ee | ||
|
|
c5b46a461f | ||
|
|
430896bd6a | ||
|
|
5dd4da2d24 | ||
|
|
f688a75efb | ||
|
|
7bd83db5a4 | ||
|
|
04c524c4b0 | ||
|
|
71584f8abc | ||
|
|
26765111ad | ||
|
|
066d68b563 | ||
|
|
65c0c1fd36 | ||
|
|
ee815d3f29 | ||
|
|
4be6b7a59e | ||
|
|
e4e9c3596e | ||
|
|
a67fb77b6b | ||
|
|
8bbe90f014 | ||
|
|
e13ea31465 | ||
|
|
b2cbddd0a4 | ||
|
|
ba8c210b3e | ||
|
|
bab0a98c67 | ||
|
|
758999db4f | ||
|
|
5346455569 | ||
|
|
8e619d6a10 | ||
|
|
e9e8bfe716 | ||
|
|
e2d554858b | ||
|
|
b9b2307456 | ||
|
|
fdd1a62962 | ||
|
|
e49ad9b365 | ||
|
|
5105c5e94b | ||
|
|
392ca57fdd | ||
|
|
b0d7c39e33 | ||
|
|
bb267dc296 | ||
|
|
1769a89be6 | ||
|
|
54cd01e24f | ||
|
|
7384dd3fbe | ||
|
|
51b221ee43 | ||
|
|
bff1832b2d | ||
|
|
70d7ddbbcc | ||
|
|
b7c5a468dc | ||
|
|
f9652c80ae | ||
|
|
39dbc7be16 | ||
|
|
dd5aac0f53 | ||
|
|
1452bbc1aa | ||
|
|
4a6fbb12f2 | ||
|
|
3cf9054816 | ||
|
|
fc8c13e9e1 | ||
|
|
3cfd9c9ac9 | ||
|
|
49d05ecd64 | ||
|
|
a0e78d4ebe | ||
|
|
da3b378848 | ||
|
|
14f82daac6 | ||
|
|
0c07dfee2c | ||
|
|
cdd3026022 | ||
|
|
f21e0750a8 | ||
|
|
f854c0566e | ||
|
|
b75f2c28f9 | ||
|
|
6393f70acb | ||
|
|
3d5a869794 | ||
|
|
12fc66d651 | ||
|
|
f1ecbef29e | ||
|
|
0c1ed45457 | ||
|
|
bf5806397a | ||
|
|
bf094836d8 | ||
|
|
0b67eee38b | ||
|
|
82bf05a0ce | ||
|
|
ea09d877ca | ||
|
|
aef475bc34 | ||
|
|
a0713d8d9b | ||
|
|
5bae2227b8 | ||
|
|
5703aac7be | ||
|
|
c9b41a4451 | ||
|
|
d78af38fec | ||
|
|
f958e42835 | ||
|
|
5e0fd15720 | ||
|
|
99f1dfad31 | ||
|
|
d33c4d286a | ||
|
|
7f0ddd1987 | ||
|
|
9359e4cbf3 | ||
|
|
72de2dcd21 | ||
|
|
ab8080455c | ||
|
|
f1698e08cc | ||
|
|
b8a7384521 | ||
|
|
d97aad47e3 | ||
|
|
789a98d932 | ||
|
|
c075fbc99c | ||
|
|
eb0740ad73 | ||
|
|
9106c38136 | ||
|
|
5cb9ee6746 | ||
|
|
72b6c2b1c7 | ||
|
|
ffc30dcbea | ||
|
|
0043ae9883 | ||
|
|
477f40256e | ||
|
|
67c27119f8 | ||
|
|
f23649c50d | ||
|
|
2143456bb3 | ||
|
|
473167dcc7 | ||
|
|
9216338892 | ||
|
|
1559585ef1 | ||
|
|
dc0d0c616e | ||
|
|
16afa991d0 | ||
|
|
9ad114ad58 | ||
|
|
b0b60fc2f1 | ||
|
|
6a11e51e2c | ||
|
|
0f884de176 | ||
|
|
2c218fa5d9 | ||
|
|
3c0bfe141d | ||
|
|
58611c4757 | ||
|
|
6ad469c1c4 | ||
|
|
ca911f45cf | ||
|
|
a80f36629b | ||
|
|
133192c659 | ||
|
|
07e85a9e7e | ||
|
|
6c60c46fcd | ||
|
|
438171b5ba | ||
|
|
4a764e3d3b | ||
|
|
0b25d4905e | ||
|
|
2dd2b17df7 | ||
|
|
870eeeb6b2 | ||
|
|
582b8e86e0 | ||
|
|
bab280f93a | ||
|
|
4749ee6c81 | ||
|
|
1a1f354cd7 | ||
|
|
71e4ceb22b | ||
|
|
6f7922d89c | ||
|
|
a16d0942d7 | ||
|
|
fea444e4d2 | ||
|
|
797f8dc9d5 | ||
|
|
20ce139ac1 | ||
|
|
eb46a9a4e2 | ||
|
|
0af17c40df | ||
|
|
b9cec87760 | ||
|
|
98d289f6b6 | ||
|
|
f175ece367 | ||
|
|
a91b462b62 | ||
|
|
5e9e4d273d | ||
|
|
a7071cbe63 | ||
|
|
ceb4bfd63d | ||
|
|
1cb5fbec42 | ||
|
|
6cc0f29734 | ||
|
|
7ec30d5937 | ||
|
|
ae6f93ebf0 | ||
|
|
8fa5aed6e8 | ||
|
|
1d7d57a23c | ||
|
|
ec6bc3a6c1 | ||
|
|
c544156ecf | ||
|
|
14b1c93b79 | ||
|
|
03a5167722 | ||
|
|
d17c16a1c0 | ||
|
|
46139b3cfb | ||
|
|
ba18232742 | ||
|
|
d03cbf630d | ||
|
|
d9c42342a1 | ||
|
|
cfa805f954 | ||
|
|
c55caac80e | ||
|
|
46da0971fe | ||
|
|
c1691f4661 | ||
|
|
41e2d09648 | ||
|
|
d69e5f014e | ||
|
|
630ee40e92 | ||
|
|
637a638f30 | ||
|
|
0b4a289092 | ||
|
|
d6b95af8bb | ||
|
|
80e41ab46e | ||
|
|
f47163fad3 | ||
|
|
4bf5771c23 | ||
|
|
66284f47ac | ||
|
|
43e2ba6ef6 | ||
|
|
6227894ac9 | ||
|
|
fa8ceb1f2c | ||
|
|
2c44d7573c | ||
|
|
35d80b24e3 | ||
|
|
f6bf4da124 | ||
|
|
e22307c48b | ||
|
|
9ca318cc03 | ||
|
|
254249b29a | ||
|
|
288238a6ea | ||
|
|
5286bb7e27 | ||
|
|
94941d2212 | ||
|
|
257b878d90 | ||
|
|
0e6e45afa2 | ||
|
|
68c0fa52a2 | ||
|
|
ff48318555 | ||
|
|
daa5c348d6 | ||
|
|
b234e8652a | ||
|
|
2018d9e2ee | ||
|
|
b8d4e46167 | ||
|
|
f581e9ca08 | ||
|
|
0966931ed7 | ||
|
|
dd4831ce37 | ||
|
|
db7cdaaaa4 | ||
|
|
721869072d | ||
|
|
83bbbdd08c | ||
|
|
b44c1e14db | ||
|
|
18d41844f1 | ||
|
|
ea00844dfb | ||
|
|
59c37b6b21 | ||
|
|
f42bf1bcfa | ||
|
|
6718095b09 | ||
|
|
b41fb4250f | ||
|
|
7e165c9059 | ||
|
|
d4fff052ce | ||
|
|
22c4356832 | ||
|
|
6f69fa17e5 | ||
|
|
a23087343b | ||
|
|
ba2ccfa167 | ||
|
|
71c5289b0f | ||
|
|
1893ec6a38 | ||
|
|
e2f8a38f47 | ||
|
|
e16db41ba6 | ||
|
|
13babeb0d3 | ||
|
|
c424f2da59 | ||
|
|
cac34d519a | ||
|
|
b47d1816eb | ||
|
|
8fbe82ee26 | ||
|
|
dd23f3b0d6 | ||
|
|
3365152cb0 | ||
|
|
4b3769bc7c | ||
|
|
cf2b29bfe0 | ||
|
|
98e994340a | ||
|
|
f4a0465b69 | ||
|
|
1908c08641 | ||
|
|
31d7822815 | ||
|
|
9b5225b600 | ||
|
|
f13f1b26e4 | ||
|
|
967578d96c | ||
|
|
421dcdf3a9 | ||
|
|
87a5e8a7a4 | ||
|
|
a2a3fc55fd | ||
|
|
02f25bd59b | ||
|
|
c7b0194ac3 | ||
|
|
885ba00117 | ||
|
|
3cfcebc885 | ||
|
|
2047317f3b | ||
|
|
ac7c207f14 | ||
|
|
a18be620a1 | ||
|
|
177f9d5cd4 | ||
|
|
afc1d235b7 | ||
|
|
c293f9bc63 | ||
|
|
24ea71e942 | ||
|
|
79df061031 | ||
|
|
375676b1b6 | ||
|
|
94f1773041 | ||
|
|
77055d99e4 | ||
|
|
fb63ae13d0 | ||
|
|
44a09a3306 | ||
|
|
579749498e | ||
|
|
52cff2eeb6 | ||
|
|
94f8647f1c | ||
|
|
88f4537c77 | ||
|
|
32fff90d82 | ||
|
|
00aec83a30 | ||
|
|
ff046934fd | ||
|
|
31f43cffe0 | ||
|
|
4c2d948abe | ||
|
|
c5cb336b87 | ||
|
|
8d7899fbb6 | ||
|
|
bca9fd93a8 | ||
|
|
9f3168cf9a | ||
|
|
24a09ef771 | ||
|
|
f0427c13e4 | ||
|
|
347415b76e | ||
|
|
ff407b13b9 | ||
|
|
265ede2a16 | ||
|
|
1bdf7624dc | ||
|
|
95a5089d2f | ||
|
|
760f9f4cd0 | ||
|
|
3a1db3bf88 | ||
|
|
0b7f4318c0 | ||
|
|
3316c605ba | ||
|
|
aa8ecd3c01 | ||
|
|
d35ffac1c7 | ||
|
|
b1f911a801 | ||
|
|
5b2cfa7797 | ||
|
|
3967ae2f20 | ||
|
|
3a7c62f09a | ||
|
|
571286fe50 | ||
|
|
28b5b97f16 | ||
|
|
4db14580ca | ||
|
|
379091f89d | ||
|
|
a6a5f54f28 | ||
|
|
a06faff6c1 | ||
|
|
e3d3d6c990 | ||
|
|
00926c6660 | ||
|
|
2f54e18d8b | ||
|
|
eb3b8b2ea7 | ||
|
|
731640fc24 | ||
|
|
1f574fe0be | ||
|
|
1b4d62a18d | ||
|
|
ce328bf180 | ||
|
|
58f6951944 | ||
|
|
450867ffea | ||
|
|
992b2c400b | ||
|
|
6145c5ea69 | ||
|
|
e3f24cf1bf | ||
|
|
1217a671f4 | ||
|
|
8814d1a72e | ||
|
|
d730f1d27c | ||
|
|
2e12a92961 | ||
|
|
4f72518358 | ||
|
|
655fe31070 | ||
|
|
9652be3de8 | ||
|
|
7434ccadbb | ||
|
|
795fbc9aa1 | ||
|
|
00de59a632 | ||
|
|
7cc27f440c | ||
|
|
6952e59e25 | ||
|
|
1228ed5cd5 | ||
|
|
c0e4567461 | ||
|
|
19361cb768 | ||
|
|
56552e4257 | ||
|
|
831372e7c1 | ||
|
|
bdf289b222 | ||
|
|
33a934a3ab | ||
|
|
5b82669229 | ||
|
|
9d187dd4ad | ||
|
|
8d57beeab1 | ||
|
|
1ef32c3dc4 | ||
|
|
fd26970f33 | ||
|
|
f9c53d1159 | ||
|
|
9381196a94 | ||
|
|
0c5ecdc449 | ||
|
|
5290baf06c | ||
|
|
b51c27c032 | ||
|
|
038ebe2459 | ||
|
|
f94d25d4ee | ||
|
|
61c162b5bc | ||
|
|
2ca1375a22 | ||
|
|
df4ef2ab9c | ||
|
|
6f9e7002f3 | ||
|
|
3aaa074393 | ||
|
|
3e99cd6f00 | ||
|
|
4398fea0c2 | ||
|
|
6a6836233e |
+5
-1
@@ -4,7 +4,7 @@
|
||||
TODO COPYING* AUTHORS copyr-* copying.*
|
||||
glibc-*
|
||||
|
||||
configparms
|
||||
configparms
|
||||
|
||||
sun[43]* i[345]86* hp300*
|
||||
|
||||
@@ -13,3 +13,7 @@ ieeetest hppa-sysdeps regex
|
||||
gpl2lgpl.sed
|
||||
distinfo
|
||||
distinfo
|
||||
|
||||
crypt
|
||||
linuxthreads
|
||||
localedata
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
List of known bugs (certainly very incomplete)
|
||||
----------------------------------------------
|
||||
|
||||
Time-stamp: <1997-05-21T20:55:45+0200 drepper>
|
||||
|
||||
This following list contains those bugs which I'm aware of. Please
|
||||
make sure that bugs you report are not listed here. If you can fix one
|
||||
of these bugs/limitations I'll certainly be glad to receive a patch.
|
||||
|
||||
Another source of information about bugs is the problem data base of the
|
||||
GNU project. There is an easy to use WWW interface is available at
|
||||
|
||||
http://www-gnats.gnu.ai.mit.edu:8080/cgi-bin/wwwgnats.pl
|
||||
|
||||
I would appreciate it very much if you could verify the problem was not
|
||||
reported before by looking though the database. To make the information
|
||||
in this data as useful as possible please report bugs always using the
|
||||
`glibcbug' shell script which gets installed with GNU libc.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Severity: [ *] to [***]
|
||||
|
||||
|
||||
[ **] For GNU libc on Linux, there is still no solution for the UTMP
|
||||
problem. Two people are working on a possible solution.
|
||||
[Among others: PR libc/39]
|
||||
|
||||
[ **] There are problems with signal handling when using LinuxThreads.
|
||||
|
||||
[ **] The `cbrtl' function for ix86 does not work in the moment.
|
||||
|
||||
[ *] The precision of the `sinhl' and/or `asinhl' function do not seem
|
||||
to be the best.
|
||||
|
||||
[ *] The syslog function should print to the console if the LOG_CONS
|
||||
flag was given.
|
||||
[PR libc/72]
|
||||
|
||||
[ *] On Linux, the <linux/posix_types.h> is not clean enough to satisfy
|
||||
the C++ namespace rules. Declaring `struct fd_set' also makes
|
||||
`fd_set' available in the global namespace which conflicts with
|
||||
the definition of `fd_set' in glibc.
|
||||
[PR libc/79]
|
||||
|
||||
[ *] On Linux, there should be a way to prevent defining the symbol
|
||||
NGROUPS_MAX in the <linux/limits.h> header file. In glibc it
|
||||
is defined in <posix1_lim.h> which must not make the other
|
||||
symbols in <linux/limits.h> available.
|
||||
[PR libc/140]
|
||||
|
||||
[ *] The localedef program should interpret only the required categories
|
||||
addressed by `copy' statements. This especially means that limited
|
||||
character sets must not lead to errors if the LC_CTYPE category in
|
||||
the locale addressed by `copy' is not really used.
|
||||
|
||||
[ *] Statically linking with libpthread leads to strange warnings
|
||||
from the linker. I don't know why this happen so far.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Ulrich Drepper
|
||||
drepper@cygnus.com
|
||||
+10547
File diff suppressed because it is too large
Load Diff
@@ -74,6 +74,9 @@ please let me know.
|
||||
|
||||
[Q20] ``How can I compile gcc 2.7.2.1 from the gcc source code using
|
||||
glibc 2.x?
|
||||
|
||||
[Q21] ``On Linux I've got problems with the declarations in Linux
|
||||
kernel headers.''
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
[Q1] ``What systems does the GNU C Library run on?''
|
||||
@@ -260,7 +263,7 @@ incompatibilities:
|
||||
|
||||
* swapon(): the interface of this function didn't changed, but the
|
||||
prototype is in a separate header file <sys/swap.h>. For the additional
|
||||
argument of of swapon() you should use the SWAP_* constants from
|
||||
argument of swapon() you should use the SWAP_* constants from
|
||||
<linux/swap.h>, which get defined when <sys/swap.h> is included.
|
||||
|
||||
* errno: If a program uses variable "errno", then it _must_ include header
|
||||
@@ -298,6 +301,13 @@ incompatibilities:
|
||||
a separate library libresolv. If you find some symbols starting with
|
||||
`res_*' undefined simply add -lresolv to your call of the linker.
|
||||
|
||||
* the `signal' function's behaviour corresponds to the BSD semantic and
|
||||
not the SysV semantic as it was in libc-5. The interface on all GNU
|
||||
systems shall be the same and BSD is the semantic of choice. To use
|
||||
the SysV behaviour simply use `sysv_signal'. The major difference is
|
||||
that the SysV implementation sets the SA_ONESHOT flag and so the handler
|
||||
gets removed after the first call.
|
||||
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
[Q10] ``Why does getlogin() always return NULL on my Linux box?''
|
||||
@@ -365,10 +375,10 @@ catalog files to the XPG4 form:
|
||||
[Q13] ``How do I configure GNU libc so that the essential libraries
|
||||
like libc.so go into /lib and the other into /usr/lib?''
|
||||
|
||||
[A13] {UD} Like all other GNU packages GNU libc is configured to use a
|
||||
base directory and install all files relative to this. If you intend
|
||||
to really use GNU libc on your system this base directory is /usr. I.e.,
|
||||
you run
|
||||
[A13] {UD,AJ} Like all other GNU packages GNU libc is configured to
|
||||
use a base directory and install all files relative to this. If you
|
||||
intend to really use GNU libc on your system this base directory is
|
||||
/usr. I.e., you run
|
||||
configure --prefix=/usr <other_options>
|
||||
|
||||
Some systems like Linux have a filesystem standard which makes a
|
||||
@@ -378,10 +388,10 @@ located on the same disk partition as /. The /usr subtree might be
|
||||
found on another partition/disk.
|
||||
|
||||
To install the essential libraries which come with GNU libc in /lib
|
||||
one must explicitly tell this. Autoconf has no option for this so you
|
||||
have to use the file where all user supplied additional information
|
||||
should go in: `configparms' (see the `INSTALL' file). For Linux the
|
||||
`configparms' file should contain:
|
||||
one must explicitly tell this (except on Linux, see below). Autoconf
|
||||
has no option for this so you have to use the file where all user
|
||||
supplied additional information should go in: `configparms' (see the
|
||||
`INSTALL' file). Therefore the `configparms' file should contain:
|
||||
|
||||
slibdir=/lib
|
||||
sysconfdir=/etc
|
||||
@@ -390,6 +400,10 @@ The first line specifies the directory for the essential libraries,
|
||||
the second line the directory for file which are by tradition placed
|
||||
in a directory named /etc.
|
||||
|
||||
No rule without an exception: If you configure for Linux with
|
||||
--prefix=/usr, then slibdir and sysconfdir will automatically be
|
||||
defined as stated above.
|
||||
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
[Q14] ``When linking with the new libc I get unresolved symbols
|
||||
@@ -534,9 +548,10 @@ a different name: ld-linux.so.2. So you have to replace
|
||||
by
|
||||
%{!dynamic-linker:-dynamic-linker=/home/gnu/lib/ld.so.1}
|
||||
|
||||
in the above example specs file ti make it work for other systems.
|
||||
in the above example specs file to make it work for other systems.
|
||||
|
||||
Future versions of GCC will automatically provide the correct specs.
|
||||
Version 2.7.2.2 does and future versions of GCC will automatically
|
||||
provide the correct specs.
|
||||
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
@@ -554,12 +569,6 @@ something like this:
|
||||
GROUP ( libc.so.6 ld.so.1 libc.a )
|
||||
|
||||
|
||||
{UD} The Linux ldconfig file probably generates a link libc.so ->
|
||||
libc.so.6 in /lib. This is not correct. There must not be such a
|
||||
link. The linker script with the above contents is placed in
|
||||
/usr/lib which is enough for the linker.
|
||||
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
[Q18] ``The prototypes for `connect', `accept', `getsockopt',
|
||||
`setsockopt', `getsockname', `getpeername', `send',
|
||||
@@ -589,14 +598,42 @@ invalid. I.e., an emulated FPU is for the libc as good as a real one.
|
||||
[Q20] ``How can I compile gcc 2.7.2.1 from the gcc source code using
|
||||
glibc 2.x?
|
||||
|
||||
[A20] {HJL} There is no support in gcc for glibc 2.0 before gcc 2.8. It
|
||||
is very tricky to compile gcc 2.7.2.1 using glibc 2.x. You have to
|
||||
build it manually or with one pass only. You also have to use the
|
||||
specs file in this FAQ while compiling gcc.
|
||||
[A20] {AJ} There's only support for glibc 2.0 in gcc 2.7.2.2 or later.
|
||||
For 2.7.2.2 you should use the following patch and configure for
|
||||
e.g. i486-linux.
|
||||
-----------------------------------------------------------------------
|
||||
--- configure Tue Feb 11 15:57:17 1997
|
||||
+++ configure Wed Feb 12 23:09:29 1997
|
||||
@@ -1021,7 +1021,7 @@
|
||||
gnu_ld=yes
|
||||
# GNU libc version 2 does not supply these;
|
||||
# we want them from GCC.
|
||||
- extra_parts="crtbegin.o crtend.o"
|
||||
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
;;
|
||||
i[3456]86-go32-msdos | i[3456]86-*-go32)
|
||||
cpu_type=i386
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
A pre-compiled binary version of gcc 2.7.2.1 linked with glibc 2.x for
|
||||
Linux/x86 is available in the same directory at the glibc 2.x source
|
||||
code ftp sites.
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
[Q21] ``On Linux I've got problems with the declarations in Linux
|
||||
kernel headers.''
|
||||
|
||||
[A21] {UD,AJ} On Linux, the use of kernel headers is reduced to a very
|
||||
minimum. Besides giving Linus the possibility to change the headers
|
||||
more freely it has another reason: user level programs now do not
|
||||
always use the same types like the kernel does.
|
||||
|
||||
I.e., the libc abstracts the use of types. E.g., the sigset_t type is
|
||||
in the kernel 32 or 64 bits wide. In glibc it is 1024 bits wide, in
|
||||
preparation for future development. The reasons are obvious: we don't
|
||||
want to have a new major release when the Linux kernel gets these
|
||||
functionality. Consult the headers for more information about the changes.
|
||||
|
||||
Therefore you shouldn't include Linux kernel header files directly if
|
||||
glibc has defined a replacement. Otherwise you might get undefined
|
||||
results because of type conflicts.
|
||||
|
||||
|
||||
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
@@ -606,6 +643,7 @@ Answers were given by:
|
||||
{DMT} David Mosberger-Tang, <davidm@AZStarNet.com>
|
||||
{RM} Roland McGrath, <roland@gnu.ai.mit.edu>
|
||||
{HJL} H.J. Lu, <hjl@gnu.ai.mit.edu>
|
||||
{AJ} Andreas Jaeger, <aj@arthur.pfalz.de>
|
||||
|
||||
Local Variables:
|
||||
mode:text
|
||||
|
||||
@@ -157,17 +157,17 @@ build the GNU C library:
|
||||
recommend you port GNU `make' instead. *Really.* We recommend
|
||||
version GNU `make' version 3.75 or later.
|
||||
|
||||
* GCC 2.7.2.1
|
||||
* GCC 2.7.2
|
||||
|
||||
On most platforms, the GNU C library can only be compiled with the
|
||||
GNU C compiler. We recommend GCC version 2.7.2 or later; earlier
|
||||
versions may have problems.
|
||||
|
||||
* `binutils' 2.7
|
||||
* `binutils' 2.8
|
||||
|
||||
Using the GNU `binutils' (assembler, linker, and related tools) is
|
||||
preferable when possible, and they are required to build an ELF
|
||||
shared C library. We recommend `binutils' version 2.7 or later;
|
||||
shared C library. We recommend `binutils' version 2.8 or later;
|
||||
earlier versions are known to have problems or to not support all
|
||||
architectures.
|
||||
|
||||
@@ -183,8 +183,8 @@ following patterns:
|
||||
iX86-ANYTHING-linux
|
||||
m68k-ANYTHING-linux
|
||||
|
||||
Former versions of this library used to support the following
|
||||
configurations but the current status is unknown:
|
||||
Former releases of this library (version 1.09.1 and perhaps earlier
|
||||
versions) used to run on the following configurations:
|
||||
|
||||
alpha-dec-osf1
|
||||
iX86-ANYTHING-bsd4.3
|
||||
@@ -208,7 +208,13 @@ configurations but the current status is unknown:
|
||||
sparc-sun-solaris2.N
|
||||
sparc-sun-sunos4.N
|
||||
|
||||
Each case of `iX86' can be `i386', `i486', `i586', or `i686'.. All
|
||||
Since no one has volunteered to test and fix the above
|
||||
configurations, these are not supported at the moment. It's expected
|
||||
that these don't work anymore. Porting the library is not hard. If
|
||||
you are interested in doing a port, please contact the glibc
|
||||
maintainers by sending electronic mail to <bug-glibc@prep.ai.mit.edu>.
|
||||
|
||||
Each case of `iX86' can be `i386', `i486', `i586', or `i686'. All
|
||||
of those configurations produce a library that can run on any of these
|
||||
processors. The library will be optimized for the specified processor,
|
||||
but will not use instructions not available on all of them.
|
||||
@@ -258,11 +264,11 @@ and `config.make' which are created by running `configure'; they will
|
||||
be in whatever directory was current when you ran `configure'.
|
||||
|
||||
If you think you have found some way in which the GNU C library does
|
||||
not conform to the ANSI and POSIX standards (*note Standards and
|
||||
not conform to the ISO and POSIX standards (*note Standards and
|
||||
Portability::.), that is definitely a bug. Report it!
|
||||
|
||||
Send bug reports to the Internet address `bug-glibc@prep.ai.mit.edu'
|
||||
or the UUCP path `mit-eddie!prep.ai.mit.edu!bug-glibc'. If you have
|
||||
Send bug reports to the Internet address <bug-glibc@prep.ai.mit.edu>
|
||||
or the UUCP path <mit-eddie!prep.ai.mit.edu!bug-glibc>. If you have
|
||||
other problems with installation or use, please report those as well.
|
||||
|
||||
If you are not sure how a function should behave, and this manual
|
||||
@@ -270,8 +276,8 @@ doesn't tell you, that's a bug in the manual. Report that too! If the
|
||||
function's behavior disagrees with the manual, then either the library
|
||||
or the manual has a bug, so report the disagreement. If you find any
|
||||
errors or omissions in this manual, please report them to the Internet
|
||||
address `bug-glibc-manual@prep.ai.mit.edu' or the UUCP path
|
||||
`mit-eddie!prep.ai.mit.edu!bug-glibc-manual'.
|
||||
address <bug-glibc-manual@prep.ai.mit.edu> or the UUCP path
|
||||
<mit-eddie!prep.ai.mit.edu!bug-glibc-manual>.
|
||||
|
||||
Adding New Functions
|
||||
====================
|
||||
@@ -773,10 +779,9 @@ parts of the library were contributed or worked on by other people.
|
||||
platforms was written by Per Bothner and modified by Ulrich
|
||||
Drepper.
|
||||
|
||||
* Some of the Internet-related code (most of the `inet'
|
||||
subdirectory) and several other miscellaneous functions and
|
||||
header files have been included from 4.4 BSD with little or no
|
||||
modification.
|
||||
* The Internet-related code (most of the `inet' subdirectory) and
|
||||
several other miscellaneous functions and header files have been
|
||||
included from 4.4 BSD with little or no modification.
|
||||
|
||||
All code incorporated from 4.4 BSD is under the following
|
||||
copyright:
|
||||
@@ -827,7 +832,7 @@ parts of the library were contributed or worked on by other people.
|
||||
`rand' and `srand' functions, were written by Earl T. Cohen for
|
||||
the University of California at Berkeley and are copyrighted by the
|
||||
Regents of the University of California. They have undergone minor
|
||||
changes to fit into the GNU C library and to fit the ANSI C
|
||||
changes to fit into the GNU C library and to fit the ISO C
|
||||
standard, but the functional code is Berkeley's.
|
||||
|
||||
* The Internet resolver code is taken directly from BIND 4.9.5,
|
||||
@@ -914,59 +919,7 @@ parts of the library were contributed or worked on by other people.
|
||||
Carnegie Mellon University
|
||||
Pittsburgh PA 15213-3890
|
||||
|
||||
or `Software.Distribution@CS.CMU.EDU' any improvements or
|
||||
or <Software.Distribution@CS.CMU.EDU> any improvements or
|
||||
extensions that they make and grant Carnegie Mellon the
|
||||
rights to redistribute these changes.
|
||||
|
||||
* The `getaddrinfo' function is written by Craig Metz and it has the
|
||||
following copyright:
|
||||
|
||||
The Inner Net License, Version 2.00
|
||||
===================================
|
||||
|
||||
The author(s) grant permission for redistribution and use in source and
|
||||
binary forms, with or without modification, of the software
|
||||
and documentation provided that the following conditions are met:
|
||||
|
||||
0. If you receive a version of the software that is
|
||||
specifically labelled as not being for redistribution
|
||||
(check the version message and/or README), you are not
|
||||
permitted to redistribute that version of the software in
|
||||
any way or form.
|
||||
1. All terms of the all other applicable copyrights and
|
||||
licenses must be followed.
|
||||
2. Redistributions of source code must retain the authors'
|
||||
copyright notice(s), this list of conditions, and the
|
||||
following disclaimer.
|
||||
3. Redistributions in binary form must reproduce the authors'
|
||||
copyright notice(s), this list of conditions, and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
4. All advertising materials mentioning features or use of
|
||||
this software must display the following acknowledgement
|
||||
with the name(s) of the authors as specified in the
|
||||
copyright notice(s) substituted where indicated:
|
||||
|
||||
This product includes software developed by <name(s)>, The Inner
|
||||
Net, and other contributors.
|
||||
|
||||
5. Neither the name(s) of the author(s) nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS
|
||||
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGE.
|
||||
|
||||
If these license terms cause you a real problem, contact the author.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -12,9 +12,9 @@
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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.
|
||||
|
||||
dist:
|
||||
|
||||
@@ -47,9 +47,6 @@ subdirs := $(filter-out $(add-ons),$(subdirs))
|
||||
# Make sure both stdio and libio get in, whichever is in use.
|
||||
subdirs += stdio libio
|
||||
|
||||
# The same must be true for the malloc directories.
|
||||
subdirs += malloc new-malloc
|
||||
|
||||
sysdep-Subdir-files := $(wildcard $(addsuffix /Subdirs,$(sysdep_dirs)))
|
||||
ifdef sysdep-Subdir-files
|
||||
subdirs := $(sort $(subdirs) \
|
||||
@@ -121,8 +118,8 @@ foo:=$(shell echo '+out=$(+out)' >&2; echo foofoo >&2)
|
||||
$(+sysdeps)
|
||||
foo:=$(shell echo 'made +tsrcs=$(+tsrcs)'>&2)
|
||||
foo:=$(shell echo generated='$(generated)' >&2)
|
||||
generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))
|
||||
foo:=$(shell echo now generated='$(generated)' >&2)
|
||||
#generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))
|
||||
#foo:=$(shell echo now generated='$(generated)' >&2)
|
||||
+tsrcs := $(sort $(filter-out $(generated),$(+tsrcs)))
|
||||
foo:=$(shell echo '+tsrcs=$(+tsrcs)'>&2)
|
||||
foo:=$(shell echo foobie, dammit! >&2)
|
||||
@@ -145,10 +142,10 @@ ifdef subdir
|
||||
|
||||
foo:=$(shell echo subdir foo >&2)
|
||||
|
||||
+tsrcs := Makefile $(+tsrcs) \
|
||||
$(addsuffix .c,$(others) $(tests)) \
|
||||
$(wildcard $(addsuffix .input,$(tests)) \
|
||||
$(addsuffix .args,$(tests)))
|
||||
+tsrcs := Makefile $(+tsrcs) \
|
||||
$(addsuffix .c,$(others) $(tests) $(test-srcs)) \
|
||||
$(wildcard $(addsuffix .input,$(tests) $(test-srcs)) \
|
||||
$(addsuffix .args,$(tests) $(test-srcs)))
|
||||
+tardeps := $(strip $(+tsrcs))
|
||||
|
||||
verbose = v
|
||||
@@ -190,7 +187,6 @@ endef
|
||||
configure: configure.in aclocal.m4; $(autoconf-it)
|
||||
%/configure: %/configure.in aclocal.m4; $(autoconf-it)
|
||||
|
||||
.PHONY: dist
|
||||
dist: $(tardir).tar.gz
|
||||
|
||||
subdir_dist: dist.tar
|
||||
@@ -199,9 +195,9 @@ dist.tar: README $(tardir) $(+tsrcs)
|
||||
|
||||
$(tardir).tar: dist.tar subdir_dist
|
||||
@echo Files listed here have names exceeding 14 chars.
|
||||
tar xfv $< -C /tmp | sed -n '/[^/]\{15,\}/p'
|
||||
tar covf $@ -C /tmp $(tardir)
|
||||
-rm -fr /tmp/$(tardir) dist.tar &
|
||||
tar xfv $< -C $${TMPDIR-/tmp} | sed -n '/[^/]\{15,\}/p'
|
||||
tar covf $@ -C $${TMPDIR-/tmp} $(tardir)
|
||||
-rm -fr $${TMPDIR-/tmp}/$(tardir) dist.tar &
|
||||
|
||||
%.Z: %
|
||||
compress -c $< > $@
|
||||
@@ -217,7 +213,7 @@ $(dist-subdirs):
|
||||
$(MAKE) -C $(patsubst dist-%,%,$@) dist
|
||||
|
||||
# This is here instead of in Makefile so it can use $(release) and $(version).
|
||||
README: README.template version.c
|
||||
README: README.template version.h
|
||||
-rm -f $@
|
||||
sed -e 's/RELEASE/$(release)/' -e 's/VERSION/$(version)/' < $< > $@
|
||||
# Make it unwritable so I won't change it by mistake.
|
||||
|
||||
@@ -84,17 +84,22 @@ 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))) \
|
||||
$(others:=.c) $(tests:=.c) $(test-srcs:=.c))) \
|
||||
$(foreach dir,$(all-dirs),\
|
||||
$(wildcard \
|
||||
$(addprefix $(dir)/,\
|
||||
$(sort $(sources) $(sources:.c=.S) \
|
||||
$(sources:.c=.s)))))
|
||||
$(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)/,$(headers))))
|
||||
$(wildcard $(addprefix $(dir)/,$(sysdep-headers))))
|
||||
|
||||
tags_sources := $(strip $(tags_sources))
|
||||
|
||||
@@ -147,14 +152,7 @@ else
|
||||
$(extract)
|
||||
endif
|
||||
|
||||
#$P/siglist.pot: $(common-objpfx)stdio-common/siglist.c; $(extract)
|
||||
$P/siglist.pot: siglist.c; $(extract)
|
||||
|
||||
# Extract all strings from this file; its strings are not marked.
|
||||
# Their surroundings are also not interesting.
|
||||
XGETTEXTFLAGS-siglist.pot = -a --no-location
|
||||
|
||||
all-pot = $P/libc-top.pot $P/subdirs.pot $P/siglist.pot
|
||||
all-pot = $P/libc-top.pot $P/subdirs.pot
|
||||
|
||||
ifndef subdir
|
||||
# Collect all the subdir messages, massaging the file names in comments
|
||||
|
||||
+65
-16
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -12,9 +12,9 @@
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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.
|
||||
|
||||
#
|
||||
# Makefile configuration options for the GNU C library.
|
||||
@@ -23,6 +23,8 @@ ifneq (,)
|
||||
This makefile requires GNU Make.
|
||||
endif
|
||||
|
||||
all: # Make this the default goal
|
||||
|
||||
ifneq "$(origin +included-Makeconfig)" "file"
|
||||
|
||||
+included-Makeconfig := yes
|
||||
@@ -91,12 +93,13 @@ export full-config-sysdirs := $(full-config-sysdirs)
|
||||
# changes and so config.status would be run every time; the dependence of
|
||||
# config.make should suffice to force regeneration and re-exec, and the new
|
||||
# image will notice if config.h changed.
|
||||
$(common-objpfx)config.make: $(common-objpfx)config.status $(..)config.h.in
|
||||
$(common-objpfx)config.make: $(common-objpfx)config.status \
|
||||
$(..)config.make.in $(..)config.h.in
|
||||
cd $(<D); $(SHELL) $(<F)
|
||||
|
||||
# Find all the sysdeps configure fragments, to make sure we re-run
|
||||
# configure when any of them changes.
|
||||
$(common-objpfx)config.status: $(..)configure \
|
||||
$(common-objpfx)config.status: $(..)version.h $(..)configure \
|
||||
$(foreach dir,$(full-config-sysdirs),\
|
||||
$(wildcard \
|
||||
$(dir)/Implies) \
|
||||
@@ -146,11 +149,13 @@ endif
|
||||
ifndef libdir
|
||||
libdir = $(exec_prefix)/lib
|
||||
endif
|
||||
inst_libdir = $(install_root)$(libdir)
|
||||
|
||||
# Where to install the shared library and dynamic linker.
|
||||
ifndef slibdir
|
||||
slibdir = $(exec_prefix)/lib
|
||||
endif
|
||||
inst_slibdir = $(install_root)$(slibdir)
|
||||
|
||||
# Prefix to put on files installed in $(libdir). For libraries `libNAME.a',
|
||||
# the prefix is spliced between `lib' and the name, so the linker switch
|
||||
@@ -164,50 +169,64 @@ endif
|
||||
ifndef includedir
|
||||
includedir = $(exec_prefix)/include
|
||||
endif
|
||||
inst_includedir = $(install_root)$(includedir)
|
||||
|
||||
# Where to install machine-independent data files.
|
||||
# These are the timezone database, and the locale database.
|
||||
ifndef datadir
|
||||
datadir = $(prefix)/share
|
||||
endif
|
||||
inst_datadir = $(install_root)$(datadir)
|
||||
|
||||
# Where to install the timezone data files (which are machine-independent).
|
||||
ifndef zonedir
|
||||
zonedir = $(datadir)/zoneinfo
|
||||
endif
|
||||
inst_zonedir = $(install_root)$(zonedir)
|
||||
|
||||
# Where to install the locale and message catalog data files (which are
|
||||
# machine-independent).
|
||||
ifndef localedir
|
||||
localedir = $(datadir)/locale
|
||||
endif
|
||||
inst_localedir = $(install_root)$(localedir)
|
||||
|
||||
# Where to install the locale charmap source files.
|
||||
ifndef i18ndir
|
||||
i18ndir = $(datadir)/i18n
|
||||
endif
|
||||
inst_i18ndir = $(install_root)$(i18ndir)
|
||||
|
||||
|
||||
# Where to install programs.
|
||||
ifndef bindir
|
||||
bindir = $(exec_prefix)/bin
|
||||
endif
|
||||
inst_bindir = $(install_root)$(bindir)
|
||||
|
||||
# Where to install administrative programs.
|
||||
ifndef rootsbindir
|
||||
rootsbindir = $(exec_prefix)/sbin
|
||||
endif
|
||||
inst_rootsbindir = $(install_root)$(rootsbindir)
|
||||
|
||||
ifndef sbindir
|
||||
sbindir = $(exec_prefix)/sbin
|
||||
endif
|
||||
inst_sbindir = $(install_root)$(sbindir)
|
||||
|
||||
# Where to install the Info files.
|
||||
ifndef infodir
|
||||
infodir = $(prefix)/info
|
||||
endif
|
||||
inst_infodir = $(install_root)$(infodir)
|
||||
|
||||
# Where to install default configuration files. These include the local
|
||||
# timezone specification and network data base files.
|
||||
ifndef sysconfdir
|
||||
sysconfdir = $(prefix)/etc
|
||||
endif
|
||||
inst_sysconfdir = $(install_root)$(sysconfdir)
|
||||
|
||||
# What timezone should be the installed default (e.g., US/Eastern).
|
||||
# Run `make -C time echo-zonenames' to see a list of available zone names.
|
||||
@@ -223,6 +242,7 @@ endif
|
||||
# localizing the configuration data elsewhere.
|
||||
ifndef localtime-file
|
||||
localtime-file = $(sysconfdir)/localtime
|
||||
inst_localtime-file = $(install_root)$(localtime-file)
|
||||
endif
|
||||
|
||||
# What to use for leap second specifications in compiling the default
|
||||
@@ -302,10 +322,10 @@ endif
|
||||
ifndef +link
|
||||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+prector) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
|
||||
$(link-extra-libs) $(link-libc) $(+postinit)
|
||||
$(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
|
||||
endif
|
||||
ifndef config-LDFLAGS
|
||||
ifeq (yes,$(build-shared))
|
||||
@@ -349,6 +369,8 @@ endif
|
||||
ifeq ($(elf),yes)
|
||||
+preinit = $(addprefix $(csu-objpfx),crti.o)
|
||||
+postinit = $(addprefix $(csu-objpfx),crtn.o)
|
||||
+prector = `$(CC) --print-file-name=crtbegin.o`
|
||||
+postctor = `$(CC) --print-file-name=crtend.o`
|
||||
endif
|
||||
csu-objpfx = $(common-objpfx)csu/
|
||||
elf-objpfx = $(common-objpfx)elf/
|
||||
@@ -421,7 +443,7 @@ ifdef CFLAGS
|
||||
endif # CFLAGS
|
||||
endif # +cflags
|
||||
|
||||
# If none of the above worked, default to "-g".
|
||||
# If none of the above worked, default to "-g -O".
|
||||
ifeq "$(strip $(+cflags))" ""
|
||||
+cflags := $(default_cflags)
|
||||
endif # $(+cflags) == ""
|
||||
@@ -464,13 +486,14 @@ endif
|
||||
# to pass different flags for each flavor.
|
||||
libtypes = $(foreach o,$(object-suffixes),$(libtype$o))
|
||||
object-suffixes := .o
|
||||
all-object-suffixes := .o .so .po .go
|
||||
libtype.o := lib%.a
|
||||
ifeq (yes,$(build-shared))
|
||||
# Under --enable-shared, we will build a shared library of PIC objects.
|
||||
# The PIC object files are named foo.so.
|
||||
object-suffixes += .so
|
||||
CPPFLAGS-.so = -DPIC
|
||||
CFLAGS-.so = -fPIC
|
||||
CFLAGS-.so = -fPIC -fno-common
|
||||
libtype.so := lib%_pic.a
|
||||
endif
|
||||
ifeq (yes,$(build-profile))
|
||||
@@ -498,12 +521,6 @@ endif
|
||||
ifndef BUILD_CC
|
||||
BUILD_CC = $(CC)
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD_CC),$(CC))
|
||||
cross-compiling := yes
|
||||
else
|
||||
cross-compiling := no
|
||||
endif
|
||||
|
||||
# Figure out the version numbers from version.h.
|
||||
|
||||
@@ -549,6 +566,34 @@ $(common-objpfx)soversions.mk: $(..)shlib-versions $(..)Makeconfig \
|
||||
# Get $(version) defined with the release version number.
|
||||
-include $(common-objpfx)version.mk
|
||||
|
||||
# Generate the header containing the names of all shared libraries.
|
||||
# We use a stamp file to avoid uncessary recompilations.
|
||||
before-compile += $(common-objpfx)gnu/lib-names.h
|
||||
$(common-objpfx)gnu/lib-names.h: $(common-objpfx)gnu/lib-names.stmp
|
||||
$(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 \
|
||||
upname=`echo $$l | sed 's/[.]so.*//' | \
|
||||
tr 'abcdefghijklmnopqrstuvwxyz-' \
|
||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
|
||||
echo "#define $${upname}_SO \"$$l\""; \
|
||||
done;) | sort; \
|
||||
echo; \
|
||||
echo '#endif /* gnu/lib-names.h */';) > ${@:stmp=T}
|
||||
if test -r ${@:stmp=h} && cmp -s ${@:stmp=h} ${@:stmp=T}; \
|
||||
then rm -f ${@:stmp=T}; \
|
||||
else mv -f ${@:stmp=T} ${@:stmp=h}; fi
|
||||
touch $@
|
||||
|
||||
common-generated += gnu/lib-names.h gnu/lib-names.stmp
|
||||
|
||||
# The name under which the run-time dynamic linker is installed.
|
||||
# We are currently going for the convention that `/lib/ld.so.1'
|
||||
@@ -561,6 +606,10 @@ rtld-installed-name = ld.so.1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef rtld-version-installed-name
|
||||
rtld-version-installed-name = ld-$(version).so
|
||||
endif
|
||||
|
||||
endif # build-shared
|
||||
|
||||
endif # Makeconfig not yet included
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -52,7 +52,7 @@ endif
|
||||
|
||||
# These are the subdirectories containing the library source.
|
||||
subdirs = csu assert ctype db locale intl catgets math setjmp signal stdlib \
|
||||
stdio-common $(stdio) $(malloc) string wcsmbs time dirent grp pwd \
|
||||
stdio-common $(stdio) malloc string wcsmbs time dirent grp pwd \
|
||||
posix io termios resource misc login socket sysvipc gmon gnulib \
|
||||
wctype manual shadow md5-crypt nss $(sysdep-subdirs) po \
|
||||
$(add-ons) elf
|
||||
@@ -85,14 +85,16 @@ subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
|
||||
headers := errno.h sys/errno.h errnos.h limits.h values.h \
|
||||
features.h gnu-versions.h libc-lock.h xopen_lim.h
|
||||
aux = sysdep $(libc-init) version
|
||||
before-compile = $(objpfx)version-info.h
|
||||
before-compile += $(objpfx)version-info.h
|
||||
|
||||
echo-headers: subdir_echo-headers
|
||||
|
||||
# What to install.
|
||||
install-others = $(includedir)/gnu/stubs.h
|
||||
install-others = $(inst_includedir)/gnu/stubs.h
|
||||
install-bin = glibcbug
|
||||
|
||||
ifeq (yes,$(build-shared))
|
||||
install-others += $(includedir)/gnu/lib-names.h
|
||||
install-others += $(inst_includedir)/gnu/lib-names.h
|
||||
endif
|
||||
|
||||
ifeq (yes,$(gnu-ld))
|
||||
@@ -111,6 +113,16 @@ include Makerules
|
||||
# Install from subdirectories too.
|
||||
install: subdir_install
|
||||
|
||||
# Create linkfs for shared libraries using the `ldconfig' program is possible.
|
||||
# Ignore the error if we cannot update /etc/ld.so.cache.
|
||||
ifeq (no,$(cross-compiling))
|
||||
ifeq (yes,$(build-shared))
|
||||
install:
|
||||
-test ! -x $(common-objpfx)elf/ldconfig || \
|
||||
$(common-objpfx)elf/ldconfig -d $(inst_slibdir) $(inst_libdir)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Build subdirectory lib objects.
|
||||
lib-noranlib: subdir_lib
|
||||
|
||||
@@ -168,7 +180,7 @@ subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)stub-$(dir))
|
||||
# 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.
|
||||
$(includedir)/gnu/stubs.h: subdir_install
|
||||
$(inst_includedir)/gnu/stubs.h: subdir_install
|
||||
@rm -f $(objpfx)stubs.h
|
||||
(echo '/* This file is automatically generated.';\
|
||||
echo ' It defines a symbol `__stub_FUNCTION'\'' for each function';\
|
||||
@@ -182,34 +194,21 @@ $(includedir)/gnu/stubs.h: subdir_install
|
||||
|
||||
ifeq (yes,$(build-shared))
|
||||
|
||||
# Like gnu/stubs.h the gnu/lib-names.h header is not used while building the
|
||||
# libc itself. So we generate it while installing.
|
||||
$(includedir)/gnu/lib-names.h: $(common-objpfx)soversions.mk
|
||||
@rm -f $(objpfx)lib-names.h
|
||||
(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 \
|
||||
upname=`echo $$l | sed 's/[.]so.*//' | \
|
||||
tr '[:lower:]-' '[:upper:]_'`; \
|
||||
echo "#define $${upname}_SO $$l"; \
|
||||
done;) | sort; \
|
||||
echo; \
|
||||
echo '#endif /* gnu/lib-names.h */';) > $(objpfx)lib-names.h
|
||||
if test -r $@ && cmp -s $(objpfx)lib-names.h $@; \
|
||||
$(inst_includedir)/gnu/lib-names.h: $(common-objpfx)gnu/lib-names.h
|
||||
if test -r $@ && cmp -s $< $@; \
|
||||
then echo 'gnu/lib-names.h unchanged'; \
|
||||
else $(INSTALL_DATA) $(objpfx)lib-names.h $@; fi
|
||||
rm -f $(objpfx)lib-names.h
|
||||
else $(INSTALL_DATA) $< $@; fi
|
||||
endif
|
||||
|
||||
# The `glibcbug' script contains the version number and it shall be rebuild
|
||||
# whenever this changes or the `glibcbug.in' file.
|
||||
$(objpfx)glibcbug: $(common-objpfx)config.status glibcbug.in
|
||||
cd $(<D); CONFIG_FILES=$(@F) CONFIG_HEADERS= $(SHELL) $(<F)
|
||||
|
||||
# This makes the Info or DVI file of the documentation from the Texinfo source.
|
||||
.PHONY: info dvi
|
||||
info dvi:
|
||||
$(MAKE) -C manual $@
|
||||
$(MAKE) $(PARALLELMFLAGS) -C manual $@
|
||||
|
||||
# This makes all the subdirectory targets.
|
||||
|
||||
@@ -223,7 +222,7 @@ 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) -C $(@D) $(@F)
|
||||
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
|
||||
|
||||
.PHONY: $(+subdir_targets) $(all-subdirs-targets)
|
||||
|
||||
@@ -280,7 +279,7 @@ parent_echo-distinfo:
|
||||
|
||||
# Make the distribution tarfile.
|
||||
|
||||
distribute := README INSTALL FAQ NOTES NEWS PROJECTS \
|
||||
distribute := README INSTALL FAQ NOTES NEWS PROJECTS BUGS \
|
||||
COPYING.LIB COPYING ChangeLog ChangeLog.[0-9] \
|
||||
Makefile Makeconfig Makerules Rules Make-dist MakeTAGS \
|
||||
extra-lib.mk o-iterator.mk \
|
||||
@@ -289,12 +288,13 @@ distribute := README INSTALL FAQ NOTES NEWS PROJECTS \
|
||||
config.h.in config.make.in config-name.in Makefile.in \
|
||||
autolock.sh rellns-sh munch-tmpl.c munch.awk interp.c \
|
||||
sysdep.h set-hooks.h libc-symbols.h version.h shlib-versions \
|
||||
rpm/Makefile rpm/template rpm/rpmrc nsswitch.h netgroup.h
|
||||
rpm/Makefile rpm/template rpm/rpmrc nsswitch.h netgroup.h \
|
||||
mcheck.h glibcbug.in
|
||||
|
||||
distribute := $(strip $(distribute))
|
||||
generated := $(generated) stubs.h version-info.h
|
||||
|
||||
README: README.template version.c ; # Make-dist should update README.
|
||||
README: README.template version.h ; # Make-dist should update README.
|
||||
|
||||
define format-me
|
||||
@rm -f $@
|
||||
@@ -303,6 +303,14 @@ makeinfo --no-validate --no-warn --no-headers $< -o $@
|
||||
endef
|
||||
INSTALL: manual/maint.texi; $(format-me)
|
||||
NOTES: manual/creature.texi; $(format-me)
|
||||
manual/dir-add.texi:
|
||||
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
|
||||
|
||||
rpm/%: subdir_distinfo
|
||||
$(MAKE) -C $(@D) subdirs='$(subdirs)' $(@F)
|
||||
$(MAKE) $(PARALLELMFLAGS) -C $(@D) subdirs='$(subdirs)' $(@F)
|
||||
|
||||
# This is a special goal for people making binary distributions. Normally
|
||||
# everybody uses the DES based crypt library but for the distribution we
|
||||
# need the only-MD5 based one as well.
|
||||
md5-crypt/libmd5crypt:
|
||||
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
|
||||
|
||||
+4
-1
@@ -2,5 +2,8 @@
|
||||
|
||||
srcdir = @srcdir@
|
||||
|
||||
# Uncomment the line below if you want to do parallel build.
|
||||
# PARALLELMFLAGS = -j 4
|
||||
|
||||
all .DEFAULT:
|
||||
$(MAKE) -C $(srcdir) objdir=`pwd` $@
|
||||
$(MAKE) PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -26,7 +26,7 @@ This makefile requires GNU Make.
|
||||
endif
|
||||
|
||||
REQUIRED_MAKE_VERSION = 3.74
|
||||
REAL_MAKE_VERSION = $(shell echo "$(MAKE_VERSION)" | sed 's/ .*//')
|
||||
REAL_MAKE_VERSION = $(firstword $(MAKE_VERSION))
|
||||
|
||||
ifneq ($(REQUIRED_MAKE_VERSION), \
|
||||
$(firstword $(sort $(REAL_MAKE_VERSION) $(REQUIRED_MAKE_VERSION))))
|
||||
@@ -238,7 +238,7 @@ $(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \
|
||||
/*) dir=$$sysdir ;; \
|
||||
*) dir="\$$(..)$$sysdir" ;; \
|
||||
esac; \
|
||||
for o in $(object-suffixes); do \
|
||||
for o in $(all-object-suffixes); do \
|
||||
$(open-check-inhibit-asm) \
|
||||
echo "\$$(objpfx)%$$o: $$dir/%.S \$$(before-compile); \
|
||||
\$$(compile-command.S)"; \
|
||||
@@ -292,7 +292,8 @@ define +make-deps
|
||||
$(make-target-directory)
|
||||
-@rm -f $@
|
||||
$(+mkdep) $< $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \
|
||||
sed -e 's,$(subst .,\.,$*)\.o,$(foreach o,$(object-suffixes),$(@:.d=$o)) $@,' \
|
||||
sed \
|
||||
-e 's,$(subst .,\.,$*)\.o,$(foreach o,$(all-object-suffixes),$(@:.d=$o)) $@,' \
|
||||
$(sed-remove-objpfx) > $(@:.d=.T)
|
||||
mv -f $(@:.d=.T) $@
|
||||
endef
|
||||
@@ -338,12 +339,16 @@ $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
|
||||
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
|
||||
-Wl,--whole-archive $^ $(no-whole-archive) \
|
||||
$(LDLIBS-$(@F:lib%.so=%).so)
|
||||
test -z "$($(@F)-version)" || \
|
||||
(rm -f $@$($(@F)-version); $(LN_S) $(@F) $@$($(@F)-version))
|
||||
endef
|
||||
|
||||
# Don't try to use -lc when making libc.so itself.
|
||||
# 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 -lgcc.
|
||||
LDLIBS-c.so = -lgcc
|
||||
# Give libc.so an entry point and make it directly runnable itself.
|
||||
LDFLAGS-c.so += -e __libc_main
|
||||
# Use our own special initializer and finalizer files for libc.so.
|
||||
@@ -351,12 +356,6 @@ $(common-objpfx)libc.so: $(elfobjdir)/soinit.so \
|
||||
$(common-objpfx)libc_pic.a \
|
||||
$(elfobjdir)/sofini.so $(elfobjdir)/ld.so
|
||||
$(build-shlib)
|
||||
|
||||
ifdef libc.so-version
|
||||
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
|
||||
rm -f $@
|
||||
ln -s $(<F) $@ || ln $< $@
|
||||
endif
|
||||
endif
|
||||
|
||||
# Some files must not be compiled with the exception handler mechanism
|
||||
@@ -567,11 +566,11 @@ endef
|
||||
# to install everything it changes.
|
||||
ifdef objects
|
||||
installed-libcs := $(foreach o,$(object-suffixes),\
|
||||
$(libdir)/$(patsubst %,$(libtype$o),\
|
||||
$(libprefix)$(libc-name)))
|
||||
$(inst_libdir)/$(patsubst %,$(libtype$o),\
|
||||
$(libprefix)$(libc-name)))
|
||||
installed-libcs := $(filter-out %_pic.a,$(installed-libcs))
|
||||
install: $(installed-libcs)
|
||||
$(installed-libcs): $(libdir)/lib$(libprefix)%: lib
|
||||
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib
|
||||
$(make-target-directory)
|
||||
$(INSTALL_DATA) $(common-objpfx)lib$(*:$(libc-name)%=c%) $@
|
||||
# Running ranlib after installing makes the __.SYMDEF time stamp up to
|
||||
@@ -589,15 +588,15 @@ install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
|
||||
install-lib := $(filter-out %.so %_pic.a,$(install-lib))
|
||||
ifeq (yes,$(build-shared))
|
||||
|
||||
install-lib-nosubdir: $(install-lib.so:%=$(libdir)/%)
|
||||
install-lib-nosubdir: $(install-lib.so:%=$(inst_libdir)/%)
|
||||
|
||||
# Find which .so's have versions.
|
||||
versioned := $(strip $(foreach so,$(install-lib.so),\
|
||||
$(patsubst %,$(so),$($(so)-version))))
|
||||
|
||||
# Install all the unversioned shared libraries.
|
||||
$(addprefix $(slibdir)/,$(filter-out $(versioned),$(install-lib.so))): \
|
||||
$(slibdir)/%.so: $(objpfx)%.so; $(do-install-program)
|
||||
$(addprefix $(inst_slibdir)/, $(filter-out $(versioned),$(install-lib.so))): \
|
||||
$(inst_slibdir)/%.so: $(objpfx)%.so; $(do-install-program)
|
||||
|
||||
ifneq ($(findstring -s,$(LN_S)),)
|
||||
define make-link
|
||||
@@ -614,25 +613,40 @@ mv -f $@.new $@
|
||||
endef
|
||||
endif
|
||||
|
||||
# XXX The following will have to be changed when `ldconfig' is available.
|
||||
ifneq (yes,$(cross-compiling))
|
||||
ifeq (yes,$(has-ldconfig))
|
||||
define make-shlib-link
|
||||
@:
|
||||
endef
|
||||
endif
|
||||
endif
|
||||
ifndef make-shlib-link
|
||||
define make-shlib-link
|
||||
$(make-link)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifdef libc.so-version
|
||||
# For a library specified to be version N, install three files:
|
||||
# libc.so -> libc.so.N (e.g. libc.so.6)
|
||||
# libc.so.6 -> libc-VERSION.so (e.g. libc-1.10.so)
|
||||
|
||||
$(slibdir)/libc.so$(libc.so-version): $(slibdir)/libc-$(version).so
|
||||
$(make-link)
|
||||
$(slibdir)/libc-$(version).so: $(common-objpfx)libc.so; $(do-install-program)
|
||||
install: $(slibdir)/libc.so$(libc.so-version)
|
||||
$(inst_slibdir)/libc.so$(libc.so-version): $(inst_slibdir)/libc-$(version).so
|
||||
$(make-shlib-link)
|
||||
$(inst_slibdir)/libc-$(version).so: $(common-objpfx)libc.so
|
||||
$(do-install-program)
|
||||
install: $(inst_slibdir)/libc.so$(libc.so-version)
|
||||
|
||||
ifndef subdir
|
||||
# What we install as libc.so for programs to link against is in fact a
|
||||
# link script. It contains references for the various libraries we need.
|
||||
# The libc.so object is not complete since some functions are only defined
|
||||
# in libc.a and the dynamic linker is an etra object.
|
||||
install: $(libdir)/libc.so
|
||||
$(libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
|
||||
$(elfobjdir)/$(rtld-installed-name) \
|
||||
$(libdir)/lib$(libc-name).a
|
||||
install: $(inst_libdir)/libc.so
|
||||
$(inst_libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
|
||||
$(elfobjdir)/$(rtld-installed-name) \
|
||||
$(inst_libdir)/lib$(libc-name).a
|
||||
(echo '/* GNU ld script';\
|
||||
echo ' Use the shared library, but some functions are only in';\
|
||||
echo ' the static library, so try that secondarily.'; \
|
||||
@@ -645,8 +659,9 @@ $(libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
|
||||
endif
|
||||
|
||||
else
|
||||
install: $(slibdir)/libc.so
|
||||
$(slibdir)/libc.so: $(common-objpfx)libc.so; $(do-install-program)
|
||||
install: $(inst_slibdir)/libc.so
|
||||
$(inst_slibdir)/libc.so: $(common-objpfx)libc.so
|
||||
$(do-install-program)
|
||||
endif
|
||||
|
||||
|
||||
@@ -654,7 +669,7 @@ ifneq (,$(versioned))
|
||||
# Produce three sets of rules as above for all the smaller versioned libraries.
|
||||
|
||||
define o-iterator-doit
|
||||
$(libdir)/$o: $(slibdir)/$o$($o-version); $$(make-link)
|
||||
$(inst_libdir)/$o: $(inst_slibdir)/$o$($o-version); $$(make-link)
|
||||
endef
|
||||
object-suffixes-left := $(versioned)
|
||||
include $(o-iterator)
|
||||
@@ -670,26 +685,28 @@ include $(o-iterator)
|
||||
|
||||
ifeq (,$($(subdir)-version))
|
||||
define o-iterator-doit
|
||||
$(slibdir)/$o$($o-version): $(slibdir)/$(o:.so=)-$(version).so; $$(make-link)
|
||||
$(inst_slibdir)/$o$($o-version): $(inst_slibdir)/$(o:.so=)-$(version).so;
|
||||
$$(make-shlib-link)
|
||||
endef
|
||||
object-suffixes-left := $(versioned)
|
||||
include $(o-iterator)
|
||||
|
||||
define o-iterator-doit
|
||||
$(slibdir)/$(o:.so=)-$(version).so: $(objpfx)$o; $$(do-install-program)
|
||||
$(inst_slibdir)/$(o:.so=)-$(version).so: $(objpfx)$o; $$(do-install-program)
|
||||
endef
|
||||
object-suffixes-left := $(versioned)
|
||||
include $(o-iterator)
|
||||
else
|
||||
define o-iterator-doit
|
||||
$(slibdir)/$o$($o-version): $(slibdir)/$(o:.so=)-$($(subdir)-version).so;
|
||||
$$(make-link)
|
||||
$(inst_slibdir)/$o$($o-version): \
|
||||
$(inst_slibdir)/$(o:.so=)-$($(subdir)-version).so;
|
||||
$$(make-shlib-link)
|
||||
endef
|
||||
object-suffixes-left := $(versioned)
|
||||
include $(o-iterator)
|
||||
|
||||
define o-iterator-doit
|
||||
$(slibdir)/$(o:.so=)-$($(subdir)-version).so: $(objpfx)$o;
|
||||
$(inst_slibdir)/$(o:.so=)-$($(subdir)-version).so: $(objpfx)$o;
|
||||
$$(do-install-program)
|
||||
endef
|
||||
object-suffixes-left := $(versioned)
|
||||
@@ -705,54 +722,62 @@ endef
|
||||
|
||||
so-versions := $(sort $(foreach so,$(install-lib.so),.so$($(so)-version)))
|
||||
$(foreach v,$(so-versions),\
|
||||
$(slibdir)/lib$(libprefix)%$v): $(common-objpfx)lib%.so
|
||||
$(inst_slibdir)/lib$(libprefix)%$v): $(common-objpfx)lib%.so
|
||||
$(do-install-so)
|
||||
$(foreach v,$(so-versions),\
|
||||
$(slibdir)/$(libprefix)%$v): $(common-objpfx)%.so
|
||||
$(inst_slibdir)/$(libprefix)%$v): $(common-objpfx)%.so
|
||||
$(do-install-so)
|
||||
endif
|
||||
|
||||
ifdef install-bin
|
||||
$(addprefix $(bindir)/,$(install-bin)): $(bindir)/%: $(objpfx)%
|
||||
$(addprefix $(inst_bindir)/,$(install-bin)): $(inst_bindir)/%: $(objpfx)%
|
||||
$(do-install-program)
|
||||
endif
|
||||
ifdef install-rootsbin
|
||||
$(addprefix $(inst_rootsbindir)/,$(install-rootsbin)):
|
||||
$(inst_rootsbindir)/%: $(objpfx)%
|
||||
$(do-install-program)
|
||||
endif
|
||||
ifdef install-sbin
|
||||
$(addprefix $(sbindir)/,$(install-sbin)): $(sbindir)/%: $(objpfx)%
|
||||
$(addprefix $(inst_sbindir)/,$(install-sbin)): $(inst_sbindir)/%: $(objpfx)%
|
||||
$(do-install-program)
|
||||
endif
|
||||
ifdef install-lib
|
||||
install-lib.a := $(filter lib%.a,$(install-lib))
|
||||
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
|
||||
ifdef install-lib-non.a
|
||||
$(addprefix $(libdir)/$(libprefix),$(install-lib-non.a)): \
|
||||
$(libdir)/$(libprefix)%: $(objpfx)%
|
||||
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
|
||||
$(inst_libdir)/$(libprefix)%: $(objpfx)%
|
||||
$(do-install)
|
||||
endif
|
||||
ifdef install-lib.a
|
||||
$(install-lib.a:lib%.a=$(libdir)/lib$(libprefix)%.a): \
|
||||
$(libdir)/lib$(libprefix)%.a: $(objpfx)lib%.a
|
||||
$(install-lib.a:lib%.a=$(inst_libdir)/lib$(libprefix)%.a): \
|
||||
$(inst_libdir)/lib$(libprefix)%.a: $(objpfx)lib%.a
|
||||
$(do-install)
|
||||
$(patsubst %,$(RANLIB) $@,$(filter-out $(non-lib.a),$(<F)))
|
||||
endif
|
||||
endif
|
||||
ifdef install-data
|
||||
$(addprefix $(datadir)/,$(install-data)): $(datadir)/%: %;$(do-install)
|
||||
$(addprefix $(inst_datadir)/,$(install-data)): $(inst_datadir)/%: %;
|
||||
$(do-install)
|
||||
endif
|
||||
headers := $(strip $(headers))
|
||||
ifdef headers
|
||||
$(addprefix $(includedir)/,$(headers)): \
|
||||
$(includedir)/%: %;$(do-install)
|
||||
$(addprefix $(inst_includedir)/,$(headers)): $(inst_includedir)/%: %;
|
||||
$(do-install)
|
||||
endif # headers
|
||||
|
||||
.PHONY: install-bin-nosubdir install-sbin-nosubdir install-lib-nosubdir \
|
||||
install-data-nosubdir install-headers-nosubdir
|
||||
install-bin-nosubdir: $(addprefix $(bindir)/,$(install-bin))
|
||||
install-sbin-nosubdir: $(addprefix $(sbindir)/,$(install-sbin))
|
||||
install-lib-nosubdir: $(addprefix $(libdir)/,\
|
||||
.PHONY: install-bin-nosubdir install-rootsbin-nosubdir install-sbin-nosubdir \
|
||||
install-lib-nosubdir install-data-nosubdir install-headers-nosubdir
|
||||
install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
|
||||
install-rootsbin-nosubdir: \
|
||||
$(addprefix $(inst_rootsbindir)/,$(install-rootsbin))
|
||||
install-sbin-nosubdir: $(addprefix $(inst_sbindir)/,$(install-sbin))
|
||||
install-lib-nosubdir: $(addprefix $(inst_libdir)/,\
|
||||
$(patsubst lib%.a,lib$(libprefix)%.a,$(install-lib.a)) \
|
||||
$(addprefix $(libprefix),$(install-lib-non.a)))
|
||||
install-data-nosubdir: $(addprefix $(datadir)/,$(install-data))
|
||||
install-headers-nosubdir: $(addprefix $(includedir)/,$(headers))
|
||||
install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
|
||||
install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
|
||||
install-others-nosubdir: $(install-others)
|
||||
|
||||
# We need all the `-nosubdir' targets so that `install' in the parent
|
||||
@@ -764,7 +789,8 @@ install-%:: install-%-nosubdir ;
|
||||
.PHONY: install install-no-libc.a-nosubdir
|
||||
install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\
|
||||
install-bin-nosubdir install-lib-nosubdir \
|
||||
install-others-nosubdir install-sbin-nosubdir
|
||||
install-others-nosubdir install-rootsbin-nosubdir \
|
||||
install-sbin-nosubdir
|
||||
install: install-no-libc.a-nosubdir
|
||||
|
||||
# Command to compile $< in $(objdir) using the native libraries.
|
||||
@@ -809,9 +835,10 @@ mostlyclean: common-mostlyclean
|
||||
|
||||
# Remove the object files.
|
||||
common-mostlyclean:
|
||||
-rm -f $(addprefix $(objpfx),$(tests) $(others) \
|
||||
$(addsuffix .o,$(tests) $(others)) \
|
||||
$(addsuffix .out,$(tests)))
|
||||
-rm -f $(addprefix $(objpfx),$(tests) $(test-srcs) $(others) \
|
||||
$(addsuffix .o,$(tests) $(test-srcs) \
|
||||
$(others)) \
|
||||
$(addsuffix .out,$(tests) $(test-srcs)))
|
||||
-rm -f $(addprefix $(objpfx),$(extra-objs) $(install-lib))
|
||||
-rm -f core $(common-objpfx)stub-$(subdir)
|
||||
$(rmobjs)
|
||||
@@ -823,6 +850,7 @@ endef
|
||||
# Also remove the dependencies and generated source files.
|
||||
common-clean: common-mostlyclean
|
||||
-rm -f $(addprefix $(objpfx),$(generated)) $(+depfiles)
|
||||
-rm -fr $(addprefix $(objpfx),$(generated-dirs))
|
||||
-rm -f $(addprefix $(common-objpfx),$(common-generated))
|
||||
-rm -f $(common-objpfx)distinfo-$(subdir)
|
||||
|
||||
|
||||
@@ -1,9 +1,32 @@
|
||||
GNU C Library NEWS -- history of user-visible changes. 25 August 1996
|
||||
GNU C Library NEWS -- history of user-visible changes. 1997-03-18
|
||||
|
||||
Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
See the end for copying conditions.
|
||||
|
||||
Please send GNU C library bug reports to bug-glibc@prep.ai.mit.edu.
|
||||
Please send GNU C library bug reports using the `glibcbug' script to
|
||||
<bugs@gnu.ai.mit.edu>. Questions and suggestions should be send to
|
||||
<bug-glibc@prep.ai.mit.edu>.
|
||||
|
||||
Version 2.0.2
|
||||
|
||||
* more bug fixes
|
||||
|
||||
* add atoll function
|
||||
|
||||
* fix complex problems in Berkeley DB code
|
||||
|
||||
* fix math functions
|
||||
|
||||
Version 2.0.1
|
||||
|
||||
* fixed lots of header problems (especially Linux/GNU specific)
|
||||
|
||||
* dynamic loader preserves all registers
|
||||
|
||||
* Roland McGrath provided support for handling of auxiliary objects in
|
||||
the ELF dynamic loader.
|
||||
|
||||
* support for parallel builds is improved
|
||||
|
||||
Version 2.0
|
||||
|
||||
@@ -34,7 +57,9 @@ Version 2.0
|
||||
are enabled, the new library `-ldl' is available for arbitrary run-time
|
||||
loading of shared objects; its interface is defined in <dlfcn.h>. The
|
||||
new header file <link.h> gives access to the internals of the run-time
|
||||
dynamic linker, `ld.so'.
|
||||
dynamic linker, `ld.so'. The shell script `ldd' is similar to the
|
||||
application of same name on other systems and it provides information
|
||||
about dynamically linked binaries.
|
||||
|
||||
* The C library now provides the run-time support code for profiling
|
||||
executables compiled with `-pg'. Programs can control the profiling code
|
||||
@@ -43,18 +68,22 @@ Version 2.0
|
||||
the support for this file format was contributed by David Mosberger-Tang.
|
||||
|
||||
* The math code has been replaced with a math library based on fdlibm from
|
||||
Sun, and modified by JT Conklin with i387 support and by Ian Taylor with
|
||||
`float' functions. The math functions now reside in a separate library,
|
||||
so programs using them will need to use `-lm' their linking commands.
|
||||
Sun, and modified by JT Conklin and Ulrich Drepper with i387 support, by
|
||||
Ian Taylor with `float' functions and by Ulrich Drepper with `long double'
|
||||
functions. The math functions now reside in a separate library, so
|
||||
programs using them will need to use `-lm' their linking commands.
|
||||
|
||||
* John C. Bowman contributed optimized ix87 assembler inline functions.
|
||||
|
||||
* Ulrich Drepper has contributed support for an `/etc/nsswitch.conf'
|
||||
mechanism similar to that found in Solaris 2. This is now used for the
|
||||
group, passwd, hosts, networks, services, protocols, and rpc databases.
|
||||
The `nsswitch.conf' file controls what services are used for each
|
||||
individual database. This works by loading shared libraries with names
|
||||
specified in `nsswitch.conf', so service modules can be changed or added at
|
||||
any time without even relinking any program. A future release of the
|
||||
separate NYS package will provide NIS/YP and NIS+ modules for this interface.
|
||||
group, passwd, hosts, networks, services, protocols, rpc, ethers,
|
||||
shadow, netgroup, publickey, and alias databases. The `nsswitch.conf'
|
||||
file controls what services are used for each individual database. This
|
||||
works by loading shared libraries with names specified in `nsswitch.conf',
|
||||
so service modules can be changed or added at any time without even
|
||||
relinking any program. Currently there are the file, db, and NIS based
|
||||
NSS services available.
|
||||
|
||||
* The new functions `strtoq' and `strtouq' parse integer values from
|
||||
strings, like `strtol' and `strtoul', but they return `long long int' and
|
||||
@@ -69,13 +98,25 @@ Version 2.0
|
||||
`strtod', `strtof', and `strtold'. These new functions are perfectly
|
||||
accurate, and much faster than the old ones.
|
||||
|
||||
* The implementation of the POSIX locale model was completely rewritten by
|
||||
Ulrich Drepper. This includes the new programs `localedef' and `locale'
|
||||
to compile the POSIX locale definition.
|
||||
|
||||
* The former dummy implementations of the strcoll and strxfrm function are
|
||||
now replaced by fully functional code contributed by Ulrich Drepper. The
|
||||
collation information comes from the POSIX locale definitions.
|
||||
|
||||
* The new header <langinfo.h> defines an interface for accessing
|
||||
various locale-dependent data (using the locale chosen with `setlocale').
|
||||
|
||||
* Ulrich Drepper has contributed a new suite of functions for operation on
|
||||
wide-character and multibyte-character strings, in <wcstr.h> and <mbstr.h>;
|
||||
wide-character and multibyte-character strings, in <wchar.h>;
|
||||
and classification and case conversion of wide characters, in <wctype.h>.
|
||||
These new functions are intended to conform to the ISO C specification.
|
||||
These new functions are conforming to the ISO C, Amendement 1 specification.
|
||||
|
||||
* There is now a second implementation of the standard I/O library available.
|
||||
It comes from GNU libg++ as was written by Per Bothner, heavily modified
|
||||
by Hongjiu Lu and made thread safe by Ulrich Drepper.
|
||||
|
||||
* You can now use positional parameter specifications in format strings
|
||||
for the `printf' and `scanf' families of functions. For example,
|
||||
@@ -104,7 +145,9 @@ Version 2.0
|
||||
* The new header file <fts.h> and suite of functions simplify programs that
|
||||
operate on directory trees. This code comes from 4.4 BSD.
|
||||
|
||||
* The resolver code has been updated from the BIND 4.9.5-T4B release.
|
||||
* The resolver code has been updated from the BIND 4.9.5-P1 release.
|
||||
Parts of the code were heavily modified by Ulrich Drepper to fit in the
|
||||
NSS scheme used in glibc.
|
||||
|
||||
* The new function `malloc_find_object_address' finds the starting address
|
||||
of a malloc'd block, given any address within the block;
|
||||
@@ -132,7 +175,9 @@ Version 2.0
|
||||
|
||||
* The new functions `ecvt', `fcvt', and `gcvt' provide an obsolete interface
|
||||
for formatting floating-point numbers. They are provided only for
|
||||
compatibility; new programs should use `sprintf' instead.
|
||||
compatibility; new programs should use `sprintf' instead. There are
|
||||
also equivalent function for the `long double' floating-point type and
|
||||
all functions also exist in a reentrant form.
|
||||
|
||||
* The new auxiliary library `-lutil' from 4.4 BSD contains various
|
||||
functions for maintaining the login-record files (primarily of use to
|
||||
@@ -156,13 +201,17 @@ Version 2.0
|
||||
|
||||
* Ulrich Drepper has updated the Linux-specific code, based largely
|
||||
on work done in Hongjiu Lu's version of GNU libc for Linux.
|
||||
The GNU library now supports Linux versions 1.3.29 and later,
|
||||
using the ELF object file format (i[345]86-*-linux).
|
||||
The GNU library now supports Linux versions 2.0.10 and later,
|
||||
using the ELF object file format (i[3456]86-*-linux).
|
||||
|
||||
* Andreas Schwab has ported the C library to Linux/m68k (m68k-*-linux).
|
||||
|
||||
* David Mosberger-Tang has ported the C library to Linux/Alpha (alpha-*-linux).
|
||||
Richard Henderson contributed the dynamic linking support for ELF/Alpha.
|
||||
* David Mosberger-Tang and Richard Henderson have ported the C library
|
||||
to Linux/Alpha (alpha-*-linux). Richard Henderson contributed the
|
||||
dynamic linking support for ELF/Alpha.
|
||||
|
||||
* Richard Henderson contributed several Alpha optimized assembler function
|
||||
for arithmetic and string handling.
|
||||
|
||||
* Ulrich Drepper has contributed a new set of message catalog functions to
|
||||
support multiple languages using the <libintl.h> interface, for use with
|
||||
@@ -199,6 +248,7 @@ Version 2.0
|
||||
POSIX.2 `glob' function to do ~ and {...} expansion.
|
||||
|
||||
* New function `unsetenv' complements `setenv' for compatibility with 4.4 BSD.
|
||||
`clearenv' which is used in POSIX.9 is also available.
|
||||
|
||||
* New function `getsid' returns session ID number on systems that support it.
|
||||
|
||||
@@ -212,7 +262,9 @@ Version 2.0
|
||||
space from `alloca' instead of dynamic heap space from `malloc'.
|
||||
|
||||
* New function `strnlen' is like `strlen' but searches only a given maximum
|
||||
number of characters for the null terminator.
|
||||
number of characters for the null terminator. `stpncpy', `strndup' and
|
||||
`strndupa' are similar variants for the `stpcpy', `strdup' and `strdupa'
|
||||
function.
|
||||
|
||||
* New function `statfs' in header <sys/statfs.h>.
|
||||
|
||||
@@ -222,6 +274,46 @@ Version 2.0
|
||||
|
||||
* A new suite of functions in <utmp.h> handle all the details of reading
|
||||
and writing the utmp file.
|
||||
|
||||
* An implementation of the NIS/YP(tm) based NSS service was contributed by
|
||||
Thorsten Kukuk.
|
||||
|
||||
* Paul Eggert and Ulrich Drepper modified the `strftime' function to be
|
||||
completely POSIX compliant and also implemented the extended functionality
|
||||
to handle alternate digit representation and alternate era date formats.
|
||||
|
||||
* Ulrich Drepper provided an implementation of the `strptime' function
|
||||
defined in XPG4.2 which transforms a string into a `struct tm' value.
|
||||
|
||||
* Paul Eggert provided the tzselect shell script as part of the timezone
|
||||
code. The shell script makes it easy to select the correct timezone
|
||||
specification.
|
||||
|
||||
* The implementation of the malloc family of functions is completely replaced
|
||||
by a new implementation by Doug Lea with many improvements by Wolfram Gloger.
|
||||
The implementation uses the mmap function (if available) and it is
|
||||
optimized for the use in multi threaded programs.
|
||||
|
||||
* Ulrich Drepper contributed a MD5 "encryption" for the crypt family of
|
||||
functions. This new functionality is usable by specifying a special
|
||||
salt string and it is compatible with implementation on *BSD systems.
|
||||
|
||||
* Lots of functions from the XPG4.2 standard were added by Ulrich Drepper:
|
||||
`getsubopt' to handle second level command line options, `bsd_signal'
|
||||
to access BSD style `signal' functionality, the obsolete `regexp' style
|
||||
expression matcher.
|
||||
|
||||
* the `lchown' function is available on system which support this
|
||||
functionality.
|
||||
|
||||
* The implementation of the shadow password handling function was contributed
|
||||
by Ulrich Drepper.
|
||||
|
||||
* David Mosberger-Tang changed the SunRPC implementation to be 64bit safe.
|
||||
|
||||
* POSIX.1g support was added. The <sys/select.h> header is available,
|
||||
`isfdtype' and `pselect' are implemented. Craig Metz contributed an
|
||||
implementation of `getaddrinfo'.
|
||||
|
||||
Version 1.09
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Open jobs for finishing GNU libc:
|
||||
---------------------------------
|
||||
Status: October 1996
|
||||
Status: January 1997
|
||||
|
||||
If you have time and talent to take over any of the jobs below please
|
||||
contact <bug-glibc@prep.ai.mit.edu>
|
||||
@@ -10,6 +10,8 @@ contact <bug-glibc@prep.ai.mit.edu>
|
||||
[ 1] Port to new platforms or test current version on formerly supported
|
||||
platforms.
|
||||
|
||||
**** See http://www.gnu.org/software/libc/porting.html for more details.
|
||||
|
||||
|
||||
[ 2] Test compliance with standards. If you have access to recent
|
||||
standards (IEEE, ISO, ANSI, X/Open, ...) and/or test suites you
|
||||
@@ -31,6 +33,8 @@ contact <bug-glibc@prep.ai.mit.edu>
|
||||
|
||||
Implementation idea: use some functions from bash.
|
||||
|
||||
**** Somebody is working on this. Help may or may not be appreciated.
|
||||
|
||||
|
||||
[ 5] Write `long double' versions of the math functions. This should be
|
||||
done in collaboration with the NetBSD and FreeBSD people.
|
||||
@@ -83,5 +87,15 @@ contact <bug-glibc@prep.ai.mit.edu>
|
||||
[11] Rewrite utmp/wtmp functions to use database functions. This is much
|
||||
better than the normal flat file format.
|
||||
|
||||
Please contact bug-glibc@prep.ai.mit.edu before starting to avoid
|
||||
duplicated work.
|
||||
**** There are plans for a new approach to this problem. Please contact
|
||||
bug-glibc@prep.ai.mit.edu before starting to work.)
|
||||
|
||||
|
||||
[12] Several more or less small functions have to be written:
|
||||
|
||||
+ tcgetid() and waitid() from XPG4.2
|
||||
+ grantpt(), ptsname(), unlockpt() from XPG4.2
|
||||
+ getdate() from XPG4.2
|
||||
+ fmtmsg() from SVID
|
||||
|
||||
More information are available on request.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
This directory contains the version 1.96 test release of the GNU C Library.
|
||||
This directory contains the version 2.0.4 test release of the GNU C Library.
|
||||
Many bugs have been fixed since the last release.
|
||||
Some bugs surely remain.
|
||||
|
||||
As of this release, the GNU C library is known to run on the following
|
||||
configurations:
|
||||
|
||||
*-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux Linux-2.0 on Intel
|
||||
m68k-*-linux Linux-2.0 on Motorola 680x0
|
||||
alpha-*-linux Linux-2.0 on DEC Alpha
|
||||
i[3456]86-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux-gnu Linux-2.0 on Intel
|
||||
m68k-*-linux-gnu Linux-2.0 on Motorola 680x0
|
||||
alpha-*-linux-gnu Linux-2.0 on DEC Alpha
|
||||
|
||||
|
||||
Former releases of this library (version 1.09.1 and perhaps earlier
|
||||
@@ -36,41 +36,54 @@ versions) used to run on the following configurations:
|
||||
sparc-sun-solaris2
|
||||
sparc-sun-sunos4
|
||||
|
||||
Whether this is still true for this release is unknown. Porting the
|
||||
library is not hard. If you are interested in doing a port, please
|
||||
get on the mailing list by sending electronic mail to
|
||||
bug-glibc-request@prep.ai.mit.edu.
|
||||
Since no one has volunteered to test and fix the above configurations,
|
||||
these are not supported at the moment. It's expected that these don't
|
||||
work anymore. Porting the library is not hard. If you are interested
|
||||
in doing a port, please contact the glibc maintainers by sending
|
||||
electronic mail to <bug-glibc@prep.ai.mit.edu>.
|
||||
|
||||
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
|
||||
provides the Unix `crypt' function, plus some other entry points.
|
||||
Because of the United States export restriction on DES implementations,
|
||||
we are distributing this code separately from the rest of the C
|
||||
library. There is an extra distribution tar file just for crypt; it is
|
||||
called `glibc-1.96-crypt.tar.gz'. You can just unpack the crypt
|
||||
called `glibc-crypt-2.0.4.tar.gz'. You can just unpack the crypt
|
||||
distribution along with the rest of the C library and build; you can
|
||||
also build the library without getting crypt. Users outside the USA
|
||||
can get the crypt distribution via anonymous FTP from ftp.uni-c.dk
|
||||
[129.142.6.74], or another archive site outside the USA. Archive
|
||||
can get the crypt distribution via anonymous FTP from ftp.ifi.uio.no
|
||||
[129.240.64.21], or another archive site outside the USA. Archive
|
||||
maintainers are encouraged to copy this distribution to their archives
|
||||
outside the USA. Please get it from ftp.uni-c.dk; transferring this
|
||||
outside the USA. Please get it from ftp.ifi.uio.no; transferring this
|
||||
distribution from prep.ai.mit.edu (or any other site in the USA) to a
|
||||
site outside the USA is in violation of US export laws.
|
||||
|
||||
Beside the separate crypt tar file there are some more 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.
|
||||
|
||||
See the file INSTALL to find out how to configure, build, install, and port
|
||||
the GNU C library.
|
||||
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 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@prep.ai.mit.edu, and
|
||||
send comments on the manual to <bug-glibc-manual@prep.ai.mit.edu>, and
|
||||
not to the library bug-reporting address.
|
||||
|
||||
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.
|
||||
|
||||
Send bug reports to bug-glibc@prep.ai.mit.edu.
|
||||
We prefer to get bug reports sent using the `glibcbug' shell script which
|
||||
is install together with the rest of the GNU libc to <bugs@gnu.ai.mit.edu>.
|
||||
Simply run this shell script and fill in the information. Nevertheless
|
||||
you can still send bug reports to <bug-glibc@prep.ai.mit.edu> as normal
|
||||
electronic mails.
|
||||
|
||||
The GNU C Library is free software. See the file COPYING.LIB for copying
|
||||
conditions.
|
||||
|
||||
+28
-15
@@ -5,10 +5,10 @@ Some bugs surely remain.
|
||||
As of this release, the GNU C library is known to run on the following
|
||||
configurations:
|
||||
|
||||
*-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux Linux-2.0 on Intel
|
||||
m68k-*-linux Linux-2.0 on Motorola 680x0
|
||||
alpha-*-linux Linux-2.0 on DEC Alpha
|
||||
i[3456]86-*-gnu GNU Hurd
|
||||
i[3456]86-*-linux-gnu Linux-2.0 on Intel
|
||||
m68k-*-linux-gnu Linux-2.0 on Motorola 680x0
|
||||
alpha-*-linux-gnu Linux-2.0 on DEC Alpha
|
||||
|
||||
|
||||
Former releases of this library (version 1.09.1 and perhaps earlier
|
||||
@@ -36,41 +36,54 @@ versions) used to run on the following configurations:
|
||||
sparc-sun-solaris2
|
||||
sparc-sun-sunos4
|
||||
|
||||
Whether this is still true for this release is unknown. Porting the
|
||||
library is not hard. If you are interested in doing a port, please
|
||||
get on the mailing list by sending electronic mail to
|
||||
bug-glibc-request@prep.ai.mit.edu.
|
||||
Since no one has volunteered to test and fix the above configurations,
|
||||
these are not supported at the moment. It's expected that these don't
|
||||
work anymore. Porting the library is not hard. If you are interested
|
||||
in doing a port, please contact the glibc maintainers by sending
|
||||
electronic mail to <bug-glibc@prep.ai.mit.edu>.
|
||||
|
||||
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
|
||||
provides the Unix `crypt' function, plus some other entry points.
|
||||
Because of the United States export restriction on DES implementations,
|
||||
we are distributing this code separately from the rest of the C
|
||||
library. There is an extra distribution tar file just for crypt; it is
|
||||
called `glibc-VERSION-crypt.tar.gz'. You can just unpack the crypt
|
||||
called `glibc-crypt-VERSION.tar.gz'. You can just unpack the crypt
|
||||
distribution along with the rest of the C library and build; you can
|
||||
also build the library without getting crypt. Users outside the USA
|
||||
can get the crypt distribution via anonymous FTP from ftp.uni-c.dk
|
||||
[129.142.6.74], or another archive site outside the USA. Archive
|
||||
can get the crypt distribution via anonymous FTP from ftp.ifi.uio.no
|
||||
[129.240.64.21], or another archive site outside the USA. Archive
|
||||
maintainers are encouraged to copy this distribution to their archives
|
||||
outside the USA. Please get it from ftp.uni-c.dk; transferring this
|
||||
outside the USA. Please get it from ftp.ifi.uio.no; transferring this
|
||||
distribution from prep.ai.mit.edu (or any other site in the USA) to a
|
||||
site outside the USA is in violation of US export laws.
|
||||
|
||||
Beside the separate crypt tar file there are some more 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.
|
||||
|
||||
See the file INSTALL to find out how to configure, build, install, and port
|
||||
the GNU C library.
|
||||
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 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@prep.ai.mit.edu, and
|
||||
send comments on the manual to <bug-glibc-manual@prep.ai.mit.edu>, and
|
||||
not to the library bug-reporting address.
|
||||
|
||||
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.
|
||||
|
||||
Send bug reports to bug-glibc@prep.ai.mit.edu.
|
||||
We prefer to get bug reports sent using the `glibcbug' shell script which
|
||||
is install together with the rest of the GNU libc to <bugs@gnu.ai.mit.edu>.
|
||||
Simply run this shell script and fill in the information. Nevertheless
|
||||
you can still send bug reports to <bug-glibc@prep.ai.mit.edu> as normal
|
||||
electronic mails.
|
||||
|
||||
The GNU C Library is free software. See the file COPYING.LIB for copying
|
||||
conditions.
|
||||
|
||||
@@ -39,7 +39,8 @@ export subdir := $(subdir)
|
||||
all: objs lib others
|
||||
|
||||
others: $(addprefix $(objpfx),$(extra-objs) \
|
||||
$(install-lib) $(install-bin) $(install-sbin))
|
||||
$(install-lib) $(install-bin) \
|
||||
$(install-rootsbin) $(install-sbin))
|
||||
|
||||
ifneq "$(findstring env,$(origin headers))" ""
|
||||
headers :=
|
||||
@@ -82,19 +83,19 @@ common-generated := $(common-generated) dummy.o dummy.c empty.c empty.o
|
||||
.PHONY: others tests
|
||||
others: $(addprefix $(objpfx),$(others) $(extra-objs))
|
||||
ifeq ($(cross-compiling),yes)
|
||||
tests: $(addprefix $(objpfx),$(tests))
|
||||
tests: $(addprefix $(objpfx),$(tests) $(test-srcs))
|
||||
else
|
||||
tests: $(tests:%=$(objpfx)%.out)
|
||||
tests: $(tests:%=$(objpfx)%.out) $(addprefix $(objpfx),$(test-srcs))
|
||||
endif
|
||||
|
||||
ifneq "$(strip $(others) $(tests))" ""
|
||||
$(addprefix $(objpfx),$(others) $(tests)): %: %.o \
|
||||
ifneq "$(strip $(others) $(tests) $(test-srcs))" ""
|
||||
$(addprefix $(objpfx),$(others) $(tests) $(test-srcs)): %: %.o \
|
||||
$(sort $(filter $(common-objpfx)libc%,$(link-libc))) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
|
||||
$(+link)
|
||||
endif
|
||||
|
||||
ifneq "$(strip $(tests))" ""
|
||||
ifneq "$(strip $(tests) $(test-srcs))" ""
|
||||
# These are the implicit rules for making test outputs
|
||||
# from the test programs and whatever input files are present.
|
||||
$(objpfx)%.out: %.args $(objpfx)% %.input
|
||||
|
||||
Vendored
+59
@@ -31,3 +31,62 @@ changequote([,])dnl
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
|
||||
dnl
|
||||
|
||||
dnl These modifications are to allow for an empty cross compiler tree.
|
||||
dnl In the situation that cross-linking is impossible, the variable
|
||||
dnl `cross_linkable' will be substituted with "yes".
|
||||
AC_DEFUN(AC_PROG_CC_LOCAL,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_WORKS_LOCAL
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
dnl The following differs from the AC_PROG_CC macro in autoconf. Since
|
||||
dnl we require a recent version of gcc to be used we do not need to go
|
||||
dnl into lengths and test for bugs in old versions. It must be gcc 2.7
|
||||
dnl or above.
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
|
||||
dnl Check the version
|
||||
cat > conftest.c <<EOF
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
|
||||
if test -z "$CFLAGS"; then
|
||||
CFLAGS="-g -O2"
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([We require GNU CC version 2.7 or newer])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([GNU libc must be compiled using GNU CC])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_CC_WORKS_LOCAL,
|
||||
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
|
||||
AC_LANG_RESTORE
|
||||
AC_MSG_RESULT($ac_cv_prog_cc_works)
|
||||
if test $ac_cv_prog_cc_works = no; then
|
||||
cross_linkable=no
|
||||
ac_cv_prog_cc_cross=yes
|
||||
dnl AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.])
|
||||
else
|
||||
cross_linkable=yes
|
||||
fi
|
||||
AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler])
|
||||
AC_MSG_RESULT($ac_cv_prog_cc_cross)
|
||||
AC_SUBST(cross_linkable)
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
])
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 1994 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 1994, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -12,9 +12,9 @@
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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 assert portion of the library.
|
||||
|
||||
+12
-13
@@ -1,23 +1,22 @@
|
||||
# Copyright (C) 1994 Free Software Foundation, Inc.
|
||||
# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
|
||||
# On-Line Applications Research Corporation.
|
||||
#
|
||||
# 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 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., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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.
|
||||
|
||||
subdir := bare
|
||||
|
||||
@@ -33,11 +32,11 @@ 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
|
||||
# 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
|
||||
# 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.
|
||||
#
|
||||
|
||||
|
||||
+12
-3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
|
||||
@@ -34,6 +34,7 @@ catopen (const char *cat_name, int flag)
|
||||
{
|
||||
__nl_catd result;
|
||||
const char *env_var;
|
||||
const char *nlspath;
|
||||
|
||||
result = (__nl_catd) malloc (sizeof (*result));
|
||||
if (result == NULL)
|
||||
@@ -82,8 +83,16 @@ catopen (const char *cat_name, int flag)
|
||||
return (nl_catd) -1;
|
||||
}
|
||||
|
||||
if (__secure_getenv ("NLSPATH") != NULL)
|
||||
result->nlspath = __strdup (getenv ("NLSPATH"));
|
||||
nlspath = __secure_getenv ("NLSPATH");
|
||||
if (nlspath != NULL && *nlspath != '\0')
|
||||
{
|
||||
/* Append the system dependent directory. */
|
||||
size_t len = strlen (nlspath + 1 + sizeof NLSPATH);
|
||||
char *tmp = alloca (len);
|
||||
|
||||
__stpcpy (__stpcpy (__stpcpy (tmp, nlspath), ":"), NLSPATH);
|
||||
nlspath = tmp;
|
||||
}
|
||||
else
|
||||
result->nlspath = __strdup (NLSPATH);
|
||||
|
||||
|
||||
+20
-19
@@ -1,21 +1,21 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@@ -141,7 +141,7 @@ main (int argc, char *argv[])
|
||||
header_name = NULL;
|
||||
result = NULL;
|
||||
|
||||
while ((opt = getopt_long (argc, argv, "hH:o:V", long_options, NULL)) != EOF)
|
||||
while ((opt = getopt_long (argc, argv, "hH:o:V", long_options, NULL)) != -1)
|
||||
switch (opt)
|
||||
{
|
||||
case '\0': /* Long option. */
|
||||
@@ -170,7 +170,7 @@ main (int argc, char *argv[])
|
||||
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\
|
||||
"), "1996");
|
||||
"), "1996, 1997");
|
||||
printf (_("Written by %s.\n"), "Ulrich Drepper");
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
@@ -221,7 +221,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
If INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n\
|
||||
is -, output is written to standard output.\n"),
|
||||
program_invocation_name, program_invocation_name);
|
||||
fputs (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"),
|
||||
fputs (gettext ("\
|
||||
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"),
|
||||
stdout);
|
||||
}
|
||||
|
||||
@@ -270,7 +271,7 @@ read_input_file (struct catalog *current, const char *fname)
|
||||
current->last_set = 0;
|
||||
current->current_set = find_set (current, NL_SETD);
|
||||
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_alloc malloc
|
||||
#define obstack_chunk_free free
|
||||
obstack_init (¤t->mem_pool);
|
||||
}
|
||||
|
||||
Vendored
+31
-10
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -68,11 +68,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
echo m68k-cbm-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-cbm-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
laguna:OpenBSD:*:*)
|
||||
echo mips64-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
|
||||
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
|
||||
if test "`(/bin/universe) 2>/dev/null`" = att ; then
|
||||
@@ -115,19 +130,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-atari-openbsd${UNAME_RELEASE}
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-sun-openbsd${UNAME_RELEASE}
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-apple-openbsd${UNAME_RELEASE}
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
@@ -375,8 +396,8 @@ EOF
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:OpenBSD:*:*)
|
||||
echo m68k-hp-openbsd${UNAME_RELEASE}
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
@@ -400,7 +421,7 @@ EOF
|
||||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,-.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
@@ -504,7 +525,7 @@ EOF
|
||||
# "miniframe"
|
||||
echo m68010-convergent-sysv
|
||||
exit 0 ;;
|
||||
m68*:*:R3V[567]*:*)
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
|
||||
@@ -35,6 +35,14 @@
|
||||
This is defined by configure under --enable-libio. */
|
||||
#undef USE_IN_LIBIO
|
||||
|
||||
/* Define if using ELF and the assembler supports the `.previous'
|
||||
directive. */
|
||||
#undef HAVE_ASM_PREVIOUS_DIRECTIVE
|
||||
|
||||
/* Define if using ELF and the assembler supports the `.popsection'
|
||||
directive. */
|
||||
#undef HAVE_ASM_POPSECTION_DIRECTIVE
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
||||
+10
-2
@@ -3,10 +3,16 @@
|
||||
# Don't edit this file. Put configuration parameters in configparms instead.
|
||||
|
||||
# Installation prefixes.
|
||||
install_root =
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
slibdir = @libc_cv_slibdir@
|
||||
sysconfdir = @libc_cv_sysconfdir@
|
||||
rootsbindir = @libc_cv_rootsbindir@
|
||||
|
||||
# If ldconfig exists. This will go away as soon as `ldconfig' is available
|
||||
# in GNU libc.
|
||||
has-ldconfig = @has_ldconfig@
|
||||
|
||||
# System configuration.
|
||||
config-machine = @host_cpu@
|
||||
@@ -15,7 +21,7 @@ config-vendor = @host_vendor@
|
||||
config-os = @host_os@
|
||||
config-sysdirs = @sysnames@
|
||||
|
||||
defines = @DEFINES@ @USE_NEW_MALLOC@
|
||||
defines = @DEFINES@
|
||||
|
||||
elf = @elf@
|
||||
have-initfini = @libc_cv_have_initfini@
|
||||
@@ -23,6 +29,7 @@ have-initfini = @libc_cv_have_initfini@
|
||||
have-no-whole-archive = @libc_cv_ld_no_whole_archive@
|
||||
have-no-exceptions = @libc_cv_gcc_no_exceptions@
|
||||
have-bash2 = @libc_cv_have_bash2@
|
||||
have-ksh = @libc_cv_have_ksh@
|
||||
|
||||
# Configuration options.
|
||||
gnu-as = @gnu_as@
|
||||
@@ -31,8 +38,8 @@ build-shared = @shared@
|
||||
build-profile = @profile@
|
||||
build-omitfp = @omitfp@
|
||||
stdio = @stdio@
|
||||
malloc = @malloc@
|
||||
add-ons = @subdirs@
|
||||
cross-compiling = @cross_compiling@
|
||||
|
||||
# Build tools.
|
||||
CC = @CC@
|
||||
@@ -49,5 +56,6 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||
LN_S = @LN_S@
|
||||
MSGFMT = @MSGFMT@
|
||||
BASH = @BASH@
|
||||
KSH = @KSH@
|
||||
|
||||
# More variables may be inserted below by configure.
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
#! /bin/sh
|
||||
|
||||
# From configure.in CVSid
|
||||
|
||||
|
||||
|
||||
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.11.2
|
||||
# Generated automatically using autoconf version 2.12
|
||||
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
@@ -28,9 +32,6 @@ ac_help="$ac_help
|
||||
--with-elf if using the ELF object format"
|
||||
ac_help="$ac_help
|
||||
--enable-libio build in GNU libio instead of GNU stdio"
|
||||
ac_help="$ac_help
|
||||
--enable-new-malloc use the new malloc implementation. This is the
|
||||
default for Linux, others use the old malloc."
|
||||
ac_help="$ac_help
|
||||
--disable-sanity-checks really do not use threads (should not be used
|
||||
except in special situations) [default=yes]"
|
||||
@@ -363,7 +364,7 @@ EOF
|
||||
verbose=yes ;;
|
||||
|
||||
-version | --version | --versio | --versi | --vers)
|
||||
echo "configure generated by autoconf version 2.11.2"
|
||||
echo "configure generated by autoconf version 2.12"
|
||||
exit 0 ;;
|
||||
|
||||
-with-* | --with-*)
|
||||
@@ -646,19 +647,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-new-malloc or --disable-new-malloc was given.
|
||||
if test "${enable_new_malloc+set}" = set; then
|
||||
enableval="$enable_new_malloc"
|
||||
if test $enableval = yes; then
|
||||
malloc=new-malloc
|
||||
else
|
||||
malloc=malloc
|
||||
fi
|
||||
else
|
||||
malloc=default
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-sanity-checks or --disable-sanity-checks was given.
|
||||
if test "${enable_sanity_checks+set}" = set; then
|
||||
enableval="$enable_sanity_checks"
|
||||
@@ -736,7 +724,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||
echo "configure:740: checking host system type" >&5
|
||||
echo "configure:728: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
@@ -816,7 +804,7 @@ esac
|
||||
# This can take a while to compute.
|
||||
sysdep_dir=$srcdir/sysdeps
|
||||
echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
|
||||
echo "configure:820: checking sysdep dirs" >&5
|
||||
echo "configure:808: checking sysdep dirs" >&5
|
||||
# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
|
||||
os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
|
||||
|
||||
@@ -1017,7 +1005,7 @@ echo "$ac_t""sysdeps/generic sysdeps/stub" 1>&6
|
||||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||
# ./install, which can be erroneously created by make from ./install.sh.
|
||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||
echo "configure:1021: checking for a BSD compatible install" >&5
|
||||
echo "configure:1009: checking for a BSD compatible install" >&5
|
||||
if test -z "$INSTALL"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@@ -1071,7 +1059,7 @@ if test "$INSTALL" = "${srcdir}/install-sh -c"; then
|
||||
INSTALL='$(..)./install-sh -c'
|
||||
fi
|
||||
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
|
||||
echo "configure:1075: checking whether ln -s works" >&5
|
||||
echo "configure:1063: checking whether ln -s works" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1096,7 +1084,7 @@ do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1100: checking for $ac_word" >&5
|
||||
echo "configure:1088: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1126,8 +1114,168 @@ done
|
||||
test -n "$MSGFMT" || MSGFMT=":"
|
||||
|
||||
|
||||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1121: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_CC="gcc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
if test -z "$CC"; then
|
||||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1150: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
ac_prog_rejected=no
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
|
||||
ac_prog_rejected=yes
|
||||
continue
|
||||
fi
|
||||
ac_cv_prog_CC="cc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
if test $ac_prog_rejected = yes; then
|
||||
# We found a bogon in the path, so make sure we never use it.
|
||||
set dummy $ac_cv_prog_CC
|
||||
shift
|
||||
if test $# -gt 0; then
|
||||
# We chose a different compiler from the bogus one.
|
||||
# However, it has the same basename, so the bogon will be chosen
|
||||
# first if we set CC to just the basename; use the full file name.
|
||||
shift
|
||||
set dummy "$ac_dir/$ac_word" "$@"
|
||||
shift
|
||||
ac_cv_prog_CC="$@"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:1198: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1208 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:1212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_prog_cc_cross=no
|
||||
else
|
||||
ac_cv_prog_cc_cross=yes
|
||||
fi
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
ac_cv_prog_cc_works=no
|
||||
fi
|
||||
rm -fr conftest*
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
|
||||
if test $ac_cv_prog_cc_works = no; then
|
||||
cross_linkable=no
|
||||
ac_cv_prog_cc_cross=yes
|
||||
else
|
||||
cross_linkable=yes
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:1235: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:1241: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.c <<EOF
|
||||
#ifdef __GNUC__
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
|
||||
cat > conftest.c <<EOF
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if test -z "$CFLAGS"; then
|
||||
CFLAGS="-g -O2"
|
||||
fi
|
||||
else
|
||||
{ echo "configure: error: We require GNU CC version 2.7 or newer" 1>&2; exit 1; }
|
||||
fi
|
||||
else
|
||||
{ echo "configure: error: GNU libc must be compiled using GNU CC" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||
echo "configure:1131: checking build system type" >&5
|
||||
echo "configure:1279: checking build system type" >&5
|
||||
|
||||
build_alias=$build
|
||||
case "$build_alias" in
|
||||
@@ -1145,47 +1293,12 @@ build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
echo "$ac_t""$build" 1>&6
|
||||
|
||||
if test $host != $build; then
|
||||
ac_tool_prefix=${host_alias}-
|
||||
else
|
||||
ac_tool_prefix=
|
||||
fi
|
||||
|
||||
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}gcc; ac_word=$2
|
||||
for ac_prog in gcc cc
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1157: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}gcc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $host != $build; then
|
||||
# Extract the first word of "gcc cc", so it can be a program name with args.
|
||||
set dummy gcc cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1189: checking for $ac_word" >&5
|
||||
echo "configure:1302: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1196,7 +1309,7 @@ else
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_BUILD_CC=""
|
||||
ac_cv_prog_BUILD_CC="$ac_prog"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -1210,9 +1323,13 @@ else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -n "$BUILD_CC" && break
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:1216: checking how to run the C preprocessor" >&5
|
||||
echo "configure:1333: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
@@ -1227,13 +1344,13 @@ else
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1231 "configure"
|
||||
#line 1348 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@@ -1244,13 +1361,13 @@ else
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1248 "configure"
|
||||
#line 1365 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@@ -1272,10 +1389,16 @@ else
|
||||
fi
|
||||
echo "$ac_t""$CPP" 1>&6
|
||||
|
||||
if test $host != $build; then
|
||||
ac_tool_prefix=${host_alias}-
|
||||
else
|
||||
ac_tool_prefix=
|
||||
fi
|
||||
|
||||
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ar; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1279: checking for $ac_word" >&5
|
||||
echo "configure:1402: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1306,7 +1429,7 @@ fi
|
||||
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1310: checking for $ac_word" >&5
|
||||
echo "configure:1433: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1337,7 +1460,7 @@ if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1341: checking for $ac_word" >&5
|
||||
echo "configure:1464: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1372,7 +1495,7 @@ fi
|
||||
# Extract the first word of "bash", so it can be a program name with args.
|
||||
set dummy bash; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1376: checking for $ac_word" >&5
|
||||
echo "configure:1499: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1409,8 +1532,53 @@ else
|
||||
fi
|
||||
|
||||
|
||||
if test "$BASH" = no; then
|
||||
# Extract the first word of "ksh", so it can be a program name with args.
|
||||
set dummy ksh; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1540: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
case "$KSH" in
|
||||
/*)
|
||||
ac_cv_path_KSH="$KSH" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_path_KSH="$ac_dir/$ac_word"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_KSH" && ac_cv_path_KSH="no"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
KSH="$ac_cv_path_KSH"
|
||||
if test -n "$KSH"; then
|
||||
echo "$ac_t""$KSH" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
if test "$KSH" = no; then
|
||||
libc_cv_have_ksh=no
|
||||
else
|
||||
libc_cv_have_ksh=yes
|
||||
fi
|
||||
else
|
||||
KSH="$BASH"
|
||||
|
||||
libc_cv_have_ksh=yes
|
||||
fi
|
||||
|
||||
|
||||
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
|
||||
echo "configure:1414: checking for signed size_t type" >&5
|
||||
echo "configure:1582: checking for signed size_t type" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1434,12 +1602,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
|
||||
echo "configure:1438: checking for libc-friendly stddef.h" >&5
|
||||
echo "configure:1606: checking for libc-friendly stddef.h" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1443 "configure"
|
||||
#line 1611 "configure"
|
||||
#include "confdefs.h"
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
@@ -1454,7 +1622,7 @@ size_t size; wchar_t wchar;
|
||||
if (&size == NULL || &wchar == NULL) abort ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_friendly_stddef=yes
|
||||
else
|
||||
@@ -1473,7 +1641,7 @@ override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
|
||||
echo "configure:1477: checking whether we need to use -P to assemble .S files" >&5
|
||||
echo "configure:1645: checking whether we need to use -P to assemble .S files" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1496,7 +1664,7 @@ asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
|
||||
echo "configure:1500: checking for assembler global-symbol directive" >&5
|
||||
echo "configure:1668: checking for assembler global-symbol directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1526,7 +1694,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1530: checking for .set assembler directive" >&5
|
||||
echo "configure:1698: checking for .set assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1559,14 +1727,66 @@ EOF
|
||||
|
||||
fi
|
||||
|
||||
if test $elf = yes; then
|
||||
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1733: checking for .previous assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.s <<EOF
|
||||
.section foo_section
|
||||
.previous
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_asm_previous_directive=yes
|
||||
else
|
||||
libc_cv_asm_previous_directive=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
echo "$ac_t""$libc_cv_asm_previous_directive" 1>&6
|
||||
if test $libc_cv_asm_previous_directive = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_ASM_PREVIOUS_DIRECTIVE 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
|
||||
echo "configure:1757: checking for .popsection assembler directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.s <<EOF
|
||||
.pushsection foo_section
|
||||
.popsection
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_asm_popsection_directive=yes
|
||||
else
|
||||
libc_cv_asm_popsection_directive=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
echo "$ac_t""$libc_cv_asm_popsection_directive" 1>&6
|
||||
if test $libc_cv_asm_popsection_directive = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_ASM_POPSECTION_DIRECTIVE 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $elf != yes; then
|
||||
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
|
||||
echo "configure:1565: checking for .init and .fini sections" >&5
|
||||
echo "configure:1785: checking for .init and .fini sections" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1570 "configure"
|
||||
#line 1790 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
@@ -1575,7 +1795,7 @@ asm (".section .init");
|
||||
asm (".text");
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
libc_cv_have_initfini=yes
|
||||
else
|
||||
@@ -1600,19 +1820,19 @@ if test $elf = yes; then
|
||||
libc_cv_asm_underscores=no
|
||||
else
|
||||
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
|
||||
echo "configure:1604: checking for _ prefix on C symbol names" >&5
|
||||
echo "configure:1824: checking for _ prefix on C symbol names" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1609 "configure"
|
||||
#line 1829 "configure"
|
||||
#include "confdefs.h"
|
||||
asm ("_glibc_foobar:");
|
||||
int main() {
|
||||
glibc_foobar ();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
libc_cv_asm_underscores=yes
|
||||
else
|
||||
@@ -1639,7 +1859,7 @@ if test $elf = yes; then
|
||||
libc_cv_asm_weakext_directive=no
|
||||
else
|
||||
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
|
||||
echo "configure:1643: checking for assembler .weak directive" >&5
|
||||
echo "configure:1863: checking for assembler .weak directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1662,7 +1882,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
|
||||
|
||||
if test $libc_cv_asm_weak_directive = no; then
|
||||
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
|
||||
echo "configure:1666: checking for assembler .weakext directive" >&5
|
||||
echo "configure:1886: checking for assembler .weakext directive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1699,7 +1919,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
|
||||
echo "configure:1703: checking for ld --no-whole-archive" >&5
|
||||
echo "configure:1923: checking for ld --no-whole-archive" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1710,7 +1930,7 @@ __throw () {}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -Wl,--no-whole-archive
|
||||
-o conftest conftest.c'; { (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c'; { (eval echo configure:1934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_ld_no_whole_archive=yes
|
||||
else
|
||||
libc_cv_ld_no_whole_archive=no
|
||||
@@ -1721,7 +1941,7 @@ fi
|
||||
echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
|
||||
|
||||
echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6
|
||||
echo "configure:1725: checking for gcc -fno-exceptions" >&5
|
||||
echo "configure:1945: checking for gcc -fno-exceptions" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1732,7 +1952,7 @@ __throw () {}
|
||||
EOF
|
||||
if { ac_try='${CC-cc} $CFLAGS
|
||||
-nostdlib -nostartfiles -fno-exceptions
|
||||
-o conftest conftest.c'; { (eval echo configure:1736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
-o conftest conftest.c'; { (eval echo configure:1956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
libc_cv_gcc_no_exceptions=yes
|
||||
else
|
||||
libc_cv_gcc_no_exceptions=no
|
||||
@@ -1784,7 +2004,7 @@ if test "$uname" = generic; then
|
||||
fi
|
||||
|
||||
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
|
||||
echo "configure:1788: checking OS release for uname" >&5
|
||||
echo "configure:2008: checking OS release for uname" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1806,7 +2026,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6
|
||||
uname_release="$libc_cv_uname_release"
|
||||
|
||||
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
|
||||
echo "configure:1810: checking OS version for uname" >&5
|
||||
echo "configure:2030: checking OS version for uname" >&5
|
||||
if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@@ -1828,7 +2048,7 @@ else
|
||||
fi
|
||||
|
||||
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
|
||||
echo "configure:1832: checking stdio selection" >&5
|
||||
echo "configure:2052: checking stdio selection" >&5
|
||||
|
||||
case $stdio in
|
||||
libio) cat >> confdefs.h <<\EOF
|
||||
@@ -1839,15 +2059,7 @@ default) stdio=stdio ;;
|
||||
esac
|
||||
echo "$ac_t""$stdio" 1>&6
|
||||
|
||||
echo $ac_n "checking malloc selection""... $ac_c" 1>&6
|
||||
echo "configure:1844: checking malloc selection" >&5
|
||||
|
||||
case $malloc in
|
||||
new-malloc) USE_NEW_MALLOC=-DUSE_NEW_MALLOC ;;
|
||||
default) malloc=malloc ;;
|
||||
esac
|
||||
|
||||
echo "$ac_t""$malloc" 1>&6
|
||||
|
||||
|
||||
|
||||
@@ -1894,6 +2106,9 @@ else
|
||||
config_makefile=Makefile
|
||||
fi
|
||||
|
||||
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -1984,7 +2199,7 @@ do
|
||||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.11.2"
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.12"
|
||||
exit 0 ;;
|
||||
-help | --help | --hel | --he | --h)
|
||||
echo "\$ac_cs_usage"; exit 0 ;;
|
||||
@@ -1995,7 +2210,7 @@ done
|
||||
ac_given_srcdir=$srcdir
|
||||
ac_given_INSTALL="$INSTALL"
|
||||
|
||||
trap 'rm -fr `echo "config.make ${config_makefile} ${config_uname} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
trap 'rm -fr `echo "config.make glibcbug ${config_makefile} ${config_uname} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
@@ -2037,18 +2252,22 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@LN_S@%$LN_S%g
|
||||
s%@MSGFMT@%$MSGFMT%g
|
||||
s%@CC@%$CC%g
|
||||
s%@cross_linkable@%$cross_linkable%g
|
||||
s%@build@%$build%g
|
||||
s%@build_alias@%$build_alias%g
|
||||
s%@build_cpu@%$build_cpu%g
|
||||
s%@build_vendor@%$build_vendor%g
|
||||
s%@build_os@%$build_os%g
|
||||
s%@CC@%$CC%g
|
||||
s%@BUILD_CC@%$BUILD_CC%g
|
||||
s%@cross_compiling@%$cross_compiling%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@AR@%$AR%g
|
||||
s%@RANLIB@%$RANLIB%g
|
||||
s%@BASH@%$BASH%g
|
||||
s%@libc_cv_have_bash2@%$libc_cv_have_bash2%g
|
||||
s%@KSH@%$KSH%g
|
||||
s%@libc_cv_have_ksh@%$libc_cv_have_ksh%g
|
||||
s%@libc_cv_have_initfini@%$libc_cv_have_initfini%g
|
||||
s%@libc_cv_ld_no_whole_archive@%$libc_cv_ld_no_whole_archive%g
|
||||
s%@libc_cv_gcc_no_exceptions@%$libc_cv_gcc_no_exceptions%g
|
||||
@@ -2056,10 +2275,10 @@ s%@uname_sysname@%$uname_sysname%g
|
||||
s%@uname_release@%$uname_release%g
|
||||
s%@uname_version@%$uname_version%g
|
||||
s%@stdio@%$stdio%g
|
||||
s%@malloc@%$malloc%g
|
||||
s%@USE_NEW_MALLOC@%$USE_NEW_MALLOC%g
|
||||
s%@libc_cv_slibdir@%$libc_cv_slibdir%g
|
||||
s%@libc_cv_sysconfdir@%$libc_cv_sysconfdir%g
|
||||
s%@libc_cv_rootsbindir@%$libc_cv_rootsbindir%g
|
||||
s%@has_ldconfig@%$has_ldconfig%g
|
||||
s%@gnu_ld@%$gnu_ld%g
|
||||
s%@gnu_as@%$gnu_as%g
|
||||
s%@elf@%$elf%g
|
||||
@@ -2067,6 +2286,7 @@ s%@shared@%$shared%g
|
||||
s%@profile@%$profile%g
|
||||
s%@omitfp@%$omitfp%g
|
||||
s%@DEFINES@%$DEFINES%g
|
||||
s%@VERSION@%$VERSION%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
@@ -2108,7 +2328,7 @@ EOF
|
||||
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"config.make ${config_makefile} ${config_uname}"}
|
||||
CONFIG_FILES=\${CONFIG_FILES-"config.make glibcbug ${config_makefile} ${config_uname}"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||
|
||||
+60
-23
@@ -59,16 +59,6 @@ AC_ARG_ENABLE(libio, dnl
|
||||
fi],
|
||||
stdio=default)
|
||||
|
||||
AC_ARG_ENABLE(new-malloc, dnl
|
||||
[ --enable-new-malloc use the new malloc implementation. This is the
|
||||
default for Linux, others use the old malloc.],
|
||||
[if test $enableval = yes; then
|
||||
malloc=new-malloc
|
||||
else
|
||||
malloc=malloc
|
||||
fi],
|
||||
malloc=default)
|
||||
|
||||
AC_ARG_ENABLE(sanity-checks, dnl
|
||||
[ --disable-sanity-checks really do not use threads (should not be used
|
||||
except in special situations) [default=yes]],
|
||||
@@ -366,10 +356,12 @@ fi
|
||||
AC_PROG_LN_S
|
||||
AC_CHECK_PROGS(MSGFMT, msgfmt gmsgfmt, :)
|
||||
|
||||
AC_CHECK_TOOL(CC, gcc)
|
||||
AC_PROG_CC_LOCAL
|
||||
AC_CANONICAL_BUILD
|
||||
if test $host != $build; then
|
||||
AC_CHECK_PROG(BUILD_CC, gcc cc)
|
||||
AC_CHECK_PROGS(BUILD_CC, gcc cc)
|
||||
fi
|
||||
AC_SUBST(cross_compiling)
|
||||
AC_PROG_CPP
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
@@ -383,6 +375,21 @@ else
|
||||
fi
|
||||
AC_SUBST(libc_cv_have_bash2)
|
||||
|
||||
dnl We need a ksh compatible shell for tzselect.
|
||||
if test "$BASH" = no; then
|
||||
AC_PATH_PROG(KSH, ksh, no)
|
||||
if test "$KSH" = no; then
|
||||
libc_cv_have_ksh=no
|
||||
else
|
||||
libc_cv_have_ksh=yes
|
||||
fi
|
||||
else
|
||||
KSH="$BASH"
|
||||
AC_SUBST(KSH)
|
||||
libc_cv_have_ksh=yes
|
||||
fi
|
||||
AC_SUBST(libc_cv_have_ksh)
|
||||
|
||||
AC_CACHE_CHECK(for signed size_t type, libc_cv_signed_size_t, [dnl
|
||||
echo '#include <stddef.h>
|
||||
FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c
|
||||
@@ -481,6 +488,40 @@ if test $libc_cv_asm_set_directive = yes; then
|
||||
AC_DEFINE(HAVE_ASM_SET_DIRECTIVE)
|
||||
fi
|
||||
|
||||
if test $elf = yes; then
|
||||
AC_CACHE_CHECK(for .previous assembler directive,
|
||||
libc_cv_asm_previous_directive, [dnl
|
||||
cat > conftest.s <<EOF
|
||||
.section foo_section
|
||||
.previous
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then
|
||||
libc_cv_asm_previous_directive=yes
|
||||
else
|
||||
libc_cv_asm_previous_directive=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test $libc_cv_asm_previous_directive = yes; then
|
||||
AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE)
|
||||
else
|
||||
AC_CACHE_CHECK(for .popsection assembler directive,
|
||||
libc_cv_asm_popsection_directive, [dnl
|
||||
cat > conftest.s <<EOF
|
||||
.pushsection foo_section
|
||||
.popsection
|
||||
EOF
|
||||
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then
|
||||
libc_cv_asm_popsection_directive=yes
|
||||
else
|
||||
libc_cv_asm_popsection_directive=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test $libc_cv_asm_popsection_directive = yes; then
|
||||
AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $elf != yes; then
|
||||
AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
|
||||
[AC_TRY_COMPILE(, [asm (".section .init");
|
||||
@@ -687,18 +728,11 @@ default) stdio=stdio ;;
|
||||
esac
|
||||
AC_MSG_RESULT($stdio)
|
||||
|
||||
AC_MSG_CHECKING(malloc selection)
|
||||
AC_SUBST(malloc)
|
||||
case $malloc in
|
||||
new-malloc) USE_NEW_MALLOC=-DUSE_NEW_MALLOC ;;
|
||||
default) malloc=malloc ;;
|
||||
esac
|
||||
AC_SUBST(USE_NEW_MALLOC)
|
||||
AC_MSG_RESULT($malloc)
|
||||
|
||||
|
||||
AC_SUBST(libc_cv_slibdir)
|
||||
AC_SUBST(libc_cv_sysconfdir)
|
||||
AC_SUBST(libc_cv_rootsbindir)
|
||||
|
||||
AC_SUBST(has_ldconfig)
|
||||
|
||||
AC_SUBST(gnu_ld) AC_SUBST(gnu_as) AC_SUBST(elf)
|
||||
if test $gnu_ld = yes; then
|
||||
@@ -732,5 +766,8 @@ else
|
||||
config_makefile=Makefile
|
||||
fi
|
||||
|
||||
AC_OUTPUT(config.make ${config_makefile} ${config_uname}, ,
|
||||
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
|
||||
AC_SUBST(VERSION)
|
||||
|
||||
AC_OUTPUT(config.make glibcbug ${config_makefile} ${config_uname}, ,
|
||||
[echo '$config_vars' >> config.make])
|
||||
|
||||
+24
-21
@@ -1,6 +1,6 @@
|
||||
# Makefile for csu code for GNU C library.
|
||||
|
||||
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@ omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \
|
||||
$(csu-dummies))
|
||||
install-lib = $(start-installed-name) g$(start-installed-name) \
|
||||
$(csu-dummies)
|
||||
distribute = initfini.c gmon-start.c start.c
|
||||
distribute = initfini.c gmon-start.c start.c defs.awk
|
||||
|
||||
all: # Make this the default target; it will be defined in Rules.
|
||||
|
||||
@@ -56,7 +56,7 @@ have-initfini = yes
|
||||
|
||||
endif
|
||||
|
||||
ifeq (yes,$(have-initfini))
|
||||
ifeq ($(have-initfini),yes)
|
||||
|
||||
CPPFLAGS += -DHAVE_INITFINI
|
||||
|
||||
@@ -67,27 +67,30 @@ crtstuff = crti crtn
|
||||
|
||||
install-lib += $(crtstuff:=.o)
|
||||
extra-objs += $(crtstuff:=.o)
|
||||
generated += $(crtstuff:=.s)
|
||||
generated += $(crtstuff:=.S) initfini.s align.h end.h
|
||||
omit-deps += $(crtstuff)
|
||||
|
||||
# Compile initfini.c to assembly code, which contains embedded shell
|
||||
# commands that produce crti.s-new and crtn.s-new when run. We need to
|
||||
# disable emission of .size directives and debugging information, since
|
||||
# they will get confused by the splitting of the output we do.
|
||||
$(objpfx)cr%i.s $(objpfx)cr%n.s: initfini.c; $(initfini)
|
||||
# Special rules for the building of crti.o and crtn.o
|
||||
$(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h
|
||||
$(CC) -c -fPIC -g0 -I$(..) -I$(common-objpfx) -DASSEMBLER $< -o $@
|
||||
|
||||
define initfini
|
||||
-rm -f $(objpfx)crtcommon.tmp
|
||||
(echo 'cat > crtcommon.tmp <<\EOF_common'; \
|
||||
$(CC) $< $(CPPFLAGS) $(CFLAGS) \
|
||||
-fPIC -finhibit-size-directive $(no-exceptions) -g0 -S -o -; \
|
||||
echo 'EOF_common') | (cd $(@D); $(SHELL))
|
||||
cat $(objpfx)crtcommon.tmp >> $(objpfx)crti.s-new
|
||||
cat $(objpfx)crtcommon.tmp >> $(objpfx)crtn.s-new
|
||||
rm -f $(objpfx)crtcommon.tmp
|
||||
mv -f $(objpfx)crti.s-new $(subst crtn,crti,$@)
|
||||
mv -f $(objpfx)crtn.s-new $(subst crti,crtn,$@)
|
||||
endef
|
||||
$(objpfx)initfini.s: initfini.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -g0 -S -fPIC -finhibit-size-directive \
|
||||
$(no-exceptions) $< -o $@
|
||||
|
||||
$(objpfx)crti.S: $(objpfx)initfini.s
|
||||
sed -n -e '1,/@HEADER_ENDS/p' \
|
||||
-e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
|
||||
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
||||
|
||||
$(objpfx)crtn.S: $(objpfx)initfini.s
|
||||
sed -n -e '1,/@HEADER_ENDS/p' \
|
||||
-e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
|
||||
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
||||
|
||||
$(objpfx)defs.h: $(objpfx)initfini.s
|
||||
sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
|
||||
awk -f defs.awk > $@
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/.end/ { need_end = 1 }
|
||||
/.align/ { if($2 > max) max = $2; }
|
||||
|
||||
END {
|
||||
if(need_end)
|
||||
{
|
||||
print "#define END_INIT .end _init";
|
||||
print "#define END_FINI .end _fini";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "#define END_INIT";
|
||||
print "#define END_FINI";
|
||||
}
|
||||
if(max)
|
||||
print "#define ALIGN .align", max;
|
||||
else
|
||||
print "#define ALIGN";
|
||||
|
||||
print "#include <libc-symbols.h>";
|
||||
print "weak_extern (__gmon_start__)";
|
||||
}
|
||||
+47
-79
@@ -1,5 +1,5 @@
|
||||
/* Special .init and .fini section support.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it
|
||||
@@ -26,68 +26,40 @@
|
||||
write to the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file is compiled into assembly code which is then surrounded by the
|
||||
lines `cat > crtcommon.tmp <<\EOF_common' and `EOF_common' and thus
|
||||
becomes a shell script which creates three files of assembly code.
|
||||
/* This file is compiled into assembly code which is then munged by a sed
|
||||
script into two files: crti.s and crtn.s.
|
||||
|
||||
* The first file is crti.s-new; this puts a function prologue at the
|
||||
beginning of the .init and .fini sections and defines global symbols for
|
||||
* crti.s puts a function prologue at the beginning of the
|
||||
.init and .fini sections and defines global symbols for
|
||||
those addresses, so they can be called as functions.
|
||||
|
||||
* The second file is crtn.s-new; this puts the corresponding function
|
||||
epilogues in the .init and .fini sections.
|
||||
|
||||
* The third file is crtcommon.tmp, which is whatever miscellaneous cruft
|
||||
the compiler generated at the end; it should be appended to both crti.s-new
|
||||
and crtn.s-new. */
|
||||
* crtn.s puts the corresponding function epilogues
|
||||
in the .init and .fini sections. */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/* We use embedded asm for .section unconditionally, as this makes it
|
||||
easier to insert the necessary directives into crtn.S. */
|
||||
#define SECTION(x) asm (".section \"" x "\"");
|
||||
|
||||
#ifdef HAVE_ELF
|
||||
/* These declarations make the functions go in the right sections when
|
||||
we define them below. GCC syntax does not allow the attribute
|
||||
specifications to be in the function definitions themselves. */
|
||||
void _init (void) __attribute__ ((section (".init")));
|
||||
void _fini (void) __attribute__ ((section (".fini")));
|
||||
/* Embed an #include to pull in the alignment and .end directives. */
|
||||
asm ("\n#include \"defs.h\"");
|
||||
|
||||
#define SECTION(x) /* Put nothing extra before the defn. */
|
||||
/* The initial common code ends here. */
|
||||
asm ("\n/*@HEADER_ENDS*/");
|
||||
|
||||
#else
|
||||
/* Some non-ELF systems support .init and .fini sections,
|
||||
but the __attribute__ syntax only works for ELF. */
|
||||
#define SECTION(x) asm (".section " x);
|
||||
#endif
|
||||
|
||||
/* End the here document containing the initial common code.
|
||||
Then move the output file crtcommon.tmp to crti.s-new and crtn.s-new. */
|
||||
asm ("\nEOF_common\n\
|
||||
rm -f crti.s-new crtn.s-new\n\
|
||||
mv crtcommon.tmp crti.s-new\n\
|
||||
cp crti.s-new crtn.s-new");
|
||||
|
||||
/* Extract a `.end' if one is produced by the compiler. */
|
||||
asm ("fgrep .end >/dev/null 2>&1 <<\\EOF.end && need_end=yes");
|
||||
/* To determine whether we need .end and .align: */
|
||||
asm ("\n/*@TESTS_BEGIN*/");
|
||||
void
|
||||
useless_function (void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
asm ("\nEOF.end\n");
|
||||
|
||||
/* Find out how much alignment is produced by the compiler. */
|
||||
asm ("align=`awk '$1==\".align\" { if ($2>max) max=$2; } END { print max; }' \
|
||||
<<\\EOF.align");
|
||||
void
|
||||
useless_function2 (void (*foo) (void))
|
||||
dummy (void (*foo) (void))
|
||||
{
|
||||
if (foo)
|
||||
(*foo) ();
|
||||
}
|
||||
asm ("\nEOF.align\n`\n");
|
||||
asm ("\n/*@TESTS_END*/");
|
||||
|
||||
/* Append the .init prologue to crti.s-new. */
|
||||
asm ("cat >> crti.s-new <<\\EOF.crti.init");
|
||||
/* The beginning of _init: */
|
||||
asm ("\n/*@_init_PROLOG_BEGINS*/");
|
||||
|
||||
SECTION (".init")
|
||||
void
|
||||
@@ -99,38 +71,33 @@ _init (void)
|
||||
gcrt1.o to reference a symbol which would be defined by some library
|
||||
module which has a constructor; but then user code's constructors
|
||||
would come first, and not be profiled. */
|
||||
extern void __gmon_start__ (void); weak_extern (__gmon_start__)
|
||||
extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/
|
||||
|
||||
if (__gmon_start__)
|
||||
__gmon_start__ ();
|
||||
|
||||
/* End the here document containing the .init prologue code.
|
||||
Then fetch the .section directive just written and append that
|
||||
to crtn.s-new, followed by the function epilogue. */
|
||||
asm ("\n\
|
||||
EOF.crti.init\n\
|
||||
test -n \"$align\" && echo .align $align >> crti.s-new\n\
|
||||
test -n \"$need_end\" && echo .end _init >> crti.s-new\n\
|
||||
fgrep .init crti.s-new >>crtn.s-new\n\
|
||||
fgrep -v .end >> crtn.s-new <<\\EOF.crtn.init");
|
||||
asm ("ALIGN");
|
||||
asm("END_INIT");
|
||||
/* Now the epilog. */
|
||||
asm ("\n/*@_init_PROLOG_ENDS*/");
|
||||
asm ("\n/*@_init_EPILOG_BEGINS*/");
|
||||
SECTION(".init");
|
||||
}
|
||||
asm ("END_INIT");
|
||||
|
||||
/* End the here document containing the .init epilogue code.
|
||||
Then append the .fini prologue to crti.s-new. */
|
||||
asm ("\nEOF.crtn.init\
|
||||
\n\
|
||||
cat >> crti.s-new <<\\EOF.crti.fini");
|
||||
/* End of the _init epilog, beginning of the _fini prolog. */
|
||||
asm ("\n/*@_init_EPILOG_ENDS*/");
|
||||
asm ("\n/*@_fini_PROLOG_BEGINS*/");
|
||||
|
||||
SECTION (".fini")
|
||||
void
|
||||
_fini (void)
|
||||
{
|
||||
/* End the here document containing the .fini prologue code.
|
||||
Then fetch the .section directive just written and append that
|
||||
to crtn.s-new, followed by the function epilogue. */
|
||||
asm ("\nEOF.crti.fini\n\
|
||||
test -n \"$align\" && echo .align $align >> crti.s-new\n\
|
||||
test -n \"$need_end\" && echo .end _fini >> crti.s-new\n\
|
||||
cat > /dev/null <<\\EOF.fini.skip");
|
||||
|
||||
/* End of the _fini prolog. */
|
||||
asm ("ALIGN");
|
||||
asm ("END_FINI");
|
||||
asm ("\n/*@_fini_PROLOG_ENDS*/");
|
||||
|
||||
{
|
||||
/* Let GCC know that _fini is not a leaf function by having a dummy
|
||||
@@ -140,14 +107,15 @@ cat > /dev/null <<\\EOF.fini.skip");
|
||||
i_am_not_a_leaf ();
|
||||
}
|
||||
|
||||
asm ("\nEOF.fini.skip\
|
||||
\n\
|
||||
fgrep .fini crti.s-new >>crtn.s-new\n\
|
||||
fgrep -v .end >> crtn.s-new <<\\EOF.crtn.fini");
|
||||
/* Beginning of the _fini epilog. */
|
||||
asm ("\n/*@_fini_EPILOG_BEGINS*/");
|
||||
SECTION (".fini");
|
||||
}
|
||||
asm ("END_FINI");
|
||||
|
||||
/* End the here document containing the .fini epilogue code.
|
||||
Finally, put the remainder of the generated assembly into crtcommon.tmp. */
|
||||
asm ("\nEOF.crtn.fini\
|
||||
\n\
|
||||
cat > crtcommon.tmp <<\\EOF_common");
|
||||
/* End of the _fini epilog. Any further generated assembly (e.g. .ident)
|
||||
is shared between both crt files. */
|
||||
asm ("\n/*@_fini_EPILOG_ENDS*/");
|
||||
asm ("\n/*@TRAILER_BEGINS*/");
|
||||
|
||||
/* End of file. */
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 1992, 1993, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -12,9 +12,9 @@
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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 ctype portion of the library.
|
||||
|
||||
@@ -45,3 +45,8 @@ $(objpfx)makedb: $(objpfx)libdb.so$(libdb.so-version)
|
||||
else
|
||||
$(objpfx)makedb: $(objpfx)libdb.a
|
||||
endif
|
||||
|
||||
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
||||
# This ensures they will load libc.so for needed symbols if loaded by
|
||||
# a statically-linked program that hasn't already loaded it.
|
||||
$(objpfx)libdb.so: $(common-objpfx)libc.so
|
||||
|
||||
+3
-2
@@ -674,7 +674,8 @@ bt_psplit(t, h, l, r, pskip, ilen)
|
||||
* where we decide to try and copy too much onto the left page.
|
||||
* Make sure that doesn't happen.
|
||||
*/
|
||||
if (skip <= off && used + nbytes >= full) {
|
||||
if (skip <= off &&
|
||||
used + nbytes + sizeof(indx_t) >= full || nxt == top - 1) {
|
||||
--off;
|
||||
break;
|
||||
}
|
||||
@@ -687,7 +688,7 @@ bt_psplit(t, h, l, r, pskip, ilen)
|
||||
memmove((char *)l + l->upper, src, nbytes);
|
||||
}
|
||||
|
||||
used += nbytes;
|
||||
used += nbytes + sizeof(indx_t);
|
||||
if (used >= half) {
|
||||
if (!isbigkey || bigkeycnt == 3)
|
||||
break;
|
||||
|
||||
@@ -249,7 +249,7 @@ __big_delete(hashp, bufp)
|
||||
bufp->flags |= BUF_MOD;
|
||||
if (rbufp)
|
||||
__free_ovflpage(hashp, rbufp);
|
||||
if (last_bfp != rbufp)
|
||||
if (last_bfp && last_bfp != rbufp)
|
||||
__free_ovflpage(hashp, last_bfp);
|
||||
|
||||
hashp->NKEYS--;
|
||||
|
||||
+5
-4
@@ -1,5 +1,5 @@
|
||||
/* makedb -- create simple DB database from textual input.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
@@ -86,7 +86,7 @@ main (argc, argv)
|
||||
be_quiet = 0;
|
||||
output_name = NULL;
|
||||
|
||||
while ((opt = getopt_long (argc, argv, "fho:uV", long_options, NULL)) != EOF)
|
||||
while ((opt = getopt_long (argc, argv, "fho:uV", long_options, NULL)) != -1)
|
||||
switch (opt)
|
||||
{
|
||||
case '\0': /* Long option. */
|
||||
@@ -121,7 +121,7 @@ main (argc, argv)
|
||||
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\
|
||||
"), "1996");
|
||||
"), "1996, 1997");
|
||||
printf (_("Written by %s.\n"), "Ulrich Drepper");
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
@@ -224,7 +224,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
If INPUT-FILE is -, input is read from standard input.\n"),
|
||||
program_invocation_name, program_invocation_name,
|
||||
program_invocation_name);
|
||||
fputs (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"),
|
||||
fputs (gettext ("\
|
||||
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"),
|
||||
stdout);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -12,9 +12,9 @@
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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 dirent portion of the library.
|
||||
|
||||
+17
-19
@@ -1,29 +1,27 @@
|
||||
/* Copyright (C) 1992 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
DEFUN(alphasort, (a, b),
|
||||
CONST PTR a AND CONST PTR b)
|
||||
alphasort (const void *a, const void *b)
|
||||
{
|
||||
return strcmp (((struct dirent *) a)->d_name,
|
||||
((struct dirent *) b)->d_name);
|
||||
return strcmp ((*(const struct dirent **) a)->d_name,
|
||||
(*(const struct dirent **) b)->d_name);
|
||||
}
|
||||
|
||||
+38
-35
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -39,12 +39,15 @@ __BEGIN_DECLS
|
||||
|
||||
It defines the macro `_DIRENT_HAVE_D_OFF' iff there is a `d_off'
|
||||
member that gives the file offset of the next directory entry.
|
||||
|
||||
It defines the macro `_DIRENT_HAVE_D_TYPE' iff there is a `d_type'
|
||||
member that gives the type of the file.
|
||||
*/
|
||||
|
||||
#include <direntry.h>
|
||||
|
||||
#if (defined(__USE_BSD) || defined(__USE_MISC)) && !defined(d_fileno)
|
||||
#define d_ino d_fileno /* Backward compatibility. */
|
||||
#if (defined __USE_BSD || defined __USE_MISC) && !defined d_fileno
|
||||
# define d_ino d_fileno /* Backward compatibility. */
|
||||
#endif
|
||||
|
||||
/* These macros extract size information from a `struct dirent *'.
|
||||
@@ -62,16 +65,16 @@ __BEGIN_DECLS
|
||||
*/
|
||||
|
||||
#ifdef _DIRENT_HAVE_D_NAMLEN
|
||||
#define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
|
||||
#define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
|
||||
# define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
|
||||
# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
|
||||
#else
|
||||
#define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
|
||||
#ifdef _DIRENT_HAVE_D_RECLEN
|
||||
#define _D_ALLOC_NAMLEN(d) (((char *) (d) + (d)->d_reclen) - &(d)->d_name[0])
|
||||
#else
|
||||
#define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name : \
|
||||
_D_EXACT_NAMLEN (d) + 1)
|
||||
#endif
|
||||
# define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
|
||||
# ifdef _DIRENT_HAVE_D_RECLEN
|
||||
# define _D_ALLOC_NAMLEN(d) (((char *) (d) + (d)->d_reclen) - &(d)->d_name[0])
|
||||
# else
|
||||
# define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name : \
|
||||
_D_EXACT_NAMLEN (d) + 1)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -90,8 +93,8 @@ enum
|
||||
};
|
||||
|
||||
/* Convert between stat structure types and directory types. */
|
||||
#define IFTODT(mode) (((mode) & 0170000) >> 12)
|
||||
#define DTTOIF(dirtype) ((dirtype) << 12)
|
||||
# define IFTODT(mode) (((mode) & 0170000) >> 12)
|
||||
# define DTTOIF(dirtype) ((dirtype) << 12)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -116,42 +119,42 @@ extern int closedir __P ((DIR *__dirp));
|
||||
extern struct dirent *__readdir __P ((DIR *__dirp));
|
||||
extern struct dirent *readdir __P ((DIR *__dirp));
|
||||
|
||||
#ifdef __USE_REENTRANT
|
||||
#if defined __USE_POSIX || defined __USE_MISC
|
||||
/* Reentrant version of `readdir'. Return in RESULT a pointer to the
|
||||
next entry. */
|
||||
extern int __readdir_r __P ((DIR *__dirp, struct dirent *entry,
|
||||
struct dirent **result));
|
||||
extern int readdir_r __P ((DIR *__dirp, struct dirent *entry,
|
||||
struct dirent **result));
|
||||
#endif
|
||||
extern int __readdir_r __P ((DIR *__dirp, struct dirent *__entry,
|
||||
struct dirent **__result));
|
||||
extern int readdir_r __P ((DIR *__dirp, struct dirent *__entry,
|
||||
struct dirent **__result));
|
||||
#endif /* POSIX or misc */
|
||||
|
||||
/* Rewind DIRP to the beginning of the directory. */
|
||||
extern void rewinddir __P ((DIR *__dirp));
|
||||
|
||||
#if defined(__USE_BSD) || defined(__USE_MISC)
|
||||
#if defined __USE_BSD || defined __USE_MISC
|
||||
|
||||
/* Return the file descriptor used by DIRP. */
|
||||
extern int dirfd __P ((DIR *__dirp));
|
||||
|
||||
#if defined (__OPTIMIZE__) && defined (_DIR_dirfd)
|
||||
#define dirfd(dirp) _DIR_dirfd (dirp)
|
||||
#endif
|
||||
# if defined __OPTIMIZE__ && defined _DIR_dirfd
|
||||
# define dirfd(dirp) _DIR_dirfd (dirp)
|
||||
# endif
|
||||
|
||||
#ifndef MAXNAMLEN
|
||||
# ifndef MAXNAMLEN
|
||||
/* Get the definitions of the POSIX.1 limits. */
|
||||
#include <posix1_lim.h>
|
||||
# include <posix1_lim.h>
|
||||
|
||||
/* `MAXNAMLEN' is the BSD name for what POSIX calls `NAME_MAX'. */
|
||||
#ifdef NAME_MAX
|
||||
#define MAXNAMLEN NAME_MAX
|
||||
#else
|
||||
#define MAXNAMLEN 255
|
||||
#endif
|
||||
#endif
|
||||
# ifdef NAME_MAX
|
||||
# define MAXNAMLEN NAME_MAX
|
||||
# else
|
||||
# define MAXNAMLEN 255
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#include <gnu/types.h>
|
||||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
# include <gnu/types.h>
|
||||
# define __need_size_t
|
||||
# include <stddef.h>
|
||||
|
||||
/* Seek to position POS on DIRP. */
|
||||
extern void seekdir __P ((DIR *__dirp, __off_t __pos));
|
||||
|
||||
+41
-7
@@ -1,6 +1,6 @@
|
||||
# Makefile for elf subdirectory of GNU C Library.
|
||||
|
||||
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -41,6 +41,8 @@ extra-libs = libdl
|
||||
extra-libs-others = $(extra-libs)
|
||||
libdl-routines := dlopen dlclose dlsym dlerror dladdr
|
||||
|
||||
before-compile = $(objpfx)trusted-dirs.h
|
||||
|
||||
|
||||
all: # Make this the default target; it will be defined in Rules.
|
||||
|
||||
@@ -49,14 +51,26 @@ include ../Makeconfig
|
||||
ifeq (yes,$(build-shared))
|
||||
extra-objs = $(rtld-routines:=.so) soinit.so sofini.so eval.so
|
||||
generated = librtld.so dl-allobjs.so
|
||||
install-others = $(slibdir)/$(rtld-installed-name)
|
||||
install-others = $(inst_slibdir)/$(rtld-installed-name)
|
||||
install-bin = ldd
|
||||
endif
|
||||
|
||||
ifeq (yes,$(has-ldconfig))
|
||||
extra-objs += ldconfig.o
|
||||
install-rootsbin = ldconfig
|
||||
|
||||
$(objpfx)ldconfig: $(objpfx)ldconfig.o
|
||||
$(CC) -nostdlib -nostartfiles -o $@ $(sysdep-LDFLAGS) -static \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
|
||||
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
|
||||
$(link-extra-libs) $(common-objpfx)libc.a $(gnulib) $(+postinit)
|
||||
endif
|
||||
|
||||
include ../Rules
|
||||
|
||||
|
||||
ifeq (yes, $(build-shared))
|
||||
ifeq (yes,$(build-shared))
|
||||
# Make sure these things are built in the `make lib' pass so they can be used
|
||||
# to run programs during the `make others' pass.
|
||||
lib-noranlib: $(objpfx)$(rtld-installed-name) \
|
||||
@@ -84,7 +98,7 @@ endef
|
||||
# The dl code in the static libc needs a default library path.
|
||||
CFLAGS-dl-support.c = -D'DEFAULT_RPATH="$(default-rpath)"'
|
||||
|
||||
ifneq (ld.so, $(rtld-installed-name))
|
||||
ifneq (ld.so,$(rtld-installed-name))
|
||||
# Make sure ld.so.1 exists in the build directory so we can link
|
||||
# against it.
|
||||
$(objpfx)$(rtld-installed-name): $(objpfx)ld.so
|
||||
@@ -92,21 +106,41 @@ $(objpfx)$(rtld-installed-name): $(objpfx)ld.so
|
||||
ln -s $(<F) $@
|
||||
endif
|
||||
|
||||
# Build a file mentioning all trustworthy directories to look for shared
|
||||
# libraries when using LD_LIBRARY_PATH in a setuid program. The user can
|
||||
# add directories to the list by defining $(user-defined-trusted-dirs)
|
||||
# before starting make.
|
||||
$(objpfx)trusted-dirs.h: Makefile
|
||||
$(make-target-directory)
|
||||
(for dir in `echo "$(default-rpath) $(user-defined-trusted-dirs)" | \
|
||||
sed 's/:/ /g'`; do \
|
||||
echo " \"$$dir\","; \
|
||||
done;) > $@T
|
||||
mv -f $@T $@
|
||||
CPPFLAGS-dl-load.c = -I$(objdir)/$(subdir)
|
||||
CFLAGS-dl-load.c += -Wno-uninitialized
|
||||
|
||||
# Specify the dependencies of libdl.so; its commands come from the generic
|
||||
# rule to build a shared library.
|
||||
$(objpfx)libdl.so: $(objpfx)libdl_pic.a $(common-objpfx)libc.so $(objpfx)ld.so
|
||||
|
||||
$(slibdir)/$(rtld-installed-name): $(objpfx)ld.so; $(do-install-program)
|
||||
$(inst_slibdir)/$(rtld-version-installed-name): $(objpfx)ld.so
|
||||
$(do-install-program)
|
||||
|
||||
$(inst_slibdir)/$(rtld-installed-name): \
|
||||
$(inst_slibdir)/$(rtld-version-installed-name)
|
||||
$(make-shlib-link)
|
||||
|
||||
ifneq ($(have-bash2),yes)
|
||||
$(objpfx)ldd: ldd.sh.in Makefile
|
||||
$(objpfx)ldd: ldd.sh.in $(common-objpfx)version.mk \
|
||||
$(common-objpfx)soversions.mk $(common-objpfx)config.make
|
||||
sed -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
|
||||
-e 's%@VERSION@%$(version)%g' < $< > $@.new
|
||||
chmod 555 $@.new
|
||||
mv -f $@.new $@
|
||||
else
|
||||
$(objpfx)ldd: ldd.bash.in Makefile
|
||||
$(objpfx)ldd: ldd.bash.in $(common-objpfx)version.mk \
|
||||
$(common-objpfx)soversions.mk $(common-objpfx)config.make
|
||||
sed -e 's%@BASH@%$(BASH)%g' \
|
||||
-e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
|
||||
-e 's%@VERSION@%$(version)%g' \
|
||||
|
||||
+79
-20
@@ -1,5 +1,5 @@
|
||||
/* Load the dependencies of a mapped object.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -32,33 +32,86 @@ _dl_map_object_deps (struct link_map *map,
|
||||
struct link_map *map;
|
||||
struct list *next;
|
||||
};
|
||||
struct list head[1 + npreloads], *tailp, *scanp;
|
||||
struct list *head, *tailp, *scanp;
|
||||
struct list duphead, *duptailp;
|
||||
unsigned int nlist;
|
||||
unsigned int nduplist;
|
||||
|
||||
/* Start the search list with one element: MAP itself. */
|
||||
head[0].map = map;
|
||||
|
||||
/* We use `l_reserved' as a mark bit to detect objects we have already
|
||||
put in the search list and avoid adding duplicate elements later in
|
||||
the list. */
|
||||
map->l_reserved = 1;
|
||||
|
||||
/* Add the preloaded items after MAP but before any of its dependencies. */
|
||||
for (nlist = 0; nlist < npreloads; ++nlist)
|
||||
unsigned int nlist, naux, i;
|
||||
inline void preload (struct link_map *map)
|
||||
{
|
||||
head[nlist].next = &head[nlist + 1];
|
||||
head[nlist + 1].map = preloads[nlist];
|
||||
preloads[nlist]->l_reserved = 1;
|
||||
head[nlist++].map = map;
|
||||
|
||||
/* We use `l_reserved' as a mark bit to detect objects we have
|
||||
already put in the search list and avoid adding duplicate
|
||||
elements later in the list. */
|
||||
map->l_reserved = 1;
|
||||
}
|
||||
|
||||
naux = nlist = 0;
|
||||
|
||||
/* XXX The AUXILIARY implementation isn't correct in the moment. XXX
|
||||
XXX The problem is that we currently do not handle auxiliary XXX
|
||||
XXX entries in the loaded objects. XXX */
|
||||
|
||||
#define AUXTAG (DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM \
|
||||
+ DT_EXTRATAGIDX (DT_AUXILIARY))
|
||||
|
||||
/* First determine the number of auxiliary objects we have to load. */
|
||||
if (map->l_info[AUXTAG])
|
||||
{
|
||||
ElfW(Dyn) *d;
|
||||
for (d = map->l_ld; d->d_tag != DT_NULL; ++d)
|
||||
if (d->d_tag == DT_AUXILIARY)
|
||||
++naux;
|
||||
}
|
||||
|
||||
/* Now we can allocate the array for the linker maps. */
|
||||
head = (struct list *) alloca (sizeof (struct list)
|
||||
* (naux + npreloads + 2));
|
||||
|
||||
/* Load the auxiliary objects, even before the object itself. */
|
||||
if (map->l_info[AUXTAG])
|
||||
{
|
||||
/* There is at least one auxiliary library specified. We try to
|
||||
load it, and if we can, use its symbols in preference to our
|
||||
own. But if we can't load it, we just silently ignore it. */
|
||||
const char *strtab
|
||||
= ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
|
||||
ElfW(Dyn) *d;
|
||||
|
||||
for (d = map->l_ld; d->d_tag != DT_NULL; ++d)
|
||||
if (d->d_tag == DT_AUXILIARY)
|
||||
{
|
||||
struct link_map *aux;
|
||||
void openaux (void)
|
||||
{
|
||||
aux = _dl_map_object (map, strtab + d->d_un.d_val,
|
||||
(map->l_type == lt_executable
|
||||
? lt_library : map->l_type),
|
||||
trace_mode);
|
||||
}
|
||||
char *errstring;
|
||||
const char *objname;
|
||||
if (! _dl_catch_error (&errstring, &objname, openaux))
|
||||
/* The auxiliary object is actually there. Use it as
|
||||
the first search element, even before MAP itself. */
|
||||
preload (aux);
|
||||
}
|
||||
}
|
||||
|
||||
/* Next load MAP itself. */
|
||||
preload (map);
|
||||
|
||||
/* Add the preloaded items after MAP but before any of its dependencies. */
|
||||
for (i = 0; i < npreloads; ++i)
|
||||
preload (preloads[i]);
|
||||
|
||||
/* Terminate the lists. */
|
||||
head[nlist].next = NULL;
|
||||
head[nlist - 1].next = NULL;
|
||||
duphead.next = NULL;
|
||||
|
||||
/* Start here for adding dependencies to the list. */
|
||||
tailp = &head[nlist++];
|
||||
tailp = &head[nlist - 1];
|
||||
|
||||
/* Until now we have the same number of libraries in the normal and
|
||||
the list with duplicates. */
|
||||
@@ -104,7 +157,7 @@ _dl_map_object_deps (struct link_map *map,
|
||||
dep->l_reserved = 1;
|
||||
}
|
||||
|
||||
/* In any case Append DEP to the duplicates search list. */
|
||||
/* In any case append DEP to the duplicates search list. */
|
||||
duptailp->next = alloca (sizeof *duptailp);
|
||||
duptailp = duptailp->next;
|
||||
duptailp->map = dep;
|
||||
@@ -117,6 +170,9 @@ _dl_map_object_deps (struct link_map *map,
|
||||
/* Store the search list we built in the object. It will be used for
|
||||
searches in the scope of this object. */
|
||||
map->l_searchlist = malloc (nlist * sizeof (struct link_map *));
|
||||
if (map->l_searchlist == NULL)
|
||||
_dl_signal_error (ENOMEM, map->l_name,
|
||||
"cannot allocate symbol search list");
|
||||
map->l_nsearchlist = nlist;
|
||||
|
||||
nlist = 0;
|
||||
@@ -130,9 +186,12 @@ _dl_map_object_deps (struct link_map *map,
|
||||
}
|
||||
|
||||
map->l_dupsearchlist = malloc (nduplist * sizeof (struct link_map *));
|
||||
if (map->l_dupsearchlist == NULL)
|
||||
_dl_signal_error (ENOMEM, map->l_name,
|
||||
"cannot allocate symbol search list");
|
||||
map->l_ndupsearchlist = nduplist;
|
||||
|
||||
for (nlist = 0; nlist < npreloads + 1; ++nlist)
|
||||
for (nlist = 0; nlist < naux + 1 + npreloads; ++nlist)
|
||||
map->l_dupsearchlist[nlist] = head[nlist].map;
|
||||
for (scanp = duphead.next; scanp; scanp = scanp->next)
|
||||
map->l_dupsearchlist[nlist++] = scanp->map;
|
||||
|
||||
+38
-4
@@ -1,5 +1,5 @@
|
||||
/* Error handling for runtime dynamic linker.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -37,6 +37,11 @@ struct catch
|
||||
this is null. */
|
||||
static struct catch *catch;
|
||||
|
||||
/* This points to a function which is called when an error is
|
||||
received. Unlike the handling of `catch' this function may return.
|
||||
The arguments will be the `errstring' and `objname'. */
|
||||
static receiver_fct receiver;
|
||||
|
||||
|
||||
void
|
||||
_dl_signal_error (int errcode,
|
||||
@@ -58,6 +63,13 @@ _dl_signal_error (int errcode,
|
||||
catch->objname = objname;
|
||||
longjmp (catch->env, errcode ?: -1);
|
||||
}
|
||||
else if (receiver)
|
||||
{
|
||||
/* We are inside _dl_receive_error. Call the user supplied
|
||||
handler and resume the work. The receiver will still
|
||||
installed. */
|
||||
(*receiver) (errstring, objname);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Lossage while resolving the program's own symbols is always fatal. */
|
||||
@@ -76,22 +88,44 @@ _dl_catch_error (char **errstring,
|
||||
void (*operate) (void))
|
||||
{
|
||||
int errcode;
|
||||
struct catch c = { errstring: NULL, objname: NULL };
|
||||
struct catch *old, c = { errstring: NULL, objname: NULL };
|
||||
/* We need not handle `receiver' since setting a `catch' is handle
|
||||
before it. */
|
||||
|
||||
old = catch;
|
||||
errcode = setjmp (c.env);
|
||||
if (errcode == 0)
|
||||
{
|
||||
catch = &c;
|
||||
(*operate) ();
|
||||
catch = NULL;
|
||||
catch = old;
|
||||
*errstring = NULL;
|
||||
*objname = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* We get here only if we longjmp'd out of OPERATE. */
|
||||
catch = NULL;
|
||||
catch = old;
|
||||
*errstring = c.errstring;
|
||||
*objname = c.objname;
|
||||
return errcode == -1 ? 0 : errcode;
|
||||
}
|
||||
|
||||
void
|
||||
_dl_receive_error (receiver_fct fct, void (*operate) (void))
|
||||
{
|
||||
struct catch *old_catch;
|
||||
receiver_fct old_receiver;
|
||||
|
||||
old_catch = catch;
|
||||
old_receiver = receiver;
|
||||
|
||||
/* Set the new values. */
|
||||
catch = NULL;
|
||||
receiver = fct;
|
||||
|
||||
(*operate) ();
|
||||
|
||||
catch = old_catch;
|
||||
receiver = old_receiver;
|
||||
}
|
||||
|
||||
+58
-14
@@ -1,5 +1,5 @@
|
||||
/* _dl_map_object -- Map in a shared object's segments from the file.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -409,7 +409,8 @@ _dl_map_object_from_fd (char *name, int fd, char *realname,
|
||||
static int
|
||||
open_path (const char *name, size_t namelen,
|
||||
const char *dirpath,
|
||||
char **realname)
|
||||
char **realname,
|
||||
const char *trusted_dirs[])
|
||||
{
|
||||
char *buf;
|
||||
const char *p;
|
||||
@@ -426,13 +427,42 @@ open_path (const char *name, size_t namelen,
|
||||
do
|
||||
{
|
||||
size_t buflen;
|
||||
size_t this_len;
|
||||
|
||||
dirpath = p;
|
||||
p = strpbrk (dirpath, ":;");
|
||||
if (p == NULL)
|
||||
p = strchr (dirpath, '\0');
|
||||
|
||||
if (p == dirpath)
|
||||
this_len = p - dirpath;
|
||||
|
||||
/* When we run a setuid program we do not accept any directory. */
|
||||
if (__libc_enable_secure)
|
||||
{
|
||||
/* All trusted directory must be complete name. */
|
||||
if (dirpath[0] != '/')
|
||||
continue;
|
||||
|
||||
/* If we got a list of trusted directories only accept one
|
||||
of these. */
|
||||
if (trusted_dirs != NULL)
|
||||
{
|
||||
const char **trust = trusted_dirs;
|
||||
|
||||
while (*trust != NULL)
|
||||
if (memcmp (dirpath, *trust, this_len) == 0
|
||||
&& (*trust)[this_len] == '\0')
|
||||
break;
|
||||
else
|
||||
++trust;
|
||||
|
||||
/* If directory is not trusted, ignore this directory. */
|
||||
if (*trust == NULL)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (this_len == 0)
|
||||
{
|
||||
/* Two adjacent colons, or a colon at the beginning or the end of
|
||||
the path means to search the current directory. */
|
||||
@@ -442,10 +472,10 @@ open_path (const char *name, size_t namelen,
|
||||
else
|
||||
{
|
||||
/* Construct the pathname to try. */
|
||||
(void) memcpy (buf, dirpath, p - dirpath);
|
||||
buf[p - dirpath] = '/';
|
||||
(void) memcpy (&buf[(p - dirpath) + 1], name, namelen);
|
||||
buflen = p - dirpath + 1 + namelen;
|
||||
(void) memcpy (buf, dirpath, this_len);
|
||||
buf[this_len] = '/';
|
||||
(void) memcpy (&buf[this_len + 1], name, namelen);
|
||||
buflen = this_len + 1 + namelen;
|
||||
}
|
||||
|
||||
fd = __open (buf, O_RDONLY);
|
||||
@@ -508,9 +538,9 @@ _dl_map_object (struct link_map *loader, const char *name, int type,
|
||||
|
||||
size_t namelen = strlen (name) + 1;
|
||||
|
||||
inline void trypath (const char *dirpath)
|
||||
inline void trypath (const char *dirpath, const char *trusted[])
|
||||
{
|
||||
fd = open_path (name, namelen, dirpath, &realname);
|
||||
fd = open_path (name, namelen, dirpath, &realname, trusted);
|
||||
}
|
||||
|
||||
fd = -1;
|
||||
@@ -521,16 +551,24 @@ _dl_map_object (struct link_map *loader, const char *name, int type,
|
||||
if (l && l->l_info[DT_RPATH])
|
||||
trypath ((const char *) (l->l_addr +
|
||||
l->l_info[DT_STRTAB]->d_un.d_ptr +
|
||||
l->l_info[DT_RPATH]->d_un.d_val));
|
||||
l->l_info[DT_RPATH]->d_un.d_val), NULL);
|
||||
/* If dynamically linked, try the DT_RPATH of the executable itself. */
|
||||
l = _dl_loaded;
|
||||
if (fd == -1 && l && l->l_type != lt_loaded && l->l_info[DT_RPATH])
|
||||
trypath ((const char *) (l->l_addr +
|
||||
l->l_info[DT_STRTAB]->d_un.d_ptr +
|
||||
l->l_info[DT_RPATH]->d_un.d_val));
|
||||
l->l_info[DT_RPATH]->d_un.d_val), NULL);
|
||||
/* Try an environment variable (unless setuid). */
|
||||
if (fd == -1 && ! __libc_enable_secure)
|
||||
trypath (getenv ("LD_LIBRARY_PATH"));
|
||||
{
|
||||
static const char *trusted_dirs[] =
|
||||
{
|
||||
#include "trusted-dirs.h"
|
||||
NULL
|
||||
};
|
||||
|
||||
trypath (getenv ("LD_LIBRARY_PATH"), trusted_dirs);
|
||||
}
|
||||
if (fd == -1)
|
||||
{
|
||||
/* Check the list of libraries in the file /etc/ld.so.cache,
|
||||
@@ -555,7 +593,7 @@ _dl_map_object (struct link_map *loader, const char *name, int type,
|
||||
if (fd == -1)
|
||||
{
|
||||
extern const char *_dl_rpath; /* Set in rtld.c. */
|
||||
trypath (_dl_rpath);
|
||||
trypath (_dl_rpath, NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -589,7 +627,8 @@ _dl_map_object (struct link_map *loader, const char *name, int type,
|
||||
/* We haven't found an appropriate library. But since we
|
||||
are only interested in the list of libraries this isn't
|
||||
so severe. Fake an entry with all the information we
|
||||
have (in fact only the name). */
|
||||
have. */
|
||||
static const ElfW(Symndx) dummy_bucket = STN_UNDEF;
|
||||
|
||||
/* Enter the new object in the list of loaded objects. */
|
||||
if ((name_copy = local_strdup (name)) == NULL
|
||||
@@ -599,6 +638,11 @@ _dl_map_object (struct link_map *loader, const char *name, int type,
|
||||
/* We use an opencount of 0 as a sign for the faked entry. */
|
||||
l->l_opencount = 0;
|
||||
l->l_reserved = 0;
|
||||
l->l_buckets = &dummy_bucket;
|
||||
l->l_nbuckets = 1;
|
||||
l->l_relocated = 1;
|
||||
|
||||
return l;
|
||||
}
|
||||
else
|
||||
_dl_signal_error (errno, name, "cannot open shared object file");
|
||||
|
||||
+14
-2
@@ -1,5 +1,5 @@
|
||||
/* Look up a symbol in the loaded objects.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -162,7 +162,7 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
|
||||
(*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
|
||||
{
|
||||
/* We could find no value for a strong reference. */
|
||||
const char msg[] = "undefined symbol: ";
|
||||
static const char msg[] = "undefined symbol: ";
|
||||
const size_t len = strlen (undef_name);
|
||||
char buf[sizeof msg + len];
|
||||
memcpy (buf, msg, sizeof msg - 1);
|
||||
@@ -206,6 +206,18 @@ _dl_lookup_symbol_skip (const char *undef_name, const ElfW(Sym) **ref,
|
||||
reference_name, skip_map, flags))
|
||||
break;
|
||||
|
||||
if (current_value.s == NULL &&
|
||||
(*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
|
||||
{
|
||||
/* We could find no value for a strong reference. */
|
||||
static const char msg[] = "undefined symbol: ";
|
||||
const size_t len = strlen (undef_name);
|
||||
char buf[sizeof msg + len];
|
||||
memcpy (buf, msg, sizeof msg - 1);
|
||||
memcpy (&buf[sizeof msg - 1], undef_name, len + 1);
|
||||
_dl_signal_error (0, reference_name, buf);
|
||||
}
|
||||
|
||||
*ref = current_value.s;
|
||||
return current_value.a;
|
||||
}
|
||||
|
||||
+6
-7
@@ -1,5 +1,5 @@
|
||||
/* Relocate a shared object and resolve its references to other loaded objects.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -58,17 +58,16 @@ _dl_relocate_object (struct link_map *l, struct link_map *scope[], int lazy)
|
||||
|
||||
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
|
||||
#define RESOLVE(ref, flags) \
|
||||
(_dl_lookup_symbol (strtab + (*ref)->st_name, ref, scope, \
|
||||
l->l_name, flags))
|
||||
(((*ref)->st_shndx != SHN_UNDEF && \
|
||||
ELFW(ST_BIND) ((*ref)->st_info) == STB_LOCAL) \
|
||||
? l->l_addr \
|
||||
: _dl_lookup_symbol (strtab + (*ref)->st_name, ref, scope, \
|
||||
l->l_name, flags))
|
||||
|
||||
#include "dynamic-link.h"
|
||||
ELF_DYNAMIC_RELOCATE (l, lazy);
|
||||
}
|
||||
|
||||
/* Set up the PLT so its unrelocated entries will jump to
|
||||
_dl_runtime_resolve (dl-runtime.c), which will relocate them. */
|
||||
elf_machine_runtime_setup (l, lazy);
|
||||
|
||||
/* Mark the object so we know ths work has been done. */
|
||||
l->l_relocated = 1;
|
||||
|
||||
|
||||
+16
-6
@@ -1,5 +1,5 @@
|
||||
/* Inline functions for dynamic linking.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -25,11 +25,13 @@
|
||||
/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */
|
||||
|
||||
static inline void __attribute__ ((unused))
|
||||
elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM])
|
||||
elf_get_dynamic_info (ElfW(Dyn) *dyn,
|
||||
ElfW(Dyn) *info[DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM
|
||||
+ DT_EXTRANUM])
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < DT_NUM + DT_PROCNUM; ++i)
|
||||
for (i = 0; i < DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM + DT_EXTRANUM; ++i)
|
||||
info[i] = NULL;
|
||||
|
||||
if (! dyn)
|
||||
@@ -42,6 +44,11 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM])
|
||||
else if (dyn->d_tag >= DT_LOPROC &&
|
||||
dyn->d_tag < DT_LOPROC + DT_PROCNUM)
|
||||
info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
|
||||
else if ((Elf32_Word) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM)
|
||||
info[DT_VERSIONTAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM] = dyn;
|
||||
else if ((Elf32_Word) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)
|
||||
info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM
|
||||
+ DT_VERSIONTAGNUM] = dyn;
|
||||
else
|
||||
assert (! "bad dynamic tag");
|
||||
dyn++;
|
||||
@@ -90,8 +97,11 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM])
|
||||
|
||||
/* This can't just be an inline function because GCC is too dumb
|
||||
to inline functions containing inlines themselves. */
|
||||
#define ELF_DYNAMIC_RELOCATE(map, lazy) \
|
||||
do { ELF_DYNAMIC_DO_REL ((map), (lazy)); \
|
||||
ELF_DYNAMIC_DO_RELA ((map), (lazy)); } while (0)
|
||||
#define ELF_DYNAMIC_RELOCATE(map, lazy) \
|
||||
do { \
|
||||
int edr_lazy = elf_machine_runtime_setup((map), (lazy)); \
|
||||
ELF_DYNAMIC_DO_REL ((map), edr_lazy); \
|
||||
ELF_DYNAMIC_DO_RELA ((map), edr_lazy); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This file defines standard ELF types, structures, and macros.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ian Lance Taylor <ian@cygnus.com>.
|
||||
|
||||
@@ -232,6 +232,11 @@ typedef struct
|
||||
#define SHT_SHLIB 10 /* Reserved */
|
||||
#define SHT_DYNSYM 11 /* Dynamic linker symbol table */
|
||||
#define SHT_NUM 12 /* Number of defined types. */
|
||||
#define SHT_LOSUNW 0x6ffffffd /* Sun-specific low bound. */
|
||||
#define SHT_GNU_verdef 0x6ffffffd /* Version definition section. */
|
||||
#define SHT_GNU_verneed 0x6ffffffe /* Version needs section. */
|
||||
#define SHT_GNU_versym 0x6fffffff /* Version symbol table. */
|
||||
#define SHT_HISUNW 0x6fffffff /* Sun-specific high bound. */
|
||||
#define SHT_LOPROC 0x70000000 /* Start of processor-specific */
|
||||
#define SHT_HIPROC 0x7fffffff /* End of processor-specific */
|
||||
#define SHT_LOUSER 0x80000000 /* Start of application-specific */
|
||||
@@ -464,6 +469,93 @@ typedef struct
|
||||
#define DT_HIPROC 0x7fffffff /* End of processor-specific */
|
||||
#define DT_PROCNUM DT_MIPS_NUM /* Most used by any processor */
|
||||
|
||||
/* The versioning entry types. The next are defined as part of the
|
||||
GNU extension. */
|
||||
#define DT_VERSYM 0x6ffffff0
|
||||
|
||||
/* These were chosen by Sun. */
|
||||
#define DT_VERDEF 0x6ffffffc /* Address of version definition
|
||||
table */
|
||||
#define DT_VERDEFNUM 0x6ffffffd /* Number of version definitions */
|
||||
#define DT_VERNEED 0x6ffffffe /* Address of table with needed
|
||||
versions */
|
||||
#define DT_VERNEEDNUM 0x6fffffff /* Number of needed versions */
|
||||
#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */
|
||||
#define DT_VERSIONTAGNUM 16
|
||||
|
||||
/* Sun added these machine-independent extensions in the "processor-specific"
|
||||
range. Be compatible. */
|
||||
#define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */
|
||||
#define DT_FILTER 0x7fffffff /* Shared object to get values from */
|
||||
#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)
|
||||
#define DT_EXTRANUM 3
|
||||
|
||||
/* Version definition sections. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Elf32_Half vd_version; /* Version revision */
|
||||
Elf32_Half vd_flags; /* Version information */
|
||||
Elf32_Half vd_ndx; /* Version Index */
|
||||
Elf32_Half vd_cnt; /* Number of associated aux entries */
|
||||
Elf32_Word vd_hash; /* Version name hash value */
|
||||
Elf32_Word vd_aux; /* Offset in bytes to verdaux array */
|
||||
Elf32_Word vd_next; /* Offset in bytes to next verdef
|
||||
entry */
|
||||
} Elf32_Verdef;
|
||||
|
||||
/* Legal values for vd_version (version revision). */
|
||||
#define VER_DEF_NONE 0 /* No version */
|
||||
#define VER_DEF_CURRENT 1 /* Current version */
|
||||
#define VER_DEF_NUM 2 /* Given version number */
|
||||
|
||||
/* Legal values for vd_flags (version information flags). */
|
||||
#define VER_FLG_BASE 0x1 /* Version definition of file itself */
|
||||
#define VER_FLG_WEAK 0x2 /* Weak version identifier */
|
||||
|
||||
/* Auxialiary version information. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Elf32_Addr vda_name; /* Version or dependency names */
|
||||
Elf32_Word vda_next; /* Offset in bytes to next verdaux
|
||||
entry */
|
||||
} Elf32_Verdaux;
|
||||
|
||||
/* Version dependency section. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Elf32_Half vn_version; /* Version of structure */
|
||||
Elf32_Half vn_cnt; /* Number of associated aux entries */
|
||||
Elf32_Addr vn_file; /* Offset of filename for this
|
||||
dependency */
|
||||
Elf32_Word vn_aux; /* Offset in bytes to vernaux array */
|
||||
Elf32_Word vn_next; /* Offset in bytes to next verneed
|
||||
entry */
|
||||
} Elf32_Verneed;
|
||||
|
||||
/* Legal values for vn_version (version revision). */
|
||||
#define VER_NEED_NONE 0 /* No version */
|
||||
#define VER_NEED_CURRENT 1 /* Current version */
|
||||
#define VER_NEED_NUM 2 /* Given version number */
|
||||
|
||||
/* Auxiliary needed version information. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Elf32_Word vna_hash; /* Hash value of dependency name */
|
||||
Elf32_Half vna_flags; /* Dependency specific information */
|
||||
Elf32_Half vna_other; /* Unused */
|
||||
Elf32_Addr vna_name; /* Dependency name string offset */
|
||||
Elf32_Word vna_next; /* Offset in bytes to next vernaux
|
||||
entry */
|
||||
} Elf32_Vernaux;
|
||||
|
||||
/* Legal values for vna_flags. */
|
||||
#define VER_FLG_WEAK 0x2 /* Weak verison identifier */
|
||||
|
||||
|
||||
/* Auxiliary vector. */
|
||||
|
||||
/* This vector is normally only used by the program interpreter. The
|
||||
|
||||
+53
-19
@@ -1,6 +1,6 @@
|
||||
#! @BASH@
|
||||
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -29,23 +29,39 @@ TEXTDOMAIN=libc
|
||||
TEXTDOMAINDIR=@TEXTDOMAINDIR@
|
||||
|
||||
RTLD=@RTLD@
|
||||
RELOCS=
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--v*)
|
||||
--v | --ve | --ver | --vers | --versi | --versio | --version)
|
||||
echo $"ldd (GNU libc) @VERSION@
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 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."
|
||||
exit 0 ;;
|
||||
--h*)
|
||||
--h | --he | --hel | --help)
|
||||
echo $"ldd [OPTION]... FILE...
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
Report bugs to <bug-glibc@prep.ai.mit.edu>."
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
-d, --data-relocs process data relocations
|
||||
-r, --function-relocs process data and function relocations
|
||||
Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
|
||||
exit 0 ;;
|
||||
-d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
|
||||
--data-rel | --data-relo | --data-reloc | --data-relocs)
|
||||
RELOCS='--data-relocs'
|
||||
shift ;;
|
||||
-r | --f | --fu | --fun | --func | --funct | --functi | --functio | \
|
||||
--function | --function- | --function-r | --function-re | --function-rel | \
|
||||
--function-relo | --function-reloc | --function-relocs)
|
||||
RELOCS='--function-relocs'
|
||||
shift ;;
|
||||
--) # Stop option processing.
|
||||
shift; break ;;
|
||||
-*)
|
||||
echo >&2 $"ldd: unrecognized option" "\`$1'"
|
||||
echo >&2 $"Try \`ldd --help' for more information."
|
||||
exit 1 ;;
|
||||
*)
|
||||
break ;;
|
||||
esac
|
||||
@@ -53,9 +69,8 @@ done
|
||||
|
||||
case $# in
|
||||
0)
|
||||
echo >&2 $"\
|
||||
ldd: missing file arguments
|
||||
Try \`ldd --help' for more information."
|
||||
echo >&2 $"ldd: missing file arguments"
|
||||
echo >&2 $"Try \`ldd --help' for more information."
|
||||
exit 1 ;;
|
||||
1)
|
||||
# We don't list the file name when there is only one.
|
||||
@@ -64,15 +79,25 @@ Try \`ldd --help' for more information."
|
||||
*) file="./$1" ;;
|
||||
esac
|
||||
if test ! -f "$file"; then
|
||||
echo "${file}:" $"no such file"
|
||||
elif ${RTLD} --verify "$file"; then
|
||||
LD_TRACE_LOADED_OBJECTS=1 exec ${RTLD} "$file" && exit 1
|
||||
echo "ldd: ${file}:" $"no such file"
|
||||
exit 1
|
||||
elif test -r "$file"; then
|
||||
test -x "$file" ||
|
||||
echo $"ldd: warning: you do not have execution permission for" "\`$file'"
|
||||
if ${RTLD} --verify "$file"; then
|
||||
LD_TRACE_LOADED_OBJECTS=1 exec ${RTLD} ${RELOCS} "$file" || exit 1
|
||||
else
|
||||
echo $" not a dynamic executable"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo $" not a dynamic executable"
|
||||
echo $"ldd: error: you do not have read permission for" "\`$file'"
|
||||
exit 1
|
||||
fi
|
||||
exit ;;
|
||||
*)
|
||||
set -e # Bail out immediately if ${RTLD} loses on any argument.
|
||||
result=0
|
||||
for file; do
|
||||
echo "${file}:"
|
||||
case "$file" in
|
||||
@@ -80,16 +105,25 @@ Try \`ldd --help' for more information."
|
||||
*) file="./$file" ;;
|
||||
esac
|
||||
if test ! -f "$file"; then
|
||||
echo "$file:" $"no such file"
|
||||
elif ${RTLD} --verify "$file"; then
|
||||
LD_TRACE_LOADED_OBJECTS=1 ${RTLD} "$file"
|
||||
echo "ldd: ${file}:" $"no such file"
|
||||
result=1
|
||||
elif test -r "$file"; then
|
||||
test -x "$file" || echo $"\
|
||||
ldd: warning: you do not have execution permission for" "\`$file'"
|
||||
if ${RTLD} --verify "$file"; then
|
||||
LD_TRACE_LOADED_OBJECTS=1 ${RTLD} ${RELOCS} "$file" || result=1
|
||||
else
|
||||
echo $" not a dynamic executable"
|
||||
result=1
|
||||
fi
|
||||
else
|
||||
echo $" not a dynamic executable"
|
||||
echo $"ldd: error: you do not have read permission for" "\`$file'"
|
||||
result=1
|
||||
fi
|
||||
done
|
||||
esac
|
||||
|
||||
exit 0
|
||||
exit $result
|
||||
# Local Variables:
|
||||
# mode:ksh
|
||||
# End:
|
||||
|
||||
+57
-17
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -25,23 +25,40 @@
|
||||
# variable LD_TRACE_LOADED_OBJECTS to a non-empty value.
|
||||
|
||||
RTLD=@RTLD@
|
||||
RELOCS=
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--v*)
|
||||
--v | --ve | --ver | --vers | --versi | --versio | --version)
|
||||
echo 'ldd (GNU libc) @VERSION@
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 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.'
|
||||
exit 0 ;;
|
||||
--h*)
|
||||
echo 'ldd [OPTION]... FILE...
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
Report bugs to <bug-glibc@prep.ai.mit.edu>.'
|
||||
--h | --he | --hel | --help)
|
||||
echo "ldd [OPTION]... FILE...
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
-d, --data-relocs process data relocations
|
||||
-r, --function-relocs process data and function relocations
|
||||
Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
|
||||
exit 0 ;;
|
||||
-d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
|
||||
--data-rel | --data-relo | --data-reloc | --data-relocs)
|
||||
RELOCS='--data-relocs'
|
||||
shift ;;
|
||||
-r | --f | --fu | --fun | --func | --funct | --functi | --functio | \
|
||||
--function | --function- | --function-r | --function-re | --function-rel | \
|
||||
--function-relo | --function-reloc | --function-relocs)
|
||||
RELOCS='--function-relocs'
|
||||
shift ;;
|
||||
--) # Stop option processing.
|
||||
shift; break ;;
|
||||
-*)
|
||||
echo >&2 "\
|
||||
ldd: unrecognized option \`$1'
|
||||
Try \`ldd --help' for more information."
|
||||
exit 1 ;;
|
||||
*)
|
||||
break ;;
|
||||
esac
|
||||
@@ -60,15 +77,27 @@ Try \`ldd --help' for more information."
|
||||
*) file="./$1" ;;
|
||||
esac
|
||||
if test ! -f "$file"; then
|
||||
echo "${file}: no such file"
|
||||
elif ${RTLD} --verify "$file"; then
|
||||
LD_TRACE_LOADED_OBJECTS=1 exec ${RTLD} "$file" && exit 1
|
||||
echo "ldd: ${file}: no such file"
|
||||
exit 1
|
||||
else
|
||||
echo ' not a dynamic executable'
|
||||
if test -r "$file"; then
|
||||
test -x "$file" ||
|
||||
echo "ldd: warning: you do not have execution permission for \`$file'"
|
||||
if ${RTLD} --verify "$file"; then
|
||||
LD_TRACE_LOADED_OBJECTS=1 exec ${RTLD} ${RELOCS} "$file" || exit 1
|
||||
else
|
||||
echo ' not a dynamic executable'
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "ldd: error: you do not have read permission for \`$file'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
exit ;;
|
||||
*)
|
||||
set -e # Bail out immediately if ${RTLD} loses on any argument.
|
||||
result=0
|
||||
for file; do
|
||||
echo "${file}:"
|
||||
case "$file" in
|
||||
@@ -76,13 +105,24 @@ Try \`ldd --help' for more information."
|
||||
*) file="./$file" ;;
|
||||
esac
|
||||
if test ! -f "$file"; then
|
||||
echo "$file: no such file"
|
||||
elif ${RTLD} --verify "$file"; then
|
||||
LD_TRACE_LOADED_OBJECTS=1 ${RTLD} "$file"
|
||||
echo "ldd: ${file}: no such file"
|
||||
result=1
|
||||
else
|
||||
echo ' not a dynamic executable'
|
||||
if test -r "$file"; then
|
||||
test -x "$file" || echo "\
|
||||
ldd: warning: you do not have execution permission for \`$file'"
|
||||
if ${RTLD} --verify "$file"; then
|
||||
LD_TRACE_LOADED_OBJECTS=1 ${RTLD} ${RELOCS} "$file" || result=1
|
||||
else
|
||||
echo ' not a dynamic executable'
|
||||
result=1
|
||||
fi
|
||||
else
|
||||
echo "ldd: error: you do not have read permission for \`$file'"
|
||||
result=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
esac
|
||||
|
||||
exit 0
|
||||
exit $result
|
||||
|
||||
+31
-6
@@ -1,5 +1,5 @@
|
||||
/* Run-time dynamic linker data structures for loaded ELF shared objects.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -18,13 +18,17 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _LINK_H
|
||||
|
||||
#define _LINK_H 1
|
||||
#include <features.h>
|
||||
|
||||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
|
||||
#include <elf.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* We use this macro to refer to ELF types independent of the native wordsize.
|
||||
`ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
|
||||
#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
|
||||
@@ -97,8 +101,14 @@ struct link_map
|
||||
const char *l_libname; /* Name requested (before search). */
|
||||
/* Indexed pointers to dynamic section.
|
||||
[0,DT_NUM) are indexed by the processor-independent tags.
|
||||
[DT_NUM,DT_NUM+DT_PROCNUM] are indexed by the tag minus DT_LOPROC. */
|
||||
ElfW(Dyn) *l_info[DT_NUM + DT_PROCNUM];
|
||||
[DT_NUM,DT_NUM+DT_PROCNUM) are indexed by the tag minus DT_LOPROC.
|
||||
[DT_NUM+DT_PROCNUM,DT_NUM+DT_PROCNUM+DT_EXTRANUM) are indexed
|
||||
by DT_EXTRATAGIDX(tagvalue) and
|
||||
[DT_NUM+DT_PROCNUM+DT_VERSIONTAGNUM,
|
||||
DT_NUM+DT_PROCNUM+DT_VERSIONTAGNUM+DT_EXTRANUM)
|
||||
are indexed by DT_EXTRATAGIDX(tagvalue) (see <elf.h>). */
|
||||
|
||||
ElfW(Dyn) *l_info[DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM + DT_EXTRANUM];
|
||||
const ElfW(Phdr) *l_phdr; /* Pointer to program header table in core. */
|
||||
ElfW(Addr) l_entry; /* Entry point location. */
|
||||
ElfW(Half) l_phnum; /* Number of program header entries. */
|
||||
@@ -134,6 +144,12 @@ struct link_map
|
||||
unsigned int l_global:1; /* Nonzero if object in _dl_global_scope. */
|
||||
unsigned int l_reserved:2; /* Reserved for internal use. */
|
||||
};
|
||||
|
||||
|
||||
/* Function used as argument for `_dl_receive_error' function. The
|
||||
arguments are the error string and the objname the error occurred
|
||||
in. */
|
||||
typedef void (*receiver_fct) (const char *, const char *);
|
||||
|
||||
/* Internal functions of the run-time dynamic linker.
|
||||
These can be accessed if you link again the dynamic linker
|
||||
@@ -158,6 +174,11 @@ extern int _dl_sysdep_open_zero_fill (void); /* dl-sysdep.c */
|
||||
are concatenated to form the message to print. */
|
||||
extern void _dl_sysdep_message (const char *string, ...);
|
||||
|
||||
/* OS-dependent function to write a message on the standard error.
|
||||
All arguments are `const char *'; args until a null pointer
|
||||
are concatenated to form the message to print. */
|
||||
extern void _dl_sysdep_error (const char *string, ...);
|
||||
|
||||
/* OS-dependent function to give a fatal error message and exit
|
||||
when the dynamic linker fails before the program is fully linked.
|
||||
All arguments are `const char *'; args until a null pointer
|
||||
@@ -174,11 +195,9 @@ extern int _dl_secure;
|
||||
zero; OBJECT is the name of the problematical shared object, or null if
|
||||
it is a general problem; ERRSTRING is a string describing the specific
|
||||
problem. */
|
||||
|
||||
extern void _dl_signal_error (int errcode,
|
||||
const char *object,
|
||||
const char *errstring)
|
||||
__attribute__ ((__noreturn__));
|
||||
const char *errstring);
|
||||
|
||||
/* Call OPERATE, catching errors from `dl_signal_error'. If there is no
|
||||
error, *ERRSTRING is set to null. If there is an error, *ERRSTRING and
|
||||
@@ -189,6 +208,11 @@ extern int _dl_catch_error (char **errstring,
|
||||
const char **object,
|
||||
void (*operate) (void));
|
||||
|
||||
/* Call OPERATE, receiving errors from `dl_signal_error'. Unlike
|
||||
`_dl_catch_error' the operation is resumed after the OPERATE
|
||||
function returns. */
|
||||
extern void _dl_receive_error (receiver_fct fct, void (*operate) (void));
|
||||
|
||||
|
||||
/* Helper function for <dlfcn.h> functions. Runs the OPERATE function via
|
||||
_dl_catch_error. Returns zero for success, nonzero for failure; and
|
||||
@@ -320,5 +344,6 @@ extern void _dl_debug_state (void);
|
||||
in the `r_ldbase' member. Returns the address of the structure. */
|
||||
extern struct r_debug *_dl_debug_initialize (ElfW(Addr) ldbase);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* link.h */
|
||||
|
||||
+93
-32
@@ -1,5 +1,5 @@
|
||||
/* Run time dynamic linker.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -44,6 +44,10 @@ extern void *_dl_sysdep_read_whole_file (const char *filename,
|
||||
size_t *filesize_ptr,
|
||||
int mmap_prot);
|
||||
|
||||
/* Helper function to handle errors while resolving symbols. */
|
||||
static void print_unresolved (const char *errstring, const char *objname);
|
||||
|
||||
|
||||
int _dl_argc;
|
||||
char **_dl_argv;
|
||||
const char *_dl_rpath;
|
||||
@@ -142,11 +146,19 @@ dl_main (const ElfW(Phdr) *phdr,
|
||||
enum { normal, list, verify, trace } mode;
|
||||
struct link_map **preloads;
|
||||
unsigned int npreloads;
|
||||
const char *preloadlist;
|
||||
size_t file_size;
|
||||
char *file;
|
||||
|
||||
mode = getenv ("LD_TRACE_LOADED_OBJECTS") != NULL ? trace : normal;
|
||||
|
||||
/* LAZY is determined by the parameters --datadeps and --function-deps
|
||||
if we trace the binary. */
|
||||
if (mode == trace)
|
||||
lazy = -1;
|
||||
else
|
||||
lazy = !__libc_enable_secure && *(getenv ("LD_BIND_NOW") ?: "") == '\0';
|
||||
|
||||
/* Set up a flag which tells we are just starting. */
|
||||
_dl_starting_up = 1;
|
||||
|
||||
@@ -186,22 +198,44 @@ of this helper program; chances are you did not intend to run this program.\n",
|
||||
/* Note the place where the dynamic linker actually came from. */
|
||||
_dl_rtld_map.l_name = _dl_argv[0];
|
||||
|
||||
if (! strcmp (_dl_argv[1], "--list"))
|
||||
{
|
||||
mode = list;
|
||||
while (_dl_argc > 1)
|
||||
if (! strcmp (_dl_argv[1], "--list"))
|
||||
{
|
||||
mode = list;
|
||||
lazy = -1; /* This means do no dependency analysis. */
|
||||
|
||||
++_dl_skip_args;
|
||||
--_dl_argc;
|
||||
++_dl_argv;
|
||||
}
|
||||
else if (! strcmp (_dl_argv[1], "--verify"))
|
||||
{
|
||||
mode = verify;
|
||||
++_dl_skip_args;
|
||||
--_dl_argc;
|
||||
++_dl_argv;
|
||||
}
|
||||
else if (! strcmp (_dl_argv[1], "--verify"))
|
||||
{
|
||||
mode = verify;
|
||||
|
||||
++_dl_skip_args;
|
||||
--_dl_argc;
|
||||
++_dl_argv;
|
||||
}
|
||||
++_dl_skip_args;
|
||||
--_dl_argc;
|
||||
++_dl_argv;
|
||||
}
|
||||
else if (! strcmp (_dl_argv[1], "--data-relocs"))
|
||||
{
|
||||
mode = trace;
|
||||
lazy = 1; /* This means do only data relocation analysis. */
|
||||
|
||||
++_dl_skip_args;
|
||||
--_dl_argc;
|
||||
++_dl_argv;
|
||||
}
|
||||
else if (! strcmp (_dl_argv[1], "--function-relocs"))
|
||||
{
|
||||
mode = trace;
|
||||
lazy = 0; /* This means do also function relocation analysis. */
|
||||
|
||||
++_dl_skip_args;
|
||||
--_dl_argc;
|
||||
++_dl_argv;
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
||||
++_dl_skip_args;
|
||||
--_dl_argc;
|
||||
@@ -311,22 +345,22 @@ of this helper program; chances are you did not intend to run this program.\n",
|
||||
preloads = NULL;
|
||||
npreloads = 0;
|
||||
|
||||
if (! __libc_enable_secure)
|
||||
preloadlist = getenv ("LD_PRELOAD");
|
||||
if (preloadlist)
|
||||
{
|
||||
const char *preloadlist = getenv ("LD_PRELOAD");
|
||||
if (preloadlist)
|
||||
{
|
||||
/* The LD_PRELOAD environment variable gives a colon-separated
|
||||
list of libraries that are loaded before the executable's
|
||||
dependencies and prepended to the global scope list. */
|
||||
char *list = strdupa (preloadlist);
|
||||
char *p;
|
||||
while ((p = strsep (&list, ":")) != NULL)
|
||||
{
|
||||
(void) _dl_map_object (NULL, p, lt_library, 0);
|
||||
++npreloads;
|
||||
}
|
||||
}
|
||||
/* The LD_PRELOAD environment variable gives a white space
|
||||
separated list of libraries that are loaded before the
|
||||
executable's dependencies and prepended to the global scope
|
||||
list. If the binary is running setuid all elements
|
||||
containing a '/' are ignored since it is insecure. */
|
||||
char *list = strdupa (preloadlist);
|
||||
char *p;
|
||||
while ((p = strsep (&list, " ")) != NULL)
|
||||
if (! __libc_enable_secure || strchr (p, '/') == NULL)
|
||||
{
|
||||
(void) _dl_map_object (NULL, p, lt_library, 0);
|
||||
++npreloads;
|
||||
}
|
||||
}
|
||||
|
||||
/* Read the contents of the file. */
|
||||
@@ -495,12 +529,31 @@ of this helper program; chances are you did not intend to run this program.\n",
|
||||
*--bp = '0';
|
||||
_dl_sysdep_message (" in object at 0x", bp, "\n", NULL);
|
||||
}
|
||||
else if (lazy >= 0)
|
||||
{
|
||||
/* We have to do symbol dependency testing. */
|
||||
void doit (void)
|
||||
{
|
||||
_dl_relocate_object (l, _dl_object_relocation_scope (l), lazy);
|
||||
}
|
||||
|
||||
l = _dl_loaded;
|
||||
while (l->l_next)
|
||||
l = l->l_next;
|
||||
do
|
||||
{
|
||||
if (l != &_dl_rtld_map && l->l_opencount > 0)
|
||||
{
|
||||
_dl_receive_error (print_unresolved, doit);
|
||||
*_dl_global_scope_end = NULL;
|
||||
}
|
||||
l = l->l_prev;
|
||||
} while (l);
|
||||
}
|
||||
|
||||
_exit (0);
|
||||
}
|
||||
|
||||
lazy = !__libc_enable_secure && *(getenv ("LD_BIND_NOW") ?: "") == '\0';
|
||||
|
||||
{
|
||||
/* Now we have all the objects loaded. Relocate them all except for
|
||||
the dynamic linker itself. We do this in reverse order so that copy
|
||||
@@ -572,3 +625,11 @@ of this helper program; chances are you did not intend to run this program.\n",
|
||||
/* Once we return, _dl_sysdep_start will invoke
|
||||
the DT_INIT functions and then *USER_ENTRY. */
|
||||
}
|
||||
|
||||
/* This is a little helper function for resolving symbols while
|
||||
tracing the binary. */
|
||||
static void
|
||||
print_unresolved (const char *errstring, const char *objname)
|
||||
{
|
||||
_dl_sysdep_error (errstring, " (", objname, ")\n", NULL);
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -95,7 +95,7 @@
|
||||
/* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */
|
||||
#if defined _BSD_SOURCE && \
|
||||
!(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \
|
||||
defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_DEFINED || \
|
||||
defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || \
|
||||
defined _GNU_SOURCE || defined _SVID_SOURCE)
|
||||
# define __FAVOR_BSD 1
|
||||
#endif
|
||||
|
||||
+244
@@ -0,0 +1,244 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# glibcbug - create a bug report and mail it to the bug address.
|
||||
#
|
||||
# configuration section:
|
||||
# these variables are filled in by configure
|
||||
#
|
||||
VERSION="@VERSION@"
|
||||
BUGGLIBC="bugs@gnu.ai.mit.edu"
|
||||
ADDONS="@subdirs@"
|
||||
|
||||
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
|
||||
export PATH
|
||||
|
||||
TEMP=/tmp/glibcbug.$$
|
||||
|
||||
BUGADDR=${1-$BUGGLIBC}
|
||||
ENVIRONMENT=`uname -a`
|
||||
|
||||
: ${EDITOR=emacs}
|
||||
|
||||
: ${USER=${LOGNAME-`whoami`}}
|
||||
|
||||
trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15
|
||||
trap 'rm -f $TEMP $TEMP.x' 0
|
||||
|
||||
|
||||
# How to read the passwd database.
|
||||
PASSWD="cat /etc/passwd"
|
||||
|
||||
if [ -f /usr/lib/sendmail ] ; then
|
||||
MAIL_AGENT="/usr/lib/sendmail -oi -t"
|
||||
elif [ -f /usr/sbin/sendmail ] ; then
|
||||
MAIL_AGENT="/usr/sbin/sendmail -oi -t"
|
||||
else
|
||||
MAIL_AGENT=rmail
|
||||
fi
|
||||
|
||||
# Figure out how to echo a string without a trailing newline
|
||||
N=`echo 'hi there\c'`
|
||||
case "$N" in
|
||||
*c) ECHON1='echo -n' ECHON2= ;;
|
||||
*) ECHON1=echo ECHON2='\c' ;;
|
||||
esac
|
||||
|
||||
# Find out the name of the originator of this PR.
|
||||
if [ -n "$NAME" ]; then
|
||||
ORIGINATOR="$NAME"
|
||||
elif [ -f $HOME/.fullname ]; then
|
||||
ORIGINATOR="`sed -e '1q' $HOME/.fullname`"
|
||||
else
|
||||
# Must use temp file due to incompatibilities in quoting behavior
|
||||
# and to protect shell metacharacters in the expansion of $LOGNAME
|
||||
$PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > $TEMP
|
||||
ORIGINATOR="`cat $TEMP`"
|
||||
rm -f $TEMP
|
||||
fi
|
||||
|
||||
if [ -n "$ORGANIZATION" ]; then
|
||||
if [ -f "$ORGANIZATION" ]; then
|
||||
ORGANIZATION="`cat $ORGANIZATION`"
|
||||
fi
|
||||
else
|
||||
if [ -f $HOME/.organization ]; then
|
||||
ORGANIZATION="`cat $HOME/.organization`"
|
||||
elif [ -f $HOME/.signature ]; then
|
||||
ORGANIZATION=`sed -e "s/^/ /" $HOME/.signature; echo ">"`
|
||||
fi
|
||||
fi
|
||||
|
||||
# If they don't have a preferred editor set, then use
|
||||
if [ -z "$VISUAL" ]; then
|
||||
if [ -z "$EDITOR" ]; then
|
||||
EDIT=vi
|
||||
else
|
||||
EDIT="$EDITOR"
|
||||
fi
|
||||
else
|
||||
EDIT="$VISUAL"
|
||||
fi
|
||||
|
||||
# Find out some information.
|
||||
SYSTEM=`( [ -f /bin/uname ] && /bin/uname -a ) || \
|
||||
( [ -f /usr/bin/uname ] && /usr/bin/uname -a ) || echo ""`
|
||||
ARCH=`[ -f /bin/arch ] && /bin/arch`
|
||||
MACHINE=`[ -f /bin/machine ] && /bin/machine`
|
||||
|
||||
ORGANIZATION_C='<organization of PR author (multiple lines)>'
|
||||
SYNOPSIS_C='<synopsis of the problem (one line)>'
|
||||
SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
|
||||
PRIORITY_C='<[ low | medium | high ] (one line)>'
|
||||
CLASS_C='<[ sw-bug | doc-bug | change-request | support ] (one line)>'
|
||||
RELEASE_C='<release number or tag (one line)>'
|
||||
ENVIRONMENT_C='<machine, os, target, libraries (multiple lines)>'
|
||||
DESCRIPTION_C='<precise description of the problem (multiple lines)>'
|
||||
HOW_TO_REPEAT_C='<code/input/activities to reproduce the problem (multiple lines)>'
|
||||
FIX_C='<how to correct or work around the problem, if known (multiple lines)>'
|
||||
|
||||
|
||||
cat > $TEMP <<EOF
|
||||
SEND-PR: -*- send-pr -*-
|
||||
SEND-PR: Lines starting with \`SEND-PR' will be removed automatically, as
|
||||
SEND-PR: will all comments (text enclosed in \`<' and \`>').
|
||||
SEND-PR:
|
||||
From: ${USER}
|
||||
To: ${BUGADDR}
|
||||
Subject: [50 character or so descriptive subject here (for reference)]
|
||||
|
||||
>Submitter-Id: net
|
||||
>Originator: ${ORIGINATOR}
|
||||
>Organization:
|
||||
${ORGANIZATION- $ORGANIZATION_C}
|
||||
>Confidential: no
|
||||
>Synopsis: $SYNOPSIS_C
|
||||
>Severity: $SEVERITY_C
|
||||
>Priority: $PRIORITY_C
|
||||
>Category: libc
|
||||
>Class: $CLASS_C
|
||||
>Release: libc-${VERSION}
|
||||
>Environment:
|
||||
$ENVIRONMENT_C
|
||||
`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
|
||||
`[ -n "$ARCH" ] && echo Architecture: $ARCH`
|
||||
`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
|
||||
`[ -n "$ADDONS" ] && echo Addons: $ADDONS`
|
||||
|
||||
>Description:
|
||||
$DESCRIPTION_C
|
||||
>How-To-Repeat:
|
||||
$HOW_TO_REPEAT_C
|
||||
>Fix:
|
||||
$FIX_C
|
||||
EOF
|
||||
|
||||
chmod u+w $TEMP
|
||||
cp $TEMP $TEMP.x
|
||||
|
||||
eval $EDIT $TEMP
|
||||
|
||||
if cmp -s $TEMP $TEMP.x; then
|
||||
echo "File not changed, no bug report submitted."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Check the enumeration fields
|
||||
|
||||
# This is a "sed-subroutine" with one keyword parameter
|
||||
# (with workaround for Sun sed bug)
|
||||
#
|
||||
SED_CMD='
|
||||
/$PATTERN/{
|
||||
s|||
|
||||
s|<.*>||
|
||||
s|^[ ]*||
|
||||
s|[ ]*$||
|
||||
p
|
||||
q
|
||||
}'
|
||||
|
||||
|
||||
while :; do
|
||||
CNT=0
|
||||
|
||||
#
|
||||
# 1) Severity
|
||||
#
|
||||
PATTERN=">Severity:"
|
||||
SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||||
case "$SEVERITY" in
|
||||
""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
|
||||
*) echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
|
||||
esac
|
||||
#
|
||||
# 2) Priority
|
||||
#
|
||||
PATTERN=">Priority:"
|
||||
PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||||
case "$PRIORITY" in
|
||||
""|low|medium|high) CNT=`expr $CNT + 1` ;;
|
||||
*) echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
|
||||
esac
|
||||
#
|
||||
# 3) Class
|
||||
#
|
||||
PATTERN=">Class:"
|
||||
CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||||
case "$CLASS" in
|
||||
""|sw-bug|doc-bug|change-request|support) CNT=`expr $CNT + 1` ;;
|
||||
*) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
|
||||
esac
|
||||
|
||||
[ $CNT -lt 3 ] &&
|
||||
echo "Errors were found with the problem report."
|
||||
|
||||
while :; do
|
||||
$ECHON1 "a)bort, e)dit or s)end? $ECHON2"
|
||||
read input
|
||||
case "$input" in
|
||||
a*)
|
||||
echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
|
||||
cat $TEMP >> $HOME/dead.glibcbug
|
||||
xs=1; exit
|
||||
;;
|
||||
e*)
|
||||
eval $EDIT $TEMP
|
||||
continue 2
|
||||
;;
|
||||
s*)
|
||||
break 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
#
|
||||
# Remove comments and send the problem report
|
||||
# (we have to use patterns, where the comment contains regex chars)
|
||||
#
|
||||
# /^>Originator:/s;$ORIGINATOR;;
|
||||
sed -e "
|
||||
/^SEND-PR:/d
|
||||
/^>Organization:/,/^>[A-Za-z-]*:/s;$ORGANIZATION_C;;
|
||||
/^>Confidential:/s;<.*>;;
|
||||
/^>Synopsis:/s;$SYNOPSIS_C;;
|
||||
/^>Severity:/s;<.*>;;
|
||||
/^>Priority:/s;<.*>;;
|
||||
/^>Class:/s;<.*>;;
|
||||
/^>Release:/,/^>[A-Za-z-]*:/s;$RELEASE_C;;
|
||||
/^>Environment:/,/^>[A-Za-z-]*:/s;$ENVIRONMENT_C;;
|
||||
/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
|
||||
/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
|
||||
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
|
||||
" $TEMP > $TEMP.x
|
||||
|
||||
if $MAIL_AGENT < $TEMP.x; then
|
||||
echo "$COMMAND: problem report sent"
|
||||
xs=0; exit
|
||||
else
|
||||
echo "$COMMAND: mysterious mail failure, report not sent."
|
||||
echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
|
||||
cat $TEMP >> $HOME/dead.glibcbug
|
||||
fi
|
||||
|
||||
exit 0
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -12,9 +12,9 @@
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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 gmon portion of the library.
|
||||
|
||||
+86
-37
@@ -34,6 +34,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/gmon.h>
|
||||
#include <sys/gmon_out.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
@@ -165,21 +166,26 @@ static void
|
||||
write_hist (fd)
|
||||
int fd;
|
||||
{
|
||||
const u_char tag = GMON_TAG_TIME_HIST;
|
||||
struct gmon_hist_hdr thdr;
|
||||
u_char tag = GMON_TAG_TIME_HIST;
|
||||
struct gmon_hist_hdr thdr __attribute__ ((aligned (__alignof__ (char *))));
|
||||
|
||||
if (_gmonparam.kcountsize > 0)
|
||||
{
|
||||
thdr.low_pc = _gmonparam.lowpc;
|
||||
thdr.high_pc = _gmonparam.highpc;
|
||||
thdr.hist_size = _gmonparam.kcountsize / sizeof(HISTCOUNTER);
|
||||
thdr.prof_rate = __profile_frequency();
|
||||
strncpy(thdr.dimen, "seconds", sizeof(thdr.dimen));
|
||||
struct iovec iov[3] =
|
||||
{
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &thdr, sizeof (struct gmon_hist_hdr) },
|
||||
{ _gmonparam.kcount, _gmonparam.kcountsize }
|
||||
};
|
||||
|
||||
*(char **) thdr.low_pc = (char *) _gmonparam.lowpc;
|
||||
*(char **) thdr.high_pc = (char *) _gmonparam.highpc;
|
||||
*(int *) thdr.hist_size = _gmonparam.kcountsize / sizeof (HISTCOUNTER);
|
||||
*(int *) thdr.prof_rate = __profile_frequency ();
|
||||
strncpy (thdr.dimen, "seconds", sizeof (thdr.dimen));
|
||||
thdr.dimen_abbrev = 's';
|
||||
|
||||
write(fd, &tag, sizeof(tag));
|
||||
write(fd, &thdr, sizeof(thdr));
|
||||
write(fd, _gmonparam.kcount, _gmonparam.kcountsize);
|
||||
__writev (fd, iov, 3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,12 +194,26 @@ static void
|
||||
write_call_graph (fd)
|
||||
int fd;
|
||||
{
|
||||
const u_char tag = GMON_TAG_CG_ARC;
|
||||
struct gmon_cg_arc_record raw_arc;
|
||||
u_char tag = GMON_TAG_CG_ARC;
|
||||
struct gmon_cg_arc_record raw_arc[4]
|
||||
__attribute__ ((aligned (__alignof__ (char*))));
|
||||
int from_index, to_index, from_len;
|
||||
u_long frompc;
|
||||
|
||||
from_len = _gmonparam.fromssize / sizeof(*_gmonparam.froms);
|
||||
struct iovec iov[8] =
|
||||
{
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &raw_arc[0], sizeof (struct gmon_cg_arc_record) },
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &raw_arc[1], sizeof (struct gmon_cg_arc_record) },
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &raw_arc[2], sizeof (struct gmon_cg_arc_record) },
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &raw_arc[3], sizeof (struct gmon_cg_arc_record) },
|
||||
};
|
||||
int nfilled = 0;
|
||||
|
||||
from_len = _gmonparam.fromssize / sizeof (*_gmonparam.froms);
|
||||
for (from_index = 0; from_index < from_len; ++from_index)
|
||||
{
|
||||
if (_gmonparam.froms[from_index] == 0)
|
||||
@@ -201,19 +221,24 @@ write_call_graph (fd)
|
||||
|
||||
frompc = _gmonparam.lowpc;
|
||||
frompc += (from_index * _gmonparam.hashfraction
|
||||
* sizeof(*_gmonparam.froms));
|
||||
* sizeof (*_gmonparam.froms));
|
||||
for (to_index = _gmonparam.froms[from_index];
|
||||
to_index != 0;
|
||||
to_index = _gmonparam.tos[to_index].link)
|
||||
{
|
||||
raw_arc.from_pc = frompc;
|
||||
raw_arc.self_pc = _gmonparam.tos[to_index].selfpc;
|
||||
raw_arc.count = _gmonparam.tos[to_index].count;
|
||||
|
||||
write(fd, &tag, sizeof(tag));
|
||||
write(fd, &raw_arc, sizeof(raw_arc));
|
||||
if (nfilled > 3)
|
||||
{
|
||||
__writev (fd, iov, 2 * nfilled);
|
||||
nfilled = 0;
|
||||
}
|
||||
*(char **) raw_arc[nfilled].from_pc = (char *)frompc;
|
||||
*(char **) raw_arc[nfilled].self_pc =
|
||||
(char *)_gmonparam.tos[to_index].selfpc;
|
||||
*(int *) raw_arc[nfilled].count = _gmonparam.tos[to_index].count;
|
||||
++nfilled;
|
||||
}
|
||||
}
|
||||
__writev (fd, iov, 2 * nfilled);
|
||||
}
|
||||
|
||||
|
||||
@@ -222,55 +247,79 @@ write_bb_counts (fd)
|
||||
int fd;
|
||||
{
|
||||
struct __bb *grp;
|
||||
const u_char tag = GMON_TAG_BB_COUNT;
|
||||
u_char tag = GMON_TAG_BB_COUNT;
|
||||
int ncounts;
|
||||
int i;
|
||||
|
||||
struct iovec bbhead[2] =
|
||||
{
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &ncounts, sizeof (ncounts) }
|
||||
};
|
||||
struct iovec bbbody[8];
|
||||
int nfilled;
|
||||
|
||||
for (i = 0; i < (sizeof (bbbody) / sizeof (bbbody[0])); i += 2)
|
||||
{
|
||||
bbbody[i].iov_len = sizeof (grp->addresses[0]);
|
||||
bbbody[i + 1].iov_len = sizeof (grp->counts[0]);
|
||||
}
|
||||
|
||||
/* Write each group of basic-block info (all basic-blocks in a
|
||||
compilation unit form a single group). */
|
||||
|
||||
nfilled = 0;
|
||||
for (grp = __bb_head; grp; grp = grp->next)
|
||||
{
|
||||
ncounts = grp->ncounts;
|
||||
write(fd, &tag, sizeof(tag));
|
||||
write(fd, &ncounts, sizeof(ncounts));
|
||||
__writev (fd, bbhead, 2);
|
||||
for (i = 0; i < ncounts; ++i)
|
||||
{
|
||||
write(fd, &grp->addresses[i], sizeof(grp->addresses[0]));
|
||||
write(fd, &grp->counts[i], sizeof(grp->counts[0]));
|
||||
if (nfilled > (sizeof (bbbody) / sizeof (bbbody[0])) - 2)
|
||||
{
|
||||
__writev (fd, bbbody, nfilled);
|
||||
nfilled = 0;
|
||||
}
|
||||
|
||||
bbbody[nfilled++].iov_base = (char *) &grp->addresses[i];
|
||||
bbbody[nfilled++].iov_base = &grp->counts[i];
|
||||
}
|
||||
}
|
||||
__writev (fd, bbbody, nfilled);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_mcleanup ()
|
||||
{
|
||||
struct gmon_hdr ghdr;
|
||||
struct gmon_hdr ghdr __attribute__ ((aligned (__alignof__ (int))));
|
||||
int fd;
|
||||
|
||||
moncontrol(0);
|
||||
fd = open("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
|
||||
moncontrol (0);
|
||||
fd = __open ("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
|
||||
if (fd < 0)
|
||||
{
|
||||
perror("_mcleanup: gmon.out");
|
||||
perror ("_mcleanup: gmon.out");
|
||||
return;
|
||||
}
|
||||
|
||||
/* write gmon.out header: */
|
||||
memset(&ghdr, 0, sizeof(ghdr));
|
||||
memcpy(&ghdr.cookie[0], GMON_MAGIC, sizeof(ghdr.cookie));
|
||||
ghdr.version = GMON_VERSION;
|
||||
write(fd, &ghdr, sizeof(ghdr));
|
||||
memset (&ghdr, 0, sizeof (struct gmon_hdr));
|
||||
memcpy (&ghdr.cookie[0], GMON_MAGIC, sizeof (ghdr.cookie));
|
||||
*(int *) ghdr.version = GMON_VERSION;
|
||||
__write (fd, &ghdr, sizeof (struct gmon_hdr));
|
||||
|
||||
/* write PC histogram: */
|
||||
write_hist(fd);
|
||||
write_hist (fd);
|
||||
|
||||
/* write call-graph: */
|
||||
write_call_graph(fd);
|
||||
write_call_graph (fd);
|
||||
|
||||
/* write basic-block execution counts: */
|
||||
write_bb_counts(fd);
|
||||
write_bb_counts (fd);
|
||||
|
||||
close(fd);
|
||||
__close (fd);
|
||||
|
||||
/* free the memory. */
|
||||
free (_gmonparam.tos);
|
||||
}
|
||||
|
||||
+27
-21
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger <davidm@cs.arizona.edu>.
|
||||
|
||||
@@ -40,30 +40,36 @@ __BEGIN_DECLS
|
||||
* always comes first in gmon.out and is then followed by a series
|
||||
* records defined below.
|
||||
*/
|
||||
struct gmon_hdr {
|
||||
char cookie[4];
|
||||
int version;
|
||||
int spare[3];
|
||||
};
|
||||
struct gmon_hdr
|
||||
{
|
||||
char cookie[4];
|
||||
char version[4];
|
||||
char spare[3 * 4];
|
||||
};
|
||||
|
||||
/* types of records in this file: */
|
||||
typedef enum {
|
||||
GMON_TAG_TIME_HIST = 0, GMON_TAG_CG_ARC = 1, GMON_TAG_BB_COUNT = 2
|
||||
} GMON_Record_Tag;
|
||||
typedef enum
|
||||
{
|
||||
GMON_TAG_TIME_HIST = 0,
|
||||
GMON_TAG_CG_ARC = 1,
|
||||
GMON_TAG_BB_COUNT = 2
|
||||
} GMON_Record_Tag;
|
||||
|
||||
struct gmon_hist_hdr {
|
||||
unsigned long low_pc; /* base pc address of sample buffer */
|
||||
unsigned long high_pc; /* max pc address of sampled buffer */
|
||||
int hist_size; /* size of sample buffer */
|
||||
int prof_rate; /* profiling clock rate */
|
||||
char dimen[15]; /* phys. dim., usually "seconds" */
|
||||
char dimen_abbrev; /* usually 's' for "seconds" */
|
||||
};
|
||||
struct gmon_hist_hdr
|
||||
{
|
||||
char low_pc[sizeof (char *)]; /* base pc address of sample buffer */
|
||||
char high_pc[sizeof (char *)]; /* max pc address of sampled buffer */
|
||||
char hist_size[4]; /* size of sample buffer */
|
||||
char prof_rate[4]; /* profiling clock rate */
|
||||
char dimen[15]; /* phys. dim., usually "seconds" */
|
||||
char dimen_abbrev; /* usually 's' for "seconds" */
|
||||
};
|
||||
|
||||
struct gmon_cg_arc_record {
|
||||
unsigned long from_pc; /* address within caller's body */
|
||||
unsigned long self_pc; /* address within callee's body */
|
||||
int count; /* number of arc traversals */
|
||||
struct gmon_cg_arc_record
|
||||
{
|
||||
char from_pc[sizeof (char *)]; /* address within caller's body */
|
||||
char self_pc[sizeof (char *)]; /* address within callee's body */
|
||||
char count[4]; /* number of arc traversals */
|
||||
};
|
||||
|
||||
__END_DECLS
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/* Header with interface version macros for library pieces copied elsewhere.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -47,7 +47,7 @@
|
||||
#define _GNU_OBSTACK_INTERFACE_VERSION 1 /* vs malloc/obstack.c */
|
||||
#define _GNU_REGEX_INTERFACE_VERSION 1 /* vs posix/regex.c */
|
||||
#define _GNU_GLOB_INTERFACE_VERSION 1 /* vs posix/glob.c */
|
||||
#define _GNU_GETOPT_INTERFACE_VERSION 1 /* vs posix/getopt.c and
|
||||
#define _GNU_GETOPT_INTERFACE_VERSION 2 /* vs posix/getopt.c and
|
||||
posix/getopt1.c */
|
||||
|
||||
#endif /* gnu-versions.h */
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -12,9 +12,9 @@
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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.
|
||||
|
||||
subdir := gnulib
|
||||
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -12,9 +12,9 @@
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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 grp portion of the library.
|
||||
|
||||
+58
-18
@@ -1,35 +1,75 @@
|
||||
/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <grp.h>
|
||||
#include <stdio.h>
|
||||
#include <libc-lock.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
/* We need to protect the dynamic buffer handling. */
|
||||
__libc_lock_define_initialized (static, lock);
|
||||
|
||||
/* Read one entry from the given stream. */
|
||||
struct group *
|
||||
fgetgrent (FILE *stream)
|
||||
{
|
||||
static char buffer[BUFSIZ];
|
||||
static char *buffer;
|
||||
static size_t buffer_size;
|
||||
static struct group resbuf;
|
||||
struct group *result;
|
||||
int save;
|
||||
|
||||
if (__fgetgrent_r (stream, &resbuf, buffer, sizeof buffer, &result) != 0)
|
||||
return NULL;
|
||||
/* Get lock. */
|
||||
__libc_lock_lock (lock);
|
||||
|
||||
/* Allocate buffer if not yet available. */
|
||||
if (buffer == NULL)
|
||||
{
|
||||
buffer_size = NSS_BUFLEN_GROUP;
|
||||
buffer = malloc (buffer_size);
|
||||
}
|
||||
|
||||
while (buffer != NULL
|
||||
&& __fgetgrent_r (stream, &resbuf, buffer, buffer_size, &result) != 0
|
||||
&& errno == ERANGE)
|
||||
{
|
||||
char *new_buf;
|
||||
buffer_size += NSS_BUFLEN_GROUP;
|
||||
new_buf = realloc (buffer, buffer_size);
|
||||
if (new_buf == NULL)
|
||||
{
|
||||
/* We are out of memory. Free the current buffer so that the
|
||||
process gets a chance for a normal termination. */
|
||||
save = errno;
|
||||
free (buffer);
|
||||
__set_errno (save);
|
||||
}
|
||||
buffer = new_buf;
|
||||
}
|
||||
|
||||
if (buffer == NULL)
|
||||
result = NULL;
|
||||
|
||||
/* Release lock. Preserve error value. */
|
||||
save = errno;
|
||||
__libc_lock_unlock (lock);
|
||||
__set_errno (save);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
+12
-3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -56,6 +56,7 @@ __fgetgrent_r (FILE *stream, struct group *resbuf, char *buffer, size_t buflen,
|
||||
struct group **result)
|
||||
{
|
||||
char *p;
|
||||
int parse_result;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -69,10 +70,18 @@ __fgetgrent_r (FILE *stream, struct group *resbuf, char *buffer, size_t buflen,
|
||||
/* Skip leading blanks. */
|
||||
while (isspace (*p))
|
||||
++p;
|
||||
} while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */
|
||||
} while (*p == '\0' || *p == '#' /* Ignore empty and comment lines. */
|
||||
/* Parse the line. If it is invalid, loop to
|
||||
get the next line of the file to parse. */
|
||||
! parse_line (p, resbuf, (void *) buffer, buflen));
|
||||
|| ! (parse_result = parse_line (p, resbuf,
|
||||
(void *) buffer, buflen)));
|
||||
|
||||
if (parse_result == -1)
|
||||
{
|
||||
/* The parser ran out of space. */
|
||||
*result = NULL;
|
||||
return errno;
|
||||
}
|
||||
|
||||
*result = resbuf;
|
||||
return 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -32,9 +32,6 @@ __BEGIN_DECLS
|
||||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
|
||||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
/* The group structure. */
|
||||
struct group
|
||||
@@ -91,10 +88,13 @@ extern struct group *getgrgid __P ((__gid_t __gid));
|
||||
/* Search for an entry with a matching group name. */
|
||||
extern struct group *getgrnam __P ((__const char *__name));
|
||||
|
||||
#ifdef __USE_REENTRANT
|
||||
#if defined __USE_POSIX || defined __USE_MISC
|
||||
|
||||
#ifdef __USE_MISC
|
||||
/* Reasonable value for the buffer sized used in the reentrant
|
||||
functions below. But better use `sysconf'. */
|
||||
#define NSS_BUFLEN_GROUP 1024
|
||||
#endif
|
||||
|
||||
/* Reentrant versions of some of the functions above.
|
||||
|
||||
@@ -132,7 +132,7 @@ extern int fgetgrent_r __P ((FILE * __stream, struct group *__resultbuf,
|
||||
struct group **__result));
|
||||
#endif
|
||||
|
||||
#endif /* reentrant */
|
||||
#endif /* POSIX or reentrant */
|
||||
|
||||
|
||||
#ifdef __USE_BSD
|
||||
|
||||
+8
-7
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -12,9 +12,9 @@
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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.
|
||||
|
||||
subdir := hurd
|
||||
|
||||
@@ -73,10 +73,11 @@ include ../Rules
|
||||
# from $(subdirs), and this rule arranges for the headers in question
|
||||
# to get installed.
|
||||
sunrpc-headers = netdb.h pmap_prot.h xdr.h types.h auth.h \
|
||||
rpc_msg.h auth_unix.h
|
||||
installed-sunrpc-headers = $(addprefix $(includedir)/rpc/,$(sunrpc-headers))
|
||||
rpc_msg.h auth_unix.h clnt.h
|
||||
installed-sunrpc-headers = $(addprefix $(inst_includedir)/rpc/, \
|
||||
$(sunrpc-headers))
|
||||
install-headers-nosubdir: $(installed-sunrpc-headers)
|
||||
$(installed-sunrpc-headers): $(includedir)/%: $(..)sunrpc/%
|
||||
$(installed-sunrpc-headers): $(inst_includedir)/%: $(..)sunrpc/%
|
||||
$(do-install)
|
||||
|
||||
|
||||
|
||||
+22
-17
@@ -1,22 +1,21 @@
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <unistd.h>
|
||||
#include <hurd.h>
|
||||
#include <hurd/fd.h>
|
||||
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA. */
|
||||
|
||||
/* Change the current root directory to FD. */
|
||||
int
|
||||
DEFUN(fchroot, (fd), int fd)
|
||||
fchroot (int fd)
|
||||
{
|
||||
error_t err;
|
||||
file_t dir;
|
||||
@@ -36,7 +35,13 @@ DEFUN(fchroot, (fd), int fd)
|
||||
}));
|
||||
|
||||
if (! err)
|
||||
_hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], dir);
|
||||
{
|
||||
file_t root;
|
||||
err = __file_reparent (dir, MACH_PORT_NULL, &root);
|
||||
__mach_port_deallocate (__mach_task_self (), dir);
|
||||
if (! err)
|
||||
_hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], root);
|
||||
}
|
||||
|
||||
return err ? __hurd_fail (err) : 0;
|
||||
}
|
||||
|
||||
+17
-16
@@ -1,26 +1,27 @@
|
||||
/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <hurd.h>
|
||||
|
||||
/* This is initialized in dtable.c when that gets linked in.
|
||||
If dtable.c is not linked in, it will be zero. */
|
||||
file_t (*_hurd_getdport_fn) (int fd);
|
||||
static file_t (*_default_hurd_getdport_fn) (int fd) = 0;
|
||||
weak_alias (_default_hurd_getdport_fn, _hurd_getdport_fn)
|
||||
|
||||
file_t
|
||||
__getdport (int fd)
|
||||
@@ -43,7 +44,7 @@ __getdport (int fd)
|
||||
errno = EBADF;
|
||||
return MACH_PORT_NULL;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
__mach_port_mod_refs (__mach_task_self (), _hurd_init_dtable[fd],
|
||||
MACH_PORT_RIGHT_SEND, 1);
|
||||
|
||||
+23
-17
@@ -1,20 +1,20 @@
|
||||
/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _HURD_H
|
||||
|
||||
@@ -109,11 +109,10 @@ extern pid_t _hurd_pid, _hurd_ppid, _hurd_pgrp;
|
||||
extern int _hurd_orphaned;
|
||||
|
||||
/* This variable is incremented every time the process IDs change. */
|
||||
|
||||
unsigned int _hurd_pids_changed_stamp;
|
||||
extern unsigned int _hurd_pids_changed_stamp;
|
||||
|
||||
/* This condition is broadcast every time the process IDs change. */
|
||||
struct condition _hurd_pids_changed_sync;
|
||||
extern struct condition _hurd_pids_changed_sync;
|
||||
|
||||
/* Unix `data break', for brk and sbrk.
|
||||
If brk and sbrk are not used, this info will not be initialized or used. */
|
||||
@@ -304,4 +303,11 @@ extern int hurd_check_cancel (void);
|
||||
extern io_t __getdport (int fd), getdport (int fd);
|
||||
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
/* Write formatted output to PORT, a Mach port supporting the i/o protocol,
|
||||
according to the format string FORMAT, using the argument list in ARG. */
|
||||
int vpprintf (io_t port, const char *format, va_list arg);
|
||||
|
||||
|
||||
#endif /* hurd.h */
|
||||
|
||||
+16
-15
@@ -1,21 +1,21 @@
|
||||
/* Internal per-thread variables for the Hurd.
|
||||
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _HURD_THREADVAR_H
|
||||
#define _HURD_THREADVAR_H
|
||||
@@ -33,7 +33,7 @@ Cambridge, MA 02139, USA. */
|
||||
stack pointer is ignored; and __hurd_threadvar_stack_offset gives the
|
||||
address of a small allocated region which contains the variables for the
|
||||
single thread. */
|
||||
|
||||
|
||||
extern unsigned long int __hurd_threadvar_stack_mask;
|
||||
extern unsigned long int __hurd_threadvar_stack_offset;
|
||||
|
||||
@@ -60,6 +60,7 @@ enum __hurd_threadvar_index
|
||||
_HURD_THREADVAR_ERRNO, /* `errno' value for this thread. */
|
||||
_HURD_THREADVAR_SIGSTATE, /* This thread's `struct hurd_sigstate'. */
|
||||
_HURD_THREADVAR_DYNAMIC_USER, /* Dynamically-assigned user variables. */
|
||||
_HURD_THREADVAR_MALLOC, /* For use of malloc. */
|
||||
_HURD_THREADVAR_MAX /* Default value for __hurd_threadvar_max. */
|
||||
};
|
||||
|
||||
|
||||
+130
-23
@@ -1,20 +1,20 @@
|
||||
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <hurd.h>
|
||||
#include <hurd/msg_server.h>
|
||||
@@ -37,17 +37,124 @@ _S_msg_add_auth (mach_port_t me,
|
||||
{
|
||||
error_t err;
|
||||
auth_t newauth;
|
||||
uid_t *genuids, *gengids, *auxuids, *auxgids;
|
||||
mach_msg_type_number_t ngenuids, ngengids, nauxuids, nauxgids;
|
||||
uid_t *newgenuids, *newgengids, *newauxuids, *newauxgids;
|
||||
mach_msg_type_number_t nnewgenuids, nnewgengids, nnewauxuids, nnewauxgids;
|
||||
|
||||
if (err = __USEPORT (AUTH,
|
||||
__auth_makeauth (port,
|
||||
&addauth, 1, MACH_MSG_TYPE_MOVE_SEND,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
&newauth)))
|
||||
/* Create a list of ids and store it in NEWLISTP, length NEWLISTLEN.
|
||||
Keep all the ids in EXIST (len NEXIST), adding in those from NEW
|
||||
(len NNEW) which are not already there. */
|
||||
error_t make_list (uid_t **newlistp, mach_msg_type_number_t *newlistlen,
|
||||
uid_t *exist, mach_msg_type_number_t nexist,
|
||||
uid_t *new, mach_msg_type_number_t nnew)
|
||||
{
|
||||
error_t urp;
|
||||
int i, j, k;
|
||||
vm_size_t offset;
|
||||
|
||||
urp = vm_allocate (mach_task_self (), (vm_address_t *) newlistp,
|
||||
nexist + nnew * sizeof (uid_t), 1);
|
||||
if (urp)
|
||||
return urp;
|
||||
|
||||
j = 0;
|
||||
for (i = 0; i < nexist; i++)
|
||||
(*newlistp)[j++] = exist[i];
|
||||
|
||||
for (i = 0; i < nnew; i++)
|
||||
{
|
||||
for (k = 0; k < nexist; k++)
|
||||
if (exist[k] == new[i])
|
||||
break;
|
||||
if (k < nexist)
|
||||
continue;
|
||||
|
||||
(*newlistp)[j++] = new[i];
|
||||
}
|
||||
|
||||
offset = (round_page (nexist + nnew * sizeof (uid_t))
|
||||
- round_page (j * sizeof (uid_t)));
|
||||
if (offset)
|
||||
vm_deallocate (mach_task_self (),
|
||||
(vm_address_t) (*newlistp
|
||||
+ (nexist + nnew * sizeof (uid_t))),
|
||||
offset);
|
||||
*newlistlen = j;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Find out what ids ADDAUTH refers to */
|
||||
|
||||
genuids = gengids = auxuids = auxgids = 0;
|
||||
ngenuids = ngengids = nauxuids = nauxgids = 0;
|
||||
err = __auth_getids (addauth,
|
||||
&genuids, &ngenuids,
|
||||
&auxuids, &nauxuids,
|
||||
&gengids, &ngengids,
|
||||
&auxgids, &nauxgids);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* OR in these ids to what we already have, creating a new list. */
|
||||
|
||||
HURD_CRITICAL_BEGIN;
|
||||
__mutex_lock (&_hurd_id.lock);
|
||||
_hurd_check_ids ();
|
||||
|
||||
#define MAKE(genaux,uidgid) \
|
||||
make_list (&new ## genaux ## uidgid ## s, \
|
||||
&nnew ## genaux ## uidgid ## s, \
|
||||
_hurd_id.genaux.uidgid ## s, \
|
||||
_hurd_id.genaux.n ## uidgid ## s, \
|
||||
genaux ## uidgid ## s, \
|
||||
n ## genaux ## uidgid ## s)
|
||||
|
||||
err = MAKE (gen, uid);
|
||||
if (!err)
|
||||
MAKE (aux, uid);
|
||||
if (!err)
|
||||
MAKE (gen, gid);
|
||||
if (!err)
|
||||
MAKE (aux, gid);
|
||||
#undef MAKE
|
||||
|
||||
__mutex_unlock (&_hurd_id.lock);
|
||||
HURD_CRITICAL_END;
|
||||
|
||||
|
||||
/* Create the new auth port */
|
||||
|
||||
if (!err)
|
||||
err = __USEPORT (AUTH,
|
||||
__auth_makeauth (port,
|
||||
&addauth, MACH_MSG_TYPE_MOVE_SEND, 1,
|
||||
newgenuids, nnewgenuids,
|
||||
newauxuids, nnewauxuids,
|
||||
newgengids, nnewgengids,
|
||||
newauxgids, nnewauxgids,
|
||||
&newauth));
|
||||
|
||||
#define freeup(array, len) \
|
||||
if (array) \
|
||||
vm_deallocate (mach_task_self (), (vm_address_t) array, \
|
||||
len * sizeof (uid_t));
|
||||
|
||||
freeup (genuids, ngenuids);
|
||||
freeup (auxuids, nauxuids);
|
||||
freeup (gengids, ngengids);
|
||||
freeup (auxgids, nauxgids);
|
||||
freeup (newgenuids, nnewgenuids);
|
||||
freeup (newauxuids, nnewauxuids);
|
||||
freeup (newgengids, nnewgengids);
|
||||
freeup (newauxgids, nnewauxgids);
|
||||
#undef freeup
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* And install it. */
|
||||
|
||||
err = __setauth (newauth);
|
||||
__mach_port_deallocate (__mach_task_self (), newauth);
|
||||
if (err)
|
||||
@@ -108,7 +215,7 @@ _S_msg_del_auth (mach_port_t me,
|
||||
|
||||
err = __USEPORT (AUTH, __auth_makeauth
|
||||
(port,
|
||||
NULL, 0, MACH_MSG_TYPE_COPY_SEND,
|
||||
NULL, MACH_MSG_TYPE_COPY_SEND, 0,
|
||||
newu, nu,
|
||||
_hurd_id.aux.uids, _hurd_id.aux.nuids,
|
||||
newg, ng,
|
||||
|
||||
+5
-2
@@ -1,5 +1,5 @@
|
||||
/* Handle faults in the signal thread.
|
||||
Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -29,7 +29,10 @@
|
||||
#include <assert.h>
|
||||
|
||||
jmp_buf _hurdsig_fault_env;
|
||||
struct hurd_signal_preemptor _hurdsig_fault_preemptor;
|
||||
struct hurd_signal_preemptor _hurdsig_fault_preemptor = {0};
|
||||
|
||||
/* XXX temporary to deal with spelling fix */
|
||||
weak_alias (_hurdsig_fault_preemptor, _hurdsig_fault_preempter)
|
||||
|
||||
static mach_port_t forward_sigexc;
|
||||
|
||||
|
||||
+16
-14
@@ -1,20 +1,20 @@
|
||||
/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
@@ -31,7 +31,9 @@ struct hurd_port *_hurd_ports;
|
||||
unsigned int _hurd_nports;
|
||||
mode_t _hurd_umask;
|
||||
sigset_t _hurdsig_traced;
|
||||
|
||||
char **__libc_argv;
|
||||
int __libc_argc;
|
||||
|
||||
|
||||
error_t
|
||||
|
||||
+11
-3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -39,6 +39,11 @@ thread_t _hurd_msgport_thread;
|
||||
/* Thread which receives task-global signals. */
|
||||
thread_t _hurd_sigthread;
|
||||
|
||||
/* These are set up by _hurdsig_init. */
|
||||
unsigned long int __hurd_sigthread_stack_base;
|
||||
unsigned long int __hurd_sigthread_stack_end;
|
||||
unsigned long int *__hurd_sigthread_variables;
|
||||
|
||||
/* Linked-list of per-thread signal state. */
|
||||
struct hurd_sigstate *_hurd_sigstates;
|
||||
|
||||
@@ -421,9 +426,12 @@ abort_all_rpcs (int signo, struct machine_thread_all_state *state, int live)
|
||||
}
|
||||
}
|
||||
|
||||
struct hurd_signal_preemptor *_hurdsig_preemptors;
|
||||
struct hurd_signal_preemptor *_hurdsig_preemptors = 0;
|
||||
sigset_t _hurdsig_preempted_set;
|
||||
|
||||
/* XXX temporary to deal with spelling fix */
|
||||
weak_alias (_hurdsig_preemptors, _hurdsig_preempters)
|
||||
|
||||
/* Mask of stop signals. */
|
||||
#define STOPSIGS (sigmask (SIGTTIN) | sigmask (SIGTTOU) | \
|
||||
sigmask (SIGSTOP) | sigmask (SIGTSTP))
|
||||
@@ -1186,7 +1194,7 @@ _hurdsig_init (void)
|
||||
err = __thread_create (__mach_task_self (), &_hurd_msgport_thread);
|
||||
assert_perror (err);
|
||||
|
||||
stacksize = __vm_page_size * 4; /* Small stack for signal thread. */
|
||||
stacksize = __vm_page_size * 8; /* Small stack for signal thread. */
|
||||
err = __mach_setup_thread (__mach_task_self (), _hurd_msgport_thread,
|
||||
_hurd_msgport_receive,
|
||||
(vm_address_t *) &__hurd_sigthread_stack_base,
|
||||
|
||||
+14
-23
@@ -1,21 +1,21 @@
|
||||
/* Initial program startup for running under the GNU Hurd.
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
@@ -35,15 +35,6 @@ Cambridge, MA 02139, USA. */
|
||||
mach_port_t *_hurd_init_dtable;
|
||||
mach_msg_type_number_t _hurd_init_dtablesize;
|
||||
|
||||
unsigned int __hurd_threadvar_max;
|
||||
unsigned long int __hurd_threadvar_stack_mask;
|
||||
unsigned long int __hurd_threadvar_stack_offset;
|
||||
|
||||
/* These are set up by _hurdsig_init. */
|
||||
unsigned long int __hurd_sigthread_stack_base;
|
||||
unsigned long int __hurd_sigthread_stack_end;
|
||||
unsigned long int *__hurd_sigthread_variables;
|
||||
|
||||
extern void __mach_init (void);
|
||||
|
||||
/* Entry point. This is the first thing in the text segment.
|
||||
|
||||
+24
-17
@@ -1,21 +1,21 @@
|
||||
/* Report on what a thread in our task is waiting for.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <hurd.h>
|
||||
#include <hurd/signal.h>
|
||||
@@ -93,8 +93,15 @@ describe_port (string_t description, mach_port_t port)
|
||||
}
|
||||
|
||||
|
||||
/* Common defn so we don't link in the itimer code unnecessarily. */
|
||||
thread_t _hurd_itimer_thread; /* XXX */
|
||||
/* We want _HURD_ITIMER_THREAD, but don't want to link in the itimer code
|
||||
unnecessarily. */
|
||||
#if 0 /* libc.so.0.0 needs this defined, so make it a weak alias for now. */
|
||||
extern thread_t _hurd_itimer_thread; /* XXX */
|
||||
weak_extern (_hurd_itimer_thread)
|
||||
#else
|
||||
static thread_t default_hurd_itimer_thread;
|
||||
weak_alias (default_hurd_itimer_thread, _hurd_itimer_thread)
|
||||
#endif
|
||||
|
||||
kern_return_t
|
||||
_S_msg_report_wait (mach_port_t msgport, thread_t thread,
|
||||
@@ -105,7 +112,7 @@ _S_msg_report_wait (mach_port_t msgport, thread_t thread,
|
||||
if (thread == _hurd_msgport_thread)
|
||||
/* Cute. */
|
||||
strcpy (description, "msgport");
|
||||
else if (thread == _hurd_itimer_thread)
|
||||
else if (&_hurd_msgport_thread && thread == _hurd_itimer_thread)
|
||||
strcpy (description, "itimer");
|
||||
else
|
||||
{
|
||||
|
||||
+15
-15
@@ -1,21 +1,21 @@
|
||||
/* Set a host configuration item kept as the whole contents of a file.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <hurd.h>
|
||||
@@ -28,7 +28,7 @@ _hurd_set_host_config (const char *item, const char *value, size_t valuelen)
|
||||
mach_msg_type_number_t nwrote;
|
||||
file_t new, dir;
|
||||
|
||||
dir = __file_name_split (item, &item);
|
||||
dir = __file_name_split (item, (char **)&item);
|
||||
if (dir == MACH_PORT_NULL)
|
||||
return -1;
|
||||
|
||||
|
||||
+23
-22
@@ -1,30 +1,30 @@
|
||||
/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1994, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <hurd.h>
|
||||
|
||||
static ssize_t
|
||||
DEFUN(pwrite, (cookie, buf, n),
|
||||
PTR cookie AND CONST char *buf AND size_t n)
|
||||
pwrite (void *cookie,
|
||||
const char *buf,
|
||||
size_t n)
|
||||
{
|
||||
error_t error = __io_write ((io_t) cookie, buf, n, -1,
|
||||
(mach_msg_type_number_t *) &n);
|
||||
@@ -37,24 +37,25 @@ DEFUN(pwrite, (cookie, buf, n),
|
||||
/* Write formatted output to PORT, a Mach port supporting the i/o protocol,
|
||||
according to the format string FORMAT, using the argument list in ARG. */
|
||||
int
|
||||
DEFUN(vpprintf, (port, format, arg),
|
||||
io_t port AND CONST char *format AND va_list arg)
|
||||
vpprintf (io_t port,
|
||||
const char *format,
|
||||
va_list arg)
|
||||
{
|
||||
int done;
|
||||
FILE f;
|
||||
|
||||
/* Create an unbuffered stream talking to PORT on the stack. */
|
||||
memset((PTR) &f, 0, sizeof(f));
|
||||
memset ((void *) &f, 0, sizeof (f));
|
||||
f.__magic = _IOMAGIC;
|
||||
f.__mode.__write = 1;
|
||||
f.__cookie = (PTR) port;
|
||||
f.__cookie = (void *) port;
|
||||
f.__room_funcs = __default_room_functions;
|
||||
f.__io_funcs.__write = pwrite;
|
||||
f.__seen = 1;
|
||||
f.__userbuf = 1;
|
||||
|
||||
/* vfprintf will use a buffer on the stack for the life of the call. */
|
||||
done = vfprintf(&f, format, arg);
|
||||
done = vfprintf (&f, format, arg);
|
||||
|
||||
return done;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -22,7 +22,7 @@
|
||||
subdir := inet
|
||||
|
||||
headers := netinet/ether.h netinet/in.h netinet/if_ether.h \
|
||||
netinet/tcp.h $(wildcard arpa/*.h protocols/*.h) \
|
||||
netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \
|
||||
aliases.h
|
||||
|
||||
distribute := netgroup.h
|
||||
|
||||
+12
-13
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -28,12 +28,12 @@ __BEGIN_DECLS
|
||||
|
||||
/* Structure to represent one entry of the alias data base. */
|
||||
struct aliasent
|
||||
{
|
||||
char *alias_name;
|
||||
size_t alias_members_len;
|
||||
char **alias_members;
|
||||
int alias_local;
|
||||
};
|
||||
{
|
||||
char *alias_name;
|
||||
size_t alias_members_len;
|
||||
char **alias_members;
|
||||
int alias_local;
|
||||
};
|
||||
|
||||
|
||||
/* Open alias data base files. */
|
||||
@@ -45,19 +45,18 @@ extern void endaliasent __P ((void));
|
||||
/* Get the next entry from the alias data base. */
|
||||
extern struct aliasent *getaliasent __P ((void));
|
||||
|
||||
/* Get alias entry corresponding to NAME. */
|
||||
extern struct aliasent *getaliasbyname __P ((__const char *__name));
|
||||
|
||||
#ifdef __USE_REENTRANT
|
||||
/* Reentrant versions of some of the functions above. */
|
||||
/* Get the next entry from the alias data base and put it in RESULT_BUF. */
|
||||
extern int getaliasent_r __P ((struct aliasent *__result_buf, char *__buffer,
|
||||
size_t __buflen, struct aliasent **__result));
|
||||
|
||||
/* Get alias entry corresponding to NAME. */
|
||||
extern struct aliasent *getaliasbyname __P ((__const char *__name));
|
||||
|
||||
/* Get alias entry corresponding to NAME and put it in RESULT_BUF. */
|
||||
extern int getaliasbyname_r __P ((__const char *__name,
|
||||
struct aliasent *__result_buf,
|
||||
char *__buffer, size_t __buflen,
|
||||
struct aliasent **__result));
|
||||
#endif /* reentrant */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
+87
-53
@@ -1,61 +1,95 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)inet.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
/* Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
#ifndef _INET_H_
|
||||
#define _INET_H_
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
/* External definitions for functions in inet(3) */
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ARPA_INET_H
|
||||
|
||||
#define _ARPA_INET_H 1
|
||||
#include <features.h>
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h> /* To define `struct in_addr'. */
|
||||
|
||||
__BEGIN_DECLS
|
||||
u_long inet_addr __P((const char *));
|
||||
int inet_aton __P((const char *, struct in_addr *));
|
||||
u_int32_t inet_lnaof __P((struct in_addr));
|
||||
struct in_addr inet_makeaddr __P((u_int32_t , u_int32_t));
|
||||
char * inet_neta __P((u_long, char *, size_t));
|
||||
u_int32_t inet_netof __P((struct in_addr));
|
||||
u_int32_t inet_network __P((const char *));
|
||||
char *inet_net_ntop __P((int, const void *, int, char *, size_t));
|
||||
int inet_net_pton __P((int, const char *, void *, size_t));
|
||||
char *inet_ntoa __P((struct in_addr));
|
||||
int inet_pton __P((int, const char *, void *));
|
||||
const char *inet_ntop __P((int, const void *, char *, size_t));
|
||||
u_int inet_nsap_addr __P((const char *, u_char *, int));
|
||||
char *inet_nsap_ntoa __P((int, const u_char *, char *));
|
||||
|
||||
/* Convert Internet host address from numbers-and-dots notation in CP
|
||||
into binary data in network byte order. */
|
||||
extern unsigned long int inet_addr __P ((__const char *__cp));
|
||||
|
||||
/* Convert Internet host address from numbers-and-dots notation in CP
|
||||
into binary data and store the result in the structure INP. */
|
||||
extern int inet_aton __P ((__const char *__cp, struct in_addr *__inp));
|
||||
|
||||
/* Return the local host address part of the Internet address in IN. */
|
||||
extern u_int32_t inet_lnaof __P ((struct in_addr __in));
|
||||
|
||||
/* Make Internet host address in network byte order by combining the
|
||||
network number NET with the local address HOST. */
|
||||
extern struct in_addr inet_makeaddr __P ((u_int32_t __net, u_int32_t __host));
|
||||
|
||||
/* Format a network number NET into presentation format and place result
|
||||
in buffer starting at BUF with length of LEN bytes. */
|
||||
extern char *inet_neta __P ((u_long __net, char *__buf, size_t __len));
|
||||
|
||||
/* Return network number part of the Internet address IN. */
|
||||
extern u_int32_t inet_netof __P ((struct in_addr __in));
|
||||
|
||||
/* Extract the network number in network byte order from the address
|
||||
in numbers-and-dots natation starting at CP. */
|
||||
extern u_int32_t inet_network __P ((__const char *__cp));
|
||||
|
||||
/* Convert network number for interface type AF in buffer starting at
|
||||
CP to presentation format. The result will specifiy BITS bits of
|
||||
the number. */
|
||||
extern char *inet_net_ntop __P((int __af, __const void *__cp, int __bits,
|
||||
char *__buf, size_t __len));
|
||||
|
||||
/* Convert network number for interface type AF from presentation in
|
||||
buffer starting at CP to network format and store result int
|
||||
buffer starting at BUF of size LEN. */
|
||||
extern int inet_net_pton __P ((int __af, __const char *__cp,
|
||||
void *__buf, size_t __len));
|
||||
|
||||
/* Convert Internet number in IN to ASCII representation. The return value
|
||||
is a pointer to an internal array containing the string. */
|
||||
extern char *inet_ntoa __P ((struct in_addr __in));
|
||||
|
||||
/* Convert from presentation format of an Internet number in buffer
|
||||
starting at CP to the binary network format and store result for
|
||||
interface type AF in buffer starting at BUF. */
|
||||
extern int inet_pton __P ((int __af, __const char *__cp, void *__buf));
|
||||
|
||||
/* Convert a Internet address in binary network format for interface
|
||||
type AF in buffer starting at CP to presentation form and place
|
||||
result in buffer of length LEN astarting at BUF. */
|
||||
extern __const char *inet_ntop __P ((int __af, __const void *__cp,
|
||||
char *__buf, size_t __len));
|
||||
|
||||
/* Convert ASCII representation in hexadecimal form of the Internet
|
||||
address to binary form and place result in buffer of length LEN
|
||||
starting at BUF. */
|
||||
extern unsigned int inet_nsap_addr __P ((__const char *__cp,
|
||||
unsigned char *__buf, int __len));
|
||||
|
||||
/* Convert internet address in binary form in LEN bytes starting at CP
|
||||
a presentation form and place result in BUF. */
|
||||
extern char *inet_nsap_ntoa __P ((int __len, __const unsigned char *__cp,
|
||||
char *__buf));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_INET_H_ */
|
||||
#endif /* arpa/inet.h */
|
||||
|
||||
+22
-15
@@ -1,23 +1,28 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
|
||||
#define LOOKUP_TYPE struct hostent
|
||||
@@ -28,4 +33,6 @@ Boston, MA 02111-1307, USA. */
|
||||
#define BUFLEN 1024
|
||||
#define NEED_H_ERRNO 1
|
||||
|
||||
#define HANDLE_DIGITS_DOTS 1
|
||||
|
||||
#include "../nss/getXXbyYY.c"
|
||||
|
||||
+23
-15
@@ -1,23 +1,28 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
|
||||
#define LOOKUP_TYPE struct hostent
|
||||
@@ -28,4 +33,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#define BUFLEN 1024
|
||||
#define NEED_H_ERRNO 1
|
||||
|
||||
#define HANDLE_DIGITS_DOTS 1
|
||||
#define HAVE_AF 1
|
||||
|
||||
#include "../nss/getXXbyYY.c"
|
||||
|
||||
+24
-15
@@ -1,23 +1,28 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
|
||||
#define LOOKUP_TYPE struct hostent
|
||||
@@ -27,4 +32,8 @@ Boston, MA 02111-1307, USA. */
|
||||
#define ADD_VARIABLES name, af
|
||||
#define NEED_H_ERRNO 1
|
||||
|
||||
#define HANDLE_DIGITS_DOTS 1
|
||||
#define HAVE_LOOKUP_BUFFER 1
|
||||
#define HAVE_AF 1
|
||||
|
||||
#include "../nss/getXXbyYY_r.c"
|
||||
|
||||
+23
-15
@@ -1,23 +1,28 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
|
||||
#define LOOKUP_TYPE struct hostent
|
||||
@@ -28,4 +33,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#define NEED_H_ERRNO 1
|
||||
#define NEED__RES 1
|
||||
|
||||
#define HANDLE_DIGITS_DOTS 1
|
||||
#define HAVE_LOOKUP_BUFFER 1
|
||||
|
||||
#include "../nss/getXXbyYY_r.c"
|
||||
|
||||
+29
-23
@@ -1,21 +1,21 @@
|
||||
/* Functions for storing Ethernet addresses in ASCII and mapping to hostnames.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef __NETINET_ETHER_H
|
||||
|
||||
@@ -25,24 +25,30 @@ Boston, MA 02111-1307, USA. */
|
||||
/* Get definition of `struct ether_addr'. */
|
||||
#include <netinet/if_ether.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Convert 48 bit Ethernet ADDRess to ASCII. */
|
||||
char *ether_ntoa __P ((const struct ether_addr *__addr));
|
||||
char *ether_ntoa_r __P ((const struct ether_addr *__addr, char *__buf));
|
||||
extern char *ether_ntoa __P ((__const struct ether_addr *__addr));
|
||||
extern char *ether_ntoa_r __P ((__const struct ether_addr *__addr,
|
||||
char *__buf));
|
||||
|
||||
/* Convert ASCII string S to 48 bit Ethernet address. */
|
||||
struct ether_addr *ether_aton __P ((const char *__asc));
|
||||
struct ether_addr *ether_aton_r __P ((const char *__asc,
|
||||
struct ether_addr *__addr));
|
||||
extern struct ether_addr *ether_aton __P ((__const char *__asc));
|
||||
extern struct ether_addr *ether_aton_r __P ((__const char *__asc,
|
||||
struct ether_addr *__addr));
|
||||
|
||||
/* Map 48 bit Ethernet number ADDR to HOSTNAME. */
|
||||
int ether_ntohost __P ((char *__hostname, const struct ether_addr *__addr));
|
||||
extern int ether_ntohost __P ((char *__hostname,
|
||||
__const struct ether_addr *__addr));
|
||||
|
||||
/* Map HOSTNAME to 48 bit Ethernet address. */
|
||||
int ether_hostton __P ((const char *__hostname, struct ether_addr *__addr));
|
||||
extern int ether_hostton __P ((__const char *__hostname,
|
||||
struct ether_addr *__addr));
|
||||
|
||||
/* Scan LINE and set ADDR and HOSTNAME. */
|
||||
int ether_line __P ((const char *__line, struct ether_addr *__addr,
|
||||
char *__hostname));
|
||||
extern int ether_line __P ((__const char *__line, struct ether_addr *__addr,
|
||||
char *__hostname));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* netinet/ether.h */
|
||||
|
||||
+11
-7
@@ -306,7 +306,6 @@ iruserok(raddr, superuser, ruser, luser)
|
||||
struct stat sbuf;
|
||||
struct passwd pwdbuf, *pwd;
|
||||
FILE *hostf;
|
||||
uid_t uid;
|
||||
int first;
|
||||
|
||||
first = 1;
|
||||
@@ -326,7 +325,7 @@ again:
|
||||
char *buffer = __alloca (buflen);
|
||||
|
||||
first = 0;
|
||||
if (getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) < 0)
|
||||
if (__getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) < 0)
|
||||
return -1;
|
||||
|
||||
dirlen = strlen (pwd->pw_dir);
|
||||
@@ -339,10 +338,15 @@ again:
|
||||
* reading an NFS mounted file system, can't read files that
|
||||
* are protected read/write owner only.
|
||||
*/
|
||||
uid = geteuid();
|
||||
(void)seteuid(pwd->pw_uid);
|
||||
hostf = fopen(pbuf, "r");
|
||||
(void)seteuid(uid);
|
||||
if (__access (pbuf, R_OK) != 0)
|
||||
hostf = NULL;
|
||||
else
|
||||
{
|
||||
uid_t uid = geteuid ();
|
||||
seteuid (pwd->pw_uid);
|
||||
hostf = fopen (pbuf, "r");
|
||||
seteuid (uid);
|
||||
}
|
||||
|
||||
if (hostf == NULL)
|
||||
return (-1);
|
||||
@@ -390,7 +394,7 @@ __ivaliduser(hostf, raddr, luser, ruser)
|
||||
size_t bufsize = 0;
|
||||
ssize_t nread;
|
||||
|
||||
while ((nread = getline (&buf, &bufsize, hostf)) > 0) {
|
||||
while ((nread = __getline (&buf, &bufsize, hostf)) > 0) {
|
||||
buf[bufsize - 1] = '\0'; /* Make sure it's terminated. */
|
||||
p = buf;
|
||||
while (*p != '\n' && *p != ' ' && *p != '\t' && *p != '\0') {
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ int
|
||||
rexec(ahost, rport, name, pass, cmd, fd2p)
|
||||
char **ahost;
|
||||
int rport;
|
||||
char *name, *pass, *cmd;
|
||||
const char *name, *pass, *cmd;
|
||||
int *fd2p;
|
||||
{
|
||||
struct sockaddr_in sin, sin2, from;
|
||||
|
||||
+8
-8
@@ -1,6 +1,4 @@
|
||||
# Makefile for intl subdirectory: message handling code from GNU gettext.
|
||||
|
||||
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -14,9 +12,11 @@
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
# Cambridge, MA 02139, USA.
|
||||
# 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.
|
||||
|
||||
# Makefile for intl subdirectory: message handling code from GNU gettext.
|
||||
|
||||
subdir = intl
|
||||
headers = libintl.h
|
||||
@@ -25,14 +25,14 @@ routines = bindtextdom dcgettext dgettext gettext \
|
||||
l10nflist explodename
|
||||
distribute = gettext.h gettextP.h hash-string.h loadinfo.h locale.alias
|
||||
|
||||
install-others = $(localedir)/locale.alias
|
||||
install-others = $(inst_localedir)/locale.alias
|
||||
|
||||
include ../Rules
|
||||
|
||||
CPPFLAGS += -D'GNULOCALEDIR="$(localedir)"' \
|
||||
-D'LOCALE_ALIAS_PATH="$(localedir):$(i18ndir)"'
|
||||
|
||||
$(localedir)/locale.alias: locale.alias
|
||||
$(inst_localedir)/locale.alias: locale.alias
|
||||
$(do-install)
|
||||
|
||||
ifdef gettext-srcdir
|
||||
|
||||
+17
-16
@@ -1,23 +1,23 @@
|
||||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@@ -25,6 +25,7 @@ Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "loadinfo.h"
|
||||
|
||||
|
||||
+1
-31
@@ -1,5 +1,5 @@
|
||||
/* finddomain.c -- handle list of needed message catalogs
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
@@ -63,18 +63,6 @@ void free ();
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
#ifdef _LIBC
|
||||
/* Rename the non ANSI C functions. This is required by the standard
|
||||
because some ANSI C functions will require linking with this object
|
||||
file and the name space must not be polluted. */
|
||||
# define stpcpy(dest, src) __stpcpy(dest, src)
|
||||
#else
|
||||
# ifndef HAVE_STPCPY
|
||||
static char *stpcpy PARAMS ((char *dest, const char *src));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* List of already loaded domains. */
|
||||
static struct loaded_l10nfile *_nl_loaded_domains;
|
||||
|
||||
@@ -200,21 +188,3 @@ _nl_find_domain (dirname, locale, domainname)
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* @@ begin of epilog @@ */
|
||||
|
||||
/* We don't want libintl.a to depend on any other library. So we
|
||||
avoid the non-standard function stpcpy. In GNU C Library this
|
||||
function is available, though. Also allow the symbol HAVE_STPCPY
|
||||
to be defined. */
|
||||
#if !_LIBC && !HAVE_STPCPY
|
||||
static char *
|
||||
stpcpy (dest, src)
|
||||
char *dest;
|
||||
const char *src;
|
||||
{
|
||||
while ((*dest++ = *src++) != '\0')
|
||||
/* Do nothing. */ ;
|
||||
return dest - 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
@@ -42,6 +42,7 @@
|
||||
# include <argz.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined STDC_HEADERS || defined _LIBC
|
||||
# include <stdlib.h>
|
||||
@@ -205,7 +206,8 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
|
||||
? strlen (modifier) + 1 : 0)
|
||||
+ ((mask & CEN_SPECIAL) != 0
|
||||
? strlen (special) + 1 : 0)
|
||||
+ ((mask & (CEN_SPONSOR | CEN_REVISION) != 0)
|
||||
+ (((mask & CEN_SPONSOR) != 0
|
||||
|| (mask & CEN_REVISION) != 0)
|
||||
? (1 + ((mask & CEN_SPONSOR) != 0
|
||||
? strlen (sponsor) + 1 : 0)
|
||||
+ ((mask & CEN_REVISION) != 0
|
||||
|
||||
+5
-4
@@ -1,5 +1,5 @@
|
||||
# Locale name alias data base
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Locale name alias data base.
|
||||
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -22,8 +22,9 @@
|
||||
# All entries are case independent.
|
||||
|
||||
# Note: This file is far from being complete. If you have a value for
|
||||
# your own site which you think might be useful for others too, share it
|
||||
# with the rest of us. Send it to bug-gnu-utils@prep.ai.mit.edu.
|
||||
# your own site which you think might be useful for others too, share
|
||||
# it with the rest of us. Send it using the `glibcbug' script to
|
||||
# bugs@gnu.ai.mit.edu.
|
||||
|
||||
czech cs_CZ.ISO-8859-2
|
||||
danish da_DK.ISO-8859-1
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -55,4 +55,5 @@ tests := test-utime
|
||||
|
||||
include ../Rules
|
||||
|
||||
CFLAGS-fts.c = -Wno-write-strings
|
||||
CFLAGS-fts.c = -Wno-uninitialized
|
||||
CFLAGS-ftw.c = -Wno-uninitialized
|
||||
|
||||
@@ -57,7 +57,7 @@ static char sccsid[] = "@(#)fts.c 8.2 (Berkeley) 1/2/94";
|
||||
#endif
|
||||
|
||||
|
||||
static FTSENT *fts_alloc __P((FTS *, char *, int));
|
||||
static FTSENT *fts_alloc __P((FTS *, const char *, int));
|
||||
static FTSENT *fts_build __P((FTS *, int));
|
||||
static void fts_lfree __P((FTSENT *));
|
||||
static void fts_load __P((FTS *, FTSENT *));
|
||||
@@ -886,7 +886,7 @@ fts_sort(sp, head, nitems)
|
||||
static FTSENT *
|
||||
fts_alloc(sp, name, namelen)
|
||||
FTS *sp;
|
||||
char *name;
|
||||
const char *name;
|
||||
register int namelen;
|
||||
{
|
||||
register FTSENT *p;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ian Lance Taylor (ian@airs.com).
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
static int
|
||||
ftw_dir (DIR **dirs, int level, int descriptors, char *dir, size_t len,
|
||||
int (*func) (const char *file, struct stat *status, int flag))
|
||||
int (*func) (const char *file, const struct stat *status, int flag))
|
||||
{
|
||||
int got;
|
||||
struct dirent *entry;
|
||||
@@ -151,7 +151,7 @@ ftw_dir (DIR **dirs, int level, int descriptors, char *dir, size_t len,
|
||||
|
||||
int
|
||||
ftw (const char *dir,
|
||||
int (*func) (const char *file, struct stat *status, int flag),
|
||||
int (*func) (const char *file, const struct stat *status, int flag),
|
||||
int descriptors)
|
||||
{
|
||||
DIR **dirs;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ian Lance Taylor (ian@airs.com).
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#define _FTW_H 1
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <statbuf.h>
|
||||
|
||||
/* The FLAG argument to the user function passed to ftw. */
|
||||
@@ -37,8 +39,10 @@
|
||||
/* Call a function on every element in a directory tree. */
|
||||
extern int ftw __P ((__const char *__dir,
|
||||
int (*__func) (__const char *__file,
|
||||
struct stat *__status,
|
||||
__const struct stat *__status,
|
||||
int __flag),
|
||||
int __descriptors));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* ftw.h */
|
||||
|
||||
+2
-4
@@ -1,5 +1,5 @@
|
||||
/* Obsolete function to get current working directory.
|
||||
Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -49,9 +49,7 @@ getwd (buf)
|
||||
/* This is completely unsafe. Nobody can say how big the user
|
||||
provided buffer is. Perhaps the application and the libc
|
||||
disagree about the value of PATH_MAX. */
|
||||
strcpy (buf, tmpbuf);
|
||||
|
||||
return buf;
|
||||
return strcpy (buf, tmpbuf);
|
||||
}
|
||||
|
||||
link_warning (getwd,
|
||||
|
||||
+28
-15
@@ -1,25 +1,25 @@
|
||||
/* Support macros for making weak and strong aliases for symbols,
|
||||
and for using symbol sets and linker warnings with GNU ld.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _LIBC_SYMBOLS_H
|
||||
#define _LIBC_SYMBOLS_H
|
||||
#define _LIBC_SYMBOLS_H 1
|
||||
|
||||
/* This file's macros are included implicitly in the compilation of every
|
||||
file in the C library by -imacros.
|
||||
@@ -224,7 +224,20 @@ extern const char _libc_intl_domainname[];
|
||||
warning message MSG. */
|
||||
#ifdef HAVE_GNU_LD
|
||||
#ifdef HAVE_ELF
|
||||
|
||||
/* We want the .gnu.warning.SYMBOL section to be unallocated. */
|
||||
#ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
|
||||
#define __make_section_unallocated(section_string) \
|
||||
asm(".section " section_string "; .previous");
|
||||
#elif defined (HAVE_ASM_POPSECTION_DIRECTIVE)
|
||||
#define __make_section_unallocated(section_string) \
|
||||
asm(".pushsection " section_string "; .popsection");
|
||||
#else
|
||||
#define __make_section_unallocated(section_string)
|
||||
#endif
|
||||
|
||||
#define link_warning(symbol, msg) \
|
||||
__make_section_unallocated (".gnu.warning." #symbol) \
|
||||
static const char __evoke_link_warning_##symbol[] \
|
||||
__attribute__ ((section (".gnu.warning." #symbol))) = msg;
|
||||
#else
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -32,7 +32,7 @@ routines := \
|
||||
\
|
||||
clearerr feof ferror fgetc fileno fputc freopen fseek getc getchar \
|
||||
memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \
|
||||
vdprintf vscanf vsnprintf obprintf fcloseall \
|
||||
iovdprintf vscanf vsnprintf obprintf fcloseall \
|
||||
\
|
||||
libc_fatal
|
||||
|
||||
|
||||
@@ -8,13 +8,23 @@
|
||||
|
||||
#include <gnu/types.h>
|
||||
#define __need_size_t
|
||||
#define __need_wint_t
|
||||
#include <stddef.h>
|
||||
#ifndef _WINT_T
|
||||
/* Integral type unchanged by default argument promotions that can
|
||||
hold any value corresponding to members of the extended character
|
||||
set, as well as at least one value that does not correspond to any
|
||||
member of the extended character set. */
|
||||
#define _WINT_T
|
||||
typedef unsigned int wint_t;
|
||||
#endif
|
||||
#define _G_size_t size_t
|
||||
#define _G_fpos_t __off_t
|
||||
#define _G_ssize_t __ssize_t
|
||||
#define _G_off_t __off_t
|
||||
#define _G_pid_t __pid_t
|
||||
#define _G_uid_t __uid_t
|
||||
#define _G_wint_t wint_t
|
||||
|
||||
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
|
||||
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
|
||||
@@ -33,6 +43,7 @@ typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
|
||||
|
||||
#define _G_HAVE_PRINTF_FP 1
|
||||
#define _G_HAVE_MMAP 1
|
||||
#define _G_HAVE_LONG_DOUBLE_IO 1
|
||||
|
||||
/* This is defined by <statbuf.h> if `st_blksize' exists. */
|
||||
#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
|
||||
|
||||
+2
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU IO Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
@@ -23,9 +23,7 @@ This exception does not however invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public License. */
|
||||
|
||||
#include "libioP.h"
|
||||
#ifdef __STDC__
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
__fcloseall ()
|
||||
|
||||
+4
-3
@@ -138,8 +138,8 @@ DEFUN(_IO_file_close_it, (fp),
|
||||
}
|
||||
|
||||
void
|
||||
DEFUN(_IO_file_finish, (fp),
|
||||
register _IO_FILE* fp)
|
||||
DEFUN(_IO_file_finish, (fp, dummy),
|
||||
register _IO_FILE* fp AND int dummy)
|
||||
{
|
||||
if (_IO_file_is_open(fp))
|
||||
{
|
||||
@@ -147,7 +147,7 @@ DEFUN(_IO_file_finish, (fp),
|
||||
if (!(fp->_flags & _IO_DELETE_DONT_CLOSE))
|
||||
_IO_SYSCLOSE (fp);
|
||||
}
|
||||
_IO_default_finish(fp);
|
||||
_IO_default_finish(fp, 0);
|
||||
}
|
||||
|
||||
_IO_FILE *
|
||||
@@ -317,6 +317,7 @@ DEFUN(_IO_file_overflow, (f, ch),
|
||||
{
|
||||
if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
|
||||
{
|
||||
f->_flags |= _IO_ERR_SEEN;
|
||||
__set_errno (EBADF);
|
||||
return EOF;
|
||||
}
|
||||
|
||||
+4
-4
@@ -466,7 +466,7 @@ DEFUN(_IO_init, (fp, flags),
|
||||
fp->_markers = NULL;
|
||||
fp->_cur_column = 0;
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_lock_init_recursive (*fp->_lock);
|
||||
_IO_lock_init (*fp->_lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -481,8 +481,8 @@ DEFUN(_IO_default_sync, (fp),
|
||||
current implementation, this function can get called twice! */
|
||||
|
||||
void
|
||||
DEFUN(_IO_default_finish, (fp),
|
||||
_IO_FILE *fp)
|
||||
DEFUN(_IO_default_finish, (fp, dummy),
|
||||
_IO_FILE *fp AND int dummy)
|
||||
{
|
||||
struct _IO_marker *mark;
|
||||
if (fp->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
|
||||
@@ -615,7 +615,7 @@ DEFUN_VOID(_IO_flush_all_linebuffered)
|
||||
{
|
||||
_IO_FILE *fp;
|
||||
for (fp = _IO_list_all; fp != NULL; fp = fp->_chain)
|
||||
if (fp->_flags & _IO_LINE_BUF)
|
||||
if ((fp->_flags & _IO_NO_WRITES) == 0 && fp->_flags & _IO_LINE_BUF)
|
||||
_IO_OVERFLOW (fp, EOF);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user