Commit Graph

6023 Commits

Author SHA1 Message Date
Ulrich Drepper 18a74157a6 * sysdeps/posix/getaddrinfo.c: Implement handling of DCCP, UDPlite,
and SCTP.
2008-05-14 17:55:57 +00:00
Ulrich Drepper 372bfcac73 * sysdeps/posix/getaddrinfo.c: Implement handling of DCCP and
UDPlite.

	* nss/getent.c (ahosts_keys_int): Handle all known socket types.

	* inet/netinet/in.h (IPPIPPROTO_DCCP, IPPROTO_UDPLITE): Define.

	* sysdeps/unix/sysv/linux/bits/socket.h (SOCK_DCCP): Define.
2008-05-14 17:33:37 +00:00
Ulrich Drepper f05ac8f503 * po/lt.po: New file. From Lituanian translation team.
sysdep-rtld-routines): Add tlsdesc and dl-tlsdesc for elf subdir.
	sysdep-rtld-routines): Add tlsdesc and dl-tlsdesc for elf subdir.
2008-05-13 22:49:03 +00:00
Ulrich Drepper c9ff0187a6 Introduce TLS descriptors for i386 and x86_64.
* include/inline-hashtab.h: New file, copied from 2005's
	libiberty, with fix for memory leak imported afterwards by
	Glauber de Oliveira Costa.
	* elf/tlsdeschtab.h: New file.
	* elf/dl-reloc.c (_dl_try_allocate_static_tls): Extract from...
	(_dl_allocate_static_tls): ... here.  Rearrange failure path.
	(CHECK_STATIC_TLS): Move to...
	* elf/dynamic-link.h: ... this file.
	(TRY_STATIC_TLS): New macro.
	* elf/dl-conflict.c (CHECK_STATIC_TLS, TRY_STATIC_TLS): Override.
	* elf/elf.h (R_386_TLS_GOTDESC, R_386_TLS_DESC_CALL,
	R_386_TLS_DESC): Define.
	(R_X86_64_PC64, R_X86_GOTOFF64, R_X86_64_GOTPC32): Merge from
	binutils.
	(R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL,
	R_X86_64_TLSDESC): Define.
	(R_386_NUM, R_X86_64_NUM): Adjust.
	* sysdeps/i386/Makefile (sysdep-dl-routines, sysdep_routines,
	systep-rtld-routines): Add tlsdesc and dl-tlsdesc for elf subdir.
	(gen-as-const-headers): Add tlsdesc.sym to csu subdir.
	* sysdeps/i386/dl-lookupcfg.h: New file.  Introduce _dl_unmap to
	release tlsdesc_table.
	* sysdeps/i386/dl-machine.h: Include dl-tlsdesc.h.
	(elf_machine_type_class): Mark R_386_TLS_DESC as PLT class.
	(elf_machine_rel): Handle R_386_TLS_DESC.
	(elf_machine_rela): Likewise.
	(elf_machine_lazy_rel): Likewise.
	(elf_machine_lazy_rela): Likewise.
	* sysdeps/i386/dl-tls.h (struct dl_tls_index): Name it.
	* sysdeps/i386/dl-tlsdesc.S: New file.
	* sysdeps/i386/dl-tlsdesc.h: New file.
	* sysdeps/i386/tlsdesc.c: New file.
	* sysdeps/i386/tlsdesc.sym: New file.
	* sysdeps/i386/bits/linkmap.h (struct link_map_machine): Add
	tlsdesc_table.
	* sysdeps/x86_64/Makefile (sysdep-dl-routines, sysdep_routines,
	systep-rtld-routines): Add tlsdesc and dl-tlsdesc for elf subdir.
	(gen-as-const-headers): Add tlsdesc.sym to csu subdir.
	* sysdeps/x86_64/dl-lookupcfg.h: New file.  Introduce _dl_unmap to
	release tlsdesc_table.
	* sysdeps/x86_64/dl-machine.h: Include dl-tlsdesc.h.
	(elf_machine_runtime_setup): Set up lazy TLSDESC GOT entry.
	(elf_machine_type_class): Mark R_X86_64_TLSDESC as PLT class.
	(elf_machine_rel): Handle R_X86_64_TLSDESC.
	(elf_machine_rela): Likewise.
	(elf_machine_lazy_rel): Likewise.
	* sysdeps/x86_64/dl-tls.h (struct dl_tls_index): Name it.
	(__tls_get_addr): Do not declare for non-shared compiles.
	* sysdeps/x86_64/dl-tlsdesc.S: New file.
	* sysdeps/x86_64/dl-tlsdesc.h: New file.
	* sysdeps/x86_64/tlsdesc.c: New file.
	* sysdeps/x86_64/tlsdesc.sym: New file.
	* sysdeps/x86_64/bits/linkmap.h (struct link_map_machine): Add
	tlsdesc_table for both 32- and 64-bit structs.
