Commit Graph

15075 Commits

Author SHA1 Message Date
Jakub Jelinek
a57d399535 . 2007-07-31 13:33:18 +00:00
Jakub Jelinek
4e68f295b6 * NEWS, version.h (VERSION): 2.5.1. 2007-07-31 13:11:51 +00:00
Jakub Jelinek
4416c6f1b7 2007-07-31 Jakub Jelinek <jakub@redhat.com>
* stdio-common/tfformat.c (sprint_doubles): Add 12 new tests.

2007-07-28  Ulrich Drepper  <drepper@redhat.com>

	[BZ #4858]
	* stdio-common/printf_fp.c (___printf_fp): Fix special case of
	#.0g and value rounded to 1.0.
	* stdio-common/tfformat.c (sprint_doubles): Add two new tests.
2007-07-31 12:44:28 +00:00
Jakub Jelinek
ed1e38d8c2 2007-07-27 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
	of the structure for sparc32.

2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>

	* sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2007-07-27 22:18:15 +00:00
Jakub Jelinek
cda77167e5 Update Copyright years. 2007-07-12 16:58:10 +00:00
Jakub Jelinek
d8cdfda31e 2007-02-25 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
	new thread, don't just decrement it.
	Patch by Suzuki K P <suzuki@in.ibm.com>.
2007-07-12 15:40:54 +00:00
Jakub Jelinek
eff61d5bf1 2007-07-03 Jakub Jelinek <jakub@redhat.com>
[BZ #4702]
	* nis/nss-default.c: Include errno.h.
	(init): Preserve errno.
2007-07-12 15:36:23 +00:00
Jakub Jelinek
8c48ca02cf 2007-07-01 Jakub Jelinek <jakub@redhat.com>
* elf/dl-sysdep.c (_dl_important_hwcaps): Add integer overflow check.
	* elf/dl-minimal.c (__libc_memalign): Likewise.  Handle malloc (0).
	Return NULL if mmap failed instead of asserting it does not.
	(calloc): Check for integer overflow.

	* elf/dl-minimal.c (__strtoul_internal): Fix parsing of numbers bigger
	than LONG_MAX / 10.
2007-07-12 15:36:14 +00:00
Jakub Jelinek
e1e1fb48fd 2007-06-22 Jakub Jelinek <jakub@redhat.com>
* pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
	cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2007-07-12 15:35:28 +00:00
Jakub Jelinek
561774ab86 2007-06-19 Ulrich Drepper <drepper@redhat.com>
* sysdeps/generic/ldsodefs.h (rtld_global): Reorder some elements
	to fill in holes
	(rtld_global_ro): Likewise.

2007-06-18  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-addr.c (_dl_addr): Skip PT_LOAD checking if l_contiguous.
	Move PT_LOAD checking to...
	(_dl_addr_inside_object): ... here, new function.
	* elf/dl-sym.c (do_sym): If not l_contiguous,
	call _dl_addr_inside_object.
	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise.
	* dlfcn/dlinfo.c (dlinfo_doit): Likewise.
	* elf/dl-open.c (dl_open_worker): Likewise.
	(_dl_addr_inside_object): New function if IS_IN_rtld.
	* elf/dl-load.c (_dl_map_object_from_fd): Set l_contiguous if no
	holes are present or are PROT_NONE protected.
	* include/link.h (struct link_map): Add l_contiguous field.
	* sysdeps/generic/ldsodefs.h (_dl_addr_inside_object): New prototype.
2007-07-12 15:34:58 +00:00
Jakub Jelinek
3c8ed68000 2007-06-18 Jakub Jelinek <jakub@redhat.com>
* elf/rtld.c (dl_main): Don't call init_tls more than once.
2007-07-12 15:34:38 +00:00
Jakub Jelinek
24f7705688 2007-06-19 Ulrich Drepper <drepper@redhat.com>
* elf/dl-close.c (free_mem): Free _dl_scope_free_list.

2007-06-13  Jakub Jelinek  <jakub@redhat.com>

	* include/link.h: Don't include rtld-lowlevel.h.
	(struct link_map): Remove l_scope_lock.
	* sysdeps/generic/ldsodefs.h: Don't include rtld-lowlevel.h.
	(_dl_scope_free_list): New field (variable) in _rtld_global.
	(DL_LOOKUP_SCOPE_LOCK): Remove.
	(_dl_scope_free): New prototype.
	* elf/dl-runtime.c (_dl_fixup): Don't use __rtld_mrlock_*lock.
	Don't pass DL_LOOKUP_SCOPE_LOCK to _dl_lookup_symbol_x.
	(_dl_profile_fixup): Likewise.
	* elf/dl-sym.c (do_sym): Likewise.  Use wrapped _dl_lookup_symbol_x
	whenever !RTLD_SINGLE_THREAD_P, use THREAD_GSCOPE_SET_FLAG and
	THREAD_GSCOPE_RESET_FLAG around it.
	* elf/dl-close.c (_dl_close_worker): Don't use
	__rtld_mrlock_{change,done}.  Call _dl_scope_free on the old
	scope.  Make sure THREAD_GSCOPE_WAIT () happens if any old
	scopes were queued or if l_scope_mem has been abandoned.
	* elf/dl-open.c (_dl_scope_free): New function.
	(dl_open_worker): Use it.  Don't use __rtld_mrlock_{change,done}.
	* elf/dl-support.c (_dl_scope_free_list): New variable.
	* elf/dl-lookup.c (add_dependency): Remove flags argument.
	Remove DL_LOOKUP_SCOPE_LOCK handling.
	(_dl_lookup_symbol_x): Adjust caller.  Remove DL_LOOKUP_SCOPE_LOCK
	handling.
	* elf/dl-object.c (_dl_new_object): Don't use
	__rtld_mrlock_initialize.
2007-07-12 15:34:17 +00:00
Jakub Jelinek
3026163fe1 2007-06-09 Ulrich Drepper <drepper@redhat.com>
* elf/do-lookup.h (do_lookup_x): Read r_nlist before r_list and
	make sure gcc doesn't mess around with this.

2007-06-08  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-lookup.c (_dl_lookup_symbol_x): Remove use of r_nlist.

2007-06-08  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-close.c (_dl_close_worker): Remove all to be removed
	libraries from the global scope at once and call THREAD_GSCOPE_WAIT
	at most once per _dl_close_worker.

2007-05-18  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-close.c (_dl_close_worker): When removing object from
	global scope, wait for all lookups to finish afterwards.
	* elf/dl-open.c (add_to_global): When global scope array must
	grow, allocate a new one and free old array only after all
	lookups finish.
	* elf/dl-runtime.c (_dl_fixup): Protect using global scope.
	(_dl_lookup_symbol_x): Likewise.
	* elf/dl-support.c: Define _dl_wait_lookup_done.
	* sysdeps/generic/ldsodefs.h (struct rtld_global): Add
	_dl_wait_lookup_done.

2007-05-11  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-close.c (_dl_close_worker): Help gcc to optimize by
	adding new variables.

	* elf/dl-open.c (add_to_global): Introduce variable ns to help gcc
	optimize.  Completely extend global scope array before making the
	new entries visible.

2007-01-15  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/ldsodefs.h: Define DL_LOOKUP_SCOPE_LOCK.
	* elf/dl-lookup.c (add_dependency): If scope map is locked, unlock
	it before getting dl_load_lock and then relock.
	(_dl_lookup_symbol_x): Pass flags to add_dependency.
	When rerunning _dl_lookup_symbol_x, compute symbol_scope again in
	case we unlocked the scope.
	* elf/dl-runtime.c (_dl_fixup): Pass DL_LOOKUP_SCOPE_LOCK to
	_dl_lookup_symbol_x in case we locked the scope.
	(_dl_profile_fixup): Likewise.
	* elf/dl-sym.c (do_sym): In flags passed to call_dl_lookup, also
	set DL_LOOKUP_SCOPE_LOCK.

2006-10-29  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-sym.c (do_sym): Use RTLD_SINGLE_THREAD_P.
	* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Likewise.
	* elf/dl-close.c (_dl_close_worker): Likewise.
	* elf/dl-open.c (_dl_open_worker): Likewise.
	* sysdeps/generic/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define.

2006-10-27  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-lookup.c (_dl_debug_bindings): Remove unused symbol_scope
	argument.
	(_dl_lookup_symbol_x): Adjust caller.

	* sysdeps/generic/ldsodefs.h (struct link_namespaces): Remove
	_ns_global_scope.
	* elf/rtld.c (dl_main): Don't initialize _ns_global_scope.

	* elf/dl-libc.c: Revert l_scope name changes.
	* elf/dl-load.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/rtld.c: Likewise.
	* elf/dl-close.c (_dl_close): Likewise.
	* elf/dl-open.c (dl_open_worker): Likewise.  If not SINGLE_THREAD_P,
	always use __rtld_mrlock_{change,done}.  Always free old scope list
	here if not l_scope_mem.
	* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Revert l_scope name
	change.  Never free scope list here.  Just __rtld_mrlock_lock before
	the lookup and __rtld_mrlock_unlock it after the lookup.
	* elf/dl-sym.c: Likewise.
	* include/link.h (struct r_scoperec): Remove.
	(struct link_map): Replace l_scoperec with l_scope, l_scoperec_mem
	with l_scope_mem and l_scoperec_lock with l_scope_lock.

2006-10-18  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-lookup.c (_dl_lookup_symbol_x): Add warning to
	_dl_lookup_symbol_x code.

2006-10-17  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-runtime.c: Include sysdep-cancel.h.
	(_dl_fixup, _dl_profile_fixup): Use __rtld_mrlock_* and
	scoperec->nusers only if !SINGLE_THREAD_P.
	* elf/dl-sym.c: Include sysdep-cancel.h.
	(do_sym): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.
	* elf/dl-close.c: Include sysdep-cancel.h.
	(_dl_close): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.
	* elf/dl-open.c: Include sysdep-cancel.h.
	(dl_open_worker): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.

2006-10-09  Ulrich Drepper  <drepper@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	Implement reference counting of scope records.
	* elf/dl-close.c (_dl_close): Remove all scopes from removed objects
	from the list in objects which remain.  Always allocate new scope
	record.
	* elf/dl-open.c (dl_open_worker): When growing array for scopes,
	don't resize, allocate a new one.
	* elf/dl-runtime.c: Update reference counters before using a scope
	array.
	* elf/dl-sym.c: Likewise.
	* elf/dl-libc.c: Adjust for l_scope name change.
	* elf/dl-load.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/rtld.c: Likewise.
	* include/link.h: Include <rtld-lowlevel.h>.  Define struct
	r_scoperec.  Replace r_scope with pointer to r_scoperec structure.
	Add l_scoperec_lock.
	* sysdeps/generic/ldsodefs.h: Include <rtld-lowlevel.h>.
	* sysdeps/generic/rtld-lowlevel.h: New file.
nptl/
2007-05-28  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
	insn suffix.
	(THREAD_GSCOPE_GET_FLAG): Remove.
	* sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
	* allocatestack.c (__wait_lookup_done): Revert 2007-05-24
	changes.
	* sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
	(THREAD_GSCOPE_GET_FLAG): Remove.
	(THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
	instead of THREAD_GSCOPE_GET_FLAG.
	(THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
	it.
	* sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
	THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_WAIT): Define.
	* sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
	THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_WAIT): Define.
	* sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
	THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_WAIT): Define.
	* sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
	THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_WAIT): Define.

