Commit Graph

77 Commits

Author SHA1 Message Date
Nobody 790298dd8d glibc with MCST patches (25.014.1) 2022-08-11 21:25:08 +03:00
Joseph Myers 04277e02d7 Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2019-01-01 00:11:28 +00:00
Joseph Myers 688903eb3e Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2018-01-01 00:32:25 +00:00
H.J. Lu 37b66c0b1a ld.so: Consolidate 2 strtouls into _dl_strtoul [BZ #21528]
There are 2 minimal strtoul implementations in ld.so:

1. __strtoul_internal in elf/dl-minimal.c.
2. tunables_strtoul in elf/dl-tunables.c.

This patch adds _dl_strtoul to replace them.  Tested builds with and
without --enable-tunables.

	[BZ #21528]
	* elf/dl-minimal.c (__strtoul_internal): Removed.
	(strtoul): Likewise.
	* elf/dl-misc.c (_dl_strtoul): New function.
	* elf/dl-tunables.c (tunables_strtoul): Removed.
	(tunable_initialize): Replace tunables_strtoul with _dl_strtoul.
	* elf/rtld.c (process_envvars): Likewise.
	* sysdeps/unix/sysv/linux/dl-librecon.h (_dl_osversion_init):
	Likewise.
	* sysdeps/generic/ldsodefs.h (_dl_strtoul): New prototype.
2017-06-08 12:52:42 -07:00
Joseph Myers bfff8b1bec Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Florian Weimer b04beebf07 ld.so: Remove __libc_memalign
It is no longer needed since commit 6c444ad6e9
(elf: Do not use memalign for TCB/TLS blocks allocation [BZ #17730]).
Applications do not link against ld.so and will use the definition in
libc.so, so there is no ABI impact.
2016-11-30 16:23:58 +01:00
Florian Weimer 5bc17330eb elf: dl-minimal malloc needs to respect fundamental alignment
The dynamic linker currently uses __libc_memalign for TLS-related
allocations.  The goal is to switch to malloc instead.  If the minimal
malloc follows the ABI fundamental alignment, we can assume that malloc
provides this alignment, and thus skip explicit alignment in a few
cases as an optimization.

It was requested on libc-alpha that MALLOC_ALIGNMENT should be used,
although this results in wasted space if MALLOC_ALIGNMENT is larger
than the fundamental alignment.  (The dynamic linker cannot assume
that the non-minimal malloc will provide an alignment of
MALLOC_ALIGNMENT; the ABI provides _Alignof (max_align_t) only.)
2016-08-03 16:11:01 +02:00
H.J. Lu 2bc983b78c Reduce number of mmap calls from __libc_memalign in ld.so
__libc_memalign in ld.so allocates one page at a time and tries to
optimize consecutive __libc_memalign calls by hoping that the next
mmap is after the current memory allocation.

However, the kernel hands out mmap addresses in top-down order, so
this optimization in practice never happens, with the result that we
have more mmap calls and waste a bunch of space for each __libc_memalign.

This change makes __libc_memalign to mmap one page extra.  Worst case,
the kernel never puts a backing page behind it, but best case it allows
__libc_memalign to operate much much better.  For elf/tst-align --direct,
it reduces number of mmap calls from 12 to 9.

	* elf/dl-minimal.c (__libc_memalign): Mmap one extra page.
2016-04-23 06:05:15 -07:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Joseph Myers 9dd346ff43 Convert 113 more function definitions to prototype style (files with assertions).
This mostly automatically-generated patch converts 113 function
definitions in glibc from old-style K&R to prototype-style.  Following
my other recent such patches, this one deals with the case of function
definitions in files that either contain assertions or where grep
suggested they might contain assertions - and thus where it isn't
possible to use a simple object code comparison as a sanity check on
the correctness of the patch, because line numbers are changed.

A few such automatically-generated changes needed to be supplemented
by manual changes for the result to compile.  openat64 had a prototype
declaration with "..." but an old-style definition in
sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the
generated prototype in the definition (I've filed
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68024> for diagnosing
such cases in GCC; the old state was undefined behavior not requiring
a diagnostic, but one seems a good idea).  In addition, as Florian has
noted regparm attribute mismatches between declaration and definition
are only diagnosed for prototype definitions, and five functions
needed internal_function added to their definitions (in the case of
__pthread_mutex_cond_lock, via the macro definition of
__pthread_mutex_lock) to compile on i386.

After this patch is in, remaining old-style definitions are probably
most readily fixed manually before we can turn on
-Wold-style-definition for all builds.

Tested for x86_64 and x86 (testsuite).

	* crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style
	function definition.
	* crypt/sha256-crypt.c (__sha256_crypt_r): Likewise.
	* crypt/sha512-crypt.c (__sha512_crypt_r): Likewise.
	* debug/backtracesyms.c (__backtrace_symbols): Likewise.
	* elf/dl-minimal.c (_itoa): Likewise.
	* hurd/hurdmalloc.c (malloc): Likewise.
	(free): Likewise.
	(realloc): Likewise.
	* inet/inet6_option.c (inet6_option_space): Likewise.
	(inet6_option_init): Likewise.
	(inet6_option_append): Likewise.
	(inet6_option_alloc): Likewise.
	(inet6_option_next): Likewise.
	(inet6_option_find): Likewise.
	* io/ftw.c (FTW_NAME): Likewise.
	(NFTW_NAME): Likewise.
	(NFTW_NEW_NAME): Likewise.
	(NFTW_OLD_NAME): Likewise.
	* libio/iofwide.c (_IO_fwide): Likewise.
	* libio/strops.c (_IO_str_init_static_internal): Likewise.
	(_IO_str_init_static): Likewise.
	(_IO_str_init_readonly): Likewise.
	(_IO_str_overflow): Likewise.
	(_IO_str_underflow): Likewise.
	(_IO_str_count): Likewise.
	(_IO_str_seekoff): Likewise.
	(_IO_str_pbackfail): Likewise.
	(_IO_str_finish): Likewise.
	* libio/wstrops.c (_IO_wstr_init_static): Likewise.
	(_IO_wstr_overflow): Likewise.
	(_IO_wstr_underflow): Likewise.
	(_IO_wstr_count): Likewise.
	(_IO_wstr_seekoff): Likewise.
	(_IO_wstr_pbackfail): Likewise.
	(_IO_wstr_finish): Likewise.
	* locale/programs/localedef.c (normalize_codeset): Likewise.
	* locale/programs/locarchive.c (add_locale_to_archive): Likewise.
	(add_locales_to_archive): Likewise.
	(delete_locales_from_archive): Likewise.
	* malloc/malloc.c (__libc_mallinfo): Likewise.
	* math/gen-auto-libm-tests.c (init_fp_formats): Likewise.
	* misc/tsearch.c (__tfind): Likewise.
	* nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise.
	* nptl/pthread_attr_getdetachstate.c
	(__pthread_attr_getdetachstate): Likewise.
	* nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize):
	Likewise.
	* nptl/pthread_attr_getinheritsched.c
	(__pthread_attr_getinheritsched): Likewise.
	* nptl/pthread_attr_getschedparam.c
	(__pthread_attr_getschedparam): Likewise.
	* nptl/pthread_attr_getschedpolicy.c
	(__pthread_attr_getschedpolicy): Likewise.
	* nptl/pthread_attr_getscope.c (__pthread_attr_getscope):
	Likewise.
	* nptl/pthread_attr_getstack.c (__pthread_attr_getstack):
	Likewise.
	* nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr):
	Likewise.
	* nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
	Likewise.
	* nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise.
	(__pthread_attr_init_2_0): Likewise.
	* nptl/pthread_attr_setdetachstate.c
	(__pthread_attr_setdetachstate): Likewise.
	* nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize):
	Likewise.
	* nptl/pthread_attr_setinheritsched.c
	(__pthread_attr_setinheritsched): Likewise.
	* nptl/pthread_attr_setschedparam.c
	(__pthread_attr_setschedparam): Likewise.
	* nptl/pthread_attr_setschedpolicy.c
	(__pthread_attr_setschedpolicy): Likewise.
	* nptl/pthread_attr_setscope.c (__pthread_attr_setscope):
	Likewise.
	* nptl/pthread_attr_setstack.c (__pthread_attr_setstack):
	Likewise.
	* nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr):
	Likewise.
	* nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
	Likewise.
	* nptl/pthread_condattr_setclock.c (pthread_condattr_setclock):
	Likewise.
	* nptl/pthread_create.c (__find_in_stack_list): Likewise.
	* nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise.
	* nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to
	use internal_function.
	* nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to
	prototype-style function definition.
	* nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise.
	(__pthread_mutex_cond_lock_adjust): Likewise.  Use
	internal_function.
	* nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock):
	Convert to prototype-style function definition.
	* nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock):
	Likewise.
	* nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
	Likewise.
	(__pthread_mutex_unlock): Likewise.
	* nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise.
	* nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise.
	* nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise.
	* nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise.
	* nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise.
	* nss/makedb.c (process_input): Likewise.
	* posix/fnmatch.c (__strchrnul): Likewise.
	(__wcschrnul): Likewise.
	(fnmatch): Likewise.
	* posix/fnmatch_loop.c (FCT): Likewise.
	* posix/glob.c (globfree): Likewise.
	(__glob_pattern_type): Likewise.
	(__glob_pattern_p): Likewise.
	* posix/regcomp.c (re_compile_pattern): Likewise.
	(re_set_syntax): Likewise.
	(re_compile_fastmap): Likewise.
	(regcomp): Likewise.
	(regerror): Likewise.
	(regfree): Likewise.
	* posix/regexec.c (regexec): Likewise.
	(re_match): Likewise.
	(re_search): Likewise.
	(re_match_2): Likewise.
	(re_search_2): Likewise.
	(re_search_stub): Likewise.  Use internal_function
	(re_copy_regs): Likewise.
	(re_set_registers): Convert to prototype-style function
	definition.
	(prune_impossible_nodes): Likewise.  Use internal_function.
	* resolv/inet_net_pton.c (inet_net_pton): Convert to
	prototype-style function definition.
	(inet_net_pton_ipv4): Likewise.
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise.
	* sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise.
	* sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise.
	* sysdeps/pthread/timer_delete.c (timer_delete): Likewise.
	* sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise.
	Make variadic.
	* time/strptime_l.c (localtime_r): Convert to prototype-style
	function definition.
	* wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise.
	* wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise.
	* wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise.
	* wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise.
