Commit Graph

675 Commits

Author SHA1 Message Date
Ulrich Drepper
34816665b6 Update.
* nss/getXXbyYY_r.c (REENTRANT_NAME): Return ENOENT if status is
	neither SUCCESS nor TRYAGAIN [PR libc/4259].
	* nss/nss_files/files-XXX.c (internal_getent): Don't set *errnop
	to ENOENT if no entry is found.
	* nis/nss_compat/compat-grp.c: Don't set errno in case of lookup
	failure.
	* nis/nss_compat/compat-initgroups.c: Likewise.
	* nis/nss_compat/compat-pwd.c: Likewise.
	* nis/nss_compat/compat-spwd.c: Likewise.
	* nis/nss_nis/nis-alias.c: Likewise.
	* nis/nss_nis/nis-ethers.c: Likewise.
	* nis/nss_nis/nis-grp.c: Likewise.
	* nis/nss_nis/nis-hosts.c: Likewise.
	* nis/nss_nis/nis-initgroups.c: Likewise.
	* nis/nss_nis/nis-netgrp.c: Likewise.
	* nis/nss_nis/nis-network.c: Likewise.
	* nis/nss_nis/nis-proto.c: Likewise.
	* nis/nss_nis/nis-publickey.c: Likewise.
	* nis/nss_nis/nis-pwd.c: Likewise.
	* nis/nss_nis/nis-rpc.c: Likewise.
	* nis/nss_nis/nis-service.c: Likewise.
	* nis/nss_nis/nis-spwd.c: Likewise.
	* resolv/nss_dns/dns-host.c: Likewise.
	* resolv/nss_dns/dns-network.c: Likewise.
	* nis/nss_nisplus/nisplus-alias.c: Save errno around NIS calls.
	* nis/nss_nisplus/nisplus-ethers.c: Likewise.
	* nis/nss_nisplus/nisplus-grp.c: Likewise.
	* nis/nss_nisplus/nisplus-hosts.c: Likewise.
	* nis/nss_nisplus/nisplus-network.c: Likewise.
	* nis/nss_nisplus/nisplus-proto.c: Likewise.
	* nis/nss_nisplus/nisplus-pwd.c: Likewise.
	* nis/nss_nisplus/nisplus-rpc.c: Likewise.
	* nis/nss_nisplus/nisplus-service.c: Likewise.
	* nis/nss_nisplus/nisplus-spwd.c: Likewise.
	* hesiod/nss_hesiod/hesiod-pwd.c (lookup): Preserve errno value.
	* hesiod/nss_hesiod/hesiod-proto.c (lookup): Likewise.
	* hesiod/nss_hesiod/hesiod-grp.c (lookup): Likewise.
	* hesiod/nss_hesiod/hesiod-service.c (lookup): Likewise.
2002-08-26 07:06:57 +00:00
Ulrich Drepper
fd77c3615d Update.
* elf/dl-load.c: Fix typo in comment.  Add a few more __builtin_expect.
2002-08-25 19:34:42 +00:00
Ulrich Drepper
9df8939002 Update.
* elf/rtld.c: Also test for HAVE_VISIBILITY_ATTRIBUTE before
	defining DONT_USE_BOOTSTRAP_MAP.
2002-08-25 09:02:59 +00:00
Ulrich Drepper
6d497bbef7 Update.
* libio/tst-freopen.c (main): Use correct formats for __LINE__.
	* libio/tst-mmap-setvbuf.c (main): Likewise.
	* libio/tst-widetext.c (main): Likewise.

	* libio/tst-mmap-eofsync.c (do_test): Use correct format in error
	message.
	* libio/tst-mmap-fflushsync.c (do_test): Likewise.
	* libio/tst-mmap2-eofsync.c (do_test): Likewise.
2002-08-25 08:44:43 +00:00
Ulrich Drepper
069125e53a Update.
2002-08-23  Ulrich Drepper  <drepper@redhat.com>

	* pthread.c (__linuxthreads_version): New global constant.
