Commit Graph

4938 Commits

Author SHA1 Message Date
Ulrich Drepper 3defcff399 Update.
2004-11-17  Randolph Chung  <tausq@debian.org>

	* sysdeps/hppa/dl-machine.h (TRAMPOLINE_TEMPLATE): Add unwind
	annotations.
2004-11-19 00:01:34 +00:00
Ulrich Drepper 579e2d6ef1 Update.
2004-11-17  Alfred M. Szmidt  <ams@gnu.org>

	* sysdeps/posix/libc_fatal.c: Include <sys/uio.h>.
2004-11-17 09:10:08 +00:00
Ulrich Drepper f895670da2 Update.
2004-11-15  Jakub Jelinek  <jakub@redhat.com>

	* posix/bug-regex24.c: Include string.h.

	* nis/nis_clone_obj.c (nis_clone_object): Rename out3 label to out2
	and out2 to out.  Remove out label.  Formatting.

2004-11-15  Ulrich Drepper  <drepper@redhat.com>

	* include/stdio.h: Do not mark __libc_message as noreturn.
	* sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Add loop to
	fool gcc.  Include <stdbool.h>.
	* sysdeps/posix/libc_fatal.c (__libc_fatal): Add loop to fool gcc.
	(__libc_message): Fix typo.
2004-11-15 22:00:25 +00:00
Ulrich Drepper 37fa1953d5 Update.
* malloc/malloc.c (_int_free): Remove test for NULL parameter.
	(_int_realloc): Call _int_free only if memory parameter is not NULL.
2004-11-13 05:43:36 +00:00
Ulrich Drepper 1327439fc6 Add new function __libc_message which performs the printing and simple format string handling. The string is written to tty, stderr, syslog in this order, stopping after the first successful output. 2004-11-13 03:09:30 +00:00
Ulrich Drepper d5ef95c858 Update.
2004-11-12  Jakub Jelinek  <jakub@redhat.com>

	* 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 19:22:26 +00:00
Ulrich Drepper ccd8de9aa6 Update.
2004-11-10  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/setreuid.c: Remove sys/syscall.h,
	sys/types.h, linux/posix_types.h, sysdep.h and pthread-functions.h
	includes.  Include setxid.h.  Use INLINE_SETXID_SYSCALL macro
	instead of INLINE_SYSCALL, kill the HAVE_PTR__NPTL_SETXID guarded
	snippets.
	* sysdeps/unix/sysv/linux/setegid.c: Likewise.
	* sysdeps/unix/sysv/linux/setuid.c: Likewise.
	* sysdeps/unix/sysv/linux/seteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/setgid.c: Likewise.
	* sysdeps/unix/sysv/linux/setresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/setresgid.c: Likewise.
	* sysdeps/unix/sysv/linux/setregid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setegid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setgid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setregid.c: Likewise.
	* sysdeps/unix/sysv/linux/alpha/setreuid.c: Likewise.
	Formatting.  Change signed int into int.
	* sysdeps/unix/sysv/linux/alpha/setresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/alpha/setresgid.c: Likewise.
	* sysdeps/unix/sysv/linux/alpha/setregid.c: Likewise.
	* sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid):
	Remove.
	* sysdeps/unix/setxid.h: New file.

	* Rules (binaries-static): Add xtests-static.
	* Makeconfig (run-program-prefix): Filter also xtests-static.
