Compare commits

...
Author SHA1 Message Date
Jakub Jelinek 3bf0ae1ed2 2.3.90-4 2005-07-22 06:05:43 +00:00
Roland McGrath 8075c26a4c Updated to fedora-glibc-20050722T0433 2005-07-22 05:26:10 +00:00
Jakub Jelinek 9b7265a794 2.3.90-3 2005-07-21 09:36:31 +00:00
Jakub Jelinek c6dd3473c6 * wcsmbs/bits/wchar2.h (swprintf): Remove format argument.
* debug/tst-chk1.c (do_test): Add test for swprintf with format
	being the last argument.
2005-07-21 09:33:53 +00:00
Jakub Jelinek 736e2ab430 Updated to fedora-glibc-20050721T0814 2005-07-21 08:25:57 +00:00
Jakub Jelinek 366c71f353 2.3.90-2 2005-07-08 12:23:38 +00:00
Jakub Jelinek a82e01cd19 2.3.90-2 2005-07-08 10:26:36 +00:00
Jakub Jelinek 67110ae729 2.3.90-2 2005-07-08 09:37:26 +00:00
Jakub Jelinek cc93a15ac9 Also remove. 2005-07-08 09:12:25 +00:00
Jakub Jelinek 48f006fc65 Updated to fedora-glibc-20050708T0811 2005-07-08 09:10:42 +00:00
Jakub Jelinek 03d65262fd 2.3.90-1 2005-06-27 13:24:44 +00:00
Jakub Jelinek 5570fbd25a Updated to fedora-glibc-20050627T0850 2005-06-27 09:15:54 +00:00
Jakub Jelinek e4edec582d 2.3.5-11 2005-06-20 16:26:29 +00:00
Jakub Jelinek 27424b2928 Updated to fedora-glibc-20050620T1530 2005-06-20 15:59:03 +00:00
Jakub Jelinek 841d8c3466 2.3.5-10 2005-05-30 09:48:38 +00:00
Jakub Jelinek 3aaf3c46d4 * sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): If
GLRO(dl_osversion) has been already set to a value smaller than
	_dl_discover_osversion (), don't overwrite it here.
2005-05-30 09:42:34 +00:00
Jakub Jelinek 4be21db2db * man/Makefile (SOURCES): Remove all man pages but
pthread_cleanup_push.man, pthread_kill_other_threads_np.man
	and pthread_mutexattr_setkind_np.man.
	* man/pthread_cleanup_push.man: Replace (3) with (3p) where man page
	was not kept.
	* man/pthread_kill_other_threads_np.man: Likewise.
	* man/pthread_mutexattr_setkind_np.man: Likewise.
2005-05-30 09:15:07 +00:00
Jakub Jelinek 65e9e98033 2.3.5-9 2005-05-24 16:34:46 +00:00
Jakub Jelinek fa5b2af750 Updated to fedora-glibc-20050524T1606 2005-05-24 16:31:35 +00:00
Jakub Jelinek 79fa824a27 2.3.5-8 2005-05-23 17:57:41 +00:00
Jakub Jelinek 7cfcf20b10 2005-05-23 Ulrich Drepper <drepper@redhat.com>
* sunrpc/pm_getport.c (__get_socket): New function.
	(pmap_getport): Use it to open a non-reserved socket to the portmapper
	for TCP.
	* include/rpc/pmap_clnt.h (__get_socket): Declare.
	* sunrpc/pm_getmaps.c (pmap_getmaps): Use __get_socket to get an
	non-reserved socket for the portmapper.
	Based on a patch by Steve Dickson <steved@redhat.com>.

	* sunrpc/bindrsvprt.c (bindresvport): Try harder to find a port.
	If we tried looking at the usual range without success extend the
	range to even lower ports.
2005-05-23 17:53:19 +00:00
Jakub Jelinek e975f7ef29 First test, then commit... 2005-05-23 17:36:13 +00:00
Jakub Jelinek 20e33a2a2a * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
[IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
	bl __librt_*_asynccancel@local.

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
	[IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
	bl __librt_*_asynccancel@local.
2005-05-23 17:00:31 +00:00
Jakub Jelinek 1e099837ad . 2005-05-23 16:57:53 +00:00
Jakub Jelinek da947375a5 2.3.5-8 2005-05-23 14:40:57 +00:00
Jakub Jelinek ee6630e651 2005-05-22 Dmitry V. Levin <ldv@altlinux.org>
[BZ #961]
	* io/sys/sendfile.h: Remove __nonnull from sendfile and sendfile64
	declarations.
2005-05-23 14:28:30 +00:00
Jakub Jelinek 9ebafd4bb2 Updated to fedora-glibc-20050523T1354 2005-05-23 14:27:15 +00:00
Jakub Jelinek cbeae26ce7 2.3.5-7 2005-05-20 10:05:38 +00:00
Jakub Jelinek 7563ff8b1f * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
size/alignment of struct pthread rather than tcbhead_t.
	* sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
	Likewise.
	* sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
	Likewise.
	* sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
	Likewise.
2005-05-20 09:55:25 +00:00
Jakub Jelinek 2cc5f1a08a [BZ #955]
* iconvdata/ibm939.c (BODY): Avoid segfaults with input characters
	<UFFFF> and above.
2005-05-20 09:53:27 +00:00
Jakub Jelinek 31f622b5c7 Updated to fedora-glibc-20050520T0919 2005-05-20 09:40:04 +00:00
Jakub Jelinek ec325445c6 2.3.5-6 2005-05-04 18:34:10 +00:00
Jakub Jelinek f6cc6cdf0b Updated to fedora-glibc-20050504T1818 2005-05-04 18:33:36 +00:00
Jakub Jelinek e759ccae88 Updated to fedora-glibc-20050504T0728 2005-05-04 07:51:31 +00:00
Jakub Jelinek c5636422a9 2.3.5-5 2005-05-03 09:40:10 +00:00
Jakub Jelinek cd6fa64a21 * sysdeps/posix/posix_fallocate.c (posix_fallocate): If len == 0,
call ftruncate if offset is bigger than current size.  Make sure
	the file is offset + len bytes long if that is more than current size.
	Don't overwrite previous content of the file.
	* sysdeps/posix/posix_fallocate64.c (__posix_fallocate64_l64):
	Likewise.
2005-05-03 09:39:16 +00:00
Jakub Jelinek eec65e81e7 Updated to fedora-glibc-20050503T0852 2005-05-03 09:28:32 +00:00
Jakub Jelinek a0971eefb7 2.3.5-4 2005-04-28 09:20:01 +00:00
Jakub Jelinek 7647ac7978 Updated to fedora-glibc-20050428T0846 2005-04-28 09:10:12 +00:00
Jakub Jelinek 484a05dfdb 2.3.5-3 2005-04-27 19:34:55 +00:00
Jakub Jelinek 4653df411d Updated to fedora-glibc-20050427T1912 2005-04-27 19:25:35 +00:00
Jakub Jelinek 27bf484e98 2.3.5-2 2005-04-27 11:59:11 +00:00
Jakub Jelinek 44c3fe3909 * elf/rtld.c (dl_main): Call _dl_init_linuxthreads_paths
if GLRO(dl_osversion) <= 0x20413.
	* elf/dl-load.c (_dl_init_paths): Allocate one extra pointer in
	rtld_search_dirs.dirs.
	(_dl_init_linuxthreads_paths): New function.
2005-04-27 11:40:21 +00:00
Jakub Jelinek 35278cc7d7 Updated to fedora-glibc-20050427T1043 2005-04-27 11:31:41 +00:00
Roland McGrath 536db0d3b5 Add nosegneg build in glibc-xen subpackage on i686. 2005-04-27 07:16:23 +00:00
Roland McGrath 6183d906dd Updated to fedora-glibc-20050415T0909 2005-04-15 09:33:04 +00:00
Roland McGrath a19fc30a4b Remove undefined targets from .PHONY. 2005-04-08 17:18:39 +00:00
Roland McGrath bc783511b0 Synchronize makefile tweaks with 2.3 branch. 2005-04-08 17:17:01 +00:00
Jakub Jelinek ff44b53b52 Updated to fedora-glibc-20050405T2114 2005-04-05 21:39:50 +00:00
Jakub Jelinek 8fedcc4046 2.3.4-21 2005-04-05 21:36:50 +00:00
Jakub Jelinek 0d49410af1 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
__inline instead of inline.
	* sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
2005-04-05 21:26:42 +00:00
Jakub Jelinek d40d5d298a 2.3.4-20 2005-04-05 21:00:48 +00:00
Jakub Jelinek 797de46345 2.3.4-19 2005-04-05 17:51:01 +00:00
Jakub Jelinek d1a01a8176 2.3.4-19 2005-04-01 16:11:45 +00:00
Jakub Jelinek e8eaba2b25 Updated to fedora-glibc-20050401T1444 2005-04-01 15:13:31 +00:00
Jakub Jelinek e3166b6660 2.3.4-18 2005-03-25 12:00:14 +00:00
Jakub Jelinek 11782bdb17 * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
* sysdeps/wordsize-64/wcstol_l.c: Likewise.
2005-03-25 11:59:01 +00:00
Jakub Jelinek 55a24b753a Updated to fedora-glibc-20050324T0715 2005-03-24 08:19:18 +00:00
Jakub Jelinek dfaef65dcf 2.3.4-16 2005-03-20 18:12:27 +00:00
Jakub Jelinek 8f8ebbc438 Updated to fedora-glibc-20050319T1907 2005-03-19 21:04:10 +00:00
Jakub Jelinek f5c3480e83 2.3.4-15 2005-03-19 20:42:51 +00:00
Jakub Jelinek e818d7d503 Updated to fedora-glibc-20050319T1907 2005-03-19 20:18:00 +00:00
Jakub Jelinek 359f642662 Add %dir %{_prefix}/%{_lib}/gconv to glibc's file list. 2005-03-17 12:46:40 +00:00
Roland McGrath 723d2419d0 try that again 2005-03-06 23:35:47 +00:00
Roland McGrath af1d845398 Typo in last change 2005-03-06 23:34:29 +00:00
Roland McGrath 30dd715452 2.3.4-13 - fix bits/socket2.h macro typos 2005-03-06 20:55:30 +00:00
Roland McGrath 4474b9a1c3 Typo fixes. 2005-03-06 20:54:57 +00:00
Jakub Jelinek beaa52cb4b 2.3.4-12 2005-03-05 13:36:49 +00:00
Jakub Jelinek 82820f17b4 * Makerules ($(inst_libdir)/libc.so): Use $(slibdir) instead of
$(inst_slibdir) in AS_NEEDED directive.
2005-03-05 13:13:06 +00:00
Jakub Jelinek af2c08fa76 * include/bits/unistd.h: New file.
* include/bits/socket2.h: New file.
2005-03-05 13:04:47 +00:00
Jakub Jelinek 2a626c2bd2 * sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define
unconditionally to (defined RTLD_BOOTSTRAP).
	* sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Likewise.
linuxthreads/
	* sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Rework for GCC 4.
2005-03-05 13:03:35 +00:00
Jakub Jelinek e6826c2b97 . 2005-03-03 17:48:04 +00:00
Jakub Jelinek 1f53f6f82f 2.3.4-11 2005-03-03 16:52:27 +00:00
Jakub Jelinek a3f1b27bd6 Updated to fedora-glibc-20050303T1335 2005-03-03 14:03:17 +00:00
Jakub Jelinek d0fec8d06c Updated to fedora-glibc-20050302T1820 2005-03-03 13:34:35 +00:00
Roland McGrath 00e4559b61 Use -kk to suppress patches for $Id$ differences between branches. 2005-02-18 22:05:58 +00:00
Roland McGrath 15d734b9a0 (bhc-url): quote # 2005-02-18 02:07:01 +00:00
Jakub Jelinek 204a365170 Use -mtune=pentium4 for i686. 2005-02-16 21:44:34 +00:00
Roland McGrath 831b6c6c90 Default COLLECTION now dist-fc4 for fedora-branch. 2005-02-16 21:21:42 +00:00
Roland McGrath ff245362e3 fix tarball names when on branch 2005-02-16 21:21:13 +00:00
Jakub Jelinek c397a00640 Don't fail on non-bi-arch arches. 2005-02-12 11:49:17 +00:00
Jakub Jelinek 3a8051e58a 2.3.4-10 2005-02-12 10:04:41 +00:00
Jakub Jelinek 231d429bea * elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag
before relocating ld.so again.
2005-02-12 10:01:55 +00:00
Jakub Jelinek 8a581cc8cf 2.3.4-9 2005-02-11 15:08:31 +00:00
Jakub Jelinek e35b009a0e * debug/chk_fail.c (__chk_fail): Add a while (1) loop around
__libc_message to kill GCC warning about noreturn function returning.
2005-02-11 15:06:18 +00:00
Jakub Jelinek 88da3f5402 * elf/rtld.c (_dl_start): Set bootstrap_map.l_relocated even
for already prelinked ld.so.
2005-02-11 15:02:46 +00:00
Jakub Jelinek 8426ecf6be * scripts/soversions.awk: Only record first WORDSIZE{32,64}
matching line.
2005-02-11 15:02:19 +00:00
Jakub Jelinek b821229a10 Updated to fedora-glibc-20050211T1037 2005-02-11 11:02:13 +00:00
Roland McGrath 28c85b32ab Tweak grepping for devel.filelist/headers.filelist.
Make sure gnu/stubs-{32,64}.h goes into devel instead of headers.
2005-02-11 10:25:03 +00:00
Jakub Jelinek 7ecaea1e8e 2.3.4-8 2005-02-11 09:12:57 +00:00
Jakub Jelinek b2e5c15083 * sysdeps/unix/sysv/linux/bits/termios.h (CMSPAR): Define.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Add __USE_MISC
	and __USE_XOPEN guards to match linux/bits/termios.h.
	(CMSPAR): Define.
	* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Add __USE_MISC
	and __USE_XOPEN guards to match linux/bits/termios.h.
	(CMSPAR): Define.
	* sysdeps/unix/sysv/linux/sparc/bits/termios.h: Add __USE_MISC
	and __USE_XOPEN guards to match linux/bits/termios.h.
2005-02-11 09:08:01 +00:00
Jakub Jelinek bf8419b987 Updated to fedora-glibc-20050211T0853 2005-02-11 09:01:54 +00:00
Roland McGrath d4f7a4c095 Use glibcname macro 2005-02-11 04:33:15 +00:00
Roland McGrath 79ed5577b8 (dist-import): Put md5sums in timestamp file. 2005-02-10 10:31:40 +00:00
Jakub Jelinek 0bac9ce531 Updated to fedora-glibc-20050208T2213 2005-02-08 22:32:37 +00:00
Jakub Jelinek d585b66fa4 Updated to fedora-glibc-20050208T0948 2005-02-08 10:05:09 +00:00
Jakub Jelinek e7cbcee498 Updated to fedora-glibc-20050106T2203 2005-01-06 22:18:46 +00:00
Jakub Jelinek f19db0eaff Switch to 2.3.4 for now. 2005-01-06 15:21:51 +00:00
Jakub Jelinek ae8e3bb8f3 2.3.4-4 2005-01-06 15:14:37 +00:00
Jakub Jelinek 6bb54d1be0 2004-12-22 Steven Munroe <sjmunroe@us.ibm.com>
* math/libm-test.inc (rint_test_tonearest): New test.
	(rint_test_towardzero): New test.
	(rint_test_downward): New test.
	(rint_test_upward): New test.
	* sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Fix -0.0 case.
	Remove redundant const values.
	* sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: Fix -0.0 case.
	Remove redundant const values.  Use float const.
	* sysdeps/powerpc/powerpc32/fpu/s_floor.S: Fix -0.0 case.
	* sysdeps/powerpc/powerpc32/fpu/s_floorf.S: Fix -0.0 case.
	Use float const.
	* sysdeps/powerpc/powerpc32/fpu/s_rint.S: Fix -0.0 case.
	* sysdeps/powerpc/powerpc32/fpu/s_rintf.S: Fix -0.0 case.
	Use float const.
	* sysdeps/powerpc/powerpc32/fpu/s_round.S: Fix -0.0 case.
	Remove redundant const values.
	* sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Fix -0.0 case.
	Remove redundant const values.  Use float const.
	* sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Fix -0.0 case.
	Remove redundant const values.
	* sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Fix -0.0 case.
	Remove redundant const values.  Use float const.
	* sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Use EALIGN for Quadword
	alignment.  Fix -0.0 case.  Remove redundant const values.
	* sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Use EALIGN for Quadword
	alignment.  Fix -0.0 case.  Remove redundant const values.
	Use float const.
	* sysdeps/powerpc/powerpc64/fpu/s_floor.S: Use EALIGN for Quadword
	alignment.  Fix -0.0 case.
	* sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Use EALIGN for Quadword
	alignment.  Fix -0.0 case.  Use float const.
	* sysdeps/powerpc/powerpc64/fpu/s_rint.S: Use EALIGN for Quadword
	alignment.  Fix -0.0 case.
	* sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Use EALIGN for Quadword
	alignment.  Fix -0.0 case.  Use float const.
	* sysdeps/powerpc/powerpc64/fpu/s_round.S: Use EALIGN for Quadword
	alignment.  Fix -0.0 case.  Remove redundant const values.
	* sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Use EALIGN for Quadword
	alignment.  Fix -0.0 case.  Remove redundant const values.
	Use float const.
	* sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Use EALIGN for Quadword
	alignment.  Fix -0.0 case.
	* sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Use EALIGN for Quadword
	alignment.  Fix -0.0 case.  Remove redundant const values.
	Use float const.
2005-01-06 15:08:34 +00:00
Jakub Jelinek 0ecfa2580d Updated to fedora-glibc-20050106T1443 2005-01-06 14:57:16 +00:00
Jakub Jelinek e4f5d077e9 2.3.4-3 2004-12-21 08:36:17 +00:00
Roland McGrath f0bc541faa (glibc.spec): Drop Makefile dep. 2004-12-20 23:34:42 +00:00
Roland McGrath 4b7c20f9d4 emit glibcname in glibc.spec 2004-12-20 23:31:56 +00:00
Roland McGrath 9b36a86525 Fix tag name in on-branch case. 2004-12-20 23:15:28 +00:00
Jakub Jelinek 861d5124ab 2.3.4-2 2004-12-20 07:59:25 +00:00
Jakub Jelinek 973900e759 2.3.4-1 2004-12-19 23:47:01 +00:00
Jakub Jelinek a7008c8e9d Updated to fedora-glibc-20041219T2331 2004-12-19 23:44:54 +00:00
Jakub Jelinek acea899bcb Updated to fedora-glibc-20041218T2312 2004-12-18 23:21:48 +00:00
Jakub Jelinek 63f0fc945f * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: Removed. 2004-12-18 11:52:46 +00:00
Jakub Jelinek 1c714a10f0 Updated to fedora-glibc-20041218T1131 2004-12-18 11:46:14 +00:00
Jakub Jelinek a004c296d6 add .%%{_target_cpu} to glibc_post_upgrade, only run telinit u
if /sbin/init is the same ELF class and machine as
glibc_post_upgrade.%%{_target_cpu} and similarly with
condrestarting sshd (#143046)
2004-12-18 11:20:18 +00:00
Jakub Jelinek 337cd636a1 Updated to fedora-glibc-20041217T0906 2004-12-17 10:09:19 +00:00
Jakub Jelinek 6ec2d74438 2.3.3-96 2004-12-15 21:12:09 +00:00
Jakub Jelinek 203a56c61e 2.3.3-96 2004-12-15 21:09:39 +00:00
Jakub Jelinek d138a182cc Updated to fedora-glibc-20041215T2056 2004-12-15 21:07:43 +00:00
Jakub Jelinek 95eb6211a1 2.3.3-95 2004-12-15 16:35:59 +00:00
Jakub Jelinek 4739365ace * nis/nis_domain_of_r.c (nis_domain_of_r): Use libnsl_hidden_def,
not libnsl_hidden_proto.
2004-12-15 16:34:09 +00:00
Jakub Jelinek 1494bc3fa2 Include tls.h. 2004-12-15 12:20:47 +00:00
Jakub Jelinek 7b77676c2f * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone): Save
and restore r2 around call to fn.
2004-12-15 11:35:12 +00:00
Jakub Jelinek ac4d4092ac 2.3.3-93 2004-12-15 11:13:44 +00:00
Jakub Jelinek 978044a70e 2004-09-08 H.J. Lu <hongjiu.lu@intel.com>
* Makeconfig (libunwind): New.
	(libgcc_eh): Add $(libunwind).
	(gnulib): Always set to -lgcc $(libgcc_eh).
	(static-gnulib): Always set to -lgcc -lgcc_eh $(libunwind).
	(libc.so-gnulib): New.

	* Makerules (LDLIBS-c.so): Use $(libc.so-gnulib) instead of
	$(static-gnulib).

	* configure.in (libc_cv_cc_with_libunwind): Set to yes if gcc
	uses -lunwind for static binaries.
	* configure: Regenerated.
2004-12-15 11:09:41 +00:00
Jakub Jelinek 14cbd70aa6 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S (__clone): Add support for
NPTL where the PID is stored at userlevel and needs to be reset when
	CLONE_THREAD is not used.
	* sysdeps/unix/sysv/linux/s390/s390-64/clone.S (__clone): Likewise.
nptl/
	* sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
	* sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
	* sysdeps/s390/tcb-offsets.sym (TID): Add.
2004-12-15 09:53:46 +00:00
Jakub Jelinek befe97e0d0 Sync from HEAD once again. 2004-12-15 09:35:48 +00:00
Jakub Jelinek 0d60d7de5d Updated to fedora-glibc-20041215T0847 2004-12-15 09:16:13 +00:00
Jakub Jelinek 1b88b322d4 Updated to fedora-glibc-20041214T1058 2004-12-14 11:22:58 +00:00
Jakub Jelinek d3cfe8dd4e Remove leading underscore. 2004-12-14 09:23:25 +00:00
Jakub Jelinek f9626feb2d Updated to fedora-glibc-20041213T2323 2004-12-13 23:32:37 +00:00
Jakub Jelinek e797f2e35c * posix/getconf.c (main): Skip over initial underscore in
$libexecdir/getconf/default symlink target.
2004-12-10 08:57:56 +00:00
Jakub Jelinek f2b016bfc9 Updated to fedora-glibc-20041210T0634 2004-12-10 06:50:32 +00:00
Jakub Jelinek 0e7f328d08 add __NR_waitid defines for alpha and ia64 2004-12-08 21:07:44 +00:00
Jakub Jelinek fd74fc86fd * elf/ldd.bash.in: For -u, set bind_now=yes.
If eval $add_env '"$file"' exits with exitcode 5, retry with
	eval $add_env \${RTLD} '"$file"'.
	Remove | cat usage, it breaks exit code propagation.
	* elf/rtld.c (process_envvars): If __libc_enable_secure and
	mode != normal, exit with exitcode 5.
2004-12-08 10:57:20 +00:00
Jakub Jelinek ff4eb01a42 Updated to fedora-glibc-20041208T1024 2004-12-08 10:52:16 +00:00
Jakub Jelinek 2f533068b9 2.3.3-88 2004-12-07 16:20:56 +00:00
Jakub Jelinek 94db648424 * sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Add support for
NPTL where the PID is stored at userlevel and needs to be reset when
	CLONE_THREAD is not used.
nptl/
	* sysdeps/ia64/tcb-offsets.sym (TID): Add.
	* sysdeps/unix/sysv/linux/ia64/clone2.S: New file.

	* Makefile (tests): Add tst-getpid2.c.
	* tst-getpid1.c (TEST_CLONE_FLAGS): Define.
	(do_test): Use it.  Use __clone2 instead of clone on ia64.
	* tst-getpid2.c: New test.
2004-12-07 14:20:59 +00:00
Jakub Jelinek 37756a8389 Updated to fedora-glibc-20041207T1331 2004-12-07 14:01:11 +00:00
Jakub Jelinek 3b1744f208 2.3.3-87 2004-12-03 11:32:58 +00:00
Jakub Jelinek 53bfe35486 * posix/tst-regex.c: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
conditionals instead of defined _POSIX_CPUTIME.
	(main): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME
	option is available.
	* posix/tst-regex.c2: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
	conditionals instead of defined _POSIX_CPUTIME.
	(do_test): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME
	option is available.
	* sysdeps/posix/sysconf.c (__sysconf): If _POSIX_CPUTIME resp.
	_POSIX_THREAD_CPUTIME is defined to 0, return -1 for the corresponding
	_SC_ argument.
nptl/
	* sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
	_POSIX_THREAD_CPUTIME): Define to 0.
	* sysdeps/pthread/timer_create.c (timer_create): Remove unused code
	handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
	* sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
	__timer_signal_thread_tclk): Remove.
	(init_module): Remove their initialization.
	(thread_cleanup): Remove their cleanup assertions.
	* sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
	__timer_signal_thread_tclk): Remove.
	* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
	* sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
	* sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
linuxthreads/
	* sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
	_POSIX_THREAD_CPUTIME): Define to 0.
	* sysdeps/pthread/timer_create.c (timer_create): Remove unused code
	handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
	* sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
	__timer_signal_thread_tclk): Remove.
	(init_module): Remove their initialization.
	(thread_cleanup): Remove their cleanup assertions.
	* sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
	__timer_signal_thread_tclk): Remove.
	* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
	* sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
	* sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
2004-12-03 11:20:54 +00:00
Jakub Jelinek d5321ea34d * libio/Makefile (tests): Add bug-ungetc4.
* libio/bug-ungetc4.c: New test.
2004-12-03 11:14:41 +00:00
Jakub Jelinek 2a561bf1e1 Updated to fedora-glibc-20041203T0935 2004-12-03 10:17:07 +00:00
Jakub Jelinek aa8a3b59b1 2.3.3-86 2004-11-30 07:01:14 +00:00
Jakub Jelinek c1f8ef75d3 Updated to fedora-glibc-20041130T0624 2004-11-30 06:33:11 +00:00
Jakub Jelinek f94203900a Updated to fedora-glibc-20041126T1318 2004-11-26 13:48:49 +00:00
Jakub Jelinek 945a6124b6 Updated to fedora-glibc-20041124T0741 2004-11-24 08:05:15 +00:00
Jakub Jelinek 06bc2b63c8 2.3.3-83 2004-11-21 11:42:23 +00:00
Jakub Jelinek b640e88eff 2004-11-20 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ieee754/k_standard.c: Document code 50.
	(__kernel_standard) <case 50>: Avoid raising div-by-zero
	exception again.