2002-08-24 03:35:35 +00:00
Andreas Jaeger
fb2bdbbabd * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
as thread specific register. 
(testandset): Fix inline asm. 
(THREAD_GETMEM): Fix inline asm.
2002-08-23  Andreas Jaeger  <aj@suse.de>

	* sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
	as thread specific register.
	(testandset): Fix inline asm.
	(THREAD_GETMEM): Fix inline asm.
2002-08-23 15:22:25 +00:00
Roland McGrath
8ddcb7da59 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
conditional.
	(INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
	(DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
	macro.  That chooses whether to reuse %gs value or let kernel set it.
	[USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
	[!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
	not constant 0.
2002-08-22 23:47:28 +00:00
Roland McGrath
de9a5225bf 2002-08-22 Roland McGrath <roland@redhat.com>
* sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
	conditional.
	(INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
	(DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
	macro.  That chooses whether to reuse %gs value or let kernel set it.
	[USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
	[!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
	not constant 0.
2002-08-22 23:47:18 +00:00
Ulrich Drepper
0fe354398f Update.
2002-08-21  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
	also to the third definition of this macro.
2002-08-21 11:04:22 +00:00
Andreas Jaeger
c70a093613 (CFLAGS-pt-initfini.s): Set it.
2002-06-17  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
	Set it.
2002-08-21 08:09:20 +00:00
Ulrich Drepper
c761cdf5a0 Update.
* sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
	loading/reading segment registers.  Some old hardware doesn't
	handle the 32-bit instructions as expected.
	* sysdeps/i386/tls.h: Likewise.
2002-08-21 02:35:30 +00:00
Ulrich Drepper
9d69bd2492 Update.
2002-08-20  Ulrich Drepper  <drepper@redhat.com>

	* elf/rtld.c (_dl_start): Pass zero to TLS_INIT_TP.  Set
	bootstrap_map.l_tls_tp_initialized to 1 if TLS_INIT_TP was called.
	(_dl_start_final): Copy l_tls_tp_initialized to GL(dl_rtld_map).
	(dl_main): If HAVE___THREAD is not defined pass l_tls_tp_initialized
	to TL_INIT_TP.  Otherwise pass 1.
	* include/link.h (struct link_map): Add l_tls_tp_initialized.
	* sysdeps/generic/libc-tls.c (__libc_setup_tls): Pass 0 to TL_INIT_TP.

2002-08-20  Brian Youmans  <3diff@gnu.org>
	* manual/contrib.texi: Removed licenses, added acknowledgements
	for contributions by Intel, IBM, Craig Metz.
	* LICENSES: New file, contains the text of all non-FSF licenses in the
	* sysdeps/mach/hurd/net/if_ppp.h: Replaced CMU license with a
	new one modelled on the modern BSD license, per recent letter
	of permission from CMU.
	* sysdeps/unix/sysv/linux/net/if_ppp.h: Likewise.

	* sysdeps/ieee754/dbl-64/MathLib.h: Changed the copyright holder
	from IBM to FSF, per the recent Software Letter.  Changed the
	distribution terms from GPL to LGPL.

	* sysdeps/ieee754/dbl-64/asincos.tbl: Added FSF copyright and
	copying permission notice (Lesser GPL), per recent IBM Software Letter.
	* sysdeps/ieee754/dbl-64/powtwo.tbl: Likewise.
	* sysdeps/ieee754/dbl-64/root.tbl: Likewise.
	* sysdeps/ieee754/dbl-64/sincos.tbl: Likewise.
	* sysdeps/ieee754/dbl-64/uatan.tbl: Likewise.
	* sysdeps/ieee754/dbl-64/uexp.tbl: Likewise.
	* sysdeps/ieee754/dbl-64/ulog.tbl: Likewise.
	* sysdeps/ieee754/dbl-64/upow.tbl: Likewise.
	* sysdeps/ieee754/dbl-64/utan.tbl: Likewise.

	* sysdeps/ieee754/dbl-64/atnat.h: Changed the copyright holder
	* sysdeps/ieee754/dbl-64/atnat2.h: Likewise.
	* sysdeps/ieee754/dbl-64/branred.h: Likewise.
	* sysdeps/ieee754/dbl-64/dla.h: Likewise.
	* sysdeps/ieee754/dbl-64/doasin.h: Likewise.
	* sysdeps/ieee754/dbl-64/dosincos.h: Likewise.
	* sysdeps/ieee754/dbl-64/mpa.h: Likewise.
	* sysdeps/ieee754/dbl-64/mpa2.h: Likewise.
	* sysdeps/ieee754/dbl-64/mpatan.h: Likewise.
	* sysdeps/ieee754/dbl-64/mpexp.h: Likewise.
	* sysdeps/ieee754/dbl-64/mplog.h: Likewise.
	* sysdeps/ieee754/dbl-64/mpsqrt.h: Likewise.
	* sysdeps/ieee754/dbl-64/mydefs.h: Likewise.
	* sysdeps/ieee754/dbl-64/sincos32.h: Likewise.
	* sysdeps/ieee754/dbl-64/uasncs.h: Likewise.
	* sysdeps/ieee754/dbl-64/uexp.h: Likewise.
	* sysdeps/ieee754/dbl-64/ulog.h: Likewise.
	* sysdeps/ieee754/dbl-64/upow.h: Likewise.
	* sysdeps/ieee754/dbl-64/urem.h: Likewise.
	* sysdeps/ieee754/dbl-64/uroot.h: Likewise.
	* sysdeps/ieee754/dbl-64/usncs.h: Likewise.
	* sysdeps/ieee754/dbl-64/utan.h: Likewise.

	* sysdeps/ieee754/dbl-64/branred.c: Corrected the text of the copying
	* sysdeps/ieee754/dbl-64/doasin.c: Likewise.
	* sysdeps/ieee754/dbl-64/dosincos.c: Likewise.
	* sysdeps/ieee754/dbl-64/e_asin.c: Likewise.
	* sysdeps/ieee754/dbl-64/e_atan2.c: Likewise.
	* sysdeps/ieee754/dbl-64/e_exp.c: Likewise.
	* sysdeps/ieee754/dbl-64/e_log.c: Likewise.
	* sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
	* sysdeps/ieee754/dbl-64/e_remainder.c: Likewise.
	* sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise.
	* sysdeps/ieee754/dbl-64/halfulp.c: Likewise.
	* sysdeps/ieee754/dbl-64/mpa.c: Likewise.
	* sysdeps/ieee754/dbl-64/mpatan.c: Likewise.
	* sysdeps/ieee754/dbl-64/mpatan2.c: Likewise.
	* sysdeps/ieee754/dbl-64/mpexp.c: Likewise.
	* sysdeps/ieee754/dbl-64/mplog.c: Likewise.
	* sysdeps/ieee754/dbl-64/mpsqrt.c: Likewise.
	* sysdeps/ieee754/dbl-64/mptan.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_atan.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_sin.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_tan.c: Likewise.
	* sysdeps/ieee754/dbl-64/sincos32.c: Likewise.
	* sysdeps/ieee754/dbl-64/slowexp.c: Likewise.
	* sysdeps/ieee754/dbl-64/slowpow.c:  Likewise.
2002-08-21 00:17:09 +00:00
Ulrich Drepper
845f758a39 (TLS_DO_SET_THREAD_AREA): Second parameter is renamed to secondcall and use is negated. (TLS_SETUP_GS_SEGMENT): Likewise. (TLS_INIT_TP): Likewise. 2002-08-20 23:54:49 +00:00
Ulrich Drepper
69681bdee0 Update.
* include/unistd.h: Don't hide _exit.
2002-08-20 11:10:37 +00:00
Ulrich Drepper
d78ce054e2 Update.
* elf/rtld.c (_dl_start): Pass extra argument 1 to TLS_INIT_TP.
	(dl_main): Padd extra argument 0 to TLS_INIT_TP.
	* sysdeps/generic/libc-tls.c (__libc_setup_tls): Pass extra
	argument 1 to TLS_INIT_TP.
	* sysdeps/generic/tls.h (TLS_INIT_TP): Describe new parameter.

	* locale/loadarchive.c (_nl_load_locale_from_archive): Store strdup of
2002-08-20 10:14:15 +00:00
Ulrich Drepper
58d2d09bde Update.
* sysdeps/generic/dl-tls.c (allocate_dtv): Optimize a bit.
2002-08-20 08:12:32 +00:00
Ulrich Drepper
46615777f5 Update.
2002-08-19  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
	computing index from %gs value.
2002-08-19 22:22:47 +00:00
Ulrich Drepper
3c1f5cab39 (DO_SET_THREAD_AREA): Use correct shift when computing index from %gs value. 2002-08-19 22:21:32 +00:00
Roland McGrath
3ed35099c1 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
register value from entry number properly.
2002-08-17 06:54:04 +00:00
Roland McGrath
25cb6eb229 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
optimally conditional on [__PIC__].
	(TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
	without touching errno, and use latest modify_ldt-like interface.
	(TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
	* sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
	(DO_SET_THREAD_AREA): New macro, uses current syscall interface with
	existing %gs value as the segment to set.
	(INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
	under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
	by the first thread's early TLS setup.
2002-08-16 20:16:38 +00:00
Roland McGrath
c88b47593a 2002-08-16 Jakub Jelinek <jakub@redhat.com>
* locale/loadarchive.c (_nl_load_locale_from_archive): Braino fix
	in change before last: MAX -> MIN.
2002-08-16 00:08:47 +00:00
Ulrich Drepper
faa5b9b31c (TLS_INIT_TP): Convert to statement expression returning 0. 2002-08-15 12:12:51 +00:00
Roland McGrath
e6f526809d * elf/tst-tlsmod4.c (in_dso): Insert a random library call before use
of the TLS macros, otherwise the compiler might not have initialized
	the PIC register yet when we use the PLT via asm.
	* elf/tst-tlsmod3.c (in_dso2): Likewise.
	* elf/tst-tlsmod2.c (in_dso): Likewise.
2002-08-12 06:25:47 +00:00
Ulrich Drepper
b7eb7b0f6d Update.
2002-08-08  Ulrich Drepper  <drepper@redhat.com>

	* gmon/gmon.c (write_gmon): Use O_NOFOLLOW in open calls if available.
2002-08-08 09:04:02 +00:00
Ulrich Drepper
f70b0ea2c7 Update.
* stdlib/isomac.c (get_null_defines): Treat NOT_IN_libc special.
	It is known to be defined.

	* include/string.h: Define index and rindex only if _ISOMAC is not
	defined.
2002-08-08 05:34:04 +00:00
Ulrich Drepper
fc0154dd77 (__linuxthreads_initial_report_events): New variable. (__pthread_initialize_manager): Use it to initialize p_report_events of initial thread. [TLS]: Store pointer to descriptor of manager in __pthread_handles. 2002-08-08 05:20:04 +00:00
Roland McGrath
e8e9149870 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2002-08-08 04:58:42 +00:00
Roland McGrath
939f249c81 2002-08-07 Roland McGrath <roland@redhat.com>
* sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
	an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2002-08-08 04:58:30 +00:00
Roland McGrath
a14f26ef69 * include/sys/resource.h: Use libc_hidden_proto for getpriority,
setpriority.
	* sysdeps/unix/sysv/linux/getpriority.c: Add libc_hidden_def.
	* sysdeps/unix/sysv/irix4/getpriority.c: Likewise.
	* sysdeps/mach/hurd/setpriority.c: Likewise.
	* sysdeps/mach/hurd/getpriority.c: Likewise.
	* sysdeps/generic/setpriority.c: Likewise.
	* sysdeps/generic/getpriority.c: Likewise.

	* include/mcheck.h: Use libc_hidden_proto for mcheck_check_all.
	* malloc/mcheck.c: Add libc_hidden_def.

	* include/search.h: Use libc_hidden_proto for hcreate_r, hdestroy_r.
	* misc/hsearch_r.c: Add libc_hidden_def.

	* include/fnmatch.h: Use libc_hidden_proto for fnmatch.
	* posix/fnmatch.c: Add libc_hidden_weak.
2002-08-04 03:50:21 +00:00
Roland McGrath
5517266d33 2002-08-02 Roland McGrath <roland@redhat.com>
* sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
	Add _LIBC_TSD_KEY_LOCALE.
	* manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
	Call __uselocale to initialize our per-thread locale pointer to
	the global one.
	* pthread.c (__pthread_initialize_minimal): Likewise.
2002-08-04 03:25:12 +00:00
Ulrich Drepper
7498f1b0ba Update.
2002-08-03  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/pthread/bits/libc-tsd.h: Add _LIBC_TSD_KEY_LOCALE.
2002-08-04 03:18:18 +00:00
Ulrich Drepper
ead001fdd6 Add _LIBC_TSD_KEY_LOCALE. 2002-08-04 03:17:32 +00:00
Roland McGrath
26e73ab614 * sunrpc/rpc_thread.c: Define it without static. 2002-08-03 05:56:37 +00:00
Roland McGrath
39afa4425c 2002-08-02 Roland McGrath <roland@redhat.com>
* sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2002-08-03 05:54:35 +00:00
Ulrich Drepper
3c877a0448 Update.
* pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
	internally.
2002-08-03 05:51:04 +00:00
Ulrich Drepper
04a7ed77c2 Declare _errno, _h_errno, and _res unless we use TLS internally. 2002-08-03 05:47:52 +00:00
Ulrich Drepper
1f3f143e62 Update.
2002-08-02  Ulrich Drepper  <drepper@redhat.com>

	* cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
	Don't use p_libc_specific element in thread descriptor.
2002-08-03 03:53:28 +00:00
Roland McGrath
fc10bc8d32 * resolv/resolv.h (_res): Define macro unconditionally.
[! _LIBC_REENTRANT] (_res): Move this conditional decl to ...
	* include/resolv.h: ... here.
	[USE_TLS && HAVE___THREAD] (_res): #undef it and declare
	as a __thread variable.
	* resolv/res_libc.c [USE_TLS && HAVE___THREAD] (_res): Define it as
	a __thread variable instead of a global.
	* resolv/res_data.c [_LIBC]: Don't #undef _res.

	* include/errno.h: Include <tls.h> to make sure USE_TLS defined by the
	time we test it.

	* intl/loadmsgcat.c [__GNUC__]: #undef alloca before defining it.

	* malloc/malloc.c [_LIBC]: Include <string.h> instead of using local
	decls of memset and memcpy.

	* sysdeps/generic/sysdep.h (END): Conditionalize on [__ASSEMBLER__].
	* sysdeps/unix/sysv/linux/i386/sysdep.h (L): Likewise.

	* elf/dl-load.c (_dl_map_object_from_fd): Comment fix.

	* sysdeps/generic/bits/libc-tsd.h [USE_TLS && HAVE___THREAD]
	(__libc_tsd_define): Define using __thread.

	* sunrpc/rpc_thread.c: Use __libc_tsd_define.
	(__rpc_thread_variables): Use __libc_tsd_get.
	(__rpc_thread_destroy): Use __libc_tsd_get instead of calling
	__rpc_thread_variables, which might allocate what we're about to free.

	* inet/herrno.c [USE_TLS && HAVE___THREAD] (h_errno): Define as a
	thread-local variable.
	* resolv/netdb.h (h_errno): Define macro unconditionally.
	[_LIBC] (__set_h_errno): Macro moved to ...
	* include/netdb.h: ... here.
	[USE_TLS && HAVE___THREAD] (h_errno): Declare __thread variable.
	[USE_TLS && HAVE___THREAD] (__set_h_errno): Define using that.
	[! _LIBC_REENTRANT]: #undef h_errno here.

	* include/errno.h: Protect from multiple inclusion.

	* misc/sys/select.h (__NFDBITS, __FDELT, __FDMASK): #undef these
	before defining them, since Linux's <linux/posix_types.h> might have
	defined them.

2002-08-01  Roland McGrath  <roland@redhat.com>
2002-07-31  Roland McGrath  <roland@redhat.com>
2002-07-31  Roland McGrath  <roland@redhat.com>
2002-08-02 03:37:41 +00:00
Roland McGrath
c2afe83352 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
[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.
2002-08-02 03:32:24 +00:00
Roland McGrath
ae8f7f19fa 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.
2002-08-02 03:30:17 +00:00
Ulrich Drepper
06c2c536fc Update.
2002-08-02  Jakub Jelinek  <jakub@redhat.com>

	* malloc/malloc.c (public_cALLOc): Check for overflow on
	multiplication.
	* sunrpc/xdr_array.c (xdr_array): Likewise.
	* sunrpc/rpc/types.h (mem_free): Add comment.
	Patch by Solar Designer <solar@openwall.com>.

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

	* sysdeps/unix/sysv/linux/kernel-features.h
	(__ASSUME_SET_THREAD_AREA_SYSCALL): Define.

	* libio/stdio.h (sys_errlist, sys_nerr, _sys_errlist, _sys_nerr):
	* libio/Makefile (headers): Add bits/sys_errlist.h to the list.
	* sysdeps/generic/bits/sys_errlist.h: New file.  This does *not*
	declare sys_errlist and sys_nerr.
	* sysdeps/unix/sysv/linux/bits/sys_errlist.h: New file.  Does
2002-08-02 01:43:32 +00:00
Ulrich Drepper
0950889b81 (public_cALLOc): Check for overflow on multiplication. 2002-08-02 01:27:46 +00:00
Ulrich Drepper
d7e1ad053b (DO_MODIFY_LDT): Move from INIT_THREAD_SELF. (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available. (FREE_THREAD): Avoid modify_ldt if using GDT. 2002-08-02 01:11:43 +00:00
Ulrich Drepper
79996eeed1 Update.
2002-07-28  Ulrich Drepper  <drepper@redhat.com>

	* po/fi.po: New file.
2002-07-28 19:04:09 +00:00
Ulrich Drepper
78ce5a3bbb Update.
2002-07-24  Ulrich Drepper  <drepper@redhat.com>

	* libio/fileops.c (_IO_file_seekoff_mmap): Do use fp->_offset to
	compute current position.

	* stdio-common/tst-fseek.c (main): Improve error messages.

	* libio/tst-freopen.c (main): Remove unused variable.

	* libio/fileops.c (_IO_file_seekoff_mmap): Set fp->_offset after
	succesful seek call.  Simply error checking.

2002-07-25  Jakub Jelinek  <jakub@redhat.com>

	* config.h.in: Use __ASSEMBLER__ test macro not ASSEMBLER.
	* sysdeps/ia64/fpu/libm_support.h: Likewise.
2002-07-25 01:30:57 +00:00
Ulrich Drepper
8a30f00fe8 Update.
2002-07-23  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/libc-tls.c: New file.
	* csu/Makefile (routines): Add libc-tls.
	(static-only-routines): Add libc-tls.
	* elf/dl-support.c (_dl_phdr): New variable.
	(_dl_phnum): New variable.
	(_dl_aux_init): Initialize _dl_phdr and _dl_phnum from aux vector.
	* sysdeps/generic/libc-start.c (__libc_start_main): Reorganize code
	for !SHARED.  First look through auxiliary vector.  If TLS always
	call __pthread_initialize_minimal.

	* sysdeps/generic/dl-tls.c (_dl_allocate_tls): Make sure size argument
	in mmap call is never zero.
2002-07-23 23:12:01 +00:00
Ulrich Drepper
67ee6db0fd Update.
2002-07-22  Ulrich Drepper  <drepper@redhat.com>

	* Makefile: Actually creat tst-signal.out file when running the test.
2002-07-23 00:37:27 +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
a99bfa85d8 Update.
2002-07-02  H.J. Lu  <hjl@gnu.org>

	* sysdeps/mips/atomicity.h: Don't include <sgidefs.h>.  Always
	use ll/sc.
	* sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise.

	* sysdeps/unix/sysv/linux/configure.in: Set arch_minimum_kernel
	to 2.4.0 for mips.

	TLS fail if USE_TLS is not defined.
2002-07-16 01:02:04 +00:00
Ulrich Drepper
2acfe5d64c Update.
2002-07-14  Ulrich Drepper  <drepper@redhat.com>

	* manager.c (pthread_handle_create): Initialize self-reference in
	descriptor.
2002-07-15 02:05:23 +00:00