2007-05-24  Richard Henderson  <rth@redhat.com>

	* descr.h (struct pthread): Add header.gscope_flag.
	* sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
	THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_WAIT): Define.

2007-05-26  Ulrich Drepper  <drepper@redhat.com>

	* allocatestack.c: Revert last change.
	* init.c: Likewise.
	* sysdeps/i386/tls.h: Likewise.
	* sysdeps/x86_64/tls.h: Likewise.

2007-05-24  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
	(THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
	THREAD_GSCOPE_FLAG_WAIT): Define.
	(THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
	* sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
	PTR_DEMANGLE.
	(THREAD_GSCOPE_GET_FLAG): Define.
	* sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
	* allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
	instead of ->header.gscope_flag directly.

2007-05-21  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/pthread/pthread-functions.h (struct pthread_functions):
	Remove ptr_wait_lookup_done again.
	* init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
	(__pthread_initialize_minimal_internal): Initialize
	_dl_wait_lookup_done pointer in _rtld_global directly.
	* sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
	Remove code to code _dl_wait_lookup_done.
	* sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
	encrypted for now.

2007-05-19  Ulrich Drepper  <drepper@redhat.com>

	* allocatestack.c (__wait_lookup_done): New function.
	* sysdeps/pthread/pthread-functions.h (struct pthread_functions):
	Add ptr_wait_lookup_done.
	* init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
	* pthreadP.h: Declare __wait_lookup_done.
	* sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
	Define macros to implement reference handling of global scope.
	* sysdeps/x86_64/tls.h: Likewise.
	* sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
	Initialize GL(dl_wait_lookup_done).

2006-12-09  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/rtld-lowlevel.h
	(__rtld_mrlock_initialize): Add missing closing parenthesis.

2006-10-29  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
	Define.
	(SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
	* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.

2006-10-27  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
	__rtld_mrlock_change): Update oldval if atomic compare and exchange
	failed.

	* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
	Define to THREAD_SELF->header.multiple_threads.
	* sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
	Likewise.

2006-10-09  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2007-07-12 15:33:46 +00:00
Jakub Jelinek
85b34a3d15 2007-06-06 Jakub Jelinek <jakub@redhat.com>
[BZ #4586]
	* sysdeps/i386/ldbl2mpn.c (__mpn_extract_long_double): Treat
	pseudo-zeros as zero.
	* sysdeps/x86_64/ldbl2mpn.c: New file.
	* sysdeps/ia64/ldbl2mpn.c: New file.
2007-07-12 15:30:07 +00:00
Jakub Jelinek
31f58f074a 2007-06-05 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c
	(__mpn_construct_long_double): Fix conversion where result ought
	to be smaller than __LDBL_MIN__, or the low double should be
	denormal.  Fix decision where to negate low double - honor round
	to even rules.
	* stdio-common/tst-sprintf2.c: Include string.h.
	(COMPARE_LDBL): Define.
	(TEST): Also test whether a string hexadecimal float representation
	can be parsed back to the number.
	(main): Add a couple of further tests.

2007-06-04  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/ieee754/ldbl-128ibm/printf_fphex.c
	(PRINT_FPHEX_LONG_DOUBLE): Fix printing numbers where lower double
	is non-zero, but smaller than 2 * __DBL_MIN__.
	* stdio-common/tst-sprintf2.c: New test.
	* stdio-common/Makefile (tests): Add tst-sprintf2.
2007-07-12 15:29:25 +00:00
Jakub Jelinek
5dbbefb6b5 2007-06-04 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (nextafterl): Remove
	unused ily variable.  Fix nextafterl on +-__LDBL_MAX__ and +-Inf.
	Remove unreachable code at the end.

2007-06-01  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: Correct description of
	ldbl-128ibm in comment.
	(fpclassifyl): Correct classification of denormals.
	* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (nextafterl): Correct
	return value for MIN denormal. Rewrite using long double math too
	correctly handle denormals and canonicalize the results.
2007-07-12 15:29:06 +00:00
Jakub Jelinek
5b4675550e 2007-05-29 Ulrich Drepper <drepper@redhat.com>
* nscd/nscd_helper.c (get_mapping): Handle short replies instead
	of crashing.  When this is the case or if the reply is malformed,
	don't try to close the new file descriptor since it does not
	exist.
	Patch in part by Guillaume Chazarain <guichaz@yahoo.fr>.
2007-07-12 15:27:53 +00:00
Jakub Jelinek
1b5b08a2af 2007-05-25 Ulrich Drepper <drepper@redhat.com>
* Makefile (tests): Add tst-sem10.
	* tst-sem10.c: New file.

2007-05-25  Ulrich Drepper  <drepper@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
	Move __pthread_enable_asynccancel right before futex syscall.
	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
	Likewise.
2007-07-12 15:27:35 +00:00
Jakub Jelinek
7043950283 2007-05-21 Jakub Jelinek <jakub@redhat.com>
[BZ #4514]
	* stdio-common/vfprintf.c (vfprintf): Don't shadow workstart variable,
	reinitialize workend at the start of each do_positional format spec
	loop, free workstart before do_positional loops.
	(printf_unknown): Fix size of work_buffer.
	* stdio-common/tst-sprintf.c (main): Add 3 new testcases.
2007-07-12 15:23:38 +00:00
Jakub Jelinek
5df7821c9c 2007-05-21 Jakub Jelinek <jakub@redhat.com>
* tst-robust9.c (do_test): Don't fail if ENABLE_PI and
	pthread_mutex_init failed with ENOTSUP.

2007-05-17  Ulrich Drepper  <drepper@redhat.com>

	[BZ #4512]
	* pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
	is detected.
	* pthread_mutex_timedlock.c: Likewise.
	* pthread_mutex_trylock.c: Likewise.
	Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.

	* Makefile (tests): Add tst-robust9 and tst-robustpi9.
	* tst-robust9.c: New file.
	* tst-robustpi9.c: New file.
2007-07-12 15:23:22 +00:00
Jakub Jelinek
acf33246a3 2007-05-10 Ulrich Drepper <drepper@redhat.com>
* include/sys/cdefs.h: Redefine __nonnull so that test for
	incorrect parameters in the libc code itself are not omitted.
2007-07-12 15:22:47 +00:00
Jakub Jelinek
19ca40f571 2007-05-07 Ulrich Drepper <drepper@redhat.com>
Jakub Jelinek  <jakub@redhat.com>

	* malloc/arena.c (heap_info): Add mprotect_size field, adjust pad.
	(new_heap): Initialize mprotect_size.
	(grow_heap): When growing, only mprotect from mprotect_size till
	new_size if mprotect_size is smaller.  When shrinking, use PROT_NONE
	MMAP for __libc_enable_secure only, otherwise use MADV_DONTNEED.
2007-07-12 15:22:37 +00:00
Jakub Jelinek
7eb36bf69c 2007-05-07 Ulrich Drepper <drepper@redhat.com>
* locales/as_IN: Fix currency_symbol, abday for Sunday, abmon for
	January, February, and September to December, mon for January,
	February, September, and December, am_pm, and name_*.
	Patch by Amitakhya Phukan <aphukan@redhat.com>.
2007-07-12 15:22:08 +00:00
Jakub Jelinek
8e644efe5e 2007-05-07 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/lowlevelrobustlock.c
	(__lll_robust_lock_wait): Fix race caused by reloading of futex value.
	(__lll_robust_timedlock_wait): Likewise.
	Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2007-07-12 15:21:44 +00:00
Jakub Jelinek
05b4aead80 2007-05-06 Ulrich Drepper <drepper@redhat.com>
* stdio-common/vfprintf.c (process_string_arg): Optimize
	ridiculous precision in wide char code printing multi-byte string.
	Reported by Jim Meyering <jim@meyering.net>.
2007-07-12 15:21:13 +00:00
Jakub Jelinek
0f2401c5ea 2007-05-06 Ulrich Drepper <drepper@redhat.com>
[BZ #4465]
	* posix/unistd.h: Remove __THROW from fdatasync.

2007-05-06  Mike Frysinger  <vapier@gentoo.org>

	[BZ #4465]
	* sysdeps/unix/sysv/linux/syscalls.list (fdatasync): Add "C" to args.

	[BZ #4465]
	* tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
	* tst-cancel4.c (tf_fdatasync): New test.
2007-07-12 15:19:59 +00:00
Jakub Jelinek
b4696b570a 2007-05-06 Ulrich Drepper <drepper@redhat.com>
[BZ #4131]
	* elf/dl-addr.c (_dl_addr): Compare address with actual segment
	boundaries to work around systems with overlapping binary loading.
	Based on a patch by Suzuki <suzuki@in.ibm.com>.
2007-07-12 15:15:16 +00:00
Jakub Jelinek
3a47d90047 2007-05-04 Ulrich Drepper <drepper@redhat.com>
* stdio-common/vfprintf.c (process_string_arg): Adjust call to
	__mbsnrtowcs after last change.

2007-05-02  Jakub Jelinek  <jakub@redhat.com>

	* stdio-common/vfprintf.c (process_string_arg): Use a VLA rather than
	fixed length array for ignore.

2007-04-30  Ulrich Drepper  <drepper@redhat.com>

	[BZ #4438]
	* stdio-common/vfprintf.c (process_string_arg): Don't overflow the
	stack for large precisions.
	* stdio-common/test-vfprintf.c (main): Add test for large
	precision.
2007-07-12 15:15:03 +00:00
Jakub Jelinek
6d4cde8a3d 2007-04-30 Jakub Jelinek <jakub@redhat.com>
* stdio-common/printf_fp.c (___printf_fp): Don't print negative sign
	for exponent 0.
	* stdio-common/tfformat.c (sprint_doubles): Add a new test.
2007-07-12 15:14:41 +00:00
Jakub Jelinek
e8fc28f713 2007-04-30 Jakub Jelinek <jakub@redhat.com>
[BZ #4439]
	* resolv/inet_ntop.c (inet_ntop4): Take terminating '\0' into
	account in the size check.
	* resolv/tst-inet_ntop.c: New test.
	* resolv/Makefile (tests): Add tst-inet_ntop.
2007-07-12 15:14:24 +00:00
Jakub Jelinek
12a928f614 2007-04-28 Ulrich Drepper <drepper@redhat.com>
[BZ #4102]
	* sysdeps/posix/getaddrinfo.c (default_labels): Assign separate
	label to Teredo tunnel addresses 2001://32.
2007-07-12 15:13:58 +00:00
Jakub Jelinek
e010bc493e 2007-04-27 Ulrich Drepper <drepper@redhat.com>
[BZ #4342]
	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Allow
	hexa-decimal floats without exponent.
	* stdio-common/tstscanf.c (main): Adjust Test 8 test for success.
2007-07-12 15:13:47 +00:00
Jakub Jelinek
843c2a7ac5 2007-04-27 Ulrich Drepper <drepper@redhat.com>
[BZ #3213]
	* locale/C-translit.h.in: Add entry for U2044.

	* locales/translit_neutral: Add entry for U2044.
2007-07-12 15:13:29 +00:00
Jakub Jelinek
e046ba1d02 2007-04-25 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/check_pf.c (make_request): Return -1 instead
	of 0 after the out_fail label.

2007-03-18  Jakub Jelinek  <jakub@redhat.com>

	* nscd/gai.c: Include alloca.h.
	(__libc_use_alloca): Define.

2007-03-15  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Never
	reallocate the buffer, instead fail for MSG_TRUNC or for EBUSY
	NLMSG_ERR.  Instead use a page sized buffer.
	* sysdeps/unix/sysv/linux/check_pf.c (make_request): Use page sized
	buffer.

2007-03-02  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Retry with
	a new netlink socket if NLMSG_ERR -EBUSY is seen after some MSG_TRUNC
	message.

2007-02-27  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Fix
	memory reallocation.
2007-07-12 15:12:29 +00:00
Jakub Jelinek
bdaa36ac5f 2007-04-25 Jakub Jelinek <jakub@redhat.com>
* libio/bits/stdio.h (fgetc_unlocked): Add extern inline optimized
	version.
2007-07-12 15:11:35 +00:00
Jakub Jelinek
e93acb4d82 2007-04-25 Ulrich Drepper <drepper@redhat.com>
[BZ #4406]
	* iconv/gconv_charset.h (strip): Allow ':'
	* iconv/iconv_open.c (iconv_open): Adjust comment.
2007-07-12 15:11:24 +00:00
Jakub Jelinek
050962abe4 2007-04-24 Ulrich Drepper <drepper@redhat.com>
[BZ #4411]
	* locales/en_ZA: Update int_select.
	Patch by Dwayne Bailey <dwayne@translate.org.za>.
2007-07-12 15:11:14 +00:00
Jakub Jelinek
14fdf7eb73 2007-04-23 Jakub Jelinek <jakub@redhat.com>
[BZ #4405]
	* iconvdata/gconv-modules (E13B): Add a missing slash to the alias
	name.  Patch by Aurelien Jarno <aurelien@aurel32.net>.
2007-07-12 15:10:53 +00:00
Jakub Jelinek
cd3178cf6a 2007-04-23 Jakub Jelinek <jakub@redhat.com>
[BZ #4381]
	* nss/nss_files/files-hosts.c (HOST_DB_LOOKUP): Ensure sufficient
	alignment of buffer and tmp_buffer.
	* nis/nss_nis/nis-hosts.c (internal_nis_gethostent_r,
	internal_gethostbyname2_r, _nss_nis_gethostbyaddr_r): Ensure sufficient
	alignment of buffer.
	* resolv/nss_dns/dns-hosts.c (getanswer_r): Likewise.  Handle buflen
	bigger than INT_MAX.
	* resolv/nss_dns/dns-network.c (getanswer_r): Likewise.  Add errnop and
	h_errnop arguments.  Fail if buflen is too small.
	(_nss_dns_getnetbyname_r, _nss_dns_getnetbyaddr_r): Adjust callers.
2007-07-12 15:10:44 +00:00
Jakub Jelinek
d70abb0d67 2007-04-19 Ulrich Drepper <drepper@redhat.com>
* include/sys/mman.h: Mark madvise hidden.
	* misc/madvise.c: Add libc_hidden_def.
2007-07-12 15:10:31 +00:00
Jakub Jelinek
9432bd85dd 2007-04-17 Ulrich Drepper <drepper@redhat.com>
[BZ #4368]
	* stdlib/stdlib.h: Remove obsolete part of comment for realpath.
2007-07-12 15:10:21 +00:00
Jakub Jelinek
5c9d441547 2007-04-16 Ulrich Drepper <drepper@redhat.com>
[BZ #4364]
	* posix/unistd.h (_XOPEN_VERSION): Define appropriately for SUSv3.
2007-07-12 15:09:59 +00:00
Jakub Jelinek
2c9837f613 2007-04-13 Jakub Jelinek <jakub@redhat.com>
[BZ #4344]
	* elf/ldconfig.c (search_dir): Fix 2 off-by-2 errors.
	Reported by David Anderson <davea42@earthlink.net>.
2007-07-12 15:09:50 +00:00
Jakub Jelinek
e9ca1d1e46 2007-04-13 Jakub Jelinek <jakub@redhat.com>
* stdio-common/printf_fp.c (___printf_fp): Fix exponent -4
	special case handling when wcp == wstartp + 1.  Fix a comment typo.
	* stdio-common/tfformat.c (sprint_doubles): Add a new testcase.

2007-02-21  Ulrich Drepper  <drepper@redhat.com>

	[BZ #4070]
	* stdio-common/printf_fp.c (___printf_fp): Handle a few more
	special cases.
	* stdio-common/tfformat.c (sprint_doubles): Some more tests.

2007-02-19  Ulrich Drepper  <drepper@redhat.com>

	* stdio-common/printf_fp.c (___printf_fp): Cleanups and minor
	optimization.
2007-07-12 15:09:42 +00:00
Jakub Jelinek
c7e8255e97 2007-04-06 Jakub Jelinek <jakub@redhat.com>
* nis/nis_domain_of.c (__nis_domain_of): New function.
	* include/rpcsvc/nislib.h (__nis_domain_of): New prototype.
	* nis/nis_lookup.c (nis_lookup): Use __nis_domain_of.
	* nis/nis_call.c (rec_dirsearch): Likewise.
	(first_shoot): Likewise.  Remove search_parent_first argument.
	(struct nis_server_cache): Rename search_parent_first field
	to search_parent.
	(nis_server_cache_search, nis_server_cache_add): Rename
	search_parent_first argument to search_parent.
	(__nisfind_server): Likewise.  If search_parent, call
	__nis_domain_of.
2007-07-12 15:09:19 +00:00
Jakub Jelinek
fec80cc7a1 2007-04-05 Jakub Jelinek <jakub@redhat.com>
* nis/nis_call.c (__nisfind_server): Replace (*dir)->do_servers
	with obj->do_servers after first_shoot.

2007-03-21  Jakub Jelinek  <jakub@redhat.com>

	* nis/nis_call.c: Include bits/libc-lock.h, sys/stat.h, unistd.h.
	(nis_server_cache, nis_server_cache_lock, nis_cold_start_mtime): New
	variables.
	(nis_server_cache_search, nis_server_cache_add): New functions.
	(__nisfind_server): Use them.  Add dbp and flags argument, if
	call __nisbind_create.
	(__nisbind_create): Add server_used and current_ep arguments,
	only call __nis_findfastest if server_used is ~0.
	(__do_niscall2, __prepare_niscall): Adjust callers.
	(ckey_cache, ckey_cache_size, ckey_cache_allocated, ckey_cache_pid,
	ckey_cache_euid, ckey_cache_lock): New variables.
	(get_ckey): New function.
	(__nisbind_connect): If not dbp->use_udp, pass IPPROTO_TCP to
	__pmap_getnisport.  Save __pmap_getnisport result in
	dbp->addr.sin_port if non-zero.  Use get_ckey to create conversation
	key.
	* nis/nis_lookup.c (nis_lookup): Likewise.
	* nis/nis_table.c (nis_list): Likewise.
	* nis/rpcsvc/nislib.h (__nisbind_create, __nisfind_server): Adjust
	prototypes.

	* nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_getpwnam_r,
	_nss_nisplus_getpwuid_r): Pass USE_DGRAM flag to nis_list.
	* nis/nss_nisplus/nisplus-service.c (_nss_nisplus_getservbyname_r,
	_nss_nisplus_getservbyport_r): Likewise.
	* nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyname_r,
	_nss_nisplus_getnetbyaddr_r): Likewise.
	* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_getspnam_r): Likewise.
	* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r,
	_nss_nisplus_getntohost_r): Likewise.
	* nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_getrpcbyname_r,
	_nss_nisplus_getrpcbynumber_r): Likewise.
2007-07-12 15:08:56 +00:00
Jakub Jelinek
168ac89a01 2007-04-01 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ia64/fpu/fesetround.c (fesetround): Return 0 on success
	and 1 on failure.
2007-07-12 15:08:45 +00:00
Jakub Jelinek
07483b08e8 2007-04-01 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Use
	math_opt_barrier and math_force_eval macros.

2007-03-27  Jakub Jelinek  <jakub@redhat.com>

	[BZ #3306]
	* math/math_private.h (math_opt_barrier, math_force_eval): Define.
	* sysdeps/i386/fpu/math_private.h: New file.
	* sysdeps/x86_64/fpu/math_private.h: New file.
	* math/s_nexttowardf.c (__nexttowardf): Use math_opt_barrier and
	math_force_eval macros.  Use "+m" constraint on asm rather than
	"=m" and "m".
	* math/s_nextafter.c (__nextafter): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c (__nexttoward):
	Likewise.
	* sysdeps/ieee754/flt-32/s_nextafterf.c (__nextafterf): Likewise.
	* sysdeps/ieee754/ldbl-128/s_nexttoward.c (__nexttoward): Likewise.
	* sysdeps/ieee754/ldbl-96/s_nexttoward.c (__nexttoward): Likewise.
	* sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Use
	math_opt_barrier and math_force_eval macros.
	* sysdeps/ieee754/ldbl-128/s_nextafterl.c (__nextafterl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_nextafterl.c (__nextafterl): Likewise.
	* sysdeps/i386/fpu/s_nexttoward.c: Include float.h.
	(__nexttoward): Use math_opt_barrier and
	math_force_eval macros.  Use "+m" constraint on asm rather than
	"=m" and "m".  Only use asm to force double result if
	FLT_EVAL_METHOD is 2.
	* sysdeps/i386/fpu/s_nexttowardf.c: Include float.h.
	(__nexttowardf): Use math_opt_barrier and
	math_force_eval macros.  Use "+m" constraint on asm rather than
	"=m" and "m".  Only use asm to force double result if
	FLT_EVAL_METHOD is not 0.
	* sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: Include float.h.
	(__nexttowardf): Use math_opt_barrier and
	math_force_eval macros.  If FLT_EVAL_METHOD is not 0, force
	x to float using asm.
	* sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c: Include float.h.
	(__nldbl_nexttowardf): Use math_opt_barrier and
	math_force_eval macros.  If FLT_EVAL_METHOD is not 0, force
	x to float using asm.
	* sysdeps/ieee754/ldbl-96/s_nexttowardf.c: Include float.h.
	(__nexttowardf): Use math_opt_barrier and math_force_eval
	macros.  If FLT_EVAL_METHOD is not 0, force x to float using asm.
	* math/bug-nextafter.c (zero, inf): New variables.
	(main): Add new tests.
	* math/bug-nexttoward.c (zero, inf): New variables.
	(main): Add new tests.
2007-07-12 15:08:18 +00:00
Jakub Jelinek
af37260772 2007-03-30 Jakub Jelinek <jakub@redhat.com>
* libio/libio.h (__underflow, __uflow, __overflow, __wunderflow,
	__wuflow, __woverflow, _IO_getc, _IO_putc, _IO_peekc_locked, _IO_padn,
	_IO_sgetn, _IO_seekoff, _IO_seekpos, _IO_getwc, _IO_putwc, _IO_wpadn):
	Remove __THROW.
	* libio/fileops.c (new_do_write, _IO_file_xsgetn_mmap,
	_IO_file_xsgetn_maybe_mmap): Likewise.
	* libio/oldfileops.c (old_do_write): Likewise.
	* libio/libioP.h (_IO_switch_to_get_mode, _IO_switch_to_wget_mode,
	_IO_init_marker, _IO_init_wmarker, _IO_default_uflow,
	_IO_wdefault_uflow, _IO_default_setbuf, _IO_default_seekpos,
	_IO_do_write, _IO_new_do_write, _IO_old_do_write, _IO_wdo_write,
	_IO_flush_all_lockp, _IO_flush_all, _IO_cleanup,
	_IO_flush_all_linebuffered, _IO_new_fgetpos, _IO_old_fgetpos,
	_IO_new_fsetpos, _IO_old_fsetpos, _IO_new_fgetpos64,
	_IO_old_fgetpos64, _IO_new_fsetpos64, _IO_old_fsetpos64,
	_IO_file_setbuf, _IO_file_seekoff, _IO_file_xsputn, _IO_file_xsgetn,
	_IO_file_underflow, _IO_file_underflow_mmap,
	_IO_file_underflow_maybe_mmap, _IO_file_overflow, _IO_file_attach,
	_IO_file_open, _IO_file_fopen, _IO_file_write, _IO_file_read,
	_IO_file_sync, _IO_file_close_it, _IO_file_finish,
	_IO_new_file_attach, _IO_new_file_close_it, _IO_new_file_finish,
	_IO_new_file_fopen, _IO_new_file_setbuf, _IO_file_setbuf_mmap,
	_IO_new_file_sync, _IO_new_file_underflow, _IO_new_file_overflow,
	_IO_new_file_seekoff, _IO_new_file_write, _IO_new_file_xsputn,
	_IO_old_file_setbuf, _IO_old_file_seekoff, _IO_old_file_xsputn,
	_IO_old_file_underflow, _IO_old_file_overflow, _IO_old_file_attach,
	_IO_old_file_fopen, _IO_old_file_write, _IO_old_file_sync,
	_IO_old_file_close_it, _IO_old_file_finish, _IO_wfile_xsputn,
	_IO_wfile_setbuf, _IO_wfile_sync, _IO_wfile_underflow,
	_IO_wfile_overflow, _IO_wfile_seekoff, _IO_old_proc_open,
	_IO_old_proc_close, _IO_getdelim, _IO_flush_all_internal,
	_IO_adjust_column_internal, _IO_default_uflow_internal,
	_IO_default_xsgetn_internal, _IO_wdefault_xsputn_internal,
	_IO_wdefault_xsgetn_internal, _IO_wdefault_uflow_internal,
	_IO_file_setbuf_internal, _IO_file_seekoff_internal,
	_IO_file_xsputn_internal, _IO_file_xsgetn_internal,
	_IO_file_close_it_internal, _IO_file_underflow_internal,
	_IO_file_overflow_internal, _IO_file_attach_internal,
	_IO_file_fopen_internal, _IO_file_sync_internal,
	_IO_file_finish_internal, _IO_wfile_xsputn_internal,
	_IO_wfile_seekoff_internal, _IO_wfile_sync_internal,
	_IO_switch_to_wget_mode_internal, _IO_padn_internal,
	_IO_switch_to_get_mode_internal, _IO_seekoff_unlocked,
	_IO_seekpos_unlocked): Likewise.
	(_IO_strtod, _IO_dtoa, _IO_outfloat, _IO_read, _IO_write,
	_IO_lseek, _IO_close, _IO_fstat): Remove unused prototypes.
2007-07-12 15:07:31 +00:00
Jakub Jelinek
57924f941f 2007-03-23 Jakub Jelinek <jakub@redhat.com>
* scripts/check-local-headers.sh: Filter out sys/capability.h.

2007-03-22  Jakub Jelinek  <jakub@redhat.com>

	* config.h.in (HAVE_LIBCAP): Add.
	* nscd/selinux.h: Include sys/capability.h rather than non-existent
	sys/capabilities.h.
	* nscd/selinux.c (preserve_capabilities): Use cap_free instead of
	free_caps.  Cast away const from 4th cap_set_flag argument.
2007-07-12 15:07:13 +00:00