2004-11-19  H.J. Lu  <hongjiu.lu@intel.com>

	[BZ #552]
	* math/libm-test.inc (tgamma_test): Update tgamma (0) and
	tgamma (-0).

	* sysdeps/generic/w_tgamma.c (__tgamma): Properly handle
	|x| == 0.
	* sysdeps/generic/w_tgammaf.c (__tgammaf): Likewise.
	* sysdeps/generic/w_tgammal.c (__tgammal): Likewise.
	* sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r): Likewise.
	* sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise.
	* sysdeps/ieee754/ldbl-128/e_gammal_r.c: Likewise.
	* sysdeps/ieee754/ldbl-96/e_gammal_r.c: Likewise.

	* sysdeps/ieee754/k_standard.c (__kernel_standard): Handle
	tgamma (0) and tgamma (-0).
2004-11-21 11:42:09 +00:00
Jakub Jelinek f2fad0ae26 Updated to fedora-glibc-20041121T1116 2004-11-21 11:37:07 +00:00
Jakub Jelinek 8a2f63b734 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
* pthread_cancel.c (pthread_create): Likewise.
2004-11-20 09:58:35 +00:00
Jakub Jelinek 7894035e1c Updated to fedora-glibc-20041120T0949 2004-11-20 09:56:34 +00:00
Jakub Jelinek cc579e4358 2.3.3-81 2004-11-19 06:39:35 +00:00
Jakub Jelinek 802ea9dccd chunksize(x) => x->size 2004-11-19 06:38:37 +00:00
Jakub Jelinek 788b3f7f39 2.3.3-80 2004-11-19 00:25:07 +00:00
Jakub Jelinek 5a312412f2 Another version of the free checks. 2004-11-19 00:20:40 +00:00
Jakub Jelinek 3115c839ed Updated to fedora-glibc-20041119T0003 2004-11-19 00:18:13 +00:00
Jakub Jelinek 1b7007d267 2.3.3-79 2004-11-16 09:37:16 +00:00
Jakub Jelinek 1c1465a4f7 Updated to fedora-glibc-20041116T0856 2004-11-16 09:11:27 +00:00
Jakub Jelinek 4e2e518f6a MINSIZE => 2 * SIZE_SZ 2004-11-16 08:55:38 +00:00
Jakub Jelinek 8c508c82e7 Restore change unintentionally killed during merge. 2004-11-15 13:15:02 +00:00
Jakub Jelinek 19e033b5ff 2.3.3-78 2004-11-15 09:55:50 +00:00
Jakub Jelinek a52ef8e416 * malloc/malloc.c (_int_free): Further free () protection checks. 2004-11-15 09:49:06 +00:00
Jakub Jelinek b3c20a361d Updated to fedora-glibc-20041115T0915 2004-11-15 09:47:23 +00:00
Jakub Jelinek 87ffc9aca1 * sysdeps/unix/sysv/linux/i386/setuid.c: Include linux/posix_types.h.
* sysdeps/unix/sysv/linux/i386/setgid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setregid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise.
2004-11-12 21:17:32 +00:00
Jakub Jelinek 8899fb784a * debug/chk_fail.c: Include errno.h and string.h.
(__chk_fail): Write a short message to stderr.
	* debug/tst-chk1.c: Include fcntl.h.
	(do_test): Redirect stderr to /dev/null.
	* debug/test-strcpy_chk.c: Include fcntl.h.
	(test_main): Redirect stderr to /dev/null.
	(do_one_test, do_random_tests): Use printf instead of
	error.
2004-11-12 16:57:17 +00:00
Jakub Jelinek 8ae4ba1c6d Updated to fedora-glibc-20041112T1640 2004-11-12 16:56:15 +00:00
Jakub Jelinek 9abf55c24c 2.3.3-76 2004-11-10 09:38:27 +00:00
Jakub Jelinek 3504bb650f Updated to fedora-glibc-20041110T0839 2004-11-10 09:02:52 +00:00
Jakub Jelinek cbf4bcd2b3 Include errno.h. 2004-11-02 17:07:42 +00:00
Jakub Jelinek 70ac15e052 2.3.3-75 2004-11-02 13:36:24 +00:00
Jakub Jelinek 5acf2e2cb4 * include/features.h (__USE_FORTIFY_LEVEL): Also set for Red Hat
GCC 3.4.x-RH >= 3.4.2-8.
	* libio/bits/features.h (printf, fprintf, vprintf, vfprintf): For
	GCC 3.4.x-RH use __builtin___{,v}{,f}printf_chk instead of
	__{,v}{,f}printf_chk.
	* debug/tst-chk1.c (do_test): Deal with GCC 3.4.x-RH not
	being able to recognize subobjects.
2004-11-02 13:30:19 +00:00
Jakub Jelinek bb21d92c36 * sysdeps/unix/sysv/linux/x86_64/sys/procfs.h [__WORDSIZE == 32]
(elf_fpxregset_t): New type.
	(struct elf_prpsinfo): If __WORDSIZE == 32, change pr_[ug]id type
	to unsigned short int.
	* sysdeps/unix/sysv/linux/x86_64/sys/user.h
	(struct user_fpregs_struct): Fix comment.
	* sysdeps/i386/fpu/bits/mathdef.h (float_t, double_t): If
	__FLOAT_EVAL_METHOD__ is defined and 0, typedef to float resp. double.
	* sysdeps/x86_64/fpu/bits/mathdef.h: Include bits/wordsize.h.
	(float_t, double_t): If -m32 and not -mfpmath=sse, typedef to
	long double.
	* sysdeps/x86_64/fpu/bits/fenv.h: Include bits/wordsize.h.
	(fenv_t): Remove __mxcsr field for -m32.
2004-11-02 13:20:52 +00:00
Jakub Jelinek 80c96e8e6f Updated to fedora-glibc-20041102T1153 2004-11-02 12:26:42 +00:00
Jakub Jelinek 0b5cfa4e0b 2.3.3-74 2004-10-27 21:39:59 +00:00
Jakub Jelinek aa85b49673 2.3.3-74 2004-10-27 21:29:04 +00:00
Jakub Jelinek 04e35f0daf Back out errlist changes for now too. 2004-10-21 11:46:43 +00:00
Jakub Jelinek dcd417d9e1 Temporarily remove setaltroot and key* 2004-10-21 10:53:52 +00:00
Jakub Jelinek 8eb6f95371 Updated to fedora-glibc-20041021T0701 2004-10-21 07:16:46 +00:00
Roland McGrath a4947a1a53 (update): Fix botch of *-sync-* vars to be updated. 2004-10-21 07:03:01 +00:00
Jakub Jelinek bba9c68822 2.3.3-71 2004-10-20 13:02:29 +00:00
Jakub Jelinek ace3f2f951 Update. 2004-10-20 11:28:44 +00:00
Jakub Jelinek c07cf2c353 Updated to fedora-glibc-20041020T1016 2004-10-20 11:04:51 +00:00
Jakub Jelinek 75c95410b7 Updated to fedora-glibc-20041018T0940 2004-10-20 10:47:20 +00:00
Jakub Jelinek e9e4030ae5 Updated to fedora-glibc-20041018T0940 2004-10-18 23:30:23 +00:00
Jakub Jelinek c78cb58c50 First steps toward 2.3.3-70 2004-10-18 22:58:11 +00:00
Jakub Jelinek 0ad7eada7b * include/features.h (__USE_FORTIFY_LEVEL): Enable even with
Red Hat gcc4 4.0.0 and above.
2004-10-18 22:56:48 +00:00
Jakub Jelinek 1670c7cf0d * malloc/arena.c (ptmalloc_init): Don't use brk if dlopened
from statically linked program and avoid calling _dl_addr in that
	case.
2004-10-18 11:56:08 +00:00
Jakub Jelinek be221e8df9 Fix a typo, add force-tag 2004-10-18 10:26:29 +00:00
Jakub Jelinek 3c7dae119e * sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking
destlen only every 4 bytes.
2004-10-18 10:00:48 +00:00
Jakub Jelinek 56c4396a6e Updated to fedora-glibc-20041018T0940 2004-10-18 09:58:59 +00:00
Jakub Jelinek 4ce1a5c971 Add to fedora-branch as well. 2004-10-15 16:40:49 +00:00
Roland McGrath 5852f6de55 Add dist-import, dist-build targets. 2004-10-15 01:52:07 +00:00
Jakub Jelinek 01682b1f05 2.3.3-68 2004-10-14 12:33:58 +00:00
Jakub Jelinek 82496aab64 2.3.3-68 2004-10-14 09:57:42 +00:00
Jakub Jelinek 9869e6ec91 Updated to fedora-glibc-20041014T0548 2004-10-14 05:57:55 +00:00
Jakub Jelinek 3ee87ca7d4 Updated to fedora-glibc-20041012T1128 2004-10-12 12:00:26 +00:00
Jakub Jelinek 7dbf6a6cd5 2.3.3-66 2004-10-06 09:29:02 +00:00
Jakub Jelinek 8802619dd4 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
of pthread-functions.h and pthreaddef.h.
	* sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
