mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* sysdeps/posix/readv.c: Include <errno.h>, use __set_errno macro.
* sysdeps/posix/writev.c: Likewise. From Momchil Velikov <velco@fadata.bg>. * elf/dl-error.c [! _LIBC_REENTRANT]: Use a static variable instead of calling *GL(dl_error_catch_tsd) for a thread-local location. * elf/rtld.c (startup_error_tsd): Conditionalize on [_LIBC_REENTRANT]. (dl_main): Same for GL(dl_error_catch_tsd) initialization. * elf/dl-tsd.c: Conditionalize contents on [_LIBC_REENTRANT]. * libio/iofflush.c: Add libc_hidden_def. * libio/iofwrite.c: Likewise. * sysdeps/generic/sigtimedwait.c: Likewise. * sysdeps/generic/sigwaitinfo.c: Likewise. * sysdeps/posix/sigwait.c: Likewise. Reported by Momchil Velikov <velco@fadata.bg>. * inet/inet_lnaof.c (inet_lnaof): Change return type to in_addr_t to match <arpa/inet.h> declaration. * inet/inet_netof.c (inet_netof): Likewise. * inet/inet_mkadr.c (inet_makeaddr): Likewise for argument types. Reported by Momchil Velikov <velco@fadata.bg>.
This commit is contained in:
@ -57,6 +57,12 @@ INTVARDEF(_dl_out_of_memory)
|
||||
global variable. */
|
||||
static receiver_fct receiver;
|
||||
|
||||
#ifdef _LIBC_REENTRANT
|
||||
# define CATCH_HOOK (*(struct catch **) (*GL(dl_error_catch_tsd)) ())
|
||||
#else
|
||||
static struct catch *catch_hook;
|
||||
# define CATCH_HOOK catch_hook
|
||||
#endif
|
||||
|
||||
void
|
||||
internal_function
|
||||
@ -68,7 +74,7 @@ _dl_signal_error (int errcode, const char *objname, const char *occation,
|
||||
if (! errstring)
|
||||
errstring = N_("DYNAMIC LINKER BUG!!!");
|
||||
|
||||
lcatch = *((*GL(dl_error_catch_tsd)) ());
|
||||
lcatch = CATCH_HOOK;
|
||||
if (objname == NULL)
|
||||
objname = "";
|
||||
if (lcatch != NULL)
|
||||
@ -147,7 +153,7 @@ _dl_catch_error (const char **objname, const char **errstring,
|
||||
inefficient. So we initialize `c' by hand. */
|
||||
c.errstring = NULL;
|
||||
|
||||
void **catchp = (*GL(dl_error_catch_tsd)) ();
|
||||
struct catch **const catchp = &CATCH_HOOK;
|
||||
old = *catchp;
|
||||
errcode = setjmp (c.env);
|
||||
if (__builtin_expect (errcode, 0) == 0)
|
||||
@ -173,7 +179,7 @@ void
|
||||
internal_function
|
||||
_dl_receive_error (receiver_fct fct, void (*operate) (void *), void *args)
|
||||
{
|
||||
void **catchp = (*GL(dl_error_catch_tsd)) ();
|
||||
struct catch **const catchp = &CATCH_HOOK;
|
||||
struct catch *old_catch;
|
||||
receiver_fct old_receiver;
|
||||
|
||||
|
Reference in New Issue
Block a user