2008-05-13 05:41:30 +00:00
Ulrich Drepper a7eb802f11 [BZ #3406]
2008-02-11  Joseph Myers  <joseph@codesourcery.com>
	[BZ #3406]
	* sysdeps/ieee754/flt-32/w_expf.c (o_threshold): Correct value.
	* math/libm-test.inc (exp_test): Test 88.72269439697265625.
2008-05-11 17:49:25 +00:00
Roland McGrath 19928ef0ae [BZ #6505]
2008-05-10  Roland McGrath  <roland@redhat.com>
	[BZ #6505]
	* sysdeps/unix/sysv/linux/sys/user.h: Replace with #error stub.
2008-05-11 00:44:42 +00:00
Ulrich Drepper c5ee217f09 * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee751_j0l): Use __finitel.
(__ieee754_y0l): Likewise.
	* sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l): Likewise.
	(__ieee754_y1l): Likewise.
	* sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Use __ldexpl.
	* sysdeps/ieee754/ldbl-128/s_log1pl.c: Kill bogus prototypes for
	frexpl and ldexpl.  math_private.h provides them and the latter
	is not even used.
	(__log1pl): Use __frexpl.
2008-05-10 23:36:40 +00:00
Ulrich Drepper 1eb946b935 * include/resolv.h: Adjust __libc_res_nquery and __libc_res_nsend
prototypes.
	* include/arpa/nameser_compat.h: Define T_UNSPEC.
	* nis/Versions (libnss_nis): Export _nss_nis_gethostbyname4_r.
	(libnss_nisplus): Export _nss_nisplus_gethostbyname4_r.
	* nis/nss_nis/nis-hosts.c (LINE_PARSER): Change to also handle
	af==AF_UNSPEC.
	(_nss_nis_gethostbyname4_r): New function.
	* nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent):
	Change to also handle af==AF_UNSPEC.
	(get_tablename): New function.  Use it to avoid duplication.
	(_nss_nisplus_gethostbyname4_r): New function.
	* nscd/aicache.c (addhstaiX): Use gethostbyname4_r function is
	available.
	* nss/Versions (libnss_files): Export _nss_files_gethostbyname4_r.
	* nss/nss.h: Define struct gaih_addrtuple.
	* nss/nss_files/files-hosts.c (LINE_PARSER): Change to also handle
	af==AF_UNSPEC.
	(_nss_files_gethostbyname4_r): New function.
	* resolv/Versions (libnss_dns): Export _nss_dns_gethostbyname4_r.
	* resolv/gethnmaddr.c: Adjust __libc_res_nsearch and __libc_res_nquery
	calls.
	* resolv/res_query.c (__libc_res_nquery): Take two additional
	parameters for second answer buffer.  Handle type=T_UNSPEC to mean
	look up IPv4 and IPv6.
	Change all callers.
	* resolv/res_send.c (__libc_res_nsend): Take five aditional parameters
	for an additional query and answer buffer.  Pass to send_vc and
	send_dg.
	(send_vc): Send possibly two requests and receive two answers.
	(send_dg): Likewise.
	* resolv/nss_dns/dns-host.c: Adjust calls to __libc_res_nsearch and
	__libc_res_nquery.
	(_nss_dns_gethostbyname4_r): New function.
	(gaih_getanswer_slice): Likewise.
	(gaih_getanswer): Likewise.
	* resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Adjust
	__libc_res_nquery call.
	* resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise.
	(_nss_dns_getnetbyname_r): Adjust __libc_res_nsearch call.
	* sysdeps/posix/getaddrinfo.c: Use gethostbyname4_r function is
	available.
2008-05-10 23:27:39 +00:00
Jakub Jelinek b7fb703afd * sysdeps/sparc/sparc32/Makefile: Use -mcpu=v7 for initfini.s build.
* sysdeps/sparc/sparc64/Makefile: Use -mcpu=v9 for initfini.s build.
2008-05-05  David S. Miller  <davem@davemloft.net>

	* sysdeps/sparc/sparc32/Makefile: Use -mcpu=v7 for initfini.s build.
	* sysdeps/sparc/sparc64/Makefile: Use -mcpu=v9 for initfini.s build.
2008-05-06 09:13:49 +00:00
Roland McGrath 8bb52dbf9b * sysdeps/mach/hurd/bits/ioctls.h (NL0, NL1, TAB0, TAB1, TAB2, CR0,
CR1, CR2, CR3, FF0, FF1, BS0, BS1): Undefine these at start if they
	are already defined to avoid collision with termios.h.
2008-05-06 00:07:02 +00:00
Jakub Jelinek a86a7a3946 * sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/Makefile [$(subdir) = stdlib]: 
(gen-as-const-headers): Add it. 
* sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S: New file. 
* sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c: Likewise. 
* sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S: Likewise. 
* sysdeps/unix/sysv/linux/sparc/sparc32/swapcontext.S: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/Makefile [$(subdir) = stdlib]:
	(gen-as-const-headers): Add it.
	* sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/swapcontext.S: Likewise.
2008-05-05 09:34:18 +00:00
Jakub Jelinek 4ce349e559 * sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S: Add support for
six system call parameters. 
* sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: Likewise.
2008-05-01  David S. Miller  <davem@davemloft.net>

	* sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S: Add support for
	six system call parameters.
	* sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: Likewise.
2008-05-05 09:17:00 +00:00
Ulrich Drepper 1ce0612b99 Define RUSAGE_THREAD and RUSAGE_LWP. 2008-05-01 05:37:45 +00:00
Jakub Jelinek d4e92d9e08 * sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c (semctl):
Pass "union semun" properly in to sys_ipc, it must be passed 
by value, not by reference.
2008-04-25  David S. Miller  <davem@davemloft.net>

	* sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c (semctl):
	Pass "union semun" properly in to sys_ipc, it must be passed
	by value, not by reference.
2008-04-29 17:07:03 +00:00
Ulrich Drepper 7eb5e6c9bd * nscd/Makefile (nscd-cflags): Set back to -fpie.
* nscd/nscd.h (mem_in_flight): Add attribute_tls_model_ie.
	* nscd/connections.c (mem_in_flight): Likewise.

	* nscd/nscd.h (dbs): Make hidden.

	* sysdeps/unix/sysv/linux/times.c (__times): Fix check for EFAULT.
	Avoid returning -1, return 0 instead.
2008-04-22 15:53:59 +00:00
Ulrich Drepper 0073dd2d49 * resolv/res_mkquery.c (__res_nopt): Use NS_PUT16 instead of ns_put16. 2008-04-20 04:56:49 +00:00
Jakub Jelinek 39546e34c2 * sysdeps/unix/sysv/linux/dl-osinfo.h: Include fcntl.h.
2008-04-17  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/dl-osinfo.h: Include fcntl.h.
2008-04-17 08:32:24 +00:00
Ulrich Drepper 9e113ecd80 * sysdeps/unix/sysv/linux/powerpc/bits/mathinline.h (__signbitl):
Also use for 32-bit.
2008-04-12 04:17:47 +00:00
Ulrich Drepper 3b6d574e01 * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c (__nearbyintl): Use
__nextafter instead of nextafter to avoid local PLT.
2008-04-12 03:49:11 +00:00
Ulrich Drepper c3a0ead420 * sysdeps/powerpc/fpu/e_sqrt.c: Avoid call to fetestexcept.
* sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
2008-04-12 03:39:30 +00:00
Ulrich Drepper 3cc56f9208 * sysdeps/powerpc/fpu/fe_nomask.c: Add libm_hidden_def. Include
<fenv_libc.h> instead of <fenv.h>.
2008-04-12 02:39:29 +00:00
Ulrich Drepper 246ec41199 * sysdeps/powerpc/fpu/fenv_libc.h: Add libm_hidden_proto for
__fe_nomask_env.
	* sysdeps/powerpc/fpu/fe_nomask.c: Add libm_hidden_def.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c: Likewise.

	* sysdeps/powerpc/bits/fenv.h: Make safe for C++.

	* sysdeps/unix/sysv/linux/powerpc/bits/mathinline.h: New file.
	* sysdeps/powerpc/fpu/fegetexcept.c (__fegetexcept): Rename
	function from fegetexcept and make old name weak alias.
	* include/fenv.h: Declare __fegetexcept.
	* sysdeps/powerpc/fpu/fedisblxcpt.c: Use __fegetexcept instead of
	fegetexcept.
	* sysdeps/powerpc/fpu/feenablxcpt.c: Likewise.
	* sysdeps/powerpc/fpu/fraiseexcpt.c (__feraiseexcept): Avoid call
	to fetestexcept.
	* sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Use __frexpl
	instead of frexpl to avoid local PLT.
	* math/s_significandl.c (__significandl): Use __ilogbl instead of
	ilogbl to avoid local PLT.
	* sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (__expm1l): Use __ldexpl
	instead of ldexpl to avoid local PLT.
	* sysdeps/ieee754/ldbl-128ibm/e_expl.c (__ieee754_expl): Use
	__roundl not roundl to avoid local PLT.
	* sysdeps/ieee754/ldbl-128/e_j0l.c: Use function names which avoid
	local PLTs.  Use __sincosl instead of separate sinl and cosl
	calls.
	* sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise.
2008-04-12 00:51:34 +00:00
Ulrich Drepper 2dc4a2fd9e * sysdeps/unix/sysv/linux/configure.in: Bump minimal kernel
version for ppc64 to 2.4.21 since without it makecontext will fail.
2008-04-11 21:13:48 +00:00
Ulrich Drepper cf3a8c7f42 * elf/tls-macros.h (__TLS_GET_ADDR): Define according to the ABI
in use.
	(TLS_LD): Use __TLS_GET_ADDR instead of .__tls_get_addr.
	(TLS_GD): Likewise.
2008-04-11 21:04:10 +00:00
Ulrich Drepper c1e6b459c8 [BZ4997]
* sysdeps/powerpc/powerpc32/fpu/s_lround.S (__lround): Fixed erroneous
	result when x is +/-nextafter(+/-0.5,-/+1) i.e. all 1's in the
	mantissa.
	* sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S (__llround):
	Likewise.  Also account for when x is an odd number between 2^52
	and 2^53-1.
	* sysdeps/powerpc/powerpc64/fpu/s_llround.S (__llround): Likewise.
	* sysdeps/powerpc/powerpc64/fpu/s_llroundf.S (__llroundf): Likewise.
	* math/libm-test.inc (lround_test, llround_test): Added test cases to
	detect aforementioned erroneous conditions.
2008-04-11 19:32:37 +00:00
Ulrich Drepper 5d59f4a50f * include/features.h (__GLIBC_MINOR__): Bump to 8.
* sysdeps/powerpc/powerpc32/fpu/s_lroundf.S: Remove duplicate comment.
	* sysdeps/powerpc/powerpc32/power5+/fpu/s_llroundf.S: Likewise.
	* sysdeps/powerpc/powerpc32/power6/fpu/s_llroundf.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/s_lrint.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/s_lround.S: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/s_lroundf.S: Likewise.
2008-04-11 17:33:24 +00:00
Ulrich Drepper 153cf97250 [BZ #5741]
2008-01-24  Steven Munroe  <sjmunroe@us.ibm.com>
	[BZ #5741]
	* sysdeps/powerpc/powerpc64/dl-machine.h (PPC_DCBT, PPC_DCBF):
	Define additonal Data Cache Block instruction macros.
	(elf_machine_fixup_plt): Add dcbt for opd and plt entries.
	Replace dcbst with dcbf and sync with sync/isync.
2008-04-11 00:02:52 +00:00
Ulrich Drepper d2207f32b1 * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_type_class):
Always set ELF_RTYPE_CLASS_PLT.
	(elf_machine_lookup_noexec_p, elf_machine_lookup_noplt_p): Delete.
2008-04-10 18:26:16 +00:00
Ulrich Drepper 13d83320ff * sysdeps/powerpc/powerpc32/power4/hp-timing.c: New file.
* sysdeps/powerpc/powerpc32/power4/hp-timing.h: New file.
	* sysdeps/powerpc/powerpc64/hp-timing.h [_ARCH_PWR4] (HP_TIMING_NOW):
	For ISA 2.01 and later replace mftb with mfspr 268.

	* sysdeps/i386/i686/memcpy.S: Optimize copying of equally aligned
	buffers.
2008-04-10 16:50:07 +00:00
Ulrich Drepper 5f7aead5c4 [BZ #5768]
2008-02-19  Steven Munroe  <sjmunroe@us.ibm.com>
	[BZ #5768]
	* sysdeps/powerpc/fpu/Makefile (libm-tests): Add test-powerpc-snan.
	* sysdeps/powerpc/fpu/test-powerpc-snan.c: New file.

2008-02-18  Steven Munroe  <sjmunroe@us.ibm.com>

	[BZ #5768]
	* sysdeps/powerpc/powerpc32/fpu/s_isnan.S: New file.
	* sysdeps/powerpc/powerpc32/fpu/s_isnan.c: Removed.
	* sysdeps/powerpc/powerpc64/fpu/s_isnan.S: New file.
	* sysdeps/powerpc/powerpc64/fpu/s_isnan.c: Removed.
2008-04-10 14:17:22 +00:00
Ulrich Drepper 1ee82cfa18 isnan implementation for ppc32. 2008-04-10 14:15:27 +00:00
Ulrich Drepper 3e852ba889 isnan implementation for Power6x 64-bit 2008-04-10 05:59:52 +00:00
Ulrich Drepper 3b32d8a259 * sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S: New file.
* sysdeps/powerpc/powerpc32/power5/fpu/s_isnanf.S: New file.
	* sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S: New file.
	* sysdeps/powerpc/powerpc32/power6/fpu/s_isnanf.S: New file.
	* sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S: New file.
	* sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S: New file.
	* sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S: New file.
2008-04-10 05:59:13 +00:00
Ulrich Drepper facd1d8ef3 [BZ #4407]
2008-02-12  Pete Eberlein  <eberlein@us.ibm.com>
	[BZ #4407]
	* sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r):
	Preserve sign in signgamp when x is zero.
2008-04-10 04:58:03 +00:00
Ulrich Drepper aece054b30 * sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S: New File.
* sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.c: Removed.
	* sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S: New File.
	* sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.c: Removed.
	* sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S: New File.
	* sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S: New File.
2008-04-10 04:53:40 +00:00
Ulrich Drepper 2120860435 [BZ #4314]
* sysdeps/i386/i686/memcpy.S: Optimize copying of aligned buffers.
2008-04-09 20:01:52 +00:00
Ulrich Drepper 2f611ada05 [BZ #5209]
* sysdeps/unix/sysv/syscalls.list: times syscalls doesn't return
	an error value.
2008-04-09 18:47:07 +00:00
Ulrich Drepper 6c30d38fdd [BZ #5436]
2008-04-09  Ulrich Drepper  <drepper@redhat.com>
	* stdlib/tst-makecontext.c: Change parameter to cf to negative
	value to check for correct sign extension.

	[BZ #5436]
	* sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext):
	Copy 64-bit parameter values even though this is not required in
	the standard.

	* sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Record return
	PC save.
2008-04-09 18:30:12 +00:00
Ulrich Drepper d03eba121c [BZ #6040]
* locales/fr_FR: Fix abmon, abday, d_ftm, grouping.
2008-04-08 00:17:58 +00:00
Ulrich Drepper 221e523037 * sysdeps/unix/opendir.c (__alloc_dir): If allocation fails for size
provided through st_blksize, try the default size before giving up.
2008-03-30 08:51:55 +00:00
Ulrich Drepper e8a3212650 [BZ #5939]
* sysdeps/posix/tempname.c (__gen_tempname): Correct flag selection.
2008-03-30 03:30:38 +00:00
Ulrich Drepper 48cc060e64 * sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: Add open
and creat system calls.
	* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove open system
	call.
	* sysdeps/unix/sysv/linux/ia64/syscalls.list: Remove open and creat
	system calls.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
2008-03-27 16:23:55 +00:00
Ulrich Drepper f96853beaf * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefined ARG_MAX if
<linux/limits.h> has defined it.
	* sysdeps/unix/sysv/linux/sys/param.h: Define NCARGS to the legacy
	ARG_MAX value and prevent ARG_MAX from being defined by the kernel
	headers.
	* sysdeps/unix/sysv/linux/sysconf.c: Define legacy_ARG_MAX and use
	it instead of ARG_MAX.
2008-03-27 15:20:38 +00:00
Ulrich Drepper fde15fdc5b * posix/gai.conf: Fix comment for scope nullbits.
* sysdeps/posix/getaddrinfo.c (gaiconf_init): If /bits is not present,
	default to 128 bits for v4 mapped addresses.
2008-03-26 17:45:14 +00:00
Ulrich Drepper 87b9b50f0d * sysdeps/s390/fpu/fegetenv.c (fegetenv): Remove PTRACE_PEEKUSER
ptrace call to get the ieee_instruction_pointer from the kernel.
	* sysdeps/s390/fpu/fesetenv.c (fesetenv): Remove PTRACE_POKEUSER
	ptrace call to set the ieee_instructtion_pointer.
	* sysdeps/unix/sysv/linux/s390/sys/user.h (struct _user_regs_struct):
	Add comment that ieee_instruction_pointer is always 0.
2008-03-24 20:01:15 +00:00
Ulrich Drepper af0498dc95 [BZ #5857]
2008-03-09  Andreas Jaeger  <aj@suse.de>
	[BZ #5857]
	* sysdeps/ieee754/dbl-64/s_rint.c (__rint): Handle j0==18.
	* sysdeps/ieee754/dbl-64/s_nearbyint.c (__nearbyint): Likewise.
  	Patch by Mark Elliott <mark.h.elliott@lmco.com>.

	* math/libm-test.inc (nearbyint_test): Add new test cases from #5857.
	(rint_test): Likewise.
2008-03-24 19:57:55 +00:00
Ulrich Drepper e093c24743 * sysdeps/unix/sysv/linux/adjtime.c: Correctly use
ADJ_OFFSET_SS_READ.
2008-03-24 16:11:32 +00:00
Ulrich Drepper 0ab7632d38 * sysdeps/unix/sysv/linux/bits/sched.h: Add new CLONE_* flags,
remove CLONE_STOPPED.
2008-03-24 16:03:48 +00:00
Ulrich Drepper 72e6cdfa2c Remove useless "if" before "free". 2008-03-19 06:43:34 +00:00
Jakub Jelinek 354b75277b * sysdeps/unix/sysv/linux/dl-sysdep.h: Use __ASSEMBLER__ instead
of ASSEMBLER. nptl/ 
* sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead 
of ASSEMBLER. 
* sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise. 
* sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2008-03-18  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/dl-sysdep.h: Use __ASSEMBLER__ instead
	of ASSEMBLER.
2008-03-17 23:41:58 +00:00
Andreas Jaeger b45ee712d5 [BZ #5753]
* sysdeps/ia64/ieee754.h: Use protected namespace 
__BIG_ENDIAN/__LITTLE_ENDIAN. 
* sysdeps/ieee754/ieee754.h: Likewise. 
Patch by Aurelien Jarno <aurelien@aurel32.net>.
2008-03-10 06:21:21 +00:00
Roland McGrath d2ea0b9659 2008-03-08 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler):
	Clear DF bit in thread state's eflags.
	Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
2008-03-08 21:39:00 +00:00
Ulrich Drepper 368a8dec0a * sysdeps/unix/sysv/linux/dl-sysdep.c: Avoid unnecessary code for
.o file.
	* elf/Makefile (routines): Add dl-sysdep.
	(elide-routines.os): Likewise.
2008-03-08 17:52:13 +00:00
Ulrich Drepper 7c22c7ec9a [BZ #5786]
* elf/dl-sysdep.c: Undefine ROUND after use.
	* sysdeps/generic/ldsodefs.h [HAVE_DL_DISCOVER_OSVERSION]
	(struct rtld_global_ro): Add _dl_tls_get_addr_soft element.
	* elf/rtld.c (rtld_global_ro): Initialize _dl_discover_osversion.
	* sysdeps/unix/sysv/linux/dl-osinfo.h: Move _dl_discover_osversion
	to ...
	* sysdeps/unix/sysv/linux/dl-sysdep.c: ...here.
	* sysdeps/unix/sysv/linux/dl-sysdep.h: Declare _dl_discover_osversion
	if necessary.
	* sysdeps/unix/sysv/linux/sysconf.c: Handle _SC_ARG_MAX here.
2008-03-08 07:35:10 +00:00
Ulrich Drepper 93025f9373 * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Add
_dl_tls_get_addr_soft element.
	* elf/rtld.c (rtld_global_ro): Initialize _dl_tls_get_addr_soft.
	* elf/Versions (ld): Don't export _dl_tls_get_addr_soft.
	* dlfcn/dlinfo.c (dlinfo_doit): Access dl_tls_get_addr_soft through
	GLRO.
	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise.
	* elf/dl-tls.c (_dl_tls_get_addr_soft): Use attribute_hidden instead
	of internal_function.
2008-03-08 05:44:56 +00:00
Ulrich Drepper 443db17889 [BZ #5778]
* sysdeps/unix/sysv/linux/pathconf.h: Declare
	__statfs_chown_restricted.
	* sysdeps/unix/sysv/linux/fpathconf.c: Call __statfs_chown_restricted
	for _PC_CHOWN_RESTRICTED.
	* sysdeps/unix/sysv/linux/pathconf.c: Likewise.
	Implement __statfs_chown_restricted.
	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
	_POSIX_CHOWN_RESTRICTED value to zero.

2008-02-26  Harsha Jagasia  <harsha.jagasia@amd.com>
2008-03-08 01:57:18 +00:00
Ulrich Drepper 78c2bf0eb4 * sysdeps/x86_64/rtld-memset.c: New file.
2008-2-26  Harsha Jagasia  <harsha.jagasia@amd.com>

	* sysdeps/x86_64/cacheinfo.c (NOT_USED_RIGHT_NOW): Remove ifdef guards.

	* sysdeps/x86_64/memset.S: Rewrite non-SSE code path as tuned for AMD
	Barcelona machine.  Make default fall through branch of
	__x86_64_preferred_memory_instruction check as the integer code path.

2007-10-15  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/x86_64/cacheinfo.c
	(__x86_64_preferred_memory_instruction): New variable.
	(init_cacheinfo): Initialize __x86_64_preferred_memory_instruction.

	* sysdeps/x86_64/memset.S: Rewrite.

2008-01-08  Jakub Jelinek  <jakub@redhat.com>
	* malloc/malloc.c (public_cALLOc): For arenas other than
2008-03-07 17:55:11 +00:00
Ulrich Drepper dff3751503 * include/stdio.h (__asprintf_chk, __dprintf_chk,
__obstack_printf_chk): New prototypes.
	(__vasprintf_chk, __vdprintf_chk,
	__obstack_vprintf_chk): Likewise.
	Add libc_hidden_proto.
	* libio/obprintf.c
	(_IO_obstack_jumps): No longer static, add attribute_hidden.
	* libio/bits/stdio-ldbl.h (__asprintf_chk, __dprintf_chk,
	__obstack_printf_chk, __vasprintf_chk, __vdprintf_chk,
	__obstack_vprintf_chk): Add __LDBL_REDIR_DECL.
	* libio/bits/stdio2.h (__asprintf_chk, __dprintf_chk,
	__obstack_printf_chk, __vasprintf_chk, __vdprintf_chk,
	__obstack_vprintf_chk): New prototypes.
	(asprintf, __asprintf, dprintf, obstack_printf, vasprintf, vdprintf,
	obstack_vprintf): New inlines.
	* debug/dprintf_chk.c: New file.
	* debug/vdprintf_chk.c: New file.
	* debug/asprintf_chk.c: New file.
	* debug/vasprintf_chk.c: New file.
	* debug/obprintf_chk.c: New file.
	* debug/tst-chk1.c (do_test): Add asprintf and obstack_printf tests.
	* debug/Versions (__asprintf_chk, __dprintf_chk, __obstack_printf_chk,
	__vasprintf_chk, __vdprintf_chk, __obstack_vprintf_chk): Export
	@@GLIBC_2.8.
	* debug/Makefile: Build asprintf_chk, vasprintf_chk, dprintf_chk,
	vdprintf_chk and obprintf_chk, set CFLAGS for them.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c (__nldbl___vasprintf_chk,
	__nldbl___vdprintf_chk, __nldbl___obstack_vprintf_chk): Add
	libc_hidden_proto.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl___vasprintf_chk,
	__nldbl___vdprintf_chk, __nldbl___obstack_vprintf_chk): New prototypes.
	* sysdeps/ieee754/ldbl-opt/Versions (__nldbl___asprintf_chk,
	__nldbl___vasprintf_chk, __nldbl___dprintf_chk, __nldbl___vdprintf_chk,
	__nldbl___obstack_printf_chk, __nldbl___obstack_vprintf_chk): Export
	@@GLIBC_2.8.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add asprintf_chk,
	vasprintf_chk, dprintf_chk, vdprintf_chk, obstack_printf_chk and
	obstack_vprintf_chk.
	* sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-dprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-asprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vdprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vasprintf_chk.c: New file.
2008-03-05 07:05:13 +00:00
Ulrich Drepper 2e3e9ff16c * sysdeps/unix/sysv/linux/sys/timerfd.h: New file.
* sysdeps/unix/sysv/linux/Makefile [subdir=misc] (sysdep_headers): Add
	sys/timerfd.h.
	* sysdeps/unix/sysv/linux/syscalls.list: Add timerfd_create,
	timerfd_gettime, timerfd_settime.
	* sysdeps/unix/sysv/linux/Versions: Add timerfd_create,
	timerfd_gettime, timerfd_settime for GLIBC_2.8.
2008-02-10 19:43:56 +00:00
Ulrich Drepper 9d9ba87333 Header for timerfd interfaces. 2008-02-10 19:43:07 +00:00
Roland McGrath 363a641b1c * Makeconfig (sysd-rules-targets): New variable.
* sysdeps/unix/make-syscalls.sh: Use it in the rules emitted.
	* sysdeps/unix/Makefile (omit-deps): Append variants for each target.
2008-02-01 00:01:25 +00:00
Ulrich Drepper b4b166af4f * sysdeps/i386/fpu/ftestexcept.c (fetestexcept): Use short for fnstsw. 2008-01-22 18:58:31 +00:00
Andreas Jaeger 0aa678b799 [BZ #5040] * sysdeps/unix/sysv/linux/x86_64/sys/epoll.h (enum EPOLL_EVENTS): Add EPOLLRDHUP. 2008-01-21 21:19:51 +00:00
Ulrich Drepper a0f6c236e0 [BZ #5628]
* bits/shm.h: Fix comment describing shmid_ds.
	* sysdeps/gnu/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/shm.h: Likewise.
	Patch by Hareesh Nagarajan <hareesh.nagarajan@gmail.com>.
2008-01-16 23:49:43 +00:00
Ulrich Drepper 6107639e64 * sysdeps/posix/getaddrinfo.c (default_labels): Adjust for change
of names of in in6_addr.
	(default_precedence): Likewise.
	* sysdeps/unix/sysv/linux/cmsg_nxthdr.c: Include <stddef.h> for
	NULL definition.
2008-01-16 19:47:17 +00:00
Ulrich Drepper a53d3f8295 [BZ #5607]
2008-01-16  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5607]
	* conform/data/fcntl.h-data: Fix posix_fadvise and posix_fallocate
	prototypes.
	* conform/data/limits.h-data: Adjust limits changed in v6 and add
	additional suffixes.
	* conform/data/mqueue.h-data: Fix typo in mq_curmsgs entry.
	Add optional functions mq_timedreceive and mq_timedsend.
	* conform/data/netdb.h-data: Add more AI_* and EAI_* constants.
	* conform/data/pthread.h-data: Fix prototype of
	pthread_condattr_setclock.  pthread_sigmask is not required in v6.
	* conform/data/semaphore.h-data: Allow time.h definitions.
	* conform/data/signal.h-data: Likewise.
	* conform/data/stdio.h-data: getw and putw are not required in v6.
	* conform/data/stdlib.h-data: Change setstate prototype.
	* conform/data/string.h-data: Fix strerror_r prototype.
	* conform/data/time.h-data: Fix typo in TIMER_ABSTIME definition.
	* conform/data/unistd.h-data: pthread_atfork not required in v6.
	Fix readlink prototype.
	* conform/data/netinet/in.h-data: Add const to in6addr_any and
	in6addr_loopback.
	* inet/netinet/in.h: Cleanup namespace.
	* posix/regex.h: Likewise.
	* resolv/netdb.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/in.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.
2008-01-16 10:11:18 +00:00
Andreas Jaeger 3a4ef5252b [BZ #5600] (struct signalfd_siginfo): Use 64-bit type for ssi_ptr to sync with Linux kernel header. 2008-01-12 16:33:43 +00:00
Ulrich Drepper 49029a669d * sysdeps/posix/getaddrinfo.c (rfc3484_sort): Store result of
native interface lookup in all the relevant places.
2008-01-10 22:30:58 +00:00
Ulrich Drepper 0efd19566d * sysdeps/posix/getaddrinfo.c (sort_results): Remove service_order
field.  Use sockaddr_in6 for source_addr.
	(get_scope): Change type of parameter to sockaddr_in6.  Adjust.
	(match_prefix): Likewise.
	(get_label): Likewise.
	(get_precedence): Likewise.
	(rfc3484_sort): Change to use indirect access to results array.
	Adjust to use of sockaddr_in6.  Replace service_order test with
	simple index comparison.
	(getaddrinfo): Define order array.  Initialize it.  Don't initialize
	service_order field.  Adjust qsort_t calls.  Access sorted result
	array indirectly through order array.
	* posix/tst-rfc3484.c: Adjust for change of rfc3484_sort.
	* posix/tst-rfc3484-2.c: Likewise.
	* posix/tst-rfc3484-3.c: Likewise.
2008-01-10 20:00:52 +00:00
Ulrich Drepper 148e12ed12 * sysdeps/unix/sysv/linux/i386/makecontext.S (__makecontext): Avoid
clobbering memory at or above uc_stack.ss_sp + uc_stack.ss_size.
	* stdlib/Makefile: Add rules to build and run tst-makecontext2.
	* stdlib/tst-makecontext2.c: New test.
2008-01-09 19:35:21 +00:00
Ulrich Drepper ad586879b1 * sysdeps/unix/sysv/linux/check_pf.c (make_request): Fix
recognition of interface family.
2008-01-03 00:25:03 +00:00
Ulrich Drepper ee269826ab (intel_02_known): New entry 0x3f. 2007-12-23 19:32:28 +00:00
Ulrich Drepper 52386be756 * sysdeps/unix/sysv/linux/x86_64/init-first.c (__vdso_gettimeofday):
Return long.
	(__vdso_clock_gettime): Likewise.
2007-12-15 01:12:13 +00:00
Ulrich Drepper 78b767a0a6 * sysdeps/unix/sysv/linux/x86_64/sysdep.h (INTERNAL_SYSCALL_ERROR_P):
First cast argument to long
	* sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h: Functions
	return long.
2007-12-14 23:38:23 +00:00
Ulrich Drepper a78814a99a [BZ #5477]
2007-12-12  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/i386/i486/bits/string.h (memmove): Define as macro.
	(memmove): Rename to __memmove_g, with __asm__ ("memmove").
	* sysdeps/s390/bits/string.h (__strlen_g, __strcpy_g, __strncpy_g,
	__strcat_g, __strncat_g): Add __asm__.

2007-12-12  Ulrich Drepper  <drepper@redhat.com>

	[BZ #5477]
	* io/fchmodat.c: Fix typo in stub_warning use.
	Patch by Petr Salinger.
2007-12-12 18:03:27 +00:00
Ulrich Drepper ae18718f58 * sysdeps/unix/sysv/linux/adjtime.c: Use ADJ_OFFSET_SS_READ if
possible.
	* sysdeps/unix/sysv/linux/kernel-features.h
	(__ASSUME_ADJ_OFFSET_SS_READ): Define for 2.6.24.
	* sysdeps/unix/sysv/linux/sys/timex.h (ADJ_OFFSET_SS_READ): Define.
2007-12-10 23:51:42 +00:00
Ulrich Drepper 26e21e7554 [BZ #5441, BZ #5452, BZ #5454]
2007-12-07  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5441]
	* stdio-common/vfscanf.c (_IO_vfwscanf): Don't free ptrs_to_free
	structure, it's allocated with alloca.
	* stdio-common/Makefile (tests): Add bug21.
	* stdio-common/bug21.c: New file.

2007-12-06  Aurelien Jarno  <aurelien@aurel32.net>

	[BZ #5452]
	* sysdeps/unix/sysv/linux/bits/sched.h: Use __extension__
	  keyword for gcc's braced-groups.

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

	[BZ #5454]
	* inet/ether_line.c: Strip hostname of whitespaces.
	* inet/Makefile (tests): Add tst-ether_line.
	* inet/tst-ether_line.c: New file.
2007-12-07 16:50:11 +00:00
Ulrich Drepper da0ff4ae5b [BZ #5439]
* sysdeps/unix/sysv/linux/sys/signalfd.h: Fix use of __nonnull.
2007-12-03 06:17:25 +00:00
Ulrich Drepper 51bd20d93a [BZ #5435]
* sysdeps/unix/sysv/linux/i386/makecontext.S: Align stack.
2007-12-03 04:57:30 +00:00
Ulrich Drepper 609bb0712d * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Add open
and creat system calls.
2007-11-24 03:23:39 +00:00
Ulrich Drepper 715db78bd4 * sysdeps/unix/sysv/linux/check_native.c: Include <asm/types.h>.
* nscd/mem.c (gc): Don't allocate arrays on the stack if they can
	Return zero in case the thread library is not NPTL.
2007-11-24 03:12:25 +00:00
Ulrich Drepper 37143323d8 * sysdeps/s390/bits/string.h (strlen, strcpy, strncpy, strcat,
strncat): Define as macros to avoid compile errors.
2007-11-23 15:21:46 +00:00
Ulrich Drepper dcdcf4b9c9 * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Add open and
creat entries.
2007-11-23 15:20:57 +00:00
Ulrich Drepper ea2c47b6be * sysdeps/unix/sysv/linux/Makefile [subdir=inet] (sysdep_headers):
Add netiucv/iucv.h.
	* sysdeps/unix/sysv/linux/netiucv/iucv.h: New file.
	* sysdeps/unix/sysv/linux/opensock.c (__opensock): Add AF_IUCV
	protocol.
	* sysdeps/unix/sysv/linux/sa_len.c (__libc_sa_len): Likewise.
	* sysdeps/unix/sysv/linux/s390/opensock.c: New file.
	* sysdeps/unix/sysv/linux/s390/sa_len.c: New file.
2007-11-23 15:19:41 +00:00
Ulrich Drepper 7ea8eb02b0 [BZ #5382]
* nscd/nscd.h (NSCD_THREAD_STACKSIZE): Define.
	* nscd/connections.c (start_threads): Use NSCD_THREAD_STACKSIZE.
	* nscd/mem.c (gc): Don't allocate arrays on stack if it can
	overflow it.

	* sysdeps/unix/sysv/linux/nscd_setup_thread.c (setup_thread):
	Return zero in case thread library is not NPTL.
2007-11-23 06:37:58 +00:00
Ulrich Drepper ee72b97189 * sysdeps/posix/getaddrinfo.c (defaults_scopes, scopes): New variables.
(get_scope): For IPv4 scope, use scopes table.
	(fini): Free scopes table if necessary.
	(free_scopelist): New function.
	(scopecmp): New function.
	(gaiconf_init): Also handle scopev4 entries.
	* posix/tst-rfc3484.c (do_test): Initialize scopes.
	* posix/tst-rfc3484-2.c (do_test): Likewise.
	* posix/gai.conf: Document scopev4 defaults.
	* posix/Makefile (tests): Add tst-rfc3484-3.
	* posix/tst-rfc3484-3.c: New file.
2007-11-20 00:41:22 +00:00
Ulrich Drepper f4a7976578 * sysdeps/posix/getaddrinfo.c (default_labels): Describe entry for
Teredo tunnels.
2007-11-19 17:31:40 +00:00
Roland McGrath 9ef78a1208 2007-11-18 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/bits/fcntl.h (O_CLOEXEC): Fix value.
2007-11-18 22:51:16 +00:00
Ulrich Drepper 238346abad * sysdeps/unix/sysv/linux/Makefile [subdir=misc] (sysdep_headers):
Add sys/signalfd.h and sys/eventfd.h.
2007-11-17 08:49:48 +00:00
Andreas Jaeger a05826e208 Fix size of union. 2007-11-15 19:06:06 +00:00
Ulrich Drepper 1e2692c922 * sysdeps/unix/sysv/linux/check_native.c (__check_native): Simplify
significantly.  The device type is also part of the ifinfomsg data.
2007-11-15 00:03:41 +00:00
Ulrich Drepper 773e79b316 * include/ifaddrs.h: Remove in6ai_temporary.
(struct in6addrinfo): Add index element.
	Declare __check_native.
	* inet/Makefile (aux): Add check_native.
	* sysdeps/unix/sysv/linux/check_native.c: New file.
	* sysdeps/unix/sysv/linux/check_pf.c: No need to recognize
	IFA_F_TEMPORARY.  Pass back ifa_index.
	* sysdeps/posix/getaddrinfo.c: Remove netlink compatibility code.
	(rfc3484_sort): Add new parameter.  Implement rule 7 correctly:
	call __check_native if necessary.
	(getaddrinfo): Fill in index field.  Use qsort_r instead of qsort
	to sort addresses.  Pass information about the results.
	* posix/tst-rfc3484.c: Adjust for addition of index field and change
	of rfc3484_sort interface.
	* posix/tst-rfc3484-2.c: Likewise.
2007-11-14 06:58:35 +00:00
Ulrich Drepper e1cedf8c1f Hurd-specific kernel-features.h. 2007-11-13 16:28:42 +00:00
Roland McGrath 9c0e11e62e 2007-09-13 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/i386/i586/memcpy_chk.S: New file.
	* sysdeps/i386/i586/mempcpy_chk.S: Likewise.
	* sysdeps/i386/i586/memset_chk.S: Likewise.
2007-11-13 01:56:18 +00:00
Ulrich Drepper 6f3914d5a3 * include/ifaddrs.c (struct in6addrinfo): Add prefixlen field.
* sysdeps/unix/sysv/linux/check_pf.c (make_request): Always return
	list of interfaces.  Also store prefix length.
	* sysdeps/posix/getaddrinfo.c (sort_result): Add prefixlen element.
	(rfc3484_sort): In rule 9, for IPv4 addresses count only matching
	prefix if source and destination address are in the same subnet.
	(getaddrinfo): Always call __check_pf.  Fill in prefixlen field.
	Always look for matching record in in6ai list.
	Correct source_addr_len value for IPv6->IPv4 converted records.
2007-11-12 23:55:58 +00:00
Ulrich Drepper 01e7fdbb74 * sysdeps/pthread/aio_misc.c (handle_fildes_io): Avoid unnecessary
complications for 64-bit platforms.
2007-11-10 19:40:16 +00:00
Ulrich Drepper 7f745396c4 * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to..
* sysdeps/unix/sysv/linux/open64_2.c: ...here.  New file.
	* sysdeps/unix/sysv/linux/Makefile [subdir=io] (sysdep_routines): Add
	open64_2.
	* sysdeps/unix/sysv/linux/ia64/syscalls.list: Add open and creat
	entries.
	* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
	* sysdeps/wordsize-64/alphasort.c: New file.
	* sysdeps/wordsize-64/alphasort64.c: New file.
	* sysdeps/wordsize-64/fseeko.c: New file.
	* sysdeps/wordsize-64/fseeko64.c: New file.
	* sysdeps/wordsize-64/ftello.c: New file.
	* sysdeps/wordsize-64/ftello64.c: New file.
	* sysdeps/wordsize-64/ftw.c: New file.
	* sysdeps/wordsize-64/ftw64.c: New file.
	* sysdeps/wordsize-64/iofgetpos.c: New file.
	* sysdeps/wordsize-64/iofgetpos64.c: New file.
	* sysdeps/wordsize-64/iofopen.c: New file.
	* sysdeps/wordsize-64/iofopen64.c: New file.
	* sysdeps/wordsize-64/iofsetpos.c: New file.
	* sysdeps/wordsize-64/iofsetpos64.c: New file.
	* sysdeps/wordsize-64/lockf.c: New file.
	* sysdeps/wordsize-64/lockf64.c: New file.
	* sysdeps/wordsize-64/mkostemp.c: New file.
	* sysdeps/wordsize-64/mkostemp64.c: New file.
	* sysdeps/wordsize-64/mkstemp.c: New file.
	* sysdeps/wordsize-64/mkstemp64.c: New file.
	* sysdeps/wordsize-64/scandir.c: New file.
	* sysdeps/wordsize-64/scandir64.c: New file.
	* sysdeps/wordsize-64/tmpfile.c: New file.
	* sysdeps/wordsize-64/tmpfile64.c: New file.
	* sysdeps/wordsize-64/versionsort.c: New file.
	* sysdeps/wordsize-64/versionsort64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/aio_read.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/aio_read64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/aio_write.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/aio_write64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/creat64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/getdirentries.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/getdirentries64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/lio_listio.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/lio_listio64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/open64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/openat.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/openat64.c: New file.

	* crypt/sha256-crypt.c: Fix a comment.
	* crypt/sha512-crypt.c: Likewise.
2007-11-10 19:36:06 +00:00
Ulrich Drepper f6ed654cab * sysdeps/x86_64/memset.S: Add sfence after movnti. 2007-11-08 01:07:04 +00:00
Ulrich Drepper ffb1b88282 * nscd/aicache.c (addhstaiX): Check herrno after IPv4 lookup only
when the lookup call failed.

	* nscd/nscd.h (struct database_dyn): Rename prunelock to prune_lock.
	Add prune_cond and wakeup_time.
	(CACHE_PRUNE_INTERNAL): Define.
	Update declarations of prune_cache and setup_thread.
	* nscd/connections.c (dbs): Update initializers.
	(CACHE_PRUNE_INTERNAL): Moved to nscd.h.
	(nscd_init): Default number of threads is now 4.
	(invalidate_cache): Take lock before calling prune_cache.
	(handle_request): If SELinux forbids the request, say so.
	(readylist_cond): Use static initializer.
	(nscd_run_prune): New function.  Used only by pruning threads.
	(nscd_run_worder): Renamed from nscd_run.  Remove support for pruning
	here.
	(fd_ready): Update nscd_run reference.
	(start_threads): No need to initialize readylist_cond.
	Start pruning threads separately.
	* nscd/nscd_setup_thread.c: Change return value type to int and always
	return 0.
	* sysdeps/unix/sysv/linux/nscd_setup_thread.c: Change return value type
	to int and return nonzero value if we can use the TID address hack.
	* nscd/cache.c (cache_add): If next wakeup time of cleanup thread for
	the database is later than the new entry's timeout, update the
	wakeup time and wake the cleanup thread.
	(prune_cache): Return seconds the next entry in the database is still
	valid.  Remove locking for pruning here.
	* nscd/nscd.conf: Document default number of threads.
2007-11-06 00:45:40 +00:00
Ulrich Drepper 41ff2a4999 * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Make sure
stack is properly aligned for the target function.
	Correct unwind info.
2007-10-31 19:25:15 +00:00
Ulrich Drepper 94833f118b [BZ #5040]
* sysdeps/unix/sysv/linux/sys/epoll.h (EPOLLRDHUP): Add value.
2007-10-28 01:34:10 +00:00
Ulrich Drepper 05d691474f [BZ #3112]
2007-10-27  Andreas Jaeger  <aj@suse.de>
	[BZ #3112]
	* sysdeps/ia64/backtrace.c (init): Free shared library if incorrect.
	(__cleanup): Free shared library when exiting.
	* sysdeps/i386/backtrace.c (init): Free shared library if incorrect.
	(__cleanup): Free shared library when exiting.
2007-10-28 01:29:21 +00:00
Ulrich Drepper ad3371fbac [BZ #5208]
2007-10-23  Andreas Jaeger  <aj@suse.de>
	[BZ #5208]
	* sysdeps/unix/sysv/linux/readahead.c (__readahead): Use
	__LONG_LONG_PAIR to handle little endian byte order.
	Suggested by abhishekrai@google.com
2007-10-28 01:08:55 +00:00
Jakub Jelinek 46ae88502d 2007-10-06 David S. Miller <davem@davemloft.net>
* configure.in: Add sparcv9v2 and sparc64v2.
	* scripts/config.sub: Likewise.
	* configure: Regenerate.
	* elf/elf.h (HWCAP_SPARC_N2): New.
	* sysdeps/sparc/dl-procinfo.h (_DL_HWCAP_COUNT): Bump to 8.
	* sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add 'v9v2'.
	(HWCAP_IMPORTANT): Add HWCAP_SPARC_N2.
	* sysdeps/sparc/sparc32/sparcv9/sparcv9v2/memcpy.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/sparcv9v2/memset.S: New file.
	* sysdeps/sparc/sparc64/sparcv9v2/memcpy.S: New file.
	* sysdeps/sparc/sparc64/sparcv9v2/memset.S: New file.
2007-10-06  David S. Miller  <davem@davemloft.net>

	* configure.in: Add sparcv9v2 and sparc64v2.
	* scripts/config.sub: Likewise.
	* configure: Regenerate.
	* elf/elf.h (HWCAP_SPARC_N2): New.
	* sysdeps/sparc/dl-procinfo.h (_DL_HWCAP_COUNT): Bump to 8.
	* sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add 'v9v2'.
	(HWCAP_IMPORTANT): Add HWCAP_SPARC_N2.
	* sysdeps/sparc/sparc32/sparcv9/sparcv9v2/memcpy.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/sparcv9v2/memset.S: New file.
	* sysdeps/sparc/sparc64/sparcv9v2/memcpy.S: New file.
	* sysdeps/sparc/sparc64/sparcv9v2/memset.S: New file.
2007-10-19 06:59:33 +00:00
Jakub Jelinek ed13ccf1f7 * sysdeps/x86_64/memset.S (bzero): Renamed to __bzero. Add
weak_alias.
2007-10-17  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/x86_64/memset.S (bzero): Renamed to __bzero.  Add
	weak_alias.
2007-10-18 00:09:32 +00:00
Roland McGrath bd92328d5e 2007-10-17 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/bits/fcntl.h [__USE_GNU__] (F_DUPFD_CLOEXEC): New.
	* sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Implement it.
2007-10-17 22:32:35 +00:00
Ulrich Drepper 1aa5e4d74f * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Define F_DUPFD_CLOEXEC.
* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h:  Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise.
2007-10-17 18:55:39 +00:00
Ulrich Drepper fc4837e5d7 * sysdeps/posix/getaddrinfo.c (getaddrinfo): When sorting addresses
and admin selects to be able to replace the gai.conf file, lock
	data structures around the qsort call.
2007-10-17 16:05:34 +00:00
Ulrich Drepper 406f28dbe5 * sysdeps/x86_64/cacheinfo.c: Comment out code added in support of
new memset.
	too high for the improvements.  Implement bzero unconditionally for
	use in libc.
2007-10-17 15:58:16 +00:00
Ulrich Drepper ac1cb5da08 * sysdeps/x86_64/memset.S: Revert to old version for now. The cost is
too high for the improvements.

2007-10-17  Ulrich Drepper  <drepper@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
2007-10-17 15:44:30 +00:00
Ulrich Drepper 6a649d25bb Help the compiler recognize unreachable code on 32-bit machines.
2007-10-16  Ulrich Drepper  <drepper@redhat.com>

	* time/tzfile.c (__tzfile_read): Help the compiler recognize
	unreachable code on 32-bit machines.
2007-10-16 23:25:46 +00:00
Ulrich Drepper 69819d9223 (__tzfile_read): Take extra memory requested by caller into account when copying TZ string.
2007-10-16  Ulrich Drepper  <drepper@redhat.com>

	* time/tzfile.c (__tzfile_read): Take extra memory requested by caller
	into account when copying TZ string.
2007-10-16 22:37:35 +00:00
Jakub Jelinek 8d137b6098 * sysdeps/x86_64/memset.S (memset): Fix sse2_nt_move
PIC indirect jump.
	* sysdeps/x86_64/memset.S (memset): Fix sse2_nt_move
	PIC indirect jump.
2007-10-16 09:23:09 +00:00
Jakub Jelinek 0308ad66c1 * sysdeps/x86_64/memset.S: Jump from bzero to memset using
a local label rather than HIDDEN_JUMPTARGET.
2007-10-16  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/x86_64/memset.S: Jump from bzero to memset using
	a local label rather than HIDDEN_JUMPTARGET.
2007-10-16 08:54:19 +00:00
Ulrich Drepper e2b393bc69 * sysdeps/x86_64/cacheinfo.c (__x86_64_shared_cache_size): Define.
(init_cacheinfo): Initialize it.
	* sysdeps/x86_64/memset.S: Use __x86_64_shared_cache_size.
	Always define bzero.
	Remove non-glibc code.
	* sysdeps/x86_64/bzero.S: Make an empty file.

2007-10-15  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/x86_64/cacheinfo.c
	(__x86_64_preferred_memory_instruction): New.
	(init_cacheinfo): Initialize __x86_64_preferred_memory_instruction.

	* sysdeps/x86_64/memset.S: Rewrite.

	* nss/getXXbyYY_r.c (REENTRANT_NAME): Mangle startp and start_fct
2007-10-16 05:59:53 +00:00
Ulrich Drepper 340779f775 Make an empty file. 2007-10-16 05:59:15 +00:00
Ulrich Drepper 6f55ed8885 * sysdeps/posix/getaddrinfo.c (struct sort_result): Add
service_order.
	(rfc3484_sort): Make sure that even of qsort doesn't support
	stable sorting it is stable by comparing service_order.
	(getaddrinfo): Initialize service_order.
2007-10-14 17:58:03 +00:00
Jakub Jelinek d0b5557df8 * sysdeps/gnu/netinet/tcp.h: Include sys/socket.h if __USE_MISC.
(struct tcp_md5sig): Change tcpm_addr type to struct sockaddr_storage.
	* inet/netinet/in.h: Don't include bits/socket.h.
	* sysdeps/unix/sysv/linux/bits/socket.h: Only check _SYS_SOCKET_H
	macro.
	* sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise.
2007-10-11  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/gnu/netinet/tcp.h: Include sys/socket.h if __USE_MISC.
	(struct tcp_md5sig): Change tcpm_addr type to struct sockaddr_storage.

	* inet/netinet/in.h: Don't include bits/socket.h.
	* sysdeps/unix/sysv/linux/bits/socket.h: Only check _SYS_SOCKET_H
	macro.
	* sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise.
2007-10-11 16:32:14 +00:00
Ulrich Drepper 5a01ab7b83 * sysdeps/x86_64/cacheinfo.c (init_cacheinfo): Work around problem
with some Pentium Ds.
2007-10-10 01:22:45 +00:00
Ulrich Drepper e3f8e04910 * sysdeps/unix/sysv/linux/eventfd_read.c (eventfd_read): Use
__read not read.
	* sysdeps/unix/sysv/linux/eventfd_write.c (eventfd_write): Use
	__write not write.
2007-10-09 03:56:53 +00:00
Ulrich Drepper a6fa53288f [BZ #3924]
* sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix a few
	more little bugs in creating the stack frame when pltexit has to
	be called.
2007-10-07 05:31:00 +00:00
Ulrich Drepper c039eedd66 [BZ #4407]
* sysdeps/ieee754/dbl-64/e_lgamma_r.c: Fix *signgamp for -0.0.
	* sysdeps/ieee754/flt-32/e_lgammaf_r.c: Likewise.
	* sysdeps/ieee754/ldbl-96/e_lgammal_r.c: Likewise.
	* math/libm-test.inc: Add test for this case.

	Half the patch by Christian Iseli <christian.iseli@licr.org>.
2007-10-06 18:37:30 +00:00
Ulrich Drepper 6789aaaa97 2007-10-04 Jakub Jelinek <jakub@redhat.com>
2007-10-03  Jakub Jelinek  <jakub@redhat.com>
2007-10-05 20:32:30 +00:00
Ulrich Drepper 8e351378b7 * sysdeps/gnu/netinet/tcp.h: Define TCP_MD5SIG, TCP_MD5SIG_MAXKEYLEN,
struct tcp_md5sig.  Extend struct tcp_info according to recent kernels.

	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add eventfd,
	evetnfd_read, eventfd_write.
	* sysdeps/unix/sysv/linux/eventfd.c: New file.
	* sysdeps/unix/sysv/linux/eventfd_read.c: New file.
	* sysdeps/unix/sysv/linux/eventfd_write.c: New file.
	* sysdeps/unix/sysv/linux/sys/eventfd.h: New file.
	* sysdeps/unix/sysv/linux/Versions: Export eventfd, evetnfd_read,
	eventfd_write for GLIBC_2.7.
2007-10-05 18:55:57 +00:00
Ulrich Drepper 34c2c09296 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add signalfd.
* sysdeps/unix/sysv/linux/signalfd.c: New file.
	* sysdeps/unix/sysv/linux/sys/signalfd.h: New file.
	* sysdeps/unix/sysv/linux/Versions: Export signalfd for GLIBC_2.7.
2007-10-05 16:31:37 +00:00
Ulrich Drepper 385b4cf4c5 * sysdeps/generic/ldsodefs.h (struct dl_scope_free_list): Store
void * pointers instead of struct link_map **.
	(_dl_scope_free): Change argument type to void *.
	* include/link.h (struct link_map): Change type of l_reldeps
	to struct link_map_reldeps, move l_reldepsact into that
	struct too.
	* elf/dl-deps.c: Include atomic.h.
	(_dl_map_object_deps): Only change l->l_initfini when it is
	fully populated, use _dl_scope_free for freeing it.  Optimize
	removal of libs from reldeps by using l_reserved flag, when
	some removal is needed, allocate a new list instead of
	reallocating and free the old with _dl_scope_free.  Adjust
	for l_reldeps and l_reldepsact changes.
	* elf/dl-lookup.c (add_dependency): Likewise.  Reorganize to allow
	searching in l_initfini and l_reldeps without holding dl_load_lock.
	* elf/dl-fini.c (_dl_sort_fini): Adjust for l_reldeps and
	l_reldepsact changes.
	* elf/dl-close.c (_dl_close_worker): Likewise.
	* elf/dl-open.c (_dl_scope_free): Change argument type to void *.
2007-09-29 06:58:31 +00:00
Jakub Jelinek e6eec9cef2 * sysdeps/posix/getaddrinfo.c (getaddrinfo): Use
close_not_cancel_no_status instead of close.
2007-09-24  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Use
	close_not_cancel_no_status instead of close.
2007-09-24 15:18:25 +00:00
Ulrich Drepper 0435403c9d * sysdeps/x86_64/cacheinfo.c (__x86_64_data_cache_size_half): Renamed
from __x86_64_core_cache_size_half.
	(init_cacheinfo): Compute shared cache size for AMD processors with
	shared L3 correctly.
	* sysdeps/x86_64/memcpy.S: Adjust for __x86_64_data_cache_size_half
	name change.
	Patch in large parts by Evandro Menezes.
2007-09-22 05:54:03 +00:00
Ulrich Drepper e1db0493fd * sysdeps/posix/getaddrinfo.c (getaddrinfo): Avoid unnecessary
open/close when determining source addresses.
2007-09-19 22:12:22 +00:00
Jakub Jelinek 006805680f * sysdeps/sparc/sparc32/elf/start.S: Remove cfi_* markup.
* sysdeps/sparc/sparc64/elf/start.S: Likewise. 
* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__thread_start): Likewise. 
* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__thread_start): Likewise.
	* sysdeps/sparc/sparc32/elf/start.S: Remove cfi_* markup.
	* sysdeps/sparc/sparc64/elf/start.S: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__thread_start): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__thread_start): Likewise.
2007-09-18 19:29:44 +00:00
Ulrich Drepper b90395e6e9 * sysdeps/generic/ldsodefs.h (DL_LOOKUP_GSCOPE_LOCK): New definition.
* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Or in
	DL_LOOKUP_GSCOPE_LOCK into flags after THREAD_GSCOPE_SET_FLAG ().
	* elf/dl-sym.c (do_sym): Likewise.
	* include/link.h (struct link_map): Add l_serial field.
	* elf/dl-object.c (_dl_new_object): Initialize l_serial.
	* elf/dl-lookup.c (add_dependency): Add flags argument.
	Remember map->l_serial, if DL_LOOKUP_GSCOPE_LOCK is among
	flags, use THREAD_GSCOPE_RESET_FLAG before and
	THREAD_GSCOPE_SET_FLAG after
	__rtld_lock_lock_recursive (GL(dl_load_lock)) to avoid deadlock.
	Don't dereference map until it has been found on some list.
	If map->l_serial changed, return -1.
2007-09-18 19:20:56 +00:00
Ulrich Drepper 874aa52349 * include/stdio.h (__isoc99_fscanf, __isoc99_scanf,
__isoc99_sscanf, __isoc99_vscanf): New prototypes.
	(__isoc99_vsscanf, __isoc99_vfscanf): New prototypes, add
	libc_hidden_proto.
	* include/wchar.h (__isoc99_fwscanf, __isoc99_wscanf,
	__isoc99_swscanf, __isoc99_vwscanf): New prototypes.
	(__isoc99_vswscanf, __isoc99_vfwscanf): New prototypes,
	add libc_hidden_proto.
	* libio/stdio.h (fscanf, scanf, sscanf, vfscanf, vscanf,
	vsscanf): Redirect to __isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* wcsmbs/wchar.h (fwscanf, wscanf, swscanf, vfwscanf, vwscanf,
	vswscanf): Redirect to __isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* libio/bits/stdio-ldbl.h (fscanf, scanf, sscanf, vfscanf, vscanf,
	vsscanf): Redirect to __nldbl___isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* wcsmbs/bits/wchar-ldbl.h (fwscanf, wscanf, swscanf, vfwscanf,
	vwscanf, vswscanf): Redirect to __nldbl___isoc99_* if strict
	ISO C99 or POSIX conformance requested.
	* stdio-common/Versions (libc): Export __isoc99_scanf@@GLIBC_2.7,
	__isoc99_vscanf@@GLIBC_2.7, __isoc99_fscanf@@GLIBC_2.7,
	__isoc99_vfscanf@@GLIBC_2.7, __isoc99_sscanf@@GLIBC_2.7
	and __isoc99_vsscanf@@GLIBC_2.7.
	* stdio-common/Makefile (routines): Add isoc99_scanf, isoc99_vscanf,
	isoc99_fscanf, isoc99_vfscanf, isoc99_sscanf and isoc99_vsscanf.
	(tests): Add scanf14.
	(CFLAGS-vfprintf.c, CFLAGS-fprintf.c, CFLAGS-printf.c,
	CFLAGS-vfwprintf.c, CFLAGS-vfscanf.c, CFLAGS-vfwscanf.c,
	CFLAGS-fscanf.c, CFLAGS-scanf.c, CFLAGS-isoc99_vfscanf.c,
	CFLAGS-isoc99_vscanf.c, CFLAGS-isoc99_fscanf.c,
	CFLAGS-isoc99_scanf.c): Add $(exceptions).
	(CFLAGS-scanf15.c): Add various -I paths to prevent the compiler
	from using internal headers.
	* wcsmbs/Versions (libc): Export __isoc99_wscanf@@GLIBC_2.7,
	__isoc99_vwscanf@@GLIBC_2.7, __isoc99_fwscanf@@GLIBC_2.7,
	__isoc99_vfwscanf@@GLIBC_2.7, __isoc99_swscanf@@GLIBC_2.7
	and __isoc99_vswscanf@@GLIBC_2.7.
	* wcsmbs/Makefile (routines): Add isoc99_wscanf, isoc99_vwscanf,
	isoc99_fwscanf, isoc99_vfwscanf, isoc99_swscanf and isoc99_vswscanf.
	(CFLAGS-isoc99_wscanf.c, CFLAGS-isoc99_fwscanf.c,
	CFLAGS-isoc99_vwscanf.c, CFLAGS-isoc99_vfwscanf.c): Add $(exceptions).
	(CPPFLAGS): Add -D_IO_MTSAFE_IO if needed.
	* stdio-common/isoc99_scanf.c: New file.
	* stdio-common/isoc99_vsscanf.c: New file.
	* stdio-common/isoc99_vscanf.c: New file.
	* stdio-common/isoc99_vfscanf.c: New file.
	* stdio-common/isoc99_fscanf.c: New file.
	* stdio-common/isoc99_sscanf.c: New file.
	* wcsmbs/isoc99_fwscanf.c: New file.
	* wcsmbs/isoc99_vswscanf.c: New file.
	* wcsmbs/isoc99_swscanf.c: New file.
	* wcsmbs/isoc99_wscanf.c: New file.
	* wcsmbs/isoc99_vwscanf.c: New file.
	* wcsmbs/isoc99_vfwscanf.c: New file.
	* libio/libio.h (_IO_FLAGS2_SCANF_STD): Define.
	* libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): Also
	clear _IO_FLAGS2_SCANF_STD bit from _flags2.
	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Don't
	handle %as, %aS and %a[ if _IO_FLAGS2_SCANF_STD is set in _flags2.
	* stdio-common/scanf14.c: New test.
	* stdio-common/scanf15.c: New test.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add
	isoc99_scanf, isoc99_fscanf, isoc99_sscanf,
	isoc99_vscanf, isoc99_vfscanf, isoc99_vsscanf,
	isoc99_wscanf, isoc99_fwscanf, isoc99_swscanf,
	isoc99_vwscanf, isoc99_vfwscanf and isoc99_vswscanf.
	* sysdeps/ieee754/ldbl-opt/Versions (libc): Export
	__nldbl___isoc99_scanf@@GLIBC_2.7,
	__nldbl___isoc99_fscanf@@GLIBC_2.7,
	__nldbl___isoc99_sscanf@@GLIBC_2.7,
	__nldbl___isoc99_vscanf@@GLIBC_2.7,
	__nldbl___isoc99_vfscanf@@GLIBC_2.7,
	__nldbl___isoc99_vsscanf@@GLIBC_2.7,
	__nldbl___isoc99_wscanf@@GLIBC_2.7,
	__nldbl___isoc99_fwscanf@@GLIBC_2.7,
	__nldbl___isoc99_swscanf@@GLIBC_2.7,
	__nldbl___isoc99_vwscanf@@GLIBC_2.7,
	__nldbl___isoc99_vfwscanf@@GLIBC_2.7
	and __nldbl___isoc99_vswscanf@@GLIBC_2.7.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__isoc99_scanf,
	__isoc99_fscanf, __isoc99_sscanf, __isoc99_vscanf,
	__isoc99_vfscanf, __isoc99_vsscanf, __isoc99_wscanf,
	__isoc99_fwscanf, __isoc99_swscanf, __isoc99_vwscanf,
	__isoc99_vfwscanf, __isoc99_vswscanf): Add NLDBL_DECL.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c
	(__nldbl___isoc99_scanf, __nldbl___isoc99_fscanf,
	__nldbl___isoc99_sscanf, __nldbl___isoc99_vscanf,
	__nldbl___isoc99_vfscanf, __nldbl___isoc99_vsscanf,
	__nldbl___isoc99_wscanf, __nldbl___isoc99_fwscanf,
	__nldbl___isoc99_swscanf, __nldbl___isoc99_vwscanf,
	__nldbl___isoc99_vfwscanf, __nldbl___isoc99_vswscanf): New
	functions.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c: New file.

	* stdio-common/Makefile (tests): Add scanf13.
	(scanf13-ENV): New.
	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Handle
	m modifier followed by l.
	(STRING_ARG): Add width argument.
	(_IO_vfscanf_internal) <case L_('c')>: Handle %mc.
	<case L_('C')>: Handle %mlc and %mC.
	<case L_('s'), case L_('S'), case L_('[')>: Adjust STRING_ARG
	arguments.
	* stdio-common/scanf13.c: New test.

	* libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): Clear
	the _IO_FLAGS2_FORTIFY bit from _flags2 rather than _flags.

	type and __THROW marker of splice, vmsplice, and tee.
2007-09-18 19:04:01 +00:00
Ulrich Drepper 883f7943f2 * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Correct return value
type __THROW marker of splice, vmsplice, and tee.
	* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/syscalls.list: Mark splice, vmsplice, and tee
	as cancellation points.
2007-09-18 16:21:06 +00:00
Ulrich Drepper b197b0e1ae Correct return value type __THROW marker of splice, vmsplice, and tee. 2007-09-18 16:20:44 +00:00
Ulrich Drepper 3524efe0bd * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_discover_osversion): Don't
parse more than three parts of the version number.
2007-09-15 22:54:33 +00:00
Ulrich Drepper 5e17d6b75b * sysdeps/unix/sysv/linux/i386/Makefile (sysdep_routines): Add
call_fallocate in misc subdir.
	* sysdeps/unix/sysv/linux/i386/call_fallocate.S: New file.
	* sysdeps/unix/sysv/linux/i386/syscalls.list (fallocate64): Remove.
	* sysdeps/unix/sysv/linux/i386/posix_fallocate.c: Use __call_fallocate
	instead of __fallocate64.
	* sysdeps/unix/sysv/linux/i386/posix_fallocate64.c: Likewise.
2007-09-15 22:38:32 +00:00
Ulrich Drepper 3a50811c2f * rt/Versions (librt): Export __mq_open_2@@GLIBC_2.7.
* rt/Makefile (headers): Add bits/mqueue2.h.
	* rt/mqueue.h: Include bits/mqueue2.h if -D_FORTIFY_SOURCE=2,
	optimizing with GCC and __va_arg_pack_len is defined.
	* rt/bits/mqueue2.h: New file.
	* rt/mq_open.c (__mq_open): Renamed from mq_open.
	(mq_open): New strong_alias.
	(__mq_open_2): New function.
	* sysdeps/unix/sysv/linux/mq_open.c (__mq_open): Renamed from mq_open.
	(mq_open): New strong_alias.
	(__mq_open_2): New function.
	* debug/Versions (libc): Export __fortify_fail@@GLIBC_PRIVATE.
	* Versions.def (librt): Add GLIBC_2.7 version.
	* debug/fortify_fail.c (__fortify_fail): Add libc_hidden_def.
	* include/stdio.h (__fortify_fail): Add libc_hidden_proto.

	* misc/sys/cdefs.h (__errordecl, __va_arg_pack_len): Define.
	* io/fcntl.h: Include bits/fcntl2.h when __va_arg_pack_len
	is defined rather than when not C++.
	* io/bits/fcntl2.h (__open_alias, __open64_alias, __openat_alias,
	__openat64_alias): New redirects.
	(__open_too_many_args, __open_missing_mode, __open64_too_many_args,
	__open64_missing_mode, __openat_too_many_args, __openat_missing_mode,
	__openat64_too_many_args, __openat64_missing_mode): New __errordecls.
	(open, open64, openat, openat64): Rewrite as __extern_always_inline
	functions instead of function-like macros.
2007-09-15 22:35:27 +00:00
Ulrich Drepper 9bdfff6000 * sysdeps/i386/i586/memcpy.S (__memcpy_chk): New definition.
* sysdeps/i386/i586/mempcpy.S (__memcpy_chk): New definition.
	* sysdeps/i386/i586/memset.S (__memset_chk): New definition.
2007-09-15 22:24:03 +00:00
Ulrich Drepper de1c3ebb59 * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+.
* misc/bits/syslog.h (syslog): When __va_arg_pack is defined,
	implement as __extern_always_inline function.
	(vsyslog): Define as __extern_always_inline function unconditionally.
	* libio/bits/stdio2.h (sprintf, snprintf, printf, fprintf):
	When __va_arg_pack is defined, implement as __extern_always_inline
	functions.
	(vsprintf, vsnprintf, vprintf, vfprintf): Define as
	__extern_always_inline functions unconditionally.
	* libio/bits/stdio.h (vprintf): Ifdef out the inline when
	bits/stdio2.h will be included.
	* wcsmbs/bits/wchar2.h (__swprintf_alias): New redirect.
	(swprintf, wprintf, fwprintf): When __va_arg_pack is defined,
	implement as __extern_always_inline functions.
	(vswprintf, vwprintf, vfwprintf): Define as
	__extern_always_inline functions unconditionally.
	* debug/tst-chk1.c (do_test): Enable remaining tests for C++.

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

	* misc/sys/cdefs.h (__extern_inline, __extern_always_inline): Only
	define in C++ for GCC 4.3+, in C++ always use __gnu_inline__
	attribute.
	* include/features.h (__USE_EXTERN_INLINES): Define only when
	__extern_inline is defined.
	* stdlib/stdlib.h: Include bits/stdlib.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* misc/sys/syslog.h: Include bits/syslog.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* socket/sys/socket.h: Include bits/socket2.h when
	__extern_always_inline is defined instead of when not __cplusplus.
	* libio/stdio.h: Include bits/stdio2.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* posix/unistd.h: Include bits/unistd.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* string/string.h: Include bits/string3.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* wcsmbs/wchar.h: Include bits/wchar2.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	(btowc, wctob): Don't guard the inlines with ifndef __cplusplus.
	* io/fcntl.h: Don't include bits/fcntl2.h if __extern_always_inline
	is not defined.
	* misc/bits/syslog-ldbl.h: Guard *_chk stuff with
	defined __extern_always_inline instead of !defined __cplusplus.
	* libio/bits/stdio-ldbl.h: Likewise.
	* wcsmbs/bits/wchar-ldbl.h: Likewise.
	* misc/bits/syslog.h (syslog): Don't define for C++.
	(vsyslog): Use __extern_always_inline function for C++ instead of
	a macro.
	* libio/bits/stdio.h (__STDIO_INLINE): Define to __extern_inline
	whenever that macro is defined.
	(vprintf): Don't provide the inline for C++.
	(fread_unlocked, fwrite_unlocked): Don't define the macros for C++.
	* libio/bits/stdio2.h (sprintf, snprintf, printf, fprintf): Don't
	define the macros for C++.
	(vsprintf, vsnprintf, vprintf, vfprintf): Define as
	__extern_always_inline functions for C++.
	* io/sys/stat.h (stat, lstat, fstat, fstatat, mknod, mknodat,
	stat64, lstat64, fstat64, fstatat64): Don't define if not
	__USE_EXTERN_INLINES.
	* wcsmbs/bits/wchar2.h: Fix #error message.
	(swprintf, wprintf, fwprintf): Don't define the macros for C++.
	(vswprintf, vwprintf, vfwprintf): Define using
	__extern_always_inline functions for C++.
	* string/bits/string3.h: Don't #undef macros if __cplusplus.
	(memcpy, memmove, mempcpy, memset, bcopy, bzero, strcpy, stpcpy,
	strncpy, strcat, strncat): Define as __extern_always_inline
	functions instead of macros for C++.
	* math/bits/cmathcalls.h: Guard __extern_inline routines with
	defined __extern_inline.
	* sysdeps/alpha/fpu/bits/mathinline.h (__MATH_INLINE): Define
	to __extern_inline whenever that macro is defined.
	* sysdeps/ia64/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/i386/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/i386/i486/bits/string.h (__STRING_INLINE): Likewise.
	* sysdeps/s390/bits/string.h (__STRING_INLINE): Likewise.
	* sysdeps/s390/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/powerpc/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/x86_64/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/sparc/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/unix/sysv/linux/sys/sysmacros.h (gnu_dev_major,
	gnu_dev_minor, gnu_dev_makedev): Remove __extern_inline from
	prototypes.  Only provide __extern_inline routines if
	__USE_EXTERN_INLINES.
	* debug/Makefile: Add rules to build and run tst-{,lfs}chk{4,5,6}
	tests.
	* debug/tst-chk1.c (do_prepare, do_test): Allow compilation as C++.
	For now avoid some *printf tests in C++.  Skip all testing
	if __USE_FORTIFY_LEVEL is defined, but __extern_always_inline macro
	is not.
	* debug/tst-chk4.cc: New file.
	* debug/tst-chk5.cc: New file.
	* debug/tst-chk6.cc: New file.
	* debug/tst-lfschk4.cc: New file.
	* debug/tst-lfschk5.cc: New file.
	* debug/tst-lfschk6.cc: New file.
	* include/wchar.h (__vfwprintf_chk, __vswprintf_chk): Avoid
	prototypes in C++.
	* include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk,
	__vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk,
	__vfprintf_chk, __fgets_unlocked_chk, __fgets_chk): Likewise.
2007-09-15 02:38:04 +00:00
Roland McGrath af2f25a163 * sysdeps/mach/hurd/bits/ioctls.h (TAB3): New macro. 2007-09-07 20:39:01 +00:00
Ulrich Drepper de4d856364 * sysdeps/unix/sysv/linux/check_pf.c (IFA_F_OPTIMISTIC): Define to
zero if not defined.
	(make_request): Recognize optimistic addresses and treat them like
	deprecated addresses.
	Reported by Neil Horman <nhorman@redhat.com>.
2007-08-29 16:50:11 +00:00
Roland McGrath 52ab602c1c 2007-08-27 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/syscalls.list
	(personality): Change caller to EXTRA.
2007-08-27 20:10:31 +00:00
Ulrich Drepper 76fca9f14a * sysdeps/x86_64/cacheinfo.c (handle_amd): Fix computation of
associativity for fully-associative caches.
2007-08-25 17:24:23 +00:00
Ulrich Drepper 80e7d6a6d3 * sysdeps/x86_64/cacheinfo.c (handle_amd): Handle L3 cache
requests.  Fill on more associativity values for L2.
	Patch mostly by Evandro Menezes.
2007-08-25 17:07:47 +00:00
Ulrich Drepper d250df8c57 * sysdeps/unix/sysv/linux/x86_64/init-first.c
(_libc_vdso_platform_setup): Avoid using exported variable by using
	alias.
2007-08-24 18:24:03 +00:00
Ulrich Drepper cb5ba30495 * sysdeps/unix/sysv/linux/i386/syscalls.list: No reason to mark
fallocate64 as EXTRA< it is not referenced if the symbol isn't
	defined.
2007-08-24 17:22:25 +00:00
Ulrich Drepper 44b2e5815b * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Correctly
align stack for call if pltexit is to be used.
2007-08-24 03:57:56 +00:00
Ulrich Drepper 73e3ff07a3 [BZ #3924]
* sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Correctly
	align for function call in case pltexit has to be called later.
2007-08-24 02:58:08 +00:00
Ulrich Drepper 62e1b1f564 * sysdeps/i386/dl-trampoline.S (_dl_runtime_resolve): Avoid
implicit atomic operation when storing function pointer.
	(_dl_runtime_profile): Likewise.
2007-08-24 02:03:29 +00:00
Jakub Jelinek b211fe0fef * sysdeps/unix/sysv/linux/alpha/sysdep.h: Include tls.h.
2007-08-21  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/alpha/sysdep.h: Include tls.h.
2007-08-21 08:07:28 +00:00
Ulrich Drepper fb84593c43 * csu/libc-start.c: Don't handle VDSO_SETUP here.
* sysdeps/unix/sysv/linux/init-first.c: Handle it here instead.
	* sysdeps/unix/sysv/linux/x86_64/libc-start.c: Renamed to...
	* sysdeps/unix/sysv/linux/x86_64/init-first.c: ...this.  New file.
	* sysdeps/unix/sysv/linux/powerpc/libc-start.c: Move VDSO_SETUP code
	to...
	* sysdeps/unix/sysv/linux/x86_64/init-first.c: ...here.  New file.
2007-08-20 22:36:43 +00:00
Jakub Jelinek 91ddd9c448 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone):
If the syscall fails, set errno to the actual returned error number 
rather than EINVAL. 
* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone): If 
arguments are incorrect, set errno to EINVAL, if the syscall 
fails, set errno to the actual returned error number.
	* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone):
	If the syscall fails, set errno to the actual returned error number
	rather than EINVAL.
	* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone): If
	arguments are incorrect, set errno to EINVAL, if the syscall
	fails, set errno to the actual returned error number.
2007-08-16 19:44:26 +00:00
Jakub Jelinek 8a501135a4 * sysdeps/sparc/sparc32/sparcv9b/memcpy.S: Moved to...
* sysdeps/sparc/sparc32/sparcv9/sparcv9b/memcpy.S: ... here.  New 
file. 
(ASI_PNF, ASI_BLK_P): Don't define. 
* sysdeps/sparc/sparc32/sparcv9v/memcpy.S: Moved to... 
* sysdeps/sparc/sparc32/sparcv9/sparcv9v/memcpy.S: ... here.  New 
file. 
* sysdeps/sparc/sparc32/sparcv9v/memset.S: Moved to... 
* sysdeps/sparc/sparc32/sparcv9/sparcv9v/memset.S: ... here.  New 
file.
2007-08-16  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc32/sparcv9b/memcpy.S: Moved to...
	* sysdeps/sparc/sparc32/sparcv9/sparcv9b/memcpy.S: ... here.  New
	file.
	(ASI_PNF, ASI_BLK_P): Don't define.
	* sysdeps/sparc/sparc32/sparcv9v/memcpy.S: Moved to...
	* sysdeps/sparc/sparc32/sparcv9/sparcv9v/memcpy.S: ... here.  New
	file.
	* sysdeps/sparc/sparc32/sparcv9v/memset.S: Moved to...
	* sysdeps/sparc/sparc32/sparcv9/sparcv9v/memset.S: ... here.  New
	file.
2007-08-16 10:42:36 +00:00
Jakub Jelinek e4720b0e59 * sysdeps/sparc/fpu/fraiseexcpt.c (__feraiseexcept): Fix raising
FE_UNDERFLOW on Niagara CPUs.
	* sysdeps/sparc/fpu/feholdexcpt.c (feholdexcept): Clear all
	exceptions.

	* sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
	sparc_old_sem): New structs.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
	(__sem_wait_cleanup): New function.
	(__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
	decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
	Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
	lll_futex_wait.
	(__old_sem_wait): New function.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
	nptl/sysdeps/unix/sysv/linux/sparc version.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
	(__new_sem_trywait): Use sparc_old_sem structure.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
	(sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
	decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
	Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
	lll_futex_timed_wait.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
	Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
	isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
	lll_futex_wake.
	(__old_sem_post): New function.
	* sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2007-08-15  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/fpu/fraiseexcpt.c (__feraiseexcept): Fix raising
	FE_UNDERFLOW on Niagara CPUs.

	* sysdeps/sparc/fpu/feholdexcpt.c (feholdexcept): Clear all
	exceptions.
2007-08-15 20:47:43 +00:00
Jakub Jelinek 467d1345e0 * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_runtime_setup): No
need to check GLRO(dl_hwcap) & HWCAP_SPARC_FLUSH on sparcv9. 
(sparc_fixup_plt): Add do_flush argument instead of figuring whether 
flush should be used or not inside of the function. 
(elf_machine_fixup_plt, elf_machine_rela): Adjust caller.
	* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone,
	__thread_start): Use HIDDEN_JUMPTARGET.
	* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone,
	__thread_start): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sysdep.h (JUMPTARGET): Define.
nptl/
	* sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
	* sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
	(__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
	lll_futex_timed_wait.
	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_runtime_setup): No
	need to check GLRO(dl_hwcap) & HWCAP_SPARC_FLUSH on sparcv9.
	(sparc_fixup_plt): Add do_flush argument instead of figuring whether
	flush should be used or not inside of the function.
	(elf_machine_fixup_plt, elf_machine_rela): Adjust caller.

	* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone,
	__thread_start): Use HIDDEN_JUMPTARGET.
	* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone,
	__thread_start): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sysdep.h (JUMPTARGET): Define.
2007-08-14 19:59:35 +00:00
Jakub Jelinek 702a94146a * sysdeps/ieee754/ldbl-64-128/strtold_l.c (__STRTOF): Declare.
Add libc_hidden_proto. 
(STRTOF): Add libc_hidden_proto. 
(___new_strtold_l, ___new_wcstold_l): New weak aliases. 
(strtold_l, wcstold_l): Use them as second argument for 
long_double_symbol. nptl/ 
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock, 
__lll_robust_unlock): Rewrite as macros instead of inline functions. 
* sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock, 
__lll_robust_unlock, __lll_wait_tid): Likewise.
2007-08-14  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/ieee754/ldbl-64-128/strtold_l.c (__STRTOF): Declare.
	Add libc_hidden_proto.
	(STRTOF): Add libc_hidden_proto.
	(___new_strtold_l, ___new_wcstold_l): New weak aliases.
	(strtold_l, wcstold_l): Use them as second argument for
	long_double_symbol.
2007-08-14 19:37:50 +00:00
Ulrich Drepper 22502ea2a7 * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PSELECT,
__ASSUME_PPOLL, __ASSUME_ATFCTS, __ASSUME_SET_ROBUST_LIST,
	__ASSUME_UTIMENSAT, __ASSUME_FALLOCATE): Update per-arch conditions
	when each feature was introduced.

	* sysdeps/unix/sysv/linux/dl-vdso.c: Don't include dl-hash.h.
	* sysdeps/unix/sysv/linux/dl-vdso.h: Don't include dl-hash.h if NDEBUG.
	(CHECK_HASH): New macro.
	(PREPARE_VERSION): Use it.

	* sysdeps/unix/sysv/linux/pselect.c (__generic_pselect): Only provide
	prototype if not __ASSUME_PSELECT.
	* sysdeps/unix/sysv/linux/ppoll.c (__generic_ppoll): Only provide
	prototype if not __ASSUME_PPOLL.

	* sysdeps/unix/sysv/linux/dl-osinfo.h (ROUND): #undef after use.

	* sysdeps/unix/clock_settime.c (freq, __pthread_clock_settime,
	hp_timing_settime): Don't define or declare if HANDLED_CPUTIME
	is defined.
2007-08-14 03:21:23 +00:00
Ulrich Drepper 9c6f6953fd * sysdeps/unix/sysv/linux/x86_64/libc-start.c
(_libc_vdso_platform_setup): If vDSO is not available point
	__vdso_gettimeofday to the vsyscall.
	* sysdeps/unix/sysv/linux/x86_64/gettimeofday.S [SHARED]: Use
	__vdso_gettimeofday instead of vsyscall.
2007-08-13 18:47:42 +00:00
Ulrich Drepper f8de5057b9 * nscd/servicescache.c: Include kernel-features.h.
* nscd/gai.c: Likewise.
	* sysdeps/unix/sysv/linux/statfs64.c: Likewise.
	* sysdeps/unix/sysv/linux/fstatfs64.c: Likewise.
	* sysdeps/unix/sysv/linux/fxstatat.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Likewise.
	* sysdeps/unix/sysv/linux/xstatconv.c: Likewise.
	* sysdeps/unix/sysv/linux/if_index.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c: Likewise.
	* sysdeps/unix/sysv/linux/ifaddrs.c: Likewise.
2007-08-13 18:33:31 +00:00
Ulrich Drepper 4eb375fea3 * sysdeps/unix/sysv/linux/clock_gettime.c (maybe_syscall_gettime_cpu):
Build fix for systems which might lack POSIX timer support.
2007-08-13 00:46:30 +00:00
Ulrich Drepper 3c87d79db7 * sysdeps/unix/sysv/linux/x86_64/libc-start.c
(_libc_vdso_platform_setup): Mangle function pointers before storing
	them.
	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (INLINE_VSYSCALL):
	Demangle vdso pointer before use.
	(INTERNAL_VSYSCALL): Likewise.

	* elf/cache.c (primes): Mark as const.
	Noted by Roland McGrath.
2007-08-13 00:23:59 +00:00
Ulrich Drepper 27d9ffda17 2007-08-01 Andreas Jaeger <aj@suse.de>
Jakub Jelinek  <jakub@redhat.com>

	* elf/ldconfig.c (opt_ignore_aux_cache): Add new option.
	(options): Add option.
	(parse_opt): Handle option.
	(manual_link): Adjust process_file caller.  Call implicit_soname.
	(search_dir): Formatting.  Use and populate auxiliary cache.
	(main): Load and save auxiliary cache.
	* elf/readlib.c (process_file): Add stat_buf argument.  Pass struct
	stat64 from fstat64 to caller.
	(implicit_soname): New function.
	* elf/readelflib.c (process_elf_file): If DT_SONAME is not present,
	leave *soname as NULL.
	* elf/cache.c: Include libgen.h.
	(print_entry, print_cache, compare, save_cache, add_to_cache):
	Formatting and cleanups.
	(aux_cache_entry_id, aux_cache_entry, aux_cache_file_entry,
	aux_cache_file): New structures.
	(AUX_CACHEMAGIC): Define.
	(primes): New array.
	(aux_hash_size, aux_hash): New variables.
	(aux_cache_entry_id_hash, nextprime, init_aux_cache,
	search_aux_cache, insert_to_aux_cache, add_to_aux_cache,
	load_aux_cache, save_aux_cache): New functions.
	* sysdeps/generic/ldconfig.h (_PATH_LDCONFIG_AUX_CACHE): Define.
	(init_aux_cache, search_aux_cache, add_to_aux_cache,
	load_aux_cache, save_aux_cache, implicit_soname): New prototypes.
	(process_file): Adjust prototype.
2007-08-12 20:09:16 +00:00
Ulrich Drepper 8d944b0fc6 * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Include stddef.h
with __need_size_t.
2007-08-12 19:40:27 +00:00
Ulrich Drepper fb86328ad8 * sysdeps/unix/sysv/linux/dl-vdso.c (_dl_vdso_vsym): Expect
r_found_version structure as second parameter.
	* sysdeps/unix/sysv/linux/dl-vdso.h (PREPARE_VERSION): Define.
	(_dl_vdso_vsym): Change type of second parameter accordingly.
	* sysdeps/unix/sysv/linux/x86-64/libc-start.c
	(_libc_vdso_platform_setup): Adjust.
	* sysdeps/unix/sysv/linux/pwoerpc/libc-start.c
	(_libc_vdso_platform_setup): Likewise.
2007-08-12 19:33:45 +00:00
Ulrich Drepper 75fb247e69 * sysdeps/unix/sysv/linux/powerpc/dl-vdso.c: Move to...
* sysdeps/unix/sysv/linux/dl-vdso.c: ...here.
	* sysdeps/unix/sysv/linux/powerpc/dl-vdso.h: Move to...
	* sysdeps/unix/sysv/linux/dl-vdso.h: ...here.
	* csu/libc-start.c: Pretty printing.
	Use VDSO_SETUP if defined.
	* sysdeps/unix/sysv/linux/powerpc/libc-start.c: Define VDSO_SETUP
	and let generic code call into _libc_vdso_platform_setup.
	* sysdeps/unix/sysv/linux/x86_64/libc-start.c: New file.
	* sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h: New file.
	* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Pretty printing.
	Define INLINE_VSYSCALL and INTERNAL_VSYSCALL.
	* sysdeps/unix/sysv/linux/x86_64/Versions: Export __vdso_clock_gettime
	for GLIBC_PRIVATE.
	* sysdeps/unix/sysv/linux/x86_64/Makefile [subdir=elf]
	(sysdep_rountines): Add dl-vdso.

	* sysdeps/unix/sysv/linux/powerpc/Makefile: Use sysdep_routines instead
	of routines.

	* sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h: Add
	attribute_hidden to __vdso_gettimeofday prototype.
2007-08-12 19:03:54 +00:00
Ulrich Drepper d7e23b02a4 * nscd/connections.c: Use O_CLOEXEC is possible. Use mkostemp
instead of mkstemp.

	* misc/Makefile (routines): Add mkostemp and mkostemp64.
	* misc/Versions: Export mkostemp and mkostemp64 for GLIBC_2.7.
	* misc/mkostemp.c: New file.
	* misc/mkostemp64.c: New file.
	* stdlib/stdlib.h: Declare the new functions.
	* sysdeps/posix/tempname.c: Add new parameter which is added to
	the flags for open.  Remove __GT_BIGFILE handling.
	* stdio-common/tempname.c: Likewise.
	* include/stdio.h: Adjust __gen_tempname prototype.
	Renumber __GT_* constants.
	* libio/oldtmpfile.c: Adjust for __gen_tempname interface change.
	* misc/mkdtemp.c: Likewise.
	* misc/mkstemp.c: Likewise.
	* misc/mkstemp64.c: Likewise.
	* misc/mktemp.c: Likewise.
	* stdio-common/tempnam.c: Likewise.
	* stdio-common/tmpfile.c: Likewise.
	* stdio-common/tmpfile64.c: Likewise.
	* stdio-common/tmpnam.c: Likewise.
	* stdio-common/tmpnam_r.c: Likewise.
2007-08-11 02:48:28 +00:00
Ulrich Drepper 916ee8bcba (shm_open): Fix typo in last change. 2007-08-10 23:21:18 +00:00
Roland McGrath 60968d0d09 2007-08-10 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/bits/ioctls.h (NLDLY, TABDLY, BSDLY, VTDLY):
	New macros.
	(NLDELAY, CRDELAY, TBDELAY, BSDELAY, VTDELAY): Define to those.
	Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
2007-08-10 22:50:53 +00:00
Ulrich Drepper bfcd38238b (shm_open): Use O_CLOEXEC is available. 2007-08-10 20:10:11 +00:00
Jakub Jelinek 1e28665349 * sysdeps/ieee754/ldbl-128ibm/strtold_l.c (___new_strtold_l,
___new_wcstold_l): New weak aliases. 
(strtold_l, wcstold_l): Use them as second argument for 
long_double_symbol.
2007-08-10  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/ieee754/ldbl-128ibm/strtold_l.c (___new_strtold_l,
	___new_wcstold_l): New weak aliases.
	(strtold_l, wcstold_l): Use them as second argument for
	long_double_symbol.
2007-08-10 17:59:27 +00:00
Ulrich Drepper 6479496ad4 * sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S: Use correct
register in test for error.
2007-08-10 02:05:42 +00:00
Ulrich Drepper c4adefbd06 * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (O_CLOEXEC): Define.
* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (O_CLOEXEC): Likewise.
2007-08-10 01:45:08 +00:00
Roland McGrath 773e305efc * include/stdlib.h: Add libc_hidden_proto for strto*, __strto*_l.
Remove __strto*_l inlines.
	* include/wchar.h: Add libc_hidden_proto for wcsto*, __wcsto*_l.
	* stdlib/strtod.c: Add libc_hidden_def.
	* stdlib/strtod_l.c: Likewise.
	* stdlib/strtold.c [__LONG_DOUBLE_MATH_OPTIONAL]: Add libc_hidden_proto
	for __new_strtold and __new_wcstold.
	* sysdeps/ieee754/ldbl-128ibm/strtold_l.c: Add libc_hidden_proto for
	__STRTOF, STRTOF.
	* stdlib/strtol.c: Add libc_hidden_def.
	* stdlib/strtol_l.c: Likewise.
	* sysdeps/wordsize-64/strtol.c: Add libc_hidden_ver for strtoll and
	strtoq.

	* scripts/data/localplt-powerpc-linux-gnu.data: New file.

	* scripts/data/localplt-x86_64-linux-gnu.data: File renamed to ...
	* scripts/data/localplt-generic.data: ... here.
	* elf/Makefile (check-data): Get generic file if no other.
	($(objpfx)check-localplt.out): Make target unconditional.
2007-08-07 05:36:32 +00:00
Roland McGrath d040420ab7 2007-08-06 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_discover_osversion):
	Use ElfW(Nhdr).
2007-08-06 20:10:18 +00:00
Jakub Jelinek 0470fa4610 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
Don't use CGOTSETUP and CGOTRESTORE macros. 
(CGOTSETUP, CGOTRESTORE): Remove. 
<IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to 
@local symbol.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S (__socket):
	Don't use CGOTSETUP and CGOTRESTORE macros.
2007-08-05  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S (__socket):
	Don't use CGOTSETUP and CGOTRESTORE macros.
2007-08-05 13:43:20 +00:00
Ulrich Drepper c8ccd8e3a2 * sysdeps/unix/opendir.c (__alloc_dir): Correct order of DIR
elements during initialization.
2007-08-04 17:21:20 +00:00
Ulrich Drepper cbf0489bcf * io/Makefile (aux): Add have_o_cloexec.
* include/fcntl.h: Declare __have_o_cloexec.
	* io/have_o_cloexec.c: New file.
	* sysdeps/unix/opendir.c (__opendir): Use O_CLOEXEC is available.
	(__alloc_dir): If O_CLOEXEC has been used, don't duplicate the
	fcntl call if not necessary.
	* login/utmp_file.c (setutent_file): Use __have_o_cloexec instead
	of local variable.
2007-08-03 04:09:03 +00:00
Ulrich Drepper fa39685d5c * sysdeps/unix/opendir.c (__alloc_dir): Don't initialize ->data.
Avoid memset, add explicit initialization.
	* sysdeps/unix/dirstream.h (struct __dirstream): Move data elemtn
	to the end and change into zero-sized array.
	Move lock member to fill a hole on 64-bit platforms.
2007-08-03 03:35:12 +00:00
Ulrich Drepper 9b2e9577b2 * sysdeps/unix/dirstream.h (struct __dirstream): Move lock member
to fill a hole on 64-bit platforms.

	* stdlib/stdlib.h: Remove __strto*_internal prototypes and strto*
	inline functions.
	* include/stdlib.h: Add __strto*_internal prototypes here.
	* wcsmbs/wchar.h: Remove __wcsto*_internal prototypes and wcsto*
	inline functions.
	* include/wchar.h: Add __wcsto*_internal prototypes.
	* sysdeps/generic/inttypes.h: No need to protect the declaration
	of the __strto*_internal and __wcsto*_internal members here.
2007-08-03 02:43:06 +00:00
Ulrich Drepper 0abf17decf * sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Using
/proc is faster and sufficient.  /sys is still needed for
	__get_nprocs_conf.
2007-08-01 21:23:59 +00:00
Ulrich Drepper 5e0923ab31 * sysdeps/unix/sysv/linux/i386/syscalls.list (fallocate): Add fallocate
syscall as __fallocate64.
	* sysdeps/unix/sysv/linux/i386/posix_fallocate.c: New file.
	* sysdeps/unix/sysv/linux/i386/posix_fallocate64.c: New file.
2007-08-01 15:51:07 +00:00
Ulrich Drepper 1475e2012f * stdlib/tst-strtod2.c (do_test): Use %tu in fmt string for ptrdiff_t
value.

	* stdio-common/tst-fmemopen2.c (do_test): Avoid fmt string warning
	if off_t is different rank from size_t.

	* sysdeps/generic/unwind-dw2.c (extract_cie_info, execute_cfa_program,
	uw_frame_state_for): Avoid type punning warnings.
	* sysdeps/generic/unwind-dw2-fde-glibc.c
	(_Unwind_IteratePhdrCallback): Likewise.
	* sysdeps/generic/unwind-dw2-fde.c (_Unwind_Find_FDE): Likewise.
	(binary_search_single_encoding_fdes, binary_search_mixed_encoding_fdes,
	get_cie_encoding, linear_search_fdes): Don't mix char and unsigned char
	pointers.
2007-08-01 03:44:35 +00:00
Ulrich Drepper 9506149a76 * sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs_conf): Count
total processors using sysfs.
	(__get_nprocs): Use sysfs to determine which processors are online.
2007-08-01 02:20:18 +00:00
Ulrich Drepper 58d43ba882 (__get_nprocs): Use /sys filesystem to determine which processors are online. 2007-07-31 22:43:57 +00:00
Jakub Jelinek 098813982b * sysdeps/unix/sysv/linux/posix_fallocate.c (posix_fallocate): Fix
syscall arguments count.
	* sysdeps/unix/sysv/linux/posix_fallocate.c (posix_fallocate): Fix
	syscall arguments count.
2007-07-31 19:33:23 +00:00
Ulrich Drepper c5705565e5 * sysdeps/unix/sysv/linux/bits/sched.h (__CPU_ZERO_S): Optimize
using gcc builtin.
	(__CPU_EQUAL_S): Likewise.
2007-07-29 22:43:00 +00:00
Ulrich Drepper 44f08a6ecc * posix/Makefile (routines): Add sched_cpualloc and sched_cpufree.
(tests): Add tst-cpuset.
	* posix/sched_cpualloc.c: New file.
	* posix/sched_cpufree.c: New file.
	* posix/tst-cpuset.c: New file.
	* posix/Versions: Export __sched_cpualloc and __sched_cpufree for
	GLIBC_2.7.
	* sysdeps/unix/sysv/linux/bits/sched.h: Define __CPU_*_S macros.
	* posix/sched.h: Define old CPU_* macros in temers of __CPU_*_S
	macros.  Define CPU_*_S macros.
2007-07-29 22:24:44 +00:00
Ulrich Drepper 701666b77d * nss/nsswitch.c (__nss_lookup_function): Don't cast &ni->known to
void **.
	* nss/nsswitch.h (service_user): Use void * type for KNOWN field.

	* nss/nss_files/files-hosts.c (LINE_PARSER): Cast host_addr to
	char * to avoid warning.
	* nis/nss_nis/nis-hosts.c (LINE_PARSER): Likewise.

	* timezone/Makefile (CFLAGS-zdump.c): Add -fwrapv.

	* locale/programs/ld-ctype.c (ctype_finish, set_class_defaults,
	allocate_arrays): Cast second argument to charmap_find_symbol
	to char * to avoid warnings.

	* locale/programs/repertoire.c (repertoire_new_char): Change
	from_nr, to_nr and cnt to unsigned long, adjust printf format
	string.

	* locale/programs/ld-collate.c (insert_value, handle_ellipsis):
	Cast second argument to new_element to char * to avoid warnings.

	* locale/weightwc.h (findidx): Cast &extra[-i] to const int32_t *.

	* intl/gettextP.h (struct loaded_domain): Change plural to const
	struct expression *.
	* intl/plural-eval.c (plural_eval): Change first argument to
	const struct expression *.
	* intl/plural-exp.c (EXTRACT_PLURAL_EXPRESSION): Change first
	argument to const struct expression **.
	* intl/plural-exp.h (EXTRACT_PLURAL_EXPRESSION, plural_eval): Adjust
	prototypes.
	* intl/loadmsgcat (_nl_unload_domain): Cast away const
	in call to __gettext_free_exp.

	* posix/fnmatch.c (fnmatch): Rearrange code to avoid maybe
	unitialized wstring/wpattern var warnings.

	* posix/runtests.c (struct a_test): Make data field const char *.

	* stdio-common/tst-sprintf2.c (main): Don't declere u, v and buf
	vars if not LDBL_MANT_DIG >= 106.

	* stdio-common/Makefile (CFLAGS-vfwprintf.c): Add -Wno-unitialized.

	* stdio-common/vfprintf.c (vfprintf): Cast first arugment to
	__find_specmb to avoid warning.

	* rt/tst-mqueue1.c (do_one_test): Add casts to avoid warnings.

	* debug/test-strcpy_chk.c (do_tests, do_random_tests): Add casts
	to avoid warnings.

	* sysdeps/ieee754/ldbl-96/s_roundl.c (huge): Add L suffix to
	initializer.

	* sysdeps/unix/clock_gettime.c (clock_gettime): Only define
	tv var when it will be actually used.

	* sunrpc/rpc_cmsg.c (xdr_callmsg): Cast IXDR_PUT_* to void
	to avoid warnings.
2007-07-28 20:36:21 +00:00
Ulrich Drepper 7b503bcc13 * iconv/gconv_int.h (__GCONV_NULCONV): New internal only error code.
* iconv/gconv_cache.c (__gconv_lookup_cache): Return __GCONV_NULCONV
	if from and to charsets are the same.
	* iconv/gconv_db.c (__gconv_find_transform): Likewise.
	* intl/dcigettext.c (_nl_find_msg): Return NULL even if __gconv_open
	returns __GCONV_NOCONV, but not for __GCONV_NULCONV.

2007-07-17  Jakub Jelinek  <jakub@redhat.com>

	* wcsmbs/wchar.h: Only define wint_t if __need_wint_t.
	Don't define wint_t when __need_mbstate_t unless it
	is necessary.
	(__mbstate_t): Use __WINT_TYPE__ rather than wint_t
	in the typedef if possible.
	* wctype/wctype.h (wint_t): Define by including
	wchar.h with __need_wint_t instead of including stddef.h
	with __need_wint_t and as fallback definining it ourselves.
	* iconv/gconv.h (__need_wint_t): Define before including
	wchar.h.
	* sysdeps/gnu/_G_config.h: Don't include gconv.h if not _LIBC
	or _GLIBCPP_USE_WCHAR_T.
	(__need_wchar_t): Don't define
	if not _LIBC or _GLIBCPP_USE_WCHAR_T.
	(__need_wint_t): Don't define before including stddef.h,
	define before including wchar.h only if _LIBC or
	_GLIBCPP_USE_WCHAR_T.
	(_G_iconv_t): Don't define if not _LIBC or _GLIBCPP_USE_WCHAR_T.
	* sysdeps/mach/hurd/_G_config.h: Likewise.
	* sysdeps/generic/_G_config.h: Likewise.
	* libio/libio.h (__wunderflow, __wuflow, __woverflow): Only
	prototype if _LIBC or _GLIBCPP_USE_WCHAR_T.
	(_IO_getwc_unlocked, _IO_putwc_unlocked): Only define
	if _LIBC or _GLIBCPP_USE_WCHAR_T.
2007-07-28 19:02:07 +00:00
Ulrich Drepper a95a608f1b * sysdeps/posix/posix_fallocate64.c: Undefine
__posix_fallocate64_l64 before alias handling.
	* sysdeps/unix/sysv/linux/posix_fallocate.c: New file.
	* sysdeps/unix/sysv/linux/posix_fallocate64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate64.c: New file.

	* io/tst-posix_fallocate.c: Include <fcntl.h>.

2007-07-23  Jakub Jelinek  <jakub@redhat.com>

	* locale/programs/ld-collate.c (atwc): New variable.
	(add_to_tablewc): New toplevel function, moved from collate_output.
	(collate_output): Remove add_to_tablewc nested function.

	* iconv/iconvconfig.c (hash_table, hash_size): New toplevel vars.
	(name_insert): New function.
	(write_output): Remove hash_table and hash_size vars and name_insert
	nested function.
2007-07-28 18:13:45 +00:00
Ulrich Drepper c1bf9f14ab * io/Makefile (tests): Add tst-posix_fallocate.
* io/tst-posix_fallocate.c: New file.

	* sysdeps/unix/sysv/linux/kernel-features.h: Define
	__ASSUME_FALLOCATE.
2007-07-23 18:09:13 +00:00
Roland McGrath 3dadfa7e0c [BZ #3665, BZ #4126, BZ #4178, BZ #4610]
* hurd/getdport.c: Add missing copyright year update.
	[BZ #3665]
	[BZ #4610]
	[BZ #4178]
	[BZ #4126]
	* sysdeps/mach/hurd/sigsuspend.c (sigsuspend_not_cancel): Define alias
	to __sigsuspend.
2007-07-23 00:38:55 +00:00
Roland McGrath 626a51fd5c 2007-07-22 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/bits/fcntl.h [__USE_GNU] (O_CLOEXEC): New macro.
	* hurd/port2fd.c (_hurd_port2fd): Implement O_CLOEXEC.
2007-07-22 22:43:02 +00:00
Roland McGrath 610903b0cc * mach/lock-intern.h: Include <sys/cdefs.h>.
* sysdeps/mach/hurd/sigaction.c (__sigaction): Check ACT != NULL before
	reading A.

        * sysdeps/mach/hurd/sigsuspend.c (sigsuspend_not_cancel): Define alias
        to __sigsuspend.

	* sysdeps/mach/i386/sysdep.h: Include <dl-sysdep.h> and <tls.h>.

2006-06-13  Thomas Schwinge  <tschwinge@gnu.org>

	* sysdeps/mach/hurd/tls.h: Change `ASSEMBLER' conditional to
	`__ASSEMBLER__'.
	* sysdeps/mach/hurd/i386/tls.h: Likewise.
2007-07-22 06:52:07 +00:00
Roland McGrath 7b153ce13a 2006-06-13 Thomas Schwinge <tschwinge@gnu.org>
* sysdeps/mach/hurd/tls.h: Change `ASSEMBLER' conditional to
	`__ASSEMBLER__'.
	* sysdeps/mach/hurd/i386/tls.h: Likewise.
2007-07-22 06:46:54 +00:00
Ulrich Drepper acf79996d4 * sysdeps/unix/sysv/linux/bits/socket.h: Define MSG_CMSG_CLOEXEC.
* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Define O_CLOEXEC.
	* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
2007-07-21 17:20:52 +00:00
Ulrich Drepper 2c89631565 Define MSG_CMSG_CLOEXEC. 2007-07-21 17:20:12 +00:00
Ulrich Drepper b042b023f5 * sysdeps/ia64/sched_cpucount.c: New file.
* sysdeps/powerpc/sched_cpucount.c: New file.

2007-07-17  Jakub Jelinek  <jakub@redhat.com>
2007-07-19 17:24:46 +00:00
Ulrich Drepper 8381e467de * sysdeps/unix/sysv/linux/bits/sched.h (__sched_cpucount): Add
__BEGIN_DECLS/__END_DECLS around the prototype.
	* bits/sched.h (__sched_cpucount): Likewise.  Make second argument
	pointer to const cpu_set_t.
2007-07-19 17:22:27 +00:00
Roland McGrath 2e2efe652a * elf/ldconfig.c: Allow GPLv2 or any later version.
* elf/readlib.c: Likewise.
	* elf/chroot_canon.c: Likewise.
	* elf/cache.c: Likewise.
	* nscd/mem.c: Likewise.
	* nscd/getpwuid_r.c: Likewise.
	* nscd/grpcache.c: Likewise.
	* nscd/aicache.c: Likewise.
	* nscd/getsrvbynm_r.c: Likewise.
	* nscd/nscd.c: Likewise.
	* nscd/servicescache.c: Likewise.
	* nscd/getsrvbypt_r.c: Likewise.
	* nscd/initgrcache.c: Likewise.
	* nscd/gethstbyad_r.c: Likewise.
	* nscd/gethstbynm2_r.c: Likewise.
	* nscd/getgrnam_r.c: Likewise.
	* nscd/nscd_setup_thread.c: Likewise.
	* nscd/getpwnam_r.c: Likewise.
	* nscd/gai.c: Likewise.
	* nscd/connections.c: Likewise.
	* nscd/dbg_log.c: Likewise.
	* nscd/cache.c: Likewise.
	* nscd/hstcache.c: Likewise.
	* nscd/nscd_conf.c: Likewise.
	* nscd/getgrgid_r.c: Likewise.
	* nscd/pwdcache.c: Likewise.
	* catgets/gencat.c: Likewise.
	* locale/programs/linereader.h: Likewise.
	* locale/programs/locarchive.c: Likewise.
	* locale/programs/ld-paper.c: Likewise.
	* locale/programs/locfile-kw.h: Likewise.
	* locale/programs/ld-address.c: Likewise.
	* locale/programs/xmalloc.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* locale/programs/simple-hash.c: Likewise.
	* locale/programs/xstrdup.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/locfile-kw.gperf: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* locale/programs/charmap-kw.gperf: Likewise.
	* locale/programs/charmap.h: Likewise.
	* locale/programs/charmap-kw.h: Likewise.
	* locale/programs/config.h: Likewise.
	* locale/programs/locfile.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/ld-messages.c: Likewise.
	* locale/programs/repertoire.h: Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/ld-name.c: Likewise.
	* locale/programs/linereader.c: Likewise.
	* locale/programs/locfile.h: Likewise.
	* locale/programs/3level.h: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-measurement.c: Likewise.
	* locale/programs/charmap-dir.c: Likewise.
	* locale/programs/ld-identification.c: Likewise.
	* locale/programs/localedef.h: Likewise.
	* locale/programs/charmap-dir.h: Likewise.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/simple-hash.h: Likewise.
	* locale/programs/ld-telephone.c: Likewise.
	* locale/programs/locale-spec.c: Likewise.
	* locale/programs/locfile-token.h: Likewise.
	* posix/getconf.c: Likewise.
	* iconv/dummy-repertoire.c: Likewise.
	* iconv/iconv_charmap.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* malloc/memusagestat.c: Likewise.
	* sysdeps/unix/sysv/linux/nscd_setup_thread.c: Likewise.
2007-07-16 00:56:07 +00:00