Commit Graph

668 Commits

Author SHA1 Message Date
Ulrich Drepper 3fb8a93ae9 Yet more changes to match sort function type change. 2009-03-17 00:35:38 +00:00
Ulrich Drepper 425ce2edb9 * config.h.in (USE_MULTIARCH): Define.
* configure.in: Handle --enable-multi-arch.
	* elf/dl-runtime.c (_dl_fixup): Handle STT_GNU_IFUNC.
	(_dl_fixup_profile): Likewise.
	* elf/do-lookup.c (dl_lookup_x): Likewise.
	* sysdeps/x86_64/dl-machine.h: Handle STT_GNU_IFUNC.
	* elf/elf.h (STT_GNU_IFUNC): Define.
	* include/libc-symbols.h (libc_ifunc): Define.
	* sysdeps/x86_64/cacheinfo.c: If USE_MULTIARCH is defined, use the
	framework in init-arch.h to get CPUID values.
	* sysdeps/x86_64/multiarch/Makefile: New file.
	* sysdeps/x86_64/multiarch/init-arch.c: New file.
	* sysdeps/x86_64/multiarch/init-arch.h: New file.
	* sysdeps/x86_64/multiarch/sched_cpucount.c: New file.

	* config.make.in (experimental-malloc): Define.
	* configure.in: Handle --enable-experimental-malloc.
	* malloc/Makefile: Handle experimental-malloc flag.
	* malloc/malloc.c: Implement PER_THREAD and ATOMIC_FASTBINS features.
	* malloc/arena.c: Likewise.
	* malloc/hooks.c: Likewise.
	* malloc/malloc.h: Define M_ARENA_TEST and M_ARENA_MAX.
2009-03-13 23:53:18 +00:00
Ulrich Drepper a99e59d771 * include/stdio.h (fmemopen): Add libc_hidden_proto.
* libio/fmemopen.c (fmemopen): Add libc_hidden_def.

	* elf/sprof.c: Avoid warning about multi-line comment.
2009-03-10 15:26:57 +00:00
Ulrich Drepper 3e6b0a28eb * include/features.h: Define macros for XPG7/POSIX 2008.
* sysdeps/unix/sysv/linux/bits/stat.h: Protect UTIME_NOW and
	UTIME_OMIT only with __USE_ATFILE.
	* sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.
	* io/sys/stat.h: Move mknodat definition into same conditional as
	mknod.
	* time/sys/time.h: futimesat is not among the functions accepted
	into the POSIX standard.
2009-02-26 01:43:53 +00:00
Ulrich Drepper 2e6d6bacc2 * include/features.h: If no feature selection given and we select
by default a POSIX mode, also define __USE_POSIX_IMPLICITLY.
	* posix/Versions: Export __posix_getopt.
	* posix/getopt.c (_getopt_initialize): Take additional parameter.
	Use it to alternatively initialize __posixly_correct.
	(_getopt_internal_r): Take addition parameter.  Pass on to
	_getopt_initialize.
	(_getopt_internal): Take addition parameter.  Pass on to
	_getopt_internal_r.
	(getopt): Pass additional zero to _getopt_internal.
	(__posix_getopt): New function.
	* posix/getopt.h: Add redirection for getopt.
	* posix/getopt1.c (getopt_long): Pass additional zero to
	_getopt_internal.
	(getopt_long_only): Likewise.
	(_getopt_long_r): Pass additional zero to _getopt_internal_r.
	(_getopt_long_only_r): Likewise.
	* posix/getopt_int.h: Adjust declarations of _getopt_internal and
	_getopt_internal_r.
2009-02-26 01:22:06 +00:00
Ulrich Drepper 6c03cd11e9 * include/atomic.h: Define catomic_and if not already defined.
* sysdeps/x86_64/bits/atomic.h: Define catomic_and.
	* sysdeps/i386/i486/bits/atomic.h: Likewise.
2009-02-08 23:50:23 +00:00
Ulrich Drepper 78ac92ad8d * malloc/malloc.c (_int_free): Second argument is now mchunkptr.
Change all callers.
	(_int_realloc): Likewise.
	All _int_* functions are now static.
	* malloc/hooks.c: Change all callers to _int_free and _int_realloc.
	* malloc/arena.c: Likewise.
	* include/malloc.h: Remove now unnecessary declarations of the _int_*
	functions.