2015-10-20 11:54:09 +00:00
Roland McGrath 2193ce8746 Provide __libc_fatal for rtld. 2015-07-09 15:32:32 -07:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Ondřej Bílka a1ffb40e32 Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Andreas Schwab 5be8418cb0 Remove use of INTDEF/INTUSE in stdio-common 2012-06-01 01:25:41 +02:00
Siddhesh Poyarekar ceab42c380 Parse hexadecimal and octal strings correctly
The current implementation of __strtoul_internal seems to only pretend
to support hex and octal strings by detecting a preceding 0x or 0 and
marking base as 8 or 16. When it comes to the actual processing of the
string, it only considers numeric values within, thus breaking hex
values that may have [a-f] in them. Fixed with this commit.
2012-04-25 12:27:03 +05:30
H.J. Lu eb96ffb07d Move stdio-common/_itoa.h to sysdeps/generic 2012-03-20 16:00:23 -07:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper 20739e5454 * elf/dl-load.c: Remove support for systems without MAP_ANON.
* elf/dl-minimal.c: Likewise.
	* elf/dl-misc.c: Likewise.
	* elf/rtld.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
2009-03-31 22:03:24 +00:00
Ulrich Drepper 1311e86e43 * elf/dl-sysdep.c (_dl_important_hwcaps): Add integer overflow check.
* elf/dl-minimal.c (__libc_memalign): Likewise.  Handle malloc (0).
	Return NULL if mmap failed instead of asserting it does not.
	(calloc): Check for integer overflow.

	* elf/dl-minimal.c (__strtoul_internal): Fix parsing of numbers bigger
	than LONG_MAX / 10.
2007-07-04 18:06:39 +00:00
Ulrich Drepper 8aaf53ee7e * elf/dl-minimal.c: Undefine _itoa first. 2007-01-25 17:10:56 +00:00
Ulrich Drepper 11bf311edc [BZ #2510, BZ #2830, BZ #3137, BZ #3313, BZ #3426, BZ #3465, BZ #3480, BZ #3483, BZ #3493, BZ #3514, BZ #3515, BZ #3664, BZ #3673, BZ #3674]
2007-01-11  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/i386/soft-fp/sfp-machine.h: Remove.
	* sysdeps/x86_64/soft-fp/sfp-machine.h: Likewise.
2007-01-10  Ulrich Drepper  <drepper@redhat.com>
	* io/fts.c: Make sure fts_cur is always valid after return from
	fts_read.
	Patch by Miloslav Trmac <mitr@redhat.com>.
2006-10-27  Richard Sandiford  <richard@codesourcery.com>
	* elf/elf.h (R_MIPS_GLOB_DAT): Define.
	(R_MIPS_NUM): Bump by 1.
2007-01-03  Jakub Jelinek  <jakub@redhat.com>
	* posix/execvp.c: Include alloca.h.
	(allocate_scripts_argv): Renamed to...
	(scripts_argv): ... this.  Don't allocate buffer here nor count
	arguments.
	(execvp): Use alloca if possible.
	* posix/Makefile: Add rules to build and run tst-vfork3 test.
	* posix/tst-vfork3.c: New test.
	* stdlib/Makefile (tst-strtod3-ENV): Define.
2007-01-02  Ulrich Drepper  <drepper@redhat.com>
	* posix/getconf.c: Update copyright year.
	* nss/getent.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* catgets/gencat.c: Likewise.
	* csu/version.c: Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/sprof.c (print_version): Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* nscd/nscd.c (print_version): Likewise.
	* debug/xtrace.sh: Likewise.
	* malloc/memusage.sh: Likewise.
	* malloc/mtrace.pl: Likewise.
	* debug/catchsegv.sh: Likewise.
2006-12-24  Ulrich Drepper  <drepper@redhat.com>
	* malloc/malloc.c (sYSMALLOc): Remove some unnecessary alignment
	attempts.
2006-12-23  Ulrich Drepper  <drepper@redhat.com>
	* posix/wordexp.c: Remove some unnecessary tests.
2006-12-20  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>

	* sysdeps/unix/sysv/linux/sh/bits/shm.h: New file.

	* nss/getXXbyYY_r.c: Include atomic.h.
	(INTERNAL (REENTRANT_NAME)): Write startp after start_fct,
	add atomic_write_barrier () in between.

2006-11-28  Jakub Jelinek  <jakub@redhat.com>
	* elf/dl-support.c: Include dl-procinfo.h.
	* sysdeps/powerpc/dl-procinfo.h (PPC_PLATFORM_POWER4,
	PPC_PLATFORM_PPC970, PPC_PLATFORM_POWER5, PPC_PLATFORM_POWER5_PLUS,
	PPC_PLATFORM_POWER6, PPC_PLATFORM_CELL_BE, PPC_PLATFORM_POWER6X):
	Define.
	(_dl_string_platform): Use PPC_PLATFORM_* macros instead of
	hardcoded constants.
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platform): Use
	PPC_PLATFORM_* macros for array designators.
2006-11-11  Steven Munroe  <sjmunroe@us.ibm.com>
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 3 new cap
	names to the beginning.
	(_dl_powerpc_platforms): Add "power6x".
	* sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease.
	(HWCAP_IMPORTANT): Add PPC_FEATURE_HAS_DFP.
	(_DL_PLATFORMS_COUNT): Increase.
	(_dl_string_platform): Handle power6x case.
	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_PA6T, PPC_FEATURE_HAS_DFP,
	PPC_FEATURE_POWER6_EXT): Define.
	(PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS): Correct Comment.
	[-2^31 .. 2^31) range.
	* sysdeps/unix/sysv/linux/bits/statvfs.h: Define ST_RELATIME.
	* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
	Handle relatime mount option.