2004-10-06 09:25:03 +00:00
Jakub Jelinek 8d5be89424 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
(JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from
	CFA.
2004-10-06 09:22:13 +00:00
Jakub Jelinek 0caba1fbdb Updated to fedora-glibc-20041006T0900 2004-10-06 09:09:35 +00:00
Jakub Jelinek 6fb78a8758 Replace use of perl with sed -ie in the spec file, set TIMEOUTFACTOR. 2004-10-06 06:48:06 +00:00
Jakub Jelinek c25d26bbb4 2.3.3-65 2004-10-05 15:43:27 +00:00
Jakub Jelinek ddbf09971d Fix atomic.h warnings on i386 in nscd.
Fix last grouplist patch.
2004-10-05 12:09:44 +00:00
Jakub Jelinek 09c3bcb4ad Fix s390{,x} build. grouplist fixes from Ulrich. 2004-10-05 11:23:19 +00:00
Jakub Jelinek fd63f7c6ce Updated to fedora-glibc-20041005T0745 2004-10-05 08:25:34 +00:00
Jakub Jelinek 85148842d4 Updated to fedora-glibc-20041004T0747 2004-10-04 08:56:18 +00:00
Jakub Jelinek 6d96590587 Updated to fedora-glibc-20041001T2134 2004-10-01 21:37:29 +00:00
Jakub Jelinek b7a09b9201 Updated to fedora-glibc-20041001T1134 2004-10-01 11:43:19 +00:00
Jakub Jelinek 6a87697239 Updated to fedora-glibc-20040930T0838 2004-09-30 09:05:55 +00:00
Jakub Jelinek bd307f4e23 * time/tzfile.c (tzfile_mtime): New variable.
(__tzfile_read): Reread the file if mtime is different.
2004-09-29 10:00:28 +00:00
Jakub Jelinek f9ff03a835 * sysdeps/i386/fpu/s_fdim.S (__fdim): Handle +inf/+inf.
* sysdeps/i386/fpu/s_fdimf.S (__fdimf): Likewise.
	* sysdeps/i386/fpu/s_fdiml.S (__fdiml): Likewise.
2004-09-29 09:01:05 +00:00
Jakub Jelinek 2b13f2ccc0 Updated to fedora-glibc-20040929T0821 2004-09-29 08:48:32 +00:00
Jakub Jelinek f1750fb9c6 Updated to fedora-glibc-20040927T0611 2004-09-27 06:18:18 +00:00
Jakub Jelinek efaf80c5d0 2.3.3-58 2004-09-26 08:45:22 +00:00
Jakub Jelinek 959f4c0547 Updated to fedora-glibc-20040926T0823 2004-09-26 08:39:30 +00:00
Jakub Jelinek 627cc92643 2.3.3-57 2004-09-26 04:48:48 +00:00
Jakub Jelinek 1b16f19afc linuxthreads fix from Roland. 2004-09-25 11:28:41 +00:00
Jakub Jelinek 037c97bbc9 Prepare for 2.3.3-57 2004-09-25 08:04:28 +00:00
Jakub Jelinek bd7c3bed54 Updated to fedora-glibc-20040925T0738 2004-09-25 07:55:46 +00:00
Roland McGrath 338cc5101b Remove "make -C sed check" 2004-09-23 09:51:26 +00:00
Jakub Jelinek 04a9e7f251 Remove glibc-execstack-disable.patch patch, use glibc-nptl-check.patch
even on current fedora (GCC 3.4.*).
2004-09-23 05:56:12 +00:00
Roland McGrath fd8e1ac720 2.3.3-56 for scratch test build 2004-09-23 02:04:57 +00:00
Roland McGrath b402c96065 Updated to fedora-glibc-20040923T0148 2004-09-23 02:00:27 +00:00
Roland McGrath 5ab387d33b Tweak archive deps. 2004-09-23 01:47:57 +00:00
Roland McGrath ff9e0dc823 Add default target. 2004-09-23 01:28:43 +00:00
Roland McGrath 5d44b2ea72 Changes and additions migrated from cvs.devel.redhat.com:/cvs/devel/glibc to fedora-branch 2004-09-23 01:17:12 +00:00
Roland McGrath 1547e88a9a Yet more update tweaks. 2004-09-23 01:03:59 +00:00
Roland McGrath 1a19a35223 (tar-name): Fix botch in last change. 2004-09-23 01:00:04 +00:00
Roland McGrath 237910315c More update tweaks. 2004-09-23 00:59:04 +00:00
Roland McGrath a0d24ebc12 Some tweaks for update 2004-09-22 22:41:09 +00:00
Roland McGrath 1e96287768 Another typo. 2004-09-22 22:36:11 +00:00
Roland McGrath a1711aa2c9 (update): typo fix 2004-09-22 22:35:40 +00:00
Roland McGrath 996d168e57 Tweak expected source directory names. 2004-09-22 22:29:44 +00:00
Roland McGrath 05bb11efb2 Don't include the glibc snapshot date in the patch file name. 2004-09-22 22:19:20 +00:00
Roland McGrath 0847bc6ef9 (Patch0): We do include the glibc snapshot date in the patch file name. 2004-09-22 22:18:11 +00:00
Roland McGrath f66e5db9b0 (Source0): We don't include the glibc release number in the snapshot
tarball file name for HEAD.
2004-09-22 22:16:44 +00:00
Roland McGrath dc60a4e495 redhat -> fedora 2004-09-22 21:57:26 +00:00
Roland McGrath c699a3bdd7 (outside-patch): redhat -> fedora
($(tar-name)-$(snapshot-name).tar.bz2): Change deps so we don't force it.
2004-09-22 21:56:27 +00:00
Roland McGrath aaadc59ce1 Fix typo. 2004-09-22 21:49:45 +00:00
Roland McGrath a343cb0f24 (spec-nvr): only get the first one 2004-09-22 21:48:09 +00:00
Roland McGrath b9bdb95c3f (glibc.spec): Another typo fix. 2004-09-22 21:43:51 +00:00
Roland McGrath f67c6d9684 Migrate spec file and files it needs from old internal repository's redhat/ subdir to fedora-branch's fedora/ subdir. 2004-09-22 21:41:40 +00:00
Roland McGrath 3cd7504450 (glibc.spec): Typo fix. 2004-09-22 21:39:37 +00:00
Roland McGrath 59ae4124b7 Patches migrated from cvs.devel.redhat.com:/cvs/devel/glibc 2004-09-22 21:27:23 +00:00
Roland McGrath ee414d57cf Untested first draft of makefile magic to maintain the branch. 2004-09-22 21:26:44 +00:00
Roland McGrath b5707b44d2 Changes and additions migrated from cvs.devel.redhat.com:/cvs/devel/glibc to fedora-branch 2004-09-22 21:21:10 +00:00
3026 changed files with 273906 additions and 232385 deletions
+4155 -2942
View File
File diff suppressed because it is too large Load Diff
+21
View File
@@ -1352,6 +1352,11 @@
* sysdeps/unix/sysv/linux/mips/sys/tas.h: Add missing .mips0 at the
end of inline assembler code.
2000-10-02 Jakub Jelinek <jakub@redhat.com>
* sunrpc/svc_udp.c (svcudp_recv): Set msg_controllen to all
remaining xp_pad space.
2000-10-02 Ulrich Drepper <drepper@redhat.com>
* include/features.h [__USE_FILE_OFFSET && !__REDIRECT]: Define
@@ -9280,6 +9285,12 @@
syscall.
* sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise.
2000-05-30 Jakub Jelinek <jakub@redhat.com>
* resolv/res_query.c (res_nsearch): Remove unused variable
root_on_list. If dots >= statp->ndots and as is querydomain
fails, keep searching.
2000-05-30 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/alpha/oldglob.c (__old_glob): Loose __P.
@@ -9480,6 +9491,11 @@
* sysdeps/i386/fpu/bits/mathinline.h: Define expm1 inline only if
__FAST_MATH__ is defined.
2000-05-22 Jakub Jelinek <jakub@redhat.com>
* sysdeps/i386/fpu/bits/mathinline.h (__expm1_code): Avoid using ?:
with omitted middle operand.
2000-05-22 Andreas Jaeger <aj@suse.de>
* math/Makefile: Add -D__FAST_MATH__ to CFLAGS-test-ifloat.c,
@@ -9718,6 +9734,11 @@
* manual/arith.texi (Parsing of Integers): Fix typo.
Closes PR libc/1744, reported by blp@gnu.org.
2000-05-17 Jakub Jelinek <jakub@redhat.com>
* inet/rcmd.c (rcmd_af): If *ahost cannot be resolved, include
unresolved hostname in the message.
2000-05-17 Jakub Jelinek <jakub@redhat.com>
* sysdeps/arm/bits/huge_val.h (HUGE_VAL, HUGE_VALF): Add
+12
View File
@@ -7729,6 +7729,13 @@
* Versions.def [ld]: Add GLIBC_2.2.1.
2001-01-10 Jakub Jelinek <jakub@redhat.com>
* malloc/memusage.c (me): If not SUID/SGID, allow creating new
$MEMUSAGE_OUTPUT file.
* sysdeps/generic/segfault.c (segfault.c): If not SUID/SGID, allow
creating new $SEGFAULT_OUTPUT_NAME file.
2001-01-10 H.J. Lu <hjl@gnu.org>
* elf/dl-libc.c (do_dlopen): Call DL_STATIC_INIT for static binaries.
@@ -8130,6 +8137,11 @@
* sysdeps/powerpc/soft-fp/Versions: Likewise.
* sysdeps/sparc/sparc64/soft-fp/Versions: Likewise.
2001-01-02 Jakub Jelinek <jakub@redhat.com>
* locale/setlocale.c (setlocale): Don't allocate/free category name
unnecessarily.
2001-01-02 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* sysdeps/powerpc/dl-machine.c (__process_machine_rela): Fix typo.
+5525
View File
File diff suppressed because it is too large Load Diff
+16
View File
@@ -48,6 +48,8 @@ please let me know.
malloc/libmemprof.so. How can I fix this?
1.20. Which tools should I use for MIPS?
1.21. Which compiler should I use for powerpc64?
1.22. `make' fails when running rpcgen the first time,
what is going on? How do I fix this?
2. Installation and configuration issues
@@ -573,6 +575,20 @@ For details check also my page <http://www.suse.de/~aj/glibc-mips.html>.
{SM} You want to use at least gcc 3.2 (together with the right versions
of all the other tools, of course).
1.22. `make' fails when running rpcgen the first time,
what is going on? How do I fix this?
{CO} The first invocation of rpcgen is also the first use of the recently
compiled dynamic loader. If there is any problem with the dynamic loader
it will more than likely fail to run rpcgen properly. This could be due to
any number of problems.
The only real solution is to debug the loader and determine the problem
yourself. Please remember that for each architecture there may be various
patches required to get glibc HEAD into a runnable state. The best course
of action is to determine if you have all the required patches.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+13
View File
@@ -374,6 +374,19 @@ For details check also my page <http://www.suse.de/~aj/glibc-mips.html>.
{SM} You want to use at least gcc 3.2 (together with the right versions
of all the other tools, of course).
?? `make' fails when running rpcgen the first time,
what is going on? How do I fix this?
{CO} The first invocation of rpcgen is also the first use of the recently
compiled dynamic loader. If there is any problem with the dynamic loader
it will more than likely fail to run rpcgen properly. This could be due to
any number of problems.
The only real solution is to debug the loader and determine the problem
yourself. Please remember that for each architecture there may be various
patches required to get glibc HEAD into a runnable state. The best course
of action is to determine if you have all the required patches.
? Installation and configuration issues
?? Can I replace the libc on my Linux system with GNU libc?
+6 -4
View File
@@ -1,5 +1,5 @@
# Make the TAGS files.
# Copyright (C) 1992,1994,1995,1996,1998,2002,2003
# Copyright (C) 1992,1994,1995,1996,1998,2002,2003,2005
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -146,12 +146,14 @@ endif
define extract
@rm -f $@.new
$(XGETTEXT) --keyword=_ --keyword=N_ --add-comments=TRANS --sort-by-file \
--omit-header -E -n -d - $(XGETTEXTFLAGS-$(@F)) > $@.new $^
--omit-header -E -n -d - --flag=error:3:c-format \
$(XGETTEXTFLAGS-$(@F)) > $@.new \
$(filter-out tst-%,$(filter-out $(objpfx)distinfo,$^)) /dev/null
mv -f $@.new $@
endef
text-srcs := $(filter %.c %.h %.cc %.C,$(tags_sources))
$P/$(domain).pot: $(text-srcs)
text-srcs := $(filter %.c %.h %.cc %.C %.bash.in,$(tags_sources))
$P/$(domain).pot: $(objpfx)distinfo $(text-srcs)
ifeq (,$(text-srcs))
cp /dev/null $@
else
+45 -92
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991-2003, 2004 Free Software Foundation, Inc.
# Copyright (C) 1991-2003, 2004, 2005 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -415,7 +415,7 @@ endif
# Command for statically linking programs with the C library.
ifndef +link-static
+link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \
$(sysdep-LDFLAGS) $(LDFLAGS) \
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
$(addprefix $(csu-objpfx),$(static-start-installed-name)) \
$(+preinit) $(+prector) \
$(filter-out $(addprefix $(csu-objpfx),start.o \
@@ -452,12 +452,6 @@ link-libc = -Wl,-rpath-link=$(rpath-link) \
$(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
# This is how to find at build-time things that will be installed there.
rpath-dirs = math elf dlfcn nss nis rt resolv crypt
else
ifneq (,$(filter aix aix%,$(config-os)))
link-libc = $(common-objpfx)libc.a \
$(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
rpath-dirs = math dlfcn nss nis rt resolv crypt
endif
endif
rpath-link = \
$(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%)))
@@ -475,13 +469,6 @@ LDFLAGS-rpath-ORIGIN = -Wl,-rpath,'$$ORIGIN'
LDFLAGS-soname-fname = -Wl,-soname,$(@F)
LDFLAGS-rdynamic = -rdynamic
LDFLAGS-Bsymbolic = -Bsymbolic
else
ifneq (,$(filter aix aix%,$(config-os)))
LDFLAGS-rpath-ORIGIN =
LDFLAGS-soname-fname =
LDFLAGS-rdynamic = -Wl,-bdynamic
LDFLAGS-Bsymbolic = -Wl,-bsymbolic
endif
endif
# Choose the default search path for the dynamic linker based on
@@ -493,46 +480,36 @@ default-rpath = $(libdir)
endif
ifndef link-extra-libs
ifeq (yes,$(build-shared))
ifneq ($(common-objpfx),$(objpfx))
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),\
$(wildcard $(common-objpfx)$(lib).so$($(notdir $(lib)).so-version) \
$(objpfx)$(lib).so$($(notdir $(lib)).so-version)))
else
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).so$($(notdir $(lib)).so-version))
endif
else
link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).a)
endif
link-extra-libs = $(LDLIBS-$(@F))
link-extra-libs-static = $(link-extra-libs)
link-extra-libs-bounded = $(link-extra-libs)
endif
# The static libraries.
ifeq (yes,$(build-static))
link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
link-extra-libs-static = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).a)
else
ifeq (yes,$(build-shared))
# We can try to link the programs with lib*_pic.a...
link-libc-static = $(static-gnulib) $(common-objpfx)libc_pic.a
link-extra-libs-static = $(link-extra-libs)
endif
endif
link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a
link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F:%-bp=%)),$(common-objpfx)$(lib)_b.a)
ifndef gnulib
ifneq ($(have-as-needed),yes)
libgcc_eh := -lgcc_eh
else
libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) -Wl,--no-as-needed
endif
ifneq ($(have-cc-with-libunwind),yes)
gnulib := -lgcc $(libgcc_eh)
static-gnulib := -lgcc -lgcc_eh
libunwind =
else
gnulib := -lgcc $(libgcc_eh) -lunwind
static-gnulib := -lgcc -lgcc_eh -lunwind
libunwind = -lunwind
endif
ifneq ($(have-as-needed),yes)
libgcc_eh := -lgcc_eh $(libunwind)
else
libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
endif
gnulib := -lgcc $(libgcc_eh)
static-gnulib := -lgcc -lgcc_eh $(libunwind)
libc.so-gnulib := -lgcc
endif
ifeq ($(elf),yes)
+preinit = $(addprefix $(csu-objpfx),crti.o)
@@ -554,7 +531,7 @@ $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
$(filter -Wl$(comma)-rpath-link=%,\
$(sysdep-LDFLAGS)))))
run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\
$(tests-static)),, \
$(tests-static) $(xtests-static)),, \
$(elf-objpfx)$(rtld-installed-name) \
--library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
else
@@ -799,29 +776,27 @@ ifndef avoid-generated
# This lets add-ons give more-specific matches that override defaults
# in the top-level file.
$(common-objpfx)shlib-versions.v.i: \
$(wildcard $(patsubst %, $(..)%/shlib-versions,$(add-ons) $(subdirs)))\
$(wildcard $(patsubst %, $(..)%/shlib-versions,$(add-ons) \
$(config-sysdirs) \
$(subdirs))) \
$(..)shlib-versions
$(common-objpfx)soversions.i: $(common-objpfx)shlib-versions.v
default_setname='$(filter-out %_default,$(oldest-abi:%=GLIBC_%))'; \
while read conf version setname; do \
test -n "$$version" && \
test `expr '$(config-machine)-$(config-vendor)-$(config-os)' \
: "$$conf"` != 0 || continue; \
if test "x$$version" = xDEFAULT; then \
default_setname="$$setname"; \
else \
$(abi-default_setname) \
lib=`echo $$version | sed 's/=.*$$//'`; \
if eval test -z "\$${versioned_$${lib}}"; then \
eval versioned_$${lib}=yes; \
number=`echo $$version | sed "s/^.*=//"`; \
echo $$lib $$number $${setname:-$${default_setname}}; \
fi; \
fi; \
done < $< > $@T; exit 0
soversions-default-setname = $(patsubst %, %,\
$(filter-out %_default,\
$(oldest-abi:%=GLIBC_%)))
$(common-objpfx)soversions.i: $(..)scripts/soversions.awk \
$(common-objpfx)shlib-versions.v
$(AWK) -v default_setname='$(soversions-default-setname)' \
-v cpu='$(config-machine)' \
-v vendor='$(config-vendor)' \
-v os='$(config-os)' \
-f $^ > $@T
mv -f $@T $@
$(common-objpfx)soversions.mk: $(common-objpfx)soversions.i
(while read lib number setname; do \
$(common-objpfx)soversions.mk: $(common-objpfx)soversions.i $(..)Makeconfig
(seen_DEFAULT=0; seen_WORDSIZE32=0; seen_WORDSIZE64=0; \
while read which lib number setname; do \
eval seen_$$which=1; \
test x"$$which" = xDEFAULT || continue; \
case $$number in \
[0-9]*) echo "$$lib.so-version=.$$number"; \
echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";;\
@@ -829,6 +804,12 @@ $(common-objpfx)soversions.mk: $(common-objpfx)soversions.i
echo "all-sonames+=$$lib=\$$($$lib.so-version)";;\
esac; \
done; \
case "$$seen_DEFAULT$$seen_WORDSIZE32$$seen_WORDSIZE64" in \
100) echo biarch = no;; \
101) echo biarch = 32;; \
?1?) echo biarch = 64;; \
*) echo >&2 BUG; exit 2;; \
esac; \
echo soversions.mk-done = t;) < $< > $@T; exit 0
mv -f $@T $@
endif
@@ -838,46 +819,18 @@ postclean-generated += soversions.mk soversions.i \
shlib-versions.v shlib-versions.v.i
# Generate the header containing the names of all shared libraries.
# We use a stamp file to avoid uncessary recompilations.
# We use a stamp file to avoid unnecessary recompilations.
before-compile += $(common-objpfx)gnu/lib-names.h
ifeq ($(soversions.mk-done),t)
$(common-objpfx)gnu/lib-names.h: $(common-objpfx)gnu/lib-names.stmp; @:
ifneq (,$(findstring aix,$(config-os)))
$(common-objpfx)gnu/lib-names.stmp: $(..)sysdeps/unix/sysv/aix/gnu/lib-names.h
$(common-objpfx)gnu/lib-names.stmp: $(..)scripts/lib-names.awk \
$(common-objpfx)soversions.i
$(make-target-directory)
@rm -f ${@:stmp=T} $@
@cp $(..)sysdeps/unix/sysv/aix/gnu/lib-names.h $(common-objpfx)gnu
touch $@
else
$(common-objpfx)gnu/lib-names.stmp: $(common-objpfx)soversions.mk
$(make-target-directory)
@rm -f ${@:stmp=T} $@
(echo '/* This file is automatically generated.';\
echo ' It defines macros to allow user program to find the shared';\
echo ' library files which come as part of GNU libc. */';\
echo '#ifndef __GNU_LIB_NAMES_H'; \
echo '#define __GNU_LIB_NAMES_H 1'; \
echo; \
(libs='$(all-sonames)';\
for l in $$libs; do \
name=`echo $$l | sed 's/.*=//'`; \
upname=`echo $$l | sed 's/=.*//' | \
tr 'abcdefghijklmnopqrstuvwxyz-' \
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
upname2=`echo $$name | sed 's/[.]so.*//' | \
tr 'abcdefghijklmnopqrstuvwxyz-' \
'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
echo "#define $${upname}_SO \"$$name\""; \
if test $$upname != $$upname2; then \
echo "#define $${upname2}_SO \"$$name\""; \
fi; \
done;) | sort; \
echo; \
echo '#endif /* gnu/lib-names.h */';) > ${@:stmp=T}
$(AWK) -f $^ > ${@:stmp=T}
$(move-if-change) ${@:stmp=T} ${@:stmp=h}
touch $@
endif
endif
common-generated += gnu/lib-names.h gnu/lib-names.stmp
+20 -6
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc.
# Copyright (C) 1991-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -64,7 +64,7 @@ endif # $(AUTOCONF) = no
subdir_update-abi subdir_check-abi \
subdir_echo-headers \
subdir_install \
subdir_testclean \
subdir_objs subdir_stubs subdir_testclean \
$(addprefix install-, no-libc.a bin lib data headers others)
headers := limits.h values.h features.h gnu-versions.h bits/libc-lock.h \
@@ -157,13 +157,25 @@ others: $(common-objpfx)testrun.sh
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
ifeq ($(biarch),no)
installed-stubs = $(inst_includedir)/gnu/stubs.h
else
installed-stubs = $(inst_includedir)/gnu/stubs-$(biarch).h
$(inst_includedir)/gnu/stubs.h: include/stubs-biarch.h $(+force)
$(INSTALL_DATA) $< $@
install-others-nosubdir: $(installed-stubs)
endif
# Since stubs.h is never needed when building the library, we simplify the
# hairy installation process by producing it in place only as the last part
# of the top-level `make install'. It depends on subdir_install, which
# iterates over all the subdirs; subdir_install in each subdir depends on
# the subdir's stubs file. Having more direct dependencies would result in
# extra iterations over the list for subdirs and many recursive makes.
$(inst_includedir)/gnu/stubs.h: include/stubs-prologue.h subdir_install
$(installed-stubs): include/stubs-prologue.h subdir_install
$(make-target-directory)
@rm -f $(objpfx)stubs.h
(sed '/^@/d' $<; LC_ALL=C sort $(subdir-stubs)) > $(objpfx)stubs.h
@@ -288,7 +300,12 @@ glibc-%.tar $(dist-separate:%=glibc-%-%.tar): $(files-for-dist) \
$(foreach D,$(dist-separate),\
$D/configure)
@rm -fr glibc-$*
$(MAKE) -q `find sysdeps $(addsuffix /sysdeps,$(add-ons)) \
-name configure`
cvs $(CVSOPTS) -Q export -d glibc-$* -r $(tag-of-stem) libc
# Touch all the configure scripts going into the tarball since cvs export
# might have delivered configure.in newer than configure.
find glibc-$* -name configure -print | xargs touch
$(dist-do-separate-dirs)
tar cf glibc-$*.tar glibc-$*
rm -fr glibc-$*
@@ -299,9 +316,6 @@ $(foreach dir,$(dist-separate),
)
endef
%.bz2: %; bzip2 -9vk $<
%.gz: %; gzip -9vnc $< > $@.new && mv -f $@.new $@
# Do `make dist dist-version=X.Y.Z' to make tar files of an older version.
dist-version = $(version)
+20 -20
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc.
# Copyright (C) 1991-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -338,7 +338,8 @@ $(common-objpfx)Versions.def.v.i: $(..)Versions.def \
$(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \
$(common-objpfx)soversions.i \
$(common-objpfx)Versions.def.v
{ while read lib version setname; do \
{ while read which lib version setname; do \
test x"$$which" = xDEFAULT || continue; \
test -z "$$setname" || echo "$$lib : $$setname"; \
done < $(word 2,$^); \
cat $(word 3,$^); \
@@ -491,7 +492,7 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
PROVIDE(__start___libc_freeres_ptrs = .); \
*(__libc_freeres_ptrs) \
PROVIDE(__stop___libc_freeres_ptrs = .);/'\
-e 's/^.*\*(\.jcr).*$$/& \
-e 's@^.*\*(\.jcr).*$$@& \
PROVIDE(__start___libc_subfreeres = .);\
__libc_subfreeres : { *(__libc_subfreeres) }\
PROVIDE(__stop___libc_subfreeres = .);\
@@ -500,7 +501,8 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
PROVIDE(__stop___libc_atexit = .);\
PROVIDE(__start___libc_thread_subfreeres = .);\
__libc_thread_subfreeres : { *(__libc_thread_subfreeres) }\
PROVIDE(__stop___libc_thread_subfreeres = .);/'
PROVIDE(__stop___libc_thread_subfreeres = .);\
/DISCARD/ : { *(.gnu.glibc-stub.*) }@'
mv -f $@T $@
common-generated += shlib.lds
@@ -581,8 +583,8 @@ build-shlib-objlist = $(build-module-helper-objlist) \
# Also omits crti.o and crtn.o, which we do not want
# since we define our own `.init' section specially.
LDFLAGS-c.so = -nostdlib -nostartfiles
# But we still want to link libc.so against $(static-gnulib).
LDLIBS-c.so += $(static-gnulib)
# But we still want to link libc.so against $(libc.so-gnulib).
LDLIBS-c.so += $(libc.so-gnulib)
# Give libc.so an entry point and make it directly runnable itself.
LDFLAGS-c.so += -e __libc_main
# If lazy relocation is disabled add the -z now flag.
@@ -970,7 +972,7 @@ $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
cat $<; \
echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
'$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
')' \
' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
) > $@.new
mv -f $@.new $@
@@ -1328,6 +1330,8 @@ FORCE:
echo-headers:
@echo $(headers)
%.bz2: %; bzip2 -9vk $<
%.gz: %; gzip -9vnc $< > $@.new && mv -f $@.new $@
# Common cleaning targets.
@@ -1382,19 +1386,15 @@ ifdef objpfx
.PHONY: stubs # The parent Makefile calls this target.
stubs: $(objpfx)stubs
endif
$(objpfx)stubs: $(+depfiles)
ifneq (,$(strip $(+depfiles)))
# Use /dev/null since `...` might expand to empty.
c=`($(patsubst %/,cd % &&,$(objpfx)) \
sed -n -e 's@\$$(common-objpfx)@$(common-objpfx)@g' \
-e 's@\$$(objpfx)@$(objpfx)@g' \
-e '/stub-tag\.h/{; g; s/./&/p; }' \
-e '/:/{x; s/^.*$$//; x; }' \
-e 's/^.*://;s/\\$$//;s/^ *\([^ ][^ ]*\) .*$$/\1/' \
-e '/^[^ ][^ ]*$$/{G;s/^.*\n\(..*\)/\1/;s/\n//;h; }' \
$(patsubst $(objpfx)%,%,$^)) | sort | uniq`; \
sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
$$c /dev/null > $@T
objs-for-stubs := $(foreach o,$(object-suffixes-for-libc),$(o-objects)) \
$(addprefix $(objpfx),$(extra-objs))
$(objpfx)stubs: $(objs-for-stubs)
ifneq (,$(strip $(objs-for-stubs)))
(cd $(objdir); $(OBJDUMP) -h $(patsubst $(objpfx)%,%,$^)) | \
$(AWK) '/\.gnu\.glibc-stub\./ { \
sub(/\.gnu\.glibc-stub\./, "", $$2); \
stubs[$$2] = 1; } \
END { for (s in stubs) print "#define __stub_" s }' > $@T
mv -f $@T $@
else
> $@
+47 -5
View File
@@ -1,10 +1,36 @@
GNU C Library NEWS -- history of user-visible changes. 2004-8-5
Copyright (C) 1992-2002,2003,2004 Free Software Foundation, Inc.
GNU C Library NEWS -- history of user-visible changes. 2005-4-5
Copyright (C) 1992-2002,2003,2004,2005 Free Software Foundation, Inc.
See the end for copying conditions.
Please send GNU C library bug reports via <http://sources.redhat.com/bugzilla/>
using `glibc' in the "product" field.
Version 2.4
* More overflow detection functions.
* New iconv converters for IBM1025, IBM1122, IBM1137, IBM1153,
IBM1154, IBM1155, IBM1156, IBM1157, and IBM1158 contributed by Jiro Sekiba.
* It is now possible to install audit libraries for the dynamic linker using
LD_AUDIT. Implemented by Ulrich Drepper.
* The LinuxThreads add-on, providing pthreads on Linux 2.4 kernels, is no
longer supported. The new NPTL implementation requires Linux 2.6 kernels.
For a libc and libpthread that works well on Linux 2.4 kernels, we
recommend using the stable 2.3 branch.
Version 2.3.5
* The following bugs are resolved with this release:
284, 592, 602, 626, 633, 640, 650, 661, 671, 681, 693, 700, 710, 719,
722, 723, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
737, 738, 739, 740, 741, 742, 743, 744, 745, 765, 767, 768, 769, 776,
777, 787, 821, 822, 823, 825
Visit <http://sources.redhat.com/bugzilla/> for the details of each bug.
Version 2.3.4
* Support for RFC 3678. Real implementations exist only for Linux so far.
@@ -17,7 +43,7 @@ Version 2.3.4
* nscd can now perform SELinux checks.
Implemented by Matthew Rickard <mjricka@epoch.ncsc.mil>.
* getaddrinfo queries are not cached. Canonical name lookup is performed
* getaddrinfo queries are now cached. Canonical name lookup is performed
efficiently.
Implemented by Ulrich Drepper.
@@ -27,10 +53,26 @@ Version 2.3.4
* The malloc functions perform more error checking and are stricter when
it comes to reacting on errors. The default action is to terminate
the process after showing an error message.
the process after showing an error message. Implemented by Ulrich Drepper.
* Reverse lookups of IPv6 addresses does not use bit string or .ip6.int
lookups anymore unless explicitly requested.
lookups anymore unless explicitly requested. Implemented by Ulrich Drepper.
* Namespaces in ld.so are implemented. DSOs can be loaded in separate
namespaces using the new function dlmopen(). This feature is of course,
like most other dynamic loading functionality, not available in statically
linked applications. Implemented by Ulrich Drepper.
* Low-overhead boundary checking variants of string and some stdio functions
were added. These are to be used in conjunction with a gcc patch by
Jakub Jelinek which adds calls to these functions if possible.
Implemented by Jakub Jelinek and Ulrich Drepper.
* Old code for several operating systems and machine architectures that
have not been in working condition in a long time have been removed from
the main source tree maintained by the GNU C Library's maintainers.
These files are now reside in the separate `ports' source module
that is usable as an add-on when building the library.
Version 2.3.3
+4 -41
View File
@@ -1,6 +1,6 @@
Open jobs for finishing GNU libc:
---------------------------------
Status: September 2002
Status: October 2004
If you have time and talent to take over any of the jobs below please
contact <bug-glibc@gnu.org>.
@@ -53,7 +53,7 @@ contact <bug-glibc@gnu.org>.
[11] Write access function for netmasks, bootparams, and automount
databases for nss_files and nss_db module.
databases for nss_files, nss_nis, and nss_nisplus modules.
The functions should be embedded in the nss scheme. This is not
hard and not all services must be supported at once.
@@ -76,7 +76,7 @@ contact <bug-glibc@gnu.org>.
[18] Based on the sprof program we need tools to analyze the output. The
result should be a link map which specifies in which order the .o
files are placed in the shared object. This should help to improve
code locality and result in a smaller foorprint (in code and data
code locality and result in a smaller footprint (in code and data
memory) since less pages are only used in small parts.
@@ -93,29 +93,6 @@ contact <bug-glibc@gnu.org>.
available.
[21] The nscd program and the stubs in the libc should be changed so
that each program uses only one socket connect. Take a look at
http://people.redhat.com/drepper/nscd.html
An alternative approach is to use an mmap()ed file. The idea is
the following:
- the nscd creates the hash tables and the information it stores
in it in a mmap()ed region. This means no pointers must be
used, only offsets.
OR
if POSIX shared memory is available use a named shared memory
region to put the data in
- each program using NSS functionality tries to open the file
with the data.
- by checking some timestamp (which the nscd renews frequently)
the programs can test whether the file is still valid
- if the file is valid look through the nscd and locate the
appropriate hash table for the database and lookup the data.
If it is included we are set.
- if the data is not yet in the database we contact the nscd using
the currently implemented methods.
[23] The `strptime' function needs to be completed. This includes among
other things that it must get teached about timezones. The solution
envisioned is to extract the timezones from the ADO timezone
@@ -127,18 +104,4 @@ contact <bug-glibc@gnu.org>.
Australia/Canberra or if the current locale is en_AU.
[25] Sun's nscd version implements a feature where the nscd keeps N entries
for each database current. I.e., if an entries lifespan is over and
it is one of the N entries to be kept the nscd updates the information
instead of removing the entry.
How to decide about which N entries to keep has to be examined.
Factors should be number of uses (of course), influenced by aging.
Just imagine a computer used by several people. The IDs of the current
user should be preferred even if the last user spent more time.
[27] We need a second test suite with tests which cannot run during a normal
`make check' run. This test suite can require root priviledges and
can test things like DNS (i.e., require network access),
user-interaction, networking in general, and probably many other things.
[27] ...deleted...
+8 -37
View File
@@ -1,4 +1,4 @@
This directory contains the version 2.3.3 release of the GNU C Library.
This directory contains the version 2.3.4 release of the GNU C Library.
Many bugs have been fixed since the last release.
Some bugs surely remain.
@@ -21,39 +21,12 @@ configurations:
s390-*-linux-gnu Linux-2.x on IBM S/390
s390x-*-linux-gnu Linux-2.4+ on IBM S/390 64-bit
sh-*-linux-gnu Linux-2.x on Super Hitachi
cris-*-linux-gnu Linux-2.4+ on CRIS
x86-64-*-linux-gnu Linux-2.4+ on x86-64
Former releases of this library (version 1.09.1 and perhaps earlier
versions) used to run on the following configurations:
alpha-dec-osf1
i[3456]86-*-bsd4.3
i[3456]86-*-isc2.2
i[3456]86-*-isc3
i[3456]86-*-sco3.2
i[3456]86-*-sco3.2v4
i[3456]86-*-sysv
i[3456]86-*-sysv4
i[3456]86-force_cpu386-none
i[3456]86-sequent-bsd
i960-nindy960-none
m68k-hp-bsd4.3
m68k-mvme135-none
m68k-mvme136-none
m68k-sony-newsos3
m68k-sony-newsos4
m68k-sun-sunos4
mips-dec-ultrix4
mips-sgi-irix4
sparc-sun-solaris2
sparc-sun-sunos4
Since no one has volunteered to test and fix the above configurations,
these are not supported at the moment. It's expected that these don't
work anymore. Porting the library is not hard. If you are interested
in doing a port, please contact the glibc maintainers by sending
electronic mail to <bug-glibc@gnu.org>.
Past releases of this library ran on a variety of configurations that are
no longer supported. Porting the library is not hard. If you are
interested in doing a port, please contact the glibc maintainers;
see http://www.gnu.org/software/libc/ for more information.
There are some add-ons which can be used together with GNU libc. They
are designed in a way to ease the installation by integrating them in
@@ -76,11 +49,9 @@ The file NOTES contains a description of the feature-test macros used
in the GNU C library, explaining how you can tell the library what
facilities you want it to make available.
We prefer to get bug reports sent using the `glibcbug' shell script which
is installed together with the rest of the GNU libc to <bugs@gnu.org>.
Simply run this shell script and fill in the information. Nevertheless
you can still send bug reports to <bug-glibc@gnu.org> as normal electronic
mails.
Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
information. We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.
The GNU C Library is free software. See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
-287
View File
@@ -1,287 +0,0 @@
GNU libc SNAPSHOT SYSTEM
(general info)
Updated 1997-9-26
WHAT ARE GNU libc SNAPSHOTS
---------------------------
Snapshots are an "image" of the main glibc development tree, captured at a
particular random instant in time. When you use the snapshots, you should be
able to maintain a local copy of libc that is no more than one day older than
the official source tree used by the libc maintainers.
The primary purpose of providing snapshots is to widen the group of motivated
developers that would like to help test, debug, and enhance glibc, by providing
you with access to the "latest and greatest" source. This has several
advantages, and several disadvantages.
First the advantages:
o Once we have a large base of motivated testers using the snapshots,
this should provide good coverage across all currently supported
glibc hosts and targets. If a new bug is introduced in glibc due to
fixing another bug or ongoing development, it should become
obvious much more quickly and get fixed before the next general
net release. This should help to reduce the chances of glibc being
released to the general public with a major bug that went unnoticed
during the release cycle testing because they are machine dependent.
We hope to greatly improve glibc's stability and reliability by
involving more people and more execution environments in the
prerelease testing.
o With access to the latest source, any diffs that you send to fix
bugs or add new features should be much easier for the glibc team
to merge into the official source base (after suitable review
of course). This encourages us to merge your changes quicker,
while they are still "fresh".
o Once your diffs are merged, you can obtain a new copy of glibc
containing your changes almost immediately. Thus you do not
have to maintain local copies of your changes for any longer
than it takes to get them merged into the official source base.
This encourages you to send in changes quicker.
And the disadvantages:
o The snapshot you get will be largely untested and of unknown quality.
It may fail to configure or compile. It may have serious bugs.
You should always keep a copy of the last known working version
before updating to the current snapshot, or at least be able to
regenerate a working version if the latest snapshot is unusable
in your environment for some reason.
If a production version of glibc has a bug and a snapshot has the fix,
and you care about stability, you should put only the fix for that
particular problem into your production version. Of course, if you
are eager to test glibc, you can use the snapshot versions in your
daily work, but users who have not been consulted about whether they
feel like testing glibc should generally have something which is at
least as bug free as the last released version.
o Providing timely response to your questions, bug reports, and
submitted patches will require the glibc development team to allocate
time from an already thin time budget. Please try to help us make
this time as productive as possible. See the section below about
how to submit changes.
WHO SHOULD TRY THE SNAPSHOTS
----------------------------
Remember, these are snapshots not tested versions. So if you use
these versions you should be able to
o make sure your system stays usable
o locate and hopefully fix problems
o to port glibc to a new target yourself
You should not use the snapshots if
o your system is needed in a production environment which needs
stability
o you expect us to fix your problems since you somehow depend on them.
You must be willing to fix the problems yourself, we don't want to
see "I have problems, fix this" messages.
HOW TO GET THE SNAPSHOTS
------------------------
At the moment we provide a full snapshot weekly (every sunday), so
that users getting a snapshot for the first time, or updating after
a long period of not updating, can get the latest version in a single
operation. Along with the full snapshot, we will provide incremental
diffs on a nearly daily basis (whenever code changes). Each daily
diff will be relative to the source tree after applying all previous
daily diffs. The daily diffs are for people who have relatively low
bandwidth ftp or uucp connections.
The files will be available via anonymous ftp from alpha.gnu.org, in
directory /gnu/libc and on linux.kernel.org in /pub/software/libs/glibc. The
directories should look something like:
libc-970921.tar.gz
libc-970917-970922.diff.gz
libc-970922-970925.diff.gz
.
.
.
Please note that the snapshots on alpha.gnu.org and on
linux.kernel.org are not always in sync. Patches to some files might
appear a day a diff earlier or later on alpha than on kernel.
Use always alpha or always kernel but don't mix them.
There are sometimes additionally test releases of the add-ons available in
these directories. If a new version of an add-on is available it is normally
required for the corresponding snapshot so always pay attention for these.
Note that we provide GNU gzip compressed files only. You can ftp gzip
from ftp.gnu.org in directory pub/gnu.
In some cases the dates for diffs and snapshots do not match like in the
example above. The full release is for 970921 but the patch is for
970917-970922. This only means that nothing changed between 970917 and 970922
and that you have to use this patch on top of the 970921 snapshot since the
patch is made on 970922.
Also, as the gcc developers did with their gcc snapshot system, even though we
will make the snapshots available on a publically accessible ftp area, we ask
that recipients not widely publicise their availability. The motivation for
this request is not to hoard them, but to avoid the situation where the
general glibc user base naively attempts to use the snapshots, has trouble with
them, complains publically, and the reputation of glibc declines because of a
perception of instability or lack of quality control.
GLIBC TEST SUITE
----------------
A test suite is distributed as an integral part of the snapshots. A simple
"make check" in your build directory is sufficient to run the tests. glibc
should pass all tests and if any fails, please report it. A failure might not
originate from a bug in glibc but also from bugs in the tools, e.g. with gcc
2.7.2.x the math tests fail some of the tests because of compiler bugs.
Note that the test suite is still in its infancy. The tests themselves only
cover a small portion of libc features, and where tests do exist for a feature
they are not exhaustive. New tests are welcome.
GETTING HELP, GLIBC DISCUSSIONS, etc
------------------------------------
People who want to help with glibc and who test out snapshots
regularly should get on the libc-alpha@sourceware.cygnus.com mailing
list by sending an email to libc-alpha-subscribe@sourceware.cygnus.com.
This list is meant (as the name suggests) for the discussion of test
releases and also reports for them. People who are on this list are
welcome to post questions of general interest.
People who are not only willing to test the snapshots but instead
really want to help developing glibc should contact
libc-hacker-subscribe@sourceware.cygnus.com.org to be put on the developers
mailing list. This list is really only meant for developers. No
questions about installation problems or other simple topics are
wanted nor will they be answered.
Do *not* send any questions about the snapshots or patches specific to the
snapshots to bug-glibc@gnu.org. Nobody there will have any idea what
you are talking about and it will just cause confusion.
BUG REPORTS
-----------
Send bug reports directly to Ulrich Drepper <drepper@gnu.org>. Please
do *not* use the glibcbug script for reporting bugs in the snapshots.
glibcbug should only be used for problems with the official released versions.
We don't like bug reports in the bug database because otherwise the impression
of instability or lack of quality control of glibc as a whole might manifest
in people's mind.
Note that since no testing is done on the snapshots, and snapshots may even be
made when glibc is in an inconsistent state, it may not be unusual for an
occasional snapshot to have a very obvious bug, such as failure to compile on
*any* machine. It is likely that such bugs will be fixed by the next
snapshot, so it really isn't necessary to report them unless they persist for
a couple of days.
Missing files should always be reported, since they usually mean there is a
problem with the snapshot-generating process and we won't know about them
unless someone tells us.
Bugs which are non-obvious, such as failure to compile on only a specific
machine, a new machine dependent or obscure bug (particularly one not detected
by the testsuite), etc should be reported when you discover them, or have a
suggested patch to fix them.
FORMAT FOR PATCHES
------------------
If you have a fix for a bug, or an enhancement to submit, send your patch to
Ulrich Drepper <drepper@gnu.org>. Here are some simple guidelines for
submitting patches:
o Use "unified diffs" for patches. A typical command for generating
context diffs is "diff -ru glibc-old glibc-patched".
o Use the "minimalist approach" for patches. That is, each patch
should address only one particular bug, new feature, etc. Do not
save up many unrelated changes and submit them all in one big
patch, since in general, the larger the patch the more difficult
it is for us to decide if the patch is either correct or
desirable. And if we find something about the patch that needs
to be corrected before it can be installed, we would have to reject
the entire patch, which might contain changes which otherwise would
be accepted if submitted separately.
o Submit a sample ChangeLog entry with your patch. See the existing
glibc ChangeLog for examples of what a ChangeLog entry should look
like. The emacs command ^X4A will create a ChangeLog entry header
for you.
BUILDING SNAPSHOTS
------------------
The `best' way to build glibc is to use an extra directory, e.g.:
tar xzf libc-970921.tar.gz
mkdir build-glibc
cd build-glibc
../libc-970921/configure ...
In this way you can easily clean up (since `make clean' doesn't work at
the moment) and rebuild glibc.
NECESSARY TOOLS
---------------
For the recommended versions of gcc, binutils, make, texinfo, gettext,
autoconf and other tools which might be especially needed when using patches,
please read the file INSTALL.
HOW CAN YOU HELP
----------------
It helps already a lot if you just install glibc on your system and try to
solve any problems. You might want to look at the file `PROJECTS' and help
with one of those projects, fix some bugs (see `BUGS' or the bug database),
port to an unsupported platform, ...
FURTHER DOCUMENTATION
---------------------
A lot of questions are answered in the FAQ. The files `INSTALL', `README' and
`NOTES' contain the most important documentation. Furthermore glibc has its
own 700+ pages info documentation, ...
And finally a word of caution: The libc is one of the most fundamental parts
of your system - and these snapshots are untested and come without any
guarantee or warranty. You might be lucky and everything works or you might
crash your system. If you install a glibc snapshot as primary library, you
should have a backup somewhere.
On many systems it is also a problem to replace the libc while the system is
running. In the worst case on broken OSes some systems crash. On better
systems you can move the old libc aside but removing it will cause problems
since there are still processes using this libc image and so you might have to
check the filesystem to get rid of the libc data. One good alternative (which
is also safer) is to use a chroot'ed environment.
Thanks for your help and support.
Thanks to Fred Fish from Cygnus for the original version of this text
(for GDB).
Ulrich Drepper
+7 -36
View File
@@ -21,39 +21,12 @@ configurations:
s390-*-linux-gnu Linux-2.x on IBM S/390
s390x-*-linux-gnu Linux-2.4+ on IBM S/390 64-bit
sh-*-linux-gnu Linux-2.x on Super Hitachi
cris-*-linux-gnu Linux-2.4+ on CRIS
x86-64-*-linux-gnu Linux-2.4+ on x86-64
Former releases of this library (version 1.09.1 and perhaps earlier
versions) used to run on the following configurations:
alpha-dec-osf1
i[3456]86-*-bsd4.3
i[3456]86-*-isc2.2
i[3456]86-*-isc3
i[3456]86-*-sco3.2
i[3456]86-*-sco3.2v4
i[3456]86-*-sysv
i[3456]86-*-sysv4
i[3456]86-force_cpu386-none
i[3456]86-sequent-bsd
i960-nindy960-none
m68k-hp-bsd4.3
m68k-mvme135-none
m68k-mvme136-none
m68k-sony-newsos3
m68k-sony-newsos4
m68k-sun-sunos4
mips-dec-ultrix4
mips-sgi-irix4
sparc-sun-solaris2
sparc-sun-sunos4
Since no one has volunteered to test and fix the above configurations,
these are not supported at the moment. It's expected that these don't
work anymore. Porting the library is not hard. If you are interested
in doing a port, please contact the glibc maintainers by sending
electronic mail to <bug-glibc@gnu.org>.
Past releases of this library ran on a variety of configurations that are
no longer supported. Porting the library is not hard. If you are
interested in doing a port, please contact the glibc maintainers;
see http://www.gnu.org/software/libc/ for more information.
There are some add-ons which can be used together with GNU libc. They
are designed in a way to ease the installation by integrating them in
@@ -76,11 +49,9 @@ The file NOTES contains a description of the feature-test macros used
in the GNU C library, explaining how you can tell the library what
facilities you want it to make available.
We prefer to get bug reports sent using the `glibcbug' shell script which
is installed together with the rest of the GNU libc to <bugs@gnu.org>.
Simply run this shell script and fill in the information. Nevertheless
you can still send bug reports to <bug-glibc@gnu.org> as normal electronic
mails.
Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
information. We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.
The GNU C Library is free software. See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
+5 -3
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991-2000,2002,2003, 2004 Free Software Foundation, Inc.
# Copyright (C) 1991-2000,2002,2003, 2004, 2005 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -104,7 +104,7 @@ endif
ifeq ($(build-programs),yes)
binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs)
binaries-static = $(others-static) $(tests-static)
binaries-static = $(others-static) $(tests-static) $(xtests-static)
else
binaries-all = $(tests) $(xtests) $(test-srcs)
binaries-static =
@@ -165,7 +165,9 @@ distclean: clean
.PHONY: subdir_install
subdir_install: install-no-libc.a lib-noranlib stubs
.PHONY: subdir_TAGS
.PHONY: subdir_objs subdir_stubs subdir_TAGS
subdir_objs: objs
subdir_stubs: stubs
subdir_TAGS: TAGS
# Target required by the Hurd to ensure that all the MiG-generated
+5
View File
@@ -20,6 +20,7 @@ libc {
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
%ifdef USE_IN_LIBIO
HURD_CTHREADS_0.3
%endif
@@ -35,6 +36,7 @@ libdl {
GLIBC_2.0
GLIBC_2.1
GLIBC_2.3.3
GLIBC_2.3.4
}
libm {
GLIBC_2.0
@@ -42,6 +44,7 @@ libm {
GLIBC_2.2
GLIBC_2.2.3
GLIBC_2.3.4
GLIBC_2.4
}
libnsl {
GLIBC_2.0
@@ -90,6 +93,7 @@ librt {
GLIBC_2.2
GLIBC_2.3
GLIBC_2.3.3
GLIBC_2.3.4
}
libutil {
GLIBC_2.0
@@ -98,6 +102,7 @@ ld {
GLIBC_2.0
GLIBC_2.1
GLIBC_2.3
GLIBC_2.4
GLIBC_PRIVATE
}
libthread_db {
+45
View File
@@ -0,0 +1,45 @@
<unistd.h>:
lssek: Probably should be __wur but lseek(fd,SEEK_SET,0) will succeed if
the descriptor is fine.
lseek64: same
setuid: will always succeed given correct privileges, so there might
be places which don't check for it.
setreuid: same
seteuid: same
setgid: same
setregid: same
setegid: same
setresuid: same
setresgid: same
<stdio.h>:
setvbuf: if stream and buffer are fine and other parameters constant,
it cannot really fail.
fseek: see lseek
fseeko: likewise
fgetpos: similarly
fsetpos: likewise
<stdlib.h>:
atext: it is guaranteed that a certain number of handlers can be
registered, so some calls might need not be checked
on_exit: same
random functions: one might want to discard a number of results. In any
case, no security problem
putenv: probably SHOULD be marked, but we'll wait a bit.
setenv: likewise
unsetenv: likewise
clearenv: likewise
mbstowcs: probably SHOULD be marked
wcstombs: likewise
ptsname_r: probably SHOULD be marked
+17 -23
View File
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams
Copyright (C) 1997,1998,1999,2001,2002,2003 Free Software Foundation, Inc.
Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -102,11 +102,10 @@ __argp_fmtstream_free (argp_fmtstream_t fs)
if (fs->p > fs->buf)
{
#ifdef USE_IN_LIBIO
if (_IO_fwide (fs->stream, 0) > 0)
__fwprintf (fs->stream, L"%.*s", (int) (fs->p - fs->buf), fs->buf);
else
__fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
#else
fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
#endif
fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
}
free (fs->buf);
free (fs);
@@ -291,17 +290,15 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
else
/* Output the first line so we can use the space. */
{
#ifdef USE_IN_LIBIO
if (_IO_fwide (fs->stream, 0) > 0)
__fwprintf (fs->stream, L"%.*s\n",
(int) (nl - fs->buf), fs->buf);
else
#ifdef _LIBC
__fxprintf (fs->stream, "%.*s\n",
(int) (nl - fs->buf), fs->buf);
#else
if (nl > fs->buf)
fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream);
putc_unlocked ('\n', fs->stream);
#endif
{
if (nl > fs->buf)
fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream);
putc_unlocked ('\n', fs->stream);
}
len += buf - fs->buf;
nl = buf = fs->buf;
}
@@ -360,15 +357,12 @@ __argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
/* Flush FS's buffer. */
__argp_fmtstream_update (fs);
#ifdef USE_IN_LIBIO
if (_IO_fwide (fs->stream, 0) > 0)
{
__fwprintf (fs->stream, L"%.*s", (int) (fs->p - fs->buf), fs->buf);
wrote = fs->p - fs->buf;
}
else
#ifdef _LIBC
__fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
wrote = fs->p - fs->buf;
#else
wrote = fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
#endif
wrote = fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
if (wrote == fs->p - fs->buf)
{
fs->p = fs->buf;
+2 -2
View File
@@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp-fmtstream.h
Copyright (C) 1997, 2003 Free Software Foundation, Inc.
Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -24,7 +24,7 @@
#define ARGP_FS_EI
#undef __OPTIMIZE__
#define __OPTIMIZE__
#define __OPTIMIZE__ 1
#include "argp-fmtstream.h"
#if 0
+44 -61
View File
@@ -1,5 +1,5 @@
/* Hierarchial argument parsing help output
Copyright (C) 1995-2003, 2004 Free Software Foundation, Inc.
Copyright (C) 1995-2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -1763,33 +1763,26 @@ __argp_error (const struct argp_state *state, const char *fmt, ...)
va_start (ap, fmt);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stream, 0) > 0)
{
char *buf;
#ifdef _LIBC
char *buf;
if (__asprintf (&buf, fmt, ap) < 0)
buf = NULL;
if (__asprintf (&buf, fmt, ap) < 0)
buf = NULL;
__fwprintf (stream, L"%s: %s\n",
state ? state->name : __argp_short_program_name (),
buf);
__fxprintf (stream, "%s: %s\n",
state ? state->name : __argp_short_program_name (), buf);
free (buf);
}
else
free (buf);
#else
fputs_unlocked (state ? state->name : __argp_short_program_name (),
stream);
putc_unlocked (':', stream);
putc_unlocked (' ', stream);
vfprintf (stream, fmt, ap);
putc_unlocked ('\n', stream);
#endif
{
fputs_unlocked (state
? state->name : __argp_short_program_name (),
stream);
putc_unlocked (':', stream);
putc_unlocked (' ', stream);
vfprintf (stream, fmt, ap);
putc_unlocked ('\n', stream);
}
__argp_state_help (state, stream, ARGP_HELP_STD_ERR);
@@ -1827,41 +1820,34 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
__flockfile (stream);
#endif
#ifdef USE_IN_LIBIO
if (_IO_fwide (stream, 0) > 0)
__fwprintf (stream, L"%s",
state ? state->name : __argp_short_program_name ());
else
#ifdef _LIBC
__fxprintf (stream, "%s",
state ? state->name : __argp_short_program_name ());
#else
fputs_unlocked (state ? state->name : __argp_short_program_name (),
stream);
#endif
fputs_unlocked (state
? state->name : __argp_short_program_name (),
stream);
if (fmt)
{
va_list ap;
va_start (ap, fmt);
#ifdef USE_IN_LIBIO
if (_IO_fwide (stream, 0) > 0)
{
char *buf;
#ifdef _LIBC
char *buf;
if (__asprintf (&buf, fmt, ap) < 0)
buf = NULL;
if (__asprintf (&buf, fmt, ap) < 0)
buf = NULL;
__fwprintf (stream, L": %s", buf);
__fxprintf (stream, ": %s", buf);
free (buf);
}
else
free (buf);
#else
putc_unlocked (':', stream);
putc_unlocked (' ', stream);
vfprintf (stream, fmt, ap);
#endif
{
putc_unlocked (':', stream);
putc_unlocked (' ', stream);
vfprintf (stream, fmt, ap);
}
va_end (ap);
}
@@ -1870,21 +1856,18 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
{
char buf[200];
#ifdef USE_IN_LIBIO
if (_IO_fwide (stream, 0) > 0)
__fwprintf (stream, L": %s",
__strerror_r (errnum, buf, sizeof (buf)));
else
#endif
{
putc_unlocked (':', stream);
putc_unlocked (' ', stream);
#if defined _LIBC || defined HAVE_STRERROR_R
fputs (__strerror_r (errnum, buf, sizeof (buf)), stream);
#ifdef _LIBC
__fxprintf (stream, ": %s",
__strerror_r (errnum, buf, sizeof (buf)));
#else
fputs (strerror (errnum), stream);
putc_unlocked (':', stream);
putc_unlocked (' ', stream);
# ifdef HAVE_STRERROR_R
fputs (__strerror_r (errnum, buf, sizeof (buf)), stream);
# else
fputs (strerror (errnum), stream);
# endif
#endif
}
}
#ifdef USE_IN_LIBIO
+2 -2
View File
@@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp.h
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -31,7 +31,7 @@
#endif
#define ARGP_EI
#undef __OPTIMIZE__
#define __OPTIMIZE__
#define __OPTIMIZE__ 1
#include "argp.h"
/* Add weak aliases. */
+2 -8
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1994-1998,2001,2002 Free Software Foundation, Inc.
/* Copyright (C) 1994-1998,2001,2002,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -61,13 +61,7 @@ __assert_perror_fail (int errnum,
__strerror_r (errnum, errbuf, sizeof errbuf)) >= 0)
{
/* Print the message. */
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
(void) __fwprintf (stderr, L"%s", buf);
else
#endif
(void) fputs (buf, stderr);
(void) __fxprintf (NULL, "%s", buf);
(void) fflush (stderr);
/* We have to free the buffer since the appplication might catch the
+3 -8
View File
@@ -1,4 +1,5 @@
/* Copyright (C) 1991,1994-1996,1998,2001,2002 Free Software Foundation, Inc.
/* Copyright (C) 1991,1994-1996,1998,2001,2002,2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -60,13 +61,7 @@ __assert_fail (const char *assertion, const char *file, unsigned int line,
assertion) >= 0)
{
/* Print the message. */
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
(void) __fwprintf (stderr, L"%s", buf);
else
#endif
(void) fputs (buf, stderr);
(void) __fxprintf (NULL, "%s", buf);
(void) fflush (stderr);
/* We have to free the buffer since the application might catch the
+3 -20
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991,1992,1994-2001,2003 Free Software Foundation, Inc.
/* Copyright (C) 1991,1992,1994-2001,2003,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -84,33 +84,16 @@ extern void __assert (const char *__assertion, const char *__file, int __line)
__END_DECLS
/* For the macro definition we use gcc's __builtin_expect if possible
to generate good code for the non-error case. gcc 3.0 is a good
enough estimate for when the feature became available. */
# if __GNUC_PREREQ (3, 0)
# define assert(expr) \
(__ASSERT_VOID_CAST (__builtin_expect (!!(expr), 1) ? 0 : \
(__assert_fail (__STRING(expr), __FILE__, __LINE__, \
__ASSERT_FUNCTION), 0)))
# else
# define assert(expr) \
# define assert(expr) \
(__ASSERT_VOID_CAST ((expr) ? 0 : \
(__assert_fail (__STRING(expr), __FILE__, __LINE__, \
__ASSERT_FUNCTION), 0)))
# endif
# ifdef __USE_GNU
# if __GNUC_PREREQ (3, 0)
# define assert_perror(errnum) \
(__ASSERT_VOID_CAST (__builtin_expect (!(errnum), 1) ? 0 : \
(__assert_perror_fail ((errnum), __FILE__, __LINE__, \
__ASSERT_FUNCTION), 0)))
# else
# define assert_perror(errnum) \
# define assert_perror(errnum) \
(__ASSERT_VOID_CAST (!(errnum) ? 0 : \
(__assert_perror_fail ((errnum), __FILE__, __LINE__, \
__ASSERT_FUNCTION), 0)))
# endif
# endif
/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
-84
View File
@@ -1,84 +0,0 @@
/* Macros to swap the order of bytes in integer values.
Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
#ifndef _BITS_BYTESWAP_H
#define _BITS_BYTESWAP_H 1
/* Swap bytes in 16 bit value. */
#ifdef __GNUC__
# define __bswap_16(x) \
(__extension__ \
({ unsigned short int __bsx = (x); \
((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }))
#else
static __inline unsigned short int
__bswap_16 (unsigned short int __bsx)
{
return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8));
}
#endif
/* Swap bytes in 32 bit value. */
#ifdef __GNUC__
# define __bswap_32(x) \
(__extension__ \
({ unsigned int __bsx = (x); \
((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \
(((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }))
#else
static __inline unsigned int
__bswap_32 (unsigned int __bsx)
{
return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) |
(((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24));
}
#endif
#if defined __GNUC__ && __GNUC__ >= 2
/* Swap bytes in 64 bit value. */
# define __bswap_constant_64(x) \
((((x) & 0xff00000000000000ull) >> 56) \
| (((x) & 0x00ff000000000000ull) >> 40) \
| (((x) & 0x0000ff0000000000ull) >> 24) \
| (((x) & 0x000000ff00000000ull) >> 8) \
| (((x) & 0x00000000ff000000ull) << 8) \
| (((x) & 0x0000000000ff0000ull) << 24) \
| (((x) & 0x000000000000ff00ull) << 40) \
| (((x) & 0x00000000000000ffull) << 56))
# define __bswap_64(x) \
(__extension__ \
({ union { __extension__ unsigned long long int __ll; \
unsigned int __l[2]; } __w, __r; \
if (__builtin_constant_p (x)) \
__r.__ll = __bswap_constant_64 (x); \
else \
{ \
__w.__ll = (x); \
__r.__l[0] = __bswap_32 (__w.__l[1]); \
__r.__l[1] = __bswap_32 (__w.__l[0]); \
} \
__r.__ll; }))
#endif
#endif /* _BITS_BYTESWAP_H */
-596
View File
@@ -1,596 +0,0 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
Copyright (C) 1993,1995-1998,2000,2001,2003,2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _UNISTD_H
# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
#endif
/* Values for the NAME argument to `pathconf' and `fpathconf'. */
enum
{
_PC_LINK_MAX,
#define _PC_LINK_MAX _PC_LINK_MAX
_PC_MAX_CANON,
#define _PC_MAX_CANON _PC_MAX_CANON
_PC_MAX_INPUT,
#define _PC_MAX_INPUT _PC_MAX_INPUT
_PC_NAME_MAX,
#define _PC_NAME_MAX _PC_NAME_MAX
_PC_PATH_MAX,
#define _PC_PATH_MAX _PC_PATH_MAX
_PC_PIPE_BUF,
#define _PC_PIPE_BUF _PC_PIPE_BUF
_PC_CHOWN_RESTRICTED,
#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED
_PC_NO_TRUNC,
#define _PC_NO_TRUNC _PC_NO_TRUNC
_PC_VDISABLE,
#define _PC_VDISABLE _PC_VDISABLE
_PC_SYNC_IO,
#define _PC_SYNC_IO _PC_SYNC_IO
_PC_ASYNC_IO,
#define _PC_ASYNC_IO _PC_ASYNC_IO
_PC_PRIO_IO,
#define _PC_PRIO_IO _PC_PRIO_IO
_PC_SOCK_MAXBUF,
#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF
_PC_FILESIZEBITS,
#define _PC_FILESIZEBITS _PC_FILESIZEBITS
_PC_REC_INCR_XFER_SIZE,
#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE
_PC_REC_MAX_XFER_SIZE,
#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE
_PC_REC_MIN_XFER_SIZE,
#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE
_PC_REC_XFER_ALIGN,
#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN
_PC_ALLOC_SIZE_MIN,
#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN
_PC_SYMLINK_MAX,
#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX
_PC_2_SYMLINKS
#define _PC_2_SYMLINKS _PC_2_SYMLINKS
};
/* Values for the argument to `sysconf'. */
enum
{
_SC_ARG_MAX,
#define _SC_ARG_MAX _SC_ARG_MAX
_SC_CHILD_MAX,
#define _SC_CHILD_MAX _SC_CHILD_MAX
_SC_CLK_TCK,
#define _SC_CLK_TCK _SC_CLK_TCK
_SC_NGROUPS_MAX,
#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX
_SC_OPEN_MAX,
#define _SC_OPEN_MAX _SC_OPEN_MAX
_SC_STREAM_MAX,
#define _SC_STREAM_MAX _SC_STREAM_MAX
_SC_TZNAME_MAX,
#define _SC_TZNAME_MAX _SC_TZNAME_MAX
_SC_JOB_CONTROL,
#define _SC_JOB_CONTROL _SC_JOB_CONTROL
_SC_SAVED_IDS,
#define _SC_SAVED_IDS _SC_SAVED_IDS
_SC_REALTIME_SIGNALS,
#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS
_SC_PRIORITY_SCHEDULING,
#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING
_SC_TIMERS,
#define _SC_TIMERS _SC_TIMERS
_SC_ASYNCHRONOUS_IO,
#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO
_SC_PRIORITIZED_IO,
#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO
_SC_SYNCHRONIZED_IO,
#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO
_SC_FSYNC,
#define _SC_FSYNC _SC_FSYNC
_SC_MAPPED_FILES,
#define _SC_MAPPED_FILES _SC_MAPPED_FILES
_SC_MEMLOCK,
#define _SC_MEMLOCK _SC_MEMLOCK
_SC_MEMLOCK_RANGE,
#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE
_SC_MEMORY_PROTECTION,
#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION
_SC_MESSAGE_PASSING,
#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING
_SC_SEMAPHORES,
#define _SC_SEMAPHORES _SC_SEMAPHORES
_SC_SHARED_MEMORY_OBJECTS,
#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
_SC_AIO_LISTIO_MAX,
#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX
_SC_AIO_MAX,
#define _SC_AIO_MAX _SC_AIO_MAX
_SC_AIO_PRIO_DELTA_MAX,
#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX
_SC_DELAYTIMER_MAX,
#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX
_SC_MQ_OPEN_MAX,
#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX
_SC_MQ_PRIO_MAX,
#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX
_SC_VERSION,
#define _SC_VERSION _SC_VERSION
_SC_PAGESIZE,
#define _SC_PAGESIZE _SC_PAGESIZE
#define _SC_PAGE_SIZE _SC_PAGESIZE
_SC_RTSIG_MAX,
#define _SC_RTSIG_MAX _SC_RTSIG_MAX
_SC_SEM_NSEMS_MAX,
#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX
_SC_SEM_VALUE_MAX,
#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX
_SC_SIGQUEUE_MAX,
#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX
_SC_TIMER_MAX,
#define _SC_TIMER_MAX _SC_TIMER_MAX
/* Values for the argument to `sysconf'
corresponding to _POSIX2_* symbols. */
_SC_BC_BASE_MAX,
#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX
_SC_BC_DIM_MAX,
#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX
_SC_BC_SCALE_MAX,
#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX
_SC_BC_STRING_MAX,
#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX
_SC_COLL_WEIGHTS_MAX,
#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX
_SC_EQUIV_CLASS_MAX,
#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX
_SC_EXPR_NEST_MAX,
#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX
_SC_LINE_MAX,
#define _SC_LINE_MAX _SC_LINE_MAX
_SC_RE_DUP_MAX,
#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX
_SC_CHARCLASS_NAME_MAX,
#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX
_SC_2_VERSION,
#define _SC_2_VERSION _SC_2_VERSION
_SC_2_C_BIND,
#define _SC_2_C_BIND _SC_2_C_BIND
_SC_2_C_DEV,
#define _SC_2_C_DEV _SC_2_C_DEV
_SC_2_FORT_DEV,
#define _SC_2_FORT_DEV _SC_2_FORT_DEV
_SC_2_FORT_RUN,
#define _SC_2_FORT_RUN _SC_2_FORT_RUN
_SC_2_SW_DEV,
#define _SC_2_SW_DEV _SC_2_SW_DEV
_SC_2_LOCALEDEF,
#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF
_SC_PII,
#define _SC_PII _SC_PII
_SC_PII_XTI,
#define _SC_PII_XTI _SC_PII_XTI
_SC_PII_SOCKET,
#define _SC_PII_SOCKET _SC_PII_SOCKET
_SC_PII_INTERNET,
#define _SC_PII_INTERNET _SC_PII_INTERNET
_SC_PII_OSI,
#define _SC_PII_OSI _SC_PII_OSI
_SC_POLL,
#define _SC_POLL _SC_POLL
_SC_SELECT,
#define _SC_SELECT _SC_SELECT
_SC_UIO_MAXIOV,
#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV
_SC_IOV_MAX = _SC_UIO_MAXIOV,
#define _SC_IOV_MAX _SC_IOV_MAX
_SC_PII_INTERNET_STREAM,
#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM
_SC_PII_INTERNET_DGRAM,
#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM
_SC_PII_OSI_COTS,
#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS
_SC_PII_OSI_CLTS,
#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS
_SC_PII_OSI_M,
#define _SC_PII_OSI_M _SC_PII_OSI_M
_SC_T_IOV_MAX,
#define _SC_T_IOV_MAX _SC_T_IOV_MAX
/* Values according to POSIX 1003.1c (POSIX threads). */
_SC_THREADS,
#define _SC_THREADS _SC_THREADS
_SC_THREAD_SAFE_FUNCTIONS,
#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS
_SC_GETGR_R_SIZE_MAX,
#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX
_SC_GETPW_R_SIZE_MAX,
#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX
_SC_LOGIN_NAME_MAX,
#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX
_SC_TTY_NAME_MAX,
#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX
_SC_THREAD_DESTRUCTOR_ITERATIONS,
#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS
_SC_THREAD_KEYS_MAX,
#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX
_SC_THREAD_STACK_MIN,
#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN
_SC_THREAD_THREADS_MAX,
#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX
_SC_THREAD_ATTR_STACKADDR,
#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR
_SC_THREAD_ATTR_STACKSIZE,
#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE
_SC_THREAD_PRIORITY_SCHEDULING,
#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING
_SC_THREAD_PRIO_INHERIT,
#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT
_SC_THREAD_PRIO_PROTECT,
#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT
_SC_THREAD_PROCESS_SHARED,
#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED
_SC_NPROCESSORS_CONF,
#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
_SC_NPROCESSORS_ONLN,
#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
_SC_PHYS_PAGES,
#define _SC_PHYS_PAGES _SC_PHYS_PAGES
_SC_AVPHYS_PAGES,
#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES
_SC_ATEXIT_MAX,
#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX
_SC_PASS_MAX,
#define _SC_PASS_MAX _SC_PASS_MAX
_SC_XOPEN_VERSION,
#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION
_SC_XOPEN_XCU_VERSION,
#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION
_SC_XOPEN_UNIX,
#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX
_SC_XOPEN_CRYPT,
#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT
_SC_XOPEN_ENH_I18N,
#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N
_SC_XOPEN_SHM,
#define _SC_XOPEN_SHM _SC_XOPEN_SHM
_SC_2_CHAR_TERM,
#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM
_SC_2_C_VERSION,
#define _SC_2_C_VERSION _SC_2_C_VERSION
_SC_2_UPE,
#define _SC_2_UPE _SC_2_UPE
_SC_XOPEN_XPG2,
#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2
_SC_XOPEN_XPG3,
#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3
_SC_XOPEN_XPG4,
#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4
_SC_CHAR_BIT,
#define _SC_CHAR_BIT _SC_CHAR_BIT
_SC_CHAR_MAX,
#define _SC_CHAR_MAX _SC_CHAR_MAX
_SC_CHAR_MIN,
#define _SC_CHAR_MIN _SC_CHAR_MIN
_SC_INT_MAX,
#define _SC_INT_MAX _SC_INT_MAX
_SC_INT_MIN,
#define _SC_INT_MIN _SC_INT_MIN
_SC_LONG_BIT,
#define _SC_LONG_BIT _SC_LONG_BIT
_SC_WORD_BIT,
#define _SC_WORD_BIT _SC_WORD_BIT
_SC_MB_LEN_MAX,
#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX
_SC_NZERO,
#define _SC_NZERO _SC_NZERO
_SC_SSIZE_MAX,
#define _SC_SSIZE_MAX _SC_SSIZE_MAX
_SC_SCHAR_MAX,
#define _SC_SCHAR_MAX _SC_SCHAR_MAX
_SC_SCHAR_MIN,
#define _SC_SCHAR_MIN _SC_SCHAR_MIN
_SC_SHRT_MAX,
#define _SC_SHRT_MAX _SC_SHRT_MAX
_SC_SHRT_MIN,
#define _SC_SHRT_MIN _SC_SHRT_MIN
_SC_UCHAR_MAX,
#define _SC_UCHAR_MAX _SC_UCHAR_MAX
_SC_UINT_MAX,
#define _SC_UINT_MAX _SC_UINT_MAX
_SC_ULONG_MAX,
#define _SC_ULONG_MAX _SC_ULONG_MAX
_SC_USHRT_MAX,
#define _SC_USHRT_MAX _SC_USHRT_MAX
_SC_NL_ARGMAX,
#define _SC_NL_ARGMAX _SC_NL_ARGMAX
_SC_NL_LANGMAX,
#define _SC_NL_LANGMAX _SC_NL_LANGMAX
_SC_NL_MSGMAX,
#define _SC_NL_MSGMAX _SC_NL_MSGMAX
_SC_NL_NMAX,
#define _SC_NL_NMAX _SC_NL_NMAX
_SC_NL_SETMAX,
#define _SC_NL_SETMAX _SC_NL_SETMAX
_SC_NL_TEXTMAX,
#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX
_SC_XBS5_ILP32_OFF32,
#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32
_SC_XBS5_ILP32_OFFBIG,
#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG
_SC_XBS5_LP64_OFF64,
#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64
_SC_XBS5_LPBIG_OFFBIG,
#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG
_SC_XOPEN_LEGACY,
#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY
_SC_XOPEN_REALTIME,
#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME
_SC_XOPEN_REALTIME_THREADS,
#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS
_SC_ADVISORY_INFO,
#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO
_SC_BARRIERS,
#define _SC_BARRIERS _SC_BARRIERS
_SC_BASE,
#define _SC_BASE _SC_BASE
_SC_C_LANG_SUPPORT,
#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT
_SC_C_LANG_SUPPORT_R,
#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R
_SC_CLOCK_SELECTION,
#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION
_SC_CPUTIME,
#define _SC_CPUTIME _SC_CPUTIME
_SC_THREAD_CPUTIME,
#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME
_SC_DEVICE_IO,
#define _SC_DEVICE_IO _SC_DEVICE_IO
_SC_DEVICE_SPECIFIC,
#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC
_SC_DEVICE_SPECIFIC_R,
#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R
_SC_FD_MGMT,
#define _SC_FD_MGMT _SC_FD_MGMT
_SC_FIFO,
#define _SC_FIFO _SC_FIFO
_SC_PIPE,
#define _SC_PIPE _SC_PIPE
_SC_FILE_ATTRIBUTES,
#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES
_SC_FILE_LOCKING,
#define _SC_FILE_LOCKING _SC_FILE_LOCKING
_SC_FILE_SYSTEM,
#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM
_SC_MONOTONIC_CLOCK,
#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
_SC_MULTI_PROCESS,
#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS
_SC_SINGLE_PROCESS,
#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS
_SC_NETWORKING,
#define _SC_NETWORKING _SC_NETWORKING
_SC_READER_WRITER_LOCKS,
#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
_SC_SPIN_LOCKS,
#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS
_SC_REGEXP,
#define _SC_REGEXP _SC_REGEXP
_SC_REGEX_VERSION,
#define _SC_REGEX_VERSION _SC_REGEX_VERSION
_SC_SHELL,
#define _SC_SHELL _SC_SHELL
_SC_SIGNALS,
#define _SC_SIGNALS _SC_SIGNALS
_SC_SPAWN,
#define _SC_SPAWN _SC_SPAWN
_SC_SPORADIC_SERVER,
#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER
_SC_THREAD_SPORADIC_SERVER,
#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
_SC_SYSTEM_DATABASE,
#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE
_SC_SYSTEM_DATABASE_R,
#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R
_SC_TIMEOUTS,
#define _SC_TIMEOUTS _SC_TIMEOUTS
_SC_TYPED_MEMORY_OBJECTS,
#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
_SC_USER_GROUPS,
#define _SC_USER_GROUPS _SC_USER_GROUPS
_SC_USER_GROUPS_R,
#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R
_SC_2_PBS,
#define _SC_2_PBS _SC_2_PBS
_SC_2_PBS_ACCOUNTING,
#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING
_SC_2_PBS_LOCATE,
#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE
_SC_2_PBS_MESSAGE,
#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE
_SC_2_PBS_TRACK,
#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK
_SC_SYMLOOP_MAX,
#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX
_SC_STREAMS,
#define _SC_STREAMS _SC_STREAMS
_SC_2_PBS_CHECKPOINT,
#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT
_SC_V6_ILP32_OFF32,
#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32
_SC_V6_ILP32_OFFBIG,
#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG
_SC_V6_LP64_OFF64,
#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64
_SC_V6_LPBIG_OFFBIG,
#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG
_SC_HOST_NAME_MAX,
#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
_SC_TRACE,
#define _SC_TRACE _SC_TRACE
_SC_TRACE_EVENT_FILTER,
#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER
_SC_TRACE_INHERIT,
#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT
_SC_TRACE_LOG,
#define _SC_TRACE_LOG _SC_TRACE_LOG
_SC_LEVEL1_ICACHE_SIZE,
#define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE
_SC_LEVEL1_ICACHE_ASSOC,
#define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC
_SC_LEVEL1_ICACHE_LINESIZE,
#define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE
_SC_LEVEL1_DCACHE_SIZE,
#define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE
_SC_LEVEL1_DCACHE_ASSOC,
#define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC
_SC_LEVEL1_DCACHE_LINESIZE,
#define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE
_SC_LEVEL2_CACHE_SIZE,
#define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE
_SC_LEVEL2_CACHE_ASSOC,
#define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC
_SC_LEVEL2_CACHE_LINESIZE,
#define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE
_SC_LEVEL3_CACHE_SIZE,
#define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE
_SC_LEVEL3_CACHE_ASSOC,
#define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC
_SC_LEVEL3_CACHE_LINESIZE,
#define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE
_SC_LEVEL4_CACHE_SIZE,
#define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE
_SC_LEVEL4_CACHE_ASSOC,
#define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC
_SC_LEVEL4_CACHE_LINESIZE
#define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE
/* Leave room here, maybe we need a few more cache levels some day. */
};
/* Values for the NAME argument to `confstr'. */
enum
{
_CS_PATH, /* The default search path. */
#define _CS_PATH _CS_PATH
_CS_V6_WIDTH_RESTRICTED_ENVS,
# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
_CS_GNU_LIBC_VERSION,
#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
_CS_GNU_LIBPTHREAD_VERSION,
#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
_CS_LFS_CFLAGS = 1000,
#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
_CS_LFS_LDFLAGS,
#define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
_CS_LFS_LIBS,
#define _CS_LFS_LIBS _CS_LFS_LIBS
_CS_LFS_LINTFLAGS,
#define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS
_CS_LFS64_CFLAGS,
#define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS
_CS_LFS64_LDFLAGS,
#define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
_CS_LFS64_LIBS,
#define _CS_LFS64_LIBS _CS_LFS64_LIBS
_CS_LFS64_LINTFLAGS,
#define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS
_CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
#define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS
_CS_XBS5_ILP32_OFF32_LDFLAGS,
#define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS
_CS_XBS5_ILP32_OFF32_LIBS,
#define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS
_CS_XBS5_ILP32_OFF32_LINTFLAGS,
#define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS
_CS_XBS5_ILP32_OFFBIG_CFLAGS,
#define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS
_CS_XBS5_ILP32_OFFBIG_LDFLAGS,
#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS
_CS_XBS5_ILP32_OFFBIG_LIBS,
#define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS
_CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
_CS_XBS5_LP64_OFF64_CFLAGS,
#define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS
_CS_XBS5_LP64_OFF64_LDFLAGS,
#define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS
_CS_XBS5_LP64_OFF64_LIBS,
#define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS
_CS_XBS5_LP64_OFF64_LINTFLAGS,
#define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS
_CS_XBS5_LPBIG_OFFBIG_CFLAGS,
#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS
_CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
_CS_XBS5_LPBIG_OFFBIG_LIBS,
#define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS
_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
_CS_POSIX_V6_ILP32_OFF32_CFLAGS,
#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS
_CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
_CS_POSIX_V6_ILP32_OFF32_LIBS,
#define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS
_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
_CS_POSIX_V6_ILP32_OFFBIG_LIBS,
#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS
_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
_CS_POSIX_V6_LP64_OFF64_CFLAGS,
#define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS
_CS_POSIX_V6_LP64_OFF64_LDFLAGS,
#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS
_CS_POSIX_V6_LP64_OFF64_LIBS,
#define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS
_CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
_CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
};
-64
View File
@@ -1,64 +0,0 @@
/* System dependent definitions for run-time dynamic loading.
Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _DLFCN_H
# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
#endif
/* The MODE argument to `dlopen' contains one of the following: */
#define RTLD_LAZY 0x00001 /* Lazy function call binding. */
#define RTLD_NOW 0x00002 /* Immediate function call binding. */
#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
#define RTLD_NOLOAD 0x00004 /* Do not load the object. */
/* If the following bit is set in the MODE argument to `dlopen',
the symbols of the loaded object and its dependencies are made
visible as if the object were linked directly into the program. */
#define RTLD_GLOBAL 0x00100
/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL.
The implementation does this by default and so we can define the
value to zero. */
#define RTLD_LOCAL 0
/* Do not delete object when closed. */
#define RTLD_NODELETE 0x01000
#ifdef __USE_GNU
/* To support profiling of shared objects it is a good idea to call
the function found using `dlsym' using the following macro since
these calls do not use the PLT. But this would mean the dynamic
loader has no chance to find out when the function is called. The
macro applies the necessary magic so that profiling is possible.
Rewrite
foo = (*fctp) (arg1, arg2);
into
foo = DL_CALL_FCT (fctp, (arg1, arg2));
*/
# define DL_CALL_FCT(fctp, args) \
(_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
__BEGIN_DECLS
/* This function calls the profiling functions. */
extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
__END_DECLS
#endif
-91
View File
@@ -1,91 +0,0 @@
/* Definitions for BSD-style memory management.
Copyright (C) 1994-1998,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* These are the bits used by 4.4 BSD and its derivatives. On systems
(such as GNU) where these facilities are not system services but can be
emulated in the C library, these are the definitions we emulate. */
#ifndef _SYS_MMAN_H
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
#endif
/* Protections are chosen from these bits, OR'd together. The
implementation does not necessarily support PROT_EXEC or PROT_WRITE
without PROT_READ. The only guarantees are that no writing will be
allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
#define PROT_NONE 0x00 /* No access. */
#define PROT_READ 0x04 /* Pages can be read. */
#define PROT_WRITE 0x02 /* Pages can be written. */
#define PROT_EXEC 0x01 /* Pages can be executed. */
/* Flags contain mapping type, sharing type and options. */
/* Mapping type (must choose one and only one of these). */
#ifdef __USE_BSD
# define MAP_FILE 0x0001 /* Mapped from a file or device. */
# define MAP_ANON 0x0002 /* Allocated from anonymous virtual memory. */
# define MAP_TYPE 0x000f /* Mask for type field. */
# ifdef __USE_MISC
# define MAP_ANONYMOUS MAP_ANON /* Linux name. */
# endif
#endif
/* Sharing types (must choose one and only one of these). */
#ifdef __USE_BSD
# define MAP_COPY 0x0020 /* Virtual copy of region at mapping time. */
#endif
#define MAP_SHARED 0x0010 /* Share changes. */
#define MAP_PRIVATE 0x0000 /* Changes private; copy pages on write. */
/* Other flags. */
#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */
#ifdef __USE_BSD
# define MAP_NOEXTEND 0x0200 /* For MAP_FILE, don't change file size. */
# define MAP_HASSEMPHORE 0x0400 /* Region may contain semaphores. */
# define MAP_INHERIT 0x0800 /* Region is retained after exec. */
#endif
/* Advice to `madvise'. */
#ifdef __USE_BSD
# define MADV_NORMAL 0 /* No further special treatment. */
# define MADV_RANDOM 1 /* Expect random page references. */
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 4 /* Don't need these pages. */
#endif
/* The POSIX people had to invent similar names for the same things. */
#ifdef __USE_XOPEN2K
# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
#endif
/* Flags to `msync'. */
#define MS_ASYNC 1 /* Sync memory asynchronously. */
#define MS_SYNC 0 /* Synchronous memory sync. */
#define MS_INVALIDATE 2 /* Invalidate the caches. */
/* Flags for `mlockall' (can be OR'd together). */
#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
#define MCL_FUTURE 2 /* Lock all additions to address
space. */
-199
View File
@@ -1,199 +0,0 @@
/* bits/types.h -- definitions of __*_t types underlying *_t types.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/*
* Never include this file directly; use <sys/types.h> instead.
*/
#ifndef _BITS_TYPES_H
#define _BITS_TYPES_H 1
#include <features.h>
#include <bits/wordsize.h>
#define __need_size_t
#include <stddef.h>
/* Convenience types. */
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
/* Fixed-size types, underlying types depend on word size and compiler. */
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
#if __WORDSIZE == 64
typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;
#elif defined __GLIBC_HAVE_LONG_LONG
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
#endif
/* quad_t is also 64 bits. */
#if __WORDSIZE == 64
typedef long int __quad_t;
typedef unsigned long int __u_quad_t;
#elif defined __GLIBC_HAVE_LONG_LONG
__extension__ typedef long long int __quad_t;
__extension__ typedef unsigned long long int __u_quad_t;
#else
typedef struct
{
long __val[2];
} __quad_t;
typedef struct
{
__u_long __val[2];
} __u_quad_t;
#endif
/* The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
macros for each of the OS types we define below. The definitions
of those macros must use the following macros for underlying types.
We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
variants of each of the following integer types on this machine.
16 -- "natural" 16-bit type (always short)
32 -- "natural" 32-bit type (always int)
64 -- "natural" 64-bit type (long or long long)
LONG32 -- 32-bit type, traditionally long
QUAD -- 64-bit type, always long long
WORD -- natural type of __WORDSIZE bits (int or long)
LONGWORD -- type of __WORDSIZE bits, traditionally long
We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
conventional uses of `long' or `long long' type modifiers match the
types we define, even when a less-adorned type would be the same size.
This matters for (somewhat) portably writing printf/scanf formats for
these types, where using the appropriate l or ll format modifiers can
make the typedefs and the formats match up across all GNU platforms. If
we used `long' when it's 64 bits where `long long' is expected, then the
compiler would warn about the formats not matching the argument types,
and the programmer changing them to shut up the compiler would break the
program's portability.
Here we assume what is presently the case in all the GCC configurations
we support: long long is always 64 bits, long is always word/address size,
and int is always 32 bits. */
#define __S16_TYPE short int
#define __U16_TYPE unsigned short int
#define __S32_TYPE int
#define __U32_TYPE unsigned int
#define __SLONGWORD_TYPE long int
#define __ULONGWORD_TYPE unsigned long int
#if __WORDSIZE == 32
# define __SQUAD_TYPE long long int
# define __UQUAD_TYPE unsigned long long int
# define __SWORD_TYPE int
# define __UWORD_TYPE unsigned int
# define __SLONG32_TYPE long int
# define __ULONG32_TYPE unsigned long int
# define __S64_TYPE __quad_t
# define __U64_TYPE __u_quad_t
#elif __WORDSIZE == 64
# define __SQUAD_TYPE long int
# define __UQUAD_TYPE unsigned long int
# define __SWORD_TYPE long int
# define __UWORD_TYPE unsigned long int
# define __SLONG32_TYPE int
# define __ULONG32_TYPE unsigned int
# define __S64_TYPE long int
# define __U64_TYPE unsigned long int
#else
# error
#endif
#include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */
/* We want __extension__ before typedef's that use nonstandard base types
such as `long long' in C89 mode. */
#define __STD_TYPE __extension__ typedef
__STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */
__STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */
__STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */
__STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */
__STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/
__STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */
__STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */
__STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
__STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */
__STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */
__STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */
__STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */
__STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */
__STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */
__STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */
__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
__STD_TYPE __SWBLK_T_TYPE __swblk_t; /* Type of a swap block maybe? */
__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */
/* Clock ID used in clock and timer functions. */
__STD_TYPE __CLOCKID_T_TYPE __clockid_t;
/* Timer ID returned by `timer_create'. */
__STD_TYPE __TIMER_T_TYPE __timer_t;
/* Type to represent block size. */
__STD_TYPE __BLKSIZE_T_TYPE __blksize_t;
/* Types from the Large File Support interface. */
/* Type to count number of disk blocks. */
__STD_TYPE __BLKCNT_T_TYPE __blkcnt_t;
__STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t;
/* Type to count file system blocks. */
__STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t;
__STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t;
/* Type to count file system nodes. */
__STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t;
__STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t;
__STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */
/* These few don't really vary by system, they always correspond
to one of the other defined types. */
typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
__STD_TYPE __SWORD_TYPE __intptr_t;
/* Duplicate info from sys/socket.h. */
__STD_TYPE __U32_TYPE __socklen_t;
#undef __STD_TYPE
#endif /* bits/types.h */
-104
View File
@@ -1,104 +0,0 @@
/* Definitions of status bits for `wait' et al.
Copyright (C) 1992, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#if !defined _SYS_WAIT_H && !defined _STDLIB_H
# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead."
#endif
/* Everything extant so far uses these same bits. */
/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */
#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
/* If WIFSIGNALED(STATUS), the terminating signal. */
#define __WTERMSIG(status) ((status) & 0x7f)
/* If WIFSTOPPED(STATUS), the signal that stopped the child. */
#define __WSTOPSIG(status) __WEXITSTATUS(status)
/* Nonzero if STATUS indicates normal termination. */
#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
/* Nonzero if STATUS indicates termination by a signal. */
#ifdef __GNUC__
# define __WIFSIGNALED(status) \
(__extension__ ({ int __status = (status); \
!__WIFSTOPPED(__status) && !__WIFEXITED(__status); }))
#else /* Not GCC. */
# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status))
#endif /* GCC. */
/* Nonzero if STATUS indicates the child is stopped. */
#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
/* Nonzero if STATUS indicates the child dumped core. */
#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
/* Macros for constructing status values. */
#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
#define __WCOREFLAG 0x80
#ifdef __USE_BSD
# include <endian.h>
union wait
{
int w_status;
struct
{
# if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int __w_termsig:7; /* Terminating signal. */
unsigned int __w_coredump:1; /* Set if dumped core. */
unsigned int __w_retcode:8; /* Return code if exited normally. */
unsigned int:16;
# endif /* Little endian. */
# if __BYTE_ORDER == __BIG_ENDIAN
unsigned int:16;
unsigned int __w_retcode:8;
unsigned int __w_coredump:1;
unsigned int __w_termsig:7;
# endif /* Big endian. */
} __wait_terminated;
struct
{
# if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int __w_stopval:8; /* W_STOPPED if stopped. */
unsigned int __w_stopsig:8; /* Stopping signal. */
unsigned int:16;
# endif /* Little endian. */
# if __BYTE_ORDER == __BIG_ENDIAN
unsigned int:16;
unsigned int __w_stopsig:8; /* Stopping signal. */
unsigned int __w_stopval:8; /* W_STOPPED if stopped. */
# endif /* Big endian. */
} __wait_stopped;
};
# define w_termsig __wait_terminated.__w_termsig
# define w_coredump __wait_terminated.__w_coredump
# define w_retcode __wait_terminated.__w_retcode
# define w_stopsig __wait_stopped.__w_stopsig
# define w_stopval __wait_stopped.__w_stopval
#endif /* Use BSD. */
+1
View File
@@ -0,0 +1 @@
The C stubs add-on version 2.1.2.
+482
View File
@@ -0,0 +1,482 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
+42
View File
@@ -0,0 +1,42 @@
2001-08-07 Jakub Jelinek <jakub@redhat.com>
* gconv_stubs.c (__gconv_lookup_alias): Remove.
(__gconv_NOOP, __gconv_compare_alias, __gconv_release_cache,
__gconv_release_step): New.
2001-06-07 Jakub Jelinek <jakub@redhat.com>
* gconv_stubs.c (__gconv_lookup_alias): New.
2000-02-27 Cristian Gafton <gafton@redhat.com>
* gconv_stubs.c: Return __gconv_OK for:
__gconv_transform_ascii_internal
__gconv_transform_ucs2little_internal
__gconv_transform_utf16_internal
__gconv_transform_utf8_internal
__gconv_transform_ucs2_internal
2000-02-25 Cristian Gafton <gafton@redhat.com>
* gconv_stubs.c: add __c_stubs_is_compiled_in so we can detect when
the library is linked in.
Wed Dec 8 13:47:25 1999 Ivan Brunello <ivan.brunello@tiscalinet.it>
* Makefile (extra-objs): Changed stubs.o to gconv_stubs.o.
Sun Dec 5 11:32:17 1999 H.J. Lu <hjl@gnu.org>
* gconv_stubs.c: Renamed from stubs.c.
Support glibc 2.1.x.
Mon Aug 23 16:42:05 1999 H.J. Lu <hjl@gnu.org>
* Banner: New.
* COPYING.LIB: Likewise.
* Makefile: Likewise.
* README: Likewise.
* configure: Likewise.
* stubs.c: Likewise.
* test-stdio.c: Likewise.
+46
View File
@@ -0,0 +1,46 @@
# Copyright (C) 1999 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
# License along with the GNU C Library; see the file COPYING.LIB. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# Sub-makefile for the C stub add-on library.
#
subdir := c_stubs
tests-static := test-stdio
tests := $(tests-static)
libc_stubs-objs := gconv_stubs.o
install-lib := libc_stubs.a
non-lib.a := libc_stubs.a
extra-objs := gconv_stubs.o libc_stubs.a
include ../Makeconfig
CPPFLAGS += -I../iconv
include ../Rules
$(objpfx)libc_stubs.a: $(addprefix $(objpfx), $(libc_stubs-objs))
-rm -f $@
$(CC) -nostdlib -nostartfiles -r -o $@ $^
lib: $(objpfx)libc_stubs.a
$(objpfx)test-stdio: $(objpfx)libc_stubs.a
+8
View File
@@ -0,0 +1,8 @@
This is a stub add-on library for the GNU C library version 2.1.2 and
above. It is used to create the smaller static binaries by stubbing
out the gconv related functions. The resulting binaries may not have
all the functionalities.
H.J. Lu
hjl@gnu.org
12/05/1999
Vendored Executable
+3
View File
@@ -0,0 +1,3 @@
# This is only to keep the GNU C library configure mechanism happy.
# This is a shell script fragment sourced by the main configure script.
# We have nothing we need to add here.
+126
View File
@@ -0,0 +1,126 @@
/* Provide gconv stub functions for the minimum static binaries.
Copyright (C) 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <features.h>
#include <string.h>
#include <wchar.h>
#include <bits/libc-lock.h>
#if __GNUC_PREREQ(3, 3)
# include <gconv_int.h>
#else
# include <gconv.h>
#endif
__libc_lock_define_initialized (, __gconv_lock)
/* hack for self identification */
int __c_stubs_is_compiled_in;
/* Don't drag in the dynamic linker. */
void *__libc_stack_end;
int attribute_hidden
__gconv_OK (void)
{
#if __GLIBC__ > 2 || __GLIBC_MINOR__ > 1
return __GCONV_OK;
#else
return GCONV_OK;
#endif
}
int attribute_hidden
__gconv_NOCONV (void)
{
#if __GLIBC__ > 2 || __GLIBC_MINOR__ > 1
return __GCONV_NOCONV;
#else
return GCONV_NOCONV;
#endif
}
void attribute_hidden
__gconv_NOOP (void)
{
}
int
internal_function
__gconv_compare_alias (const char *name1, const char *name2)
{
return strcmp (name1, name2);
}
wint_t
__gconv_btwoc_ascii (struct __gconv_step *step, unsigned char c)
{
if (c < 0x80)
return c;
else
return WEOF;
}
#if __GNUC_PREREQ(3, 3)
# undef strong_alias
# define strong_alias(impl, name) \
__typeof (name) name __attribute__ ((alias (#impl)))
#endif
strong_alias (__gconv_OK,
__gconv_close_transform);
strong_alias (__gconv_OK,
__gconv_close);
strong_alias (__gconv_NOCONV,
__gconv);
strong_alias (__gconv_NOCONV,
__gconv_find_transform);
strong_alias (__gconv_NOCONV,
__gconv_open);
/* These transformations should not fail in normal conditions */
strong_alias (__gconv_OK,
__gconv_transform_ascii_internal);
strong_alias (__gconv_OK,
__gconv_transform_utf16_internal);
strong_alias (__gconv_OK,
__gconv_transform_utf8_internal);
strong_alias (__gconv_OK,
__gconv_transform_ucs2_internal);
/* We can assume no conversion for these ones */
strong_alias (__gconv_NOCONV,
__gconv_transform_internal_ascii);
strong_alias (__gconv_NOCONV,
__gconv_transform_internal_ucs2);
strong_alias (__gconv_NOCONV,
__gconv_transform_internal_ucs4);
strong_alias (__gconv_NOCONV,
__gconv_transform_internal_utf16);
strong_alias (__gconv_NOCONV,
__gconv_transform_internal_utf8);
strong_alias (__gconv_NOCONV,
__gconv_transliterate);
strong_alias (__gconv_NOOP,
__gconv_release_cache);
strong_alias (__gconv_NOOP,
__gconv_release_step);
+8
View File
@@ -0,0 +1,8 @@
#include <stdio.h>
int
main (void)
{
printf ("Hello world\n");
return 0;
}
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
/* Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1996.
@@ -248,7 +248,7 @@ print_version (FILE *stream, struct argp_state *state)
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
"), "2004");
"), "2005");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
+9
View File
@@ -21,6 +21,9 @@
/* Define if building with SELinux support. Set by --with-selinux. */
#undef HAVE_SELINUX
/* Defined if building with SELinux support & audit libs are detected. */
#undef HAVE_LIBAUDIT
/* Define if using XCOFF. Set by --with-xcoff. */
#undef HAVE_XCOFF
@@ -217,6 +220,12 @@
/* Define if inlined system calls are available. */
#undef HAVE_INLINED_SYSCALLS
/* Define if your assembler and linker support R_PPC_REL16* relocs. */
#undef HAVE_ASM_PPC_REL16
/* Define if __stack_chk_guard canary should be randomized at program startup. */
#undef ENABLE_STACKGUARD_RANDOMIZE
/*
*/
+2 -1
View File
@@ -58,7 +58,9 @@ have-cpp-asm-debuginfo = @libc_cv_cpp_asm_debuginfo@
enable-check-abi = @enable_check_abi@
have-forced-unwind = @libc_cv_forced_unwind@
have-fpie = @libc_cv_fpie@
have-ssp = @libc_cv_ssp@
have-selinux = @have_selinux@
have-libaudit = @have_libaudit@
have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
fno-unit-at-a-time = @fno_unit_at_a_time@
bind-now = @bindnow@
@@ -69,7 +71,6 @@ versioning = @VERSIONING@
oldest-abi = @oldest_abi@
no-whole-archive = @no_whole_archive@
exceptions = @exceptions@
have_doors = @linux_doors@
mach-interface-list = @mach_interface_list@
Vendored
+152 -167
View File
@@ -313,7 +313,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -873,6 +873,9 @@ Optional Features:
objects [default=yes if supported]
--enable-oldest-abi=ABI configure the oldest ABI supported [e.g. 2.2]
[default=glibc default]
--enable-stackguard-randomization
initialize __stack_chk_guard canary with a random
number at program start
--enable-add-ons[=DIRS...]
configure and build add-ons in DIR1,DIR2,... search
for add-ons if no parameter given
@@ -1597,6 +1600,20 @@ _ACEOF
fi
# Check whether --enable-stackguard-randomization or --disable-stackguard-randomization was given.
if test "${enable_stackguard_randomization+set}" = set; then
enableval="$enable_stackguard_randomization"
enable_stackguard_randomize=$enableval
else
enable_stackguard_randomize=no
fi;
if test "$enable_stackguard_randomize" = yes; then
cat >>confdefs.h <<\_ACEOF
#define ENABLE_STACKGUARD_RANDOMIZE 1
_ACEOF
fi
# Check whether --enable-add-ons or --disable-add-ons was given.
if test "${enable_add_ons+set}" = set; then
enableval="$enable_add_ons"
@@ -1924,7 +1941,6 @@ fi
test -n "$base_machine" || case "$machine" in
a29k | am29000) base_machine=a29k machine=a29k ;;
alpha*) base_machine=alpha machine=alpha/$machine ;;
arm*) base_machine=arm machine=arm/arm32/$machine ;;
c3[012]) base_machine=cx0 machine=cx0/c30 ;;
c4[04]) base_machine=cx0 machine=cx0/c40 ;;
hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
@@ -1976,11 +1992,10 @@ sparcv8plus | sparcv8plusa | sparcv9)
base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
sparcv8plusb | sparcv9b)
base_machine=sparc machine=sparc/sparc32/sparcv9b ;;
sparc64 | ultrasparc)
sparc64)
base_machine=sparc machine=sparc/sparc64 ;;
sparc64b | ultrasparc3)
sparc64b)
base_machine=sparc machine=sparc/sparc64/sparcv9b ;;
thumb*) base_machine=thumb machine=arm/thumb/$machine ;;
*) base_machine=$machine ;;
esac
@@ -2093,6 +2108,14 @@ for d in $add_ons_pfx ''; do
done
done
done
if test -n "$d"; then
try="${d}sysdeps/generic"
test -n "$enable_debug_configure" &&
echo "$0 DEBUG: try $try" >&2
if test -d $srcdir/$try; then
sysnames="$sysnames $try"
fi
fi
done
IFS="$ac_save_ifs"
@@ -4093,7 +4116,7 @@ echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
3.[2-9]* | 4.[0-9]* )
3.4* | 4.[0-9]* )
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
@@ -5399,56 +5422,17 @@ echo $ECHO_N "checking for libunwind-support in compiler... $ECHO_C" >&6
if test "${libc_cv_cc_with_libunwind+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <libunwind.h>
int
main ()
{
unw_context_t uc;
unw_cursor_t c;
unw_getcontext (&uc);
unw_init_local (&c, &uc)
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
libc_cv_cc_with_libunwind=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
libc_cv_cc_with_libunwind=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
cat > conftest.c <<EOF
int main (void) { return 0; }
EOF
if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
conftest.c -v 2>&1 >/dev/null | grep -q " -lunwind "; then
libc_cv_cc_with_libunwind=yes
else
libc_cv_cc_with_libunwind=no
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $libc_cv_cc_with_libunwind" >&5
echo "${ECHO_T}$libc_cv_cc_with_libunwind" >&6
@@ -5815,6 +5799,33 @@ if test $libc_cv_fno_unit_at_a_time = yes; then
fi
echo "$as_me:$LINENO: checking for -fstack-protector" >&5
echo $ECHO_N "checking for -fstack-protector... $ECHO_C" >&6
if test "${libc_cv_ssp+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat > conftest.c <<EOF
int foo;
main () { return 0;}
EOF
if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
-o conftest conftest.c 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }
then
libc_cv_ssp=yes
else
libc_cv_ssp=no
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $libc_cv_ssp" >&5
echo "${ECHO_T}$libc_cv_ssp" >&6
if test $elf != yes; then
echo "$as_me:$LINENO: checking for .init and .fini sections" >&5
echo $ECHO_N "checking for .init and .fini sections... $ECHO_C" >&6
@@ -6089,49 +6100,6 @@ _ACEOF
fi
case "${host_cpu}-${host_os}" in
cris*)
libc_cv_asm_line_sep='@'
cat >>confdefs.h <<_ACEOF
#define ASM_LINE_SEP $libc_cv_asm_line_sep
_ACEOF
;;
hppa*linux*)
echo "$as_me:$LINENO: checking for assembler line separator" >&5
echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6
if test "${libc_cv_asm_line_sep+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat > conftest.s <<EOF
nop ; is_old_puffin
EOF
if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
libc_cv_asm_line_sep='!'
else
if test -z "$enable_hacker_mode"; then
echo "*** You need a newer assembler to compile glibc"
rm -f conftest*
exit 1
fi
libc_cv_asm_line_sep=';'
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $libc_cv_asm_line_sep" >&5
echo "${ECHO_T}$libc_cv_asm_line_sep" >&6
cat >>confdefs.h <<_ACEOF
#define ASM_LINE_SEP $libc_cv_asm_line_sep
_ACEOF
;;
esac
echo "$as_me:$LINENO: checking whether CFI directives are supported" >&5
echo $ECHO_N "checking whether CFI directives are supported... $ECHO_C" >&6
if test "${libc_cv_asm_cfi_directives+set}" = set; then
@@ -6139,7 +6107,7 @@ if test "${libc_cv_asm_cfi_directives+set}" = set; then
else
cat > conftest.s <<EOF
.text
.type func,@function
.type func,%function
func:
.cfi_startproc
.cfi_remember_state
@@ -6167,58 +6135,6 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5
echo $ECHO_N "checking if -g produces usable source locations for assembler-with-cpp... $ECHO_C" >&6
if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat > conftest.S <<EOF
#include "confdefs.h"
/* comment on
two lines */
${libc_cv_dot_text}
${libc_cv_asm_global_directive} foo
foo:
/* Unfortunately this test only works for a real instruction,
not for any of the machine-independent pseudo-ops.
So we just have to assume everybody has a "nop". */
nop
/* comment */
nop
/* comment */
nop
EOF
if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } && {
ac_pattern='conftest\.S'
{ ac_try='readelf --debug-dump=line conftest.o |
grep $ac_pattern 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }
}; then
libc_cv_cpp_asm_debuginfo=yes
else
libc_cv_cpp_asm_debuginfo=no
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5
echo "${ECHO_T}$libc_cv_cpp_asm_debuginfo" >&6
if test $libc_cv_cpp_asm_debuginfo = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_CPP_ASM_DEBUGINFO 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for ld --no-whole-archive" >&5
echo $ECHO_N "checking for ld --no-whole-archive... $ECHO_C" >&6
if test "${libc_cv_ld_no_whole_archive+set}" = set; then
@@ -6842,15 +6758,10 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "${ECHO_T}$have_selinux" >&6
fi
if test x$with_selinux = xauto ; then
if test x$with_selinux = xyes ; then
if test x$have_selinux = xno ; then
{ echo "$as_me:$LINENO: WARNING: Sufficiently new SELinux library not found" >&5
echo "$as_me: WARNING: Sufficiently new SELinux library not found" >&2;}
fi
else
if test x$have_selinux = xno ; then
{ { echo "$as_me:$LINENO: error: SELinux explicitly required, and SELinux library not found" >&5
echo "$as_me: error: SELinux explicitly required, and SELinux library not found" >&2;}
{ { echo "$as_me:$LINENO: error: SELinux explicitly required, but sufficiently recent SELinux library not found" >&5
echo "$as_me: error: SELinux explicitly required, but sufficiently recent SELinux library not found" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -6862,6 +6773,86 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_SELINUX 1
_ACEOF
# See if we have the libaudit library
echo "$as_me:$LINENO: checking for audit_log_avc in -laudit" >&5
echo $ECHO_N "checking for audit_log_avc in -laudit... $ECHO_C" >&6
if test "${ac_cv_lib_audit_audit_log_avc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-laudit $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char audit_log_avc ();
int
main ()
{
audit_log_avc ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_audit_audit_log_avc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_audit_audit_log_avc=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_audit_audit_log_avc" >&5
echo "${ECHO_T}$ac_cv_lib_audit_audit_log_avc" >&6
if test $ac_cv_lib_audit_audit_log_avc = yes; then
have_libaudit=yes
else
have_libaudit=no
fi
if test "x$have_libaudit" = xyes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBAUDIT 1
_ACEOF
fi
fi
@@ -7754,12 +7745,6 @@ echo "${ECHO_T}$pic_default" >&6
case "$add_ons" in
*door*) linux_doors=yes ;;
*) linux_doors=no ;;
esac
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
@@ -8476,11 +8461,12 @@ s,@libc_cv_z_combreloc@,$libc_cv_z_combreloc,;t t
s,@libc_cv_z_execstack@,$libc_cv_z_execstack,;t t
s,@libc_cv_fpie@,$libc_cv_fpie,;t t
s,@fno_unit_at_a_time@,$fno_unit_at_a_time,;t t
s,@libc_cv_ssp@,$libc_cv_ssp,;t t
s,@libc_cv_have_initfini@,$libc_cv_have_initfini,;t t
s,@libc_cv_cpp_asm_debuginfo@,$libc_cv_cpp_asm_debuginfo,;t t
s,@no_whole_archive@,$no_whole_archive,;t t
s,@exceptions@,$exceptions,;t t
s,@LIBGD@,$LIBGD,;t t
s,@have_libaudit@,$have_libaudit,;t t
s,@have_selinux@,$have_selinux,;t t
s,@EGREP@,$EGREP,;t t
s,@sizeof_long_double@,$sizeof_long_double,;t t
@@ -8509,7 +8495,6 @@ s,@bounded@,$bounded,;t t
s,@static_nss@,$static_nss,;t t
s,@nopic_initfini@,$nopic_initfini,;t t
s,@DEFINES@,$DEFINES,;t t
s,@linux_doors@,$linux_doors,;t t
s,@mach_interface_list@,$mach_interface_list,;t t
s,@VERSION@,$VERSION,;t t
s,@RELEASE@,$RELEASE,;t t
+55 -81
View File
@@ -174,6 +174,15 @@ else
fi
AC_SUBST(oldest_abi)
AC_ARG_ENABLE([stackguard-randomization],
AC_HELP_STRING([--enable-stackguard-randomization],
[initialize __stack_chk_guard canary with a random number at program start]),
[enable_stackguard_randomize=$enableval],
[enable_stackguard_randomize=no])
if test "$enable_stackguard_randomize" = yes; then
AC_DEFINE(ENABLE_STACKGUARD_RANDOMIZE)
fi
dnl Generic infrastructure for drop-in additions to libc.
AC_ARG_ENABLE([add-ons],
AC_HELP_STRING([--enable-add-ons@<:@=DIRS...@:>@],
@@ -423,7 +432,6 @@ changequote(,)dnl
test -n "$base_machine" || case "$machine" in
a29k | am29000) base_machine=a29k machine=a29k ;;
alpha*) base_machine=alpha machine=alpha/$machine ;;
arm*) base_machine=arm machine=arm/arm32/$machine ;;
c3[012]) base_machine=cx0 machine=cx0/c30 ;;
c4[04]) base_machine=cx0 machine=cx0/c40 ;;
hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
@@ -475,11 +483,10 @@ sparcv8plus | sparcv8plusa | sparcv9)
base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
sparcv8plusb | sparcv9b)
base_machine=sparc machine=sparc/sparc32/sparcv9b ;;
sparc64 | ultrasparc)
sparc64)
base_machine=sparc machine=sparc/sparc64 ;;
sparc64b | ultrasparc3)
sparc64b)
base_machine=sparc machine=sparc/sparc64/sparcv9b ;;
thumb*) base_machine=thumb machine=arm/thumb/$machine ;;
*) base_machine=$machine ;;
esac
changequote([,])dnl
@@ -593,6 +600,14 @@ for d in $add_ons_pfx ''; do
done
done
done
if test -n "$d"; then
try="${d}sysdeps/generic"
test -n "$enable_debug_configure" &&
echo "$0 DEBUG: try $try" >&2
if test -d $srcdir/$try; then
sysnames="$sysnames $try"
fi
fi
done
IFS="$ac_save_ifs"
@@ -752,7 +767,7 @@ fi
# These programs are version sensitive.
AC_CHECK_TOOL_PREFIX
AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
[version \([egcygnustpi-]*[0-9.]*\)], [3.[2-9]* | 4.[0-9]* ],
[version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ],
critic_missing="$critic_missing gcc")
AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
[GNU Make[^0-9]*\([0-9][0-9.]*\)],
@@ -1260,13 +1275,17 @@ EOF
fi
AC_CACHE_CHECK(for libunwind-support in compiler,
libc_cv_cc_with_libunwind, [dnl
AC_TRY_LINK([#include <libunwind.h>], [
unw_context_t uc;
unw_cursor_t c;
unw_getcontext (&uc);
unw_init_local (&c, &uc)],
libc_cv_cc_with_libunwind=yes, libc_cv_cc_with_libunwind=no)])
libc_cv_cc_with_libunwind, [
cat > conftest.c <<EOF
int main (void) { return 0; }
EOF
if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
conftest.c -v 2>&1 >/dev/null | grep -q " -lunwind "; then
libc_cv_cc_with_libunwind=yes
else
libc_cv_cc_with_libunwind=no
fi
rm -f conftest*])
AC_SUBST(libc_cv_cc_with_libunwind)
if test $libc_cv_cc_with_libunwind = yes; then
AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)
@@ -1489,6 +1508,21 @@ if test $libc_cv_fno_unit_at_a_time = yes; then
fi
AC_SUBST(fno_unit_at_a_time)
AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
cat > conftest.c <<EOF
int foo;
main () { return 0;}
EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
-o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
then
libc_cv_ssp=yes
else
libc_cv_ssp=no
fi
rm -f conftest*])
AC_SUBST(libc_cv_ssp)
if test $elf != yes; then
AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
[AC_TRY_COMPILE(, [asm (".section .init");
@@ -1617,39 +1651,10 @@ elif test $libc_cv_asm_weakext_directive = yes; then
AC_DEFINE(HAVE_ASM_WEAKEXT_DIRECTIVE)
fi
dnl The standard hppa assembler uses `;' to start comments and `!'
dnl as a line separator. CRIS uses `;' to start comments and `@' for
dnl line separator.
case "${host_cpu}-${host_os}" in
cris*)
libc_cv_asm_line_sep='@'
AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
;;
hppa*linux*)
AC_CACHE_CHECK(for assembler line separator,
libc_cv_asm_line_sep, [dnl
cat > conftest.s <<EOF
nop ; is_old_puffin
EOF
if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_asm_line_sep='!'
else
if test -z "$enable_hacker_mode"; then
echo "*** You need a newer assembler to compile glibc"
rm -f conftest*
exit 1
fi
libc_cv_asm_line_sep=';'
fi
rm -f conftest*])
AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
;;
esac
AC_CACHE_CHECK(whether CFI directives are supported, libc_cv_asm_cfi_directives, [dnl
cat > conftest.s <<EOF
.text
.type func,@function
.type func,%function
func:
.cfi_startproc
.cfi_remember_state
@@ -1666,39 +1671,6 @@ if test $libc_cv_asm_cfi_directives = yes; then
AC_DEFINE(HAVE_ASM_CFI_DIRECTIVES)
fi
AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
libc_cv_cpp_asm_debuginfo, [dnl
cat > conftest.S <<EOF
#include "confdefs.h"
/* comment on
two lines */
${libc_cv_dot_text}
${libc_cv_asm_global_directive} foo
foo:
/* Unfortunately this test only works for a real instruction,
not for any of the machine-independent pseudo-ops.
So we just have to assume everybody has a "nop". */
nop
/* comment */
nop
/* comment */
nop
EOF
if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
ac_pattern='conftest\.S'
AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
}; then
libc_cv_cpp_asm_debuginfo=yes
else
libc_cv_cpp_asm_debuginfo=no
fi
rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
if test $libc_cv_cpp_asm_debuginfo = yes; then
AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
fi
AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl
cat > conftest.c <<\EOF
_start () {}
@@ -1990,6 +1962,14 @@ fi
# Check if we're building with SELinux support.
if test "x$have_selinux" = xyes; then
AC_DEFINE(HAVE_SELINUX,1,[SELinux support])
# See if we have the libaudit library
AC_CHECK_LIB(audit, audit_log_avc,
have_libaudit=yes, have_libaudit=no)
if test "x$have_libaudit" = xyes; then
AC_DEFINE(HAVE_LIBAUDIT,1,[SELinux libaudit support])
fi
AC_SUBST(have_libaudit)
fi
AC_SUBST(have_selinux)
@@ -2174,12 +2154,6 @@ AC_SUBST(nopic_initfini)
AC_SUBST(DEFINES)
case "$add_ons" in
*door*) linux_doors=yes ;;
*) linux_doors=no ;;
esac
AC_SUBST(linux_doors)
dnl See sysdeps/mach/configure.in for this variable.
AC_SUBST(mach_interface_list)
+1 -1
View File
@@ -902,7 +902,7 @@ __setkey_r(__key, __data)
c = c << 1 | *__key++;
ktab[i] = c >> 1;
}
_ufc_mk_keytab_r(ktab, __data);
_ufc_mk_keytab_r((char *) ktab, __data);
}
weak_alias (__setkey_r, setkey_r)
+3 -2
View File
@@ -1,6 +1,7 @@
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc.
Copyright (C) 1995,1996,1997,1999,2000,2001,2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +32,7 @@
# include <string.h>
#else
# ifndef HAVE_MEMCPY
# define memcpy(d, s, n) bcopy ((s), (d), (n))
# define memcpy(d, s, n) (bcopy ((s), (d), (n)), (d))
# endif
#endif
+4 -2
View File
@@ -1,5 +1,5 @@
# Makefile for csu code for GNU C library.
# Copyright (C) 1995-2003, 2004 Free Software Foundation, Inc.
# Copyright (C) 1995-2004, 2005 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -54,11 +54,13 @@ include ../Makeconfig
ifeq (yes,$(build-shared))
extra-objs += S$(start-installed-name)
install-lib += S$(start-installed-name)
generated += start.os
endif
ifeq (yes,$(build-bounded))
extra-objs += b$(start-installed-name)
install-lib += b$(start-installed-name)
generated += start.ob
endif
ifneq ($(start-installed-name),$(static-start-installed-name))
@@ -239,7 +241,7 @@ $(objpfx)version-info.h: $(common-objpfx)config.make $(all-Banner-files)
esac; \
files="$(all-Banner-files)"; \
if test -n "$$files"; then \
echo "\"Available extensions:\\n\""; \
printf '"Available extensions:\\n"\n'; \
sed -e '/^#/d' -e 's/^[[:space:]]*/ /' \
-e 's/^\(.*\)$$/\"\1\\n\"/' $$files; \
fi) > $@T
+37 -10
View File
@@ -1,5 +1,5 @@
/* Startup support for ELF initializers/finalizers in the main executable.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,12 +38,34 @@
#ifdef HAVE_INITFINI_ARRAY
/* These magic symbols are provided by the linker. */
extern void (*__preinit_array_start []) (void) attribute_hidden;
extern void (*__preinit_array_end []) (void) attribute_hidden;
extern void (*__init_array_start []) (void) attribute_hidden;
extern void (*__init_array_end []) (void) attribute_hidden;
extern void (*__preinit_array_start []) (int, char **, char **)
attribute_hidden;
extern void (*__preinit_array_end []) (int, char **, char **)
attribute_hidden;
extern void (*__init_array_start []) (int, char **, char **)
attribute_hidden;
extern void (*__init_array_end []) (int, char **, char **)
attribute_hidden;
extern void (*__fini_array_start []) (void) attribute_hidden;
extern void (*__fini_array_end []) (void) attribute_hidden;
# if defined HAVE_VISIBILITY_ATTRIBUTE \
&& (defined SHARED || defined LIBC_NONSHARED)
# define hidden_undef_2(x) #x
# define hidden_undef_1(x) hidden_undef_2 (x)
# define hidden_undef(x) \
__asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \
__asm (".hidden " #x);
# else
# define hidden_undef(x)
# endif
hidden_undef (__preinit_array_start)
hidden_undef (__preinit_array_end)
hidden_undef (__init_array_start)
hidden_undef (__init_array_end)
hidden_undef (__fini_array_start)
hidden_undef (__fini_array_end)
#endif
/* These function symbols are provided for the .init/.fini section entry
@@ -57,7 +79,7 @@ extern void _fini (void);
the libc.a module in that it doesn't call the preinit array. */
void
__libc_csu_init (void)
__libc_csu_init (int argc, char **argv, char **envp)
{
#ifdef HAVE_INITFINI_ARRAY
/* For dynamically linked executables the preinit array is executed by
@@ -69,7 +91,7 @@ __libc_csu_init (void)
const size_t size = __preinit_array_end - __preinit_array_start;
size_t i;
for (i = 0; i < size; i++)
(*__preinit_array_start [i]) ();
(*__preinit_array_start [i]) (argc, argv, envp);
}
# endif
#endif
@@ -81,19 +103,24 @@ __libc_csu_init (void)
const size_t size = __init_array_end - __init_array_start;
size_t i;
for (i = 0; i < size; i++)
(*__init_array_start [i]) ();
(*__init_array_start [i]) (argc, argv, envp);
}
#endif
}
/* This function should not be used anymore. We run the executable's
destructor now just like any other. We cannot remove the function,
though. */
void
__libc_csu_fini (void)
{
#ifdef HAVE_INITFINI_ARRAY
#ifndef LIBC_NONSHARED
# ifdef HAVE_INITFINI_ARRAY
size_t i = __fini_array_end - __fini_array_start;
while (i-- > 0)
(*__fini_array_start [i]) ();
#endif
# endif
_fini ();
#endif
}
+1 -1
View File
@@ -25,7 +25,7 @@ static const char __libc_version[] = VERSION;
static const char banner[] =
"GNU C Library "RELEASE" release version "VERSION", by Roland McGrath et al.\n\
Copyright (C) 2004 Free Software Foundation, Inc.\n\
Copyright (C) 2005 Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
PARTICULAR PURPOSE.\n\
+3 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
/* Copyright (C) 1991,1997,1999,2000,2002,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,9 +20,9 @@
#include <ctype.h>
#define __ctype_tolower \
((uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128)
((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128)
#define __ctype_toupper \
((uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128)
((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128)
/* Real function versions of the non-ANSI ctype functions. isblank is
now in ISO C99 but we leave it here. */
+1
View File
@@ -0,0 +1 @@
localedata
+55 -4
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
# Copyright (C) 1998,1999,2000,2001,2004,2005 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -24,11 +24,61 @@ subdir := debug
headers := execinfo.h
distribute = sigcontextinfo.h register-dump.h frame.h
routines := backtrace backtracesyms backtracesymsfd noophooks
routines = backtrace backtracesyms backtracesymsfd noophooks \
memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \
strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \
sprintf_chk vsprintf_chk snprintf_chk vsnprintf_chk \
printf_chk fprintf_chk vprintf_chk vfprintf_chk \
gets_chk chk_fail readonly-area fgets_chk fgets_u_chk \
read_chk pread_chk pread64_chk recv_chk recvfrom_chk \
readlink_chk getwd_chk getcwd_chk realpath_chk ptsname_r_chk \
wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk \
wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk \
wcpncpy_chk \
swprintf_chk vswprintf_chk wprintf_chk fwprintf_chk \
vwprintf_chk vfwprintf_chk fgetws_chk fgetws_u_chk \
confstr_chk getgroups_chk ttyname_r_chk getlogin_r_chk \
gethostname_chk getdomainname_chk wcrtomb_chk mbsnrtowcs_chk \
wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk \
stack_chk_fail \
$(static-only-routines)
static-only-routines := warning-nop stack_chk_fail_local
CFLAGS-backtrace.c = -fno-omit-frame-pointer
CFLAGS-sprintf_chk.c = -D_IO_MTSAFE_IO
CFLAGS-snprintf_chk.c = -D_IO_MTSAFE_IO
CFLAGS-vsprintf_chk.c = -D_IO_MTSAFE_IO
CFLAGS-vsnprintf_chk.c = -D_IO_MTSAFE_IO
CFLAGS-printf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-fprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-vprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-vfprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-gets_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-fgets_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-fgets_u_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-swprintf_chk.c = -D_IO_MTSAFE_IO
CFLAGS-vswprintf_chk.c = -D_IO_MTSAFE_IO
CFLAGS-wprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-fwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-vwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-vfwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-fgetws_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-fgetws_u_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-read_chk.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-pread_chk.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-pread64_chk.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-recv_chk.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-recvfrom_chk.c = -fexceptions -fasynchronous-unwind-tables
tests = backtrace-tst
tst-chk1-ENV = LOCPATH=$(common-objpfx)localedata
tst-chk2-ENV = LOCPATH=$(common-objpfx)localedata
tst-chk3-ENV = LOCPATH=$(common-objpfx)localedata
tst-lfschk1-ENV = LOCPATH=$(common-objpfx)localedata
tst-lfschk2-ENV = LOCPATH=$(common-objpfx)localedata
tst-lfschk3-ENV = LOCPATH=$(common-objpfx)localedata
tests = backtrace-tst tst-chk1 tst-chk2 tst-chk3 \
tst-lfschk1 tst-lfschk2 tst-lfschk3 test-strcpy_chk test-stpcpy_chk
extra-libs = libSegFault libpcprofile
extra-libs-others = $(extra-libs)
@@ -57,7 +107,8 @@ include ../Rules
$(objpfx)catchsegv: catchsegv.sh $(common-objpfx)soversions.mk \
$(common-objpfx)config.make
sed -e 's|@VERSION@|$(version)|' -e 's|@SLIB@|$(slibdir)|' $< > $@.new
slibpfx=`echo $(slibdir)|sed 's/lib\(64\|\)$$/\\\\\\\\$$LIB/'`; \
sed -e 's|@VERSION@|$(version)|' -e "s|@SLIB@|$$slibpfx|" $< > $@.new
chmod 555 $@.new
mv -f $@.new $@
+25
View File
@@ -10,4 +10,29 @@ libc {
# These are to support some gcc features.
__cyg_profile_func_enter; __cyg_profile_func_exit;
}
GLIBC_2.3.4 {
__chk_fail;
__memcpy_chk; __memmove_chk; __mempcpy_chk; __memset_chk; __stpcpy_chk;
__strcat_chk; __strcpy_chk; __strncat_chk; __strncpy_chk;
__sprintf_chk; __vsprintf_chk; __snprintf_chk; __vsnprintf_chk;
__printf_chk; __fprintf_chk; __vprintf_chk; __vfprintf_chk;
__gets_chk;
}
GLIBC_2.4 {
__fgets_chk; __fgets_unlocked_chk;
__read_chk; __pread_chk; __pread64_chk;
__readlink_chk; __getcwd_chk; __getwd_chk;
__recv_chk; __recvfrom_chk;
__realpath_chk; __ptsname_r_chk; __wctomb_chk;
__stpncpy_chk;
__wcscpy_chk; __wmemcpy_chk; __wmemmove_chk; __wmempcpy_chk; __wcpcpy_chk;
__wcsncpy_chk; __wcscat_chk; __wcsncat_chk; __wmemset_chk; __wcpncpy_chk;
__swprintf_chk; __vswprintf_chk; __wprintf_chk; __fwprintf_chk;
__vwprintf_chk; __vfwprintf_chk; __fgetws_chk; __fgetws_unlocked_chk;
__confstr_chk; __getgroups_chk; __ttyname_r_chk; __getlogin_r_chk;
__gethostname_chk; __getdomainname_chk; __wcrtomb_chk; __mbsnrtowcs_chk;
__wcsnrtombs_chk; __mbsrtowcs_chk; __wcsrtombs_chk;
__stack_chk_fail;
}
}
+5 -7
View File
@@ -1,5 +1,5 @@
#! /bin/sh
# Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
# Copyright (C) 1998, 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -39,7 +39,7 @@ if test $# -eq 0; then
;;
--v | --ve | --ver | --vers | --versi | --versio | --version)
echo 'catchsegv (GNU libc) @VERSION@'
echo 'Copyright (C) 2003 Free Software Foundation, Inc.
echo 'Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.'
@@ -50,9 +50,7 @@ Written by Ulrich Drepper.'
esac
fi
segv_output=`basename "$prog"`.segv.$$
# Make sure this output file does not exist.
rm -f "$segv_output"
segv_output=`mktemp ${TMPDIR:-/tmp}/segv_output.XXXXXX` || exit
# Redirect stderr to avoid termination message from shell.
(exec 3>&2 2>/dev/null
@@ -65,7 +63,7 @@ exval=$?
# Check for output. Even if the program terminated correctly it might
# be that a minor process (clone) failed. Therefore we do not check the
# exit code.
if test -f "$segv_output"; then
if test -s "$segv_output"; then
# The program caught a signal. The output is in the file with the
# name we have in SEGFAULT_OUTPUT_NAME. In the output the names of
# functions in shared objects are available, but names in the static
@@ -102,7 +100,7 @@ if test -f "$segv_output"; then
;;
esac
done)
rm -f "$segv_output"
fi
rm -f "$segv_output"
exit $exval
@@ -1,6 +1,5 @@
/* Copyright (C) 2002 Free Software Foundation, Inc.
/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,17 +16,19 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <pthread.h>
#include <stdio.h>
#include <libio.h>
#include <bits/stdio-lock.h>
#include <stdlib.h>
extern char **__libc_argv attribute_hidden;
void
__flockfile (stream)
FILE *stream;
__attribute__ ((noreturn))
__chk_fail (void)
{
_IO_lock_lock (*stream->_lock);
/* The loop is added only to keep gcc happy. */
while (1)
__libc_message (2, "*** buffer overflow detected ***: %s terminated\n",
__libc_argv[0] ?: "<unknown>");
}
strong_alias (__flockfile, _IO_flockfile)
weak_alias (__flockfile, flockfile)
libc_hidden_def (__chk_fail)
@@ -1,5 +1,6 @@
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@readhat.com>, 20055.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -18,13 +19,12 @@
#include <unistd.h>
#define ACC_INVOKER 0x01
extern int accessx (const char *name, int type, int who);
int
__access (const char *name, int type)
size_t
__confstr_chk (int name, char *buf, size_t len, size_t buflen)
{
return accessx (name, type, ACC_INVOKER);
if (__builtin_expect (buflen < len, 0))
__chk_fail ();
return confstr (name, buf, len);
}
strong_alias (__access, access)
+1 -1
View File
@@ -25,7 +25,7 @@ __BEGIN_DECLS
/* Store up to SIZE return address of the current program state in
ARRAY and return the exact number of values stored. */
extern int backtrace (void **__array, int __size) __THROW __nonnull ((1));
extern int backtrace (void **__array, int __size) __nonnull ((1));
/* Return names of functions from the backtrace list in ARRAY in a newly
+67
View File
@@ -0,0 +1,67 @@
/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
As a special exception, if you link the code in this file with
files compiled with a GNU compiler to produce an executable,
that does not cause the resulting executable to be covered by
the GNU Lesser General Public License. This exception does not
however invalidate any other reasons why the executable file
might be covered by the GNU Lesser General Public License.
This exception applies to code released by its copyright holders
in files containing the exception. */
#include "libioP.h"
#include <stdio.h>
#include <sys/param.h>
char *
__fgets_chk (buf, size, n, fp)
char *buf;
size_t size;
int n;
_IO_FILE *fp;
{
_IO_size_t count;
char *result;
CHECK_FILE (fp, NULL);
if (n <= 0)
return NULL;
_IO_acquire_lock (fp);
/* This is very tricky since a file descriptor may be in the
non-blocking mode. The error flag doesn't mean much in this
case. We return an error only when there is a new error. */
int old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
count = INTUSE(_IO_getline) (fp, buf, MIN ((size_t) n - 1, size), '\n', 1);
/* If we read in some bytes and errno is EAGAIN, that error will
be reported for next read. */
if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
&& errno != EAGAIN))
result = NULL;
else if (count >= size)
__chk_fail ();
else
{
buf[count] = '\0';
result = buf;
}
fp->_IO_file_flags |= old_error;
_IO_release_lock (fp);
return result;
}
+65
View File
@@ -0,0 +1,65 @@
/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
As a special exception, if you link the code in this file with
files compiled with a GNU compiler to produce an executable,
that does not cause the resulting executable to be covered by
the GNU Lesser General Public License. This exception does not
however invalidate any other reasons why the executable file
might be covered by the GNU Lesser General Public License.
This exception applies to code released by its copyright holders
in files containing the exception. */
#include "libioP.h"
#include <stdio.h>
#include <sys/param.h>
char *
__fgets_unlocked_chk (buf, size, n, fp)
char *buf;
size_t size;
int n;
_IO_FILE *fp;
{
_IO_size_t count;
char *result;
CHECK_FILE (fp, NULL);
if (n <= 0)
return NULL;
/* This is very tricky since a file descriptor may be in the
non-blocking mode. The error flag doesn't mean much in this
case. We return an error only when there is a new error. */
int old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
count = INTUSE(_IO_getline) (fp, buf, MIN ((size_t) n - 1, size), '\n', 1);
/* If we read in some bytes and errno is EAGAIN, that error will
be reported for next read. */
if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
&& errno != EAGAIN))
result = NULL;
else if (count >= size)
__chk_fail ();
else
{
buf[count] = '\0';
result = buf;
}
fp->_IO_file_flags |= old_error;
return result;
}
+54
View File
@@ -0,0 +1,54 @@
/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2001, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include "libioP.h"
#include <wchar.h>
#include <sys/param.h>
wchar_t *
__fgetws_chk (wchar_t *buf, size_t size, int n, _IO_FILE *fp)
{
_IO_size_t count;
wchar_t *result;
int old_error;
CHECK_FILE (fp, NULL);
if (n <= 0)
return NULL;
_IO_acquire_lock (fp);
/* This is very tricky since a file descriptor may be in the
non-blocking mode. The error flag doesn't mean much in this
case. We return an error only when there is a new error. */
old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
count = _IO_getwline (fp, buf, MIN ((size_t) n - 1, size), L'\n', 1);
/* If we read in some bytes and errno is EAGAIN, that error will
be reported for next read. */
if (count == 0 || (_IO_ferror_unlocked (fp) && errno != EAGAIN))
result = NULL;
else if (count >= size)
__chk_fail ();
else
{
buf[count] = '\0';
result = buf;
}
fp->_IO_file_flags |= old_error;
_IO_release_lock (fp);
return result;
}
+61
View File
@@ -0,0 +1,61 @@
/* Copyright (C) 1993, 95, 96, 97, 98, 99, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
As a special exception, if you link the code in this file with
files compiled with a GNU compiler to produce an executable,
that does not cause the resulting executable to be covered by
the GNU Lesser General Public License. This exception does not
however invalidate any other reasons why the executable file
might be covered by the GNU Lesser General Public License.
This exception applies to code released by its copyright holders
in files containing the exception. */
#include "libioP.h"
#include <wchar.h>
#include <sys/param.h>
wchar_t *
__fgetws_unlocked_chk (wchar_t *buf, size_t size, int n, _IO_FILE *fp)
{
_IO_size_t count;
wchar_t *result;
int old_error;
CHECK_FILE (fp, NULL);
if (n <= 0)
return NULL;
/* This is very tricky since a file descriptor may be in the
non-blocking mode. The error flag doesn't mean much in this
case. We return an error only when there is a new error. */
old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
count = _IO_getwline (fp, buf, MIN ((size_t) n - 1, size), L'\n', 1);
/* If we read in some bytes and errno is EAGAIN, that error will
be reported for next read. */
if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
&& errno != EAGAIN))
result = NULL;
else if (count >= size)
__chk_fail ();
else
{
buf[count] = '\0';
result = buf;
}
fp->_IO_file_flags |= old_error;
return result;
}
+45
View File
@@ -0,0 +1,45 @@
/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <stdarg.h>
#include <stdio.h>
#include "../libio/libioP.h"
/* Write formatted output to FP from the format string FORMAT. */
int
__fprintf_chk (FILE *fp, int flag, const char *format, ...)
{
va_list ap;
int done;
_IO_acquire_lock (fp);
if (flag > 0)
fp->_flags2 |= _IO_FLAGS2_FORTIFY;
va_start (ap, format);
done = vfprintf (fp, format, ap);
va_end (ap);
if (flag > 0)
fp->_flags2 &= ~_IO_FLAGS2_FORTIFY;
_IO_release_lock (fp);
return done;
}
+45
View File
@@ -0,0 +1,45 @@
/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <stdarg.h>
#include <wchar.h>
#include "../libio/libioP.h"
/* Write formatted output to FP from the format string FORMAT. */
int
__fwprintf_chk (FILE *fp, int flag, const wchar_t *format, ...)
{
va_list ap;
int done;
_IO_acquire_lock (fp);
if (flag > 0)
fp->_flags2 |= _IO_FLAGS2_FORTIFY;
va_start (ap, format);
done = _IO_vfwprintf (fp, format, ap);
va_end (ap);
if (flag > 0)
fp->_flags2 &= ~_IO_FLAGS2_FORTIFY;
_IO_release_lock (fp);
return done;
}
@@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,14 +16,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
#include <sys/param.h>
#undef __fork
pid_t
__fork (void)
char *
__getcwd_chk (char *buf, size_t size, size_t buflen)
{
return kfork ();
if (size > buflen)
__chk_fail ();
return __getcwd (buf, size);
}
libc_hidden_def (__fork)
strong_alias (__fork, fork)
@@ -1,4 +1,4 @@
/* Copyright (C) 2004 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,12 +16,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <pthread.h>
#include <unistd.h>
int
pthread_seteuid_np (uid_t uid)
__getdomainname_chk (char *buf, size_t buflen, size_t nreal)
{
return seteuid (uid);
if (buflen > nreal)
__chk_fail ();
return getdomainname (buf, buflen);
}
@@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +16,15 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
extern int kftruncate (int fd, long long int length);
int
__ftruncate64 (int fd, off64_t length)
__getgroups_chk (int size, __gid_t list[], size_t listlen)
{
return kftruncate (fd, length);
if (__builtin_expect (size * sizeof (__gid_t) > listlen, 0))
__chk_fail ();
return __getgroups (size, list);
}
weak_alias (__ftruncate64, ftruncate64)
@@ -1,4 +1,4 @@
/* Copyright (C) 2004 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,12 +16,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <pthread.h>
#include <unistd.h>
int
pthread_setregid_np (gid_t rgid, gid_t egid)
__gethostname_chk (char *buf, size_t buflen, size_t nreal)
{
return setregid (rgid, egid);
if (buflen > nreal)
__chk_fail ();
return __gethostname (buf, buflen);
}
@@ -1,4 +1,4 @@
/* Copyright (C) 2004 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,12 +16,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <pthread.h>
#include <unistd.h>
int
pthread_setgid_np (gid_t gid)
__getlogin_r_chk (char *buf, size_t buflen, size_t nreal)
{
return setgid (gid);
if (buflen > nreal)
__chk_fail ();
return getlogin_r (buf, buflen);
}
+77
View File
@@ -0,0 +1,77 @@
/* Copyright (C) 1993, 1996, 1997, 1998, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
As a special exception, if you link the code in this file with
files compiled with a GNU compiler to produce an executable,
that does not cause the resulting executable to be covered by
the GNU Lesser General Public License. This exception does not
however invalidate any other reasons why the executable file
might be covered by the GNU Lesser General Public License.
This exception applies to code released by its copyright holders
in files containing the exception. */
#include "../libio/libioP.h"
#include <limits.h>
char *
__gets_chk (char *buf, size_t size)
{
_IO_size_t count;
int ch;
char *retval;
if (size == 0)
__chk_fail ();
_IO_acquire_lock (_IO_stdin);
ch = _IO_getc_unlocked (_IO_stdin);
if (ch == EOF)
{
retval = NULL;
goto unlock_return;
}
if (ch == '\n')
count = 0;
else
{
/* This is very tricky since a file descriptor may be in the
non-blocking mode. The error flag doesn't mean much in this
case. We return an error only when there is a new error. */
int old_error = _IO_stdin->_IO_file_flags & _IO_ERR_SEEN;
_IO_stdin->_IO_file_flags &= ~_IO_ERR_SEEN;
buf[0] = (char) ch;
count = INTUSE(_IO_getline) (_IO_stdin, buf + 1, size - 1, '\n', 0) + 1;
if (_IO_stdin->_IO_file_flags & _IO_ERR_SEEN)
{
retval = NULL;
goto unlock_return;
}
else
_IO_stdin->_IO_file_flags |= old_error;
}
if (count >= size)
__chk_fail ();
buf[count] = 0;
retval = buf;
unlock_return:
_IO_release_lock (_IO_stdin);
return retval;
}
link_warning (__gets_chk, "the `gets' function is dangerous and should not be used.")
@@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,16 +16,19 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
#include <sys/param.h>
#define _FSYNC 0x00000010
#define FFILESYNC _FSYNC
extern int kfsync_range (int fd, int how, long long int off,
long long int len);
int
fsync (int fd)
char *
__getwd_chk (char *buf, size_t buflen)
{
return kfsync_range (fd, FFILESYNC, 0, 0);
char *res = __getcwd (buf, buflen);
if (res == NULL && errno == ERANGE)
__chk_fail ();
return res;
}
link_warning (getwd,
"the `getwd' function is dangerous and should not be used.")
@@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,17 +16,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sysdep.h>
#include <locale.h>
#include <wchar.h>
/* errno has to be defined somewhere, and it might as well be here. */
int errno = 0;
/* The same goes for these magic signal functions. This is a standalone
environment so we do nothing. */
void _sig_dfl(int sig)
size_t
__mbsnrtowcs_chk (wchar_t *dst, __const char **src, size_t nmc, size_t len,
mbstate_t *ps, size_t dstlen)
{
}
if (__builtin_expect (dstlen < len * sizeof (wchar_t), 0))
__chk_fail ();
void _sig_ign(int sig)
{
return __mbsnrtowcs (dst, src, nmc, len, ps);
}
@@ -1,7 +1,5 @@
/* Get floating-point exceptions.
Copyright (C) 2001 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -18,15 +16,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
#include <locale.h>
#include <wchar.h>
int
fegetexcept (void)
size_t
__mbsrtowcs_chk (wchar_t *dst, __const char **src, size_t len,
mbstate_t *ps, size_t dstlen)
{
unsigned long temp;
if (__builtin_expect (dstlen < len * sizeof (wchar_t), 0))
__chk_fail ();
_FPU_GETCW (temp);
return (temp >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
return __mbsrtowcs (dst, src, len, ps);
}
@@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,12 +17,14 @@
02111-1307 USA. */
#include <unistd.h>
#include <sys/param.h>
extern int kpread (int fd, void *buf, size_t len, long long int off);
ssize_t
__pread64 (int fd, void *buf, size_t len, off64_t off)
__pread64_chk (int fd, void *buf, size_t nbytes, off64_t offset, size_t buflen)
{
return kpread (fd, buf, len, off);
if (nbytes > buflen)
__chk_fail ();
return __libc_pread64 (fd, buf, nbytes, offset);
}
weak_alias (__pread64, pread64)
@@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,12 +17,14 @@
02111-1307 USA. */
#include <unistd.h>
#include <sys/param.h>
extern int kpread (int fd, void *buf, size_t len, long long int off);
ssize_t
__pread (int fd, void *buf, size_t len, off_t off)
__pread_chk (int fd, void *buf, size_t nbytes, off_t offset, size_t buflen)
{
return kpread (fd, buf, len, off);
if (nbytes > buflen)
__chk_fail ();
return __pread (fd, buf, nbytes, offset);
}
weak_alias (__pread, pread)
+45
View File
@@ -0,0 +1,45 @@
/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <stdarg.h>
#include <stdio.h>
#include "../libio/libioP.h"
/* Write formatted output to stdout from the format string FORMAT. */
int
__printf_chk (int flag, const char *format, ...)
{
va_list ap;
int done;
_IO_acquire_lock (stdout);
if (flag > 0)
stdout->_flags2 |= _IO_FLAGS2_FORTIFY;
va_start (ap, format);
done = vfprintf (stdout, format, ap);
va_end (ap);
if (flag > 0)
stdout->_flags2 &= ~_IO_FLAGS2_FORTIFY;
_IO_release_lock (stdout);
return done;
}
@@ -1,5 +1,4 @@
/*
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,14 +16,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <dlfcn.h>
#include <stdlib.h>
#include <ldsodefs.h>
int
internal_function
_dl_addr (const void *address, Dl_info *info)
__ptsname_r_chk (int fd, char *buf, size_t buflen, size_t nreal)
{
return 0;
}
if (buflen > nreal)
__chk_fail ();
return __ptsname_r (fd, buf, buflen);
}
@@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,15 +17,22 @@
02111-1307 USA. */
#include <unistd.h>
#include <sys/param.h>
#ifdef HAVE_INLINED_SYSCALLS
# include <errno.h>
# include <sysdep.h>
#endif
extern int kread (int fd, void *buf, size_t len);
ssize_t
__libc_read (int fd, void *buf, size_t len)
__read_chk (int fd, void *buf, size_t nbytes, size_t buflen)
{
return kread (fd, buf, len);
if (nbytes > buflen)
__chk_fail ();
#ifdef HAVE_INLINED_SYSCALLS
return INLINE_SYSCALL (read, 3, fd, buf, nbytes);
#else
return __read (fd, buf, nbytes);
#endif
}
libc_hidden_def (__libc_read)
strong_alias (__libc_read, __read)
libc_hidden_def (__read)
strong_alias (__libc_read, read)
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1996, 2002, 2003 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,21 +16,23 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <signal.h>
#include <unistd.h>
#include <bits/libc-lock.h>
#ifndef SHARED
weak_extern (__pthread_raise)
#include <sys/param.h>
#ifdef HAVE_INLINED_SYSCALLS
# include <errno.h>
# include <sysdep.h>
#endif
/* Raise the signal SIG. */
int
raise (sig)
int sig;
ssize_t
__readlink_chk (const char *path, void *buf, size_t len, size_t buflen)
{
return __libc_maybe_call2 (pthread_raise, (sig),
__kill (__getpid (), sig));
if (len > buflen)
__chk_fail ();
#ifdef HAVE_INLINED_SYSCALLS
return INLINE_SYSCALL (readlink, 3, path, buf, len);
#else
return __readlink (path, buf, len);
#endif
}
libc_hidden_def (raise)
weak_alias (raise, gsignal)
@@ -1,4 +1,4 @@
/* Copyright (C) 2001 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,43 +16,45 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <stdarg.h>
#include <limits.h>
#include <stdlib.h>
#include <sys/types.h>
#include <errno.h>
#include <dlfcn.h>
#include <dlldr.h>
#include <string.h>
#include <unistd.h>
extern int _dl_numso;
extern DL_SODATA *_dl_sotable;
void *
_dl_sym (void *handle, const char *symbol, void *who)
char *
__realpath_chk (const char *buf, char *resolved, size_t resolvedlen)
{
void *rt_function;
#ifdef PATH_MAX
if (resolvedlen < PATH_MAX)
__chk_fail ();
if ((int) handle < 0 || (int) handle >= _dl_numso || _dl_sotable == NULL)
return __realpath (buf, resolved);
#else
long int pathmax =__pathconf (buf, _PC_PATH_MAX);
if (pathmax != -1)
{
errno = EINVAL;
return NULL;
/* We do have a fixed limit. */
if (resolvedlen < pathmax)
__chk_fail ();
return __realpath (buf, resolved);
}
switch (_dl_sotable[(int) handle].type)
/* Since there is no fixed limit we check whether the size is large
enough. */
char *res = __realpath (buf, NULL);
if (res != NULL)
{
case DL_UNIX_SYSCALL:
rt_function = (void *) __loadx (DL_UNIX_SYSCALL, (void *) symbol);
break;
size_t actlen = strlen (res) + 1;
if (actlen > resolvedlen)
__chk_fail ();
case DL_GETSYM:
rt_function = (void *) __loadx (DL_GETSYM, (void *) symbol,
_dl_sotable[(int) handle].index,
_dl_sotable[(int) handle].dataorg);
break;
default:
errno = EINVAL;
return NULL;
memcpy (resolved, res, actlen);
free (res);
res = resolved;
}
return rt_function;
return res;
#endif
}
@@ -1,4 +1,4 @@
/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +16,15 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/param.h>
#include <sys/socket.h>
extern ssize_t recv (int fd, void *buf, size_t n, int flags);
ssize_t
__recv (int fd, void *buf, size_t n, int flags)
__recv_chk (int fd, void *buf, size_t n, size_t buflen, int flags)
{
return recv (fd, buf, n, flags);
if (n > buflen)
__chk_fail ();
return __recv (fd, buf, n, flags);
}
@@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,14 +16,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/param.h>
#include <sys/socket.h>
extern ssize_t nrecvmsg (int s, struct msghdr *uap_msg, int flags);
ssize_t
__recvmsg (int fd, struct msghdr *message, int flags)
__recvfrom_chk (int fd, void *buf, size_t n, size_t buflen, int flags,
__SOCKADDR_ARG addr, socklen_t *addr_len)
{
return nrecvmsg (fd, message, flags);
}
if (n > buflen)
__chk_fail ();
weak_alias (__recvmsg, recvmsg)
return __recvfrom (fd, buf, n, flags, addr, addr_len);
}
@@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1995, 1997, 1998, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +17,22 @@
02111-1307 USA. */
#include <stdarg.h>
#include <sys/resource.h>
#include <stdio.h>
long int
__ulimit (int cmd, ...)
/* Write formatted output into S, according to the format
string FORMAT, writing no more than MAXLEN characters. */
/* VARARGS5 */
int
__snprintf_chk (char *s, size_t maxlen, int flags, size_t slen,
const char *format, ...)
{
va_list va;
long int arg;
long int res;
va_list arg;
int done;
va_start (va, cmd);
arg = va_arg (va, long int);
va_start (arg, format);
done = __vsnprintf_chk (s, maxlen, flags, slen, format, arg);
va_end (arg);
res = ulimit (cmd, arg);
va_end (va);
return res;
return done;
}
@@ -1,6 +1,5 @@
/* Copyright (C) 2002 Free Software Foundation, Inc.
/* Copyright (C) 1991,1995,1997,1998,2002,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,17 +16,20 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <errno.h>
#include <pthread.h>
#include <stdarg.h>
#include <stdio.h>
#include <bits/stdio-lock.h>
/* Write formatted output into S, according to the format string FORMAT. */
/* VARARGS4 */
int
__ftrylockfile (stream)
FILE *stream;
__sprintf_chk (char *s, int flags, size_t slen, const char *format, ...)
{
return _IO_lock_trylock (*stream->_lock);
va_list arg;
int done;
va_start (arg, format);
done = __vsprintf_chk (s, flags, slen, format, arg);
va_end (arg);
return done;
}
strong_alias (__ftrylockfile, _IO_ftrylockfile)
weak_alias (__ftrylockfile, ftrylockfile)
@@ -1,4 +1,4 @@
/* Copyright (C) 1999 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,14 +16,18 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <stdio.h>
#include <stdlib.h>
/* We define only thr alias introduced in ISO C99 because _exit itself
is a system call. */
extern char **__libc_argv attribute_hidden;
void
_Exit (status)
int status;
__attribute__ ((noreturn))
__stack_chk_fail (void)
{
_exit (status);
/* The loop is added only to keep gcc happy. */
while (1)
__libc_message (1, "*** stack smashing detected ***: %s terminated\n",
__libc_argv[0] ?: "<unknown>");
}
@@ -1,6 +1,4 @@
/* Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,14 +16,15 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _STANDALONE_H
#define _STANDALONE_H
#include <sys/cdefs.h>
extern void _Board_Initialize (void);
extern void __stack_chk_fail (void) __attribute__ ((noreturn));
extern int _Console_Putc (char c);
extern int _Console_Getc (int poll);
/* On some architectures, this helps needless PIC pointer setup
that would be needed just for the __stack_chk_fail call. */
#endif
void __attribute__ ((noreturn)) attribute_hidden
__stack_chk_fail_local (void)
{
__stack_chk_fail ();
}
@@ -1,4 +1,5 @@
/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
/* Copyright (C) 1991,1995,1997,1998,1999,2000,2003,2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,25 +17,21 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <fcntl.h>
#include <stdarg.h>
#include <unistd.h>
#include <wchar.h>
/* Write formatted output into S, according to the format string FORMAT. */
/* VARARGS5 */
int
__open (const char *file, int oflag, ...)
__swprintf_chk (wchar_t *s, size_t n, int flag, size_t s_len,
const wchar_t *format, ...)
{
int mode = 0;
va_list arg;
int done;
if (oflag & O_CREAT)
{
va_list arg;
va_start (arg, oflag);
mode = va_arg (arg, int);
va_end (arg);
}
va_start (arg, format);
done = __vswprintf_chk (s, n, flag, s_len, format, arg);
va_end (arg);
return open (file, oflag, mode);
return done;
}
libc_hidden_def (__open)
strong_alias (__open, __libc_open)
libc_hidden_def (__libc_open)
+46
View File
@@ -0,0 +1,46 @@
/* Test and measure stpcpy checking functions.
Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#define STRCPY_RESULT(dst, len) ((dst) + (len))
#define TEST_MAIN
#include "../string/test-string.h"
extern void __attribute__ ((noreturn)) __chk_fail (void);
char *simple_stpcpy_chk (char *, const char *, size_t);
extern char *normal_stpcpy (char *, const char *, size_t)
__asm ("stpcpy");
extern char *__stpcpy_chk (char *, const char *, size_t);
IMPL (simple_stpcpy_chk, 0)
IMPL (normal_stpcpy, 1)
IMPL (__stpcpy_chk, 2)
char *
simple_stpcpy_chk (char *dst, const char *src, size_t len)
{
if (! len)
__chk_fail ();
while ((*dst++ = *src++) != '\0')
if (--len == 0)
__chk_fail ();
return dst - 1;
}
#include "test-strcpy_chk.c"
+387
View File
@@ -0,0 +1,387 @@
/* Test and measure __strcpy_chk functions.
Copyright (C) 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef STRCPY_RESULT
# define STRCPY_RESULT(dst, len) dst
# define TEST_MAIN
# include "../string/test-string.h"
extern void __attribute__ ((noreturn)) __chk_fail (void);
char *simple_strcpy_chk (char *, const char *, size_t);
extern char *normal_strcpy (char *, const char *, size_t)
__asm ("strcpy");
extern char *__strcpy_chk (char *, const char *, size_t);
IMPL (simple_strcpy_chk, 0)
IMPL (normal_strcpy, 1)
IMPL (__strcpy_chk, 2)
char *
simple_strcpy_chk (char *dst, const char *src, size_t len)
{
char *ret = dst;
if (! len)
__chk_fail ();
while ((*dst++ = *src++) != '\0')
if (--len == 0)
__chk_fail ();
return ret;
}
#endif
#include <fcntl.h>
#include <paths.h>
#include <setjmp.h>
#include <signal.h>
volatile int chk_fail_ok;
jmp_buf chk_fail_buf;
static void
handler (int sig)
{
if (chk_fail_ok)
{
chk_fail_ok = 0;
longjmp (chk_fail_buf, 1);
}
else
_exit (127);
}
typedef char *(*proto_t) (char *, const char *, size_t);
static void
do_one_test (impl_t *impl, char *dst, const char *src,
size_t len, size_t dlen)
{
char *res;
if (dlen <= len)
{
if (impl->test == 1)
return;
chk_fail_ok = 1;
if (setjmp (chk_fail_buf) == 0)
{
res = CALL (impl, dst, src, dlen);
printf ("*** Function %s (%zd; %zd) did not __chk_fail\n",
impl->name, len, dlen);
chk_fail_ok = 0;
ret = 1;
}
return;
}
else
res = CALL (impl, dst, src, dlen);
if (res != STRCPY_RESULT (dst, len))
{
printf ("Wrong result in function %s %p %p\n", impl->name,
res, STRCPY_RESULT (dst, len));
ret = 1;
return;
}
if (strcmp (dst, src) != 0)
{
printf ("Wrong result in function %s dst \"%s\" src \"%s\"\n",
impl->name, dst, src);
ret = 1;
return;
}
if (HP_TIMING_AVAIL)
{
hp_timing_t start __attribute ((unused));
hp_timing_t stop __attribute ((unused));;
hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
{
HP_TIMING_NOW (start);
CALL (impl, dst, src, dlen);
HP_TIMING_NOW (stop);
HP_TIMING_BEST (best_time, start, stop);
}
printf ("\t%zd", (size_t) best_time);
}
}
static void
do_test (size_t align1, size_t align2, size_t len, size_t dlen, int max_char)
{
size_t i;
char *s1, *s2;
align1 &= 7;
if (align1 + len >= page_size)
return;
align2 &= 7;
if (align2 + len >= page_size)
return;
s1 = buf1 + align1;
s2 = buf2 + align2;
for (i = 0; i < len; i++)
s1[i] = 32 + 23 * i % (max_char - 32);
s1[len] = 0;
if (HP_TIMING_AVAIL && dlen > len)
printf ("Length %4zd, alignment %2zd/%2zd:", len, align1, align2);
FOR_EACH_IMPL (impl, 0)
do_one_test (impl, s2, s1, len, dlen);
if (HP_TIMING_AVAIL && dlen > len)
putchar ('\n');
}
static void
do_random_tests (void)
{
size_t i, j, n, align1, align2, len, dlen;
unsigned char *p1 = buf1 + page_size - 512;
unsigned char *p2 = buf2 + page_size - 512;
unsigned char *res;
for (n = 0; n < ITERATIONS; n++)
{
align1 = random () & 31;
if (random () & 1)
align2 = random () & 31;
else
align2 = align1 + (random () & 24);
len = random () & 511;
j = align1;
if (align2 > j)
j = align2;
if (len + j >= 511)
len = 510 - j - (random () & 7);
j = len + align1 + 64;
if (j > 512)
j = 512;
for (i = 0; i < j; i++)
{
if (i == len + align1)
p1[i] = 0;
else
{
p1[i] = random () & 255;
if (i >= align1 && i < len + align1 && !p1[i])
p1[i] = (random () & 127) + 3;
}
}
switch (random () & 7)
{
case 0:
dlen = len - (random () & 31);
if (dlen > len)
dlen = len;
break;
case 1:
dlen = (size_t) -1;
break;
case 2:
dlen = len + 1 + (random () & 65535);
break;
case 3:
dlen = len + 1 + (random () & 255);
break;
case 4:
dlen = len + 1 + (random () & 31);
break;
case 5:
dlen = len + 1 + (random () & 7);
break;
case 6:
dlen = len + 1 + (random () & 3);
break;
default:
dlen = len + 1;
break;
}
FOR_EACH_IMPL (impl, 1)
{
if (dlen <= len)
{
if (impl->test != 1)
{
chk_fail_ok = 1;
if (setjmp (chk_fail_buf) == 0)
{
res = CALL (impl, p2 + align2, p1 + align1, dlen);
printf ("Iteration %zd - did not __chk_fail\n", n);
chk_fail_ok = 0;
ret = 1;
}
}
continue;
}
memset (p2 - 64, '\1', 512 + 64);
res = CALL (impl, p2 + align2, p1 + align1, dlen);
if (res != STRCPY_RESULT (p2 + align2, len))
{
printf ("\
Iteration %zd - wrong result in function %s (%zd, %zd, %zd) %p != %p\n",
n, impl->name, align1, align2, len, res,
STRCPY_RESULT (p2 + align2, len));
ret = 1;
}
for (j = 0; j < align2 + 64; ++j)
{
if (p2[j - 64] != '\1')
{
printf ("\
Iteration %zd - garbage before, %s (%zd, %zd, %zd)\n",
n, impl->name, align1, align2, len);
ret = 1;
break;
}
}
for (j = align2 + len + 1; j < 512; ++j)
{
if (p2[j] != '\1')
{
printf ("\
Iteration %zd - garbage after, %s (%zd, %zd, %zd)\n",
n, impl->name, align1, align2, len);
ret = 1;
break;
}
}
if (memcmp (p1 + align1, p2 + align2, len + 1))
{
printf ("\
Iteration %zd - different strings, %s (%zd, %zd, %zd)\n",
n, impl->name, align1, align2, len);
ret = 1;
}
}
}
}
int
test_main (void)
{
size_t i;
struct sigaction sa;
sa.sa_handler = handler;
sa.sa_flags = 0;
sigemptyset (&sa.sa_mask);
sigaction (SIGABRT, &sa, NULL);
/* Avoid all the buffer overflow messages on stderr. */
int fd = open (_PATH_DEVNULL, O_WRONLY);
if (fd == -1)
close (STDERR_FILENO);
else
{
dup2 (fd, STDERR_FILENO);
close (fd);
}
setenv ("LIBC_FATAL_STDERR_", "1", 1);
test_init ();
printf ("%23s", "");
FOR_EACH_IMPL (impl, 0)
printf ("\t%s", impl->name);
putchar ('\n');
for (i = 0; i < 16; ++i)
{
do_test (0, 0, i, i + 1, 127);
do_test (0, 0, i, i + 1, 255);
do_test (0, i, i, i + 1, 127);
do_test (i, 0, i, i + 1, 255);
}
for (i = 1; i < 8; ++i)
{
do_test (0, 0, 8 << i, (8 << i) + 1, 127);
do_test (8 - i, 2 * i, (8 << i), (8 << i) + 1, 127);
}
for (i = 1; i < 8; ++i)
{
do_test (i, 2 * i, (8 << i), (8 << i) + 1, 127);
do_test (2 * i, i, (8 << i), (8 << i) + 1, 255);
do_test (i, i, (8 << i), (8 << i) + 1, 127);
do_test (i, i, (8 << i), (8 << i) + 1, 255);
}
for (i = 0; i < 16; ++i)
{
do_test (0, 0, i, i + 256, 127);
do_test (0, 0, i, i + 256, 255);
do_test (0, i, i, i + 256, 127);
do_test (i, 0, i, i + 256, 255);
}
for (i = 1; i < 8; ++i)
{
do_test (0, 0, 8 << i, (8 << i) + 256, 127);
do_test (8 - i, 2 * i, (8 << i), (8 << i) + 256, 127);
}
for (i = 1; i < 8; ++i)
{
do_test (i, 2 * i, (8 << i), (8 << i) + 256, 127);
do_test (2 * i, i, (8 << i), (8 << i) + 256, 255);
do_test (i, i, (8 << i), (8 << i) + 256, 127);
do_test (i, i, (8 << i), (8 << i) + 256, 255);
}
for (i = 0; i < 16; ++i)
{
do_test (0, 0, i, i, 127);
do_test (0, 0, i, i + 2, 255);
do_test (0, i, i, i + 3, 127);
do_test (i, 0, i, i + 4, 255);
}
for (i = 1; i < 8; ++i)
{
do_test (0, 0, 8 << i, (8 << i) - 15, 127);
do_test (8 - i, 2 * i, (8 << i), (8 << i) + 5, 127);
}
for (i = 1; i < 8; ++i)
{
do_test (i, 2 * i, (8 << i), (8 << i) + i, 127);
do_test (2 * i, i, (8 << i), (8 << i) + (i - 1), 255);
do_test (i, i, (8 << i), (8 << i) + i + 2, 127);
do_test (i, i, (8 << i), (8 << i) + i + 3, 255);
}
do_random_tests ();
return ret;
}
#include "../test-skeleton.c"
+1264
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -0,0 +1,2 @@
#define _FORTIFY_SOURCE 1
#include "tst-chk1.c"
+2
View File
@@ -0,0 +1,2 @@
#define _FORTIFY_SOURCE 2
#include "tst-chk1.c"
+2
View File
@@ -0,0 +1,2 @@
#define _FILE_OFFSET_BITS 64
#include "tst-chk1.c"
+2
View File
@@ -0,0 +1,2 @@
#define _FILE_OFFSET_BITS 64
#include "tst-chk2.c"
+2
View File
@@ -0,0 +1,2 @@
#define _FILE_OFFSET_BITS 64
#include "tst-chk3.c"
@@ -1,4 +1,4 @@
/* Copyright (C) 2004 Free Software Foundation, Inc.
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,12 +16,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <pthread.h>
#include <unistd.h>
int
pthread_setegid_np (gid_t gid)
__ttyname_r_chk (int fd, char *buf, size_t buflen, size_t nreal)
{
return setegid (gid);
if (buflen > nreal)
__chk_fail ();
return __ttyname_r (fd, buf, buflen);
}
@@ -1,4 +1,5 @@
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,27 +18,25 @@
02111-1307 USA. */
#include <stdarg.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include "../libio/libioP.h"
extern int kioctl (int fdes, int cmd, unsigned long int arg,
unsigned long int ext);
/* Write formatted output to FP from the format string FORMAT. */
int
__ioctl (int fdes, unsigned long int cmd, ...)
__vfprintf_chk (FILE *fp, int flag, const char *format, va_list ap)
{
va_list va;
int res;
unsigned long int arg;
unsigned long int ext;
int done;
va_start (va, cmd);
arg = va_arg (va, unsigned long int);
ext = va_arg (va, unsigned long int);
_IO_acquire_lock (fp);
if (flag > 0)
fp->_flags2 |= _IO_FLAGS2_FORTIFY;
res = kioctl (fdes, cmd, arg, ext);
done = vfprintf (fp, format, ap);
va_end (va);
if (flag > 0)
fp->_flags2 &= ~_IO_FLAGS2_FORTIFY;
_IO_release_lock (fp);
return res;
return done;
}
strong_alias (__ioctl, ioctl)
+42
View File
@@ -0,0 +1,42 @@
/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <stdarg.h>
#include <wchar.h>
#include "../libio/libioP.h"
/* Write formatted output to FP from the format string FORMAT. */
int
__vfwprintf_chk (FILE *fp, int flag, const wchar_t *format, va_list ap)
{
int done;
_IO_acquire_lock (fp);
if (flag > 0)
fp->_flags2 |= _IO_FLAGS2_FORTIFY;
done = _IO_vfwprintf (fp, format, ap);
if (flag > 0)
fp->_flags2 &= ~_IO_FLAGS2_FORTIFY;
_IO_release_lock (fp);
return done;
}
@@ -1,4 +1,5 @@
/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,28 +17,26 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include "../libio/libioP.h"
extern int kfcntl (int fdes, int cmd, unsigned long int arg);
/* Write formatted output to stdout from the format string FORMAT. */
int
__fcntl (int fdes, int cmd, ...)
__vprintf_chk (int flag, const char *format, va_list ap)
{
va_list va;
int res;
unsigned long int arg;
int done;
va_start (va, cmd);
arg = va_arg (va, unsigned long int);
_IO_acquire_lock (stdout);
if (flag > 0)
stdout->_flags2 |= _IO_FLAGS2_FORTIFY;
res = kfcntl (fdes, cmd, arg);
done = vfprintf (stdout, format, ap);
va_end (va);
if (flag > 0)
stdout->_flags2 &= ~_IO_FLAGS2_FORTIFY;
_IO_release_lock (stdout);
return res;
return done;
}
libc_hidden_def (__fcntl)
strong_alias (__fcntl, fcntl)
strong_alias (__fcntl, __libc_fcntl)
libc_hidden_def (__libc_fcntl)
+70
View File
@@ -0,0 +1,70 @@
/* Copyright (C) 1991, 1995, 1997, 1998, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <stdarg.h>
#include <stdio.h>
#include "../libio/libioP.h"
#include "../libio/strfile.h"
extern const struct _IO_jump_t _IO_strn_jumps attribute_hidden;
/* Write formatted output into S, according to the format
string FORMAT, writing no more than MAXLEN characters. */
/* VARARGS5 */
int
__vsnprintf_chk (char *s, size_t maxlen, int flags, size_t slen,
const char *format, va_list args)
{
/* XXX Maybe for less strict version do not fail immediately.
Though, maxlen is supposed to be the size of buffer pointed
to by s, so a conforming program can't pass such maxlen
to *snprintf. */
if (__builtin_expect (slen < maxlen, 0))
__chk_fail ();
_IO_strnfile sf;
int ret;
#ifdef _IO_MTSAFE_IO
sf.f._sbf._f._lock = NULL;
#endif
/* We need to handle the special case where MAXLEN is 0. Use the
overflow buffer right from the start. */
if (maxlen == 0)
{
s = sf.overflow_buf;
maxlen = sizeof (sf.overflow_buf);
}
_IO_no_init (&sf.f._sbf._f, _IO_USER_LOCK, -1, NULL, NULL);
_IO_JUMPS ((struct _IO_FILE_plus *) &sf.f._sbf) = &_IO_strn_jumps;
s[0] = '\0';
/* For flags > 0 (i.e. __USE_FORTIFY_LEVEL > 1) request that %n
can only come from read-only format strings. */
if (flags > 0)
sf.f._sbf._f._flags2 |= _IO_FLAGS2_FORTIFY;
_IO_str_init_static_internal (&sf.f, s, maxlen - 1, s);
ret = INTUSE(_IO_vfprintf) ((_IO_FILE *) &sf.f._sbf, format, args);
if (sf.f._sbf._f._IO_buf_base != sf.overflow_buf)
*sf.f._sbf._f._IO_write_ptr = '\0';
return ret;
}
libc_hidden_def (__vsnprintf_chk)
+91
View File
@@ -0,0 +1,91 @@
/* Copyright (C) 1994, 1997, 1999-2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <stdarg.h>
#include <stdio.h>
#include "../libio/libioP.h"
#include "../libio/strfile.h"
static int _IO_str_chk_overflow (_IO_FILE *fp, int c) __THROW;
static int
_IO_str_chk_overflow (fp, c)
_IO_FILE *fp;
int c;
{
/* When we come to here this means the user supplied buffer is
filled. */
__chk_fail ();
}
static const struct _IO_jump_t _IO_str_chk_jumps =
{
JUMP_INIT_DUMMY,
JUMP_INIT(finish, _IO_str_finish),
JUMP_INIT(overflow, _IO_str_chk_overflow),
JUMP_INIT(underflow, INTUSE(_IO_str_underflow)),
JUMP_INIT(uflow, INTUSE(_IO_default_uflow)),
JUMP_INIT(pbackfail, INTUSE(_IO_str_pbackfail)),
JUMP_INIT(xsputn, INTUSE(_IO_default_xsputn)),
JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)),
JUMP_INIT(seekoff, INTUSE(_IO_str_seekoff)),
JUMP_INIT(seekpos, _IO_default_seekpos),
JUMP_INIT(setbuf, _IO_default_setbuf),
JUMP_INIT(sync, _IO_default_sync),
JUMP_INIT(doallocate, INTUSE(_IO_default_doallocate)),
JUMP_INIT(read, _IO_default_read),
JUMP_INIT(write, _IO_default_write),
JUMP_INIT(seek, _IO_default_seek),
JUMP_INIT(close, _IO_default_close),
JUMP_INIT(stat, _IO_default_stat),
JUMP_INIT(showmanyc, _IO_default_showmanyc),
JUMP_INIT(imbue, _IO_default_imbue)
};
int
__vsprintf_chk (char *s, int flags, size_t slen, const char *format,
va_list args)
{
_IO_strfile f;
int ret;
#ifdef _IO_MTSAFE_IO
f._sbf._f._lock = NULL;
#endif
if (slen == 0)
__chk_fail ();
_IO_no_init (&f._sbf._f, _IO_USER_LOCK, -1, NULL, NULL);
_IO_JUMPS ((struct _IO_FILE_plus *) &f._sbf) = &_IO_str_chk_jumps;
s[0] = '\0';
_IO_str_init_static_internal (&f, s, slen - 1, s);
/* For flags > 0 (i.e. __USE_FORTIFY_LEVEL > 1) request that %n
can only come from read-only format strings. */
if (flags > 0)
f._sbf._f._flags2 |= _IO_FLAGS2_FORTIFY;
ret = INTUSE(_IO_vfprintf) ((_IO_FILE *) &f._sbf, format, args);
*f._sbf._f._IO_write_ptr = '\0';
return ret;
}
libc_hidden_def (__vsprintf_chk)

Some files were not shown because too many files have changed in this diff Show More