2004-03-08 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib. We now assume C89 or better.
* posix/getopt1.c (const): Remove.
* posix/getopt.c (const): Likewise.
* posix/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
_getopt_long_only_r, main): Use prototypes, not old-style definitions.
* posix/getopt.c (exchange, _getopt_initialize, _getopt_internal_r,
_getopt_internal, getopt, main): Likewise.
* posix/getopt.h (getopt, getopt_long, getopt_long_only): Likewise.
* posix/getopt.c [!defined VMS || !HAVE_STRING_H]:
Include <string.h> regardless. No need for <strings.h>.
[!defined _LIBC]: Include "gettext.h" rather than rolling it ourselves.
(_): Define to gettext always.
(my_index): Remove: all uses changed to strchr.
(strlen): Remove declaration.
* posix/getopt.h (struct option.name): Always const char *.
2004-03-08 Marcus Brinkmann <marcus@gnu.org>
* posix/getopt.h (_getopt_internal): Move to ...
* posix/getopt_int.h: ... here. New file.
* include/getopt_int.h: New file.
* include/getopt.h: Remove libc_hidden_proto for getopt_long
and getopt_long_only.
* posix/getopt1.c: Include "getopt_int.h". Remove
libc_hidden_def for getopt_long and getopt_long_only.
(_getopt_long_r, _getopt_long_only_r): New functions.
* posix/getopt.c: Include "getopt_int.h".
(__getopt_initialized): Variable removed.
(nextchar, ordering, posixly_correct, first_nonopt, last_nonopt):
Static variables removed.
(nonoption_flags_max_len, nonoption_flags_len) [_LIBC &&
USE_NONOPTION_FLAGS]: Static variables removed.
(getopt_data): New static variable.
(SWAP_FLAGS): Use d->__nonoption_flags_len instead
nonoption_flags_len.
(exchange): Add new argument D of type struct getopt_data *.
Replace optind with d->optind, optarg with d->optarg, opterr with
d->opterr, optopt with d->optopt, nextchar with d->__nextchar,
first_nonopt with d->__first_nonopt, last_nonopt with
d->__last_nonopt, d->ordering with d->__ordering,
d->posixly_correct with d->__posixly_correct (which is now an
int instead a string, so fix users), nonoption_flags_len
with d->__nonoption_flags_len, nonoption_flags_max_len with
d->__nonoption_flags_max_len.
(_getopt_initialize): Likewise.
(_getopt_internal): Rename to ...
(_getopt_internal_r): ... this. Also add new argument D of type
struct getopt_data * and use of members of D rather than global or
static variables as described for exchange() above. Add new argument
to invocations of _getopt_initialize and exchange.
(_getopt_internal): Reimplement in terms of _getopt_internal_r.
* argp/argp-parse.c: Include <getopt_int.h>.
[_LIBC]: Do not include <bits/libc-lock.h>.
[!_LIBC && HAVE_CTHREADS_H]: Do not include <cthreads.h>.
[!_LIBC] (_argp_hang): Make static.
(getopt_lock, LOCK_GETOPT, UNLOCK_GETOPT): Remove.
(_argp_unlock_xxx): Remove.
(parser_init): Do not use LOCK_GETOPT.
(parser_finalize): Do not use UNLOCK_GETOPT.
(struct parser): New member OPT_DATA.
(parser_init): Initialize parser->opt_data. Use
parser->opt_data.opterr instead of opterr.
(parser_parse_opt): Use parser->opt_data.optarg instead optarg.
(parser_parse_next): Likewise. Use parser->opt_data.optind
instead optind. Use parser->opt_data.optopt instead of optopt.
Call _getopt_long_only_r and _getopt_long_r instead of
getopt_long_only and getopt_long, and pass the extra argument.
* stdio-common/_i18n_number.h: Support printing localized decimal
point and thousand separator.
* wctype/wctrans.c: Add __wctrans alias.
* include/wctype.h: Declare __wctrans.
Based on a patch by Hamed Malek.
2004-01-14 Steven Munroe <sjmunroe@us.ibm.com>
* include/libc-symbols.h [HAVE_ASM_GLOBAL_DOT_NAME]
(_symbol_version): Use C_SYMBOL_DOT_NAME to create '.'ed symbols.
(_default_symbol_version): Use C_SYMBOL_DOT_NAME to create '.'ed
symbols.
* sysdeps/powerpc/Makefile: Add rtld-global-offsets.sym to
gen-as-const-headers.
* sysdeps/powerpc/elf/rtld-global-offsets.sym: New file.
* sysdeps/powerpc/sysdep.h: Define v# symbols for vector registers.
Define PPC_FEATURE_* masks for Aux Vector AT_HWCAP.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_SWAPCONTEXT_SYSCALL): Define for PPC and 2.6.0 kernels.
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h [!__WORDSIZE == 32]:
Declare mcontext_t inline and include altivec state for 64-bit.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, and swapcontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, swapcontext, and makecontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
(__getcontext): Upgrade to save Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_getcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
(__makecontext): Use parm save area instead of compiler_dw to hold
context pointer.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
(__setcontext): Upgrade to restore Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_setcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
(__swapcontext): Upgrade to swap Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)](__novec_swapcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h
(SIGCONTEXT_V_REGS_PTR, SIGCONTEXT_V_RESERVE): Defined.
2004-01-12 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions: Add GLIBC_2.3.4
versions for setcontext, getcontext, swapcontext, and makecontext.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
(__getcontext): Upgrade to save Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_getcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
(__makecontext): Upgrade to align for Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_makecontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
(__setcontext): Upgrade to restore Altivec regs and version
GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)](__novec_setcontext):
Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
(__swapcontext): Upgrade to swap Altivec regs and version GLIBC_2_3_4.
[SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)]
(__novec_swapcontext): Compatible with GLIBC_2.3.3 release.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h:
(_UC_VSCR, _UC_VRSAVE): Define.
(_FRAME_BACKCHAIN, _FRAME_LR_SAVE,_FRAME_PARM_SAVE1,_FRAME_PARM_SAVE2,
_FRAME_PARM_SAVE3, _FRAME_PARM_SAVE4): Defined.
2004-01-14 Ulrich Drepper <drepper@redhat.com>
* configure.in: Define HAVE_Z_RELRO if the linker supports -z relro.
* config.h.in: Add entry for HAVE_Z_RELRO.
* include/libc-symbols.h: Define attribute_relro.
* elf/dl-load.c: Add attribute_relro to env_path_list, capstr, ncapstr,
max_capstrlen, and max_dirnamelen definitions.
* elf/rtld.c: Add attribute_relro to _dl_argc, _dl_argv, _dl_skip_args,
load_time, start_time, library_path, preloadlist, version_info,
any_debug.
Remove rtld_total_time. Make it a local variable. Pass pointer to
it to print_statistics. Change print_statistics accordingly.
* sysdeps/generic/dl-sysdep.c: Add attribute_relro to _dl_auxv. Use
attribute_relro instead of explicitly assigning variable to the
.data.rel.ro section for __libc_enable_secure and __libc_stack_end.
* sysdeps/generic/ldsodefs.h: Declare __libc_stack_end, _dl_argc,
_dl_argv, _dl_argv_internal with attribute_relro.
2004-01-13 Ulrich Drepper <drepper@redhat.com>
* Makeconfig: Define relro-LDFLAGS if have-z-relro==yes. Add it to
LDFLAGS.so and LDFLAGS-rtld.
(+link): Add relro-LDFLAGS.
* Makeconfig (shlib.lds): Place __libc_subfreeres, __libc_atexit, and
__libc_thread_subfreeres sections after .jcr section.
* config.make.in: Add have-z-relro.
* configure.in: Add check for -z relro option.
* include/link.h (struct link_map): Add relro_addr and relro_size
members.
* elf/dl-load.c (_dl_map_object_from_fd): Recognize PT_GNU_RELRO.
* elf/dl-reloc.c (_dl_relocate_object): At the end, make relro
part of loaded segments read-only.
* elf/elf.h: Define PT_GNU_RELRO.
* elf/rtld.c (_dl_start): Recognize PT_GNU_RELRO of ld.so.
(dl_main): Recognize PT_GNU_RELRO of the application. Call
_dl_debug_initialize and initialize l_info[DT_DEBUG] before
relocations.
2003-11-15 Ulrich Drepper <drepper@redhat.com>
* wcsmbs/mbsinit.c: Undef mbsinit and __mbsinit.
* include/wchar.h: Provide inline versions of mbsinit and __mbsinit.
* include/dlfcn.h (__RTLD_OPENEXEC): Define.
* elf/dl-load.c (_dl_map_object_from_fd): Don't allow loading
executables unless __RTLD_OPENEXEC flag is present.
* elf/rtld.c (dl_main): Pass __RTLD_OPENEXEC flag to
_dl_map_object when loading the executable.
reverse lookup format for IPv6 addresses is using bitstring and
* resolv/ns_name.c: Implement encoding and decoding bitstring in
* sysdeps/generic/utmp_file.c: Use not-cancelable syscalls all
over the place. It would be allowed to have these fucntions as
cancellation points but the cleanup would be ugly and a lot of
work.
* sysdeps/generic/not-cancel.h (fcntl_not_cancel): Define.
* sysdeps/unix/sysv/linux/not-cancel.h (fcntl_not_cancel): Define.
* include/fcntl.h (__fcntl_nocancel): Declare.
* sysdeps/unix/sysv/linux/fcntl.c: New file.
* sysdeps/unix/sysv/linux/i386/fcntl.c (__libc_fcntl): Only enable
cancellation if absolutely needed.
(__fcntl_nocancel): Define.
* posix/unistd.h (gethostid): Remove __THROW. Clarify comment.
* sysdeps/unix/sysv/linux/Makefile (CFLAGS-gethostid.c): Add
-fexceptions.
* sysdeps/unix/sysv/linux/gethostid.c (gethostid): Use
extend_alloca.
* resolv/res_init.c (__res_nclose): Use close_not_cancel_no_status
instead of __close.
2003-07-24 Ulrich Drepper <drepper@redhat.com>
* include/link.h (struct link_map): Add l_tls_firstbyte_offset field.
* sysdeps/generic/dl-tls.c [TLS_TCB_AT_TP] (_dl_determine_tlsoffset):
Fix calculation of offsets to take misalignment of first byte in
file into account.
* elf/dl-load.c (_dl_map_object_from_fd): Initialize
l_tls_firstbyte_offset field.
* elf/rtld.c (_dl_start_final, _dl_start, dl_main): Likewise.
* elf/dl-reloc.c (_dl_allocate_static_tls): Change return type to int.
Take l_tls_firstbyte_offset information into account.
(CHECK_STATIS_TLS): _dl_allocate_static_tls can fail now.
* sysdeps/generic/ldsodefs.h: Adjust _dl_allocate_static_tls prototype.
* elf/Makefile: Add rules to build and run tst-tls14.
* elf/tst-tls14.c: New file.
* elf/tst-tlsmod14a.c: New file.
* elf/tst-tlsmod14b.c: New file.
2003-07-22 Jakub Jelinek <jakub@redhat.com>
* include/resolv.h (__resp): Declare. Define to __libc_resp
if in libc.so.
(_res): If USE___THREAD, define to (*__resp).
* resolv/res_libc.c (_res): Normal .bss variable with compat_symbol
even if USE___THREAD.
(__resp): New __thread variable.
(__libc_resp): New alias.
* resolv/Versions (libc): Export _res@GLIBC_2.0 even if
USE_TLS && HAVE___THREAD. Export __resp@@GLIBC_PRIVATE.
* sysdeps/generic/res-state.c (__res_state): Return __resp
if USE___THREAD.
* include/time.h: Define CLOCK_IDFIELD_SIZE.
* sysdeps/posix/clock_getres.c: Recognize thread CPU clock IDs.
* sysdeps/unix/clock_gettime.c: Likewise.
* sysdeps/unix/clock_settime.c: Likewise.
* sysdeps/unix/clock_nanosleep.c (CPUCLOCK_P): Adjust for new
clock id for thread CPU clocks.
2003-05-28 Ulrich Drepper <drepper@redhat.com>
* include/libc-symbols.h: Define hidden attribute for real also if
LIBC_NONSHARED is defined. Patch by Jakub Jelinek.
* csu/Makefile: Add rules to build Scrt1.o.
* sysdeps/i386/elf/start.S: Make code compilable with SHARED.
* sysdeps/generic/enbl-secure.c (__libc_enable_secure_decided): New
variable.
(__libc_init_secure): Don't do anything if __libc_enable_secure_decided
is nonzero.
* include/unistd.h: Declare __libc_enable_secure_decided.
* elf/dl-support.c (_dl_aux_init): Recognize AT_UID, AT_EUID, AT_GID,
and AT_EGID. If all found, set __libc_enable_secure and
__libc_enable_secure_decided.
* sysdeps/unix/sysv/linux/i386/bp-thunks.h: Likewise.
* sysdeps/unix/sysv/linux/Makefile ($(objpfx)syscall-%.h):
Use $(make-target-directory).
* sysdeps/unix/Makefile ($(objpfx)stub-syscalls.c): Likewise.
* Makerules (compile-mkdep-flags): New variable, pass -MD -MF $@.d.
(compile-command.S): Don't use ifndef. Append $(compile-mkdep-flags).
(compile-command.s, compile-command.c): Likewise.
($(objpfx)%.d): All such pattern rules removed.
($(+sysdir_pfx)sysd-rules): Don't generate them.
($(common-objpfx)dummy.d): Target removed.
(make-dummy-dep): Variable removed.
(generate-md5): Likewise.
(%.d: %.dt): New pattern rule.
(+depfiles): Use $(wildcard) function to get just existing *.d files
and .d files for existing *.dt files.
(common-clean): Remove all *.d and *.dt files.
(before-compile): Add $(objpfx). when it doesn't exist,
regardless of $(no_deps).
* elf/rtld-Rules ($(objpfx)rtld-%.d): All such pattern rules removed.
(rtld-depfiles): Use .os.d instead of .d names.
Include existing *.d files and .d files for existing *.dt files.
* Makerules ($(common-objpfx)%.make): Protect with [! subdir].
Use -MD, -MT and -MF flags instead of SUNPRO_DEPENDENCIES variable.
* sysdeps/unix/Makefile ($(common-objpfx)s-%.d): Remove compat.h hack.
Do s-*.d includes only if we have some syscall routines in this subdir.
* include/libc-symbols.h (libc_freeres_ptr): Use %nobits instead of
@nobits. The former is accepted by gas on any ELF platform.
Just don't complain about missing it under --without-cvs.
* configure: Regenerated.
* include/libc-symbols.h (__symbol_set_attribute): New macro,
give hidden for [SHARED] and weak for [! SHARED].
(symbol_set_declare): Use that. Never need weak_extern these days.
* Makerules ($(common-objpfx)shlib.lds): Go back to using PROVIDE.
Depend on $(..)Makerules.
atomic_compare_and_exchange_val_acq, atomic_add_zero,
atomic_compare_and_exchange_bool_acq and atomic_add_negative tests.
* include/atomic.h (atomic_add_negative, atomic_add_zero):
Prefix local variable so that it doesn't clash with the one
in atomic_exchange_and_add.
* sysdeps/ia64/bits/atomic.h (atomic_exchange): Fix for long/void *
pointers.
(atomic_exchange_and_add): Implement using __sync_fetch_and_add_?i.
* sysdeps/powerpc/bits/atomic.h (atomic_exchange_and_add): Force
value into register.
* sysdeps/s390/bits/atomic.h (__arch_compare_and_exchange_val_64_acq):
Cast newval to long.
* sysdeps/x86_64/bits/atomic.h
(__arch_compare_and_exchange_val_64_acq): Cast newval and oldval to
long.
(atomic_exchange): Cast newvalue to long if sizeof == 8.
(atomic_exchange_and_add): Cast value to long if sizeof == 8.
(atomic_add, atomic_add_negative, atomic_add_zero): Likewise.
(atomic_bit_set): Shift 1L up in all cases to shut up warnings.
2003-03-25 Ulrich Drepper <drepper@redhat.com>
* csu/tst-atomic.c: Adjust tests to what atomic_add_negative and
atomic_add_zero were supposed to do.
* include/atomic.h: Adjust atomic_add_negative and atomic_add_zero
to x86 behavior.
* sysdeps/generic/bits/typesizes.h (__TIMER_T_TYPE): Define as void*.
This matches the new timer implementation.
* sysdeps/unix/sysv/linux/bits/siginfo.h (struct siginfo): Adjust
timer info for what the kernel provides these days.
(struct sigevent): Add _tid field.
Define SIGEV_THREAD_ID.
* Versions.def (librt): Add GLIBC_2.3.3.
* abilist/libpthread.abilist: Update for nptl.
(__atomic_val_bysize, __atomic_bool_bysize): New macros.
(atomic_compare_and_exchange_val_acq): Use it.
(atomic_compare_and_exchange_bool_acq): Likewise.
(atomic_increment_and_test): Invert sense of test.
(atomic_decrement_and_test): Likewise.
* csu/tst-atomic.c: Update those tests to match.
Add comment.
(atomic_decrement_and_test): Add comment.
2003-03-22 Jakub Jelinek <jakub@redhat.com>
* include/atomic.h (atomic_compare_and_exchange_val_acq): Add comment.
Don't define if __arch_compare_and_exchange_val_32_acq is not defined.
(atomic_compare_and_exchange_bool_acq): Add comment. Don't use
__oldval variable in the macro, since it might be macro argument.
(atomic_decrement_if_positive): Initialize __memp, remove setting
of non-existent variable.
(atomic_bit_test_set): Cast 1 to __typeof (*mem) before shifting.
* sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Implement
using atomic_compare_and_exchange_val_acq.
(atomic_decrement_if_positive, atomic_bit_test_set): Define.
* sysdeps/s390/bits/atomic.h (__arch_compare_and_exchange_val_8_acq):
Renamed from...
(__arch_compare_and_exchange_bool_8_acq): ... this.
(__arch_compare_and_exchange_val_16_acq): Renamed from...
(__arch_compare_and_exchange_bool_16_acq): ... this.
(__arch_compare_and_exchange_val_32_acq): Return old value. Renamed
from...
(__arch_compare_and_exchange_bool_32_acq): ... this.
(__arch_compare_and_exchange_val_64_acq): Return old value. Renamed
from...
(__arch_compare_and_exchange_bool_64_acq): ... this.
(__arch_compare_and_exchange_val_32_acq): Use __typeof for local
variables types instead of assuming int.
Change prefix of local variables to __arch.
* sysdeps/generic/bits/atomic.h (arch_compare_and_exchange_acq):
Remove.
(atomic_compare_and_exchange_val_acq,
atomic_compare_and_exchange_bool_acq): Define.
* csu/tst-atomic.c: New test.
* csu/tst-atomic-long.c: New test.
* csu/Makefile (tests): Add tst-atomic and tst-atomic-long.
* malloc/memusagestat.c (main): Kill warning if uint64_t is ulong.
* sysdeps/s390/Versions: Add trailing newline.
* sysdeps/unix/sysv/linux/sysconf.c (__sysconf): Kill warning
if INTERNAL_SYSCALL_ERROR_P doesn't use its first argument.
variable. Remove superfluous memory clobber.
* include/atomic.h: Syntax braino fix.
* posix/tst-nice.c (do_test): Use %m formats instead of printing errno
in decimal. Don't bail if niced at start. Just check that nice call
bumps the total at all.
* include/gmp.h: Include/gmp-mparam.h.
* stdlib/strtod.c: Include gmp-mparam.h before gmp.h and
gmp-impl.h.
2003-03-14 Alexandre Oliva <aoliva@redhat.com>
2003-03-03 Ian Wienand <ianw@gelato.unsw.edu.au>
* sysdeps/unix/sysv/linux/ia64/clone2.S: Update to take extra clone
flags.
* include/sched.h: Update clone2 prototype.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c
(__fe_nomask_env): Use __prctl not prctl.
* sysdeps/unix/sysv/linux/syscalls.list: Add __prctl alias for
prctl syscall.
2002-12-31 Ulrich Drepper <drepper@redhat.com>
* string/string-inlines.c: Define __memcpy_g and __strchr_g macros
to avoid using the exported symbols. Define aliases with the
original names separately.
* include/time.h: Add libc_hidden_proto for __strftime_l.
* include/wchar.h: Add libc_hidden_proto for __wcsftime_l.
* time/strftime.c: Always use libc_hidden_def if _LIBC.
* libio/libioP.h: Add libc_hidden_proto for _IO_file_open.
* libio/fileops.c: Add libc_hidden_def for _IO_file_open.
* malloc/mtrace.c: Add libc_hidden_proto and libc_hidden_def for
tr_break.
* csu/Makefile (routines): Add dso_handle.
* csu/dso_handle.c: New file.
* include/wctype.h: Define iswalnum with libc_hidden_proto.
* include/signal.h: Define raise with libc_hidden_proto.
* sysdeps/unix/sysv/linux/fexecve.c (fexecve): Use __snprintf and
__execve instead of snprintf and execve.
2002-10-15 Jakub Jelinek <jakub@redhat.com>
* include/resolv.h (__libc_res_nquery, __libc_res_nsearch,
__libc_res_nsend): New prototypes.
* resolv/res_query.c (QUERYSIZE): Define.
(__libc_res_nquery): Renamed from res_nquery. Added answerp
argument. Allocate only QUERYSIZE bytes first, if res_nmkquery
fails use MAXPACKET buffer. Call __libc_res_nsend instead of
res_nsend, pass answerp.
(res_nquery): Changed into wrapper around __libc_res_nquery.
(__libc_res_nsearch): Renamed from res_nsearch. Added answerp
argument. Call __libc_res_nquerydomain and __libc_res_nquery
instead of the non-__libc_ variants, pass them answerp.
(res_nsearch): Changed into wrapper around __libc_res_nsearch.
(__libc_res_nquerydomain): Renamed from res_nquerydomain.
Added answerp argument. Call __libc_res_nquery instead of
res_nquery, pass answerp.
(res_nquerydomain): Changed into wrapper around
__libc_res_nquerydomain.
* resolv/res_send.c: Include sys/ioctl.h.
(MAXPACKET): Define.
(send_vc): Change arguments. Reallocate answer buffer if it is
too small.
(send_dg): Likewise.
(__libc_res_nsend): Renamed from res_nsend. Added ansp argument.
Reallocate answer buffer if it is too small and hooks are in use.
Adjust calls to send_vc and send_dg.
(res_nsend): Changed into wrapper around __libc_res_nsend.
* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Allocate
just 1K answer buffer on the stack, use __libc_res_nsearch instead
of res_nsearch.
(_nss_dns_gethostbyaddr_r): Similarly with __libc_res_nquery.
* resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise.
(_nss_dns_getnetbyname_r): Similarly with __libc_res_nsearch.
* resolv/gethnamaddr.c (gethostbyname2): Likewise.
(gethostbyaddr): Similarly with __libc_res_nquery.
* resolv/Versions (libresolv): Export __libc_res_nquery and
__libc_res_nsearch at GLIBC_PRIVATE.
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-09 Ulrich Drepper <drepper@redhat.com>
* Versions.def (libc): Add GLIBC_2.3.1.
(libpthread): Add GLIBC_2.3.1.
* include/signal.h: Add libc_hidden_proto for __sigwait, __sigwaitinfo,
and __sigtimedwait.
* signal/Versions: Add __sigtimedwait, __sigwait, and __sigwaitinfo.
* sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Add
libc_hidden_def.
* sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Likewise.
* sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise.
* include/sys/msg.h: Declare __libc_msgrcv and __libc_msgsnd.
* sysdeps/unix/sysv/linux/msgrcv.c (__msgrcv): Rename to __libc_msgrcv
and make old name an alias.
* sysdeps/unix/sysv/linux/msgsnd.c (__msgsnd): Rename to __libc_msgsnd
and make old name an alias.
* sysvipc/Versions (libc) [GLIBC_PRIVATE]: Add __libc_msgrcv and
__libc_msgsnd.
* include/sys/uio.h: Declare __libc_readv and __libc_writev.
* misc/Versions (libc) [GLIBC_PRIVATE]: Add __libc_readv and
__libc_writev.
* sysdeps/generic/readv.c (__readv): Rename to __libc_readv and make
old name an alias.
* sysdeps/posix/readv.c: Likewise
* sysdeps/unix/sysv/aix/readv.c: Likewise.
* sysdeps/unix/sysv/linux/readv.c: Likewise.
* sysdeps/generic/writev.c (__writev): Rename to __libc_writev and make
old name an alias.
* sysdeps/posix/writev.c: Likewise
* sysdeps/unix/sysv/aix/writev.c: Likewise.
* sysdeps/unix/sysv/linux/writev.c: Likewise.
* include/sys/wait.h: Declare __waitid.
* posix/Versions (libc) [GLIBC_PRIVATE]: Add __waitid.
* sysdeps/generic/waitid.c (waitid): Rename to __waitid and make old
name an alias.
* sysdeps/posix/waitid.c: Likewise.
* sysdeps/unix/sysv/aix/waitid.c: Likewise.
* sysdeps/unix/sysv/linux/syscalls.list: Add creat syscall.
2002-10-07 Jakub Jelinek <jakub@redhat.com>
* include/alloca.h (__libc_use_alloca, __libc_alloca_cutoff): New
prototypes.
(__MAX_ALLOCA_CUTOFF): Define.
Include allocalim.h.
* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r,
_nss_dns_gethostbyaddr_r): Use alloca or malloc to allocate
host_buffer depending on __libc_use_alloca.
* resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r,
_nss_dns_getnetbyaddr_r): Use alloca or malloc to allocate
net_buffer depending on __libc_use_alloca.
* resolv/res_query.c (res_nquery): Use alloca or malloc to allocate
buf depending on __libc_use_alloca.
* resolv/gethnamaddr.c (gethostbyname2, gethostbyaddr): Likewise.
* stdio-common/vfprintf.c (vfprintf): Use __libc_use_alloca
instead of hardcoded constants.
Pass proper size argument to alloca and compute end for wide char
version.
* stdio-common/printf_fp.c (__printf_fp): Use __libc_use_alloca
instead of hardcoded constants.
* string/strcoll.c (strcoll): Likewise.
* string/strxfrm.c (strxfrm): Likewise.
* sysdeps/posix/readv.c (__readv): Likewise.
* sysdeps/posix/writev.c (__writev): Likewise.
* sysdeps/generic/allocalim.h: New file.
file-specific variable override so it compiles properly when using
--with-headers.
* NEWS: Added item for powerpc64-linux port.
* include/libc-symbols.h [HAVE_ASM_GLOBAL_DOT_NAME]
(C_SYMBOL_DOT_NAME): Insure that C_SYMBOL_DOT_NAME works for
various gcc versions. Dot names required for powerpc64.
[HAVE_ASM_GLOBAL_DOT_NAME] (_weak_extern): Add .weakext '.'ed symbol.
[HAVE_ASM_GLOBAL_DOT_NAME] (strong_alias): Add .global
C_SYMBOL_DOT_NAME(alias).
[HAVE_ASM_GLOBAL_DOT_NAME] (strong_data_alias): New macro. Same as
original strong_alias macro.
[HAVE_ASM_GLOBAL_DOT_NAME] (weak_alias): Add .weakext/.weak
C_SYMBOL_DOT_NAME(alias).
[HAVE_ASM_GLOBAL_DOT_NAME] (_symbol_version): Add .symver '.'ed name.
[HAVE_ASM_GLOBAL_DOT_NAME] (_default_symbol_version): Add .symver
'.'ed name.
Add comments on libc_hidden_data_def and libc_hidden_data_weak usage.
[HAVE_ASM_GLOBAL_DOT_NAME] (hidden_dot_def1): New macro. Generate
.global C_SYMBOL_DOT_NAME(alias). Otherwise an empty macro.
(hidden_def): Append hidden_dot_def1 macro to definition.
(hidden_ver): Append hidden_dot_def1 macro to definition.
(hidden_data_def): New macro. Same as original hidden_def macro.
(hidden_data_ver): New macro. Same as original hidden_ver macro.
[HAVE_ASM_GLOBAL_DOT_NAME] (hidden_dot_weak1): New macro. Generate
.weakext C_SYMBOL_DOT_NAME(alias). Otherwise an empty macro.
(hidden_weak): Append hidden_dot_weak1 macro to definition.
(hidden_data_weak): New macro. Same as original hidden_weak macro.
[HAVE_ASM_GLOBAL_DOT_NAME] (HIDDEN_JUMPTARGET): Define as .__GI_name.
Otherwise defined as __GI_name.
(libc_hidden_data_def): New macro. Use hidden_data_def.
(libc_hidden_data_weak): New macro. Use hidden_data_weak.
(libc_hidden_data_ver): New macro. Use hidden_data_ver.
(rtld_hidden_data_def): New macro. Use hidden_data_def.
(rtld_hidden_data_weak): New macro. Use hidden_data_weak.
(rtld_hidden_data_ver): New macro. Use hidden_data_ver.
(libm_hidden_data_def): New macro. Use hidden_data_def.
(libm_hidden_data_weak): New macro. Use hidden_data_weak.
(libm_hidden_data_ver): New macro. Use hidden_data_ver.
* inet/in6_addr.c: Replace libc_hidden_def with libc_hidden_data_def.
* include/libc-symbols.h: Change *hidden_proto macros to accept
option parameters and pass those to the attribute definition.
* include/unistd.h (_exit): Add __noreturn__ to libc_hidden_proto call.
* sysdeps/mach/hurd/_exit.c: Add libc_hidden_def.
* sysdeps/generic/_exit.c: Likewise.
2002-09-12 Jakub Jelinek <jakub@redhat.com>
* elf/rtld.c (struct dl_start_final_info): New.
(_dl_start_final): Change second argument to struct
dl_start_final_info *. Set start_time from info.
(_dl_start): Remove bootstrap_map variable, add info.
Define bootstrap_map as macro. If not DONT_USE_BOOTSTRAP_MAP,
store HP_TIMING_NOW result into info.start_time.
2002-09-14 Ulrich Drepper <drepper@redhat.com>
* include/unistd.h: Declare __exit_thread.
* sysdeps/generic/libc-start.c: Remove dummy_addr.
Wrap call to main in setjmp if HAVE_CANCELBUF is defined.
* sysdeps/unix/sysv/linux/exit-thread.S: New file.
* sysdeps/unix/sysv/linux/_exit.c: New file.
* sysdeps/unix/sysv/linux/i386/_exit.S: New file.
* sysdeps/unix/sysv/linux/Makefile [subdir==posix] (sysdep_routines):
Add exit-thread.
* configure.in: Add dl_iterate_phdr to test using -nostdlib.
Variable declarations removed.
(__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): Declare
these functions to replace them.
(__isctype, tolower, toupper, _tolower, _toupper): Use those accessor
functions plus an indirection rather than the old global variables.
* include/ctype.h (__isctype, tolower, _tolower, toupper, _toupper):
Macros removed.
(__ctype_b_loc, __ctype_toupper_loc, __ctype_tolower_loc): New extern
inline functions.
* ctype/ctype-info.c: Revert last reversion back the other way.
Define tsd vars CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
Define real function versions of include/ctype.h inlines here.
* ctype/Versions (libc: GLIBC_2.3): Add __ctype_b_loc,
__ctype_tolower_loc, __ctype_toupper_loc.
* locale/lc-ctype.c: Revert last reversion back the other way.
(_nl_postload_ctype): If current thread uses the global locale,
update its tsd vars.
* locale/uselocale.c (__uselocale): Update tsd vars from new locale.
* hurd/hurd/threadvar.h (enum __hurd_threadvar_index): Add CTYPE_B,
CTYPE_TOLOWER, CTYPE_TOUPPER.
* sysdeps/generic/bits/libc-tsd.h (__libc_tsd_address): New macro.
* sysdeps/mach/hurd/bits/libc-tsd.h (__libc_tsd_address): Renamed
from __libc_tsd_threadvar_location.
(__libc_tsd_set, __libc_tsd_get): Update uses.
* ctype/ctype.h: Undo the patch before the last one. Put back the
macro definitions for the standard functions to access the
classification and mapping arrays.
* include/ctype.h: Partly revert last patch. Move the macro
definitions for the exported functions back to the public header.
#undef all the macros defined here before redefining.
* ctype/ctype-info.c: Revert last patch.
* locale/lc-ctype.c: Revert last patch.
* sysdeps/mach/hurd/pwrite64.c: No libc_hidden_def (__libc_pwrite64).
* sysdeps/mach/hurd/dl-sysdep.c (__GI_abort): Define alias for abort.
* include/assert.h (__assert_perror_fail): Declare it, do hidden_proto.
* assert/assert-perr.c: Add libc_hidden_def.
* elf/dl-minimal.c [! NDEBUG] (__assert_perror_fail): New function.
* sysdeps/gnu/errlist-compat.awk: Don't fail if there are no versions
found at all.
* sysdeps/gnu/Versions: File removed. Moved all #errlist-compat
sys_errlist stuff to ...
* sysdeps/unix/sysv/linux/Versions: ... here.
* mach/mach.h: Include <features.h>.
2002-08-28 Ulrich Drepper <drepper@redhat.com>
* include/wchar.h: Declare __mbsrtowcs_l.
* wcsmbs/Makefile (routines): Add mbsrtowcs_l.
* wcsmbs/mbsrtowcs.c: Add support for compilation with
USE_IN_EXTENDED_LOCALE_MODEL.
* wcsmbs/mbsrtowcs_l: New file.
* wcsmbs/wcsmbsload.c (__wcsmbs_to_wc): Renamed from to_wc. Don't
define as static. Change all uses.
(__wcsmbs_getfct): Renamed from getfct. Don't define as static.
Change all callers.
* wcsmbs/wcsmbsload.h: Declare __wcsmbs_to_wc and __wcsmbs_getfct.
* time/strftime.c: When translating for the extended locale model
use the _l functions.
* time/Makefile (tests): Add tst-ftime_l.
* time/tst-ftime_l.c: New file.
* locale/locale.h (__newlocale, __duplocale, __freelocale,
__uselocale): Don't declare these any more.
* include/locale.h (__uselocale): Declare here instead, using __typeof.
2002-08-27 Ulrich Drepper <drepper@redhat.com>
* sysdeps/arm/Dist: Add bits/link.h.
* sunrpc/Makefile: Distribute thrsvc.
* stdio-common/Makefile: Remove more left-overs from old stdio.
* include/linewrap.h: Removed.
* libio/bug-mmap-fflush.c: Rewrite to not touch source directory.
* intl/Makefile (distribute): Add plural-eval.c.
* stdio-common/Makefile (headers): Remove bits/stdio_lim.h. This
file isn't distributed. Add special rules to install bits/stdio_lim.h.
* Make-dist: Remove traces of old stdio.
* Makeconfig: Likewise.
* locale/Makefile (localedef-aux): New variable. Only md5
assigned to it. These files are not ddistributed in this directory.
* sysdeps/unix/sysv/linux/s390/Dist: Add sys/procfs.h.
* sysdeps/unix/sysv/linux/s390/s390-64/Dist: Remove sys/procfs.h.
* sysdeps/unix/sysv/linux/s390/s390-32/Dist: Likewise.
* sysdeps/unix/sysv/linux/Dist: Remove sys/sendfile.h.
* sysdeps/mach/hurd/bits/errno.h: Regenerated.
* sysdeps/gnu/Versions: New file.
* sysdeps/unix/sysv/linux/Versions (libc: GLIBC_2.1): Remove
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr; from here.
* sysdeps/gnu/Makefile ($(..)sysdeps/gnu/errlist-compat.c): New target.
($(objpfx)errlist.d): Depend on $(..)sysdeps/gnu/errlist-compat.c.
* sysdeps/gnu/errlist.awk: Make output define _sys_errlist_internal
and _sys_nerr_internal instead of anything else. Make it include
"errlist-compat.c" if [!NOT_IN_libc && !ERRLIST_NO_COMPAT].
Make it emit some asm magic if [EMIT_ERR_MAX].
* sysdeps/gnu/errlist.c: Regenerated.
* sysdeps/gnu/errlist-compat.awk: New file.
* sysdeps/gnu/errlist-compat.c: New file (generated).
* sysdeps/mach/hurd/errlist.c (ERRLIST_NO_COMPAT): New macro.
(_sys_errlist_internal): Define this as a macro for _hurd_errlist.
(_sys_nerr_internal): Define this is a macro for _hurd_nerr.
(SYS_ERRLIST, SYS_NERR): Macros removed.
(sys_nerr, _sys_nerr): Remove these weak aliases.
* sysdeps/unix/sysv/linux/errlist.c: File removed.
* sysdeps/unix/sysv/linux/errlist.h: File removed.
* sysdeps/unix/sysv/linux/arm/errlist.c: File removed.
* include/libc-symbols.h (declare_symbol): New macro.
* config.h.in (ASM_TYPE_DIRECTIVE_PREFIX): New #undef.
* configure.in: New check to define it.
* configure: Regenerated.
2002-08-15 Ulrich Drepper <drepper@redhat.com>
* csu/Makefile: Define elide-routines.os not static-only-routines.
* include/sched.h (__clone): Add varargs at the end.
* elf/rtld.c (_dl_start): All TLS_INIT_TP to fail and stop in that
case.
(TLS_INIT_HELPER): If defined use it.
* sysdeps/generic/libc-tls.c (TLS_INIT_HELPER): Likewise.
* locale/loadarchive.c (archfname): Add missing slash.
* sysdeps/generic/strtold.c (__strtold_internal): Add libc_hidden_def.
* wcsmbs/wcstold.c (__wcstold_internal): Add libc_hidden_def.
* include/signal.h: No libc_hidden_proto for raise,
__libc_current_sigrtmin, __libc_current_sigrtmax.
These need to be overridden by linuxthreads.
* sysdeps/posix/raise.c: Reverted.
* sysdeps/generic/raise.c: Reverted.
* signal/allocrtsig.c: Reverted.
Use libc_hidden_proto for getopt_long, getopt_long_only.
* posix/getopt1.c [_LIBC]: Include <getopt.h> instead of "getopt.h".
Add libc_hidden_def.
* sysdeps/generic/unwind-dw2-fde-glibc.c [_LIBC] (dl_iterate_phdr):
Define as a macro for __dl_iterate_phdr.
* inet/getnetgrent_r.c (internal_setnetgrent): Renamed from __ name,
made static. Add __ name as a strong alias.
(internal_endnetgrent): Likewise.
(internal_getnetgrent_r): Likewise.
actually iterate over the elements. Fix typo p_type -> p_vaddr.
* include/pthread.h: Don't declare __pthread_initialize_minimal as
weak here; we declare it weak or strong in the one place we use it.
* sysdeps/generic/libc-start.c: ... which is here.
Don't make the decl weak if [USE_TLS], since static programs need TLS
setup even when single-threaded.
2002-08-04 Ulrich Drepper <drepper@redhat.com>
* stdio-common/psignal.c: Declare _sys_siglist_internal. Use USEINT
to access _sys_siglist.
* string/strsignal.c: Likewise.
* sysdeps/generic/siglist.c: Add _sys_siglist_internal alias.
* sysdeps/gnu/siglist.c: Likewise.
* sysdeps/unix/siglist.c: Likewise.
* sysdeps/unix/sysv/linux/arm/siglist.c: Likewise.
* libio/fileops.c: Add missing INTUSEs for _IO_file_jumps.
* libio/wfileops.c: Add missing INTUSE for _IO_file_close.
* intl/dcigettext.c: Define _nl_default_dirname_internal as hidden
alias and use it.
* intl/bindtextdom.c: Use _nl_default_dirname_internal.
* include/netinet/in.h: Add declaration of in6addr_loopback_internal.
* inet/in6_addr.c: Add INTVARDEF for in6addr_loopback.
* sysdeps/posix/getaddrinfo.c: Use INTUSE for in6addr_loopback access.
* include/time.h: Add libc_hidden_proto for __gmtime_r.
* time/gmtime.c (__gmtime_r): Add libc_hidden_def.
* iconv/Versions: Replace __gconv_alias_db, __gconv_modules_db,
and __gconv_cache with __gconv_get_alias_db, __gconv_get_modules_db,
and __gconv_get_cache respectively.
* iconv/gconv_cache.c (gconv_cache): Renamed for __gconv_cache and
defined static. Change all users.
(__gconv_get_cache): New function.
* iconv/gconv_db.c (__gconv_get_modules_db): New function.
(__gconv_get_alias_db): New function.
* iconv/gconv_int.h (__gconv_alias_db): Declare as hidden.
(__conv_modules_db): Likewise.
Add prototypes for __gconv_get_cache, __gconv_get_modules_db,
and __gconv_get_alias_db.
* iconv/iconv_prog.c: Use the new functions instead of accessing the
variables.
* include/stdlib.h: Add prototype and libc_hidden_proto for
__default_morecore.
* sysdeps/generic/morecore.c: Include <stdlib.h>.
* malloc/obstack.c: Remove fputs macro.
* malloc/mtrace.c: Remove fopen macro.
* locale/localename.c (_nl_current_names): ... here, new file.
Make it global, with attribute_hidden.
* locale/localeinfo.h: Declare it.
* locale/Makefile (aux): Add localename.
* locale/localename.c (__current_locale_name): New function.
* include/locale.h (__current_locale_name): Declare it.
* intl/dcigettext.c (guess_category_value): Use that instead of
calling setlocale.
* locale/locale.h [__USE_GNU] (locale_t): New type alias of __locale_t.
[__USE_GNU] (newlocale, duplocale, freelocale, uselocale): New decls.
[__USE_GNU] (LC_GLOBAL_LOCALE): New macro.
* locale/newlocale.c: Add alias to __ name.
* locale/duplocale.c: Likewise.
* locale/freelocale.c: Likewise.
* locale/uselocale.c: New file.
* locale/Makefile (routines): Add it.
* locale/Versions (libc: GLIBC_2.3): New set.
Add newlocale, duplocale, freelocale, uselocale.
(libc: GLIBC_PRIVATE): Add __uselocale.
* locale/localeinfo.h [SHARED]
(_NL_CURRENT_LOCALE): New macro, defined to fetch a tsd value.
(_NL_CURRENT_DATA): Define using that.
(_NL_CURRENT, _NL_CURRENT_WSTR, _NL_CURRENT_WORD): Define using that.
(_NL_CURRENT_DEFINE): Define to empty.
[! SHARED]: Decls of _nl_current_CATEGORY and _nl_current
conditionalized on this.
* locale/xlocale.c (NL_C_INTIIALIZER): New macro,
taking initializer of _nl_C_locobj.
[SHARED] (_nl_global_locale): New variable, using that initializer.
(_nl_C_locobj): Use new macro for initialzier.
* locale/setlocale.c [! SHARED] (_nl_current): Conditionalize on this.
[! SHARED] (CATEGORY_USED): New macro.
[SHARED] (CATEGORY_USED, _nl_C): New macros.
(setdata, setlocale): Use that macro instead of examining _nl_current.
(setdata): Set the slot in _nl_global_locale.
Conditionalize setting of _nl_current on [! SHARED].
* locale/findlocale.c [SHARED] (_nl_C): Define as a macro instead of
declaration as an extern.
* locale/newlocale.c (__newlocale): Use _nl_C_locobj instead of _nl_C.
* include/locale.h: Use libc_hidden_proto for setlocale.
* locale/setlocale.c: Add libc_hidden_def.
* locale/setlocale.c (free_mem): Use _NL_CURRENT_DATA.
* include/envz.h: Use libc_hidden_proto for envz_entry, enz_remove.
* include/argz.h: Use libc_hidden_proto for argz_delete.
* string/argz-delete.c: Add libc_hidden_def.
* string/envz.c: Likewise. Use <envz.h>, not "envz.h".
* include/libc-symbols.h: Fix [__ASSEMBLY__] -> [__ASSEMBLER__].
[__ASSEMBLER__] (hidden_weak): Define using hidden_def, or to empty.
[__ASSEMBLER__] (HIDDEN_JUMPTARGET): New macro.
* sysdeps/unix/sysv/linux/i386/makecontext.S: Use it for exit.
[USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
which does the right thing when __thread support is available.
* descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
`p_h_errno', `p_resp', and `p_res' members.
* pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
Don't initialize `p_errnop' and `p_h_errnop' members.
(__pthread_reset_main_thread): Likewise.
(__pthread_initialize_manager): Likewise.
* manager.c (__pthread_manager, pthread_handle_create): Likewise.
* pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
Don't initialize `p_resp' member.
(__pthread_reset_main_thread): Likewise.
* manager.c (pthread_handle_create): Likewise.
* specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
* errno.c [USE_TLS && HAVE___THREAD]
(__h_errno_location, __res_state): Don't define these at all.
* sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
(INSTALL_NEW_DTV, GET_DTV): Likewise.
* sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
* weaks.c: Don't include <errno.h> here.
2002-08-01 Roland McGrath <roland@redhat.com>
* sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
TLS_INIT_TP.
(TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
(TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
(TLS_INIT_TP): Use that.
file on [!RTLD_STAT64].
* sysdeps/mach/hurd/fxstat64.c: Likewise.
* sysdeps/mach/hurd/tmpfile.c (tmpfile64): Define as alias of tmpfile.
(__fdopen): Use INTUSE.
* sysdeps/mach/hurd/tmpfile64.c: New file, empty placeholder.
* stdio-common/tmpfile64.c: File removed.
* sysdeps/generic/tmpfile64.c: New file.
* sysdeps/generic/tmpfile.c (GEN_THIS): New macro, define to __GT_FILE
if not already defined.
(tmpfile): Use it in place of __GT_FILE.
* include/unistd.h: Declare __chown_internal.
* sysdeps/mach/hurd/sendfile64.c (sendfile64): Do real work here.
* sysdeps/mach/hurd/sendfile.c (sendfile): Call that.
2002-06-09 Roland McGrath <roland@frob.com>
Update to new Hurd RPC interfaces supporting 64-bit file sizes.
* sysdeps/mach/hurd/configure.in: Check for <hurd/version.h> with
value of HURD_INTERFACE_VERSION >= 20020609.
* sysdeps/mach/hurd/configure: Regenerated.
* shlib-versions (.*-.*-gnu-gnu.*): Set libhurduser=0.3.
* sysdeps/mach/hurd/xstatconv.c (xstat64_conv): Rewritten to
convert a struct stat64 into a struct stat and return 0 or -1
with errno set to EOVERFLOW.
* sysdeps/mach/hurd/statfsconv.c (statfs64_conv): Likewise
for struct statfs64 to struct statfs.
* sysdeps/mach/hurd/xstat.c (__xstat): Use converter and call ...
* sysdeps/mach/hurd/xstat64.c (__xstat64): ... this, real work here.
* sysdeps/mach/hurd/fxstat.c (__fxstat): Likewise.
* sysdeps/mach/hurd/fxstat64.c (__fxstat64): Likewise.
* sysdeps/mach/hurd/lxstat.c (__lxstat): Likewise.
* sysdeps/mach/hurd/lxstat64.c (__lxstat64): Likewise.
* sysdeps/mach/hurd/statfs.c (__statfs): Likewise.
* sysdeps/mach/hurd/statfs64.c (__statfs64): Likewise.
* sysdeps/mach/hurd/fstatfs.c (__fstatfs): Likewise.
* sysdeps/mach/hurd/fstatfs64.c (__fstatfs64): Likewise.
* sysdeps/mach/hurd/pwrite64.c (__libc_pwrite64): Do real work here.
* sysdeps/mach/hurd/pwrite.c (__libc_pwrite): Call that.
* sysdeps/mach/hurd/pread64.c (__libc_pread64): Do real work here.
* sysdeps/mach/hurd/pread.c (__libc_pread): Call that.
* sysdeps/mach/hurd/lseek64.c (__libc_lseek64): Do real work here.
* sysdeps/mach/hurd/lseek.c (__libc_lseek): Call that.
* sysdeps/mach/hurd/readdir64.c (__readdir64): Do real work here.
* sysdeps/mach/hurd/readdir.c (__readdir): Call that.
* sysdeps/mach/hurd/readdir64_r.c (__readdir64_r): Do real work here.
* sysdeps/mach/hurd/readdir_r.c (__readdir64_r): Call that.
* hurd/lookup-retry.c (__hurd_file_name_lookup_retry):
Use struct stat64 for io_stat argument.
* sysdeps/mach/hurd/readlink.c (__readlink): Likewise.
* hurd/fopenport.c (seekio): Remove EOVERFLOW check, pass POS directly
to io_seek.
* hurd/fd-read.c (_hurd_fd_read): Use loff_t for OFFSET argument.
* hurd/fd-write.c (_hurd_fd_write): Likewise.
* hurd/hurd/fd.h: Update decls.
* sysdeps/mach/hurd/getcwd.c
(_hurd_canonicalize_directory_name_internal): Use ino64_t
and struct dirent64.
* sysdeps/mach/hurd/dl-sysdep.c (open_file): Use struct stat64.
(__xstat): Renamed to __xstat64, use struct stat64 for argument.
(__fxstat): Renamed to __fxstat64, use struct stat64 for argument.
(__lseek): Renamed to __libc_lseek64, use off64_t for argument.
2002-06-08 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/dirstream.h (struct __dirstream): Use size_t
instead of unsigned long int for __allocation and __size members.
2002-05-19 Ulrich Drepper <drepper@redhat.com>
2002-05-14 Ulrich Drepper <drepper@redhat.com>
* include/stdio.h: Remove references to old stdio implementation.
* libio/Makefile (bug-ungetwc2-ENV): Define.
* hurd/hurdchdir.c (_hurd_change_directory_port_from_name):
Allocate three, not two, more than LEN when appending '/.'.
* sysdeps/mach/hurd/chroot.c (chroot): Likewise. Don't check
if NAME ends with '/.' if it is shorter than 2 chars.
2002-04-24 Ulrich Drepper <drepper@redhat.com>
* elf/dl-load.c (open_verify): Correct __lseek parameters.
Patch by Simon Hildrew <simon@hildrew.net> [PR libc/3354].
2002-04-23 H.J. Lu <hjl@gnu.org>
* include/math.h (isfinite): Fix a typo.
2002-04-24 Ulrich Drepper <drepper@redhat.com>
* libio/bug-ungetwc2.c (test_locale): Use the de_DE.UTF-8 locale
which is created by the test suite.
2002-04-20 Bruno Haible <bruno@clisp.org>
* iconvdata/iso-2002-kr.c (MAX_NEEDED_FROM): Set to 4.
(BODY for FROM_LOOP): Fix comparisons between inptr and inend.
2002-04-20 Bruno Haible <bruno@clisp.org>
* iconvdata/johab.c (BODY for FROM_LOOP): Change type of i, m, f,
to avoid gcc warning.
2002-04-20 Bruno Haible <bruno@clisp.org>
* iconvdata/iso-2022-jp.c (EMIT_SHIFT_TO_INIT): Fix modification mask
of data->__statep->__count.
2002-04-20 Bruno Haible <bruno@clisp.org>
* iconvdata/euc-jisx0213.c (BODY for TO_LOOP): Really ignore Unicode
tag characters.
* iconvdata/shift_jisx0213.c (BODY for TO_LOOP): Likewise.
* sysdeps/unix/sysv/linux/x86_64/ldconfig.h: New file.
* sysdeps/unix/sysv/linux/x86_64/dl-cache.h: New file.
2002-04-11 Zack Weinberg <zack@codesourcery.com>
* include/rpc/rpc.h (struct rpc_thread_variables): Remove
authnone_private_s.
* sunrpc/auth_none.c: Include bits/libc-lock.h.
Delete #ifdef _RPC_THREAD_SAFE_ block.
(authnone_private): Make a struct, not a pointer to struct.
(authnone_private_guard): New once-control variable.
(authnone_create_once): New function, split out of
authnone_create. No need to allocate memory.
(authnone_create): Just call authnone_create_once via
__libc_once, then return &authnone_private->no_client.
(authnone_marshal): Access private data via CLIENT argument,
not authnone_private pointer.
Fix typo (MAX_MARSHEL_SIZE -> MAX_MARSHAL_SIZE).
* sunrpc/rpc_thread.c (__rpc_thread_destroy): No need to free
authnone_private_s.
2002-04-18 Ulrich Drepper <drepper@redhat.com>
* locale/programs/locfile.c (to_archive): New variable. To collect
data which has to be added to the locale archive.
(write_all_categories): Take new third parameter with locale name.
Unless no_archive flag set add new locale data to the archive
(write_locale_data): Unless no-archive flag set store generated data
in to_archive data structure instead of generation output file.
Add new parameter with locale category index.
* locale/programs/locfile.h: Add new parameters in declaractions of
write_all_categories and write_locale_data.
* locale/programs/localedef.c: Recognize --no-archive, --list-archive,
--add-to-archive, and --delete-from-archive options. Pass extra
parameter to write_all_categories.
* locale/programs/localedef.h: Add prototypes for functions in
locarchive.c.
* locale/locarchive.h: New file.
* locale/programs/locarchive.c: New file.
* locale/Makefile (distribute): Add programs/locarchive.c and
locarchive.h.
(localedef-modules): Add md5 and locarchive.
Add vpath to crypt subdir for md5.c.
* locale/programs/ld-address.c: Pass locale category ID as new second
parameter to write_locale_data.
* locale/programs/ld-collate.c: Likewise.
* locale/programs/ld-ctype.c: Likewise.
* locale/programs/ld-identification.c: Likewise.
* locale/programs/ld-measurement.c: Likewise.
* locale/programs/ld-messages.c: Likewise.
* locale/programs/ld-monetary.c: Likewise.
* locale/programs/ld-name.c: Likewise.
* locale/programs/ld-numeric.c: Likewise.
* locale/programs/ld-paper.c: Likewise.
* locale/programs/ld-telephone.c: Likewise.
* locale/programs/ld-time.c: Likewise.
* locale/simple-hash.c: Move compute_hashval function from here...
* locale/hashval.h: ...to here. New file.
* locale/simple-hash.h: Add prototype for compute_hashval.
* include/libintl.h: Minor cleanups.
* elf/reldep7.c: New file.
* elf/reldep7mod1.c: New file.
* elf/reldep7mod2.c: New file.
* elf/Makefile: Add rules to build and run reldep7.
* include/sys/socket.h: Declare __libc_sa_len_internal and define
SA_LEN macro to use it if not NOT_IN_libc.
* sysdeps/unix/sysv/linux/sa_len.c: Use INTDEF for __libc_sa_len.
* include/fcntl.h: Declare __open_internal and define __open and
__libc_open macros if not NOT_IN_libc.
* sysdeps/generic/open.c: Use INTDEF for __open.
* sysdeps/mach/hurd/open.c: Likewise.
* sysdeps/unix/sysv/aix/open.c: Likewise.
* sysdeps/unix/syscalls.list: Add __open_internal alias.
* sysdeps/generic/check_fds.c: Make sure newly opened file descriptor
has correct number.
* include/fcntl.h: Define __libc_fcntl macro if not NOT_IN_libc.
* sysdeps/mach/hurd/fcntl.c: Undefine __libc_fcntl as well.
* sysdeps/unix/sysv/aix/fcntl.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.
* include/wctype.h: Declare __iswalpha_l_internal,
__iswdigit_l_internal, __iswspace_l_internal,
__iswxdigit_l_internal, and __iswctype_internal. Define
__iswalpha_l, __iswctype, __iswdigit_l, __iswspace_l, and
__iswxdigit_l macros if not NOT_IN_libc.
* wctype/iswctype.c: Use INTDEF for __iswctype.
* wctype/wcfuncs_l.c: Use INTDEF for all __iswXXX_l.
Declare __getpgid_internaland define __getpgid macro if not NOT_IN_libc.
Declare __getpagesize_internaland define __getpagesize macro if not
NOT_IN_libc.
* sysdeps/mach/hurd/chown.c: Use INTDEF for __chown.
* sysdeps/unix/sysv/aix/chown.c: Likewise.
* sysdeps/unix/grantpt.c: Use INTUSE for __chown calls.
* sysdeps/unix/sysv/linux/m68k/chown.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/chown.c: Likewise.
* sysdeps/unix/sysv/linux/i386/chown.c: Use INTDEF2 to define
__chown_internal.
* sysdeps/unix/sysv/linux/s390/s390-32//chown.c: Likewise.
* intl/dcngettext.c [_LIBC]: Use INTUSE for __dcngettext.
* intl/dngettext.c [_LIBC] (DCNGETTEXT): Use INTUSE.
* intl/ngettext.c: Likewise.
* include/sys/socket.h: Declare __connect_internal and define
__connect macro if not NOT_IN_libc.
* sysdeps/mach/hurd/connect.c: Use INTDEF for __connect.
* sysdeps/unix/sysv/aix/connect.c: Likewise.
* sysdeps/unix/sysv/linux/connect.S: Add __connect_internal alias.
* include/unistd.h: Declare __close_internal and define __close macro
if not NOT_IN_libc.
* libio/libioP.h (JUMO0, JUMP1, JUMP2, JUMP3, WJUMP0, WJUMP1, WJUMP2,
WJUMP3): Add extra parenthesis to avoid expanding element names with
macors like __close.
* sysdeps/unix/syscalls.list: Add __close_internal alias.
* include/unistd.h: Declare __dup2_internal and define __dup2 macro
if not NOT_IN_libc.
* sysdeps/mach/hurd/dup2.c: Use INTDEF for __dup2.
* sysdeps/posix/dup2.c: Use INTDEF for __dup2.
* sysdeps/unix/syscalls.list: Add __dup2_internal alias.
* include/unistd.h: Declare __fork_internal and define __fork macro
if not NOT_IN_libc.
* sysdeps/mach/hurd/fork.c: Use INTDEF for __fork.
* sysdeps/unix/sysv/aix/fork.c: Likewise.
* sysdeps/unix/sysv/linux/syscalls.list: Add __fork_internal alias.
* include/stdio_ext.h: Declare __fsetlocking_internal and define
__fsetlocking macro to use it if not NOT_IN_libc.
* libio/__fsetlocking.c: Use INTDEF for __fsetlocking.
* libio/__fbufsize.c: Correct copyright.
* libio/__flbf.c: Likewise.
* libio/__fpending.c: Likewise.
* libio/__fpurge.c: Likewise.
* libio/__freadable.c: Likewise.
* libio/__freading.c: Likewise.
* libio/__fsetlocking.c: Likewise.
* libio/__fwritable.c: Likewise.
* libio/__fwriting.c: Likewise.
* include/stdio.h: Declare __asprintf_internal and define __asprintf
macro to use it if not NOT_IN_libc.
* stdio-common/asprintf.c: Use INTDEF for __asprintf.
* include/mntent.h: Declare __setmntent_internal,
__getmntent_r_internal, __endmntent_internal. Define __setmntent,
__getmntent_r, and __endmntent macros to use these functions if not
NOT_IN_libc.
* misc/mntent_r.c: Use INTDEF for __setmntent, __getmntent_r, and
__endmntent.
* include/math.h: Declare __finite_internal, __finitef_internal, and
__finitel_internal. Redefine isfinite macro if in libc or libm using
these functions.
* sysdeps/generic/s_ldexp.c: Use INTUSE for __finite calls.
* sysdeps/generic/s_ldexpf.c: Use INTUSE for __finitef calls.
* sysdeps/generic/s_ldexpl.c: Use INTUSE for __finitel calls.
* sysdeps/i386/fpu/s_finite.S: Define _internal alias.
* sysdeps/i386/fpu/s_finitef.S: Likewise.
* sysdeps/i386/fpu/s_finitel.S: Likewise.
* sysdeps/ieee754/dbl-64/s_finite.c: Likewise.
* sysdeps/ieee754/flt-32/s_finitef.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_finitel.c: Likewise.
* sysdeps/ieee754/ldbl-96/s_finitel.c: Likewise.
* include/fcntl.h: Declare __fcntl_internal. Define __fcntl macro
to use this function if not NOT_IN_libc.
* libio/iofdopen.c (_IO_fcntl): Use INTUSE.
* sysdeps/generic/fcntl.c: Use INTDEF for __fcntl.
* sysdeps/mach/hurd/fcntl.c: Likewise.
* sysdeps/unix/sysv/aix/fcntl.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.
* include/argz.h: Declare __argz_count_internal and
__argz_stringify_internal.
* intl/l10nflist.c [_LIBC]: Use INTUSE for __argz_count and
__argz_stringify.
* string/argz-count.c: Use INTDEF for __argz_count.
* string/argz-stringify.c: Use INTDEF for __argz_stringify.
* include/stdlib.h: Declare __cxa_atexit_internal and define
__cxa_atexit macro if not NOT_IN_libc.
* stdlib/cxa_atexit.c: Use INTDEF for __cxa_atexit.
* dlfcn/Makefile: Define NOT_IN_libc when compiling modcxaatexit.c.
* assert/assert.c: Use INTDEF for __assert_fail.
* assert/__assert.c: Use INTUSE for call to __assert_fail.
* include/assert.h: Declare __assert_fail_internal.
2002-04-08 Ulrich Drepper <drepper@redhat.com>
* cppflags-iterator.mk (cpp-srcs-left): Define NOT_IN_libc instead
of NOT_IN_LIBC.
* include/libintl.h: Test for NOT_IN_libc not NOT_IN_LIBC.
* include/stdlib.h: Likewise.
2002-04-08 Jakub Jelinek <jakub@redhat.com>
* elf/Makefile (CFLAGS-.os): Define NOT_IN_libc and IS_IN_rtld
instead of _RTLD_LOCAL.
* elf/dl-dst.h: Use IS_IN_rtld instead of _RTLD_LOCAL.
* include/unistd.h: Likewise.
* sysdeps/generic/ldsodefs.h: Likewise.
* stdio-common/_itoa.h (_itoa_word): Only use internal digit arrays
if in libc or ld.so.
* include/stdlib.h: For libc itself replace MB_CUR_MAX definition
with one accessing the locale data structures directly.
* stdio-common/printf-prs.c: Include localeinfo.h for new
MB_CUR_MAX definition.
2002-04-08 Ulrich Drepper <drepper@redhat.com>
* Makeconfig (CPPFLAGS): Also add CPPFLAGS-<basename> where <basename>
is the name of the source file without extension.
* Makefile (distribute): Add cppflags-iterator.mk.
* cppflags-iterator.mk: New file.
* extra-lib.mk: For the sources of the library run
cppflags-iterator.mk.
* include/libintl.h: Declare __dcgettext_internal and
_libc_intl_domainname_internal. Define __dcgettext using these
two symbols if used in libc itself.
* argp/argp-help.c: Define dgettext using __dcgettext_internal and
_libc_intl_domainname_internal.
* argp/argp-parse.c: Likewise.
* intl/dcgettext.c (__dcgettext): Use INTDEF to define alias.
* intl/dgettext.c: Call __dcgettext_internal instead of __dcgettext.
* intl/gettext.c: Likewise.
* locale/SYS_libc.c (_libc_intl_domainname): Use INTDEF to define
alias.
* posix/regcomp.c (gettext): Use __dcgettext_internal instead of
__dcgettext.
* posix/regex_internal.c (gettext): Likewise.
2002-03-17 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/fpu/fraiseexcpt.c (__feraiseexcept): Set cause bits.
* sysdeps/mips/fpu/fgetexcptflg.c (__fegetexceptflag): Add comment.
* sysdeps/mips/fpu/fclrexcpt.c (__feclearexcept): Clear also cause
bits.
* sysdeps/mips/fpu/fenv_libc.h (CAUSE_MASK): New.
(CAUSE_SHIFT): New.
Patch by Hartvig Ekner <hartvige@mips.com>.
* sysdeps/generic/unwind-dw2-fde-glibc.c: Add prototypes.
* sysdeps/generic/unwind-pe.h: Likewise.
* libio/iofdopen.c (_IO_new_fdopen): Pass parameter of correct
type to _IO_setb.
* libio/stdio.c (AL2): Define variant when visibility attribute is
not supported.
* include/libc-symbols.h (_INTVARDEF): Define variant when
visibility attribute is not supported.
2002-03-11 Ulrich Drepper <drepper@redhat.com>
* gmon/Makefile (elide-routines.os): Add bb_init_func and bb_exit_func.
They were never exported anyway.
* gmon/gmon.c (_gmonparam): Add attribute_hidden.
* gmon/sys/gmon.h: Remove declaration of _gmonparam. It wasn't
exported.
* include/sys/gmon.h: Declare _gmonparam.
* sysdeps/unix/sysv/linux/i386/getdents64.c: Don't define compatibility
symbols for getdents64. They were never exported.
2002-03-03 Andreas Jaeger <aj@suse.de>
* elf/nodlopenmod2.c: Provide prototype to avoid warning.
* elf/tst-tlsmod1.c: Likewise.
* posix/regcomp.c: Get regex.h from include dir for internal
prototypes.
* sysdeps/unix/sysv/linux/init-first.c: Move __init_misc prototype
to libc-internal.h and include it.
* include/libc-internal.h: Add __init_misc.
* misc/init-misc.c: Include libc-internal.h for prototypes.
* sysdeps/wordsize-32/divdi3.c: Add prototypes to avoid warnings.
* misc/error.c [_LIBC]: Include libioP.h for prototype of
_IO_putc_internal.
2002-02-12 Ulrich Drepper <drepper@redhat.com>
* sysdeps/generic/dl-tls.c (TLS_DTV_UNALLOCATED): Renamed from
TLS_DTV_UNALLOCATE.
(oom): New function.
(_dl_next_tls_modid): Rewrite to handle dl_tls_dtv_slotinfo_list.
(_dl_determine_tlsoffset): Likewise.
(_dl_allocate_tls): Likewise.
(__TLS_GET_ADDR): Define if not already defined.
(_dl_tls_symaddr): New function.
(allocate_and_init): New function.
(__tls_get_addr): Actually implement handling of generation counter
and deferred allocation.
* sysdeps/generic/ldsodefs.h (_rtld_global): Remove _dl_initimage_list,
add _dl_tls_dtv_slotinfo_list, _dl_tls_static_nelem, and
_dl_tls_generation.
Define TLS_SLOTINFO_SURPLUS and DTV_SURPLUS.
Declare _dl_tls_symaddr.
* sysdeps/i386/dl-tls.h: Disable __tls_get_addr handling unless
SHARED.
* include/link.h (struct link_map): Remove l_tls_nextimage and
l_tls_previmage.
* elf/dl-sym.c (_dl_sym): After successful lookup call _dl_tls_symaddr
instead of DL_SYMBOL_ADDRESS for STT_TLS symbols.
(_dl_vsym): Likewise.
* elf/rtld.c (_dl_start_final): Adjust initdtv initialization for new
layout.
(dl_main): Allow PT_TLS be present for empty segment. Remove
nextimage list handling. Instead add all modules using TLS to
dl_tls_dtv_slotinfo_list.
* elf/dl-open.c (dl_open_worker): After successfully loading all
objects add those with TLS to the dl_tls_dtv_slotinfo_list list.
* elf/dl-load.c (_dl_map_object_from_fd): If PT_TLS entry is for an
empty segment don't do anything. Remove handling of initimage list.
* elf/Versions [ld] (GLIBC_2.0): Add __libc_memalign.
(GLIBC_PRIVATE): Add _dl_tls_symaddr.
* elf/dl-minimal.c: Define __libc_memalign.
* elf/dl-support.c: Remove _dl_initimage_list. Add
_dl_tls_dtv_slotinfo_list, _dl_tls_static_nelem, and
_dl_tls_generation.
* include/stdlib.h: Declare __libc_memalign.
* elf/Makefile: Add rules to build and run tst-tls4 and tst-tls5.
* elf/tst-tls4.c: New file.
* elf/tst-tls5.c: New file.
* elf/tst-tlsmod2.c: New file.
* elf/tls-macros.h: asms using ___tls_get_addr destroy %ecx and %edx.
* elf/tst-tlsmod1.c: Don't define variables unles USE_TLS.
* elf/tst-tls1.c: Use test-skeleton.c.
* elf/tst-tls2.c: Likewise.
* elf/tst-tls3.c: Likewise.
* elf/dl-conflict.c (RESOLVE_MAP): Return NULL not 0.
* sysdeps/mips/machine-gmon.h: Update MCOUNT for current GCC behavior.
2002-02-06 Ulrich Drepper <drepper@redhat.com>
* Versions.def [ld]: Add GLIBC_2.3.
* elf/Versions [ld]: Add __tls_get_addr to GLIBC_2.3.
* elf/Makefile (dl-routines): Add dl-tls.
(distribute): Add dl-tls.h.
* sysdeps/generic/ldsodefs.h (struct rtld_global): Remove
_dl_tls_module_cnt, add _dl_tls_max_dtv_idx and _dl_tls_dtv_gaps.
Add prototypes for _dl_next_tls_modid and _dl_determine_tlsoffset.
* elf/dl-load.c (_dl_map_object_from_fd): Store alignment requirement
along with the other info in the link map. Change queueing of init
images for double linked list. Use _dl_next_tls_modid to compute
l_tls_modid.
* elf/rtld.c (_dl_start_final): Store alignment requirement
along with the other info in rtld map and executable map.
(dl_main): Add ld.so to the init image list if necessary. Compute
final module ID with _dl_next_tls_modid.
* include/link.h (struct link_map): Add l_tls_previmage and
l_tls_align.
* eld/dl-support.c: Define _dl_tls_max_dtv_idx and _dl_tls_dtv_gaps.
* sysdeps/i386/elf/Versions: New file.
* sysdeps/generic/dl-tls.c: New file.
* sysdeps/generic/dl-tls.h: New file.
* sysdeps/i386/dl-tls.h: New file.
attribute((packed)) to counter stupid people misusing gcc options.