2004-11-12 01:27:04 +00:00
Ulrich Drepper 85bd633137 Remove sys/syscall.h, sys/types.h, linux/posix_types.h, sysdep.h and pthread-functions.h includes. Include setxid.h. Use INLINE_SETXID_SYSCALL macro instead of INLINE_SYSCALL, kill the HAVE_PTR__NPTL_SETXID guarded snippets. 2004-11-12 01:15:06 +00:00
Roland McGrath 37b1a15401 [BZ #542]
2004-11-11  Simon Josefsson  <jas@extundo.com>
	[BZ #542]
	* sysdeps/generic/strtok_r.c [HAVE_CONFIG_H]: Include config.h.
	[!_LIBC]: Include strtok_r.h (in gnulib), map __strtok_r to
	strtok_r and __rawmemchr to strch.
	(__strtok_r): Use C89 prototype.
	[weak_alias]: Move calls to libc_hidden_def and weak_alias into
	this #ifdef.
2004-11-11 22:15:51 +00:00
Ulrich Drepper b4ae56bdc8 Update.
2004-11-09  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (calc_eclosure_iter): Don't access
	dfa->edests[node].elems[0] if dfa->edests[node].nelem == 0.
	* posix/rxspencer/tests: Add 5 new tests.
2004-11-10 00:50:40 +00:00
Ulrich Drepper 5d79df57b9 Update.
2004-11-09  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/ifaddrs.c: Determine sin6_scope_id field
	value correctly.
2004-11-10 00:37:05 +00:00
Roland McGrath eaae7493d4 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
* sysdeps/gnu/_G_config.h (_G_HAVE_MREMAP): Define symbol.
	* sysdeps/mach/hurd/_G_config.h: New file.
	* libio/fileops.c (mmap_remap_check) [__linux__]: Replaced with
	[_G_HAVE_MREMAP].
2004-11-08 23:15:48 +00:00
Roland McGrath 18c45bb426 * sysdeps/gnu/errlist.c: Regenerated. 2004-11-06 00:29:01 +00:00
Roland McGrath 30e32d23eb * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Define
_dl_sysinfo_dso under [NEED_DL_SYSINFO_DSO] as well.
	* elf/rtld.c (dl_main): Set up GLRO(dl_sysinfo_dso) under
	[NEED_DL_SYSINFO_DSO] as well.
	* sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Always include
	AT_SYSINFO and AT_SYSINFO_EHDR in name table.
	(_dl_sysdep_start) [NEED_DL_SYSINFO_DSO]: Match AT_SYSINFO_EHDR.
	* elf/dl-support.c (_dl_sysinfo_dso): Define also under
	[NEED_DL_SYSINFO_DSO].
	(_dl_aux_init) [NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO]:
	Match AT_SYSINFO_EHDR and set GL(dl_sysinfo_dso).

2004-11-05  Roland McGrath  <roland@redhat.com>
2004-11-06 00:24:55 +00:00
Roland McGrath ad146de70e * 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-04 23:37:44 +00:00
Richard Henderson a129c4fe72 * sysdeps/unix/sysv/linux/alpha/register-dump.h (regnames): Align. (linefeed): Remove. (register_dump): Rewrite to generate into a flat buffer instead of into iovecs.
2004-11-04  Richard Henderson  <rth@redhat.com>

	* sysdeps/unix/sysv/linux/alpha/register-dump.h (regnames): Align.
	(linefeed): Remove.
	(register_dump): Rewrite to generate into a flat buffer instead
	of into iovecs.
2004-11-04 18:39:10 +00:00
Roland McGrath 6d98e59366 * sysdeps/generic/utime.c: Include <stddef.h>. 2004-11-03 02:53:06 +00:00
Roland McGrath ab5f7c4506 * sysdeps/generic/sysconf.c: Include <grp.h> and <pwd.h>. 2004-11-03 01:55:28 +00:00
Roland McGrath a237785d08 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
* sysdeps/generic/tempname.c (__path_search): Add missing argument
	TRY_TMPDIR.
2004-11-03 01:51:44 +00:00
Richard Henderson b1845d07a1 * sysdeps/unix/sysv/linux/alpha/setregid.c: New file. * sysdeps/unix/sysv/linux/alpha/setresgid.c: New file. * sysdeps/unix/sysv/linux/alpha/setresuid.c: New file. * sysdeps/unix/sysv/linux/alpha/setreuid.c: New file.
2004-10-31  Mariusz Mazur <mmazur@kernel.pl>

	* sysdeps/unix/sysv/linux/alpha/setregid.c: New file.
	* sysdeps/unix/sysv/linux/alpha/setresgid.c: New file.
	* sysdeps/unix/sysv/linux/alpha/setresuid.c: New file.
	* sysdeps/unix/sysv/linux/alpha/setreuid.c: New file.
2004-11-01 05:31:54 +00:00
Andreas Schwab 488854275d (elf_machine_rela) (elf_machine_rela_relative, elf_machine_lazy_rel): Mark auto instead of static. 2004-10-30 21:44:13 +00:00
Ulrich Drepper 73f6403bd4 Update.
2004-10-30  Andreas Schwab  <schwab@suse.de>

	* sysdeps/unix/sysv/linux/waitid.c: Include <stddef.h> for NULL.

2004-10-30  Ulrich Drepper  <drepper@redhat.com>

	* malloc/malloc.c (_int_free): Use unique comments for the error
	cases.
2004-10-30 18:04:21 +00:00
Roland McGrath bcbfaf1def * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_fork): Use i386_thread_state
instead of machine_thread_state.
2004-10-29 01:25:24 +00:00
Roland McGrath ebbe05d829 2004-10-28 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/syscalls.list: Remove setaltroot.
2004-10-28 23:25:33 +00:00
Ulrich Drepper 778cddad17 Update.
2004-10-27  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/glob.c (globfree): Clear gl_pathv after freeing it.
	* posix/Makefile: Add rules to build and run bug-glob2 test.
	* posix/bug-glob2.c: New test.
2004-10-27 18:23:53 +00:00
Roland McGrath 3ba7b3831f * sysdeps/mach/hurd/i386/tls.h (HURD_TLS_DESC_DECL): New macro.
(_hurd_tls_init): Use it.
	(_hurd_tls_fork): New function.
	* sysdeps/mach/hurd/fork.c (__fork) [USE_TLS]: Call it.
2004-10-27 07:48:08 +00:00
Roland McGrath 269761cad3 * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Initialize TCB->tcb. 2004-10-27 00:55:39 +00:00
Roland McGrath e65a6679f0 * sysdeps/gnu/netinet/udp.h (struct udphdr): Use u_int16_t
type instead of uint16_t.  Formatting.
2004-10-26 18:11:31 +00:00
Roland McGrath 8f8bd267e9 * sysdeps/unix/bsd/hp: Directory and all files removed.
These are now in the ports repository.
	* sysdeps/unix/bsd/osf: Likewise.
	* sysdeps/unix/bsd/sequent: Likewise.
	* sysdeps/unix/bsd/sony: Likewise.
	* sysdeps/unix/bsd/ultrix4: Likewise.
	* sysdeps/unix/sysv/aix: Likewise.
	* sysdeps/unix/sysv/hpux: Likewise.
	* sysdeps/unix/sysv/irix4: Likewise.
	* sysdeps/unix/sysv/isc2.2: Likewise.
	* sysdeps/unix/sysv/minix: Likewise.
	* sysdeps/unix/sysv/sco3.2.4: Likewise.
	* sysdeps/unix/sysv/sco3.2: Likewise.
	* sysdeps/unix/sysv/sysv4: Likewise.
2004-10-26 02:15:42 +00:00
Roland McGrath 62facdf7c5 2004-10-25 Roland McGrath <roland@frob.com>
* configure.in (ASM_LINE_SEP): Move this setting to ...
	* sysdeps/hppa/configure.in: ... here, new file.
	* sysdeps/hppa/configure: New generated file.
	* configure: Regenerated.
2004-10-26 01:35:54 +00:00
Ulrich Drepper c2a4357a45 Update.
2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/sh/dl-machine.h: Include sysdep.h.
	(ELF_MACHINE_RUNTIME_TRAMPOLINE): Add CFI directives.
	(elf_machine_runtime_setup): Add always_inline attribute.
	(_dl_start_user): Pass the correct environ.
	(elf_machine_rela): Replace static inline by auto inline, add
	always_inline attribute.
	(elf_machine_rela_relative): Likewise.
	(elf_machine_lazy_rel): Likewise.
2004-10-25 19:07:36 +00:00
Roland McGrath 89c235754c Ancient files moved to ports repository 2004-10-24 19:23:43 +00:00
Roland McGrath 02d6ab9fc4 * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Don't return early
after an RPC succeeds.
2004-10-24 01:59:26 +00:00
Roland McGrath 229cf8d96c Moved tahoe files to ports repository
* sysdeps/tahoe, sysdeps/unix/bsd/tahoe: Likewise.
2004-10-23 21:03:03 +00:00
Roland McGrath 2bfae43161 Moved vax files to ports repository
2004-10-23  Roland McGrath  <roland@frob.com>

	* sysdeps/vax, sysdeps/unix/bsd/vax: Directories and all files removed.
	These are now in the ports repository.
2004-10-23 20:39:12 +00:00
Ulrich Drepper dde3199641 Update.
* debug/execinfo.h: Remove __THROW from backtrace prototype.

2004-10-22  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/i386/Makefile (CFLAGS-backtrace.c): Add -fexceptions.
	* sysdeps/i386/backtrace.c: Include <bits/libc-lock.h>, <dlfcn.h>,
	<stdlib.h> and <unwind.h>.  Remove <bp-checks.h> include.
	(struct trace_arg): New type.
	(unwind_backtrace, unwind_getip, unwind_getcfa, unwind_getgr): New
	fn pointers resp. macros.
	(init, backtrace_helper): New functions.
	(__backtrace): Rewritten to use _Unwind_Backtrace first and fall
	back to frame pointer walking.

2004-10-22  Ulrich Drepper  <drepper@redhat.com>
2004-10-22 21:08:43 +00:00
Ulrich Drepper 7d902c2298 Update.
2004-10-22  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/Versions: Things are still in flux, it
	seems.  Undo last additions.
2004-10-22 19:58:34 +00:00
Roland McGrath cb57664d29 * manual/errno.texi (Error Codes): Add ENOKEY, EKEYEXPIRED,
EKEYREVOKED, EKEYREJECTED.
	* sysdeps/unix/sysv/linux/Versions (libc: GLIBC_2.3.4): New errlist.
	* sysdeps/gnu/errlist.c: Regenerated

	* sysdeps/gnu/errlist-compat.awk: Don't bail if Versions gives a count
	higher than ERR_MAX reports.  Instead, emit a #define ERR_MAX.
	* sysdeps/gnu/Makefile ($(objpfx)errlist-compat.h): New target.
	(generated): Add errlist-compat.h.
	* sysdeps/gnu/errlist.awk: Make output #include <errlist-compat.h> to
	define ERR_MAX and use that for table size.
2004-10-20 10:05:07 +00:00
Roland McGrath 4b359a27dd 2004-10-20 Roland McGrath <roland@redhat.com>
* sysdeps/gnu/errlist-compat.awk: Don't bail if Versions gives a count
	higher than ERR_MAX reports.  Instead, emit a #define ERR_MAX.
	* sysdeps/gnu/Makefile ($(objpfx)errlist-compat.h): New target.
	(generated): Add errlist-compat.h.
	* sysdeps/gnu/errlist.awk: Make output #include <errlist-compat.h> to
	define ERR_MAX and use that for table size.
2004-10-20 10:04:57 +00:00
Ulrich Drepper 13772215fc Update.
2004-10-20  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/syscalls.list: Add entries for setaltroot,
	key_add, key_request, and keyctl syscalls.
	* sysdeps/unix/sysv/linux/Versions: Export them.
2004-10-20 07:09:15 +00:00
Ulrich Drepper b6929021da Regenerated from ../sysdeps/gnu/errlist.awk ../manual/errno.texi 2004-10-20 07:00:30 +00:00
Roland McGrath 604208c4df 2004-10-19 Roland McGrath <roland@frob.com>
* sysdeps/mach/readonly-area.c: New file.
2004-10-20 06:43:15 +00:00
Ulrich Drepper 356e414295 Regenerated from ../sysdeps/gnu/errlist.awk ../manual/errno.texi 2004-10-20 06:29:15 +00:00
Ulrich Drepper 7e46ec8ccc Update.
2004-10-19  Ulrich Drepper  <drepper@redhat.com>

	* elf/Versions [ld, GLIBC_PRIVATE]: Add _dl_debug_state.
	* elf/dl-debug.c (_dl_debug_state): Add rtld_hidden_def.
	* sysdeps/generic/ldsodefs.h (_dl_debug_state): Don't maek as
	hidden but use rtld_hidden_proto.
2004-10-19 22:21:46 +00:00
Ulrich Drepper 1866ae9455 Update.
2004-10-19  Alfred M. Szmidt  <ams@gnu.org>

	* sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ...
	(__readonly_area): ... this.
2004-10-19 21:45:14 +00:00
Ulrich Drepper 708c687a6f Update.
2004-10-18  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking
	destlen only every 4 bytes.
2004-10-19 21:21:42 +00:00
Andreas Jaeger 30b7ba1d27 (__SYSCALL_CLOBBERS): Add "memory". 2004-10-18 05:16:08 +00:00
Ulrich Drepper b5cc329c4f 2004-10-15 Jakub Jelinek <jakub@redhat.com>
* elf/dl-minimal.c (__chk_fail): New.  Add rtld_hidden_def.
	* sysdeps/unix/sysv/linux/readonly-area.c: New file.
	* sysdeps/i386/i686/memmove.S (__memmove_chk): Add checking
	routine.
	* sysdeps/i386/i686/memcpy.S (__memcpy_chk): Likewise.
	* sysdeps/i386/i686/mempcpy.S (__mempcpy_chk): Likewise.
	* sysdeps/i386/i686/memset.S (__memset_chk): Likewise.
	* sysdeps/i386/i686/memmove-chk.S: New file.
	* sysdeps/i386/i686/memcpy-chk.S: Likewise.
	* sysdeps/i386/i686/mempcpy-chk.S: Likewise.
	* sysdeps/i386/i686/memset-chk.S: Likewise.
	* sysdeps/generic/strcat-chk.c (__strcat_chk): Don't __chk_fail
	if exactly fitting into buffer.
	* sysdeps/generic/strncat-chk.c (__strncat_chk): Likewise.
	* sysdeps/generic/readonly-area.c: New file.
	* sysdeps/generic/strncpy-chk.c (__strncpy_chk): Only test
	destlen once.
	* sysdeps/x86_64/memset.S (__memset_chk): Add checking routine.
	* sysdeps/x86_64/memcpy.S (__memcpy_chk): Likewise.
	* sysdeps/x86_64/mempcpy.S (__memcpy_chk): Define to __mempcpy_chk.
	* sysdeps/x86_64/memcpy-chk.S: New file.
	* sysdeps/x86_64/mempcpy-chk.S: Likewise.
	* sysdeps/x86_64/memset-chk.S: Likewise.
	* sysdeps/x86_64/strcpy-chk.S: Likewise.
	* sysdeps/x86_64/stpcpy-chk.S: Likewise.
	* argp/argp-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing.
	* argp/argp-fs-xinl.c (__OPTIMIZE__): Likewise.
	* debug/tst-chk1.c: New test.
	* debug/tst-chk2.c: Likewise.
	* debug/tst-chk3.c: Likewise.
	* debug/test-strcpy_chk.c: Likewise.
	* debug/test-stpcpy_chk.c: Likewise.
	* debug/vsprintf_chk.c (__vsprintf_chk): If flags > 0, request
	_IO_FLAGS2_CHECK_PERCENT_N.  Add libc_hidden_def.
	* debug/Makefile (routines): Add printf_chk, fprintf_chk, vprintf_chk,
	vfprintf_chk, gets_chk and readonly-area.
	(CFLAGS-*_chk.c): Set.
	(tests): Add tst-chk1, tst-chk2, tst-chk3, test-strcpy_chk and
	test-stpcpy_chk.
	* debug/vprintf_chk.c: New file.
	* debug/printf_chk.c: Likewise.
	* debug/vfprintf_chk.c: Likewise.
	* debug/fprintf_chk.c: Likewise.
	* debug/gets_chk.c: Likewise.
	* debug/chk_fail.c (__chk_fail): Add libc_hidden_def.
	* debug/snprintf_chk.c (__snprintf_chk): Fix order of arguments
	passed to __vsnprintf_chk.
	* debug/Versions (libc): Export __printf_chk, __fprintf_chk,
	__vprintf_chk, __vfprintf_chk and __gets_chk @GLIBC_2.3.4.
	* debug/vsnprintf_chk.c (__vsnprintf_chk): Don't call
	__vsnprintf, instead create a temporary file with
	_IO_strn_jumps jumptable.  If flags > 0, request
	_IO_FLAGS2_CHECK_PERCENT_N.  Add libc_hidden_def.
	* libio/Makefile (headers): Add bits/stdio2.h.
	* libio/stdio.h: Include <bits/stdio2.h> if __USE_FORTIFY_LEVEL.
	(sprintf, snprintf, vsprintf, vsnprintf): Remove defines.
	* libio/strfile.h (_IO_strnfile): New type.
	(_IO_strn_jumps): New extern.
	* libio/vsnprintf.c (_IO_strnfile): Remove.
	(_IO_strn_jumps): Remove static.
	* libio/bits/stdio2.h: New file.
	* libio/vswprintf.c (_IO_strnfile): Rename type to...
	(_IO_wstrnfile): ...this.  Adjust all uses.
	* libio/libio.h (_IO_FLAGS2_CHECK_PERCENT_N): Define.
	* stdio-common/vfprintf.c (STR_LEN): Define.
	(vfprintf): Add readonly_format variable.
	Handle _IO_FLAGS2_CHECK_PERCENT_N.
	(buffered_vfprintf): Copy _flags2.
	* include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk,
	__vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk,
	__vfprintf_chk): New prototypes.
	(__vsprintf_chk, __vsnprintf_chk): Add libc_hidden_proto.
	* include/string.h (__memcpy_chk, __memmove_chk, __mempcpy_chk,
	__memset_chk, __strcpy_chk, __stpcpy_chk, __strncpy_chk, __strcat_chk,
	__strncat_chk): New prototypes.
	* include/bits/string3.h: New file.
	* include/sys/cdefs.h (__chk_fail): Add libc_hidden_proto
	and rtld_hidden_proto.
	* string/Makefile (headers): Add bits/string3.h.
	* string/bits/string3.h (bcopy, bzero): New defines.
	(memset, memcpy, memmove, strcpy, strncpy, strcat, strncat): Change
	macros so that inlines are used only if unknown destination size
	or side-effects in destination argument.
	(mempcpy, stpcpy): Likewise.  Protect with #ifdef __USE_GNU.