2009-02-07 22:01:49 +00:00
Ulrich Drepper 4f7408c7ac * include/rpc/auth.h: Use libc_hidden_proto for _null_auth.
* sunrpc/rpc_common.c: Add libc_hidden_def for _null_auth.  Also
	move _null_auth to .rodata.
2009-02-06 05:33:30 +00:00
Ulrich Drepper 647925b260 * sysdeps/i386/stackinfo.h (stackinfo_get_sp): Define.
(stackinfo_sub_sp): Define.
2009-01-29 15:36:26 +00:00
Ulrich Drepper fd537e535f [BZ #9750]
* nscd/mem.c (gc): Use alloca_count to get the real stack usage.
	* include/alloca.h (alloca_account): Define.
	* sysdeps/x86_64/stackinfo.h (stackinfo_get_sp): Define.
	(stackinfo_sub_sp): Define.
2009-01-29 00:17:57 +00:00
Ulrich Drepper f52bb4d77e * include/features.h (__GLIBC_MINOR__): Bump to 9. 2008-11-13 21:41:41 +00:00
Jakub Jelinek 09f66a4f52 * include/stdio.h (__builtin_fwrite, __builtin_fwrite_unlocked):
Remove.
	* include/stdio.h (__builtin_fwrite, __builtin_fwrite_unlocked):
	Remove.
2008-11-07 15:13:54 +00:00
Jakub Jelinek 4b23f9bda3 * bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_address,
__libc_tsd_get, __libc_tsd_set): Add TYPE argument, use it as the type 
of the thread variable instead of void *. 
* sysdeps/mach/hurd/bits/libc-tsd.h (__libc_tsd_define, 
__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Likewise. 
* include/ctype.h (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust 
__libc_tsd_define arguments. 
(__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): Adjust 
__libc_tsd_address arguments.  Remove union hack. 
* include/rpc/rpc.h (RPC_VARS): Adjust __libc_tsd_define arguments. 
* sunrpc/rpc_thread.c (RPC_VARS): Likewise. 
(__rpc_thread_destroy, rpc_thread_multi, __rpc_thread_variables): 
Adjust __libc_tsd_{set,get} arguments. 
* ctype/ctype-info.c (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust 
__libc_tsd_define arguments. 
* locale/uselocale.c (__uselocale): Adjust __libc_tsd_{set,get} 
arguments. 
* locale/lc-ctype.c (_nl_postload_ctype): Likewise. 
* locale/global-locale.c (__libc_tsd_LOCALE): Adjust type. 
(LOCALE): Adjust __libc_tsd_define arguments. 
* locale/localeinfo.h (_NL_CURRENT_LOCALE): Adjust __libc_tsd_get 
arguments. 
(LOCALE): Adjust __libc_tsd_define arguments. 
* sysdeps/mach/hurd/malloc-machine.h (MALLOC): Adjust __libc_tsd_define 
arguments. 
(tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get} 
arguments. nptl/ 
* sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define 
arguments. 
(tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get} 
arguments.
2008-11-07  Jakub Jelinek  <jakub@redhat.com>

	* bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_address,
	__libc_tsd_get, __libc_tsd_set): Add TYPE argument, use it as the type
	of the thread variable instead of void *.
	* sysdeps/mach/hurd/bits/libc-tsd.h (__libc_tsd_define,
	__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Likewise.
	* include/ctype.h (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust
	__libc_tsd_define arguments.
	(__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): Adjust
	__libc_tsd_address arguments.  Remove union hack.
	* include/rpc/rpc.h (RPC_VARS): Adjust __libc_tsd_define arguments.
	* sunrpc/rpc_thread.c (RPC_VARS): Likewise.
	(__rpc_thread_destroy, rpc_thread_multi, __rpc_thread_variables):
	Adjust __libc_tsd_{set,get} arguments.
	* ctype/ctype-info.c (CTYPE_B, CTYPE_TOUPPER, CTYPE_TOLOWER): Adjust
	__libc_tsd_define arguments.
	* locale/uselocale.c (__uselocale): Adjust __libc_tsd_{set,get}
	arguments.
	* locale/lc-ctype.c (_nl_postload_ctype): Likewise.
	* locale/global-locale.c (__libc_tsd_LOCALE): Adjust type.
	(LOCALE): Adjust __libc_tsd_define arguments.
	* locale/localeinfo.h (_NL_CURRENT_LOCALE): Adjust __libc_tsd_get
	arguments.
	(LOCALE): Adjust __libc_tsd_define arguments.
	* sysdeps/mach/hurd/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
	arguments.
	(tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
	arguments.
2008-11-07 15:07:10 +00:00
Ulrich Drepper 144bfa86e2 * include/arpa/nameser.h (NS_GET16): Use const pointer.
(NS_GET32): Likewise.
2008-08-01 22:40:06 +00:00
Ulrich Drepper cd5743fdec * Versions.def: Add GLIBC_2.9 to libresolv.
* include/resolv.h: Remove hidden proto declarations for __ns_*
	functions.  Add them for __dn_count_labels and __p_secstodate.
	* include/arpa/nameser.h: Add a number of hidden proto declarations.
	Define ns_msg_getflags macro here.
	* resolv/res_debug.c: Add hidden definition for __dn_count_labels
	and __p_secstodate.
	* resolv/Versions: Export functions from <arpa/nameser.h> from
	libresolv in version GLIBC_2.9.
	* resolv/ns_name.c: Integrate changes from bind 9.5.0.  Add necessary
	hidden definitions.
	* resolv/ns_netint.c: Likewise.
	* resolv/ns_parse.c: Likewise.
	* resolv/ns_print.c: Likewise.
	* resolv/ns_samedomain.c: Likewise.
	* resolv/ns_ttl.c: Likewise.
	* resolv/arpa/nameser_compat.h: Likewise.
	* resolv/arpa/nameser.h: Likewise.  Remove macros which redirect
	function calls.
	* resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Use __ns_get16
	instead of ns_get16.
	* resolv/nss_dns/dns-host.c (getanswer_r): Use __ns_get16 and
	__ns_get32 instead of ns_get16 and ns_get32 respectively.
	(gaih_getanswer_slice): Likewise.
	* resolv/Makefile (libresolv-routines): Add ns_date.
	* resolv/ns_date.c: New file.
2008-08-01 17:16:31 +00:00
Ulrich Drepper b7da31a164 * resolv/res_send.c (__libc_res_nsend): Take additional parameter.
Use it instead of locally defined resplen2 variable.
	(res_nsend): Adjust for __libc_res_nsend interface change.
	(send_vc): Initialize *resplen2 if necessary.  Read length of
	package into an appropriately aligned variable.  Store converted length
	in new variable and use it appropriately.
	Add branch prediction help.
	* resolv/res_query.c (__libc_res_nquery): Take additional parameter
	and pass it on to __libc_res_nsend.  Adjust all callers.
	(__libc_res_nsearch): Likewise.
	(__libc_res_nqeurydomain): Likewise.
	* resolv/nss_dns/dns-host.c: Adjust for __libc_res_nsearch interface
	change.
	(_nss_dns_gethostbyname4): Don't unconditionally allocate tmp array.
	Define resplen2 variable and pass it to __libc_res_nsearch and then
	to gaih_getanswer.
	(getanswer_r): In case of incorrect DNS data don't overread buffer.
	Add branch prediction.
	(gaih_getanswer_slice): Likewise.  Check for invalid data types.
	(gaih_getanswer): Don't decode second slice if first one failed due
	to a too small buffer.  Don't let not found status of second
	decoder shadow results of the first.
	* resolv/gethnamaddr.c (gethostbyname2): Adjust for __libc_res_nsearch
	and __libc_res_nquery interface changes
	(gethostbyaddr): Adjust for __libc_res_nquery interface change.
	* include/resolv.h: Adjust prototypes for __libc_res_nquery,
	__libc_res_nsearch, and __libc_res_nsend.
	* resolv/nss_dns/dns-canon.c: Adjust for __libc_res_nquery interface
	change.
	* resolv/nss_dns/dns-network.c: Adjust for __libc_res_nquery and
	__libc_res_nsearch interface changes.
2008-07-28 22:55:10 +00:00
Ulrich Drepper d6e0c2a67d * sysdeps/unix/sysv/linux/syscalls.list: Add __pipe2 alias.
* io/pipe2.c: Likewise.
	* sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_PIPE2
	instead of __ASSUME_PACCEPT.
	* include/unistd.h: Declare __have_pipe2.
	* libio/iopopen.c: Implement "e" flag.
	* libio/Makefile (tests): Add tst-popen1.
	* libio/tst-popen1.c: New file.
2008-07-27 18:26:13 +00:00
Ulrich Drepper 8ccf22f934 * include/rpc/clnt.h: Declare __libc_clntudp_bufcreate and
__libc_clntudp_bufcreate_internal.
	* include/sys/socket.h: Declare __have_sock_cloexec.
	* socket/Makefile (aux): Add have_sock_cloexec.
	* socket/have_sock_cloexec.c: New file.
	* sunrpc/clnt_udp.h (clntudp_bufcreate): Now a wrapper around
	__libc_clntudp_bufcreate.
	(__libc_clntudp_bufcreate): Former implementation of clntudp_bufcreate
	which takes an additional parameter.  Create socket with non-blocking
	mode and close-on-exec flag set, if wanted.
	* sunrpc/Versions: Export __libc_clntudp_bufcreate@GLIBC_PRIVATE.
	* nis/ypclnt.c (yp_bind_client_create): Use __libc_clntpudp_bufcreate
	instead of clntudp_create.  The socket has already the close-on-exec
	flag set if SOCK_CLOEXEC is defined.
2008-07-25 17:06:50 +00:00
Ulrich Drepper 62605cbfcb Remove useless more "if" tests before "free".
* include/inline-hashtab.h (htab_delete): Likewise.
	* libio/freopen.c (freopen): Likewise.
	* libio/freopen64.c (freopen64): Likewise.
	* locale/programs/ld-collate.c (collate_read): Likewise.
	* misc/fstab.c (libc_freeres_fn): Likewise.
	* posix/glob.c (globfree): Likewise.
2008-05-27 06:04:07 +00:00
Ulrich Drepper b88e208777 (higher_prime_number): Fix type of mid variable. 2008-05-20 22:55:47 +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 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
Ulrich Drepper a82e8bb8d0 Adjust __libc_res_nquery and __libc_res_nsend prototypes. 2008-05-10 23:22:49 +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 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 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 4c533566c2 * include/link.h (FORCED_DYNAMIC_TLS_OFFSET): Define.
* elf/dl-close.c (_dl_close): Check for it.
	* elf/dl-reloc.c (CHECK_STATIC_TLS): Likewise.
	(_dl_allocate_static_tls): Likewise.
	* elf/dl-tls.c (_dl_allocate_tls_init): Likewise.
	(__tls_get_addr): Protect from race conditions in setting l_tls_offset
	to it.
	* elf/tst-tls16.c: New file.
	* elf/tst-tlsmod16a.c: New file.
	* elf/tst-tlsmod16b.c: New file.
	* elf/Makefile: Add rules to build and run tst-tls16.
2008-01-17 20:20:00 +00:00
Ulrich Drepper bc3e1c1273 * locale/nl_langinfo.c (nl_langinfo): Just call __nl_langinfo_l.
* locale/nl_langinfo_l.c: Real implementation, copied from
	nl_langinfo.c.
	* include/langinfo.h: Add libc_hidden_proto for __nl_langinfo_l.
2007-12-14 03:54:07 +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 e458144c99 * stdlib/stdlib.h: Define __compar_d_fn_t. Declare qsort_r.
* include/stdlib.h: Add hidden_proto for qsort_t and adjust protoype
	for _quicksort.
	* stdlib/msort.c (qsort): Now a wrapper around qsort_r.
	(qsort_r): Renamed from qsort.  Take additional parameter and pass it
	on as third parameter to compare function and _quicksort.
	* stdlib/qsort.c (_quicksort): Take additional parameter and pass on
	to the compare function.
	* stdlib/Versions [libc] (GLIBC_2.8): Add qsort_r.
	* Versions.def: Add GLIBC_2.8 for libc.
2007-11-13 17:21:43 +00:00
Ulrich Drepper e1cedf8c1f Hurd-specific kernel-features.h. 2007-11-13 16:28:42 +00:00
Ulrich Drepper c1600ce36d (struct in6addrinfo): Add prefixlen field. 2007-11-12 23:55:15 +00:00
Roland McGrath a48b824028 2007-11-11 Roland McGrath <roland@frob.com>
* include/kernel-features.h: New file.
2007-11-12 00:10:51 +00:00
Ulrich Drepper 53bab260f5 Declare __gethostbyaddr2_r and __gethostbyname3_r. 2007-10-30 00:43:16 +00:00
Ulrich Drepper 777bc4bfd9 * include/features.h (__GLIBC_MINOR__): Bump to 7. 2007-10-17 20:27:09 +00:00
Ulrich Drepper fa76dde2cf * include/time.h: Declare __tzset_parse_tz and __tzset_compute.
* time/tzset.c (tzset_internal): Break TZ string parsing out into
	__tzset_parse_tz and updating of daylight, timezone, tzname into
	update_vars.
	(__tz_compute): Renamed from tz_compute.  Take additional parameters.
	(__tz_convert): Updating of tm_isdst, tm_zone, and tm_gmtoff now
	happens in __tz_compute.
	* time/tzfile.c (__tzfile_read): Also read TZ string.
	(find_transition): Fold into __tzfile_compute.
	(__tzfile_compute): For times beyond the last transition try to
	use the TZ string.
	* timezone/tst-timezone.c: Information in daylight and tzname does
	change for Asia/Tokyo timezone with more concrete information.
	Remove the test.

	* include/stdio.h: Add libc_hidden_proto for ftello.
	* libio/ftello.c: Add libc_hidden_def.
2007-10-14 09:15:45 +00:00
Ulrich Drepper a1a363d20c * misc/error.h: Use __const instead of const.
* misc/bits/error.h: Likewise.

2007-10-07  Andreas Jaeger  <aj@suse.de>

	* include/bits/error.h: New file.

	* misc/bits/error.h (error_at_line): Fix prototype.
2007-10-07 17:29:37 +00:00
Ulrich Drepper 035ef8d757 * include/stdio_ext.h (__fsetlocking): Define as macro. 2007-10-01 21:21:46 +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
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 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 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
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
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
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 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 fa69dc9caf * include/time.h (enum ptime_locale_status): Remove.
(__strptime_internal): Remove decided and era_cnt arguments,
	add statep argument.
	* time/strptime_l.c (__strptime_internal): Remove decided
	and era_cnt arguments, add statep argument.  Don't recompute
	any fields in recursive calls, only update caller's tm
	and state, if recursive call fails, don't change tm nor
	any state.
	(get_alt_number): Adjust.
	(recursive): Adjust caller.
	(strptime): Likewise.
	* time/strptime.c (strptime): Likewise.
2007-07-28 19:08:57 +00:00
Ulrich Drepper 087722b854 * include/features.h (__USE_ISOC95): New define.
* wcsmbs/wchar.h (fwprintf, fwscanf, wprintf, wscanf, swprintf,
	swscanf, vfwprintf, vwprintf, vswprintf, fwide): Define even
	for -std=iso9899:199409.
	* CONFORMANCE: Remove comments about unsupported AMD1.
2007-07-19 17:28:06 +00:00
Ulrich Drepper e4eb675d0c * elf/dl-close.c (free_mem): Free _dl_scope_free_list.
2007-06-13  Jakub Jelinek  <jakub@redhat.com>

	* include/link.h: Don't include rtld-lowlevel.h.
	(struct link_map): Remove l_scope_lock.
	* sysdeps/generic/ldsodefs.h: Don't include rtld-lowlevel.h.
	(_dl_scope_free_list): New field (variable) in _rtld_global.
	(DL_LOOKUP_SCOPE_LOCK): Remove.
	(_dl_scope_free): New prototype.
	* elf/dl-runtime.c (_dl_fixup): Don't use __rtld_mrlock_*lock.
	Don't pass DL_LOOKUP_SCOPE_LOCK to _dl_lookup_symbol_x.
	(_dl_profile_fixup): Likewise.
	* elf/dl-sym.c (do_sym): Likewise.  Use wrapped _dl_lookup_symbol_x
	whenever !RTLD_SINGLE_THREAD_P, use THREAD_GSCOPE_SET_FLAG and
	THREAD_GSCOPE_RESET_FLAG around it.
	* elf/dl-close.c (_dl_close_worker): Don't use
	__rtld_mrlock_{change,done}.  Call _dl_scope_free on the old
	scope.  Make sure THREAD_GSCOPE_WAIT () happens if any old
	scopes were queued or if l_scope_mem has been abandoned.
	* elf/dl-open.c (_dl_scope_free): New function.
	(dl_open_worker): Use it.  Don't use __rtld_mrlock_{change,done}.
	* elf/dl-support.c (_dl_scope_free_list): New variable.
	* elf/dl-lookup.c (add_dependency): Remove flags argument.
	Remove DL_LOOKUP_SCOPE_LOCK handling.
	(_dl_lookup_symbol_x): Adjust caller.  Remove DL_LOOKUP_SCOPE_LOCK
	handling.
	* elf/dl-object.c (_dl_new_object): Don't use
	__rtld_mrlock_initialize.

2007-06-19  Ulrich Drepper  <drepper@redhat.com>
2007-06-20 03:19:13 +00:00