2006-12-13  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Include
	kernel-features.h.

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

	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand
	separators also if no non-zero digits found.
	* stdlib/Makefile (tests): Add tst-strtod3.
	[BZ #3664]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix test to recognize
	empty parsed strings.
	* stdlib/Makefile (tests): Add tst-strtod2.
	* stdlib/tst-strtod2.c: New file.

	[BZ #3673]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix exp_limit
	computation.
	* stdlib/Makefile (tests): Add tst-atof2.
	* stdlib/tst-atof2.c: New file.

	[BZ #3674]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Adjust exponent value
	correctly if removing trailing zero of hex-float.
	* stdlib/Makefile (tests): Add tst-atof1.
	* stdlib/tst-atof1.c: New file.

	* misc/mntent_r.c (__hasmntopt): Check p[optlen] even when p == rest.
	Start searching for next comma at p rather than rest.
	* misc/Makefile (tests): Add tst-mntent2.
	* misc/tst-mntent2.c: New test.

2006-12-08  Ulrich Drepper  <drepper@redhat.com>
	* malloc/memusage.c: Handle realloc with new size of zero and
	non-NULL pointer correctly.
	(me): Really write first record twice.
	(struct entry): Make format bi-arch safe.
	(dest): Write out more realloc statistics.
	* malloc/memusagestat.c (struct entry): Make format bi-arch safe.
2006-12-05  Jakub Jelinek  <jakub@redhat.com>
	* nis/nis_subr.c (nis_getnames): Revert last change.
2006-12-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
	* sysdeps/unix/sysv/linux/sh/sys/io.h: Removed.
2006-11-30  H.J. Lu  <hongjiu.lu@intel.com>
	* sysdeps/i386/i686/memcmp.S: Use jump table as the base of
	jump table entries.

2006-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/i386/clone.S: Provide CFI for the outermost
	`clone' function to ensure proper unwinding stop of gdb.
	* sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.

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

	* nscd/nscd.init: Remove obsolete and commented-out -S option
	handling.

2006-11-23  Jakub Jelinek  <jakub@redhat.com>

	[BZ #3514]
	* manual/string.texi (strncmp): Fix pastos from wcscmp description.

	[BZ #3515]
	* manual/string.texi (strtok): Remove duplicate paragraph.

2006-12-01  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Fix compatibility with
	libgcc not supporting `rflags' unwinding (register # >= 17).

2006-11-30  Jakub Jelinek  <jakub@redhat.com>

	* sunrpc/svc_run.c (svc_run): Set my_pollfd to new_pollfd if realloc
	succeeded.

2006-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
	    Jakub Jelinek  <jakub@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sigaction.c (restore_rt): Add correct
	unwind information.
	* sysdeps/unix/sysv/linux/x86_64/Makefile: Provide symbols for
	'restore_rt' even in the 'signal' directory.
	* sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: Extend the regs list.
	malloc crashed.  Don't allocate memory unnecessarily in each
	loop.
2006-10-21  Jakub Jelinek  <jakub@redhat.com>
	* resolv/mapv4v6addr.h (map_v4v6_address): Fix last change.
2006-11-20  Ulrich Drepper  <drepper@redhat.com>
	* resolv/mapv4v6addr.h (map_v4v6_address): Optimize a bit.
2006-11-18  Bruno Haible  <bruno@clisp.org>
	* sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): Invoke
	__sysconf only after having tried to call getgroups32.
2006-11-19  Ulrich Drepper  <drepper@redhat.com>
	* nss/nss_files/files-hosts.c (LINE_PARSER): Support IPv6-style
	addresses for IPv4 queries if they can be mapped.
2006-11-16  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/x86_64/fpu/s_copysignf.S (__copysignf): Switch to .text.
	* sysdeps/x86_64/fpu/s_copysign.S (__copysign): Likewise.
	(signmask): Add .size directive.
	(othermask): Add .type directive.
2006-11-14  Ulrich Drepper  <drepper@redhat.com>
	* po/nl.po: Update from translation team.
	* timezone/zdump.c: Redo fix for BZ #3137.
2006-11-14  Jakub Jelinek  <jakub@redhat.com>
	* nss/nss_files/files-alias.c (get_next_alias): Set line back
	to first_unused after parsing :include: file.
	* timezone/africa: Update from tzdata2006o.
	* timezone/antarctica: Likewise.
	* timezone/asia: Likewise.
	* timezone/australasia: Likewise.
	* timezone/backward: Likewise.
	* timezone/europe: Likewise.
	* timezone/iso3166.tab: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/southamerica: Likewise.
	* timezone/zone.tab: Likewise.

	* time/tzfile.c (__tzfile_read): Extend to handle new file format
	on machines with 64-bit time_t.

	* timezone/checktab.awk: Update from tzcode2006o.
	* timezone/ialloc.c: Likewise.
	* timezone/private.h: Likewise.
	* timezone/scheck.c: Likewise.
	* timezone/tzfile.h: Likewise.
	* timezone/tzselect.ksh: Likewise.
	* timezone/zdump.c: Likewise.
	* timezone/zic.c: Likewise.

	[BZ #3483]
	* elf/ldconfig.c (main): Call setlocale and textdomain.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.

	[BZ #3480]
	* manual/argp.texi: Fix typos.
	* manual/charset.texi: Likewise.
	* manual/errno.texi: Likewise.
	* manual/filesys.texi: Likewise.
	* manual/lang.texi: Likewise.
	* manual/maint.texi: Likewise.
	* manual/memory.texi: Likewise.
	* manual/message.texi: Likewise.
	* manual/resource.texi: Likewise.
	* manual/search.texi: Likewise.
	* manual/signal.texi: Likewise.
	* manual/startup.texi: Likewise.
	* manual/stdio.texi: Likewise.
	* manual/sysinfo.texi: Likewise.
	* manual/syslog.texi: Likewise.
	* manual/time.texi: Likewise.
	Patch by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.

	[BZ #3465]
	* sunrpc/clnt_raw.c: Minimal message improvements.
	* sunrpc/pm_getmaps.c: Likewise.
	* nis/nss_nisplus/nisplus-publickey.c: Likewise.
	* nis/nis_print_group_entry.c: Likewise.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/charmap.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* elf/dl-deps.c: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* libio/vswprintf.c: Likewise.
	* malloc/memusagestat.c: Likewise.
	* sunrpc/auth_unix.c: Likewise.
	* sunrpc/rpc_main.c: Likewise.
	* nscd/cache.c: Likewise.
	* locale/programs/repertoire.c: Unify output messages.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* nscd/selinux.c: Likewise.
	* elf/cache.c: Likewise.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.

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

	* string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization
	if N is one bigger than return value.
	* string/tst-strxfrm2.c (do_test): Also test strxfrm with l1 + 1
	and l1 last arguments, if buf is defined, verify the return value
	equals to strlen (buf) and verify no byte beyond passed length
	is modified.

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

	* po/sv.po: Update from translation team.

	* sysdeps/gnu/siglist.c (__old_sys_siglist, __old_sys_sigabbrev):
	Use __new_sys_siglist instead of _sys_siglist_internal as
	second macro argument.
	(_old_sys_siglist): Use declare_symbol_alias macro instead of
	strong_alias.
2006-11-09  Ulrich Drepper  <drepper@redhat.com>

	[BZ #3493]
	* posix/unistd.h (sysconf): Remove const attribute.

	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Fix test for
	temporary or deprecated addresses.
	Patch by Sridhar Samudrala <sri@us.ibm.com>.

	* string/Makefile (tests): Add tst-strxfrm2.
	* string/tst-strxfrm2.c: New file.

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

	* elf/dl-debug.c (_dl_debug_initialize): Check r->r_map for 0
	rather than r->r_brk.
	* string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal
	optimization even if needed > n.

2006-11-07  Jakub Jelinek  <jakub@redhat.com>

	* include/libc-symbols.h (declare_symbol): Rename to...
	(declare_symbol_alias): ... this.  Add ORIGINAL argument, imply
	strong_alias (ORIGINAL, SYMBOL) in asm to make sure it preceedes
	.size directive.
	* sysdeps/gnu/errlist-compat.awk: Adjust for declare_symbol_alias
	changes.
	* sysdeps/gnu/siglist.c: Likewise.

2006-11-03  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/fpu/bits/mathinline.h
	[__LIBC_INTERNAL_MATH_INLINES]: Moved to ...
	* sysdeps/powerpc/fpu/math_private.h: ...here.  New file.

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

	* sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word):
	Update handling of cache descriptor 0x49 for new models.
	* sysdeps/unix/sysv/linux/x86_64/sysconf.c (intel_check_word):
	Likewise.

2006-11-02  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Work around ld --help change and avoid -z relro
	test completely if the architecture doesn't care about security.

2006-11-01  Ulrich Drepper  <drepper@redhat.com>

	* po/sv.po: Update from translation team.

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

	* stdlib/atexit.c (atexit): Don't mark as hidden when used to
	generate compatibility version.

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

	* configure.in: Relax -z relro requirement a bit.

	* po/sv.po: Update from translation team.

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

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

	* configure.in: Require assembler support for visibility, compiler
	support for visibility and aliases, linker support for various -z
	options.
	* Makeconfig: Remove conditional code which now is unnecessary.
	* config.h.in: Likewise.
	* config.make.in: Likewise.
	* dlfcn/Makefile: Likewise.
	* elf/Makefile: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/rtld.c: Likewise.
	* include/libc-symbols.h: Likewise.
	* include/stdio.h: Likewise.
	* io/Makefile: Likewise.
	* io/fstat.c: Likewise.
	* io/fstat64.c: Likewise.
	* io/fstatat.c: Likewise.
	* io/fstatat64.c: Likewise.
	* io/lstat.c: Likewise.
	* io/lstat64.c: Likewise.
	* io/mknod.c: Likewise.
	* io/mknodat.c: Likewise.
	* io/stat.c: Likewise.
	* io/stat64.c: Likewise.
	* libio/stdio.c: Likewise.
	* nscd/Makefile: Likewise.
	* stdlib/Makefile: Likewise.
	* stdlib/atexit.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/i386/sysdep.h: Likewise.
	* sysdeps/i386/i686/memcmp.S: Likewise.
	* sysdeps/powerpc/powerpc32/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.

	* Makerules: USE_TLS support is now default.
	* tls.make.c: Likewise.
	* csu/Versions: Likewise.
	* csu/libc-start.c: Likewise.
	* csu/libc-tls.c: Likewise.
	* csu/version.c: Likewise.
	* dlfcn/dlinfo.c: Likewise.
	* elf/dl-addr.c: Likewise.
	* elf/dl-cache.c: Likewise.
	* elf/dl-close.c: Likewise.
	* elf/dl-iteratephdr.c: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/dl-lookup.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-reloc.c: Likewise.
	* elf/dl-support.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-sysdep.c: Likewise.
	* elf/dl-tls.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* elf/rtld.c: Likewise.
	* elf/tst-tls-dlinfo.c: Likewise.
	* elf/tst-tls1.c: Likewise.
	* elf/tst-tls10.h: Likewise.
	* elf/tst-tls14.c: Likewise.
	* elf/tst-tls2.c: Likewise.
	* elf/tst-tls3.c: Likewise.
	* elf/tst-tls4.c: Likewise.
	* elf/tst-tls5.c: Likewise.
	* elf/tst-tls6.c: Likewise.
	* elf/tst-tls7.c: Likewise.
	* elf/tst-tls8.c: Likewise.
	* elf/tst-tls9.c: Likewise.
	* elf/tst-tlsmod1.c: Likewise.
	* elf/tst-tlsmod13.c: Likewise.
	* elf/tst-tlsmod13a.c: Likewise.
	* elf/tst-tlsmod14a.c: Likewise.
	* elf/tst-tlsmod2.c: Likewise.
	* elf/tst-tlsmod3.c: Likewise.
	* elf/tst-tlsmod4.c: Likewise.
	* elf/tst-tlsmod5.c: Likewise.
	* elf/tst-tlsmod6.c: Likewise.
	* include/errno.h: Likewise.
	* include/link.h: Likewise.
	* include/tls.h: Likewise.
	* locale/global-locale.c: Likewise.
	* locale/localeinfo.h: Likewise.
	* malloc/arena.c: Likewise.
	* malloc/hooks.c: Likewise.
	* malloc/malloc.c: Likewise.
	* resolv/Versions: Likewise.
	* sysdeps/alpha/dl-machine.h: Likewise.
	* sysdeps/alpha/libc-tls.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/generic/tls.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/ia64/dl-machine.h: Likewise.
	* sysdeps/ia64/libc-tls.c: Likewise.
	* sysdeps/mach/hurd/fork.c: Likewise.
	* sysdeps/mach/hurd/i386/tls.h: Likewise.
	* sysdeps/powerpc/powerpc32/dl-machine.c: Likwise.
	* sysdeps/powerpc/powerpc32/dl-machine.h: Likewise.
	* sysdeps/powerpc/powerpc64/dl-machine.h: Likewise.
	* sysdeps/s390/libc-tls.c: Likewise.
	* sysdeps/s390/s390-32/dl-machine.h: Likewise.
	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
	* sysdeps/sh/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc32/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc64/dl-machine.h: Likewise.
	* sysdeps/x86_64/dl-machine.h: Likewise.

	[BZ #3426]
	* stdlib/stdlib.h: Adjust comment for canonicalize_file_name to
	reality.

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

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

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

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

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

	* sysdeps/gnu/netinet/tcp.h: Define TCP_CONGESTION.

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

	* configure.in: Disable building profile libraries by default.

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

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

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

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

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

	[BZ #3313]
	* malloc/malloc.c (malloc_consolidate): Set maxfb to address of last
	fastbin rather than end of fastbin array.

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

	* sysdeps/i386/i486/bits/atomic.h (catomic_decrement): Use correct
	body macro.
	* sysdeps/x86_64/bits/atomic.h
	(__arch_c_compare_and_exchange_val_64_acq): Add missing casts.
	(catomic_decrement): Use correct body macro.

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

	* include/atomic.h: Add a unique prefix to all local variables
	in macros.
	* csu/tst-atomic.c (do_test): Test also catomic_* macros.

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

	* resolv/arpa/nameser.h: Document that ns_t_a6 is deprecated.

	[BZ #3313]
	* malloc/malloc.c (malloc_consolidate): Don't use get_fast_max to
	determine highest fast bin to consolidate, always look into all of
	them.
	(do_check_malloc_state): Only require for empty bins for large
	sizes in main arena.

	* libio/stdio.h: Add more __wur attributes.

2006-11-12  Andreas Jaeger  <aj@suse.de>

	[BZ #2510]
	* manual/search.texi (Hash Search Function): Clarify.
	(Array Search Function): Clarify.

2006-11-12  Joseph Myers  <joseph@codesourcery.com>

	[BZ #2830]
	* math/atest-exp.c (main): Cast hex value to mp_limb_t before
	shifting.
	* math/atest-exp2.c (read_mpn_hex): Likewise.
	* math/atest-sincos.c (main): Likewise.

	* sysdeps/unix/sysv/linux/syscalls.list: Add epoll_pwait.
	* sysdeps/unix/sysv/linux/sys/epoll.h: Declare epoll_pwait.
	* sysdeps/unix/sysv/linux/Versions (libc): Add epoll_pwait for
	version GLIBC_2.6.
	* Versions.def: Add GLIBC_2.6 for libc.

	* sysdeps/i386/i486/bits/atomic.h: Add catomic_* support.

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

	* malloc/malloc.c (_int_malloc): Remove unused any_larger variable.

	* nis/nis_defaults.c (__nis_default_access): Don't call getenv twice.

	* nis/nis_subr.c (nis_getnames): Use __secure_getenv instead of getenv.
	* sysdeps/generic/unsecvars.h: Add NIS_PATH.

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

	* include/atomic.c: Define catomic_* operations.
	* sysdeps/x86_64/bits/atomic.h: Likewise.  Fix a few minor problems.
	* stdlib/cxa_finalize.c: Use catomic_* operations instead of atomic_*.
	* malloc/memusage.c: Likewise.
	* gmon/mcount.c: Likewise.
	* elf/dl-close.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-profile.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-runtime.c: Likewise.
	* elf/dl-fptr.c: Likewise.
	* resolv/res_libc.c: Likewise.

2006-10-10  Roland McGrath  <roland@frob.com>
	* sysdeps/mach/hurd/utimes.c: Use a union to avoid an improper cast.
	* sysdeps/mach/hurd/futimes.c: Likewise.
	* sysdeps/mach/hurd/lutimes.c: Likewise.

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

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

	* include/atomic.h: Rename atomic_and to atomic_and_val and
	atomic_or to atomic_or_val.  Define new macros atomic_and and
	atomic_or which do not return values.
	* sysdeps/x86_64/bits/atomic.h: Define atomic_and and atomic_or.
	Various cleanups.
	* sysdeps/i386/i486/bits/atomic.h: Likewise.

	* po/sv.po: Update from translation team.

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

	* Versions.def: Add GLIBC_2.6 to libpthread.

	* include/shlib-compat.h (SHLIB_COMPAT): Expand parameters before use.
	(versioned_symbol): Likewise.
	(compat_symbol): Likewise.

	* po/tr.po: Update from translation team.
	* nis/Banner: Removed.  It's been integral part forever and the
	author info is incomplete anyway.
	* libio/Banner: Likewise.

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

	* version.h (VERSION): Bump to 2.5.90 for new development tree.
2007-01-11 21:51:07 +00:00
Jakub Jelinek 32c075e1f0 . 2007-07-31 13:33:18 +00:00
Ulrich Drepper ff8d96be30 * elf/dl-minimal.c (realloc): Optimize last patch. 2006-10-13 16:28:21 +00:00
Ulrich Drepper 90a0991a65 [BZ #3352]
2006-10-12  Richard Sandiford  <richard@codesourcery.com>
	[BZ #3352]
	* elf/dl-minimal.c (realloc): Let malloc() return a new pointer,
	and use memcpy() if it does.
2006-10-12 21:52:54 +00:00
Ulrich Drepper b15cc6a1ef * elf/dl-error.c (_dl_signal_error): Use __longjmp instead of longjmp.
* elf/dl-minimal.c (longjmp): Remove definition.
2005-12-17 23:09:41 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Ulrich Drepper b5cc329c4f 2004-10-15 Jakub Jelinek <jakub@redhat.com>
* elf/dl-minimal.c (__chk_fail): New.  Add rtld_hidden_def.
	* sysdeps/unix/sysv/linux/readonly-area.c: New file.
	* sysdeps/i386/i686/memmove.S (__memmove_chk): Add checking
	routine.
	* sysdeps/i386/i686/memcpy.S (__memcpy_chk): Likewise.
	* sysdeps/i386/i686/mempcpy.S (__mempcpy_chk): Likewise.
	* sysdeps/i386/i686/memset.S (__memset_chk): Likewise.
	* sysdeps/i386/i686/memmove-chk.S: New file.
	* sysdeps/i386/i686/memcpy-chk.S: Likewise.
	* sysdeps/i386/i686/mempcpy-chk.S: Likewise.
	* sysdeps/i386/i686/memset-chk.S: Likewise.
	* sysdeps/generic/strcat-chk.c (__strcat_chk): Don't __chk_fail
	if exactly fitting into buffer.
	* sysdeps/generic/strncat-chk.c (__strncat_chk): Likewise.
	* sysdeps/generic/readonly-area.c: New file.
	* sysdeps/generic/strncpy-chk.c (__strncpy_chk): Only test
	destlen once.
	* sysdeps/x86_64/memset.S (__memset_chk): Add checking routine.
	* sysdeps/x86_64/memcpy.S (__memcpy_chk): Likewise.
	* sysdeps/x86_64/mempcpy.S (__memcpy_chk): Define to __mempcpy_chk.
	* sysdeps/x86_64/memcpy-chk.S: New file.
	* sysdeps/x86_64/mempcpy-chk.S: Likewise.
	* sysdeps/x86_64/memset-chk.S: Likewise.
	* sysdeps/x86_64/strcpy-chk.S: Likewise.
	* sysdeps/x86_64/stpcpy-chk.S: Likewise.
	* argp/argp-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing.
	* argp/argp-fs-xinl.c (__OPTIMIZE__): Likewise.
	* debug/tst-chk1.c: New test.
	* debug/tst-chk2.c: Likewise.
	* debug/tst-chk3.c: Likewise.
	* debug/test-strcpy_chk.c: Likewise.
	* debug/test-stpcpy_chk.c: Likewise.
	* debug/vsprintf_chk.c (__vsprintf_chk): If flags > 0, request
	_IO_FLAGS2_CHECK_PERCENT_N.  Add libc_hidden_def.
	* debug/Makefile (routines): Add printf_chk, fprintf_chk, vprintf_chk,
	vfprintf_chk, gets_chk and readonly-area.
	(CFLAGS-*_chk.c): Set.
	(tests): Add tst-chk1, tst-chk2, tst-chk3, test-strcpy_chk and
	test-stpcpy_chk.
	* debug/vprintf_chk.c: New file.
	* debug/printf_chk.c: Likewise.
	* debug/vfprintf_chk.c: Likewise.
	* debug/fprintf_chk.c: Likewise.
	* debug/gets_chk.c: Likewise.
	* debug/chk_fail.c (__chk_fail): Add libc_hidden_def.
	* debug/snprintf_chk.c (__snprintf_chk): Fix order of arguments
	passed to __vsnprintf_chk.
	* debug/Versions (libc): Export __printf_chk, __fprintf_chk,
	__vprintf_chk, __vfprintf_chk and __gets_chk @GLIBC_2.3.4.
	* debug/vsnprintf_chk.c (__vsnprintf_chk): Don't call
	__vsnprintf, instead create a temporary file with
	_IO_strn_jumps jumptable.  If flags > 0, request
	_IO_FLAGS2_CHECK_PERCENT_N.  Add libc_hidden_def.
	* libio/Makefile (headers): Add bits/stdio2.h.
	* libio/stdio.h: Include <bits/stdio2.h> if __USE_FORTIFY_LEVEL.
	(sprintf, snprintf, vsprintf, vsnprintf): Remove defines.
	* libio/strfile.h (_IO_strnfile): New type.
	(_IO_strn_jumps): New extern.
	* libio/vsnprintf.c (_IO_strnfile): Remove.
	(_IO_strn_jumps): Remove static.
	* libio/bits/stdio2.h: New file.
	* libio/vswprintf.c (_IO_strnfile): Rename type to...
	(_IO_wstrnfile): ...this.  Adjust all uses.
	* libio/libio.h (_IO_FLAGS2_CHECK_PERCENT_N): Define.
	* stdio-common/vfprintf.c (STR_LEN): Define.
	(vfprintf): Add readonly_format variable.
	Handle _IO_FLAGS2_CHECK_PERCENT_N.
	(buffered_vfprintf): Copy _flags2.
	* include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk,
	__vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk,
	__vfprintf_chk): New prototypes.
	(__vsprintf_chk, __vsnprintf_chk): Add libc_hidden_proto.
	* include/string.h (__memcpy_chk, __memmove_chk, __mempcpy_chk,
	__memset_chk, __strcpy_chk, __stpcpy_chk, __strncpy_chk, __strcat_chk,
	__strncat_chk): New prototypes.
	* include/bits/string3.h: New file.
	* include/sys/cdefs.h (__chk_fail): Add libc_hidden_proto
	and rtld_hidden_proto.
	* string/Makefile (headers): Add bits/string3.h.
	* string/bits/string3.h (bcopy, bzero): New defines.
	(memset, memcpy, memmove, strcpy, strncpy, strcat, strncat): Change
	macros so that inlines are used only if unknown destination size
	or side-effects in destination argument.
	(mempcpy, stpcpy): Likewise.  Protect with #ifdef __USE_GNU.

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

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

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

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

	* debug/Makefile (routines): Add *_chk.
	* debug/Versions (libc): Export __chk_fail, __memcpy_chk,
	__memmove_chk, __mempcpy_chk, __memset_chk, __stpcpy_chk,
	__strcat_chk, __strcpy_chk, __strncat_chk, __strncpy_chk,
	__sprintf_chk, __vsprintf_chk, __snprintf_chk, __vsnprintf_chk
	@GLIBC_2.3.4.
	* debug/chk_fail.c: New file.
	* debug/snprintf_chk.c: Likewise.
	* debug/sprintf_chk.c: Likewise.
	* debug/vsnprintf_chk.c: Likewise.
	* debug/vsprintf_chk.c: Likewise.
	* include/features.h (_FORTIFY_SOURCE): Document, handle.
	(__USE_FORTIFY_LEVEL): Define.
	(__GNUC_PREREQ): Move to earlier location.
	* include/sys/cdefs.h (__chk_fail): New prototype.
	* libio/bits/stdio.h (sprintf, vsprintf, snprintf, vsnprintf):
	Define if __USE_FORTIFY_LEVEL.
	* misc/sys/cdefs.h (__bos, __bos0): Define.
	* string/string.h: Include <bits/string3.h> if __USE_FORTIFY_LEVEL.
	* bits/string/string3.h: New header.
	* sysdeps/generic/memcpy_chk.c: New file.
	* sysdeps/generic/memmove_chk.c: Likewise.
	* sysdeps/generic/mempcpy_chk.c: Likewise.
	* sysdeps/generic/memset_chk.c: Likewise.
	* sysdeps/generic/stpcpy_chk.c: Likewise.
	* sysdeps/generic/strcat_chk.c: Likewise.
	* sysdeps/generic/strcpy_chk.c: Likewise.
	* sysdeps/generic/strncat_chk.c: Likewise.
	* sysdeps/generic/strncpy_chk.c: Likewise.
2004-10-18 04:17:19 +00:00
Ulrich Drepper afdca0f2a3 Update.
* sysdeps/sparc/sparc64/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc32/dl-machine.h: Likewise.
	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
	* sysdeps/s390/s390-32/dl-machine.h: Likewise.
	* sysdeps/powerpc/powerpc64/dl-machine.h: Likewise.
	* sysdeps/powerpc/powerpc32/dl-machine.c: Likewise.
	* sysdeps/m68k/dl-machine.h: Likewise.
	* sysdeps/ia64/dl-machine.h: Likewise.
	* sysdeps/arm/dl-machine.h: Likewise.
	* sysdeps/alpha/dl-machine.h: Likewise.
2004-03-05 10:29:47 +00:00
Roland McGrath fde89ad009 * sysdeps/generic/libc-tls.c (__libc_setup_tls): Cope with zero ALIGN.
* malloc/hooks.c [_LIBC && (USE___THREAD || (USE_TLS && !SHARED))]
	(malloc_starter, memalign_starter, free_starter): Don't define these.
	* malloc/malloc.c [_LIBC && (USE___THREAD || (USE_TLS && !SHARED))]:
	Don't declare them either.
	* malloc/arena.c (ptmalloc_init) [_LIBC && USE_TLS]: Don't call
	__pthread_initialize, so no need to set hooks to *_starter.
	(ptmalloc_init_minimal): New function, broken out of ptmalloc_init.
	[_LIBC && SHARED && USE_TLS && !USE___THREAD]
	(__libc_malloc_pthread_startup): New function.
	* malloc/Versions (libc: GLIBC_PRIVATE): New set, add that function.

	* malloc/hooks.c (memalign_starter): New function.
	* malloc/malloc.c: Declare it.
	* malloc/arena.c (save_memalign_hook): New variable.
	(ptmalloc_init): Set __memalign_hook to memalign_starter.

	* elf/dl-minimal.c (free): Clear the memory.
	(calloc): Just call malloc, knowing all memory it returns is cleared.

	* sysdeps/generic/dl-tls.c (allocate_dtv): Use calloc instead of
	malloc and memset; calloc can avoid the zeroing when redundant.
	(_dl_tls_setup): Likewise.
	* elf/dl-load.c (decompose_rpath): Likewise.
	* sysdeps/generic/libc-tls.c (__libc_setup_tls): Comment out memset
	call, since memory from sbrk at startup is already zero.

	* elf/rtld.c (_dl_start, dl_main): TLS_INIT_TP macro now returns an
	error string for failure, null for success.  Update callers.
	* sysdeps/generic/libc-tls.c (__libc_setup_tls): Likewise.
	* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
2002-12-06 11:15:07 +00:00
Roland McGrath ce460d04a5 * sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
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-11 10:52:20 +00:00
Roland McGrath 7a9ce79a3b * sysdeps/mach/_strerror.c (__strerror_r): Add libc_hidden_def.
* 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-30 01:31:18 +00:00
Roland McGrath a816b435dd * Makerules (cpp-srcs-left): When setting this to run
cppflags-iterator.mk, must append .c to $(tests) and $(xtests)
	words.  Combine the two loops into one on the concatenated list,
	including those as well as $(test-srcs).

	* elf/dl-minimal.c (__libc_memalign): Guts of malloc moved here,
	since we align here with optimally minimal waste anyway.
	(malloc): Just call that.

	* sysdeps/generic/libc-tls.c (__libc_setup_tls): Set l_tls_offset to
	the right variable.

	* elf/dl-load.c (_dl_map_object_from_fd): Use p_vaddr, not p_offset,
	to compute memory location for l_tls_initimage.
	* elf/rtld.c (_dl_start): Likewise.
	* sysdeps/generic/libc-tls.c (__libc_setup_tls): Likewise.

	* libio/oldiopopen.c: Move #include's before #if SHLIB_COMPAT,
	because the .d file is generated in the non-shared case and
	so fails to catch them otherwise.

	* sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage): New function,
	split out of _dl_allocate_tls.
	(_dl_allocate_tls_init): Likewise.
	(_dl_allocate_tls): Call those.
	* sysdeps/generic/ldsodefs.h: Declare them with attribute_hidden.
	* elf/rtld.c (dl_main): Call them separately instead of calling
	_dl_allocate_tls.  Delay _dl_allocate_tls_init until after relocation
	is finished, so that the initializer data has been relocated before we
	copy it into the main thread's TLS block.

	* sysdeps/generic/dl-tls.c (_dl_allocate_tls): Fix off-by-one error in
	loop conditions, prevented the last used module from being initialized.
2002-08-05 01:21:25 +00:00
Ulrich Drepper 37ba7d6663 Update.
2002-08-02  Ulrich Drepper  <drepper@redhat.com>

	* configure.in (HAVE_BROKEN_ALIAS_ATTRIBUTE): Add check for
	broken alias attribute handling.
	* config.h.in (HAVE_BROKEN_ALIAS_ATTRIBUTE): Add.

	* assert/assert.c (__assert_fail): Fix typo in comment.

	* include/rpc/rpc.h: Declare __libc_tsd_RPC_VARS if USE_TLS &&
	HAVE___THREAD.
	* sunrpc/rpc_thread.c: Don't define __libc_tsd_RPC_VARS as static
	if USE_TLS && HAVE___THREAD.
	* sunrpc/Versions [libc] (GLIBC_PRIVATE): Export __libc_tsd_RPC_VARS.

2002-08-02  Jakub Jelinek  <jakub@redhat.com>

	* assert/assert.c (__assert_fail): Remove undef.
	Replace INTDEF with libc_hidden_def.
	* assert/__assert.c (__assert): Remove INTUSE.
	* elf/dl-minimal.c (__assert_fail): Replace INTDEF with
	libc_hidden_weak.
	* include/libc-symbols.h (hidden_proto, hidden_def, hidden_weak,
	hidden_ver, libc_hidden_proto, libc_hidden_def, libc_hidden_weak,
	libc_hidden_ver, rtld_hidden_proto, rtld_hidden_def, rtld_hidden_weak,
	rltd_hidden_ver, libm_hidden_proto, libm_hidden_def, libm_hidden_weak,
	libm_hiden_ver): Define.
	* include/assert.h (__assert_fail_internal): Remove.
	(__assert_fail): Add prototype.  Add hidden_proto.
	* include/libc-internal.h (__libc_freeres, __profile_frequency): Add
	libc_hidden_proto.
	* include/wchar.h (__mbrtowc_internal, __mbrlen_internal): Remove.
	(__mbrtowc, __mbrlen): Use libc_hidden_proto.  Remove macros.
	* include/string.h (__mempcpy, __stpncpy, __rawmemchr, __strcasecmp):
	Add libc_hidden_proto.
	* include/fcntl.h (__open64, __libc_open, __libc_fcntl, __open,
	__fcntl): Add libc_hidden_proto.  Remove macros.
	(__open_internal, __fcntl_internal): Remove.
	* libio/iofdopen.c (_IO_fcntl): Remove INTUSE from __fcntl.
	* malloc/set-freeres.c (__libc_freeres): Add libc_hidden_def.
	* nss/nsswitch.h (__nss_database_lookup, __nss_next): Add
	libc_hiden_proto.
	* nss/nsswitch.c (__nss_database_lookup, __nss_next): Add
	libc_hidden_def.
	* sysdeps/generic/mempcpy.c (__mempcpy): Remove undef.
	Add libc_hidden_def.
	* sysdeps/generic/open64.c (__open64): Add libc_hidden_def.
	* sysdeps/generic/open.c (__open): Remove undef.
	Add libc_hidden_def.  Remove INTDEF.
	* sysdeps/generic/fcntl.c (__fcntl): Remove undef.
	Add libc_hidden_def.
	* sysdeps/mach/hurd/fcntl.c (__fcntl): Likewise.
	* sysdeps/i386/i586/mempcpy.S (__mempcpy): Add libc_hidden_def.
	* sysdeps/i386/i686/mempcpy.S (__mempcpy): Likewise.
	* sysdeps/mach/hurd/fcntl.c (__libc_fcntl, __fcntl): Remove undef.
	(__fcntl): Remove INTDEF2.  Add libc_hidden_weak.
	(__libc_fcntl): Add libc_hidden_def.
	* sysdeps/mach/hurd/open.c (__libc_open, __open): Remove undef.
	(__open): Remove INTDEF2.  Add libc_hidden_weak.
	(__libc_open): Add libc_hidden_def.
	* sysdeps/posix/open64.c (__open64): Add libc_hidden_weak.
	* sysdeps/standalone/open.c (__open): Add libc_hidden_def.
	* sysdeps/unix/sysv/aix/fcntl.c (__libc_fcntl, __fcntl): Remove undef.
	Add libc_hidden_def.
	* sysdeps/unix/sysv/aix/open.c (__libc_open, __open): Remove undef.
	Add libc_hidden_def.
	* sysdeps/unix/sysv/linux/i386/fcntl.c (__libc_fcntl, __fcntl): Remove
	undef.
	(__fcntl): Remove INTDEF2.  Add libc_hidden_weak.
	(__libc_fcntl): Add libc_hidden_def.
	* sysdeps/unix/sysv/linux/syscalls.list (__fcntl_internal,
	__getpgid_internal, __chown_internal): Remove.
	(__GI___fcntl, __GI___libc_fcntl, __GI___getpgid, __GI___pipe,
	__GI___sched_setscheduler, __GI___select, __GI___setpgid,
	__GI___chown): Add.
	* sysdeps/unix/syscalls.list (__close_internal, __dup2_internal,
	__getpid_internal, __open_internal, __write_internal): Remove.
	(__GI___fcntl, __GI___libc_fcntl, __GI___open, __GI___libc_open,
	__GI___chown, __GI___close, __GI___dup2, __GI___getpid,
	__GI___libc_open, __GI___open, __GI___read, __GI___libc_read,
	__GI___select, __GI___statfs, __GI___write, __GI___libc_write): Add.
	* wcsmbs/mbrlen.c (__mbrlen): Remove undef.
	Replace INTDEF with libc_hidden_def.
	* wcsmbs/mbrtowc.c (__mbrtowc): Likewise.
	* catgets/catgetsinfo.h (__open_catalog): Add libc_hidden_proto.
	* catgets/open_catalog.c (__open_catalog): Add libc_hidden_def.
	* elf/dl-profile.c (__profile_frequency): Add libc_hidden_proto.
	* include/rpc/rpc.h (__rpc_thread_svc_fdset, __rpc_thread_createerr):
	Add libc_hidden_proto.
	* include/sys/poll.h (__poll): Add libc_hidden_proto.
	* include/sys/select.h (__select): Likewise.
	* include/sys/socket.h (__send): Likewise.
	* include/sys/statfs.h (__statfs): Likewise.
	* include/unistd.h (__pwrite64, __libc_read, __pipe, __chown, __dup2,
	__getpid, __getpgid, __setpgid, __close, __read, __write,
	__getpagesize, __sbrk): Likewise.
	(__chown_internal, __dup2_internal, __getpid_internal,
	__getpgid_internal, __close_internal, __write_internal,
	__getpagesize_internal): Remove.
	(__close, __dup2, __getpagesize, __getpgid, __getpid, __libc_write):
	Remove macros.
	* include/printf.h (__printf_fp): Add libc_hidden_proto.
	* include/sched.h (__sched_setscheduler): Likewise.
	* include/resolv.h (__res_ninit, __res_randomid): Likewise.
	* include/stdlib.h (__secure_getenv): Likewise.
	* include/signal.h (__sigaction, __sigsuspend): Likewise.
	* inet/getaliasent_r.c (NSS_attribute_hidden): Remove.
	* inet/getaliasname_r.c (NSS_attribute_hidden): Remove.
	* inet/getnetbyad_r.c (NSS_attribute_hidden): Remove.
	* inet/getnetbynm_r.c (NSS_attribute_hidden): Remove.
	* inet/getnetent_r.c (NSS_attribute_hidden): Remove.
	* inet/getproto_r.c (NSS_attribute_hidden): Remove.
	* inet/getprtent_r.c (NSS_attribute_hidden): Remove.
	* inet/getprtname_r.c (NSS_attribute_hidden): Remove.
	* inet/getrpcbyname_r.c (NSS_attribute_hidden): Remove.
	* inet/getrpcbynumber_r.c (NSS_attribute_hidden): Remove.
	* inet/getrpcent_r.c (NSS_attribute_hidden): Remove.
	* inet/getservent_r.c (NSS_attribute_hidden): Remove.
	* inet/getsrvbynm_r.c (NSS_attribute_hidden): Remove.
	* inet/getsrvbypt_r.c (NSS_attribute_hidden): Remove.
	* inet/gethstbyad_r.c (DB_LOOKUP_FCT): Remove INTUSE.
	* inet/gethstbynm2_r.c (DB_LOOKUP_FCT): Likewise.
	* inet/gethstbynm_r.c (DB_LOOKUP_FCT): Likewise.
	* inet/gethstent_r.c (DB_LOOKUP_FCT): Likewise.
	* libio/genops.c (__overflow): Add libc_hidden_def.
	* libio/iovdprintf.c: Remove libio.h include.
	* libio/libioP.h (libc_hidden_proto, libc_hidden_def,
	libc_hidden_weak): Define to nothing if not defined.
	(__overflow, __woverflow): Add libc_hidden_proto.
	* libio/wgenops.c (__woverflow): Add libc_hidden_def.
	* nss/getXXent_r.c (NSS_attribute_hidden): Remove.
	(DB_LOOKUP_FCT): Add libc_hidden_proto.
	* nss/getXXbyYY_r.c (NSS_attribute_hidden): Remove.
	(DB_LOOKUP_FCT): Add libc_hidden_proto.
	* nss/XXX-lookup.c (DB_LOOKUP_FCT): Add libc_hidden_proto
	and libc_hidden_def.
	* nss/hosts-lookup.c (__nss_hosts_lookup): Remove INTDEF.
	* posix/bsd-getpgrp.c (__getpgid_internal): Remove.
	(__getpgid): Add libc_hidden_proto.
	(__bsd_getpgrp): Remove INTUSE.
	* resolv/res_init.c (__res_ninit, __res_randomid): Add
	libc_hidden_def.
	* shadow/getspent_r.c (NSS_attribute_hidden): Remove.
	* shadow/getspnam_r.c (NSS_attribute_hidden): Remove.
	* stdio-common/printf_fp.c (__printf_fp): Add libc_hidden_def.
	* stdlib/strfmon.c (__printf_fp): Add libc_hidden_proto.
	* stdlib/secure-getenv.c (__secure_getenv): Add libc_hidden_def.
	* sunrpc/rpc_thread.c (__rpc_thread_svc_fdset,
	__rpc_thread_createerr): Add libc_hidden_def.
	* sysdeps/alpha/alphaev67/rawmemchr.S (__rawmemchr): Add
	libc_hidden_def.
	* sysdeps/alpha/alphaev67/stpncpy.S (__stpncpy): Likewise.
	* sysdeps/alpha/rawmemchr.S (__rawmemchr): Likewise.
	* sysdeps/alpha/stpncpy.S (__stpncpy): Likewise.
	* sysdeps/generic/chown.c (__chown): Likewise.
	* sysdeps/generic/close.c (__close): Likewise.
	* sysdeps/generic/dup2.c (__dup2): Likewise.
	* sysdeps/generic/pipe.c (__pipe): Likewise.
	* sysdeps/generic/prof-freq.c (__profile_frequency): Likewise.
	* sysdeps/generic/pwrite64.c (__pwrite64): Likewise.
	* sysdeps/generic/rawmemchr.c (__rawmemchr): Likewise.
	* sysdeps/generic/read.c (__libc_read): Likewise.
	(__read): Add libc_hidden_weak.
	* sysdeps/generic/sbrk.c (__sbrk): Add libc_hidden_def.
	* sysdeps/generic/sched_sets.c (__sched_setscheduler): Likewise.
	* sysdeps/generic/select.c (__select): Likewise.
	* sysdeps/generic/send.c (__send): Likewise.
	* sysdeps/generic/setpgid.c (__setpgid): Likewise.
	* sysdeps/generic/sigaction.c (__sigaction): Likewise.
	* sysdeps/generic/sigsuspend.c (__sigsuspend): Likewise.
	* sysdeps/generic/statfs.c (__statfs): Likewise.
	* sysdeps/generic/stpncpy.c (__stpncpy): Likewise.
	* sysdeps/generic/strcasecmp.c (__strcasecmp): Likewise.
	* sysdeps/generic/getpagesize.c (__getpagesize): Likewise.
	Remove undef and INTDEF.
	* sysdeps/generic/getpgid.c (__getpgid): Likewise.
	* sysdeps/generic/getpid.c (__getpid): Likewise.
	* sysdeps/generic/write.c (__libc_write): Likewise.
	(__write): Add libc_hidden_weak.  Remove undef and INTDEF.
	* sysdeps/i386/rawmemchr.S (__rawmemchr): Add libc_hidden_def.
	* sysdeps/i386/stpncpy.S (__stpncpy): Likewise.
	* sysdeps/m68k/rawmemchr.S (__rawmemchr): Likewise.
	* sysdeps/mach/hurd/chown.c (__chown): Likewise.  Remove INTDEF.
	* sysdeps/mach/hurd/close.c (__close): Add libc_hidden_def.
	Remove undef and INTDEF.
	* sysdeps/mach/hurd/dup2.c (__dup2): Likewise.
	* sysdeps/mach/hurd/getpgid.c (__getpgid): Likewise.
	* sysdeps/mach/hurd/getpid.c (__getpid): Likewise.
	* sysdeps/mach/getpagesize.c (__getpagesize): Likewise.
	* sysdeps/mach/hurd/write.c (__libc_write): Likewise.
	(__write): Add libc_hidden_weak.  Remove undef and INTDEF.
	* sysdeps/mach/hurd/pipe.c: Include unistd.h.
	(__pipe): Add libc_hidden_def.
	* sysdeps/mach/hurd/dl-sysdep.c (__libc_read, __libc_write): Add
	libc_hidden_weak.
	* sysdeps/mach/hurd/poll.c (__poll): Add libc_hidden_def.
	* sysdeps/mach/hurd/profil.c (__profile_frequency): Likewise.
	* sysdeps/mach/hurd/read.c (__libc_read): Likewise.
	(__read): Add libc_hidden_weak.
	* sysdeps/mach/hurd/pwrite64.c (__pwrite64): Likewise.
	(__libc_pwrite64): Add libc_hidden_def.
	* sysdeps/mach/hurd/sbrk.c (__sbrk): Likewise.
	* sysdeps/mach/hurd/select.c (__select): Likewise.
	* sysdeps/mach/hurd/send.c (__send): Likewise.
	* sysdeps/mach/hurd/setpgid.c (__setpgid): Likewise.
	* sysdeps/mach/hurd/sigaction.c (__sigaction): Likewise.
	* sysdeps/mach/hurd/sigsuspend.c (__sigsuspend): Likewise.
	* sysdeps/mach/hurd/statfs.c (__statfs): Likewise.
	* sysdeps/posix/dup2.c: Likewise.
	Remove undef and INTDEF.
	* sysdeps/posix/getpagesize.c (__getpagesize): Likewise.
	* sysdeps/posix/pwrite64.c (__libc_pwrite64): Add libc_hidden_def.
	(__pwrite64): Add libc_hidden_weak.
	* sysdeps/posix/sigsuspend.c (__sigsuspend): Add libc_hidden_def.
	* sysdeps/sparc/sparc64/rawmemchr.S (__rawmemchr): Likewise.
	* sysdeps/sparc/sparc64/stpncpy.S (__stpncpy): Likewise.
	* sysdeps/standalone/close.c (__close): Likewise.
	* sysdeps/standalone/write.c (__libc_write): Likewise.
	(__write): Add libc_hidden_weak.
	* sysdeps/standalone/read.c (__read): Likewise.
	(__libc_read): Add libc_hidden_def.
	* sysdeps/unix/grantpt.c (grantpt): Remove INTUSE.
	* sysdeps/unix/bsd/m68k/pipe.S (__pipe): Add libc_hidden_def.
	* sysdeps/unix/bsd/osf/alpha/pipe.S (__pipe): Likewise.
	* sysdeps/unix/bsd/vax/pipe.S (__pipe): Likewise.
	* sysdeps/unix/bsd/syscalls.list (__GI___getpagesize): Likewise.
	* sysdeps/unix/bsd/poll.c (__poll): Likewise.
	* sysdeps/unix/bsd/sigaction.c (__sigaction): Likewise.
	* sysdeps/unix/bsd/sigsuspend.c (__sigsuspend): Likewise.
	* sysdeps/unix/common/syscalls.list (__GI___getpgid, __GI___setpgid,
	__GI___sigaction): Add.
	* sysdeps/unix/i386/pipe.S (__pipe): Add libc_hidden_def.
	* sysdeps/unix/inet/syscalls.list (__GI___send): Add.
	* sysdeps/unix/mips/pipe.S (__pipe): Add libc_hidden_def.
	* sysdeps/unix/sparc/pipe.S (__pipe): Likewise.
	* sysdeps/unix/sysv/irix4/syscalls.list (__GI___getpgid,
	__GI___setpgid): Add.
	* sysdeps/unix/sysv/aix/chown.c (__chown): Add libc_hidden_def.
	Remove undef and INTDEF.
	* sysdeps/unix/sysv/aix/getpgid.c (__getpgid): Likewise.
	* sysdeps/unix/sysv/aix/write.c (__write, __libc_write): Likewise.
	* sysdeps/unix/sysv/aix/close.c (__close): Add libc_hidden_def.
	* sysdeps/unix/sysv/aix/getpid.c (__getpid): Likewise.
	* sysdeps/unix/sysv/aix/pipe.c (__pipe): Likewise.
	* sysdeps/unix/sysv/aix/read.c (__read, __libc_read): Likewise.
	* sysdeps/unix/sysv/aix/poll.c (__poll): Likewise.
	* sysdeps/unix/sysv/aix/sbrk.c (__sbrk): Likewise.
	* sysdeps/unix/sysv/aix/sigaction.c (__sigaction): Likewise.
	* sysdeps/unix/sysv/aix/sigsuspend.c (__sigsuspend): Likewise.
	* sysdeps/unix/sysv/aix/statfs.c (__statfs): Likewise.
	* sysdeps/unix/sysv/aix/select.c (__select): Likewise.
	* sysdeps/unix/sysv/aix/setpgid.c (__setpgid): Likewise.
	* sysdeps/unix/sysv/linux/alpha/pipe.S (__pipe): Likewise.
	* sysdeps/unix/sysv/linux/alpha/syscalls.list (__GI___pwrite64,
	__GI___statfs, __GI___send): Add.
	* sysdeps/unix/sysv/linux/alpha/select.S (__select): Add
	libc_hidden_ver resp. libc_hidden_def.
	* sysdeps/unix/sysv/linux/alpha/sigsuspend.S (__sigsuspend): Add
	libc_hidden_def.
	* sysdeps/unix/sysv/linux/ia64/getpagesize.c (__getpagesize):
	Likewise.  Remove undef and INTDEF.
	* sysdeps/unix/sysv/linux/ia64/pipe.S (__pipe): Add libc_hidden_def.
	* sysdeps/unix/sysv/linux/ia64/syscalls.list (__GI___pwrite64,
	__GI___statfs, __GI___send): Add.
	* sysdeps/unix/sysv/linux/ia64/sigaction.c (__sigaction): Add
	libc_hidden_def.
	* sysdeps/unix/sysv/linux/ia64/sigsuspend.c (__sigsuspend):
	Likewise.
	* sysdeps/unix/sysv/linux/sh/pipe.S (__pipe): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/chown.c (__chown): Add
	libc_hidden_ver resp. libc_hidden_def.
	* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (__GI___pwrite64,
	__GI___send): Add.
	* sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c (__sigaction):
	Add libc_hidden_weak.
	* sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c (__sigsuspend):
	Add libc_hidden_def.
	* sysdeps/unix/sysv/linux/hppa/syscalls.list (__GI___send): Add.
	* sysdeps/unix/sysv/linux/arm/sigaction.c (__sigaction): Add
	libc_hidden_weak.
	* sysdeps/unix/sysv/linux/i386/chown.c (__chown): Add libc_hidden_ver
	resp. libc_hidden_def.
	* sysdeps/unix/sysv/linux/i386/sigaction.c (__sigaction): Add
	libc_hidden_weak.
	* sysdeps/unix/sysv/linux/m68k/chown.c (__chown): Likewise.  Remove
	INTDEF.
	* sysdeps/unix/sysv/linux/m68k/getpagesize.c (__getpagesize):
	Likewise.  Remove undef.
	* sysdeps/unix/sysv/linux/mips/pwrite64.c (__pwrite64): Add
	libc_hidden_weak.
	* sysdeps/unix/sysv/linux/mips/syscalls.list (__GI___send): Add.
	* sysdeps/unix/sysv/linux/mips/sigaction.c (__sigaction): Add
	libc_hidden_weak.
	* sysdeps/unix/sysv/linux/powerpc/chown.c (__chown): Add
	libc_hidden_def.
	* sysdeps/unix/sysv/linux/powerpc/pwrite64.c (__pwrite64): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c (__getpagesize):
	Likewise.  Remove undef and INTDEF.
	* sysdeps/unix/sysv/linux/sparc/sparc32/pipe.S (__pipe): Add
	libc_hidden_def.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (__sigaction): Add
	libc_hidden_weak.
	* sysdeps/unix/sysv/linux/sparc/sparc64/pipe.S (__pipe): Add
	libc_hidden_def.
	* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
	(__GI___pwrite64, __GI___statfs, __GI___select, __GI___send): Add.
	* sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (__sigaction): Add
	libc_hidden_weak.
	* sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c (__sigsuspend):
	Add libc_hidden_def.
	* sysdeps/unix/sysv/linux/x86_64/syscalls.list (__GI___pwrite64,
	__GI___statfs): Add.
	* sysdeps/unix/sysv/linux/x86_64/send.c (__send): Add
	libc_hidden_weak.
	* sysdeps/unix/sysv/linux/x86_64/sigaction.c (__sigaction): Likewise.
	* sysdeps/unix/sysv/linux/getpagesize.c: Add libc_hidden_def.
	Remove undef and INTDEF.
	* sysdeps/unix/sysv/linux/poll.c (__poll): Add libc_hidden_def.
	* sysdeps/unix/sysv/linux/pwrite64.c (__pwrite64): Add
	libc_hidden_def.
	* sysdeps/unix/sysv/linux/send.S (__send): Likewise.
	* sysdeps/unix/sysv/linux/sigaction.c (__sigaction): Add
	libc_hidden_weak.
	* sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Add
	libc_hidden_def.
	* sysdeps/unix/sysv/sco3.2.4/__setpgid.c (__setpgid): Likewise.
	* sysdeps/unix/sysv/sco3.2.4/sigaction.S (__sigaction): Likewise.
	* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list (__GI___sigaction):
	Add.
	* sysdeps/unix/sysv/sysv4/__getpgid.c (__getpgid): Add
	libc_hidden_def.  Remove undef and INTDEF.
	* sysdeps/unix/sysv/sysv4/getpgid.c (__getpgid): Likewise.
	* sysdeps/unix/sysv/sysv4/__setpgid.c (__setpgid): Add
	libc_hidden_def.
	* sysdeps/unix/sysv/sysv4/setpgid.c (__setpgid): Likewise.
	* sysdeps/unix/sysv/sysv4/sigaction.c (__sigaction): Likewise.
	* sysdeps/unix/sysv/sigaction.c (__sigaction): Likewise.
	* sysdeps/unix/getpagesize.c (__getpagesize): Add libc_hidden_def.
	Remove undef and INTDEF.
	* configure.in (HAVE_BROKEN_VISIBILITY_ATTRIBUTE): Add check for
	broken visibility attribute handling.
	* config.h.in (HAVE_BROKEN_VISIBILITY_ATTRIBUTE): Add.

2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2002-08-03 07:02:10 +00:00
Ulrich Drepper bc32ebd3b0 Update.
* elf/dl-minimal.c: Remove definition of __assert_perror_fail.
2002-07-25 08:29:34 +00:00
Ulrich Drepper 51d46f733a Update.
2002-07-25  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/wordsize-32/divdi3.c: Define __divdi3_internal.
	* sysdeps/wordsize-32/lldiv.c: Make gcc use __divdi3_internal instead
	of __divdi3.

	* sysdeps/unix/sysv/linux/adjtime.c: Use __adjtimex_internal.
	* sysdeps/unix/sysv/linux/ntp_gettime.c: Likewise.
	* sysdeps/unix/sysv/linux/syscalls.list: Add __adjtimex_internal
	alias for adjtimex syscall.

	* elf/dl-minimal.c: Define __assert_fail_internal.
	* assert/assert.c: Likewise.
	* include/assert.h: Define __assert_file macro if !SHARED and not
	NOT_IN_libc.

	* iconv/Makefile: Define NOT_IN_libc for objects in standalone
	programs.
	* locale/Makefile: Likewise.
	* nscd/Makefile: Likewise.
	* catgets/Makefile: Likewise.

	succesful seek call.  Simplify error checking.
2002-07-25 08:19:59 +00:00
Ulrich Drepper 739d440d2a Update.
2002-07-19  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Add test for __thread support in compiler.
	* config.h.in: Add HAVE___THREAD.
	* Makefile (headers): Remove errno.h, sys/errno.h, and bits/errno.h.
	* include/sys/errno.h: Moved to...
	* stdlib/sys/errno.h: ...here.  New file.
	* stdlib/errno.h: New file.  Moved from...
	* include/errno.h: ...here.  Changed into an internal header defining
	libc-local things like __set_errno.
	* stdlib/Makefile (headers): Add errno.h, sys/errno.h, and
	bits/errno.h.
	* elf/dl-minimal.c: Include <tls.h>.  Define errno as thread-local
	variable if USE_TLS && HAVE___THREAD.  Don't define __errno_location
	either.
	* elf/rtld.c (_dl_start): Add code to initialize TLS for ld.so
	from...
	(_dl_start_final): ...here.  Add code to initialize tls elements from
	bootstrap_map.
	* sysdeps/generic/errno-loc.c: Define errno as thread-local variable
	if USE_TLS && HAVE___THREAD.
	* sysdeps/generic/bits/errno.h: Remove __set_errno definition.
	* sysdeps/mach/hurd/bits/errno.h: Likewise.
	* sysdeps/standalone/arm/bits/errno.h: Likewise.
	* sysdeps/standalone/bits/errno.h: Likewise.
	* sysdeps/unix/bsd/bsd4.4/bits/errno.h: Likewise.
	* sysdeps/unix/sysv/aix/bits/errno.h: Likewise.
	* sysdeps/unix/sysv/hpux/bits/errno.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/errno.h: Likewise.
	* sysdeps/unix/sysv/linux/hppa/bits/errno.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/errno.h: Likewise.
	* sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h: Likewise.
	* sysdeps/i386/dl-machine.c (elf_machine_rel) [RTLD_BOOTSTRAP]: Don't
	use GL(dl_rtld_map), use map parameter.
	* sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
	* sysdeps/unix/sysv/linux/i386/sysdep.S: Define errno in .tbss if
	USE_TLS && HAVE___THREAD.
	* sysdeps/unix/sysv/linux/i386/sysdep.h: Unify SETUP_PIC_REG
	definitions.  If USE_TLS && HAVE___THREAD store errooor value using
	TLS code sequence.
	* sysdeps/unix/sysv/linux/i386/i686/sysdep.h: Likewise.

	* sysdeps/unix/sysv/linux/getcwd.c: No real need to restore errno.
	* sysdeps/unix/sysv/linux/grantpt.c: Likewise.
	* sysdeps/unix/sysv/linux/internal_statvfs.c: Likewise.
	* sysdeps/unix/sysv/linux/msgctl.c: Likewise.
	* sysdeps/unix/sysv/linux/readv.c: Likewise.
	* sysdeps/unix/sysv/linux/writev.c: Likewise.
2002-07-20 01:14:41 +00:00
Ulrich Drepper 3646145597 (malloc): Declare _end as hidden. (__errno_location): New function. Declare errno as hidden. 2002-03-15 03:09:42 +00:00
Ulrich Drepper 75bfdfc7df Update.
2002-03-13  Wolfram Gloger  <wg@malloc.de>

	* malloc/malloc.c (sYSMALLOc): Don't change brk if mmap failed.

2002-03-02  Andreas Schwab  <schwab@suse.de>

	* stdio-common/vfprintf.c (process_arg): Fix decimal format with
	'h' flag and positional arg.
	* stdio-common/tst-printf.c (rfg3): New function to test
	positional arguments.
	(main): Fix some warnings.

2002-03-13  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-minimal.c (_itoa): Use _itoa_lower_digits_internal if SHARED.
	* elf/dl-reloc.c (_dl_reloc_bad_type): Likewise.
2002-03-13 23:27:20 +00:00
Ulrich Drepper aa32f79837 Update.
* include/stdlib.h (__libc_drand48_data): Declare as hidden.
	* stdlib/drand48.c: Remove declaration of __libc_drand48_data here.
	* stdlib/erand48.c: Likewise.
	* stdlib/jrand48.c: Likewise.
	* stdlib/lcong48.c: Likewise.
	* stdlib/lrand48.c: Likewise.
	* stdlib/mrand48.c: Likewise.
	* stdlib/nrand48.c: Likewise.
	* stdlib/seed48.c: Likewise.
	* stdlib/srand48.c: Likewise.

	* stdio-common/_itoa.c (_itoa_base_table): Declare as hidden.
	(_itoa_lower_digits_internal): New declaration.
	(_itoa_upper_digits_internal): New declaration.
	(_itoa): Use INTUSE to acces _itoa_upper_digits and _itoa_lower_digits.
	* stdio-common.h (_itoa_lower_digits_internal): New declaration.
	(_itoa_upper_digits_internal): New declaration.
	(_itoa_word): Use INTUSE to acces _itoa_upper_digits and
	_itoa_lower_digits.
	* stdio-common/itoa-digits.c: Use INTVARDEF with _itoa_lower_digits.
	* stdio-common/itoa-udigits.c: Use INTVARDEF with _itoa_upper_digits.

	* elf/dl-minimal.c (_itoa): Declare _itoa_lower_digits as hidden.
	* elf/dl-reloc.c (_dl_reloc_bad_type): Likewise.

	* stdio-common/_itowa.c (_itoa_base_table): Declare as hidden.
	(_itowa_lower_digits): Likewise.
	(_itowa_upper_digits): Likewise.
	* stdio-common/_itowa.h (_itowa_lower_digits): Likewise.
	(_itowa_upper_digits): Likewise.

	* intl/plural-exp.h (attribute_hidden): Define as empty macro if
	not already defined.
	(GERMANIC_PLURAL): Declare as hidden.

	* posix/getopt.c (__getopt_initialized): Declare as hidden.
	(attribute_hidden): Define as empty macro if not already defined.

	* iconv/gconv_int.h (__gconv_path_elem): Declare hidden.
	(__gconv_max_path_elem_len): Likewise.
	(__gconv_path_envvar): Likewise.

	* math/Makefile (gmp-objs): Remove mp_clz_tab.
	* stdlib/Makefile (aux): Remove mp_clz_tab.
	* stdlib/mp_clz_tab.c: Removed.  Not needed anywhere.

	* stdlib/exit.h (__exit_funcs): Declare as hidden.
2002-03-12 20:04:56 +00:00
Ulrich Drepper aed283dd45 Update.
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-13 08:03:56 +00:00
Ulrich Drepper 37beecf77c Update.
* elf/dl-minimal.c: Define _itoa_lower_digits.

	* elf/dynamic-link.h (elf_get_dynamic_info): ld.so can have
	DT_FLAGS set.
2002-02-06 01:14:01 +00:00
Ulrich Drepper 9710f75d4a Update.
2002-02-03  Andreas Schwab  <schwab@suse.de>

	* sysdeps/posix/readv.c: Use ssize_t for bytes_read.
	* sysdeps/posix/writev.c: Use ssize_t for bytes_written.  Fix comment.

2002-02-03  Thorsten Kukuk  <kukuk@suse.de>

	* sysdeps/posix/writev.c: Check for ssize_t overflow, don't use
	alloca if the memory reqirements are too high.

2002-02-03  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-load.c (decompose_rpath): Avoid using strstr.
	* elf/dl-minimal.c (_strerror_r): Use _itoa instead of _itoa_word since
	the former is available anyway and speed isn't important here.
	* elf/dl-misc.c (_dl_debug_vdprintf): Likewise.
	* elf/dl-version.c (match_symbol): Likewise.
	(_dl_check_map_versions): Likewise.
	* elf/rtld.c (process_envvars): Likewise.
	(print_statistics): Likewise.
	* sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Likewise.
	* elf/dl-minimal.c (_itoa): Always define it.  Make it work for all
	bases.  Add assert to catch uses of unimplemented features.
	(__strsep): Add assert to catch uses of unimplemented features.
	* elf/dl-object.c (_dl_new_object): Don't use rawmemchr.  Use strchr
	and avoid inline optimization.
	* elf/rtld.c (process_envvars): Likewise.
	* elf/dl-open.c: Don't include <stdio-common/_itoa.h>.
	* elf/dl-profile.c (_dl_start_profile): Help compiler to avoid ffs.
	* elf/rtld.c (dl_main): Avoid strsep inline optimization.

	* stdio-common/_itoa.h: Minor simplifications of the code.
	* stdio-common/_itoa.c: Likewise.

	* elf/dl-reloc.c (_dl_relocate_object): Use _dl_debug_printf
	instead of _dl_printf for debugging info output.

	* sysdeps/mips/atomicity.h (exchange_and_add): Use branch likely.
2002-02-03 19:39:52 +00:00
Ulrich Drepper 5c1159b6a9 Update.
2002-02-01  H.J. Lu  <hjl@gnu.org>

	* sysdeps/mips/atomicity.h (exchange_and_add): Use branch
	likely.
	(atomic_add): Likewise.
	(compare_and_swap): Return 0 only when failed to compare. Use
	branch likely.

	* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Use
	branch likely.

2002-02-03  kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/sh/dl-machine.h (elf_machine_rela): Fix a typo.

2002-02-02  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-minimal.c (__strsep): New minimal implementation.
2002-02-03 02:26:37 +00:00
Ulrich Drepper ccdf0cab1d Update.
* elf/dl-minimal.c: Define _itoa for 32-bit machines with HP timing.
	* elf/dl-reloc.c: Pretty printing.
	* sysdeps/generic/ldsodefs.h: Move _dl_hp_timing_overhead and
	procinfo-related variables in rtld_global struct.
	* elf/dl-support.c: Likewise.
	* elf/rtld.c: Likewise.
	* sysdeps/i386/i686/Makefile: Likewise.
	* sysdeps/i386/i686/hp-timing.c: Likewise.
	* sysdeps/i386/i686/hp-timing.h: Likewise.
	* sysdeps/ia64/Makefile: Likewise.
	* sysdeps/ia64/hp-timing.c: Likewise.
	* sysdeps/sparc/sparc32/sparcv9/Makefile: Likewise.
	* sysdeps/sparc/sparc32/sparcv9/hp-timing.c: Likewise.
	* sysdeps/unix/sysv/linux/arm/dl-procinfo.c: Likewise.
	* sysdeps/unix/sysv/linux/arm/dl-procinfo.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/i386/dl-procinfo.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Likewise.
	* sysdeps/x86_64/Makefile: Likewise.
2002-02-01 07:49:47 +00:00
Ulrich Drepper d6b5d570a3 Update.
2002-01-30  Ulrich Drepper  <drepper@redhat.com>

	* Versions.def [ld]: Add GLIBC_2.3.
	* elf/dl-addr.c: Move global variables for SHARED code in struct
	_rtld_global.  Export this struct, remove all exports for the
	signal variables.
	* elf/dl-close.c: Likewise.
	* elf/dl-conflict.c: Likewise.
	* elf/dl-debug.c: Likewise.
	* elf/dl-deps.c: Likewise.
	* elf/dl-dst.h: Likewise.
	* elf/dl-error.c: Likewise.
	* elf/dl-fini.c: Likewise.
	* elf/dl-init.c: Likewise.
	* elf/dl-iteratephdr.c: Likewise.
	* elf/dl-libc.c: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/dl-lookup.c: Likewise.
	* elf/dl-minimal.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-profile.c: Likewise.
	* elf/dl-profstub.c: Likewise.
	* elf/dl-reloc.c: Likewise.
	* elf/dl-runtime.c: Likewise.
	* elf/dl-support.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-version.c: Likewise.
	* elf/do-lookup.h: Likewise.
	* elf/do-rel.h: Likewise.
	* elf/dynamic-link.h: Likewise.
	* elf/rtld.c: Likewise.
	* sysdeps/generic/dl-cache.c: Likewise.
	* sysdeps/generic/dl-sysdep.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/generic/libc-start.c: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/ia64/dl-fptr.c: Likewise.
	* sysdeps/ia64/dl-machine.h: Likewise.
	* sysdeps/unix/sysv/linux/dl-librecon.h: Likewise.
	* sysdeps/unix/sysv/linux/dl-origin.c: Likewise.
	* sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise.
	* sysdeps/unix/sysv/linux/getclktck.c: Likewise.
	* sysdeps/unix/sysv/linux/getpagesize.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/dl-static.c: Likewise.
	* sysdeps/unix/sysv/linux/ia64/getpagesize.c: Likewise.

	* malloc/thread-m.h: Spinlock definitions for x86/x86_64.
2002-01-31 03:41:25 +00:00
Ulrich Drepper d252c4796b (realloc): Handle NULL for first parameter correctly. 2001-11-10 03:23:20 +00:00
Andreas Jaeger 41bdb6e20c Update to LGPL v2.1.
2001-07-06  Paul Eggert  <eggert@twinsun.com>

	* manual/argp.texi: Remove ignored LGPL copyright notice; it's
	not appropriate for documentation anyway.
	* manual/libc-texinfo.sh: "Library General Public License" ->
	"Lesser General Public License".

2001-07-06  Andreas Jaeger  <aj@suse.de>

	* All files under GPL/LGPL version 2: Place under LGPL version
	2.1.
2001-07-06 04:58:11 +00:00