2004-09-16  Ulrich Drepper  <drepper@redhat.com>

	* debug/Makefile (routines): Add *_chk.
	* debug/Versions (libc): Export __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
	@GLIBC_2.3.4.
	* debug/chk_fail.c: New file.
	* debug/snprintf_chk.c: Likewise.
	* debug/sprintf_chk.c: Likewise.
	* debug/vsnprintf_chk.c: Likewise.
	* debug/vsprintf_chk.c: Likewise.
	* include/features.h (_FORTIFY_SOURCE): Document, handle.
	(__USE_FORTIFY_LEVEL): Define.
	(__GNUC_PREREQ): Move to earlier location.
	* include/sys/cdefs.h (__chk_fail): New prototype.
	* libio/bits/stdio.h (sprintf, vsprintf, snprintf, vsnprintf):
	Define if __USE_FORTIFY_LEVEL.
	* misc/sys/cdefs.h (__bos, __bos0): Define.
	* string/string.h: Include <bits/string3.h> if __USE_FORTIFY_LEVEL.
	* bits/string/string3.h: New header.
	* sysdeps/generic/memcpy_chk.c: New file.
	* sysdeps/generic/memmove_chk.c: Likewise.
	* sysdeps/generic/mempcpy_chk.c: Likewise.
	* sysdeps/generic/memset_chk.c: Likewise.
	* sysdeps/generic/stpcpy_chk.c: Likewise.
	* sysdeps/generic/strcat_chk.c: Likewise.
	* sysdeps/generic/strcpy_chk.c: Likewise.
	* sysdeps/generic/strncat_chk.c: Likewise.
	* sysdeps/generic/strncpy_chk.c: Likewise.
2004-10-15  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-minimal.c (__chk_fail): New.  Add rtld_hidden_def.
	* sysdeps/unix/sysv/linux/readonly-area.c: New file.
	* sysdeps/i386/i686/memmove.S (__memmove_chk): Add checking
	routine.
	* sysdeps/i386/i686/memcpy.S (__memcpy_chk): Likewise.
	* sysdeps/i386/i686/mempcpy.S (__mempcpy_chk): Likewise.
	* sysdeps/i386/i686/memset.S (__memset_chk): Likewise.
	* sysdeps/i386/i686/memmove-chk.S: New file.
	* sysdeps/i386/i686/memcpy-chk.S: Likewise.
	* sysdeps/i386/i686/mempcpy-chk.S: Likewise.
	* sysdeps/i386/i686/memset-chk.S: Likewise.
	* sysdeps/generic/strcat-chk.c (__strcat_chk): Don't __chk_fail
	if exactly fitting into buffer.
	* sysdeps/generic/strncat-chk.c (__strncat_chk): Likewise.
	* sysdeps/generic/readonly-area.c: New file.
	* sysdeps/generic/strncpy-chk.c (__strncpy_chk): Only test
	destlen once.
	* sysdeps/x86_64/memset.S (__memset_chk): Add checking routine.
	* sysdeps/x86_64/memcpy.S (__memcpy_chk): Likewise.
	* sysdeps/x86_64/mempcpy.S (__memcpy_chk): Define to __mempcpy_chk.
	* sysdeps/x86_64/memcpy-chk.S: New file.
	* sysdeps/x86_64/mempcpy-chk.S: Likewise.
	* sysdeps/x86_64/memset-chk.S: Likewise.
	* sysdeps/x86_64/strcpy-chk.S: Likewise.
	* sysdeps/x86_64/stpcpy-chk.S: Likewise.
	* argp/argp-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing.
	* argp/argp-fs-xinl.c (__OPTIMIZE__): Likewise.
	* debug/tst-chk1.c: New test.
	* debug/tst-chk2.c: Likewise.
	* debug/tst-chk3.c: Likewise.
	* debug/test-strcpy_chk.c: Likewise.
	* debug/test-stpcpy_chk.c: Likewise.
	* debug/vsprintf_chk.c (__vsprintf_chk): If flags > 0, request
	_IO_FLAGS2_CHECK_PERCENT_N.  Add libc_hidden_def.
	* debug/Makefile (routines): Add printf_chk, fprintf_chk, vprintf_chk,
	vfprintf_chk, gets_chk and readonly-area.
	(CFLAGS-*_chk.c): Set.
	(tests): Add tst-chk1, tst-chk2, tst-chk3, test-strcpy_chk and
	test-stpcpy_chk.
	* debug/vprintf_chk.c: New file.
	* debug/printf_chk.c: Likewise.
	* debug/vfprintf_chk.c: Likewise.
	* debug/fprintf_chk.c: Likewise.
	* debug/gets_chk.c: Likewise.
	* debug/chk_fail.c (__chk_fail): Add libc_hidden_def.
	* debug/snprintf_chk.c (__snprintf_chk): Fix order of arguments
	passed to __vsnprintf_chk.
	* debug/Versions (libc): Export __printf_chk, __fprintf_chk,
	__vprintf_chk, __vfprintf_chk and __gets_chk @GLIBC_2.3.4.
	* debug/vsnprintf_chk.c (__vsnprintf_chk): Don't call
	__vsnprintf, instead create a temporary file with
	_IO_strn_jumps jumptable.  If flags > 0, request
	_IO_FLAGS2_CHECK_PERCENT_N.  Add libc_hidden_def.
	* libio/Makefile (headers): Add bits/stdio2.h.
	* libio/stdio.h: Include <bits/stdio2.h> if __USE_FORTIFY_LEVEL.
	(sprintf, snprintf, vsprintf, vsnprintf): Remove defines.
	* libio/strfile.h (_IO_strnfile): New type.
	(_IO_strn_jumps): New extern.
	* libio/vsnprintf.c (_IO_strnfile): Remove.
	(_IO_strn_jumps): Remove static.
	* libio/bits/stdio2.h: New file.
	* libio/vswprintf.c (_IO_strnfile): Rename type to...
	(_IO_wstrnfile): ...this.  Adjust all uses.
	* libio/libio.h (_IO_FLAGS2_CHECK_PERCENT_N): Define.
	* stdio-common/vfprintf.c (STR_LEN): Define.
	(vfprintf): Add readonly_format variable.
	Handle _IO_FLAGS2_CHECK_PERCENT_N.
	(buffered_vfprintf): Copy _flags2.
	* include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk,
	__vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk,
	__vfprintf_chk): New prototypes.
	(__vsprintf_chk, __vsnprintf_chk): Add libc_hidden_proto.
	* include/string.h (__memcpy_chk, __memmove_chk, __mempcpy_chk,
	__memset_chk, __strcpy_chk, __stpcpy_chk, __strncpy_chk, __strcat_chk,
	__strncat_chk): New prototypes.
	* include/bits/string3.h: New file.
	* include/sys/cdefs.h (__chk_fail): Add libc_hidden_proto
	and rtld_hidden_proto.
	* string/Makefile (headers): Add bits/string3.h.
	* string/bits/string3.h (bcopy, bzero): New defines.
	(memset, memcpy, memmove, strcpy, strncpy, strcat, strncat): Change
	macros so that inlines are used only if unknown destination size
	or side-effects in destination argument.
	(mempcpy, stpcpy): Likewise.  Protect with #ifdef __USE_GNU.

2004-09-16  Ulrich Drepper  <drepper@redhat.com>

	* debug/Makefile (routines): Add *_chk.
	* debug/Versions (libc): Export __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
	@GLIBC_2.3.4.
	* debug/chk_fail.c: New file.
	* debug/snprintf_chk.c: Likewise.
	* debug/sprintf_chk.c: Likewise.
	* debug/vsnprintf_chk.c: Likewise.
	* debug/vsprintf_chk.c: Likewise.
	* include/features.h (_FORTIFY_SOURCE): Document, handle.
	(__USE_FORTIFY_LEVEL): Define.
	(__GNUC_PREREQ): Move to earlier location.
	* include/sys/cdefs.h (__chk_fail): New prototype.
	* libio/bits/stdio.h (sprintf, vsprintf, snprintf, vsnprintf):
	Define if __USE_FORTIFY_LEVEL.
	* misc/sys/cdefs.h (__bos, __bos0): Define.
	* string/string.h: Include <bits/string3.h> if __USE_FORTIFY_LEVEL.
	* bits/string/string3.h: New header.
	* sysdeps/generic/memcpy_chk.c: New file.
	* sysdeps/generic/memmove_chk.c: Likewise.
	* sysdeps/generic/mempcpy_chk.c: Likewise.
	* sysdeps/generic/memset_chk.c: Likewise.
	* sysdeps/generic/stpcpy_chk.c: Likewise.
	* sysdeps/generic/strcat_chk.c: Likewise.
	* sysdeps/generic/strcpy_chk.c: Likewise.
	* sysdeps/generic/strncat_chk.c: Likewise.
	* sysdeps/generic/strncpy_chk.c: Likewise.
2004-10-18 04:17:19 +00:00
Roland McGrath 9d24cfb331 2004-10-16 Alfred M. Szmidt <ams@kemisten.nu>
* sysdeps/mach/hurd/Makefile (link-libc-static): Use
	`$(static-gnulib') instead of `$(gnulib)'.
2004-10-17 20:00:25 +00:00
Ulrich Drepper 0da7bcc5bf Update.
2004-10-15  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/sysdep.h (PUSHARGS_6, DOARGS_6,
	POPARGS_6, _PUSHARGS_6, _DOARGS_6, _POPARGS_6): Define.
	* sysdeps/unix/sysv/linux/i386/syscall.S (syscall): Handle 6 argument
	syscalls.
2004-10-15 21:31:29 +00:00